From b68be5d140b12be8c3ae82eb7fcaa6d22efc874d Mon Sep 17 00:00:00 2001 From: Zetazzz Date: Thu, 13 Jun 2024 13:33:58 +0800 Subject: [PATCH] recreate folder structures using boilerplate --- .eslintrc.json | 2 +- .gitignore | 10 +- .telescope.json | 191 + .vscode/settings.json | 2 +- git-modules/cometbft/cometbft/main | 1 + git-modules/cosmos/cosmos-proto/main | 1 + git-modules/cosmos/cosmos-sdk/main | 1 + git-modules/cosmos/cosmos-sdk/release/v0.50.x | 1 + git-modules/cosmos/gogoproto/main | 1 + git-modules/cosmos/ibc-go/main | 1 + git-modules/cosmos/ics23/master | 1 + git-modules/cosmwasm/wasmd/main | 1 + git-modules/gogo/protobuf/master | 1 + git-modules/googleapis/googleapis/master | 1 + git-modules/injectivelabs/sdk-go/master | 1 + git-modules/protocolbuffers/protobuf/main | 1 + git-modules/tendermint/tendermint/main | 1 + jest.config.js | 12 +- libs/cosmos-types/amino/amino.ts | 2 +- libs/cosmos-types/binary.ts | 86 +- libs/cosmos-types/cosmos/auth/v1beta1/auth.ts | 204 +- .../cosmos/auth/v1beta1/query.rpc.Query.ts | 26 +- .../cosmos-types/cosmos/auth/v1beta1/query.ts | 590 +- .../cosmos/authz/v1beta1/authz.ts | 170 +- .../cosmos/authz/v1beta1/tx.amino.ts | 14 +- .../cosmos/authz/v1beta1/tx.registry.ts | 6 +- .../cosmos/authz/v1beta1/tx.rpc.msg.ts | 28 +- libs/cosmos-types/cosmos/authz/v1beta1/tx.ts | 238 +- libs/cosmos-types/cosmos/bank/v1beta1/bank.ts | 366 +- .../cosmos/bank/v1beta1/query.rpc.Query.ts | 32 +- .../cosmos-types/cosmos/bank/v1beta1/query.ts | 890 +- .../cosmos/bank/v1beta1/tx.amino.ts | 18 +- .../cosmos/bank/v1beta1/tx.registry.ts | 6 +- .../cosmos/bank/v1beta1/tx.rpc.msg.ts | 36 +- libs/cosmos-types/cosmos/bank/v1beta1/tx.ts | 258 +- .../cosmos/base/abci/v1beta1/abci.ts | 1698 ++ .../cosmos/base/query/v1beta1/pagination.ts | 92 +- libs/cosmos-types/cosmos/base/v1beta1/coin.ts | 178 +- libs/cosmos-types/cosmos/client.ts | 43 +- .../cosmos/crypto/ed25519/keys.ts | 62 +- .../crypto/multisig/v1beta1/multisig.ts | 225 + .../cosmos/crypto/secp256k1/keys.ts | 62 +- .../cosmos/crypto/secp256r1/keys.ts | 62 +- .../distribution/v1beta1/distribution.ts | 538 +- .../cosmos/distribution/v1beta1/tx.amino.ts | 30 +- .../distribution/v1beta1/tx.registry.ts | 6 +- .../cosmos/distribution/v1beta1/tx.rpc.msg.ts | 60 +- .../cosmos/distribution/v1beta1/tx.ts | 480 +- .../cosmos/feegrant/v1beta1/tx.amino.ts | 14 +- .../cosmos/feegrant/v1beta1/tx.registry.ts | 6 +- .../cosmos/feegrant/v1beta1/tx.rpc.msg.ts | 16 +- .../cosmos/feegrant/v1beta1/tx.ts | 206 +- libs/cosmos-types/cosmos/gov/v1/gov.ts | 834 +- libs/cosmos-types/cosmos/gov/v1/tx.amino.ts | 30 +- .../cosmos-types/cosmos/gov/v1/tx.registry.ts | 6 +- libs/cosmos-types/cosmos/gov/v1/tx.rpc.msg.ts | 32 +- libs/cosmos-types/cosmos/gov/v1/tx.ts | 586 +- libs/cosmos-types/cosmos/gov/v1beta1/gov.ts | 604 +- .../cosmos/gov/v1beta1/query.rpc.Query.ts | 22 +- libs/cosmos-types/cosmos/gov/v1beta1/query.ts | 538 +- .../cosmos/gov/v1beta1/tx.amino.ts | 18 +- .../cosmos/gov/v1beta1/tx.registry.ts | 6 +- .../cosmos/gov/v1beta1/tx.rpc.msg.ts | 36 +- libs/cosmos-types/cosmos/gov/v1beta1/tx.ts | 300 +- libs/cosmos-types/cosmos/group/v1/tx.amino.ts | 58 +- .../cosmos/group/v1/tx.registry.ts | 6 +- .../cosmos/group/v1/tx.rpc.msg.ts | 60 +- libs/cosmos-types/cosmos/group/v1/tx.ts | 1204 +- libs/cosmos-types/cosmos/group/v1/types.ts | 942 +- libs/cosmos-types/cosmos/ics23/v1/proofs.ts | 774 +- libs/cosmos-types/cosmos/msg/v1/msg.ts | 2 +- libs/cosmos-types/cosmos/query/v1/query.ts | 2 +- libs/cosmos-types/cosmos/rpc.query.ts | 13 +- libs/cosmos-types/cosmos/rpc.tx.ts | 20 +- .../cosmos/staking/v1beta1/query.rpc.Query.ts | 34 +- .../cosmos/staking/v1beta1/query.ts | 960 +- .../cosmos/staking/v1beta1/staking.ts | 1257 +- .../cosmos/staking/v1beta1/tx.amino.ts | 30 +- .../cosmos/staking/v1beta1/tx.registry.ts | 6 +- .../cosmos/staking/v1beta1/tx.rpc.msg.ts | 60 +- .../cosmos-types/cosmos/staking/v1beta1/tx.ts | 607 +- .../cosmos/tx/signing/v1beta1/signing.ts | 688 + .../cosmos/tx/v1beta1/service.rpc.Service.ts | 117 + .../cosmos-types/cosmos/tx/v1beta1/service.ts | 2294 ++ libs/cosmos-types/cosmos/tx/v1beta1/tx.ts | 2029 ++ .../cosmos/upgrade/v1beta1/upgrade.ts | 226 +- .../cosmos/vesting/v1beta1/tx.amino.ts | 14 +- .../cosmos/vesting/v1beta1/tx.registry.ts | 6 +- .../cosmos/vesting/v1beta1/tx.rpc.msg.ts | 16 +- .../cosmos-types/cosmos/vesting/v1beta1/tx.ts | 250 +- .../cosmos/vesting/v1beta1/vesting.ts | 218 +- libs/cosmos-types/cosmos_proto/cosmos.ts | 158 +- libs/cosmos-types/cosmwasm.ts | 2 +- libs/cosmos-types/cosmwasm/client.ts | 11 +- libs/cosmos-types/cosmwasm/rpc.query.ts | 15 +- libs/cosmos-types/cosmwasm/rpc.tx.ts | 22 +- .../cosmwasm/wasm/v1/proposal_legacy.ts | 2433 ++ .../cosmwasm/wasm/v1/query.rpc.Query.ts | 30 +- libs/cosmos-types/cosmwasm/wasm/v1/query.ts | 909 +- .../cosmos-types/cosmwasm/wasm/v1/tx.amino.ts | 70 +- .../cosmwasm/wasm/v1/tx.registry.ts | 6 +- .../cosmwasm/wasm/v1/tx.rpc.msg.ts | 106 +- libs/cosmos-types/cosmwasm/wasm/v1/tx.ts | 1515 +- libs/cosmos-types/cosmwasm/wasm/v1/types.ts | 467 +- libs/cosmos-types/gogoproto/gogo.ts | 2 +- libs/cosmos-types/google/api/annotations.ts | 2 +- libs/cosmos-types/google/api/http.ts | 184 +- libs/cosmos-types/google/protobuf/any.ts | 38 +- .../google/protobuf/descriptor.ts | 2988 +-- libs/cosmos-types/google/protobuf/duration.ts | 42 +- .../cosmos-types/google/protobuf/timestamp.ts | 38 +- .../ibc/applications/transfer/v1/transfer.ts | 164 +- .../ibc/applications/transfer/v1/tx.amino.ts | 10 +- .../applications/transfer/v1/tx.registry.ts | 6 +- .../applications/transfer/v1/tx.rpc.msg.ts | 20 +- .../ibc/applications/transfer/v1/tx.ts | 232 +- libs/cosmos-types/ibc/client.ts | 23 +- .../ibc/core/channel/v1/channel.ts | 654 +- .../ibc/core/channel/v1/tx.amino.ts | 78 +- .../ibc/core/channel/v1/tx.registry.ts | 6 +- .../ibc/core/channel/v1/tx.rpc.msg.ts | 80 +- libs/cosmos-types/ibc/core/channel/v1/tx.ts | 2002 +- .../ibc/core/channel/v1/upgrade.ts | 138 +- .../cosmos-types/ibc/core/client/v1/client.ts | 330 +- .../ibc/core/client/v1/tx.amino.ts | 30 +- .../ibc/core/client/v1/tx.registry.ts | 6 +- .../ibc/core/client/v1/tx.rpc.msg.ts | 32 +- libs/cosmos-types/ibc/core/client/v1/tx.ts | 526 +- .../ibc/core/commitment/v1/commitment.ts | 116 +- .../ibc/core/connection/v1/connection.ts | 392 +- .../ibc/core/connection/v1/tx.amino.ts | 22 +- .../ibc/core/connection/v1/tx.registry.ts | 6 +- .../ibc/core/connection/v1/tx.rpc.msg.ts | 24 +- .../cosmos-types/ibc/core/connection/v1/tx.ts | 510 +- libs/cosmos-types/ibc/rpc.tx.ts | 28 +- libs/cosmos-types/index.ts | 2 +- .../injective/types/v1beta1/account.ts | 38 +- libs/cosmos-types/package.json | 9 +- libs/cosmos-types/registry.ts | 6 +- libs/cosmos-types/service-ops.ts | 26 +- libs/cosmos-types/stargate.ts | 26 +- libs/cosmos-types/tendermint/abci/types.ts | 2386 +- libs/cosmos-types/tendermint/crypto/keys.ts | 32 +- libs/cosmos-types/tendermint/crypto/proof.ts | 202 +- libs/cosmos-types/tendermint/types/block.ts | 131 + .../cosmos-types/tendermint/types/evidence.ts | 476 + libs/cosmos-types/tendermint/types/params.ts | 220 +- libs/cosmos-types/tendermint/types/types.ts | 746 +- .../tendermint/types/validator.ts | 170 +- libs/cosmos-types/tendermint/version/types.ts | 74 +- libs/cosmos-types/types.ts | 13 +- libs/cosmos-types/utf8.ts | 6 +- libs/cosmos-types/varint.ts | 30 +- libs/interchainjs/.eslintignore | 1 + libs/interchainjs/index.ts | 3 - libs/interchainjs/jest.starship.config.js | 14 +- libs/interchainjs/package.json | 5 +- .../{ => src}/cosmwasm-stargate.ts | 20 +- libs/interchainjs/src/index.ts | 3 + libs/interchainjs/{ => src}/query/rpc.ts | 24 +- libs/interchainjs/{ => src}/signing-client.ts | 162 +- libs/interchainjs/{ => src}/stargate.ts | 18 +- libs/interchainjs/src/types/index.ts | 3 + libs/interchainjs/{ => src}/types/query.ts | 2 +- .../{ => src}/types/signing-client.ts | 6 +- libs/interchainjs/{ => src}/types/wallet.ts | 21 +- libs/interchainjs/src/utils.ts | 47 + .../{ => src}/wallets/secp256k1.ts | 104 +- .../starship/__tests__/gov.test.ts | 99 +- .../starship/__tests__/setup.test.ts | 8 +- .../starship/__tests__/staking.test.ts | 55 +- .../starship/__tests__/token.test.ts | 84 +- libs/interchainjs/starship/src/utils.ts | 6 +- libs/interchainjs/tsconfig.esm.json | 12 +- libs/interchainjs/tsconfig.json | 7 +- libs/interchainjs/types/index.ts | 3 - libs/interchainjs/utils.ts | 117 - networks/cosmos/amino.ts | 152 - networks/cosmos/codegen/binary.ts | 534 - .../codegen/cosmos/auth/v1beta1/auth.ts | 270 - .../cosmos/auth/v1beta1/query.rpc.Query.ts | 263 - .../codegen/cosmos/auth/v1beta1/query.ts | 887 - .../codegen/cosmos/base/abci/v1beta1/abci.ts | 748 - .../cosmos/base/query/v1beta1/pagination.ts | 179 - .../codegen/cosmos/base/v1beta1/coin.ts | 194 - .../crypto/multisig/v1beta1/multisig.ts | 102 - .../codegen/cosmos/crypto/secp256k1/keys.ts | 90 - .../cosmos/tx/signing/v1beta1/signing.ts | 460 - .../cosmos/tx/v1beta1/service.rpc.Service.ts | 207 - .../codegen/cosmos/tx/v1beta1/service.ts | 1090 - .../cosmos/codegen/cosmos/tx/v1beta1/tx.ts | 992 - .../codegen/cosmos/vesting/v1beta1/vesting.ts | 344 - networks/cosmos/codegen/google/api/http.ts | 554 - .../cosmos/codegen/google/protobuf/any.ts | 168 - .../codegen/google/protobuf/duration.ts | 123 - .../codegen/google/protobuf/timestamp.ts | 152 - networks/cosmos/codegen/helpers.ts | 251 - .../cosmos/codegen/tendermint/abci/types.ts | 3153 --- .../cosmos/codegen/tendermint/crypto/keys.ts | 51 - .../cosmos/codegen/tendermint/crypto/proof.ts | 277 - .../cosmos/codegen/tendermint/types/block.ts | 70 - .../codegen/tendermint/types/evidence.ts | 244 - .../cosmos/codegen/tendermint/types/params.ts | 342 - .../cosmos/codegen/tendermint/types/types.ts | 1013 - .../codegen/tendermint/types/validator.ts | 174 - .../codegen/tendermint/version/types.ts | 108 - networks/cosmos/codegen/utf8.ts | 148 - networks/cosmos/codegen/varint.ts | 488 - networks/cosmos/direct.ts | 100 - networks/cosmos/index.ts | 3 - networks/cosmos/jest.starship.config.js | 32 +- networks/cosmos/package.json | 13 +- networks/cosmos/scripts/gen-fee-tokens.ts | 24 - networks/cosmos/scripts/gen-prefix.ts | 23 - networks/cosmos/src/amino.ts | 112 + networks/cosmos/src/base/base-signer.ts | 175 + networks/cosmos/src/base/builder-context.ts | 7 + networks/cosmos/src/base/index.ts | 2 + networks/cosmos/src/base/tx-builder.ts | 171 + .../cosmos/src/builder/amino-tx-builder.ts | 42 + .../cosmos/src/builder/direct-tx-builder.ts | 37 + .../cosmos/{ => src}/data/fee-tokens.json | 0 networks/cosmos/{ => src}/data/prefix.json | 0 networks/cosmos/{ => src}/defaults.ts | 70 +- networks/cosmos/src/direct.ts | 74 + networks/cosmos/src/index.ts | 3 + networks/cosmos/{ => src}/query/rpc.ts | 103 +- networks/cosmos/src/types/index.ts | 2 + networks/cosmos/{ => src}/types/rpc.ts | 35 +- networks/cosmos/{ => src}/types/signer.ts | 91 +- networks/cosmos/{ => src}/utils/amino.ts | 23 +- networks/cosmos/{ => src}/utils/asserts.ts | 2 +- networks/cosmos/{ => src}/utils/direct.ts | 13 +- networks/cosmos/{ => src}/utils/fee.ts | 45 +- networks/cosmos/src/utils/index.ts | 7 + networks/cosmos/{ => src}/utils/rpc.ts | 42 +- networks/cosmos/{ => src}/utils/wallet.ts | 39 +- .../cosmos/starship/__tests__/gov.test.ts | 153 +- .../cosmos/starship/__tests__/setup.test.ts | 8 +- .../cosmos/starship/__tests__/staking.test.ts | 85 +- .../cosmos/starship/__tests__/token.test.ts | 136 +- networks/cosmos/starship/src/utils.ts | 6 +- networks/cosmos/tsconfig.esm.json | 9 +- networks/cosmos/tsconfig.json | 6 +- networks/cosmos/types/index.ts | 15 - networks/cosmos/utils/base-signer.ts | 239 - networks/cosmos/utils/index.ts | 7 - networks/ethereum/defaults.ts | 33 - networks/ethereum/eip712.ts | 97 - networks/ethereum/index.ts | 3 - networks/ethereum/package.json | 9 +- networks/ethereum/src/defaults.ts | 37 + networks/ethereum/src/eip712.ts | 85 + networks/ethereum/src/index.ts | 3 + networks/ethereum/src/types/index.ts | 1 + networks/ethereum/src/types/signer.ts | 35 + networks/ethereum/{ => src}/utils.ts | 28 +- networks/ethereum/tsconfig.esm.json | 9 +- networks/ethereum/tsconfig.json | 6 +- .../{injective => ethermint}/CHANGELOG.md | 0 networks/{injective => ethermint}/README.md | 5 +- networks/ethermint/jest.starship.config.js | 19 + networks/ethermint/jest.testnet.config.js | 18 + networks/ethermint/package-lock.json | 21468 ++++++++++++++++ .../{injective => ethermint}/package.json | 13 +- networks/ethermint/src/amino.ts | 64 + .../src/builder/eip712-tx-builder.ts | 97 + networks/ethermint/src/defaults.ts | 168 + networks/ethermint/src/direct.ts | 49 + networks/ethermint/src/eip712.ts | 73 + .../src}/eth-utils/helpers.ts | 8 +- .../src}/eth-utils/injective-LICENSE | 0 .../src}/eth-utils/map.ts | 215 +- .../src}/eth-utils/numbers.ts | 4 +- networks/ethermint/src/index.ts | 3 + networks/ethermint/src/types/index.ts | 1 + networks/ethermint/src/types/signer.ts | 55 + networks/ethermint/src/utils.spec.ts | 45 + .../{injective => ethermint/src}/utils.ts | 20 +- .../starship/README.md | 0 .../starship/TestnetGuide.md | 0 .../starship/__tests__/gov.test.ts | 139 +- .../starship/__tests__/setup.test.ts | 10 + .../starship/__tests__/staking.test.ts | 64 +- .../starship/__tests__/testnet.test.ts | 111 + .../starship/__tests__/token.test.ts | 134 +- .../starship/configs/config.local.yaml | 0 .../starship/configs/config.workflow.yaml | 0 .../starship/configs/config.yaml | 0 .../starship/configs/starship.local.yaml | 0 .../starship/configs/starship.yaml | 0 .../starship/src/index.ts | 0 .../starship/src/utils.ts | 6 +- .../test-utils/index.ts | 0 .../test-utils/utils.ts | 2 +- networks/ethermint/tsconfig.esm.json | 9 + networks/ethermint/tsconfig.json | 9 + networks/injective/amino.ts | 65 - .../injective/types/v1beta1/account.ts | 68 - networks/injective/defaults.ts | 169 - networks/injective/direct.ts | 53 - networks/injective/eip712.ts | 155 - networks/injective/index.ts | 3 - networks/injective/jest.starship.config.js | 19 - networks/injective/jest.testnet.config.js | 18 - .../starship/__tests__/setup.test.ts | 10 - networks/injective/tsconfig.esm.json | 10 - networks/injective/tsconfig.json | 9 - networks/injective/types.ts | 22 - networks/injective/utils.spec.ts | 44 - package.json | 16 +- packages/auth/defaults.ts | 10 - packages/auth/ed25519.ts | 19 - packages/auth/index.ts | 1 - packages/auth/package.json | 9 +- packages/auth/secp256k1.ts | 111 - packages/auth/src/defaults.ts | 10 + packages/auth/src/ed25519.ts | 20 + packages/auth/src/index.ts | 1 + packages/auth/src/secp256k1.ts | 88 + packages/auth/src/utils.ts | 10 + packages/auth/tsconfig.esm.json | 9 +- packages/auth/tsconfig.json | 6 +- packages/auth/utils.ts | 10 - packages/types/index.ts | 2 - packages/types/package.json | 13 +- packages/types/src/auth.ts | 6 +- packages/types/src/index.ts | 11 +- packages/types/src/namespaces.ts | 94 - packages/types/src/signer.ts | 107 +- packages/types/src/telescope.ts | 6 +- packages/types/src/wallet.ts | 15 +- packages/types/tsconfig.esm.json | 8 + packages/types/tsconfig.json | 7 +- packages/utils/index.ts | 2 +- packages/utils/package.json | 15 +- packages/utils/src/asserts.ts | 6 +- packages/utils/src/auth.ts | 50 +- packages/utils/src/base-signer.ts | 46 - packages/utils/src/encoding.ts | 24 +- packages/utils/src/endpoint.ts | 4 +- packages/utils/src/index.ts | 15 +- packages/utils/src/key.spec.ts | 28 +- packages/utils/src/key.ts | 7 +- packages/utils/src/price.ts | 9 +- packages/utils/tsconfig.esm.json | 9 +- packages/utils/tsconfig.json | 6 +- protos/cosmos/base/abci/v1beta1/abci.proto | 177 + .../crypto/multisig/v1beta1/multisig.proto | 25 + .../cosmos/tx/signing/v1beta1/signing.proto | 107 + protos/cosmos/tx/v1beta1/service.proto | 292 + protos/cosmos/tx/v1beta1/tx.proto | 260 + protos/cosmwasm/wasm/v1/proposal_legacy.proto | 355 - .../applications/transfer/v1/transfer.proto | 10 - protos/ibc/applications/transfer/v1/tx.proto | 6 +- protos/tendermint/types/block.proto | 15 + protos/tendermint/types/evidence.proto | 38 + scripts/.protod.config.json | 2 + tsconfig.json | 6 +- yarn.lock | 7 +- 360 files changed, 51084 insertions(+), 32381 deletions(-) create mode 100644 .telescope.json create mode 160000 git-modules/cometbft/cometbft/main create mode 160000 git-modules/cosmos/cosmos-proto/main create mode 160000 git-modules/cosmos/cosmos-sdk/main create mode 160000 git-modules/cosmos/cosmos-sdk/release/v0.50.x create mode 160000 git-modules/cosmos/gogoproto/main create mode 160000 git-modules/cosmos/ibc-go/main create mode 160000 git-modules/cosmos/ics23/master create mode 160000 git-modules/cosmwasm/wasmd/main create mode 160000 git-modules/gogo/protobuf/master create mode 160000 git-modules/googleapis/googleapis/master create mode 160000 git-modules/injectivelabs/sdk-go/master create mode 160000 git-modules/protocolbuffers/protobuf/main create mode 160000 git-modules/tendermint/tendermint/main create mode 100644 libs/cosmos-types/cosmos/base/abci/v1beta1/abci.ts create mode 100644 libs/cosmos-types/cosmos/crypto/multisig/v1beta1/multisig.ts create mode 100644 libs/cosmos-types/cosmos/tx/signing/v1beta1/signing.ts create mode 100644 libs/cosmos-types/cosmos/tx/v1beta1/service.rpc.Service.ts create mode 100644 libs/cosmos-types/cosmos/tx/v1beta1/service.ts create mode 100644 libs/cosmos-types/cosmos/tx/v1beta1/tx.ts create mode 100644 libs/cosmos-types/cosmwasm/wasm/v1/proposal_legacy.ts create mode 100644 libs/cosmos-types/tendermint/types/block.ts create mode 100644 libs/cosmos-types/tendermint/types/evidence.ts create mode 100644 libs/interchainjs/.eslintignore delete mode 100644 libs/interchainjs/index.ts rename libs/interchainjs/{ => src}/cosmwasm-stargate.ts (61%) create mode 100644 libs/interchainjs/src/index.ts rename libs/interchainjs/{ => src}/query/rpc.ts (60%) rename libs/interchainjs/{ => src}/signing-client.ts (82%) rename libs/interchainjs/{ => src}/stargate.ts (62%) create mode 100644 libs/interchainjs/src/types/index.ts rename libs/interchainjs/{ => src}/types/query.ts (98%) rename libs/interchainjs/{ => src}/types/signing-client.ts (90%) rename libs/interchainjs/{ => src}/types/wallet.ts (60%) create mode 100644 libs/interchainjs/src/utils.ts rename libs/interchainjs/{ => src}/wallets/secp256k1.ts (50%) delete mode 100644 libs/interchainjs/types/index.ts delete mode 100644 libs/interchainjs/utils.ts delete mode 100644 networks/cosmos/amino.ts delete mode 100644 networks/cosmos/codegen/binary.ts delete mode 100644 networks/cosmos/codegen/cosmos/auth/v1beta1/auth.ts delete mode 100644 networks/cosmos/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts delete mode 100644 networks/cosmos/codegen/cosmos/auth/v1beta1/query.ts delete mode 100644 networks/cosmos/codegen/cosmos/base/abci/v1beta1/abci.ts delete mode 100644 networks/cosmos/codegen/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 networks/cosmos/codegen/cosmos/base/v1beta1/coin.ts delete mode 100644 networks/cosmos/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts delete mode 100644 networks/cosmos/codegen/cosmos/crypto/secp256k1/keys.ts delete mode 100644 networks/cosmos/codegen/cosmos/tx/signing/v1beta1/signing.ts delete mode 100644 networks/cosmos/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts delete mode 100644 networks/cosmos/codegen/cosmos/tx/v1beta1/service.ts delete mode 100644 networks/cosmos/codegen/cosmos/tx/v1beta1/tx.ts delete mode 100644 networks/cosmos/codegen/cosmos/vesting/v1beta1/vesting.ts delete mode 100644 networks/cosmos/codegen/google/api/http.ts delete mode 100644 networks/cosmos/codegen/google/protobuf/any.ts delete mode 100644 networks/cosmos/codegen/google/protobuf/duration.ts delete mode 100644 networks/cosmos/codegen/google/protobuf/timestamp.ts delete mode 100644 networks/cosmos/codegen/helpers.ts delete mode 100644 networks/cosmos/codegen/tendermint/abci/types.ts delete mode 100644 networks/cosmos/codegen/tendermint/crypto/keys.ts delete mode 100644 networks/cosmos/codegen/tendermint/crypto/proof.ts delete mode 100644 networks/cosmos/codegen/tendermint/types/block.ts delete mode 100644 networks/cosmos/codegen/tendermint/types/evidence.ts delete mode 100644 networks/cosmos/codegen/tendermint/types/params.ts delete mode 100644 networks/cosmos/codegen/tendermint/types/types.ts delete mode 100644 networks/cosmos/codegen/tendermint/types/validator.ts delete mode 100644 networks/cosmos/codegen/tendermint/version/types.ts delete mode 100644 networks/cosmos/codegen/utf8.ts delete mode 100644 networks/cosmos/codegen/varint.ts delete mode 100644 networks/cosmos/direct.ts delete mode 100644 networks/cosmos/index.ts delete mode 100644 networks/cosmos/scripts/gen-fee-tokens.ts delete mode 100644 networks/cosmos/scripts/gen-prefix.ts create mode 100644 networks/cosmos/src/amino.ts create mode 100644 networks/cosmos/src/base/base-signer.ts create mode 100644 networks/cosmos/src/base/builder-context.ts create mode 100644 networks/cosmos/src/base/index.ts create mode 100644 networks/cosmos/src/base/tx-builder.ts create mode 100644 networks/cosmos/src/builder/amino-tx-builder.ts create mode 100644 networks/cosmos/src/builder/direct-tx-builder.ts rename networks/cosmos/{ => src}/data/fee-tokens.json (100%) rename networks/cosmos/{ => src}/data/prefix.json (100%) rename networks/cosmos/{ => src}/defaults.ts (55%) create mode 100644 networks/cosmos/src/direct.ts create mode 100644 networks/cosmos/src/index.ts rename networks/cosmos/{ => src}/query/rpc.ts (60%) create mode 100644 networks/cosmos/src/types/index.ts rename networks/cosmos/{ => src}/types/rpc.ts (65%) rename networks/cosmos/{ => src}/types/signer.ts (65%) rename networks/cosmos/{ => src}/utils/amino.ts (79%) rename networks/cosmos/{ => src}/utils/asserts.ts (94%) rename networks/cosmos/{ => src}/utils/direct.ts (87%) rename networks/cosmos/{ => src}/utils/fee.ts (63%) create mode 100644 networks/cosmos/src/utils/index.ts rename networks/cosmos/{ => src}/utils/rpc.ts (58%) rename networks/cosmos/{ => src}/utils/wallet.ts (55%) delete mode 100644 networks/cosmos/types/index.ts delete mode 100644 networks/cosmos/utils/base-signer.ts delete mode 100644 networks/cosmos/utils/index.ts delete mode 100644 networks/ethereum/defaults.ts delete mode 100644 networks/ethereum/eip712.ts delete mode 100644 networks/ethereum/index.ts create mode 100644 networks/ethereum/src/defaults.ts create mode 100644 networks/ethereum/src/eip712.ts create mode 100644 networks/ethereum/src/index.ts create mode 100644 networks/ethereum/src/types/index.ts create mode 100644 networks/ethereum/src/types/signer.ts rename networks/ethereum/{ => src}/utils.ts (65%) rename networks/{injective => ethermint}/CHANGELOG.md (100%) rename networks/{injective => ethermint}/README.md (95%) create mode 100644 networks/ethermint/jest.starship.config.js create mode 100644 networks/ethermint/jest.testnet.config.js create mode 100644 networks/ethermint/package-lock.json rename networks/{injective => ethermint}/package.json (87%) create mode 100644 networks/ethermint/src/amino.ts create mode 100644 networks/ethermint/src/builder/eip712-tx-builder.ts create mode 100644 networks/ethermint/src/defaults.ts create mode 100644 networks/ethermint/src/direct.ts create mode 100644 networks/ethermint/src/eip712.ts rename networks/{injective => ethermint/src}/eth-utils/helpers.ts (72%) rename networks/{injective => ethermint/src}/eth-utils/injective-LICENSE (100%) rename networks/{injective => ethermint/src}/eth-utils/map.ts (69%) rename networks/{injective => ethermint/src}/eth-utils/numbers.ts (77%) create mode 100644 networks/ethermint/src/index.ts create mode 100644 networks/ethermint/src/types/index.ts create mode 100644 networks/ethermint/src/types/signer.ts create mode 100644 networks/ethermint/src/utils.spec.ts rename networks/{injective => ethermint/src}/utils.ts (69%) rename networks/{injective => ethermint}/starship/README.md (100%) rename networks/{injective => ethermint}/starship/TestnetGuide.md (100%) rename networks/{injective => ethermint}/starship/__tests__/gov.test.ts (68%) create mode 100644 networks/ethermint/starship/__tests__/setup.test.ts rename networks/{injective => ethermint}/starship/__tests__/staking.test.ts (68%) create mode 100644 networks/ethermint/starship/__tests__/testnet.test.ts rename networks/{injective => ethermint}/starship/__tests__/token.test.ts (57%) rename networks/{injective => ethermint}/starship/configs/config.local.yaml (100%) rename networks/{injective => ethermint}/starship/configs/config.workflow.yaml (100%) rename networks/{injective => ethermint}/starship/configs/config.yaml (100%) rename networks/{injective => ethermint}/starship/configs/starship.local.yaml (100%) rename networks/{injective => ethermint}/starship/configs/starship.yaml (100%) rename networks/{injective => ethermint}/starship/src/index.ts (100%) rename networks/{injective => ethermint}/starship/src/utils.ts (94%) rename networks/{injective => ethermint}/test-utils/index.ts (100%) rename networks/{injective => ethermint}/test-utils/utils.ts (80%) create mode 100644 networks/ethermint/tsconfig.esm.json create mode 100644 networks/ethermint/tsconfig.json delete mode 100644 networks/injective/amino.ts delete mode 100644 networks/injective/codegen/injective/types/v1beta1/account.ts delete mode 100644 networks/injective/defaults.ts delete mode 100644 networks/injective/direct.ts delete mode 100644 networks/injective/eip712.ts delete mode 100644 networks/injective/index.ts delete mode 100644 networks/injective/jest.starship.config.js delete mode 100644 networks/injective/jest.testnet.config.js delete mode 100644 networks/injective/starship/__tests__/setup.test.ts delete mode 100644 networks/injective/tsconfig.esm.json delete mode 100644 networks/injective/tsconfig.json delete mode 100644 networks/injective/types.ts delete mode 100644 networks/injective/utils.spec.ts delete mode 100644 packages/auth/defaults.ts delete mode 100644 packages/auth/ed25519.ts delete mode 100644 packages/auth/index.ts delete mode 100644 packages/auth/secp256k1.ts create mode 100644 packages/auth/src/defaults.ts create mode 100644 packages/auth/src/ed25519.ts create mode 100644 packages/auth/src/index.ts create mode 100644 packages/auth/src/secp256k1.ts create mode 100644 packages/auth/src/utils.ts delete mode 100644 packages/auth/utils.ts delete mode 100644 packages/types/index.ts delete mode 100644 packages/types/src/namespaces.ts create mode 100644 packages/types/tsconfig.esm.json delete mode 100644 packages/utils/src/base-signer.ts create mode 100644 protos/cosmos/base/abci/v1beta1/abci.proto create mode 100644 protos/cosmos/crypto/multisig/v1beta1/multisig.proto create mode 100644 protos/cosmos/tx/signing/v1beta1/signing.proto create mode 100644 protos/cosmos/tx/v1beta1/service.proto create mode 100644 protos/cosmos/tx/v1beta1/tx.proto delete mode 100644 protos/cosmwasm/wasm/v1/proposal_legacy.proto create mode 100644 protos/tendermint/types/block.proto create mode 100644 protos/tendermint/types/evidence.proto diff --git a/.eslintrc.json b/.eslintrc.json index ce448ddf..9a3628bf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,7 +28,7 @@ ], "quotes": [ "error", - "double", + "single", { "avoidEscape": true, "allowTemplateLiterals": true diff --git a/.gitignore b/.gitignore index 4538e67b..cb78b839 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,5 @@ **/node_modules/ -test-data.ts -test.ts -test.ts -scripts/test.sh **/.DS_Store **/dist **/yarn-error.log -lerna-debug.log -git-modules/ -**/.env.development -.telescope.json -networks/injective/codegen-injective/ \ No newline at end of file +lerna-debug.log \ No newline at end of file diff --git a/.telescope.json b/.telescope.json new file mode 100644 index 00000000..469446fc --- /dev/null +++ b/.telescope.json @@ -0,0 +1,191 @@ +{ + "protoDirs": [ + "./protos" + ], + "outPath": "./libs/cosmos-types", + "options": { + "classesUseArrowFunctions": true, + "env": "v-next", + "useSDKTypes": false, + "prototypes": { + "enableRegistryLoader": false, + "enableMessageComposer": false, + "enabled": true, + "parser": { + "keepCase": false + }, + "methods": { + "fromJSON": false, + "toJSON": false, + "encode": true, + "decode": true, + "fromPartial": true, + "toAmino": true, + "fromAmino": true, + "fromProto": false, + "toProto": false, + "fromProtoMsg": false, + "toProtoMsg": false, + "toAminoMsg": true, + "fromAminoMsg": true + }, + "addTypeUrlToDecoders": false, + "addTypeUrlToObjects": true, + "addAminoTypeToObjects": true, + "typingsFormat": { + "duration": "duration", + "timestamp": "date", + "useExact": false, + "useDeepPartial": true, + "num64": "bigint", + "customTypes": { + "useCosmosSDKDec": false + }, + "useTelescopeGeneratedType": true + } + }, + "bundle": { + "enabled": false + }, + "stargateClients": { + "enabled": false + }, + "lcdClients": { + "enabled": false + }, + "rpcClients": { + "enabled": true, + "inline": false, + "extensions": false, + "camelCase": true, + "enabledServices": [ + "Query" + ], + "serviceImplement": { + "Msg": { + "type": "Tx" + }, + "Query": { + "type": "Query" + } + }, + "instantOps": [ + { + "className": "QueryImpl", + "include": { + "serviceTypes": [ + "Query" + ], + "patterns": [ + "cosmos.auth.v1beta1.*", + "cosmos.bank.v1beta1.*", + "cosmos.gov.v1beta1.*", + "cosmos.staking.v1beta1.*", + "cosmwasm.wasm.v1.*" + ] + }, + "nameMapping": { + "Msg": { + "updateAuthParams": "cosmos.auth.v1beta1.updateParams", + "updateBankParams": "cosmos.bank.v1beta1.updateParams", + "updateGovParams": "cosmos.gov.v1beta1.updateParams", + "updateStakingParams": "cosmos.staking.v1beta1.updateParams", + "updateWasmParams": "cosmwasm.wasm.v1.updateParams" + }, + "Query": { + "getAuthParams": "cosmos.auth.v1beta1.params", + "getBankParams": "cosmos.bank.v1beta1.params", + "getGovParams": "cosmos.gov.v1beta1.params", + "getStakingParams": "cosmos.staking.v1beta1.params", + "getVote": "cosmos.gov.v1beta1.vote", + "getDeposit": "cosmos.gov.v1beta1.deposit", + "getWasmParams": "cosmwasm.wasm.v1.params" + } + } + }, + { + "className": "StargateImpl", + "include": { + "serviceTypes": [ + "Tx" + ], + "patterns": [ + "cosmos.authz.v1beta1.*", + "cosmos.bank.v1beta1.*", + "cosmos.gov.v1beta1.*", + "cosmos.staking.v1beta1.*", + "cosmos.distribution.v1beta1.*", + "ibc.applications.transfer.v1.*" + ] + }, + "nameMapping": { + "Msg": { + "updateAuthParams": "cosmos.auth.v1beta1.updateParams", + "updateBankParams": "cosmos.bank.v1beta1.updateParams", + "updateGovParams": "cosmos.gov.v1beta1.updateParams", + "updateStakingParams": "cosmos.staking.v1beta1.updateParams", + "updateIBCTransferParams": "ibc.applications.transfer.v1.updateParams", + "updateWasmParams": "cosmwasm.wasm.v1.updateParams" + }, + "Query": { + "getAuthParams": "cosmos.auth.v1beta1.params", + "getBankParams": "cosmos.bank.v1beta1.params", + "getGovParams": "cosmos.gov.v1beta1.params", + "getStakingParams": "cosmos.staking.v1beta1.params", + "getVote": "cosmos.gov.v1beta1.vote", + "getDeposit": "cosmos.gov.v1beta1.deposit", + "getWasmParams": "cosmwasm.wasm.v1.params" + } + } + }, + { + "className": "CosmWasmStargateImpl", + "include": { + "serviceTypes": [ + "Tx" + ], + "patterns": [ + "cosmos.authz.v1beta1.*", + "cosmos.bank.v1beta1.*", + "cosmos.gov.v1beta1.*", + "cosmos.staking.v1beta1.*", + "cosmos.distribution.v1beta1.*", + "ibc.applications.transfer.v1.*", + "cosmwasm.wasm.v1.*" + ] + }, + "nameMapping": { + "Msg": { + "updateAuthParams": "cosmos.auth.v1beta1.updateParams", + "updateBankParams": "cosmos.bank.v1beta1.updateParams", + "updateGovParams": "cosmos.gov.v1beta1.updateParams", + "updateStakingParams": "cosmos.staking.v1beta1.updateParams", + "updateIBCTransferParams": "ibc.applications.transfer.v1.updateParams", + "updateWasmParams": "cosmwasm.wasm.v1.updateParams" + }, + "Query": { + "getAuthParams": "cosmos.auth.v1beta1.params", + "getBankParams": "cosmos.bank.v1beta1.params", + "getGovParams": "cosmos.gov.v1beta1.params", + "getStakingParams": "cosmos.staking.v1beta1.params", + "getVote": "cosmos.gov.v1beta1.vote", + "getDeposit": "cosmos.gov.v1beta1.deposit", + "getWasmParams": "cosmwasm.wasm.v1.params" + } + } + } + ] + }, + "interfaces": { + "enabled": true, + "useGlobalDecoderRegistry": true, + "useUnionTypes": true + }, + "aminoEncoding": { + "enabled": true, + "useLegacyInlineEncoding": false, + "disableMsgTypes": false, + "useProtoOptionality": true + } + } +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 1d343430..f69a3423 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,6 +16,6 @@ "codegen" ], "[typescript]": { - "editor.defaultFormatter": "svipas.prettier-plus" + "editor.defaultFormatter": "esbenp.prettier-vscode" } } diff --git a/git-modules/cometbft/cometbft/main b/git-modules/cometbft/cometbft/main new file mode 160000 index 00000000..43dcd47c --- /dev/null +++ b/git-modules/cometbft/cometbft/main @@ -0,0 +1 @@ +Subproject commit 43dcd47c99cb8014890e8d4264696efe2285d571 diff --git a/git-modules/cosmos/cosmos-proto/main b/git-modules/cosmos/cosmos-proto/main new file mode 160000 index 00000000..6749af0d --- /dev/null +++ b/git-modules/cosmos/cosmos-proto/main @@ -0,0 +1 @@ +Subproject commit 6749af0d5eaee07f371396092a2802b8941ff01f diff --git a/git-modules/cosmos/cosmos-sdk/main b/git-modules/cosmos/cosmos-sdk/main new file mode 160000 index 00000000..05ff7a7c --- /dev/null +++ b/git-modules/cosmos/cosmos-sdk/main @@ -0,0 +1 @@ +Subproject commit 05ff7a7cb72ef8399cb4de76bd1d7aab42debaf3 diff --git a/git-modules/cosmos/cosmos-sdk/release/v0.50.x b/git-modules/cosmos/cosmos-sdk/release/v0.50.x new file mode 160000 index 00000000..aeb1e8f4 --- /dev/null +++ b/git-modules/cosmos/cosmos-sdk/release/v0.50.x @@ -0,0 +1 @@ +Subproject commit aeb1e8f46b8dad727e1935ac7728fb0c0327f280 diff --git a/git-modules/cosmos/gogoproto/main b/git-modules/cosmos/gogoproto/main new file mode 160000 index 00000000..6eec9731 --- /dev/null +++ b/git-modules/cosmos/gogoproto/main @@ -0,0 +1 @@ +Subproject commit 6eec9731781bf8ec4feb0e4098ffb19ee74afb50 diff --git a/git-modules/cosmos/ibc-go/main b/git-modules/cosmos/ibc-go/main new file mode 160000 index 00000000..061a565e --- /dev/null +++ b/git-modules/cosmos/ibc-go/main @@ -0,0 +1 @@ +Subproject commit 061a565ec136288a731baa394b283556bb1cb7bc diff --git a/git-modules/cosmos/ics23/master b/git-modules/cosmos/ics23/master new file mode 160000 index 00000000..69d86966 --- /dev/null +++ b/git-modules/cosmos/ics23/master @@ -0,0 +1 @@ +Subproject commit 69d86966af4cf42f5a81ecddf82d513995272398 diff --git a/git-modules/cosmwasm/wasmd/main b/git-modules/cosmwasm/wasmd/main new file mode 160000 index 00000000..21b048d5 --- /dev/null +++ b/git-modules/cosmwasm/wasmd/main @@ -0,0 +1 @@ +Subproject commit 21b048d54e395ff9168e5c3037356a73797500ba diff --git a/git-modules/gogo/protobuf/master b/git-modules/gogo/protobuf/master new file mode 160000 index 00000000..f67b8970 --- /dev/null +++ b/git-modules/gogo/protobuf/master @@ -0,0 +1 @@ +Subproject commit f67b8970b736e53dbd7d0a27146c8f1ac52f74e5 diff --git a/git-modules/googleapis/googleapis/master b/git-modules/googleapis/googleapis/master new file mode 160000 index 00000000..573205a8 --- /dev/null +++ b/git-modules/googleapis/googleapis/master @@ -0,0 +1 @@ +Subproject commit 573205a81b9b96ea6d4e0365373839b59f4b427e diff --git a/git-modules/injectivelabs/sdk-go/master b/git-modules/injectivelabs/sdk-go/master new file mode 160000 index 00000000..72947502 --- /dev/null +++ b/git-modules/injectivelabs/sdk-go/master @@ -0,0 +1 @@ +Subproject commit 729475023c82723025bea1161754637152ac271a diff --git a/git-modules/protocolbuffers/protobuf/main b/git-modules/protocolbuffers/protobuf/main new file mode 160000 index 00000000..bbf52275 --- /dev/null +++ b/git-modules/protocolbuffers/protobuf/main @@ -0,0 +1 @@ +Subproject commit bbf52275dbad317bad3421f3c69b5f3759eb2b23 diff --git a/git-modules/tendermint/tendermint/main b/git-modules/tendermint/tendermint/main new file mode 160000 index 00000000..35581cf5 --- /dev/null +++ b/git-modules/tendermint/tendermint/main @@ -0,0 +1 @@ +Subproject commit 35581cf54ec436b8c37fabb43fdaa3f48339a170 diff --git a/jest.config.js b/jest.config.js index 6886f8ed..5a239de5 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,16 +1,16 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: "ts-jest", - testEnvironment: "node", + preset: 'ts-jest', + testEnvironment: 'node', transform: { - "^.+\\.tsx?$": [ - "ts-jest", + '^.+\\.tsx?$': [ + 'ts-jest', { babelConfig: false, - tsconfig: "tsconfig.json", + tsconfig: 'tsconfig.json', }, ], }, transformIgnorePatterns: [`/node_modules/*`], - moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], }; diff --git a/libs/cosmos-types/amino/amino.ts b/libs/cosmos-types/amino/amino.ts index 693da49f..8cec2e9c 100644 --- a/libs/cosmos-types/amino/amino.ts +++ b/libs/cosmos-types/amino/amino.ts @@ -1 +1 @@ -export {} \ No newline at end of file +export {}; \ No newline at end of file diff --git a/libs/cosmos-types/binary.ts b/libs/cosmos-types/binary.ts index 7a8fa072..633582bd 100644 --- a/libs/cosmos-types/binary.ts +++ b/libs/cosmos-types/binary.ts @@ -39,23 +39,23 @@ // standalone and requires a support library to be linked with it. This // support library is itself covered by the above license. -import { utf8Length, utf8Read, utf8Write } from "./utf8"; +import { utf8Length, utf8Read, utf8Write } from './utf8'; import { + int64FromString, + int64Length, int64ToString, readInt32, readUInt32, uInt64ToString, varint32read, varint64read, + writeByte, + writeFixed32, writeVarint32, writeVarint64, - int64FromString, - int64Length, - writeFixed32, - writeByte, zzDecode, zzEncode, -} from "./varint"; +} from './varint'; export enum WireType { Varint = 0, @@ -100,7 +100,7 @@ export class BinaryReader implements IBinaryReader { len: number; assertBounds(): void { - if (this.pos > this.len) throw new RangeError("premature EOF"); + if (this.pos > this.len) throw new RangeError('premature EOF'); } constructor(buf?: ArrayLike) { @@ -116,13 +116,13 @@ export class BinaryReader implements IBinaryReader { wireType = tag & 7; if (fieldNo <= 0 || wireType < 0 || wireType > 5) throw new Error( - "illegal tag: field no " + fieldNo + " wire type " + wireType + 'illegal tag: field no ' + fieldNo + ' wire type ' + wireType ); return [fieldNo, wireType, tag]; } skip(length?: number) { - if (typeof length === "number") { + if (typeof length === 'number') { if (this.pos + length > this.len) throw indexOutOfRange(this, length); this.pos += length; } else { @@ -135,27 +135,27 @@ export class BinaryReader implements IBinaryReader { skipType(wireType: number) { switch (wireType) { - case WireType.Varint: - this.skip(); - break; - case WireType.Fixed64: - this.skip(8); - break; - case WireType.Bytes: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType); - } - break; - case WireType.Fixed32: - this.skip(4); - break; + case WireType.Varint: + this.skip(); + break; + case WireType.Fixed64: + this.skip(8); + break; + case WireType.Bytes: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case WireType.Fixed32: + this.skip(4); + break; /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); + default: + throw Error('invalid wire type ' + wireType + ' at offset ' + this.pos); } return this; } @@ -214,11 +214,11 @@ export class BinaryReader implements IBinaryReader { } float(): number { - throw new Error("float not supported"); + throw new Error('float not supported'); } double(): number { - throw new Error("double not supported"); + throw new Error('double not supported'); } bool(): boolean { @@ -334,7 +334,7 @@ export class BinaryWriter implements IBinaryWriter { } static alloc(size: number): Uint8Array | number[] { - if (typeof Uint8Array !== "undefined") { + if (typeof Uint8Array !== 'undefined') { return pool( (size) => new Uint8Array(size), Uint8Array.prototype.subarray @@ -410,12 +410,12 @@ export class BinaryWriter implements IBinaryWriter { (value = value >>> 0) < 128 ? 1 : value < 16384 - ? 2 - : value < 2097152 - ? 3 - : value < 268435456 - ? 4 - : 5, + ? 2 + : value < 2097152 + ? 3 + : value < 268435456 + ? 4 + : 5, value )).len; return this; @@ -466,11 +466,11 @@ export class BinaryWriter implements IBinaryWriter { sfixed32 = BinaryWriter.prototype.fixed32; float(value: number): BinaryWriter { - throw new Error("float not supported" + value); + throw new Error('float not supported' + value); } double(value: number): BinaryWriter { - throw new Error("double not supported" + value); + throw new Error('double not supported' + value); } bytes(value: Uint8Array): BinaryWriter { @@ -492,7 +492,7 @@ function writeBytes( buf: Uint8Array | number[], pos: number ) { - if (typeof Uint8Array !== "undefined") { + if (typeof Uint8Array !== 'undefined') { (buf as Uint8Array).set(val, pos); } else { for (let i = 0; i < val.length; ++i) buf[pos + i] = val[i]; @@ -524,11 +524,11 @@ function pool( function indexOutOfRange(reader: BinaryReader, writeLength?: number) { return RangeError( - "index out of range: " + + 'index out of range: ' + reader.pos + - " + " + + ' + ' + (writeLength || 1) + - " > " + + ' > ' + reader.len ); } diff --git a/libs/cosmos-types/cosmos/auth/v1beta1/auth.ts b/libs/cosmos-types/cosmos/auth/v1beta1/auth.ts index 489beeff..06844e84 100644 --- a/libs/cosmos-types/cosmos/auth/v1beta1/auth.ts +++ b/libs/cosmos-types/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ -import { Any, AnyAmino } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino } from '../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** * BaseAccount defines a base account type. It contains all the necessary fields * for basic account functionality. Any custom account type should extend this @@ -14,7 +14,7 @@ export interface BaseAccount { sequence: bigint; } export interface BaseAccountProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.BaseAccount"; + typeUrl: '/cosmos.auth.v1beta1.BaseAccount'; value: Uint8Array; } /** @@ -29,7 +29,7 @@ export interface BaseAccountAmino { sequence: string; } export interface BaseAccountAminoMsg { - type: "cosmos-sdk/BaseAccount"; + type: 'cosmos-sdk/BaseAccount'; value: BaseAccountAmino; } /** ModuleAccount defines an account for modules that holds coins on a pool. */ @@ -39,7 +39,7 @@ export interface ModuleAccount { permissions: string[]; } export interface ModuleAccountProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.ModuleAccount"; + typeUrl: '/cosmos.auth.v1beta1.ModuleAccount'; value: Uint8Array; } /** ModuleAccount defines an account for modules that holds coins on a pool. */ @@ -49,7 +49,7 @@ export interface ModuleAccountAmino { permissions: string[]; } export interface ModuleAccountAminoMsg { - type: "cosmos-sdk/ModuleAccount"; + type: 'cosmos-sdk/ModuleAccount'; value: ModuleAccountAmino; } /** @@ -67,7 +67,7 @@ export interface ModuleCredential { derivationKeys: Uint8Array[]; } export interface ModuleCredentialProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.ModuleCredential"; + typeUrl: '/cosmos.auth.v1beta1.ModuleCredential'; value: Uint8Array; } /** @@ -85,7 +85,7 @@ export interface ModuleCredentialAmino { derivation_keys: string[]; } export interface ModuleCredentialAminoMsg { - type: "cosmos-sdk/GroupAccountCredential"; + type: 'cosmos-sdk/GroupAccountCredential'; value: ModuleCredentialAmino; } /** Params defines the parameters for the auth module. */ @@ -97,7 +97,7 @@ export interface Params { sigVerifyCostSecp256k1: bigint; } export interface ParamsProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.Params"; + typeUrl: '/cosmos.auth.v1beta1.Params'; value: Uint8Array; } /** Params defines the parameters for the auth module. */ @@ -109,28 +109,28 @@ export interface ParamsAmino { sig_verify_cost_secp256k1: string; } export interface ParamsAminoMsg { - type: "cosmos-sdk/x/auth/Params"; + type: 'cosmos-sdk/x/auth/Params'; value: ParamsAmino; } function createBaseBaseAccount(): BaseAccount { return { - address: "", + address: '', pubKey: undefined, accountNumber: BigInt(0), sequence: BigInt(0) }; } export const BaseAccount = { - typeUrl: "/cosmos.auth.v1beta1.BaseAccount", - aminoType: "cosmos-sdk/BaseAccount", + typeUrl: '/cosmos.auth.v1beta1.BaseAccount', + aminoType: 'cosmos-sdk/BaseAccount', is(o: any): o is BaseAccount { - return o && (o.$typeUrl === BaseAccount.typeUrl || typeof o.address === "string" && typeof o.accountNumber === "bigint" && typeof o.sequence === "bigint"); + return o && (o.$typeUrl === BaseAccount.typeUrl || typeof o.address === 'string' && typeof o.accountNumber === 'bigint' && typeof o.sequence === 'bigint'); }, isAmino(o: any): o is BaseAccountAmino { - return o && (o.$typeUrl === BaseAccount.typeUrl || typeof o.address === "string" && typeof o.account_number === "bigint" && typeof o.sequence === "bigint"); + return o && (o.$typeUrl === BaseAccount.typeUrl || typeof o.address === 'string' && typeof o.account_number === 'bigint' && typeof o.sequence === 'bigint'); }, encode(message: BaseAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.pubKey !== undefined) { @@ -151,28 +151,28 @@ export const BaseAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.accountNumber = reader.uint64(); - break; - case 4: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.pubKey = Any.decode(reader, reader.uint32()); + break; + case 3: + message.accountNumber = reader.uint64(); + break; + case 4: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): BaseAccount { const message = createBaseBaseAccount(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? Any.fromPartial(object.pubKey) : undefined; message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); @@ -196,7 +196,7 @@ export const BaseAccount = { }, toAmino(message: BaseAccount): BaseAccountAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey) : undefined; obj.account_number = message.accountNumber !== BigInt(0) ? message.accountNumber.toString() : undefined; obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; @@ -207,7 +207,7 @@ export const BaseAccount = { }, toAminoMsg(message: BaseAccount): BaseAccountAminoMsg { return { - type: "cosmos-sdk/BaseAccount", + type: 'cosmos-sdk/BaseAccount', value: BaseAccount.toAmino(message) }; }, @@ -219,7 +219,7 @@ export const BaseAccount = { }, toProtoMsg(message: BaseAccount): BaseAccountProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.BaseAccount", + typeUrl: '/cosmos.auth.v1beta1.BaseAccount', value: BaseAccount.encode(message).finish() }; } @@ -229,24 +229,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccou function createBaseModuleAccount(): ModuleAccount { return { baseAccount: undefined, - name: "", + name: '', permissions: [] }; } export const ModuleAccount = { - typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", - aminoType: "cosmos-sdk/ModuleAccount", + typeUrl: '/cosmos.auth.v1beta1.ModuleAccount', + aminoType: 'cosmos-sdk/ModuleAccount', is(o: any): o is ModuleAccount { - return o && (o.$typeUrl === ModuleAccount.typeUrl || typeof o.name === "string" && Array.isArray(o.permissions) && (!o.permissions.length || typeof o.permissions[0] === "string")); + return o && (o.$typeUrl === ModuleAccount.typeUrl || typeof o.name === 'string' && Array.isArray(o.permissions) && (!o.permissions.length || typeof o.permissions[0] === 'string')); }, isAmino(o: any): o is ModuleAccountAmino { - return o && (o.$typeUrl === ModuleAccount.typeUrl || typeof o.name === "string" && Array.isArray(o.permissions) && (!o.permissions.length || typeof o.permissions[0] === "string")); + return o && (o.$typeUrl === ModuleAccount.typeUrl || typeof o.name === 'string' && Array.isArray(o.permissions) && (!o.permissions.length || typeof o.permissions[0] === 'string')); }, encode(message: ModuleAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.baseAccount !== undefined) { BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); } - if (message.name !== "") { + if (message.name !== '') { writer.uint32(18).string(message.name); } for (const v of message.permissions) { @@ -261,18 +261,18 @@ export const ModuleAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.baseAccount = BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.permissions.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -280,7 +280,7 @@ export const ModuleAccount = { fromPartial(object: DeepPartial): ModuleAccount { const message = createBaseModuleAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null ? BaseAccount.fromPartial(object.baseAccount) : undefined; - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.permissions = object.permissions?.map(e => e) || []; return message; }, @@ -298,7 +298,7 @@ export const ModuleAccount = { toAmino(message: ModuleAccount): ModuleAccountAmino { const obj: any = {}; obj.base_account = message.baseAccount ? BaseAccount.toAmino(message.baseAccount) : undefined; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; if (message.permissions) { obj.permissions = message.permissions.map(e => e); } else { @@ -311,7 +311,7 @@ export const ModuleAccount = { }, toAminoMsg(message: ModuleAccount): ModuleAccountAminoMsg { return { - type: "cosmos-sdk/ModuleAccount", + type: 'cosmos-sdk/ModuleAccount', value: ModuleAccount.toAmino(message) }; }, @@ -323,7 +323,7 @@ export const ModuleAccount = { }, toProtoMsg(message: ModuleAccount): ModuleAccountProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", + typeUrl: '/cosmos.auth.v1beta1.ModuleAccount', value: ModuleAccount.encode(message).finish() }; } @@ -332,21 +332,21 @@ GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); function createBaseModuleCredential(): ModuleCredential { return { - moduleName: "", + moduleName: '', derivationKeys: [] }; } export const ModuleCredential = { - typeUrl: "/cosmos.auth.v1beta1.ModuleCredential", - aminoType: "cosmos-sdk/GroupAccountCredential", + typeUrl: '/cosmos.auth.v1beta1.ModuleCredential', + aminoType: 'cosmos-sdk/GroupAccountCredential', is(o: any): o is ModuleCredential { - return o && (o.$typeUrl === ModuleCredential.typeUrl || typeof o.moduleName === "string" && Array.isArray(o.derivationKeys) && (!o.derivationKeys.length || o.derivationKeys[0] instanceof Uint8Array || typeof o.derivationKeys[0] === "string")); + return o && (o.$typeUrl === ModuleCredential.typeUrl || typeof o.moduleName === 'string' && Array.isArray(o.derivationKeys) && (!o.derivationKeys.length || o.derivationKeys[0] instanceof Uint8Array || typeof o.derivationKeys[0] === 'string')); }, isAmino(o: any): o is ModuleCredentialAmino { - return o && (o.$typeUrl === ModuleCredential.typeUrl || typeof o.module_name === "string" && Array.isArray(o.derivation_keys) && (!o.derivation_keys.length || o.derivation_keys[0] instanceof Uint8Array || typeof o.derivation_keys[0] === "string")); + return o && (o.$typeUrl === ModuleCredential.typeUrl || typeof o.module_name === 'string' && Array.isArray(o.derivation_keys) && (!o.derivation_keys.length || o.derivation_keys[0] instanceof Uint8Array || typeof o.derivation_keys[0] === 'string')); }, encode(message: ModuleCredential, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.moduleName !== "") { + if (message.moduleName !== '') { writer.uint32(10).string(message.moduleName); } for (const v of message.derivationKeys) { @@ -361,22 +361,22 @@ export const ModuleCredential = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.moduleName = reader.string(); - break; - case 2: - message.derivationKeys.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.moduleName = reader.string(); + break; + case 2: + message.derivationKeys.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ModuleCredential { const message = createBaseModuleCredential(); - message.moduleName = object.moduleName ?? ""; + message.moduleName = object.moduleName ?? ''; message.derivationKeys = object.derivationKeys?.map(e => e) || []; return message; }, @@ -390,7 +390,7 @@ export const ModuleCredential = { }, toAmino(message: ModuleCredential): ModuleCredentialAmino { const obj: any = {}; - obj.module_name = message.moduleName === "" ? undefined : message.moduleName; + obj.module_name = message.moduleName === '' ? undefined : message.moduleName; if (message.derivationKeys) { obj.derivation_keys = message.derivationKeys.map(e => base64FromBytes(e)); } else { @@ -403,7 +403,7 @@ export const ModuleCredential = { }, toAminoMsg(message: ModuleCredential): ModuleCredentialAminoMsg { return { - type: "cosmos-sdk/GroupAccountCredential", + type: 'cosmos-sdk/GroupAccountCredential', value: ModuleCredential.toAmino(message) }; }, @@ -415,7 +415,7 @@ export const ModuleCredential = { }, toProtoMsg(message: ModuleCredential): ModuleCredentialProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.ModuleCredential", + typeUrl: '/cosmos.auth.v1beta1.ModuleCredential', value: ModuleCredential.encode(message).finish() }; } @@ -432,13 +432,13 @@ function createBaseParams(): Params { }; } export const Params = { - typeUrl: "/cosmos.auth.v1beta1.Params", - aminoType: "cosmos-sdk/x/auth/Params", + typeUrl: '/cosmos.auth.v1beta1.Params', + aminoType: 'cosmos-sdk/x/auth/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || typeof o.maxMemoCharacters === "bigint" && typeof o.txSigLimit === "bigint" && typeof o.txSizeCostPerByte === "bigint" && typeof o.sigVerifyCostEd25519 === "bigint" && typeof o.sigVerifyCostSecp256k1 === "bigint"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.maxMemoCharacters === 'bigint' && typeof o.txSigLimit === 'bigint' && typeof o.txSizeCostPerByte === 'bigint' && typeof o.sigVerifyCostEd25519 === 'bigint' && typeof o.sigVerifyCostSecp256k1 === 'bigint'); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || typeof o.max_memo_characters === "bigint" && typeof o.tx_sig_limit === "bigint" && typeof o.tx_size_cost_per_byte === "bigint" && typeof o.sig_verify_cost_ed25519 === "bigint" && typeof o.sig_verify_cost_secp256k1 === "bigint"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.max_memo_characters === 'bigint' && typeof o.tx_sig_limit === 'bigint' && typeof o.tx_size_cost_per_byte === 'bigint' && typeof o.sig_verify_cost_ed25519 === 'bigint' && typeof o.sig_verify_cost_secp256k1 === 'bigint'); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.maxMemoCharacters !== BigInt(0)) { @@ -465,24 +465,24 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.maxMemoCharacters = reader.uint64(); - break; - case 2: - message.txSigLimit = reader.uint64(); - break; - case 3: - message.txSizeCostPerByte = reader.uint64(); - break; - case 4: - message.sigVerifyCostEd25519 = reader.uint64(); - break; - case 5: - message.sigVerifyCostSecp256k1 = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.maxMemoCharacters = reader.uint64(); + break; + case 2: + message.txSigLimit = reader.uint64(); + break; + case 3: + message.txSizeCostPerByte = reader.uint64(); + break; + case 4: + message.sigVerifyCostEd25519 = reader.uint64(); + break; + case 5: + message.sigVerifyCostSecp256k1 = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -529,7 +529,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/x/auth/Params", + type: 'cosmos-sdk/x/auth/Params', value: Params.toAmino(message) }; }, @@ -541,7 +541,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.Params", + typeUrl: '/cosmos.auth.v1beta1.Params', value: Params.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/auth/v1beta1/query.rpc.Query.ts b/libs/cosmos-types/cosmos/auth/v1beta1/query.rpc.Query.ts index dd9b1bdc..eaa383ec 100644 --- a/libs/cosmos-types/cosmos/auth/v1beta1/query.rpc.Query.ts +++ b/libs/cosmos-types/cosmos/auth/v1beta1/query.rpc.Query.ts @@ -1,6 +1,6 @@ -import { TxRpc } from "../../../types"; -import { BinaryReader } from "../../../binary"; -import { QueryAccountsRequest, QueryAccountsResponse, QueryAccountRequest, QueryAccountResponse, QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse, QueryParamsRequest, QueryParamsResponse, QueryModuleAccountsRequest, QueryModuleAccountsResponse, QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse, Bech32PrefixRequest, Bech32PrefixResponse, AddressBytesToStringRequest, AddressBytesToStringResponse, AddressStringToBytesRequest, AddressStringToBytesResponse, QueryAccountInfoRequest, QueryAccountInfoResponse } from "./query"; +import { BinaryReader } from '../../../binary'; +import { TxRpc } from '../../../types'; +import { AddressBytesToStringRequest, AddressBytesToStringResponse, AddressStringToBytesRequest, AddressStringToBytesResponse, Bech32PrefixRequest, Bech32PrefixResponse, QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse, QueryAccountInfoRequest, QueryAccountInfoResponse,QueryAccountRequest, QueryAccountResponse, QueryAccountsRequest, QueryAccountsResponse, QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse, QueryModuleAccountsRequest, QueryModuleAccountsResponse, QueryParamsRequest, QueryParamsResponse } from './query'; /** Query defines the gRPC querier service. */ export interface Query { /** @@ -124,13 +124,13 @@ export class QueryClientImpl implements Query { pagination: undefined }): Promise => { const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Accounts", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'Accounts', data); return promise.then(data => QueryAccountsResponse.decode(new BinaryReader(data))); }; /* Account returns account details based on address. */ account = async (request: QueryAccountRequest): Promise => { const data = QueryAccountRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Account", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'Account', data); return promise.then(data => QueryAccountResponse.decode(new BinaryReader(data))); }; /* AccountAddressByID returns account address based on account number. @@ -138,13 +138,13 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.46.2 */ accountAddressByID = async (request: QueryAccountAddressByIDRequest): Promise => { const data = QueryAccountAddressByIDRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AccountAddressByID", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'AccountAddressByID', data); return promise.then(data => QueryAccountAddressByIDResponse.decode(new BinaryReader(data))); }; /* Params queries all parameters. */ params = async (request: QueryParamsRequest = {}): Promise => { const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Params", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'Params', data); return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); }; /* ModuleAccounts returns all the existing module accounts. @@ -152,13 +152,13 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.46 */ moduleAccounts = async (request: QueryModuleAccountsRequest = {}): Promise => { const data = QueryModuleAccountsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "ModuleAccounts", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'ModuleAccounts', data); return promise.then(data => QueryModuleAccountsResponse.decode(new BinaryReader(data))); }; /* ModuleAccountByName returns the module account info by module name */ moduleAccountByName = async (request: QueryModuleAccountByNameRequest): Promise => { const data = QueryModuleAccountByNameRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "ModuleAccountByName", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'ModuleAccountByName', data); return promise.then(data => QueryModuleAccountByNameResponse.decode(new BinaryReader(data))); }; /* Bech32Prefix queries bech32Prefix @@ -166,7 +166,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.46 */ bech32Prefix = async (request: Bech32PrefixRequest = {}): Promise => { const data = Bech32PrefixRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Bech32Prefix", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'Bech32Prefix', data); return promise.then(data => Bech32PrefixResponse.decode(new BinaryReader(data))); }; /* AddressBytesToString converts Account Address bytes to string @@ -174,7 +174,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.46 */ addressBytesToString = async (request: AddressBytesToStringRequest): Promise => { const data = AddressBytesToStringRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AddressBytesToString", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'AddressBytesToString', data); return promise.then(data => AddressBytesToStringResponse.decode(new BinaryReader(data))); }; /* AddressStringToBytes converts Address string to bytes @@ -182,7 +182,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.46 */ addressStringToBytes = async (request: AddressStringToBytesRequest): Promise => { const data = AddressStringToBytesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AddressStringToBytes", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'AddressStringToBytes', data); return promise.then(data => AddressStringToBytesResponse.decode(new BinaryReader(data))); }; /* AccountInfo queries account info which is common to all account types. @@ -190,7 +190,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.47 */ accountInfo = async (request: QueryAccountInfoRequest): Promise => { const data = QueryAccountInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AccountInfo", data); + const promise = this.rpc.request('cosmos.auth.v1beta1.Query', 'AccountInfo', data); return promise.then(data => QueryAccountInfoResponse.decode(new BinaryReader(data))); }; } diff --git a/libs/cosmos-types/cosmos/auth/v1beta1/query.ts b/libs/cosmos-types/cosmos/auth/v1beta1/query.ts index eef3abe8..7fa35f04 100644 --- a/libs/cosmos-types/cosmos/auth/v1beta1/query.ts +++ b/libs/cosmos-types/cosmos/auth/v1beta1/query.ts @@ -1,9 +1,9 @@ -import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from '../../base/query/v1beta1/pagination'; +import { BaseAccount, BaseAccountAmino, BaseAccountProtoMsg, ModuleAccount, ModuleAccountProtoMsg,Params, ParamsAmino } from './auth'; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. * @@ -14,7 +14,7 @@ export interface QueryAccountsRequest { pagination?: PageRequest; } export interface QueryAccountsRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountsRequest'; value: Uint8Array; } /** @@ -27,7 +27,7 @@ export interface QueryAccountsRequestAmino { pagination?: PageRequestAmino; } export interface QueryAccountsRequestAminoMsg { - type: "cosmos-sdk/QueryAccountsRequest"; + type: 'cosmos-sdk/QueryAccountsRequest'; value: QueryAccountsRequestAmino; } /** @@ -42,10 +42,10 @@ export interface QueryAccountsResponse { pagination?: PageResponse; } export interface QueryAccountsResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountsResponse'; value: Uint8Array; } -export type QueryAccountsResponseEncoded = Omit & { +export type QueryAccountsResponseEncoded = Omit & { /** accounts are the existing accounts */accounts: (BaseAccountProtoMsg | AnyProtoMsg)[]; }; /** @@ -60,7 +60,7 @@ export interface QueryAccountsResponseAmino { pagination?: PageResponseAmino; } export interface QueryAccountsResponseAminoMsg { - type: "cosmos-sdk/QueryAccountsResponse"; + type: 'cosmos-sdk/QueryAccountsResponse'; value: QueryAccountsResponseAmino; } /** QueryAccountRequest is the request type for the Query/Account RPC method. */ @@ -69,7 +69,7 @@ export interface QueryAccountRequest { address: string; } export interface QueryAccountRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountRequest'; value: Uint8Array; } /** QueryAccountRequest is the request type for the Query/Account RPC method. */ @@ -78,7 +78,7 @@ export interface QueryAccountRequestAmino { address: string; } export interface QueryAccountRequestAminoMsg { - type: "cosmos-sdk/QueryAccountRequest"; + type: 'cosmos-sdk/QueryAccountRequest'; value: QueryAccountRequestAmino; } /** QueryAccountResponse is the response type for the Query/Account RPC method. */ @@ -87,10 +87,10 @@ export interface QueryAccountResponse { account?: BaseAccount | Any | undefined; } export interface QueryAccountResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountResponse'; value: Uint8Array; } -export type QueryAccountResponseEncoded = Omit & { +export type QueryAccountResponseEncoded = Omit & { /** account defines the account of the corresponding address. */account?: BaseAccountProtoMsg | AnyProtoMsg | undefined; }; /** QueryAccountResponse is the response type for the Query/Account RPC method. */ @@ -99,19 +99,19 @@ export interface QueryAccountResponseAmino { account?: AnyAmino; } export interface QueryAccountResponseAminoMsg { - type: "cosmos-sdk/QueryAccountResponse"; + type: 'cosmos-sdk/QueryAccountResponse'; value: QueryAccountResponseAmino; } /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest"; + typeUrl: '/cosmos.auth.v1beta1.QueryParamsRequest'; value: Uint8Array; } /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequestAmino {} export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; + type: 'cosmos-sdk/QueryParamsRequest'; value: QueryParamsRequestAmino; } /** QueryParamsResponse is the response type for the Query/Params RPC method. */ @@ -120,7 +120,7 @@ export interface QueryParamsResponse { params: Params; } export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse"; + typeUrl: '/cosmos.auth.v1beta1.QueryParamsResponse'; value: Uint8Array; } /** QueryParamsResponse is the response type for the Query/Params RPC method. */ @@ -129,7 +129,7 @@ export interface QueryParamsResponseAmino { params: ParamsAmino; } export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; + type: 'cosmos-sdk/QueryParamsResponse'; value: QueryParamsResponseAmino; } /** @@ -139,7 +139,7 @@ export interface QueryParamsResponseAminoMsg { */ export interface QueryModuleAccountsRequest {} export interface QueryModuleAccountsRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest"; + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountsRequest'; value: Uint8Array; } /** @@ -149,7 +149,7 @@ export interface QueryModuleAccountsRequestProtoMsg { */ export interface QueryModuleAccountsRequestAmino {} export interface QueryModuleAccountsRequestAminoMsg { - type: "cosmos-sdk/QueryModuleAccountsRequest"; + type: 'cosmos-sdk/QueryModuleAccountsRequest'; value: QueryModuleAccountsRequestAmino; } /** @@ -161,10 +161,10 @@ export interface QueryModuleAccountsResponse { accounts: (ModuleAccount | Any)[] | Any[]; } export interface QueryModuleAccountsResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse"; + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountsResponse'; value: Uint8Array; } -export type QueryModuleAccountsResponseEncoded = Omit & { +export type QueryModuleAccountsResponseEncoded = Omit & { accounts: (ModuleAccountProtoMsg | AnyProtoMsg)[]; }; /** @@ -176,7 +176,7 @@ export interface QueryModuleAccountsResponseAmino { accounts: AnyAmino[]; } export interface QueryModuleAccountsResponseAminoMsg { - type: "cosmos-sdk/QueryModuleAccountsResponse"; + type: 'cosmos-sdk/QueryModuleAccountsResponse'; value: QueryModuleAccountsResponseAmino; } /** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */ @@ -184,7 +184,7 @@ export interface QueryModuleAccountByNameRequest { name: string; } export interface QueryModuleAccountByNameRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest"; + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest'; value: Uint8Array; } /** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */ @@ -192,7 +192,7 @@ export interface QueryModuleAccountByNameRequestAmino { name: string; } export interface QueryModuleAccountByNameRequestAminoMsg { - type: "cosmos-sdk/QueryModuleAccountByNameRequest"; + type: 'cosmos-sdk/QueryModuleAccountByNameRequest'; value: QueryModuleAccountByNameRequestAmino; } /** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */ @@ -200,10 +200,10 @@ export interface QueryModuleAccountByNameResponse { account?: ModuleAccount | Any | undefined; } export interface QueryModuleAccountByNameResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse"; + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse'; value: Uint8Array; } -export type QueryModuleAccountByNameResponseEncoded = Omit & { +export type QueryModuleAccountByNameResponseEncoded = Omit & { account?: ModuleAccountProtoMsg | AnyProtoMsg | undefined; }; /** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */ @@ -211,7 +211,7 @@ export interface QueryModuleAccountByNameResponseAmino { account?: AnyAmino; } export interface QueryModuleAccountByNameResponseAminoMsg { - type: "cosmos-sdk/QueryModuleAccountByNameResponse"; + type: 'cosmos-sdk/QueryModuleAccountByNameResponse'; value: QueryModuleAccountByNameResponseAmino; } /** @@ -221,7 +221,7 @@ export interface QueryModuleAccountByNameResponseAminoMsg { */ export interface Bech32PrefixRequest {} export interface Bech32PrefixRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest"; + typeUrl: '/cosmos.auth.v1beta1.Bech32PrefixRequest'; value: Uint8Array; } /** @@ -231,7 +231,7 @@ export interface Bech32PrefixRequestProtoMsg { */ export interface Bech32PrefixRequestAmino {} export interface Bech32PrefixRequestAminoMsg { - type: "cosmos-sdk/Bech32PrefixRequest"; + type: 'cosmos-sdk/Bech32PrefixRequest'; value: Bech32PrefixRequestAmino; } /** @@ -243,7 +243,7 @@ export interface Bech32PrefixResponse { bech32Prefix: string; } export interface Bech32PrefixResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse"; + typeUrl: '/cosmos.auth.v1beta1.Bech32PrefixResponse'; value: Uint8Array; } /** @@ -255,7 +255,7 @@ export interface Bech32PrefixResponseAmino { bech32_prefix: string; } export interface Bech32PrefixResponseAminoMsg { - type: "cosmos-sdk/Bech32PrefixResponse"; + type: 'cosmos-sdk/Bech32PrefixResponse'; value: Bech32PrefixResponseAmino; } /** @@ -267,7 +267,7 @@ export interface AddressBytesToStringRequest { addressBytes: Uint8Array; } export interface AddressBytesToStringRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest"; + typeUrl: '/cosmos.auth.v1beta1.AddressBytesToStringRequest'; value: Uint8Array; } /** @@ -279,7 +279,7 @@ export interface AddressBytesToStringRequestAmino { address_bytes: string; } export interface AddressBytesToStringRequestAminoMsg { - type: "cosmos-sdk/AddressBytesToStringRequest"; + type: 'cosmos-sdk/AddressBytesToStringRequest'; value: AddressBytesToStringRequestAmino; } /** @@ -291,7 +291,7 @@ export interface AddressBytesToStringResponse { addressString: string; } export interface AddressBytesToStringResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse"; + typeUrl: '/cosmos.auth.v1beta1.AddressBytesToStringResponse'; value: Uint8Array; } /** @@ -303,7 +303,7 @@ export interface AddressBytesToStringResponseAmino { address_string: string; } export interface AddressBytesToStringResponseAminoMsg { - type: "cosmos-sdk/AddressBytesToStringResponse"; + type: 'cosmos-sdk/AddressBytesToStringResponse'; value: AddressBytesToStringResponseAmino; } /** @@ -315,7 +315,7 @@ export interface AddressStringToBytesRequest { addressString: string; } export interface AddressStringToBytesRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest"; + typeUrl: '/cosmos.auth.v1beta1.AddressStringToBytesRequest'; value: Uint8Array; } /** @@ -327,7 +327,7 @@ export interface AddressStringToBytesRequestAmino { address_string: string; } export interface AddressStringToBytesRequestAminoMsg { - type: "cosmos-sdk/AddressStringToBytesRequest"; + type: 'cosmos-sdk/AddressStringToBytesRequest'; value: AddressStringToBytesRequestAmino; } /** @@ -339,7 +339,7 @@ export interface AddressStringToBytesResponse { addressBytes: Uint8Array; } export interface AddressStringToBytesResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse"; + typeUrl: '/cosmos.auth.v1beta1.AddressStringToBytesResponse'; value: Uint8Array; } /** @@ -351,7 +351,7 @@ export interface AddressStringToBytesResponseAmino { address_bytes: string; } export interface AddressStringToBytesResponseAminoMsg { - type: "cosmos-sdk/AddressStringToBytesResponse"; + type: 'cosmos-sdk/AddressStringToBytesResponse'; value: AddressStringToBytesResponseAmino; } /** @@ -377,7 +377,7 @@ export interface QueryAccountAddressByIDRequest { accountId: bigint; } export interface QueryAccountAddressByIDRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest'; value: Uint8Array; } /** @@ -403,7 +403,7 @@ export interface QueryAccountAddressByIDRequestAmino { account_id: string; } export interface QueryAccountAddressByIDRequestAminoMsg { - type: "cosmos-sdk/QueryAccountAddressByIDRequest"; + type: 'cosmos-sdk/QueryAccountAddressByIDRequest'; value: QueryAccountAddressByIDRequestAmino; } /** @@ -415,7 +415,7 @@ export interface QueryAccountAddressByIDResponse { accountAddress: string; } export interface QueryAccountAddressByIDResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse'; value: Uint8Array; } /** @@ -427,7 +427,7 @@ export interface QueryAccountAddressByIDResponseAmino { account_address: string; } export interface QueryAccountAddressByIDResponseAminoMsg { - type: "cosmos-sdk/QueryAccountAddressByIDResponse"; + type: 'cosmos-sdk/QueryAccountAddressByIDResponse'; value: QueryAccountAddressByIDResponseAmino; } /** @@ -440,7 +440,7 @@ export interface QueryAccountInfoRequest { address: string; } export interface QueryAccountInfoRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountInfoRequest'; value: Uint8Array; } /** @@ -453,7 +453,7 @@ export interface QueryAccountInfoRequestAmino { address: string; } export interface QueryAccountInfoRequestAminoMsg { - type: "cosmos-sdk/QueryAccountInfoRequest"; + type: 'cosmos-sdk/QueryAccountInfoRequest'; value: QueryAccountInfoRequestAmino; } /** @@ -466,7 +466,7 @@ export interface QueryAccountInfoResponse { info?: BaseAccount; } export interface QueryAccountInfoResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse"; + typeUrl: '/cosmos.auth.v1beta1.QueryAccountInfoResponse'; value: Uint8Array; } /** @@ -479,7 +479,7 @@ export interface QueryAccountInfoResponseAmino { info?: BaseAccountAmino; } export interface QueryAccountInfoResponseAminoMsg { - type: "cosmos-sdk/QueryAccountInfoResponse"; + type: 'cosmos-sdk/QueryAccountInfoResponse'; value: QueryAccountInfoResponseAmino; } function createBaseQueryAccountsRequest(): QueryAccountsRequest { @@ -488,8 +488,8 @@ function createBaseQueryAccountsRequest(): QueryAccountsRequest { }; } export const QueryAccountsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", - aminoType: "cosmos-sdk/QueryAccountsRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountsRequest', + aminoType: 'cosmos-sdk/QueryAccountsRequest', is(o: any): o is QueryAccountsRequest { return o && o.$typeUrl === QueryAccountsRequest.typeUrl; }, @@ -509,12 +509,12 @@ export const QueryAccountsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -541,7 +541,7 @@ export const QueryAccountsRequest = { }, toAminoMsg(message: QueryAccountsRequest): QueryAccountsRequestAminoMsg { return { - type: "cosmos-sdk/QueryAccountsRequest", + type: 'cosmos-sdk/QueryAccountsRequest', value: QueryAccountsRequest.toAmino(message) }; }, @@ -553,7 +553,7 @@ export const QueryAccountsRequest = { }, toProtoMsg(message: QueryAccountsRequest): QueryAccountsRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountsRequest', value: QueryAccountsRequest.encode(message).finish() }; } @@ -567,8 +567,8 @@ function createBaseQueryAccountsResponse(): QueryAccountsResponse { }; } export const QueryAccountsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", - aminoType: "cosmos-sdk/QueryAccountsResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountsResponse', + aminoType: 'cosmos-sdk/QueryAccountsResponse', is(o: any): o is QueryAccountsResponse { return o && (o.$typeUrl === QueryAccountsResponse.typeUrl || Array.isArray(o.accounts) && (!o.accounts.length || BaseAccount.is(o.accounts[0]) || Any.is(o.accounts[0]))); }, @@ -591,15 +591,15 @@ export const QueryAccountsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.accounts.push(GlobalDecoderRegistry.unwrapAny(reader)); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.accounts.push(GlobalDecoderRegistry.unwrapAny(reader)); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -633,7 +633,7 @@ export const QueryAccountsResponse = { }, toAminoMsg(message: QueryAccountsResponse): QueryAccountsResponseAminoMsg { return { - type: "cosmos-sdk/QueryAccountsResponse", + type: 'cosmos-sdk/QueryAccountsResponse', value: QueryAccountsResponse.toAmino(message) }; }, @@ -645,7 +645,7 @@ export const QueryAccountsResponse = { }, toProtoMsg(message: QueryAccountsResponse): QueryAccountsResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountsResponse', value: QueryAccountsResponse.encode(message).finish() }; } @@ -654,20 +654,20 @@ GlobalDecoderRegistry.register(QueryAccountsResponse.typeUrl, QueryAccountsRespo GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsResponse.aminoType, QueryAccountsResponse.typeUrl); function createBaseQueryAccountRequest(): QueryAccountRequest { return { - address: "" + address: '' }; } export const QueryAccountRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", - aminoType: "cosmos-sdk/QueryAccountRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountRequest', + aminoType: 'cosmos-sdk/QueryAccountRequest', is(o: any): o is QueryAccountRequest { - return o && (o.$typeUrl === QueryAccountRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryAccountRequest.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is QueryAccountRequestAmino { - return o && (o.$typeUrl === QueryAccountRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryAccountRequest.typeUrl || typeof o.address === 'string'); }, encode(message: QueryAccountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } return writer; @@ -679,19 +679,19 @@ export const QueryAccountRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryAccountRequest { const message = createBaseQueryAccountRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; return message; }, fromAmino(object: QueryAccountRequestAmino): QueryAccountRequest { @@ -703,7 +703,7 @@ export const QueryAccountRequest = { }, toAmino(message: QueryAccountRequest): QueryAccountRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryAccountRequestAminoMsg): QueryAccountRequest { @@ -711,7 +711,7 @@ export const QueryAccountRequest = { }, toAminoMsg(message: QueryAccountRequest): QueryAccountRequestAminoMsg { return { - type: "cosmos-sdk/QueryAccountRequest", + type: 'cosmos-sdk/QueryAccountRequest', value: QueryAccountRequest.toAmino(message) }; }, @@ -723,7 +723,7 @@ export const QueryAccountRequest = { }, toProtoMsg(message: QueryAccountRequest): QueryAccountRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountRequest', value: QueryAccountRequest.encode(message).finish() }; } @@ -736,8 +736,8 @@ function createBaseQueryAccountResponse(): QueryAccountResponse { }; } export const QueryAccountResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", - aminoType: "cosmos-sdk/QueryAccountResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountResponse', + aminoType: 'cosmos-sdk/QueryAccountResponse', is(o: any): o is QueryAccountResponse { return o && o.$typeUrl === QueryAccountResponse.typeUrl; }, @@ -757,12 +757,12 @@ export const QueryAccountResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.account = GlobalDecoderRegistry.unwrapAny(reader); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.account = GlobalDecoderRegistry.unwrapAny(reader); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -789,7 +789,7 @@ export const QueryAccountResponse = { }, toAminoMsg(message: QueryAccountResponse): QueryAccountResponseAminoMsg { return { - type: "cosmos-sdk/QueryAccountResponse", + type: 'cosmos-sdk/QueryAccountResponse', value: QueryAccountResponse.toAmino(message) }; }, @@ -801,7 +801,7 @@ export const QueryAccountResponse = { }, toProtoMsg(message: QueryAccountResponse): QueryAccountResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountResponse', value: QueryAccountResponse.encode(message).finish() }; } @@ -812,8 +812,8 @@ function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } export const QueryParamsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryParamsRequest', + aminoType: 'cosmos-sdk/QueryParamsRequest', is(o: any): o is QueryParamsRequest { return o && o.$typeUrl === QueryParamsRequest.typeUrl; }, @@ -830,9 +830,9 @@ export const QueryParamsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -854,7 +854,7 @@ export const QueryParamsRequest = { }, toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { return { - type: "cosmos-sdk/QueryParamsRequest", + type: 'cosmos-sdk/QueryParamsRequest', value: QueryParamsRequest.toAmino(message) }; }, @@ -866,7 +866,7 @@ export const QueryParamsRequest = { }, toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryParamsRequest', value: QueryParamsRequest.encode(message).finish() }; } @@ -879,8 +879,8 @@ function createBaseQueryParamsResponse(): QueryParamsResponse { }; } export const QueryParamsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryParamsResponse', + aminoType: 'cosmos-sdk/QueryParamsResponse', is(o: any): o is QueryParamsResponse { return o && (o.$typeUrl === QueryParamsResponse.typeUrl || Params.is(o.params)); }, @@ -900,12 +900,12 @@ export const QueryParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -932,7 +932,7 @@ export const QueryParamsResponse = { }, toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { return { - type: "cosmos-sdk/QueryParamsResponse", + type: 'cosmos-sdk/QueryParamsResponse', value: QueryParamsResponse.toAmino(message) }; }, @@ -944,7 +944,7 @@ export const QueryParamsResponse = { }, toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryParamsResponse', value: QueryParamsResponse.encode(message).finish() }; } @@ -955,8 +955,8 @@ function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest { return {}; } export const QueryModuleAccountsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", - aminoType: "cosmos-sdk/QueryModuleAccountsRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountsRequest', + aminoType: 'cosmos-sdk/QueryModuleAccountsRequest', is(o: any): o is QueryModuleAccountsRequest { return o && o.$typeUrl === QueryModuleAccountsRequest.typeUrl; }, @@ -973,9 +973,9 @@ export const QueryModuleAccountsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -997,7 +997,7 @@ export const QueryModuleAccountsRequest = { }, toAminoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestAminoMsg { return { - type: "cosmos-sdk/QueryModuleAccountsRequest", + type: 'cosmos-sdk/QueryModuleAccountsRequest', value: QueryModuleAccountsRequest.toAmino(message) }; }, @@ -1009,7 +1009,7 @@ export const QueryModuleAccountsRequest = { }, toProtoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountsRequest', value: QueryModuleAccountsRequest.encode(message).finish() }; } @@ -1022,8 +1022,8 @@ function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse { }; } export const QueryModuleAccountsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", - aminoType: "cosmos-sdk/QueryModuleAccountsResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountsResponse', + aminoType: 'cosmos-sdk/QueryModuleAccountsResponse', is(o: any): o is QueryModuleAccountsResponse { return o && (o.$typeUrl === QueryModuleAccountsResponse.typeUrl || Array.isArray(o.accounts) && (!o.accounts.length || ModuleAccount.is(o.accounts[0]) || Any.is(o.accounts[0]))); }, @@ -1043,12 +1043,12 @@ export const QueryModuleAccountsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.accounts.push(GlobalDecoderRegistry.unwrapAny(reader)); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.accounts.push(GlobalDecoderRegistry.unwrapAny(reader)); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1077,7 +1077,7 @@ export const QueryModuleAccountsResponse = { }, toAminoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseAminoMsg { return { - type: "cosmos-sdk/QueryModuleAccountsResponse", + type: 'cosmos-sdk/QueryModuleAccountsResponse', value: QueryModuleAccountsResponse.toAmino(message) }; }, @@ -1089,7 +1089,7 @@ export const QueryModuleAccountsResponse = { }, toProtoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountsResponse', value: QueryModuleAccountsResponse.encode(message).finish() }; } @@ -1098,20 +1098,20 @@ GlobalDecoderRegistry.register(QueryModuleAccountsResponse.typeUrl, QueryModuleA GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsResponse.aminoType, QueryModuleAccountsResponse.typeUrl); function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRequest { return { - name: "" + name: '' }; } export const QueryModuleAccountByNameRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", - aminoType: "cosmos-sdk/QueryModuleAccountByNameRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest', + aminoType: 'cosmos-sdk/QueryModuleAccountByNameRequest', is(o: any): o is QueryModuleAccountByNameRequest { - return o && (o.$typeUrl === QueryModuleAccountByNameRequest.typeUrl || typeof o.name === "string"); + return o && (o.$typeUrl === QueryModuleAccountByNameRequest.typeUrl || typeof o.name === 'string'); }, isAmino(o: any): o is QueryModuleAccountByNameRequestAmino { - return o && (o.$typeUrl === QueryModuleAccountByNameRequest.typeUrl || typeof o.name === "string"); + return o && (o.$typeUrl === QueryModuleAccountByNameRequest.typeUrl || typeof o.name === 'string'); }, encode(message: QueryModuleAccountByNameRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } return writer; @@ -1123,19 +1123,19 @@ export const QueryModuleAccountByNameRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryModuleAccountByNameRequest { const message = createBaseQueryModuleAccountByNameRequest(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; return message; }, fromAmino(object: QueryModuleAccountByNameRequestAmino): QueryModuleAccountByNameRequest { @@ -1147,7 +1147,7 @@ export const QueryModuleAccountByNameRequest = { }, toAmino(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; return obj; }, fromAminoMsg(object: QueryModuleAccountByNameRequestAminoMsg): QueryModuleAccountByNameRequest { @@ -1155,7 +1155,7 @@ export const QueryModuleAccountByNameRequest = { }, toAminoMsg(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestAminoMsg { return { - type: "cosmos-sdk/QueryModuleAccountByNameRequest", + type: 'cosmos-sdk/QueryModuleAccountByNameRequest', value: QueryModuleAccountByNameRequest.toAmino(message) }; }, @@ -1167,7 +1167,7 @@ export const QueryModuleAccountByNameRequest = { }, toProtoMsg(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest', value: QueryModuleAccountByNameRequest.encode(message).finish() }; } @@ -1180,8 +1180,8 @@ function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameR }; } export const QueryModuleAccountByNameResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", - aminoType: "cosmos-sdk/QueryModuleAccountByNameResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse', + aminoType: 'cosmos-sdk/QueryModuleAccountByNameResponse', is(o: any): o is QueryModuleAccountByNameResponse { return o && o.$typeUrl === QueryModuleAccountByNameResponse.typeUrl; }, @@ -1201,12 +1201,12 @@ export const QueryModuleAccountByNameResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.account = GlobalDecoderRegistry.unwrapAny(reader); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.account = GlobalDecoderRegistry.unwrapAny(reader); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1233,7 +1233,7 @@ export const QueryModuleAccountByNameResponse = { }, toAminoMsg(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseAminoMsg { return { - type: "cosmos-sdk/QueryModuleAccountByNameResponse", + type: 'cosmos-sdk/QueryModuleAccountByNameResponse', value: QueryModuleAccountByNameResponse.toAmino(message) }; }, @@ -1245,7 +1245,7 @@ export const QueryModuleAccountByNameResponse = { }, toProtoMsg(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse', value: QueryModuleAccountByNameResponse.encode(message).finish() }; } @@ -1256,8 +1256,8 @@ function createBaseBech32PrefixRequest(): Bech32PrefixRequest { return {}; } export const Bech32PrefixRequest = { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", - aminoType: "cosmos-sdk/Bech32PrefixRequest", + typeUrl: '/cosmos.auth.v1beta1.Bech32PrefixRequest', + aminoType: 'cosmos-sdk/Bech32PrefixRequest', is(o: any): o is Bech32PrefixRequest { return o && o.$typeUrl === Bech32PrefixRequest.typeUrl; }, @@ -1274,9 +1274,9 @@ export const Bech32PrefixRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1298,7 +1298,7 @@ export const Bech32PrefixRequest = { }, toAminoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestAminoMsg { return { - type: "cosmos-sdk/Bech32PrefixRequest", + type: 'cosmos-sdk/Bech32PrefixRequest', value: Bech32PrefixRequest.toAmino(message) }; }, @@ -1310,7 +1310,7 @@ export const Bech32PrefixRequest = { }, toProtoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", + typeUrl: '/cosmos.auth.v1beta1.Bech32PrefixRequest', value: Bech32PrefixRequest.encode(message).finish() }; } @@ -1319,20 +1319,20 @@ GlobalDecoderRegistry.register(Bech32PrefixRequest.typeUrl, Bech32PrefixRequest) GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixRequest.aminoType, Bech32PrefixRequest.typeUrl); function createBaseBech32PrefixResponse(): Bech32PrefixResponse { return { - bech32Prefix: "" + bech32Prefix: '' }; } export const Bech32PrefixResponse = { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", - aminoType: "cosmos-sdk/Bech32PrefixResponse", + typeUrl: '/cosmos.auth.v1beta1.Bech32PrefixResponse', + aminoType: 'cosmos-sdk/Bech32PrefixResponse', is(o: any): o is Bech32PrefixResponse { - return o && (o.$typeUrl === Bech32PrefixResponse.typeUrl || typeof o.bech32Prefix === "string"); + return o && (o.$typeUrl === Bech32PrefixResponse.typeUrl || typeof o.bech32Prefix === 'string'); }, isAmino(o: any): o is Bech32PrefixResponseAmino { - return o && (o.$typeUrl === Bech32PrefixResponse.typeUrl || typeof o.bech32_prefix === "string"); + return o && (o.$typeUrl === Bech32PrefixResponse.typeUrl || typeof o.bech32_prefix === 'string'); }, encode(message: Bech32PrefixResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bech32Prefix !== "") { + if (message.bech32Prefix !== '') { writer.uint32(10).string(message.bech32Prefix); } return writer; @@ -1344,19 +1344,19 @@ export const Bech32PrefixResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.bech32Prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.bech32Prefix = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Bech32PrefixResponse { const message = createBaseBech32PrefixResponse(); - message.bech32Prefix = object.bech32Prefix ?? ""; + message.bech32Prefix = object.bech32Prefix ?? ''; return message; }, fromAmino(object: Bech32PrefixResponseAmino): Bech32PrefixResponse { @@ -1368,7 +1368,7 @@ export const Bech32PrefixResponse = { }, toAmino(message: Bech32PrefixResponse): Bech32PrefixResponseAmino { const obj: any = {}; - obj.bech32_prefix = message.bech32Prefix === "" ? undefined : message.bech32Prefix; + obj.bech32_prefix = message.bech32Prefix === '' ? undefined : message.bech32Prefix; return obj; }, fromAminoMsg(object: Bech32PrefixResponseAminoMsg): Bech32PrefixResponse { @@ -1376,7 +1376,7 @@ export const Bech32PrefixResponse = { }, toAminoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseAminoMsg { return { - type: "cosmos-sdk/Bech32PrefixResponse", + type: 'cosmos-sdk/Bech32PrefixResponse', value: Bech32PrefixResponse.toAmino(message) }; }, @@ -1388,7 +1388,7 @@ export const Bech32PrefixResponse = { }, toProtoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", + typeUrl: '/cosmos.auth.v1beta1.Bech32PrefixResponse', value: Bech32PrefixResponse.encode(message).finish() }; } @@ -1401,13 +1401,13 @@ function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest { }; } export const AddressBytesToStringRequest = { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", - aminoType: "cosmos-sdk/AddressBytesToStringRequest", + typeUrl: '/cosmos.auth.v1beta1.AddressBytesToStringRequest', + aminoType: 'cosmos-sdk/AddressBytesToStringRequest', is(o: any): o is AddressBytesToStringRequest { - return o && (o.$typeUrl === AddressBytesToStringRequest.typeUrl || o.addressBytes instanceof Uint8Array || typeof o.addressBytes === "string"); + return o && (o.$typeUrl === AddressBytesToStringRequest.typeUrl || o.addressBytes instanceof Uint8Array || typeof o.addressBytes === 'string'); }, isAmino(o: any): o is AddressBytesToStringRequestAmino { - return o && (o.$typeUrl === AddressBytesToStringRequest.typeUrl || o.address_bytes instanceof Uint8Array || typeof o.address_bytes === "string"); + return o && (o.$typeUrl === AddressBytesToStringRequest.typeUrl || o.address_bytes instanceof Uint8Array || typeof o.address_bytes === 'string'); }, encode(message: AddressBytesToStringRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.addressBytes.length !== 0) { @@ -1422,12 +1422,12 @@ export const AddressBytesToStringRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.addressBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.addressBytes = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1454,7 +1454,7 @@ export const AddressBytesToStringRequest = { }, toAminoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestAminoMsg { return { - type: "cosmos-sdk/AddressBytesToStringRequest", + type: 'cosmos-sdk/AddressBytesToStringRequest', value: AddressBytesToStringRequest.toAmino(message) }; }, @@ -1466,7 +1466,7 @@ export const AddressBytesToStringRequest = { }, toProtoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", + typeUrl: '/cosmos.auth.v1beta1.AddressBytesToStringRequest', value: AddressBytesToStringRequest.encode(message).finish() }; } @@ -1475,20 +1475,20 @@ GlobalDecoderRegistry.register(AddressBytesToStringRequest.typeUrl, AddressBytes GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringRequest.aminoType, AddressBytesToStringRequest.typeUrl); function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse { return { - addressString: "" + addressString: '' }; } export const AddressBytesToStringResponse = { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", - aminoType: "cosmos-sdk/AddressBytesToStringResponse", + typeUrl: '/cosmos.auth.v1beta1.AddressBytesToStringResponse', + aminoType: 'cosmos-sdk/AddressBytesToStringResponse', is(o: any): o is AddressBytesToStringResponse { - return o && (o.$typeUrl === AddressBytesToStringResponse.typeUrl || typeof o.addressString === "string"); + return o && (o.$typeUrl === AddressBytesToStringResponse.typeUrl || typeof o.addressString === 'string'); }, isAmino(o: any): o is AddressBytesToStringResponseAmino { - return o && (o.$typeUrl === AddressBytesToStringResponse.typeUrl || typeof o.address_string === "string"); + return o && (o.$typeUrl === AddressBytesToStringResponse.typeUrl || typeof o.address_string === 'string'); }, encode(message: AddressBytesToStringResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressString !== "") { + if (message.addressString !== '') { writer.uint32(10).string(message.addressString); } return writer; @@ -1500,19 +1500,19 @@ export const AddressBytesToStringResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.addressString = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.addressString = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): AddressBytesToStringResponse { const message = createBaseAddressBytesToStringResponse(); - message.addressString = object.addressString ?? ""; + message.addressString = object.addressString ?? ''; return message; }, fromAmino(object: AddressBytesToStringResponseAmino): AddressBytesToStringResponse { @@ -1524,7 +1524,7 @@ export const AddressBytesToStringResponse = { }, toAmino(message: AddressBytesToStringResponse): AddressBytesToStringResponseAmino { const obj: any = {}; - obj.address_string = message.addressString === "" ? undefined : message.addressString; + obj.address_string = message.addressString === '' ? undefined : message.addressString; return obj; }, fromAminoMsg(object: AddressBytesToStringResponseAminoMsg): AddressBytesToStringResponse { @@ -1532,7 +1532,7 @@ export const AddressBytesToStringResponse = { }, toAminoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseAminoMsg { return { - type: "cosmos-sdk/AddressBytesToStringResponse", + type: 'cosmos-sdk/AddressBytesToStringResponse', value: AddressBytesToStringResponse.toAmino(message) }; }, @@ -1544,7 +1544,7 @@ export const AddressBytesToStringResponse = { }, toProtoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", + typeUrl: '/cosmos.auth.v1beta1.AddressBytesToStringResponse', value: AddressBytesToStringResponse.encode(message).finish() }; } @@ -1553,20 +1553,20 @@ GlobalDecoderRegistry.register(AddressBytesToStringResponse.typeUrl, AddressByte GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringResponse.aminoType, AddressBytesToStringResponse.typeUrl); function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest { return { - addressString: "" + addressString: '' }; } export const AddressStringToBytesRequest = { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", - aminoType: "cosmos-sdk/AddressStringToBytesRequest", + typeUrl: '/cosmos.auth.v1beta1.AddressStringToBytesRequest', + aminoType: 'cosmos-sdk/AddressStringToBytesRequest', is(o: any): o is AddressStringToBytesRequest { - return o && (o.$typeUrl === AddressStringToBytesRequest.typeUrl || typeof o.addressString === "string"); + return o && (o.$typeUrl === AddressStringToBytesRequest.typeUrl || typeof o.addressString === 'string'); }, isAmino(o: any): o is AddressStringToBytesRequestAmino { - return o && (o.$typeUrl === AddressStringToBytesRequest.typeUrl || typeof o.address_string === "string"); + return o && (o.$typeUrl === AddressStringToBytesRequest.typeUrl || typeof o.address_string === 'string'); }, encode(message: AddressStringToBytesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressString !== "") { + if (message.addressString !== '') { writer.uint32(10).string(message.addressString); } return writer; @@ -1578,19 +1578,19 @@ export const AddressStringToBytesRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.addressString = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.addressString = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): AddressStringToBytesRequest { const message = createBaseAddressStringToBytesRequest(); - message.addressString = object.addressString ?? ""; + message.addressString = object.addressString ?? ''; return message; }, fromAmino(object: AddressStringToBytesRequestAmino): AddressStringToBytesRequest { @@ -1602,7 +1602,7 @@ export const AddressStringToBytesRequest = { }, toAmino(message: AddressStringToBytesRequest): AddressStringToBytesRequestAmino { const obj: any = {}; - obj.address_string = message.addressString === "" ? undefined : message.addressString; + obj.address_string = message.addressString === '' ? undefined : message.addressString; return obj; }, fromAminoMsg(object: AddressStringToBytesRequestAminoMsg): AddressStringToBytesRequest { @@ -1610,7 +1610,7 @@ export const AddressStringToBytesRequest = { }, toAminoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestAminoMsg { return { - type: "cosmos-sdk/AddressStringToBytesRequest", + type: 'cosmos-sdk/AddressStringToBytesRequest', value: AddressStringToBytesRequest.toAmino(message) }; }, @@ -1622,7 +1622,7 @@ export const AddressStringToBytesRequest = { }, toProtoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", + typeUrl: '/cosmos.auth.v1beta1.AddressStringToBytesRequest', value: AddressStringToBytesRequest.encode(message).finish() }; } @@ -1635,13 +1635,13 @@ function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse }; } export const AddressStringToBytesResponse = { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", - aminoType: "cosmos-sdk/AddressStringToBytesResponse", + typeUrl: '/cosmos.auth.v1beta1.AddressStringToBytesResponse', + aminoType: 'cosmos-sdk/AddressStringToBytesResponse', is(o: any): o is AddressStringToBytesResponse { - return o && (o.$typeUrl === AddressStringToBytesResponse.typeUrl || o.addressBytes instanceof Uint8Array || typeof o.addressBytes === "string"); + return o && (o.$typeUrl === AddressStringToBytesResponse.typeUrl || o.addressBytes instanceof Uint8Array || typeof o.addressBytes === 'string'); }, isAmino(o: any): o is AddressStringToBytesResponseAmino { - return o && (o.$typeUrl === AddressStringToBytesResponse.typeUrl || o.address_bytes instanceof Uint8Array || typeof o.address_bytes === "string"); + return o && (o.$typeUrl === AddressStringToBytesResponse.typeUrl || o.address_bytes instanceof Uint8Array || typeof o.address_bytes === 'string'); }, encode(message: AddressStringToBytesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.addressBytes.length !== 0) { @@ -1656,12 +1656,12 @@ export const AddressStringToBytesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.addressBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.addressBytes = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1688,7 +1688,7 @@ export const AddressStringToBytesResponse = { }, toAminoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseAminoMsg { return { - type: "cosmos-sdk/AddressStringToBytesResponse", + type: 'cosmos-sdk/AddressStringToBytesResponse', value: AddressStringToBytesResponse.toAmino(message) }; }, @@ -1700,7 +1700,7 @@ export const AddressStringToBytesResponse = { }, toProtoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", + typeUrl: '/cosmos.auth.v1beta1.AddressStringToBytesResponse', value: AddressStringToBytesResponse.encode(message).finish() }; } @@ -1714,13 +1714,13 @@ function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequ }; } export const QueryAccountAddressByIDRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", - aminoType: "cosmos-sdk/QueryAccountAddressByIDRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest', + aminoType: 'cosmos-sdk/QueryAccountAddressByIDRequest', is(o: any): o is QueryAccountAddressByIDRequest { - return o && (o.$typeUrl === QueryAccountAddressByIDRequest.typeUrl || typeof o.id === "bigint" && typeof o.accountId === "bigint"); + return o && (o.$typeUrl === QueryAccountAddressByIDRequest.typeUrl || typeof o.id === 'bigint' && typeof o.accountId === 'bigint'); }, isAmino(o: any): o is QueryAccountAddressByIDRequestAmino { - return o && (o.$typeUrl === QueryAccountAddressByIDRequest.typeUrl || typeof o.id === "bigint" && typeof o.account_id === "bigint"); + return o && (o.$typeUrl === QueryAccountAddressByIDRequest.typeUrl || typeof o.id === 'bigint' && typeof o.account_id === 'bigint'); }, encode(message: QueryAccountAddressByIDRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.id !== BigInt(0)) { @@ -1738,15 +1738,15 @@ export const QueryAccountAddressByIDRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.int64(); - break; - case 2: - message.accountId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.id = reader.int64(); + break; + case 2: + message.accountId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1778,7 +1778,7 @@ export const QueryAccountAddressByIDRequest = { }, toAminoMsg(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestAminoMsg { return { - type: "cosmos-sdk/QueryAccountAddressByIDRequest", + type: 'cosmos-sdk/QueryAccountAddressByIDRequest', value: QueryAccountAddressByIDRequest.toAmino(message) }; }, @@ -1790,7 +1790,7 @@ export const QueryAccountAddressByIDRequest = { }, toProtoMsg(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest', value: QueryAccountAddressByIDRequest.encode(message).finish() }; } @@ -1799,20 +1799,20 @@ GlobalDecoderRegistry.register(QueryAccountAddressByIDRequest.typeUrl, QueryAcco GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDRequest.aminoType, QueryAccountAddressByIDRequest.typeUrl); function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDResponse { return { - accountAddress: "" + accountAddress: '' }; } export const QueryAccountAddressByIDResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", - aminoType: "cosmos-sdk/QueryAccountAddressByIDResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse', + aminoType: 'cosmos-sdk/QueryAccountAddressByIDResponse', is(o: any): o is QueryAccountAddressByIDResponse { - return o && (o.$typeUrl === QueryAccountAddressByIDResponse.typeUrl || typeof o.accountAddress === "string"); + return o && (o.$typeUrl === QueryAccountAddressByIDResponse.typeUrl || typeof o.accountAddress === 'string'); }, isAmino(o: any): o is QueryAccountAddressByIDResponseAmino { - return o && (o.$typeUrl === QueryAccountAddressByIDResponse.typeUrl || typeof o.account_address === "string"); + return o && (o.$typeUrl === QueryAccountAddressByIDResponse.typeUrl || typeof o.account_address === 'string'); }, encode(message: QueryAccountAddressByIDResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.accountAddress !== "") { + if (message.accountAddress !== '') { writer.uint32(10).string(message.accountAddress); } return writer; @@ -1824,19 +1824,19 @@ export const QueryAccountAddressByIDResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.accountAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.accountAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryAccountAddressByIDResponse { const message = createBaseQueryAccountAddressByIDResponse(); - message.accountAddress = object.accountAddress ?? ""; + message.accountAddress = object.accountAddress ?? ''; return message; }, fromAmino(object: QueryAccountAddressByIDResponseAmino): QueryAccountAddressByIDResponse { @@ -1848,7 +1848,7 @@ export const QueryAccountAddressByIDResponse = { }, toAmino(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseAmino { const obj: any = {}; - obj.account_address = message.accountAddress === "" ? undefined : message.accountAddress; + obj.account_address = message.accountAddress === '' ? undefined : message.accountAddress; return obj; }, fromAminoMsg(object: QueryAccountAddressByIDResponseAminoMsg): QueryAccountAddressByIDResponse { @@ -1856,7 +1856,7 @@ export const QueryAccountAddressByIDResponse = { }, toAminoMsg(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseAminoMsg { return { - type: "cosmos-sdk/QueryAccountAddressByIDResponse", + type: 'cosmos-sdk/QueryAccountAddressByIDResponse', value: QueryAccountAddressByIDResponse.toAmino(message) }; }, @@ -1868,7 +1868,7 @@ export const QueryAccountAddressByIDResponse = { }, toProtoMsg(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse', value: QueryAccountAddressByIDResponse.encode(message).finish() }; } @@ -1877,20 +1877,20 @@ GlobalDecoderRegistry.register(QueryAccountAddressByIDResponse.typeUrl, QueryAcc GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDResponse.aminoType, QueryAccountAddressByIDResponse.typeUrl); function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest { return { - address: "" + address: '' }; } export const QueryAccountInfoRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest", - aminoType: "cosmos-sdk/QueryAccountInfoRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountInfoRequest', + aminoType: 'cosmos-sdk/QueryAccountInfoRequest', is(o: any): o is QueryAccountInfoRequest { - return o && (o.$typeUrl === QueryAccountInfoRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryAccountInfoRequest.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is QueryAccountInfoRequestAmino { - return o && (o.$typeUrl === QueryAccountInfoRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryAccountInfoRequest.typeUrl || typeof o.address === 'string'); }, encode(message: QueryAccountInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } return writer; @@ -1902,19 +1902,19 @@ export const QueryAccountInfoRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryAccountInfoRequest { const message = createBaseQueryAccountInfoRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; return message; }, fromAmino(object: QueryAccountInfoRequestAmino): QueryAccountInfoRequest { @@ -1926,7 +1926,7 @@ export const QueryAccountInfoRequest = { }, toAmino(message: QueryAccountInfoRequest): QueryAccountInfoRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryAccountInfoRequestAminoMsg): QueryAccountInfoRequest { @@ -1934,7 +1934,7 @@ export const QueryAccountInfoRequest = { }, toAminoMsg(message: QueryAccountInfoRequest): QueryAccountInfoRequestAminoMsg { return { - type: "cosmos-sdk/QueryAccountInfoRequest", + type: 'cosmos-sdk/QueryAccountInfoRequest', value: QueryAccountInfoRequest.toAmino(message) }; }, @@ -1946,7 +1946,7 @@ export const QueryAccountInfoRequest = { }, toProtoMsg(message: QueryAccountInfoRequest): QueryAccountInfoRequestProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountInfoRequest', value: QueryAccountInfoRequest.encode(message).finish() }; } @@ -1959,8 +1959,8 @@ function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse { }; } export const QueryAccountInfoResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse", - aminoType: "cosmos-sdk/QueryAccountInfoResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountInfoResponse', + aminoType: 'cosmos-sdk/QueryAccountInfoResponse', is(o: any): o is QueryAccountInfoResponse { return o && o.$typeUrl === QueryAccountInfoResponse.typeUrl; }, @@ -1980,12 +1980,12 @@ export const QueryAccountInfoResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.info = BaseAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.info = BaseAccount.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2012,7 +2012,7 @@ export const QueryAccountInfoResponse = { }, toAminoMsg(message: QueryAccountInfoResponse): QueryAccountInfoResponseAminoMsg { return { - type: "cosmos-sdk/QueryAccountInfoResponse", + type: 'cosmos-sdk/QueryAccountInfoResponse', value: QueryAccountInfoResponse.toAmino(message) }; }, @@ -2024,7 +2024,7 @@ export const QueryAccountInfoResponse = { }, toProtoMsg(message: QueryAccountInfoResponse): QueryAccountInfoResponseProtoMsg { return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse", + typeUrl: '/cosmos.auth.v1beta1.QueryAccountInfoResponse', value: QueryAccountInfoResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/authz/v1beta1/authz.ts b/libs/cosmos-types/cosmos/authz/v1beta1/authz.ts index e71c3fee..c846c90c 100644 --- a/libs/cosmos-types/cosmos/authz/v1beta1/authz.ts +++ b/libs/cosmos-types/cosmos/authz/v1beta1/authz.ts @@ -1,8 +1,8 @@ -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { DeepPartial, fromTimestamp,toTimestamp } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** * GenericAuthorization gives the grantee unrestricted permissions to execute * the provided method on behalf of the granter's account. @@ -12,7 +12,7 @@ export interface GenericAuthorization { msg: string; } export interface GenericAuthorizationProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization"; + typeUrl: '/cosmos.authz.v1beta1.GenericAuthorization'; value: Uint8Array; } /** @@ -24,7 +24,7 @@ export interface GenericAuthorizationAmino { msg: string; } export interface GenericAuthorizationAminoMsg { - type: "cosmos-sdk/GenericAuthorization"; + type: 'cosmos-sdk/GenericAuthorization'; value: GenericAuthorizationAmino; } /** @@ -41,10 +41,10 @@ export interface Grant { expiration?: Date; } export interface GrantProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.Grant"; + typeUrl: '/cosmos.authz.v1beta1.Grant'; value: Uint8Array; } -export type GrantEncoded = Omit & { +export type GrantEncoded = Omit & { authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** @@ -61,7 +61,7 @@ export interface GrantAmino { expiration?: string; } export interface GrantAminoMsg { - type: "cosmos-sdk/Grant"; + type: 'cosmos-sdk/Grant'; value: GrantAmino; } /** @@ -75,10 +75,10 @@ export interface GrantAuthorization { expiration?: Date; } export interface GrantAuthorizationProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization"; + typeUrl: '/cosmos.authz.v1beta1.GrantAuthorization'; value: Uint8Array; } -export type GrantAuthorizationEncoded = Omit & { +export type GrantAuthorizationEncoded = Omit & { authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** @@ -92,7 +92,7 @@ export interface GrantAuthorizationAmino { expiration?: string; } export interface GrantAuthorizationAminoMsg { - type: "cosmos-sdk/GrantAuthorization"; + type: 'cosmos-sdk/GrantAuthorization'; value: GrantAuthorizationAmino; } /** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */ @@ -101,7 +101,7 @@ export interface GrantQueueItem { msgTypeUrls: string[]; } export interface GrantQueueItemProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem"; + typeUrl: '/cosmos.authz.v1beta1.GrantQueueItem'; value: Uint8Array; } /** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */ @@ -110,25 +110,25 @@ export interface GrantQueueItemAmino { msg_type_urls: string[]; } export interface GrantQueueItemAminoMsg { - type: "cosmos-sdk/GrantQueueItem"; + type: 'cosmos-sdk/GrantQueueItem'; value: GrantQueueItemAmino; } function createBaseGenericAuthorization(): GenericAuthorization { return { - msg: "" + msg: '' }; } export const GenericAuthorization = { - typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", - aminoType: "cosmos-sdk/GenericAuthorization", + typeUrl: '/cosmos.authz.v1beta1.GenericAuthorization', + aminoType: 'cosmos-sdk/GenericAuthorization', is(o: any): o is GenericAuthorization { - return o && (o.$typeUrl === GenericAuthorization.typeUrl || typeof o.msg === "string"); + return o && (o.$typeUrl === GenericAuthorization.typeUrl || typeof o.msg === 'string'); }, isAmino(o: any): o is GenericAuthorizationAmino { - return o && (o.$typeUrl === GenericAuthorization.typeUrl || typeof o.msg === "string"); + return o && (o.$typeUrl === GenericAuthorization.typeUrl || typeof o.msg === 'string'); }, encode(message: GenericAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msg !== "") { + if (message.msg !== '') { writer.uint32(10).string(message.msg); } return writer; @@ -140,19 +140,19 @@ export const GenericAuthorization = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.msg = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.msg = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): GenericAuthorization { const message = createBaseGenericAuthorization(); - message.msg = object.msg ?? ""; + message.msg = object.msg ?? ''; return message; }, fromAmino(object: GenericAuthorizationAmino): GenericAuthorization { @@ -164,7 +164,7 @@ export const GenericAuthorization = { }, toAmino(message: GenericAuthorization): GenericAuthorizationAmino { const obj: any = {}; - obj.msg = message.msg === "" ? undefined : message.msg; + obj.msg = message.msg === '' ? undefined : message.msg; return obj; }, fromAminoMsg(object: GenericAuthorizationAminoMsg): GenericAuthorization { @@ -172,7 +172,7 @@ export const GenericAuthorization = { }, toAminoMsg(message: GenericAuthorization): GenericAuthorizationAminoMsg { return { - type: "cosmos-sdk/GenericAuthorization", + type: 'cosmos-sdk/GenericAuthorization', value: GenericAuthorization.toAmino(message) }; }, @@ -184,7 +184,7 @@ export const GenericAuthorization = { }, toProtoMsg(message: GenericAuthorization): GenericAuthorizationProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", + typeUrl: '/cosmos.authz.v1beta1.GenericAuthorization', value: GenericAuthorization.encode(message).finish() }; } @@ -198,8 +198,8 @@ function createBaseGrant(): Grant { }; } export const Grant = { - typeUrl: "/cosmos.authz.v1beta1.Grant", - aminoType: "cosmos-sdk/Grant", + typeUrl: '/cosmos.authz.v1beta1.Grant', + aminoType: 'cosmos-sdk/Grant', is(o: any): o is Grant { return o && o.$typeUrl === Grant.typeUrl; }, @@ -222,15 +222,15 @@ export const Grant = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authorization = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 2: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authorization = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 2: + message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -262,7 +262,7 @@ export const Grant = { }, toAminoMsg(message: Grant): GrantAminoMsg { return { - type: "cosmos-sdk/Grant", + type: 'cosmos-sdk/Grant', value: Grant.toAmino(message) }; }, @@ -274,7 +274,7 @@ export const Grant = { }, toProtoMsg(message: Grant): GrantProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.Grant", + typeUrl: '/cosmos.authz.v1beta1.Grant', value: Grant.encode(message).finish() }; } @@ -283,26 +283,26 @@ GlobalDecoderRegistry.register(Grant.typeUrl, Grant); GlobalDecoderRegistry.registerAminoProtoMapping(Grant.aminoType, Grant.typeUrl); function createBaseGrantAuthorization(): GrantAuthorization { return { - granter: "", - grantee: "", + granter: '', + grantee: '', authorization: undefined, expiration: undefined }; } export const GrantAuthorization = { - typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", - aminoType: "cosmos-sdk/GrantAuthorization", + typeUrl: '/cosmos.authz.v1beta1.GrantAuthorization', + aminoType: 'cosmos-sdk/GrantAuthorization', is(o: any): o is GrantAuthorization { - return o && (o.$typeUrl === GrantAuthorization.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string"); + return o && (o.$typeUrl === GrantAuthorization.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string'); }, isAmino(o: any): o is GrantAuthorizationAmino { - return o && (o.$typeUrl === GrantAuthorization.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string"); + return o && (o.$typeUrl === GrantAuthorization.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string'); }, encode(message: GrantAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { + if (message.granter !== '') { writer.uint32(10).string(message.granter); } - if (message.grantee !== "") { + if (message.grantee !== '') { writer.uint32(18).string(message.grantee); } if (message.authorization !== undefined) { @@ -320,29 +320,29 @@ export const GrantAuthorization = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.authorization = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 4: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.granter = reader.string(); + break; + case 2: + message.grantee = reader.string(); + break; + case 3: + message.authorization = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 4: + message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): GrantAuthorization { const message = createBaseGrantAuthorization(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; + message.granter = object.granter ?? ''; + message.grantee = object.grantee ?? ''; message.authorization = object.authorization !== undefined && object.authorization !== null ? GlobalDecoderRegistry.fromPartial(object.authorization) : undefined; message.expiration = object.expiration ?? undefined; return message; @@ -365,8 +365,8 @@ export const GrantAuthorization = { }, toAmino(message: GrantAuthorization): GrantAuthorizationAmino { const obj: any = {}; - obj.granter = message.granter === "" ? undefined : message.granter; - obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.granter = message.granter === '' ? undefined : message.granter; + obj.grantee = message.grantee === '' ? undefined : message.grantee; obj.authorization = message.authorization ? GlobalDecoderRegistry.toAminoMsg(message.authorization) : undefined; obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined; return obj; @@ -376,7 +376,7 @@ export const GrantAuthorization = { }, toAminoMsg(message: GrantAuthorization): GrantAuthorizationAminoMsg { return { - type: "cosmos-sdk/GrantAuthorization", + type: 'cosmos-sdk/GrantAuthorization', value: GrantAuthorization.toAmino(message) }; }, @@ -388,7 +388,7 @@ export const GrantAuthorization = { }, toProtoMsg(message: GrantAuthorization): GrantAuthorizationProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", + typeUrl: '/cosmos.authz.v1beta1.GrantAuthorization', value: GrantAuthorization.encode(message).finish() }; } @@ -401,13 +401,13 @@ function createBaseGrantQueueItem(): GrantQueueItem { }; } export const GrantQueueItem = { - typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", - aminoType: "cosmos-sdk/GrantQueueItem", + typeUrl: '/cosmos.authz.v1beta1.GrantQueueItem', + aminoType: 'cosmos-sdk/GrantQueueItem', is(o: any): o is GrantQueueItem { - return o && (o.$typeUrl === GrantQueueItem.typeUrl || Array.isArray(o.msgTypeUrls) && (!o.msgTypeUrls.length || typeof o.msgTypeUrls[0] === "string")); + return o && (o.$typeUrl === GrantQueueItem.typeUrl || Array.isArray(o.msgTypeUrls) && (!o.msgTypeUrls.length || typeof o.msgTypeUrls[0] === 'string')); }, isAmino(o: any): o is GrantQueueItemAmino { - return o && (o.$typeUrl === GrantQueueItem.typeUrl || Array.isArray(o.msg_type_urls) && (!o.msg_type_urls.length || typeof o.msg_type_urls[0] === "string")); + return o && (o.$typeUrl === GrantQueueItem.typeUrl || Array.isArray(o.msg_type_urls) && (!o.msg_type_urls.length || typeof o.msg_type_urls[0] === 'string')); }, encode(message: GrantQueueItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.msgTypeUrls) { @@ -422,12 +422,12 @@ export const GrantQueueItem = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.msgTypeUrls.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.msgTypeUrls.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -456,7 +456,7 @@ export const GrantQueueItem = { }, toAminoMsg(message: GrantQueueItem): GrantQueueItemAminoMsg { return { - type: "cosmos-sdk/GrantQueueItem", + type: 'cosmos-sdk/GrantQueueItem', value: GrantQueueItem.toAmino(message) }; }, @@ -468,7 +468,7 @@ export const GrantQueueItem = { }, toProtoMsg(message: GrantQueueItem): GrantQueueItemProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", + typeUrl: '/cosmos.authz.v1beta1.GrantQueueItem', value: GrantQueueItem.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/authz/v1beta1/tx.amino.ts b/libs/cosmos-types/cosmos/authz/v1beta1/tx.amino.ts index 6fcf9fd4..4d4ce02a 100644 --- a/libs/cosmos-types/cosmos/authz/v1beta1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/authz/v1beta1/tx.amino.ts @@ -1,17 +1,17 @@ -import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; +import { MsgExec, MsgGrant, MsgRevoke } from './tx'; export const AminoConverter = { - "/cosmos.authz.v1beta1.MsgGrant": { - aminoType: "cosmos-sdk/MsgGrant", + '/cosmos.authz.v1beta1.MsgGrant': { + aminoType: 'cosmos-sdk/MsgGrant', toAmino: MsgGrant.toAmino, fromAmino: MsgGrant.fromAmino }, - "/cosmos.authz.v1beta1.MsgExec": { - aminoType: "cosmos-sdk/MsgExec", + '/cosmos.authz.v1beta1.MsgExec': { + aminoType: 'cosmos-sdk/MsgExec', toAmino: MsgExec.toAmino, fromAmino: MsgExec.fromAmino }, - "/cosmos.authz.v1beta1.MsgRevoke": { - aminoType: "cosmos-sdk/MsgRevoke", + '/cosmos.authz.v1beta1.MsgRevoke': { + aminoType: 'cosmos-sdk/MsgRevoke', toAmino: MsgRevoke.toAmino, fromAmino: MsgRevoke.fromAmino } diff --git a/libs/cosmos-types/cosmos/authz/v1beta1/tx.registry.ts b/libs/cosmos-types/cosmos/authz/v1beta1/tx.registry.ts index 3538d57f..2bcdfefd 100644 --- a/libs/cosmos-types/cosmos/authz/v1beta1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/authz/v1beta1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], ["/cosmos.authz.v1beta1.MsgExec", MsgExec], ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgExec, MsgGrant, MsgRevoke } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.authz.v1beta1.MsgGrant', MsgGrant], ['/cosmos.authz.v1beta1.MsgExec', MsgExec], ['/cosmos.authz.v1beta1.MsgRevoke', MsgRevoke]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/authz/v1beta1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/authz/v1beta1/tx.rpc.msg.ts index 2905ea15..174b53d2 100644 --- a/libs/cosmos-types/cosmos/authz/v1beta1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/authz/v1beta1/tx.rpc.msg.ts @@ -1,5 +1,5 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgExec, MsgGrant, MsgRevoke } from './tx'; /** Msg defines the authz Msg service. */ export interface Msg { /** @@ -8,18 +8,18 @@ export interface Msg { * for the given (granter, grantee, Authorization) triple, then the grant * will be overwritten. */ - grant(signerAddress: string, message: MsgGrant, fee: number | StdFee | "auto", memo?: string): Promise; + grant(signerAddress: string, message: MsgGrant, fee: number | StdFee | 'auto', memo?: string): Promise; /** * 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. */ - exec(signerAddress: string, message: MsgExec, fee: number | StdFee | "auto", memo?: string): Promise; + exec(signerAddress: string, message: MsgExec, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Revoke revokes any authorization corresponding to the provided method name on the * granter's account that has been granted to the grantee. */ - revoke(signerAddress: string, message: MsgRevoke, fee: number | StdFee | "auto", memo?: string): Promise; + revoke(signerAddress: string, message: MsgRevoke, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the authz Msg service. */ export interface StargateImpl { @@ -29,18 +29,18 @@ export interface StargateImpl { * for the given (granter, grantee, Authorization) triple, then the grant * will be overwritten. */ - grant(signerAddress: string, message: MsgGrant, fee: number | StdFee | "auto", memo?: string): Promise; + grant(signerAddress: string, message: MsgGrant, fee: number | StdFee | 'auto', memo?: string): Promise; /** * 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. */ - exec(signerAddress: string, message: MsgExec, fee: number | StdFee | "auto", memo?: string): Promise; + exec(signerAddress: string, message: MsgExec, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Revoke revokes any authorization corresponding to the provided method name on the * granter's account that has been granted to the grantee. */ - revoke(signerAddress: string, message: MsgRevoke, fee: number | StdFee | "auto", memo?: string): Promise; + revoke(signerAddress: string, message: MsgRevoke, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the authz Msg service. */ export interface CosmWasmStargateImpl { @@ -50,18 +50,18 @@ export interface CosmWasmStargateImpl { * for the given (granter, grantee, Authorization) triple, then the grant * will be overwritten. */ - grant(signerAddress: string, message: MsgGrant, fee: number | StdFee | "auto", memo?: string): Promise; + grant(signerAddress: string, message: MsgGrant, fee: number | StdFee | 'auto', memo?: string): Promise; /** * 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. */ - exec(signerAddress: string, message: MsgExec, fee: number | StdFee | "auto", memo?: string): Promise; + exec(signerAddress: string, message: MsgExec, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Revoke revokes any authorization corresponding to the provided method name on the * granter's account that has been granted to the grantee. */ - revoke(signerAddress: string, message: MsgRevoke, fee: number | StdFee | "auto", memo?: string): Promise; + revoke(signerAddress: string, message: MsgRevoke, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -72,7 +72,7 @@ export class MsgClientImpl implements Msg { 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. */ - grant = async (signerAddress: string, message: MsgGrant, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + grant = async (signerAddress: string, message: MsgGrant, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgGrant.typeUrl, value: message @@ -82,7 +82,7 @@ export class MsgClientImpl implements Msg { /* 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. */ - exec = async (signerAddress: string, message: MsgExec, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + exec = async (signerAddress: string, message: MsgExec, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgExec.typeUrl, value: message @@ -91,7 +91,7 @@ export class MsgClientImpl implements Msg { }; /* Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee. */ - revoke = async (signerAddress: string, message: MsgRevoke, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + revoke = async (signerAddress: string, message: MsgRevoke, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgRevoke.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/authz/v1beta1/tx.ts b/libs/cosmos-types/cosmos/authz/v1beta1/tx.ts index 80640ebe..e632748f 100644 --- a/libs/cosmos-types/cosmos/authz/v1beta1/tx.ts +++ b/libs/cosmos-types/cosmos/authz/v1beta1/tx.ts @@ -1,8 +1,8 @@ -import { Grant, GrantAmino } from "./authz"; -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Grant, GrantAmino } from './authz'; /** * MsgGrant is a request type for Grant method. It declares authorization to the grantee * on behalf of the granter with the provided expiration time. @@ -13,7 +13,7 @@ export interface MsgGrant { grant: Grant; } export interface MsgGrantProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant"; + typeUrl: '/cosmos.authz.v1beta1.MsgGrant'; value: Uint8Array; } /** @@ -26,19 +26,19 @@ export interface MsgGrantAmino { grant: GrantAmino; } export interface MsgGrantAminoMsg { - type: "cosmos-sdk/MsgGrant"; + type: 'cosmos-sdk/MsgGrant'; value: MsgGrantAmino; } /** MsgGrantResponse defines the Msg/MsgGrant response type. */ export interface MsgGrantResponse {} export interface MsgGrantResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse"; + typeUrl: '/cosmos.authz.v1beta1.MsgGrantResponse'; value: Uint8Array; } /** MsgGrantResponse defines the Msg/MsgGrant response type. */ export interface MsgGrantResponseAmino {} export interface MsgGrantResponseAminoMsg { - type: "cosmos-sdk/MsgGrantResponse"; + type: 'cosmos-sdk/MsgGrantResponse'; value: MsgGrantResponseAmino; } /** @@ -56,10 +56,10 @@ export interface MsgExec { msgs: (Any)[] | Any[]; } export interface MsgExecProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgExec"; + typeUrl: '/cosmos.authz.v1beta1.MsgExec'; value: Uint8Array; } -export type MsgExecEncoded = Omit & { +export type MsgExecEncoded = Omit & { /** * Execute Msg. * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) @@ -82,7 +82,7 @@ export interface MsgExecAmino { msgs: AnyAmino[]; } export interface MsgExecAminoMsg { - type: "cosmos-sdk/MsgExec"; + type: 'cosmos-sdk/MsgExec'; value: MsgExecAmino; } /** MsgExecResponse defines the Msg/MsgExecResponse response type. */ @@ -90,7 +90,7 @@ export interface MsgExecResponse { results: Uint8Array[]; } export interface MsgExecResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse"; + typeUrl: '/cosmos.authz.v1beta1.MsgExecResponse'; value: Uint8Array; } /** MsgExecResponse defines the Msg/MsgExecResponse response type. */ @@ -98,7 +98,7 @@ export interface MsgExecResponseAmino { results: string[]; } export interface MsgExecResponseAminoMsg { - type: "cosmos-sdk/MsgExecResponse"; + type: 'cosmos-sdk/MsgExecResponse'; value: MsgExecResponseAmino; } /** @@ -111,7 +111,7 @@ export interface MsgRevoke { msgTypeUrl: string; } export interface MsgRevokeProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke"; + typeUrl: '/cosmos.authz.v1beta1.MsgRevoke'; value: Uint8Array; } /** @@ -124,42 +124,42 @@ export interface MsgRevokeAmino { msg_type_url: string; } export interface MsgRevokeAminoMsg { - type: "cosmos-sdk/MsgRevoke"; + type: 'cosmos-sdk/MsgRevoke'; value: MsgRevokeAmino; } /** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ export interface MsgRevokeResponse {} export interface MsgRevokeResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse"; + typeUrl: '/cosmos.authz.v1beta1.MsgRevokeResponse'; value: Uint8Array; } /** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ export interface MsgRevokeResponseAmino {} export interface MsgRevokeResponseAminoMsg { - type: "cosmos-sdk/MsgRevokeResponse"; + type: 'cosmos-sdk/MsgRevokeResponse'; value: MsgRevokeResponseAmino; } function createBaseMsgGrant(): MsgGrant { return { - granter: "", - grantee: "", + granter: '', + grantee: '', grant: Grant.fromPartial({}) }; } export const MsgGrant = { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - aminoType: "cosmos-sdk/MsgGrant", + typeUrl: '/cosmos.authz.v1beta1.MsgGrant', + aminoType: 'cosmos-sdk/MsgGrant', is(o: any): o is MsgGrant { - return o && (o.$typeUrl === MsgGrant.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && Grant.is(o.grant)); + return o && (o.$typeUrl === MsgGrant.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string' && Grant.is(o.grant)); }, isAmino(o: any): o is MsgGrantAmino { - return o && (o.$typeUrl === MsgGrant.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && Grant.isAmino(o.grant)); + return o && (o.$typeUrl === MsgGrant.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string' && Grant.isAmino(o.grant)); }, encode(message: MsgGrant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { + if (message.granter !== '') { writer.uint32(10).string(message.granter); } - if (message.grantee !== "") { + if (message.grantee !== '') { writer.uint32(18).string(message.grantee); } if (message.grant !== undefined) { @@ -174,26 +174,26 @@ export const MsgGrant = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.grant = Grant.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.granter = reader.string(); + break; + case 2: + message.grantee = reader.string(); + break; + case 3: + message.grant = Grant.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgGrant { const message = createBaseMsgGrant(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; + message.granter = object.granter ?? ''; + message.grantee = object.grantee ?? ''; message.grant = object.grant !== undefined && object.grant !== null ? Grant.fromPartial(object.grant) : undefined; return message; }, @@ -212,8 +212,8 @@ export const MsgGrant = { }, toAmino(message: MsgGrant): MsgGrantAmino { const obj: any = {}; - obj.granter = message.granter === "" ? undefined : message.granter; - obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.granter = message.granter === '' ? undefined : message.granter; + obj.grantee = message.grantee === '' ? undefined : message.grantee; obj.grant = message.grant ? Grant.toAmino(message.grant) : Grant.toAmino(Grant.fromPartial({})); return obj; }, @@ -222,7 +222,7 @@ export const MsgGrant = { }, toAminoMsg(message: MsgGrant): MsgGrantAminoMsg { return { - type: "cosmos-sdk/MsgGrant", + type: 'cosmos-sdk/MsgGrant', value: MsgGrant.toAmino(message) }; }, @@ -234,7 +234,7 @@ export const MsgGrant = { }, toProtoMsg(message: MsgGrant): MsgGrantProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", + typeUrl: '/cosmos.authz.v1beta1.MsgGrant', value: MsgGrant.encode(message).finish() }; } @@ -245,8 +245,8 @@ function createBaseMsgGrantResponse(): MsgGrantResponse { return {}; } export const MsgGrantResponse = { - typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", - aminoType: "cosmos-sdk/MsgGrantResponse", + typeUrl: '/cosmos.authz.v1beta1.MsgGrantResponse', + aminoType: 'cosmos-sdk/MsgGrantResponse', is(o: any): o is MsgGrantResponse { return o && o.$typeUrl === MsgGrantResponse.typeUrl; }, @@ -263,9 +263,9 @@ export const MsgGrantResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -287,7 +287,7 @@ export const MsgGrantResponse = { }, toAminoMsg(message: MsgGrantResponse): MsgGrantResponseAminoMsg { return { - type: "cosmos-sdk/MsgGrantResponse", + type: 'cosmos-sdk/MsgGrantResponse', value: MsgGrantResponse.toAmino(message) }; }, @@ -299,7 +299,7 @@ export const MsgGrantResponse = { }, toProtoMsg(message: MsgGrantResponse): MsgGrantResponseProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", + typeUrl: '/cosmos.authz.v1beta1.MsgGrantResponse', value: MsgGrantResponse.encode(message).finish() }; } @@ -308,21 +308,21 @@ GlobalDecoderRegistry.register(MsgGrantResponse.typeUrl, MsgGrantResponse); GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantResponse.aminoType, MsgGrantResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { - grantee: "", + grantee: '', msgs: [] }; } export const MsgExec = { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - aminoType: "cosmos-sdk/MsgExec", + typeUrl: '/cosmos.authz.v1beta1.MsgExec', + aminoType: 'cosmos-sdk/MsgExec', is(o: any): o is MsgExec { - return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.grantee === "string" && Array.isArray(o.msgs) && (!o.msgs.length || Any.is(o.msgs[0]))); + return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.grantee === 'string' && Array.isArray(o.msgs) && (!o.msgs.length || Any.is(o.msgs[0]))); }, isAmino(o: any): o is MsgExecAmino { - return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.grantee === "string" && Array.isArray(o.msgs) && (!o.msgs.length || Any.isAmino(o.msgs[0]))); + return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.grantee === 'string' && Array.isArray(o.msgs) && (!o.msgs.length || Any.isAmino(o.msgs[0]))); }, encode(message: MsgExec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.grantee !== "") { + if (message.grantee !== '') { writer.uint32(10).string(message.grantee); } for (const v of message.msgs) { @@ -337,22 +337,22 @@ export const MsgExec = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.msgs.push(GlobalDecoderRegistry.unwrapAny(reader)); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.grantee = reader.string(); + break; + case 2: + message.msgs.push(GlobalDecoderRegistry.unwrapAny(reader)); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgExec { const message = createBaseMsgExec(); - message.grantee = object.grantee ?? ""; + message.grantee = object.grantee ?? ''; message.msgs = object.msgs?.map(e => (GlobalDecoderRegistry.fromPartial(e) as any)) || []; return message; }, @@ -366,7 +366,7 @@ export const MsgExec = { }, toAmino(message: MsgExec): MsgExecAmino { const obj: any = {}; - obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.grantee = message.grantee === '' ? undefined : message.grantee; if (message.msgs) { obj.msgs = message.msgs.map(e => e ? GlobalDecoderRegistry.toAminoMsg(e) : undefined); } else { @@ -379,7 +379,7 @@ export const MsgExec = { }, toAminoMsg(message: MsgExec): MsgExecAminoMsg { return { - type: "cosmos-sdk/MsgExec", + type: 'cosmos-sdk/MsgExec', value: MsgExec.toAmino(message) }; }, @@ -391,7 +391,7 @@ export const MsgExec = { }, toProtoMsg(message: MsgExec): MsgExecProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", + typeUrl: '/cosmos.authz.v1beta1.MsgExec', value: MsgExec.encode(message).finish() }; } @@ -404,13 +404,13 @@ function createBaseMsgExecResponse(): MsgExecResponse { }; } export const MsgExecResponse = { - typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", - aminoType: "cosmos-sdk/MsgExecResponse", + typeUrl: '/cosmos.authz.v1beta1.MsgExecResponse', + aminoType: 'cosmos-sdk/MsgExecResponse', is(o: any): o is MsgExecResponse { - return o && (o.$typeUrl === MsgExecResponse.typeUrl || Array.isArray(o.results) && (!o.results.length || o.results[0] instanceof Uint8Array || typeof o.results[0] === "string")); + return o && (o.$typeUrl === MsgExecResponse.typeUrl || Array.isArray(o.results) && (!o.results.length || o.results[0] instanceof Uint8Array || typeof o.results[0] === 'string')); }, isAmino(o: any): o is MsgExecResponseAmino { - return o && (o.$typeUrl === MsgExecResponse.typeUrl || Array.isArray(o.results) && (!o.results.length || o.results[0] instanceof Uint8Array || typeof o.results[0] === "string")); + return o && (o.$typeUrl === MsgExecResponse.typeUrl || Array.isArray(o.results) && (!o.results.length || o.results[0] instanceof Uint8Array || typeof o.results[0] === 'string')); }, encode(message: MsgExecResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.results) { @@ -425,12 +425,12 @@ export const MsgExecResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.results.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.results.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -459,7 +459,7 @@ export const MsgExecResponse = { }, toAminoMsg(message: MsgExecResponse): MsgExecResponseAminoMsg { return { - type: "cosmos-sdk/MsgExecResponse", + type: 'cosmos-sdk/MsgExecResponse', value: MsgExecResponse.toAmino(message) }; }, @@ -471,7 +471,7 @@ export const MsgExecResponse = { }, toProtoMsg(message: MsgExecResponse): MsgExecResponseProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", + typeUrl: '/cosmos.authz.v1beta1.MsgExecResponse', value: MsgExecResponse.encode(message).finish() }; } @@ -480,28 +480,28 @@ GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgRevoke(): MsgRevoke { return { - granter: "", - grantee: "", - msgTypeUrl: "" + granter: '', + grantee: '', + msgTypeUrl: '' }; } export const MsgRevoke = { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - aminoType: "cosmos-sdk/MsgRevoke", + typeUrl: '/cosmos.authz.v1beta1.MsgRevoke', + aminoType: 'cosmos-sdk/MsgRevoke', is(o: any): o is MsgRevoke { - return o && (o.$typeUrl === MsgRevoke.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msgTypeUrl === "string"); + return o && (o.$typeUrl === MsgRevoke.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string' && typeof o.msgTypeUrl === 'string'); }, isAmino(o: any): o is MsgRevokeAmino { - return o && (o.$typeUrl === MsgRevoke.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msg_type_url === "string"); + return o && (o.$typeUrl === MsgRevoke.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string' && typeof o.msg_type_url === 'string'); }, encode(message: MsgRevoke, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { + if (message.granter !== '') { writer.uint32(10).string(message.granter); } - if (message.grantee !== "") { + if (message.grantee !== '') { writer.uint32(18).string(message.grantee); } - if (message.msgTypeUrl !== "") { + if (message.msgTypeUrl !== '') { writer.uint32(26).string(message.msgTypeUrl); } return writer; @@ -513,27 +513,27 @@ export const MsgRevoke = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.msgTypeUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.granter = reader.string(); + break; + case 2: + message.grantee = reader.string(); + break; + case 3: + message.msgTypeUrl = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgRevoke { const message = createBaseMsgRevoke(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.msgTypeUrl = object.msgTypeUrl ?? ""; + message.granter = object.granter ?? ''; + message.grantee = object.grantee ?? ''; + message.msgTypeUrl = object.msgTypeUrl ?? ''; return message; }, fromAmino(object: MsgRevokeAmino): MsgRevoke { @@ -551,9 +551,9 @@ export const MsgRevoke = { }, toAmino(message: MsgRevoke): MsgRevokeAmino { const obj: any = {}; - obj.granter = message.granter === "" ? undefined : message.granter; - obj.grantee = message.grantee === "" ? undefined : message.grantee; - obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl; + obj.granter = message.granter === '' ? undefined : message.granter; + obj.grantee = message.grantee === '' ? undefined : message.grantee; + obj.msg_type_url = message.msgTypeUrl === '' ? undefined : message.msgTypeUrl; return obj; }, fromAminoMsg(object: MsgRevokeAminoMsg): MsgRevoke { @@ -561,7 +561,7 @@ export const MsgRevoke = { }, toAminoMsg(message: MsgRevoke): MsgRevokeAminoMsg { return { - type: "cosmos-sdk/MsgRevoke", + type: 'cosmos-sdk/MsgRevoke', value: MsgRevoke.toAmino(message) }; }, @@ -573,7 +573,7 @@ export const MsgRevoke = { }, toProtoMsg(message: MsgRevoke): MsgRevokeProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", + typeUrl: '/cosmos.authz.v1beta1.MsgRevoke', value: MsgRevoke.encode(message).finish() }; } @@ -584,8 +584,8 @@ function createBaseMsgRevokeResponse(): MsgRevokeResponse { return {}; } export const MsgRevokeResponse = { - typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", - aminoType: "cosmos-sdk/MsgRevokeResponse", + typeUrl: '/cosmos.authz.v1beta1.MsgRevokeResponse', + aminoType: 'cosmos-sdk/MsgRevokeResponse', is(o: any): o is MsgRevokeResponse { return o && o.$typeUrl === MsgRevokeResponse.typeUrl; }, @@ -602,9 +602,9 @@ export const MsgRevokeResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -626,7 +626,7 @@ export const MsgRevokeResponse = { }, toAminoMsg(message: MsgRevokeResponse): MsgRevokeResponseAminoMsg { return { - type: "cosmos-sdk/MsgRevokeResponse", + type: 'cosmos-sdk/MsgRevokeResponse', value: MsgRevokeResponse.toAmino(message) }; }, @@ -638,7 +638,7 @@ export const MsgRevokeResponse = { }, toProtoMsg(message: MsgRevokeResponse): MsgRevokeResponseProtoMsg { return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", + typeUrl: '/cosmos.authz.v1beta1.MsgRevokeResponse', value: MsgRevokeResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/bank/v1beta1/bank.ts b/libs/cosmos-types/cosmos/bank/v1beta1/bank.ts index 2c115ba3..1a5d5b90 100644 --- a/libs/cosmos-types/cosmos/bank/v1beta1/bank.ts +++ b/libs/cosmos-types/cosmos/bank/v1beta1/bank.ts @@ -1,7 +1,7 @@ -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; /** Params defines the parameters for the bank module. */ export interface Params { /** @@ -16,7 +16,7 @@ export interface Params { defaultSendEnabled: boolean; } export interface ParamsProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Params"; + typeUrl: '/cosmos.bank.v1beta1.Params'; value: Uint8Array; } /** Params defines the parameters for the bank module. */ @@ -33,7 +33,7 @@ export interface ParamsAmino { default_send_enabled: boolean; } export interface ParamsAminoMsg { - type: "cosmos-sdk/x/bank/Params"; + type: 'cosmos-sdk/x/bank/Params'; value: ParamsAmino; } /** @@ -45,7 +45,7 @@ export interface SendEnabled { enabled: boolean; } export interface SendEnabledProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.SendEnabled"; + typeUrl: '/cosmos.bank.v1beta1.SendEnabled'; value: Uint8Array; } /** @@ -57,7 +57,7 @@ export interface SendEnabledAmino { enabled: boolean; } export interface SendEnabledAminoMsg { - type: "cosmos-sdk/SendEnabled"; + type: 'cosmos-sdk/SendEnabled'; value: SendEnabledAmino; } /** Input models transaction input. */ @@ -66,7 +66,7 @@ export interface Input { coins: Coin[]; } export interface InputProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Input"; + typeUrl: '/cosmos.bank.v1beta1.Input'; value: Uint8Array; } /** Input models transaction input. */ @@ -75,7 +75,7 @@ export interface InputAmino { coins: CoinAmino[]; } export interface InputAminoMsg { - type: "cosmos-sdk/Input"; + type: 'cosmos-sdk/Input'; value: InputAmino; } /** Output models transaction outputs. */ @@ -84,7 +84,7 @@ export interface Output { coins: Coin[]; } export interface OutputProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Output"; + typeUrl: '/cosmos.bank.v1beta1.Output'; value: Uint8Array; } /** Output models transaction outputs. */ @@ -93,7 +93,7 @@ export interface OutputAmino { coins: CoinAmino[]; } export interface OutputAminoMsg { - type: "cosmos-sdk/Output"; + type: 'cosmos-sdk/Output'; value: OutputAmino; } /** @@ -106,7 +106,7 @@ export interface Supply { total: Coin[]; } export interface SupplyProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Supply"; + typeUrl: '/cosmos.bank.v1beta1.Supply'; value: Uint8Array; } /** @@ -119,7 +119,7 @@ export interface SupplyAmino { total: CoinAmino[]; } export interface SupplyAminoMsg { - type: "cosmos-sdk/Supply"; + type: 'cosmos-sdk/Supply'; value: SupplyAmino; } /** @@ -141,7 +141,7 @@ export interface DenomUnit { aliases: string[]; } export interface DenomUnitProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.DenomUnit"; + typeUrl: '/cosmos.bank.v1beta1.DenomUnit'; value: Uint8Array; } /** @@ -163,7 +163,7 @@ export interface DenomUnitAmino { aliases: string[]; } export interface DenomUnitAminoMsg { - type: "cosmos-sdk/DenomUnit"; + type: 'cosmos-sdk/DenomUnit'; value: DenomUnitAmino; } /** @@ -209,7 +209,7 @@ export interface Metadata { uriHash: string; } export interface MetadataProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Metadata"; + typeUrl: '/cosmos.bank.v1beta1.Metadata'; value: Uint8Array; } /** @@ -255,7 +255,7 @@ export interface MetadataAmino { uri_hash: string; } export interface MetadataAminoMsg { - type: "cosmos-sdk/Metadata"; + type: 'cosmos-sdk/Metadata'; value: MetadataAmino; } function createBaseParams(): Params { @@ -265,13 +265,13 @@ function createBaseParams(): Params { }; } export const Params = { - typeUrl: "/cosmos.bank.v1beta1.Params", - aminoType: "cosmos-sdk/x/bank/Params", + typeUrl: '/cosmos.bank.v1beta1.Params', + aminoType: 'cosmos-sdk/x/bank/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.sendEnabled) && (!o.sendEnabled.length || SendEnabled.is(o.sendEnabled[0])) && typeof o.defaultSendEnabled === "boolean"); + return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.sendEnabled) && (!o.sendEnabled.length || SendEnabled.is(o.sendEnabled[0])) && typeof o.defaultSendEnabled === 'boolean'); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.send_enabled) && (!o.send_enabled.length || SendEnabled.isAmino(o.send_enabled[0])) && typeof o.default_send_enabled === "boolean"); + return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.send_enabled) && (!o.send_enabled.length || SendEnabled.isAmino(o.send_enabled[0])) && typeof o.default_send_enabled === 'boolean'); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.sendEnabled) { @@ -289,15 +289,15 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.defaultSendEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); + break; + case 2: + message.defaultSendEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -331,7 +331,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/x/bank/Params", + type: 'cosmos-sdk/x/bank/Params', value: Params.toAmino(message) }; }, @@ -343,7 +343,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.Params", + typeUrl: '/cosmos.bank.v1beta1.Params', value: Params.encode(message).finish() }; } @@ -352,21 +352,21 @@ GlobalDecoderRegistry.register(Params.typeUrl, Params); GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseSendEnabled(): SendEnabled { return { - denom: "", + denom: '', enabled: false }; } export const SendEnabled = { - typeUrl: "/cosmos.bank.v1beta1.SendEnabled", - aminoType: "cosmos-sdk/SendEnabled", + typeUrl: '/cosmos.bank.v1beta1.SendEnabled', + aminoType: 'cosmos-sdk/SendEnabled', is(o: any): o is SendEnabled { - return o && (o.$typeUrl === SendEnabled.typeUrl || typeof o.denom === "string" && typeof o.enabled === "boolean"); + return o && (o.$typeUrl === SendEnabled.typeUrl || typeof o.denom === 'string' && typeof o.enabled === 'boolean'); }, isAmino(o: any): o is SendEnabledAmino { - return o && (o.$typeUrl === SendEnabled.typeUrl || typeof o.denom === "string" && typeof o.enabled === "boolean"); + return o && (o.$typeUrl === SendEnabled.typeUrl || typeof o.denom === 'string' && typeof o.enabled === 'boolean'); }, encode(message: SendEnabled, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } if (message.enabled === true) { @@ -381,22 +381,22 @@ export const SendEnabled = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denom = reader.string(); + break; + case 2: + message.enabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): SendEnabled { const message = createBaseSendEnabled(); - message.denom = object.denom ?? ""; + message.denom = object.denom ?? ''; message.enabled = object.enabled ?? false; return message; }, @@ -412,7 +412,7 @@ export const SendEnabled = { }, toAmino(message: SendEnabled): SendEnabledAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.denom = message.denom === '' ? undefined : message.denom; obj.enabled = message.enabled === false ? undefined : message.enabled; return obj; }, @@ -421,7 +421,7 @@ export const SendEnabled = { }, toAminoMsg(message: SendEnabled): SendEnabledAminoMsg { return { - type: "cosmos-sdk/SendEnabled", + type: 'cosmos-sdk/SendEnabled', value: SendEnabled.toAmino(message) }; }, @@ -433,7 +433,7 @@ export const SendEnabled = { }, toProtoMsg(message: SendEnabled): SendEnabledProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.SendEnabled", + typeUrl: '/cosmos.bank.v1beta1.SendEnabled', value: SendEnabled.encode(message).finish() }; } @@ -442,21 +442,21 @@ GlobalDecoderRegistry.register(SendEnabled.typeUrl, SendEnabled); GlobalDecoderRegistry.registerAminoProtoMapping(SendEnabled.aminoType, SendEnabled.typeUrl); function createBaseInput(): Input { return { - address: "", + address: '', coins: [] }; } export const Input = { - typeUrl: "/cosmos.bank.v1beta1.Input", - aminoType: "cosmos-sdk/Input", + typeUrl: '/cosmos.bank.v1beta1.Input', + aminoType: 'cosmos-sdk/Input', is(o: any): o is Input { - return o && (o.$typeUrl === Input.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.is(o.coins[0]))); + return o && (o.$typeUrl === Input.typeUrl || typeof o.address === 'string' && Array.isArray(o.coins) && (!o.coins.length || Coin.is(o.coins[0]))); }, isAmino(o: any): o is InputAmino { - return o && (o.$typeUrl === Input.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.isAmino(o.coins[0]))); + return o && (o.$typeUrl === Input.typeUrl || typeof o.address === 'string' && Array.isArray(o.coins) && (!o.coins.length || Coin.isAmino(o.coins[0]))); }, encode(message: Input, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } for (const v of message.coins) { @@ -471,22 +471,22 @@ export const Input = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.coins.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Input { const message = createBaseInput(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -500,7 +500,7 @@ export const Input = { }, toAmino(message: Input): InputAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -513,7 +513,7 @@ export const Input = { }, toAminoMsg(message: Input): InputAminoMsg { return { - type: "cosmos-sdk/Input", + type: 'cosmos-sdk/Input', value: Input.toAmino(message) }; }, @@ -525,7 +525,7 @@ export const Input = { }, toProtoMsg(message: Input): InputProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.Input", + typeUrl: '/cosmos.bank.v1beta1.Input', value: Input.encode(message).finish() }; } @@ -534,21 +534,21 @@ GlobalDecoderRegistry.register(Input.typeUrl, Input); GlobalDecoderRegistry.registerAminoProtoMapping(Input.aminoType, Input.typeUrl); function createBaseOutput(): Output { return { - address: "", + address: '', coins: [] }; } export const Output = { - typeUrl: "/cosmos.bank.v1beta1.Output", - aminoType: "cosmos-sdk/Output", + typeUrl: '/cosmos.bank.v1beta1.Output', + aminoType: 'cosmos-sdk/Output', is(o: any): o is Output { - return o && (o.$typeUrl === Output.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.is(o.coins[0]))); + return o && (o.$typeUrl === Output.typeUrl || typeof o.address === 'string' && Array.isArray(o.coins) && (!o.coins.length || Coin.is(o.coins[0]))); }, isAmino(o: any): o is OutputAmino { - return o && (o.$typeUrl === Output.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.isAmino(o.coins[0]))); + return o && (o.$typeUrl === Output.typeUrl || typeof o.address === 'string' && Array.isArray(o.coins) && (!o.coins.length || Coin.isAmino(o.coins[0]))); }, encode(message: Output, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } for (const v of message.coins) { @@ -563,22 +563,22 @@ export const Output = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.coins.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Output { const message = createBaseOutput(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -592,7 +592,7 @@ export const Output = { }, toAmino(message: Output): OutputAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; if (message.coins) { obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -605,7 +605,7 @@ export const Output = { }, toAminoMsg(message: Output): OutputAminoMsg { return { - type: "cosmos-sdk/Output", + type: 'cosmos-sdk/Output', value: Output.toAmino(message) }; }, @@ -617,7 +617,7 @@ export const Output = { }, toProtoMsg(message: Output): OutputProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.Output", + typeUrl: '/cosmos.bank.v1beta1.Output', value: Output.encode(message).finish() }; } @@ -630,8 +630,8 @@ function createBaseSupply(): Supply { }; } export const Supply = { - typeUrl: "/cosmos.bank.v1beta1.Supply", - aminoType: "cosmos-sdk/Supply", + typeUrl: '/cosmos.bank.v1beta1.Supply', + aminoType: 'cosmos-sdk/Supply', is(o: any): o is Supply { return o && (o.$typeUrl === Supply.typeUrl || Array.isArray(o.total) && (!o.total.length || Coin.is(o.total[0]))); }, @@ -651,12 +651,12 @@ export const Supply = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.total.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -685,7 +685,7 @@ export const Supply = { }, toAminoMsg(message: Supply): SupplyAminoMsg { return { - type: "cosmos-sdk/Supply", + type: 'cosmos-sdk/Supply', value: Supply.toAmino(message) }; }, @@ -697,7 +697,7 @@ export const Supply = { }, toProtoMsg(message: Supply): SupplyProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.Supply", + typeUrl: '/cosmos.bank.v1beta1.Supply', value: Supply.encode(message).finish() }; } @@ -706,22 +706,22 @@ GlobalDecoderRegistry.register(Supply.typeUrl, Supply); GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); function createBaseDenomUnit(): DenomUnit { return { - denom: "", + denom: '', exponent: 0, aliases: [] }; } export const DenomUnit = { - typeUrl: "/cosmos.bank.v1beta1.DenomUnit", - aminoType: "cosmos-sdk/DenomUnit", + typeUrl: '/cosmos.bank.v1beta1.DenomUnit', + aminoType: 'cosmos-sdk/DenomUnit', is(o: any): o is DenomUnit { - return o && (o.$typeUrl === DenomUnit.typeUrl || typeof o.denom === "string" && typeof o.exponent === "number" && Array.isArray(o.aliases) && (!o.aliases.length || typeof o.aliases[0] === "string")); + return o && (o.$typeUrl === DenomUnit.typeUrl || typeof o.denom === 'string' && typeof o.exponent === 'number' && Array.isArray(o.aliases) && (!o.aliases.length || typeof o.aliases[0] === 'string')); }, isAmino(o: any): o is DenomUnitAmino { - return o && (o.$typeUrl === DenomUnit.typeUrl || typeof o.denom === "string" && typeof o.exponent === "number" && Array.isArray(o.aliases) && (!o.aliases.length || typeof o.aliases[0] === "string")); + return o && (o.$typeUrl === DenomUnit.typeUrl || typeof o.denom === 'string' && typeof o.exponent === 'number' && Array.isArray(o.aliases) && (!o.aliases.length || typeof o.aliases[0] === 'string')); }, encode(message: DenomUnit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } if (message.exponent !== 0) { @@ -739,25 +739,25 @@ export const DenomUnit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denom = reader.string(); + break; + case 2: + message.exponent = reader.uint32(); + break; + case 3: + message.aliases.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DenomUnit { const message = createBaseDenomUnit(); - message.denom = object.denom ?? ""; + message.denom = object.denom ?? ''; message.exponent = object.exponent ?? 0; message.aliases = object.aliases?.map(e => e) || []; return message; @@ -775,7 +775,7 @@ export const DenomUnit = { }, toAmino(message: DenomUnit): DenomUnitAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.denom = message.denom === '' ? undefined : message.denom; obj.exponent = message.exponent === 0 ? undefined : message.exponent; if (message.aliases) { obj.aliases = message.aliases.map(e => e); @@ -789,7 +789,7 @@ export const DenomUnit = { }, toAminoMsg(message: DenomUnit): DenomUnitAminoMsg { return { - type: "cosmos-sdk/DenomUnit", + type: 'cosmos-sdk/DenomUnit', value: DenomUnit.toAmino(message) }; }, @@ -801,7 +801,7 @@ export const DenomUnit = { }, toProtoMsg(message: DenomUnit): DenomUnitProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.DenomUnit", + typeUrl: '/cosmos.bank.v1beta1.DenomUnit', value: DenomUnit.encode(message).finish() }; } @@ -810,48 +810,48 @@ GlobalDecoderRegistry.register(DenomUnit.typeUrl, DenomUnit); GlobalDecoderRegistry.registerAminoProtoMapping(DenomUnit.aminoType, DenomUnit.typeUrl); function createBaseMetadata(): Metadata { return { - description: "", + description: '', denomUnits: [], - base: "", - display: "", - name: "", - symbol: "", - uri: "", - uriHash: "" + base: '', + display: '', + name: '', + symbol: '', + uri: '', + uriHash: '' }; } export const Metadata = { - typeUrl: "/cosmos.bank.v1beta1.Metadata", - aminoType: "cosmos-sdk/Metadata", + typeUrl: '/cosmos.bank.v1beta1.Metadata', + aminoType: 'cosmos-sdk/Metadata', is(o: any): o is Metadata { - return o && (o.$typeUrl === Metadata.typeUrl || typeof o.description === "string" && Array.isArray(o.denomUnits) && (!o.denomUnits.length || DenomUnit.is(o.denomUnits[0])) && typeof o.base === "string" && typeof o.display === "string" && typeof o.name === "string" && typeof o.symbol === "string" && typeof o.uri === "string" && typeof o.uriHash === "string"); + return o && (o.$typeUrl === Metadata.typeUrl || typeof o.description === 'string' && Array.isArray(o.denomUnits) && (!o.denomUnits.length || DenomUnit.is(o.denomUnits[0])) && typeof o.base === 'string' && typeof o.display === 'string' && typeof o.name === 'string' && typeof o.symbol === 'string' && typeof o.uri === 'string' && typeof o.uriHash === 'string'); }, isAmino(o: any): o is MetadataAmino { - return o && (o.$typeUrl === Metadata.typeUrl || typeof o.description === "string" && Array.isArray(o.denom_units) && (!o.denom_units.length || DenomUnit.isAmino(o.denom_units[0])) && typeof o.base === "string" && typeof o.display === "string" && typeof o.name === "string" && typeof o.symbol === "string" && typeof o.uri === "string" && typeof o.uri_hash === "string"); + return o && (o.$typeUrl === Metadata.typeUrl || typeof o.description === 'string' && Array.isArray(o.denom_units) && (!o.denom_units.length || DenomUnit.isAmino(o.denom_units[0])) && typeof o.base === 'string' && typeof o.display === 'string' && typeof o.name === 'string' && typeof o.symbol === 'string' && typeof o.uri === 'string' && typeof o.uri_hash === 'string'); }, encode(message: Metadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.description !== "") { + if (message.description !== '') { writer.uint32(10).string(message.description); } for (const v of message.denomUnits) { DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.base !== "") { + if (message.base !== '') { writer.uint32(26).string(message.base); } - if (message.display !== "") { + if (message.display !== '') { writer.uint32(34).string(message.display); } - if (message.name !== "") { + if (message.name !== '') { writer.uint32(42).string(message.name); } - if (message.symbol !== "") { + if (message.symbol !== '') { writer.uint32(50).string(message.symbol); } - if (message.uri !== "") { + if (message.uri !== '') { writer.uint32(58).string(message.uri); } - if (message.uriHash !== "") { + if (message.uriHash !== '') { writer.uint32(66).string(message.uriHash); } return writer; @@ -863,47 +863,47 @@ export const Metadata = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denomUnits.push(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; - case 7: - message.uri = reader.string(); - break; - case 8: - message.uriHash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.description = reader.string(); + break; + case 2: + message.denomUnits.push(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; + case 7: + message.uri = reader.string(); + break; + case 8: + message.uriHash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Metadata { const message = createBaseMetadata(); - message.description = object.description ?? ""; + message.description = object.description ?? ''; message.denomUnits = object.denomUnits?.map(e => DenomUnit.fromPartial(e)) || []; - message.base = object.base ?? ""; - message.display = object.display ?? ""; - message.name = object.name ?? ""; - message.symbol = object.symbol ?? ""; - message.uri = object.uri ?? ""; - message.uriHash = object.uriHash ?? ""; + message.base = object.base ?? ''; + message.display = object.display ?? ''; + message.name = object.name ?? ''; + message.symbol = object.symbol ?? ''; + message.uri = object.uri ?? ''; + message.uriHash = object.uriHash ?? ''; return message; }, fromAmino(object: MetadataAmino): Metadata { @@ -934,18 +934,18 @@ export const Metadata = { }, toAmino(message: Metadata): MetadataAmino { const obj: any = {}; - obj.description = message.description === "" ? undefined : message.description; + obj.description = message.description === '' ? undefined : message.description; if (message.denomUnits) { obj.denom_units = message.denomUnits.map(e => e ? DenomUnit.toAmino(e) : undefined); } else { obj.denom_units = message.denomUnits; } - obj.base = message.base === "" ? undefined : message.base; - obj.display = message.display === "" ? undefined : message.display; - obj.name = message.name === "" ? undefined : message.name; - obj.symbol = message.symbol === "" ? undefined : message.symbol; - obj.uri = message.uri === "" ? undefined : message.uri; - obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash; + obj.base = message.base === '' ? undefined : message.base; + obj.display = message.display === '' ? undefined : message.display; + obj.name = message.name === '' ? undefined : message.name; + obj.symbol = message.symbol === '' ? undefined : message.symbol; + obj.uri = message.uri === '' ? undefined : message.uri; + obj.uri_hash = message.uriHash === '' ? undefined : message.uriHash; return obj; }, fromAminoMsg(object: MetadataAminoMsg): Metadata { @@ -953,7 +953,7 @@ export const Metadata = { }, toAminoMsg(message: Metadata): MetadataAminoMsg { return { - type: "cosmos-sdk/Metadata", + type: 'cosmos-sdk/Metadata', value: Metadata.toAmino(message) }; }, @@ -965,7 +965,7 @@ export const Metadata = { }, toProtoMsg(message: Metadata): MetadataProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.Metadata", + typeUrl: '/cosmos.bank.v1beta1.Metadata', value: Metadata.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/bank/v1beta1/query.rpc.Query.ts b/libs/cosmos-types/cosmos/bank/v1beta1/query.rpc.Query.ts index 23759bf1..7b5fa0a2 100644 --- a/libs/cosmos-types/cosmos/bank/v1beta1/query.rpc.Query.ts +++ b/libs/cosmos-types/cosmos/bank/v1beta1/query.rpc.Query.ts @@ -1,6 +1,6 @@ -import { TxRpc } from "../../../types"; -import { BinaryReader } from "../../../binary"; -import { QueryBalanceRequest, QueryBalanceResponse, QueryAllBalancesRequest, QueryAllBalancesResponse, QuerySpendableBalancesRequest, QuerySpendableBalancesResponse, QuerySpendableBalanceByDenomRequest, QuerySpendableBalanceByDenomResponse, QueryTotalSupplyRequest, QueryTotalSupplyResponse, QuerySupplyOfRequest, QuerySupplyOfResponse, QueryParamsRequest, QueryParamsResponse, QueryDenomMetadataRequest, QueryDenomMetadataResponse, QueryDenomMetadataByQueryStringRequest, QueryDenomMetadataByQueryStringResponse, QueryDenomsMetadataRequest, QueryDenomsMetadataResponse, QueryDenomOwnersRequest, QueryDenomOwnersResponse, QueryDenomOwnersByQueryRequest, QueryDenomOwnersByQueryResponse, QuerySendEnabledRequest, QuerySendEnabledResponse } from "./query"; +import { BinaryReader } from '../../../binary'; +import { TxRpc } from '../../../types'; +import { QueryAllBalancesRequest, QueryAllBalancesResponse, QueryBalanceRequest, QueryBalanceResponse, QueryDenomMetadataByQueryStringRequest, QueryDenomMetadataByQueryStringResponse, QueryDenomMetadataRequest, QueryDenomMetadataResponse, QueryDenomOwnersByQueryRequest, QueryDenomOwnersByQueryResponse, QueryDenomOwnersRequest, QueryDenomOwnersResponse, QueryDenomsMetadataRequest, QueryDenomsMetadataResponse, QueryParamsRequest, QueryParamsResponse, QuerySendEnabledRequest, QuerySendEnabledResponse,QuerySpendableBalanceByDenomRequest, QuerySpendableBalanceByDenomResponse, QuerySpendableBalancesRequest, QuerySpendableBalancesResponse, QuerySupplyOfRequest, QuerySupplyOfResponse, QueryTotalSupplyRequest, QueryTotalSupplyResponse } from './query'; /** Query defines the gRPC querier service. */ export interface Query { /** Balance queries the balance of a single coin for a single account. */ @@ -177,7 +177,7 @@ export class QueryClientImpl implements Query { /* Balance queries the balance of a single coin for a single account. */ balance = async (request: QueryBalanceRequest): Promise => { const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Balance", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'Balance', data); return promise.then(data => QueryBalanceResponse.decode(new BinaryReader(data))); }; /* AllBalances queries the balance of all coins for a single account. @@ -186,7 +186,7 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ allBalances = async (request: QueryAllBalancesRequest): Promise => { const data = QueryAllBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "AllBalances", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'AllBalances', data); return promise.then(data => QueryAllBalancesResponse.decode(new BinaryReader(data))); }; /* SpendableBalances queries the spendable balance of all coins for a single @@ -198,7 +198,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.46 */ spendableBalances = async (request: QuerySpendableBalancesRequest): Promise => { const data = QuerySpendableBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SpendableBalances", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'SpendableBalances', data); return promise.then(data => QuerySpendableBalancesResponse.decode(new BinaryReader(data))); }; /* SpendableBalanceByDenom queries the spendable balance of a single denom for @@ -210,7 +210,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.47 */ spendableBalanceByDenom = async (request: QuerySpendableBalanceByDenomRequest): Promise => { const data = QuerySpendableBalanceByDenomRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SpendableBalanceByDenom", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'SpendableBalanceByDenom', data); return promise.then(data => QuerySpendableBalanceByDenomResponse.decode(new BinaryReader(data))); }; /* TotalSupply queries the total supply of all coins. @@ -221,7 +221,7 @@ export class QueryClientImpl implements Query { pagination: undefined }): Promise => { const data = QueryTotalSupplyRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "TotalSupply", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'TotalSupply', data); return promise.then(data => QueryTotalSupplyResponse.decode(new BinaryReader(data))); }; /* SupplyOf queries the supply of a single coin. @@ -230,25 +230,25 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ supplyOf = async (request: QuerySupplyOfRequest): Promise => { const data = QuerySupplyOfRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SupplyOf", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'SupplyOf', data); return promise.then(data => QuerySupplyOfResponse.decode(new BinaryReader(data))); }; /* Params queries the parameters of x/bank module. */ params = async (request: QueryParamsRequest = {}): Promise => { const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Params", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'Params', data); return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); }; /* DenomMetadata queries the client metadata of a given coin denomination. */ denomMetadata = async (request: QueryDenomMetadataRequest): Promise => { const data = QueryDenomMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomMetadata", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'DenomMetadata', data); return promise.then(data => QueryDenomMetadataResponse.decode(new BinaryReader(data))); }; /* DenomMetadataByQueryString queries the client metadata of a given coin denomination. */ denomMetadataByQueryString = async (request: QueryDenomMetadataByQueryStringRequest): Promise => { const data = QueryDenomMetadataByQueryStringRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomMetadataByQueryString", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'DenomMetadataByQueryString', data); return promise.then(data => QueryDenomMetadataByQueryStringResponse.decode(new BinaryReader(data))); }; /* DenomsMetadata queries the client metadata for all registered coin @@ -257,7 +257,7 @@ export class QueryClientImpl implements Query { pagination: undefined }): Promise => { const data = QueryDenomsMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomsMetadata", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'DenomsMetadata', data); return promise.then(data => QueryDenomsMetadataResponse.decode(new BinaryReader(data))); }; /* DenomOwners queries for all account addresses that own a particular token @@ -269,7 +269,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.46 */ denomOwners = async (request: QueryDenomOwnersRequest): Promise => { const data = QueryDenomOwnersRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomOwners", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'DenomOwners', data); return promise.then(data => QueryDenomOwnersResponse.decode(new BinaryReader(data))); }; /* DenomOwnersByQuery queries for all account addresses that own a particular token @@ -278,7 +278,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.50.3 */ denomOwnersByQuery = async (request: QueryDenomOwnersByQueryRequest): Promise => { const data = QueryDenomOwnersByQueryRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomOwnersByQuery", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'DenomOwnersByQuery', data); return promise.then(data => QueryDenomOwnersByQueryResponse.decode(new BinaryReader(data))); }; /* SendEnabled queries for SendEnabled entries. @@ -290,7 +290,7 @@ export class QueryClientImpl implements Query { Since: cosmos-sdk 0.47 */ sendEnabled = async (request: QuerySendEnabledRequest): Promise => { const data = QuerySendEnabledRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SendEnabled", data); + const promise = this.rpc.request('cosmos.bank.v1beta1.Query', 'SendEnabled', data); return promise.then(data => QuerySendEnabledResponse.decode(new BinaryReader(data))); }; } diff --git a/libs/cosmos-types/cosmos/bank/v1beta1/query.ts b/libs/cosmos-types/cosmos/bank/v1beta1/query.ts index 45f3fa82..8c566440 100644 --- a/libs/cosmos-types/cosmos/bank/v1beta1/query.ts +++ b/libs/cosmos-types/cosmos/bank/v1beta1/query.ts @@ -1,9 +1,9 @@ -import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { Params, ParamsAmino, Metadata, MetadataAmino, SendEnabled, SendEnabledAmino } from "./bank"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from '../../base/query/v1beta1/pagination'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { Metadata, MetadataAmino, Params, ParamsAmino, SendEnabled, SendEnabledAmino } from './bank'; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ export interface QueryBalanceRequest { /** address is the address to query balances for. */ @@ -12,7 +12,7 @@ export interface QueryBalanceRequest { denom: string; } export interface QueryBalanceRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryBalanceRequest'; value: Uint8Array; } /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ @@ -23,7 +23,7 @@ export interface QueryBalanceRequestAmino { denom: string; } export interface QueryBalanceRequestAminoMsg { - type: "cosmos-sdk/QueryBalanceRequest"; + type: 'cosmos-sdk/QueryBalanceRequest'; value: QueryBalanceRequestAmino; } /** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ @@ -32,7 +32,7 @@ export interface QueryBalanceResponse { balance?: Coin; } export interface QueryBalanceResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryBalanceResponse'; value: Uint8Array; } /** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ @@ -41,7 +41,7 @@ export interface QueryBalanceResponseAmino { balance?: CoinAmino; } export interface QueryBalanceResponseAminoMsg { - type: "cosmos-sdk/QueryBalanceResponse"; + type: 'cosmos-sdk/QueryBalanceResponse'; value: QueryBalanceResponseAmino; } /** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ @@ -58,7 +58,7 @@ export interface QueryAllBalancesRequest { resolveDenom: boolean; } export interface QueryAllBalancesRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryAllBalancesRequest'; value: Uint8Array; } /** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ @@ -75,7 +75,7 @@ export interface QueryAllBalancesRequestAmino { resolve_denom: boolean; } export interface QueryAllBalancesRequestAminoMsg { - type: "cosmos-sdk/QueryAllBalancesRequest"; + type: 'cosmos-sdk/QueryAllBalancesRequest'; value: QueryAllBalancesRequestAmino; } /** @@ -89,7 +89,7 @@ export interface QueryAllBalancesResponse { pagination?: PageResponse; } export interface QueryAllBalancesResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryAllBalancesResponse'; value: Uint8Array; } /** @@ -103,7 +103,7 @@ export interface QueryAllBalancesResponseAmino { pagination?: PageResponseAmino; } export interface QueryAllBalancesResponseAminoMsg { - type: "cosmos-sdk/QueryAllBalancesResponse"; + type: 'cosmos-sdk/QueryAllBalancesResponse'; value: QueryAllBalancesResponseAmino; } /** @@ -119,7 +119,7 @@ export interface QuerySpendableBalancesRequest { pagination?: PageRequest; } export interface QuerySpendableBalancesRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest"; + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalancesRequest'; value: Uint8Array; } /** @@ -135,7 +135,7 @@ export interface QuerySpendableBalancesRequestAmino { pagination?: PageRequestAmino; } export interface QuerySpendableBalancesRequestAminoMsg { - type: "cosmos-sdk/QuerySpendableBalancesRequest"; + type: 'cosmos-sdk/QuerySpendableBalancesRequest'; value: QuerySpendableBalancesRequestAmino; } /** @@ -151,7 +151,7 @@ export interface QuerySpendableBalancesResponse { pagination?: PageResponse; } export interface QuerySpendableBalancesResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse"; + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalancesResponse'; value: Uint8Array; } /** @@ -167,7 +167,7 @@ export interface QuerySpendableBalancesResponseAmino { pagination?: PageResponseAmino; } export interface QuerySpendableBalancesResponseAminoMsg { - type: "cosmos-sdk/QuerySpendableBalancesResponse"; + type: 'cosmos-sdk/QuerySpendableBalancesResponse'; value: QuerySpendableBalancesResponseAmino; } /** @@ -183,7 +183,7 @@ export interface QuerySpendableBalanceByDenomRequest { denom: string; } export interface QuerySpendableBalanceByDenomRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest"; + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest'; value: Uint8Array; } /** @@ -199,7 +199,7 @@ export interface QuerySpendableBalanceByDenomRequestAmino { denom: string; } export interface QuerySpendableBalanceByDenomRequestAminoMsg { - type: "cosmos-sdk/QuerySpendableBalanceByDenomRequest"; + type: 'cosmos-sdk/QuerySpendableBalanceByDenomRequest'; value: QuerySpendableBalanceByDenomRequestAmino; } /** @@ -213,7 +213,7 @@ export interface QuerySpendableBalanceByDenomResponse { balance?: Coin; } export interface QuerySpendableBalanceByDenomResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse"; + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse'; value: Uint8Array; } /** @@ -227,7 +227,7 @@ export interface QuerySpendableBalanceByDenomResponseAmino { balance?: CoinAmino; } export interface QuerySpendableBalanceByDenomResponseAminoMsg { - type: "cosmos-sdk/QuerySpendableBalanceByDenomResponse"; + type: 'cosmos-sdk/QuerySpendableBalanceByDenomResponse'; value: QuerySpendableBalanceByDenomResponseAmino; } /** @@ -243,7 +243,7 @@ export interface QueryTotalSupplyRequest { pagination?: PageRequest; } export interface QueryTotalSupplyRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryTotalSupplyRequest'; value: Uint8Array; } /** @@ -259,7 +259,7 @@ export interface QueryTotalSupplyRequestAmino { pagination?: PageRequestAmino; } export interface QueryTotalSupplyRequestAminoMsg { - type: "cosmos-sdk/QueryTotalSupplyRequest"; + type: 'cosmos-sdk/QueryTotalSupplyRequest'; value: QueryTotalSupplyRequestAmino; } /** @@ -277,7 +277,7 @@ export interface QueryTotalSupplyResponse { pagination?: PageResponse; } export interface QueryTotalSupplyResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryTotalSupplyResponse'; value: Uint8Array; } /** @@ -295,7 +295,7 @@ export interface QueryTotalSupplyResponseAmino { pagination?: PageResponseAmino; } export interface QueryTotalSupplyResponseAminoMsg { - type: "cosmos-sdk/QueryTotalSupplyResponse"; + type: 'cosmos-sdk/QueryTotalSupplyResponse'; value: QueryTotalSupplyResponseAmino; } /** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ @@ -304,7 +304,7 @@ export interface QuerySupplyOfRequest { denom: string; } export interface QuerySupplyOfRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest"; + typeUrl: '/cosmos.bank.v1beta1.QuerySupplyOfRequest'; value: Uint8Array; } /** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ @@ -313,7 +313,7 @@ export interface QuerySupplyOfRequestAmino { denom: string; } export interface QuerySupplyOfRequestAminoMsg { - type: "cosmos-sdk/QuerySupplyOfRequest"; + type: 'cosmos-sdk/QuerySupplyOfRequest'; value: QuerySupplyOfRequestAmino; } /** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ @@ -322,7 +322,7 @@ export interface QuerySupplyOfResponse { amount: Coin; } export interface QuerySupplyOfResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse"; + typeUrl: '/cosmos.bank.v1beta1.QuerySupplyOfResponse'; value: Uint8Array; } /** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ @@ -331,19 +331,19 @@ export interface QuerySupplyOfResponseAmino { amount: CoinAmino; } export interface QuerySupplyOfResponseAminoMsg { - type: "cosmos-sdk/QuerySupplyOfResponse"; + type: 'cosmos-sdk/QuerySupplyOfResponse'; value: QuerySupplyOfResponseAmino; } /** QueryParamsRequest defines the request type for querying x/bank parameters. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryParamsRequest'; value: Uint8Array; } /** QueryParamsRequest defines the request type for querying x/bank parameters. */ export interface QueryParamsRequestAmino {} export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; + type: 'cosmos-sdk/QueryParamsRequest'; value: QueryParamsRequestAmino; } /** QueryParamsResponse defines the response type for querying x/bank parameters. */ @@ -352,7 +352,7 @@ export interface QueryParamsResponse { params: Params; } export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryParamsResponse'; value: Uint8Array; } /** QueryParamsResponse defines the response type for querying x/bank parameters. */ @@ -361,7 +361,7 @@ export interface QueryParamsResponseAmino { params: ParamsAmino; } export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; + type: 'cosmos-sdk/QueryParamsResponse'; value: QueryParamsResponseAmino; } /** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ @@ -370,7 +370,7 @@ export interface QueryDenomsMetadataRequest { pagination?: PageRequest; } export interface QueryDenomsMetadataRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomsMetadataRequest'; value: Uint8Array; } /** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ @@ -379,7 +379,7 @@ export interface QueryDenomsMetadataRequestAmino { pagination?: PageRequestAmino; } export interface QueryDenomsMetadataRequestAminoMsg { - type: "cosmos-sdk/QueryDenomsMetadataRequest"; + type: 'cosmos-sdk/QueryDenomsMetadataRequest'; value: QueryDenomsMetadataRequestAmino; } /** @@ -393,7 +393,7 @@ export interface QueryDenomsMetadataResponse { pagination?: PageResponse; } export interface QueryDenomsMetadataResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomsMetadataResponse'; value: Uint8Array; } /** @@ -407,7 +407,7 @@ export interface QueryDenomsMetadataResponseAmino { pagination?: PageResponseAmino; } export interface QueryDenomsMetadataResponseAminoMsg { - type: "cosmos-sdk/QueryDenomsMetadataResponse"; + type: 'cosmos-sdk/QueryDenomsMetadataResponse'; value: QueryDenomsMetadataResponseAmino; } /** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ @@ -416,7 +416,7 @@ export interface QueryDenomMetadataRequest { denom: string; } export interface QueryDenomMetadataRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataRequest'; value: Uint8Array; } /** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ @@ -425,7 +425,7 @@ export interface QueryDenomMetadataRequestAmino { denom: string; } export interface QueryDenomMetadataRequestAminoMsg { - type: "cosmos-sdk/QueryDenomMetadataRequest"; + type: 'cosmos-sdk/QueryDenomMetadataRequest'; value: QueryDenomMetadataRequestAmino; } /** @@ -437,7 +437,7 @@ export interface QueryDenomMetadataResponse { metadata: Metadata; } export interface QueryDenomMetadataResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataResponse'; value: Uint8Array; } /** @@ -449,7 +449,7 @@ export interface QueryDenomMetadataResponseAmino { metadata: MetadataAmino; } export interface QueryDenomMetadataResponseAminoMsg { - type: "cosmos-sdk/QueryDenomMetadataResponse"; + type: 'cosmos-sdk/QueryDenomMetadataResponse'; value: QueryDenomMetadataResponseAmino; } /** @@ -461,7 +461,7 @@ export interface QueryDenomMetadataByQueryStringRequest { denom: string; } export interface QueryDenomMetadataByQueryStringRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest'; value: Uint8Array; } /** @@ -473,7 +473,7 @@ export interface QueryDenomMetadataByQueryStringRequestAmino { denom: string; } export interface QueryDenomMetadataByQueryStringRequestAminoMsg { - type: "cosmos-sdk/QueryDenomMetadataByQueryStringRequest"; + type: 'cosmos-sdk/QueryDenomMetadataByQueryStringRequest'; value: QueryDenomMetadataByQueryStringRequestAmino; } /** @@ -485,7 +485,7 @@ export interface QueryDenomMetadataByQueryStringResponse { metadata: Metadata; } export interface QueryDenomMetadataByQueryStringResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse'; value: Uint8Array; } /** @@ -497,7 +497,7 @@ export interface QueryDenomMetadataByQueryStringResponseAmino { metadata: MetadataAmino; } export interface QueryDenomMetadataByQueryStringResponseAminoMsg { - type: "cosmos-sdk/QueryDenomMetadataByQueryStringResponse"; + type: 'cosmos-sdk/QueryDenomMetadataByQueryStringResponse'; value: QueryDenomMetadataByQueryStringResponseAmino; } /** @@ -512,7 +512,7 @@ export interface QueryDenomOwnersRequest { pagination?: PageRequest; } export interface QueryDenomOwnersRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersRequest'; value: Uint8Array; } /** @@ -527,7 +527,7 @@ export interface QueryDenomOwnersRequestAmino { pagination?: PageRequestAmino; } export interface QueryDenomOwnersRequestAminoMsg { - type: "cosmos-sdk/QueryDenomOwnersRequest"; + type: 'cosmos-sdk/QueryDenomOwnersRequest'; value: QueryDenomOwnersRequestAmino; } /** @@ -544,7 +544,7 @@ export interface DenomOwner { balance: Coin; } export interface DenomOwnerProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.DenomOwner"; + typeUrl: '/cosmos.bank.v1beta1.DenomOwner'; value: Uint8Array; } /** @@ -561,7 +561,7 @@ export interface DenomOwnerAmino { balance: CoinAmino; } export interface DenomOwnerAminoMsg { - type: "cosmos-sdk/DenomOwner"; + type: 'cosmos-sdk/DenomOwner'; value: DenomOwnerAmino; } /** @@ -575,7 +575,7 @@ export interface QueryDenomOwnersResponse { pagination?: PageResponse; } export interface QueryDenomOwnersResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersResponse'; value: Uint8Array; } /** @@ -589,7 +589,7 @@ export interface QueryDenomOwnersResponseAmino { pagination?: PageResponseAmino; } export interface QueryDenomOwnersResponseAminoMsg { - type: "cosmos-sdk/QueryDenomOwnersResponse"; + type: 'cosmos-sdk/QueryDenomOwnersResponse'; value: QueryDenomOwnersResponseAmino; } /** @@ -606,7 +606,7 @@ export interface QueryDenomOwnersByQueryRequest { pagination?: PageRequest; } export interface QueryDenomOwnersByQueryRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest'; value: Uint8Array; } /** @@ -623,7 +623,7 @@ export interface QueryDenomOwnersByQueryRequestAmino { pagination?: PageRequestAmino; } export interface QueryDenomOwnersByQueryRequestAminoMsg { - type: "cosmos-sdk/QueryDenomOwnersByQueryRequest"; + type: 'cosmos-sdk/QueryDenomOwnersByQueryRequest'; value: QueryDenomOwnersByQueryRequestAmino; } /** @@ -637,7 +637,7 @@ export interface QueryDenomOwnersByQueryResponse { pagination?: PageResponse; } export interface QueryDenomOwnersByQueryResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse"; + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse'; value: Uint8Array; } /** @@ -651,7 +651,7 @@ export interface QueryDenomOwnersByQueryResponseAmino { pagination?: PageResponseAmino; } export interface QueryDenomOwnersByQueryResponseAminoMsg { - type: "cosmos-sdk/QueryDenomOwnersByQueryResponse"; + type: 'cosmos-sdk/QueryDenomOwnersByQueryResponse'; value: QueryDenomOwnersByQueryResponseAmino; } /** @@ -669,7 +669,7 @@ export interface QuerySendEnabledRequest { pagination?: PageRequest; } export interface QuerySendEnabledRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledRequest"; + typeUrl: '/cosmos.bank.v1beta1.QuerySendEnabledRequest'; value: Uint8Array; } /** @@ -687,7 +687,7 @@ export interface QuerySendEnabledRequestAmino { pagination?: PageRequestAmino; } export interface QuerySendEnabledRequestAminoMsg { - type: "cosmos-sdk/QuerySendEnabledRequest"; + type: 'cosmos-sdk/QuerySendEnabledRequest'; value: QuerySendEnabledRequestAmino; } /** @@ -704,7 +704,7 @@ export interface QuerySendEnabledResponse { pagination?: PageResponse; } export interface QuerySendEnabledResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledResponse"; + typeUrl: '/cosmos.bank.v1beta1.QuerySendEnabledResponse'; value: Uint8Array; } /** @@ -721,29 +721,29 @@ export interface QuerySendEnabledResponseAmino { pagination?: PageResponseAmino; } export interface QuerySendEnabledResponseAminoMsg { - type: "cosmos-sdk/QuerySendEnabledResponse"; + type: 'cosmos-sdk/QuerySendEnabledResponse'; value: QuerySendEnabledResponseAmino; } function createBaseQueryBalanceRequest(): QueryBalanceRequest { return { - address: "", - denom: "" + address: '', + denom: '' }; } export const QueryBalanceRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", - aminoType: "cosmos-sdk/QueryBalanceRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryBalanceRequest', + aminoType: 'cosmos-sdk/QueryBalanceRequest', is(o: any): o is QueryBalanceRequest { - return o && (o.$typeUrl === QueryBalanceRequest.typeUrl || typeof o.address === "string" && typeof o.denom === "string"); + return o && (o.$typeUrl === QueryBalanceRequest.typeUrl || typeof o.address === 'string' && typeof o.denom === 'string'); }, isAmino(o: any): o is QueryBalanceRequestAmino { - return o && (o.$typeUrl === QueryBalanceRequest.typeUrl || typeof o.address === "string" && typeof o.denom === "string"); + return o && (o.$typeUrl === QueryBalanceRequest.typeUrl || typeof o.address === 'string' && typeof o.denom === 'string'); }, encode(message: QueryBalanceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(18).string(message.denom); } return writer; @@ -755,23 +755,23 @@ export const QueryBalanceRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryBalanceRequest { const message = createBaseQueryBalanceRequest(); - message.address = object.address ?? ""; - message.denom = object.denom ?? ""; + message.address = object.address ?? ''; + message.denom = object.denom ?? ''; return message; }, fromAmino(object: QueryBalanceRequestAmino): QueryBalanceRequest { @@ -786,8 +786,8 @@ export const QueryBalanceRequest = { }, toAmino(message: QueryBalanceRequest): QueryBalanceRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.address = message.address === '' ? undefined : message.address; + obj.denom = message.denom === '' ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryBalanceRequestAminoMsg): QueryBalanceRequest { @@ -795,7 +795,7 @@ export const QueryBalanceRequest = { }, toAminoMsg(message: QueryBalanceRequest): QueryBalanceRequestAminoMsg { return { - type: "cosmos-sdk/QueryBalanceRequest", + type: 'cosmos-sdk/QueryBalanceRequest', value: QueryBalanceRequest.toAmino(message) }; }, @@ -807,7 +807,7 @@ export const QueryBalanceRequest = { }, toProtoMsg(message: QueryBalanceRequest): QueryBalanceRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryBalanceRequest', value: QueryBalanceRequest.encode(message).finish() }; } @@ -820,8 +820,8 @@ function createBaseQueryBalanceResponse(): QueryBalanceResponse { }; } export const QueryBalanceResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", - aminoType: "cosmos-sdk/QueryBalanceResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryBalanceResponse', + aminoType: 'cosmos-sdk/QueryBalanceResponse', is(o: any): o is QueryBalanceResponse { return o && o.$typeUrl === QueryBalanceResponse.typeUrl; }, @@ -841,12 +841,12 @@ export const QueryBalanceResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.balance = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -873,7 +873,7 @@ export const QueryBalanceResponse = { }, toAminoMsg(message: QueryBalanceResponse): QueryBalanceResponseAminoMsg { return { - type: "cosmos-sdk/QueryBalanceResponse", + type: 'cosmos-sdk/QueryBalanceResponse', value: QueryBalanceResponse.toAmino(message) }; }, @@ -885,7 +885,7 @@ export const QueryBalanceResponse = { }, toProtoMsg(message: QueryBalanceResponse): QueryBalanceResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryBalanceResponse', value: QueryBalanceResponse.encode(message).finish() }; } @@ -894,22 +894,22 @@ GlobalDecoderRegistry.register(QueryBalanceResponse.typeUrl, QueryBalanceRespons GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceResponse.aminoType, QueryBalanceResponse.typeUrl); function createBaseQueryAllBalancesRequest(): QueryAllBalancesRequest { return { - address: "", + address: '', pagination: undefined, resolveDenom: false }; } export const QueryAllBalancesRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", - aminoType: "cosmos-sdk/QueryAllBalancesRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryAllBalancesRequest', + aminoType: 'cosmos-sdk/QueryAllBalancesRequest', is(o: any): o is QueryAllBalancesRequest { - return o && (o.$typeUrl === QueryAllBalancesRequest.typeUrl || typeof o.address === "string" && typeof o.resolveDenom === "boolean"); + return o && (o.$typeUrl === QueryAllBalancesRequest.typeUrl || typeof o.address === 'string' && typeof o.resolveDenom === 'boolean'); }, isAmino(o: any): o is QueryAllBalancesRequestAmino { - return o && (o.$typeUrl === QueryAllBalancesRequest.typeUrl || typeof o.address === "string" && typeof o.resolve_denom === "boolean"); + return o && (o.$typeUrl === QueryAllBalancesRequest.typeUrl || typeof o.address === 'string' && typeof o.resolve_denom === 'boolean'); }, encode(message: QueryAllBalancesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.pagination !== undefined) { @@ -927,25 +927,25 @@ export const QueryAllBalancesRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 3: - message.resolveDenom = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + case 3: + message.resolveDenom = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryAllBalancesRequest { const message = createBaseQueryAllBalancesRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; message.resolveDenom = object.resolveDenom ?? false; return message; @@ -965,7 +965,7 @@ export const QueryAllBalancesRequest = { }, toAmino(message: QueryAllBalancesRequest): QueryAllBalancesRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; obj.resolve_denom = message.resolveDenom === false ? undefined : message.resolveDenom; return obj; @@ -975,7 +975,7 @@ export const QueryAllBalancesRequest = { }, toAminoMsg(message: QueryAllBalancesRequest): QueryAllBalancesRequestAminoMsg { return { - type: "cosmos-sdk/QueryAllBalancesRequest", + type: 'cosmos-sdk/QueryAllBalancesRequest', value: QueryAllBalancesRequest.toAmino(message) }; }, @@ -987,7 +987,7 @@ export const QueryAllBalancesRequest = { }, toProtoMsg(message: QueryAllBalancesRequest): QueryAllBalancesRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryAllBalancesRequest', value: QueryAllBalancesRequest.encode(message).finish() }; } @@ -1001,8 +1001,8 @@ function createBaseQueryAllBalancesResponse(): QueryAllBalancesResponse { }; } export const QueryAllBalancesResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", - aminoType: "cosmos-sdk/QueryAllBalancesResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryAllBalancesResponse', + aminoType: 'cosmos-sdk/QueryAllBalancesResponse', is(o: any): o is QueryAllBalancesResponse { return o && (o.$typeUrl === QueryAllBalancesResponse.typeUrl || Array.isArray(o.balances) && (!o.balances.length || Coin.is(o.balances[0]))); }, @@ -1025,15 +1025,15 @@ export const QueryAllBalancesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.balances.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1067,7 +1067,7 @@ export const QueryAllBalancesResponse = { }, toAminoMsg(message: QueryAllBalancesResponse): QueryAllBalancesResponseAminoMsg { return { - type: "cosmos-sdk/QueryAllBalancesResponse", + type: 'cosmos-sdk/QueryAllBalancesResponse', value: QueryAllBalancesResponse.toAmino(message) }; }, @@ -1079,7 +1079,7 @@ export const QueryAllBalancesResponse = { }, toProtoMsg(message: QueryAllBalancesResponse): QueryAllBalancesResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryAllBalancesResponse', value: QueryAllBalancesResponse.encode(message).finish() }; } @@ -1088,21 +1088,21 @@ GlobalDecoderRegistry.register(QueryAllBalancesResponse.typeUrl, QueryAllBalance GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesResponse.aminoType, QueryAllBalancesResponse.typeUrl); function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { return { - address: "", + address: '', pagination: undefined }; } export const QuerySpendableBalancesRequest = { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", - aminoType: "cosmos-sdk/QuerySpendableBalancesRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalancesRequest', + aminoType: 'cosmos-sdk/QuerySpendableBalancesRequest', is(o: any): o is QuerySpendableBalancesRequest { - return o && (o.$typeUrl === QuerySpendableBalancesRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QuerySpendableBalancesRequest.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is QuerySpendableBalancesRequestAmino { - return o && (o.$typeUrl === QuerySpendableBalancesRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QuerySpendableBalancesRequest.typeUrl || typeof o.address === 'string'); }, encode(message: QuerySpendableBalancesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.pagination !== undefined) { @@ -1117,22 +1117,22 @@ export const QuerySpendableBalancesRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QuerySpendableBalancesRequest { const message = createBaseQuerySpendableBalancesRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -1148,7 +1148,7 @@ export const QuerySpendableBalancesRequest = { }, toAmino(message: QuerySpendableBalancesRequest): QuerySpendableBalancesRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -1157,7 +1157,7 @@ export const QuerySpendableBalancesRequest = { }, toAminoMsg(message: QuerySpendableBalancesRequest): QuerySpendableBalancesRequestAminoMsg { return { - type: "cosmos-sdk/QuerySpendableBalancesRequest", + type: 'cosmos-sdk/QuerySpendableBalancesRequest', value: QuerySpendableBalancesRequest.toAmino(message) }; }, @@ -1169,7 +1169,7 @@ export const QuerySpendableBalancesRequest = { }, toProtoMsg(message: QuerySpendableBalancesRequest): QuerySpendableBalancesRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalancesRequest', value: QuerySpendableBalancesRequest.encode(message).finish() }; } @@ -1183,8 +1183,8 @@ function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesRespo }; } export const QuerySpendableBalancesResponse = { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", - aminoType: "cosmos-sdk/QuerySpendableBalancesResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalancesResponse', + aminoType: 'cosmos-sdk/QuerySpendableBalancesResponse', is(o: any): o is QuerySpendableBalancesResponse { return o && (o.$typeUrl === QuerySpendableBalancesResponse.typeUrl || Array.isArray(o.balances) && (!o.balances.length || Coin.is(o.balances[0]))); }, @@ -1207,15 +1207,15 @@ export const QuerySpendableBalancesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.balances.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1249,7 +1249,7 @@ export const QuerySpendableBalancesResponse = { }, toAminoMsg(message: QuerySpendableBalancesResponse): QuerySpendableBalancesResponseAminoMsg { return { - type: "cosmos-sdk/QuerySpendableBalancesResponse", + type: 'cosmos-sdk/QuerySpendableBalancesResponse', value: QuerySpendableBalancesResponse.toAmino(message) }; }, @@ -1261,7 +1261,7 @@ export const QuerySpendableBalancesResponse = { }, toProtoMsg(message: QuerySpendableBalancesResponse): QuerySpendableBalancesResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalancesResponse', value: QuerySpendableBalancesResponse.encode(message).finish() }; } @@ -1270,24 +1270,24 @@ GlobalDecoderRegistry.register(QuerySpendableBalancesResponse.typeUrl, QuerySpen GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesResponse.aminoType, QuerySpendableBalancesResponse.typeUrl); function createBaseQuerySpendableBalanceByDenomRequest(): QuerySpendableBalanceByDenomRequest { return { - address: "", - denom: "" + address: '', + denom: '' }; } export const QuerySpendableBalanceByDenomRequest = { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", - aminoType: "cosmos-sdk/QuerySpendableBalanceByDenomRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest', + aminoType: 'cosmos-sdk/QuerySpendableBalanceByDenomRequest', is(o: any): o is QuerySpendableBalanceByDenomRequest { - return o && (o.$typeUrl === QuerySpendableBalanceByDenomRequest.typeUrl || typeof o.address === "string" && typeof o.denom === "string"); + return o && (o.$typeUrl === QuerySpendableBalanceByDenomRequest.typeUrl || typeof o.address === 'string' && typeof o.denom === 'string'); }, isAmino(o: any): o is QuerySpendableBalanceByDenomRequestAmino { - return o && (o.$typeUrl === QuerySpendableBalanceByDenomRequest.typeUrl || typeof o.address === "string" && typeof o.denom === "string"); + return o && (o.$typeUrl === QuerySpendableBalanceByDenomRequest.typeUrl || typeof o.address === 'string' && typeof o.denom === 'string'); }, encode(message: QuerySpendableBalanceByDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(18).string(message.denom); } return writer; @@ -1299,23 +1299,23 @@ export const QuerySpendableBalanceByDenomRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QuerySpendableBalanceByDenomRequest { const message = createBaseQuerySpendableBalanceByDenomRequest(); - message.address = object.address ?? ""; - message.denom = object.denom ?? ""; + message.address = object.address ?? ''; + message.denom = object.denom ?? ''; return message; }, fromAmino(object: QuerySpendableBalanceByDenomRequestAmino): QuerySpendableBalanceByDenomRequest { @@ -1330,8 +1330,8 @@ export const QuerySpendableBalanceByDenomRequest = { }, toAmino(message: QuerySpendableBalanceByDenomRequest): QuerySpendableBalanceByDenomRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.address = message.address === '' ? undefined : message.address; + obj.denom = message.denom === '' ? undefined : message.denom; return obj; }, fromAminoMsg(object: QuerySpendableBalanceByDenomRequestAminoMsg): QuerySpendableBalanceByDenomRequest { @@ -1339,7 +1339,7 @@ export const QuerySpendableBalanceByDenomRequest = { }, toAminoMsg(message: QuerySpendableBalanceByDenomRequest): QuerySpendableBalanceByDenomRequestAminoMsg { return { - type: "cosmos-sdk/QuerySpendableBalanceByDenomRequest", + type: 'cosmos-sdk/QuerySpendableBalanceByDenomRequest', value: QuerySpendableBalanceByDenomRequest.toAmino(message) }; }, @@ -1351,7 +1351,7 @@ export const QuerySpendableBalanceByDenomRequest = { }, toProtoMsg(message: QuerySpendableBalanceByDenomRequest): QuerySpendableBalanceByDenomRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest', value: QuerySpendableBalanceByDenomRequest.encode(message).finish() }; } @@ -1364,8 +1364,8 @@ function createBaseQuerySpendableBalanceByDenomResponse(): QuerySpendableBalance }; } export const QuerySpendableBalanceByDenomResponse = { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", - aminoType: "cosmos-sdk/QuerySpendableBalanceByDenomResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse', + aminoType: 'cosmos-sdk/QuerySpendableBalanceByDenomResponse', is(o: any): o is QuerySpendableBalanceByDenomResponse { return o && o.$typeUrl === QuerySpendableBalanceByDenomResponse.typeUrl; }, @@ -1385,12 +1385,12 @@ export const QuerySpendableBalanceByDenomResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.balance = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1417,7 +1417,7 @@ export const QuerySpendableBalanceByDenomResponse = { }, toAminoMsg(message: QuerySpendableBalanceByDenomResponse): QuerySpendableBalanceByDenomResponseAminoMsg { return { - type: "cosmos-sdk/QuerySpendableBalanceByDenomResponse", + type: 'cosmos-sdk/QuerySpendableBalanceByDenomResponse', value: QuerySpendableBalanceByDenomResponse.toAmino(message) }; }, @@ -1429,7 +1429,7 @@ export const QuerySpendableBalanceByDenomResponse = { }, toProtoMsg(message: QuerySpendableBalanceByDenomResponse): QuerySpendableBalanceByDenomResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse', value: QuerySpendableBalanceByDenomResponse.encode(message).finish() }; } @@ -1442,8 +1442,8 @@ function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { }; } export const QueryTotalSupplyRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", - aminoType: "cosmos-sdk/QueryTotalSupplyRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryTotalSupplyRequest', + aminoType: 'cosmos-sdk/QueryTotalSupplyRequest', is(o: any): o is QueryTotalSupplyRequest { return o && o.$typeUrl === QueryTotalSupplyRequest.typeUrl; }, @@ -1463,12 +1463,12 @@ export const QueryTotalSupplyRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1495,7 +1495,7 @@ export const QueryTotalSupplyRequest = { }, toAminoMsg(message: QueryTotalSupplyRequest): QueryTotalSupplyRequestAminoMsg { return { - type: "cosmos-sdk/QueryTotalSupplyRequest", + type: 'cosmos-sdk/QueryTotalSupplyRequest', value: QueryTotalSupplyRequest.toAmino(message) }; }, @@ -1507,7 +1507,7 @@ export const QueryTotalSupplyRequest = { }, toProtoMsg(message: QueryTotalSupplyRequest): QueryTotalSupplyRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryTotalSupplyRequest', value: QueryTotalSupplyRequest.encode(message).finish() }; } @@ -1521,8 +1521,8 @@ function createBaseQueryTotalSupplyResponse(): QueryTotalSupplyResponse { }; } export const QueryTotalSupplyResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", - aminoType: "cosmos-sdk/QueryTotalSupplyResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryTotalSupplyResponse', + aminoType: 'cosmos-sdk/QueryTotalSupplyResponse', is(o: any): o is QueryTotalSupplyResponse { return o && (o.$typeUrl === QueryTotalSupplyResponse.typeUrl || Array.isArray(o.supply) && (!o.supply.length || Coin.is(o.supply[0]))); }, @@ -1545,15 +1545,15 @@ export const QueryTotalSupplyResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.supply.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1587,7 +1587,7 @@ export const QueryTotalSupplyResponse = { }, toAminoMsg(message: QueryTotalSupplyResponse): QueryTotalSupplyResponseAminoMsg { return { - type: "cosmos-sdk/QueryTotalSupplyResponse", + type: 'cosmos-sdk/QueryTotalSupplyResponse', value: QueryTotalSupplyResponse.toAmino(message) }; }, @@ -1599,7 +1599,7 @@ export const QueryTotalSupplyResponse = { }, toProtoMsg(message: QueryTotalSupplyResponse): QueryTotalSupplyResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryTotalSupplyResponse', value: QueryTotalSupplyResponse.encode(message).finish() }; } @@ -1608,20 +1608,20 @@ GlobalDecoderRegistry.register(QueryTotalSupplyResponse.typeUrl, QueryTotalSuppl GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyResponse.aminoType, QueryTotalSupplyResponse.typeUrl); function createBaseQuerySupplyOfRequest(): QuerySupplyOfRequest { return { - denom: "" + denom: '' }; } export const QuerySupplyOfRequest = { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", - aminoType: "cosmos-sdk/QuerySupplyOfRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySupplyOfRequest', + aminoType: 'cosmos-sdk/QuerySupplyOfRequest', is(o: any): o is QuerySupplyOfRequest { - return o && (o.$typeUrl === QuerySupplyOfRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QuerySupplyOfRequest.typeUrl || typeof o.denom === 'string'); }, isAmino(o: any): o is QuerySupplyOfRequestAmino { - return o && (o.$typeUrl === QuerySupplyOfRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QuerySupplyOfRequest.typeUrl || typeof o.denom === 'string'); }, encode(message: QuerySupplyOfRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } return writer; @@ -1633,19 +1633,19 @@ export const QuerySupplyOfRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QuerySupplyOfRequest { const message = createBaseQuerySupplyOfRequest(); - message.denom = object.denom ?? ""; + message.denom = object.denom ?? ''; return message; }, fromAmino(object: QuerySupplyOfRequestAmino): QuerySupplyOfRequest { @@ -1657,7 +1657,7 @@ export const QuerySupplyOfRequest = { }, toAmino(message: QuerySupplyOfRequest): QuerySupplyOfRequestAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.denom = message.denom === '' ? undefined : message.denom; return obj; }, fromAminoMsg(object: QuerySupplyOfRequestAminoMsg): QuerySupplyOfRequest { @@ -1665,7 +1665,7 @@ export const QuerySupplyOfRequest = { }, toAminoMsg(message: QuerySupplyOfRequest): QuerySupplyOfRequestAminoMsg { return { - type: "cosmos-sdk/QuerySupplyOfRequest", + type: 'cosmos-sdk/QuerySupplyOfRequest', value: QuerySupplyOfRequest.toAmino(message) }; }, @@ -1677,7 +1677,7 @@ export const QuerySupplyOfRequest = { }, toProtoMsg(message: QuerySupplyOfRequest): QuerySupplyOfRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySupplyOfRequest', value: QuerySupplyOfRequest.encode(message).finish() }; } @@ -1690,8 +1690,8 @@ function createBaseQuerySupplyOfResponse(): QuerySupplyOfResponse { }; } export const QuerySupplyOfResponse = { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", - aminoType: "cosmos-sdk/QuerySupplyOfResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySupplyOfResponse', + aminoType: 'cosmos-sdk/QuerySupplyOfResponse', is(o: any): o is QuerySupplyOfResponse { return o && (o.$typeUrl === QuerySupplyOfResponse.typeUrl || Coin.is(o.amount)); }, @@ -1711,12 +1711,12 @@ export const QuerySupplyOfResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.amount = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1743,7 +1743,7 @@ export const QuerySupplyOfResponse = { }, toAminoMsg(message: QuerySupplyOfResponse): QuerySupplyOfResponseAminoMsg { return { - type: "cosmos-sdk/QuerySupplyOfResponse", + type: 'cosmos-sdk/QuerySupplyOfResponse', value: QuerySupplyOfResponse.toAmino(message) }; }, @@ -1755,7 +1755,7 @@ export const QuerySupplyOfResponse = { }, toProtoMsg(message: QuerySupplyOfResponse): QuerySupplyOfResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySupplyOfResponse', value: QuerySupplyOfResponse.encode(message).finish() }; } @@ -1766,8 +1766,8 @@ function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } export const QueryParamsRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryParamsRequest', + aminoType: 'cosmos-sdk/QueryParamsRequest', is(o: any): o is QueryParamsRequest { return o && o.$typeUrl === QueryParamsRequest.typeUrl; }, @@ -1784,9 +1784,9 @@ export const QueryParamsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1808,7 +1808,7 @@ export const QueryParamsRequest = { }, toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { return { - type: "cosmos-sdk/QueryParamsRequest", + type: 'cosmos-sdk/QueryParamsRequest', value: QueryParamsRequest.toAmino(message) }; }, @@ -1820,7 +1820,7 @@ export const QueryParamsRequest = { }, toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryParamsRequest', value: QueryParamsRequest.encode(message).finish() }; } @@ -1833,8 +1833,8 @@ function createBaseQueryParamsResponse(): QueryParamsResponse { }; } export const QueryParamsResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryParamsResponse', + aminoType: 'cosmos-sdk/QueryParamsResponse', is(o: any): o is QueryParamsResponse { return o && (o.$typeUrl === QueryParamsResponse.typeUrl || Params.is(o.params)); }, @@ -1854,12 +1854,12 @@ export const QueryParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1886,7 +1886,7 @@ export const QueryParamsResponse = { }, toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { return { - type: "cosmos-sdk/QueryParamsResponse", + type: 'cosmos-sdk/QueryParamsResponse', value: QueryParamsResponse.toAmino(message) }; }, @@ -1898,7 +1898,7 @@ export const QueryParamsResponse = { }, toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryParamsResponse', value: QueryParamsResponse.encode(message).finish() }; } @@ -1911,8 +1911,8 @@ function createBaseQueryDenomsMetadataRequest(): QueryDenomsMetadataRequest { }; } export const QueryDenomsMetadataRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", - aminoType: "cosmos-sdk/QueryDenomsMetadataRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomsMetadataRequest', + aminoType: 'cosmos-sdk/QueryDenomsMetadataRequest', is(o: any): o is QueryDenomsMetadataRequest { return o && o.$typeUrl === QueryDenomsMetadataRequest.typeUrl; }, @@ -1932,12 +1932,12 @@ export const QueryDenomsMetadataRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1964,7 +1964,7 @@ export const QueryDenomsMetadataRequest = { }, toAminoMsg(message: QueryDenomsMetadataRequest): QueryDenomsMetadataRequestAminoMsg { return { - type: "cosmos-sdk/QueryDenomsMetadataRequest", + type: 'cosmos-sdk/QueryDenomsMetadataRequest', value: QueryDenomsMetadataRequest.toAmino(message) }; }, @@ -1976,7 +1976,7 @@ export const QueryDenomsMetadataRequest = { }, toProtoMsg(message: QueryDenomsMetadataRequest): QueryDenomsMetadataRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomsMetadataRequest', value: QueryDenomsMetadataRequest.encode(message).finish() }; } @@ -1990,8 +1990,8 @@ function createBaseQueryDenomsMetadataResponse(): QueryDenomsMetadataResponse { }; } export const QueryDenomsMetadataResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", - aminoType: "cosmos-sdk/QueryDenomsMetadataResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomsMetadataResponse', + aminoType: 'cosmos-sdk/QueryDenomsMetadataResponse', is(o: any): o is QueryDenomsMetadataResponse { return o && (o.$typeUrl === QueryDenomsMetadataResponse.typeUrl || Array.isArray(o.metadatas) && (!o.metadatas.length || Metadata.is(o.metadatas[0]))); }, @@ -2014,15 +2014,15 @@ export const QueryDenomsMetadataResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metadatas.push(Metadata.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.metadatas.push(Metadata.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2056,7 +2056,7 @@ export const QueryDenomsMetadataResponse = { }, toAminoMsg(message: QueryDenomsMetadataResponse): QueryDenomsMetadataResponseAminoMsg { return { - type: "cosmos-sdk/QueryDenomsMetadataResponse", + type: 'cosmos-sdk/QueryDenomsMetadataResponse', value: QueryDenomsMetadataResponse.toAmino(message) }; }, @@ -2068,7 +2068,7 @@ export const QueryDenomsMetadataResponse = { }, toProtoMsg(message: QueryDenomsMetadataResponse): QueryDenomsMetadataResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomsMetadataResponse', value: QueryDenomsMetadataResponse.encode(message).finish() }; } @@ -2077,20 +2077,20 @@ GlobalDecoderRegistry.register(QueryDenomsMetadataResponse.typeUrl, QueryDenomsM GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataResponse.aminoType, QueryDenomsMetadataResponse.typeUrl); function createBaseQueryDenomMetadataRequest(): QueryDenomMetadataRequest { return { - denom: "" + denom: '' }; } export const QueryDenomMetadataRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", - aminoType: "cosmos-sdk/QueryDenomMetadataRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataRequest', + aminoType: 'cosmos-sdk/QueryDenomMetadataRequest', is(o: any): o is QueryDenomMetadataRequest { - return o && (o.$typeUrl === QueryDenomMetadataRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomMetadataRequest.typeUrl || typeof o.denom === 'string'); }, isAmino(o: any): o is QueryDenomMetadataRequestAmino { - return o && (o.$typeUrl === QueryDenomMetadataRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomMetadataRequest.typeUrl || typeof o.denom === 'string'); }, encode(message: QueryDenomMetadataRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } return writer; @@ -2102,19 +2102,19 @@ export const QueryDenomMetadataRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDenomMetadataRequest { const message = createBaseQueryDenomMetadataRequest(); - message.denom = object.denom ?? ""; + message.denom = object.denom ?? ''; return message; }, fromAmino(object: QueryDenomMetadataRequestAmino): QueryDenomMetadataRequest { @@ -2126,7 +2126,7 @@ export const QueryDenomMetadataRequest = { }, toAmino(message: QueryDenomMetadataRequest): QueryDenomMetadataRequestAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.denom = message.denom === '' ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomMetadataRequestAminoMsg): QueryDenomMetadataRequest { @@ -2134,7 +2134,7 @@ export const QueryDenomMetadataRequest = { }, toAminoMsg(message: QueryDenomMetadataRequest): QueryDenomMetadataRequestAminoMsg { return { - type: "cosmos-sdk/QueryDenomMetadataRequest", + type: 'cosmos-sdk/QueryDenomMetadataRequest', value: QueryDenomMetadataRequest.toAmino(message) }; }, @@ -2146,7 +2146,7 @@ export const QueryDenomMetadataRequest = { }, toProtoMsg(message: QueryDenomMetadataRequest): QueryDenomMetadataRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataRequest', value: QueryDenomMetadataRequest.encode(message).finish() }; } @@ -2159,8 +2159,8 @@ function createBaseQueryDenomMetadataResponse(): QueryDenomMetadataResponse { }; } export const QueryDenomMetadataResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", - aminoType: "cosmos-sdk/QueryDenomMetadataResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataResponse', + aminoType: 'cosmos-sdk/QueryDenomMetadataResponse', is(o: any): o is QueryDenomMetadataResponse { return o && (o.$typeUrl === QueryDenomMetadataResponse.typeUrl || Metadata.is(o.metadata)); }, @@ -2180,12 +2180,12 @@ export const QueryDenomMetadataResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.metadata = Metadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2212,7 +2212,7 @@ export const QueryDenomMetadataResponse = { }, toAminoMsg(message: QueryDenomMetadataResponse): QueryDenomMetadataResponseAminoMsg { return { - type: "cosmos-sdk/QueryDenomMetadataResponse", + type: 'cosmos-sdk/QueryDenomMetadataResponse', value: QueryDenomMetadataResponse.toAmino(message) }; }, @@ -2224,7 +2224,7 @@ export const QueryDenomMetadataResponse = { }, toProtoMsg(message: QueryDenomMetadataResponse): QueryDenomMetadataResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataResponse', value: QueryDenomMetadataResponse.encode(message).finish() }; } @@ -2233,20 +2233,20 @@ GlobalDecoderRegistry.register(QueryDenomMetadataResponse.typeUrl, QueryDenomMet GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataResponse.aminoType, QueryDenomMetadataResponse.typeUrl); function createBaseQueryDenomMetadataByQueryStringRequest(): QueryDenomMetadataByQueryStringRequest { return { - denom: "" + denom: '' }; } export const QueryDenomMetadataByQueryStringRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", - aminoType: "cosmos-sdk/QueryDenomMetadataByQueryStringRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest', + aminoType: 'cosmos-sdk/QueryDenomMetadataByQueryStringRequest', is(o: any): o is QueryDenomMetadataByQueryStringRequest { - return o && (o.$typeUrl === QueryDenomMetadataByQueryStringRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomMetadataByQueryStringRequest.typeUrl || typeof o.denom === 'string'); }, isAmino(o: any): o is QueryDenomMetadataByQueryStringRequestAmino { - return o && (o.$typeUrl === QueryDenomMetadataByQueryStringRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomMetadataByQueryStringRequest.typeUrl || typeof o.denom === 'string'); }, encode(message: QueryDenomMetadataByQueryStringRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } return writer; @@ -2258,19 +2258,19 @@ export const QueryDenomMetadataByQueryStringRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDenomMetadataByQueryStringRequest { const message = createBaseQueryDenomMetadataByQueryStringRequest(); - message.denom = object.denom ?? ""; + message.denom = object.denom ?? ''; return message; }, fromAmino(object: QueryDenomMetadataByQueryStringRequestAmino): QueryDenomMetadataByQueryStringRequest { @@ -2282,7 +2282,7 @@ export const QueryDenomMetadataByQueryStringRequest = { }, toAmino(message: QueryDenomMetadataByQueryStringRequest): QueryDenomMetadataByQueryStringRequestAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.denom = message.denom === '' ? undefined : message.denom; return obj; }, fromAminoMsg(object: QueryDenomMetadataByQueryStringRequestAminoMsg): QueryDenomMetadataByQueryStringRequest { @@ -2290,7 +2290,7 @@ export const QueryDenomMetadataByQueryStringRequest = { }, toAminoMsg(message: QueryDenomMetadataByQueryStringRequest): QueryDenomMetadataByQueryStringRequestAminoMsg { return { - type: "cosmos-sdk/QueryDenomMetadataByQueryStringRequest", + type: 'cosmos-sdk/QueryDenomMetadataByQueryStringRequest', value: QueryDenomMetadataByQueryStringRequest.toAmino(message) }; }, @@ -2302,7 +2302,7 @@ export const QueryDenomMetadataByQueryStringRequest = { }, toProtoMsg(message: QueryDenomMetadataByQueryStringRequest): QueryDenomMetadataByQueryStringRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest', value: QueryDenomMetadataByQueryStringRequest.encode(message).finish() }; } @@ -2315,8 +2315,8 @@ function createBaseQueryDenomMetadataByQueryStringResponse(): QueryDenomMetadata }; } export const QueryDenomMetadataByQueryStringResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", - aminoType: "cosmos-sdk/QueryDenomMetadataByQueryStringResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse', + aminoType: 'cosmos-sdk/QueryDenomMetadataByQueryStringResponse', is(o: any): o is QueryDenomMetadataByQueryStringResponse { return o && (o.$typeUrl === QueryDenomMetadataByQueryStringResponse.typeUrl || Metadata.is(o.metadata)); }, @@ -2336,12 +2336,12 @@ export const QueryDenomMetadataByQueryStringResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.metadata = Metadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2368,7 +2368,7 @@ export const QueryDenomMetadataByQueryStringResponse = { }, toAminoMsg(message: QueryDenomMetadataByQueryStringResponse): QueryDenomMetadataByQueryStringResponseAminoMsg { return { - type: "cosmos-sdk/QueryDenomMetadataByQueryStringResponse", + type: 'cosmos-sdk/QueryDenomMetadataByQueryStringResponse', value: QueryDenomMetadataByQueryStringResponse.toAmino(message) }; }, @@ -2380,7 +2380,7 @@ export const QueryDenomMetadataByQueryStringResponse = { }, toProtoMsg(message: QueryDenomMetadataByQueryStringResponse): QueryDenomMetadataByQueryStringResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse', value: QueryDenomMetadataByQueryStringResponse.encode(message).finish() }; } @@ -2389,21 +2389,21 @@ GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringResponse.typeUrl, GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringResponse.aminoType, QueryDenomMetadataByQueryStringResponse.typeUrl); function createBaseQueryDenomOwnersRequest(): QueryDenomOwnersRequest { return { - denom: "", + denom: '', pagination: undefined }; } export const QueryDenomOwnersRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", - aminoType: "cosmos-sdk/QueryDenomOwnersRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersRequest', + aminoType: 'cosmos-sdk/QueryDenomOwnersRequest', is(o: any): o is QueryDenomOwnersRequest { - return o && (o.$typeUrl === QueryDenomOwnersRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomOwnersRequest.typeUrl || typeof o.denom === 'string'); }, isAmino(o: any): o is QueryDenomOwnersRequestAmino { - return o && (o.$typeUrl === QueryDenomOwnersRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomOwnersRequest.typeUrl || typeof o.denom === 'string'); }, encode(message: QueryDenomOwnersRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } if (message.pagination !== undefined) { @@ -2418,22 +2418,22 @@ export const QueryDenomOwnersRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denom = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDenomOwnersRequest { const message = createBaseQueryDenomOwnersRequest(); - message.denom = object.denom ?? ""; + message.denom = object.denom ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -2449,7 +2449,7 @@ export const QueryDenomOwnersRequest = { }, toAmino(message: QueryDenomOwnersRequest): QueryDenomOwnersRequestAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.denom = message.denom === '' ? undefined : message.denom; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -2458,7 +2458,7 @@ export const QueryDenomOwnersRequest = { }, toAminoMsg(message: QueryDenomOwnersRequest): QueryDenomOwnersRequestAminoMsg { return { - type: "cosmos-sdk/QueryDenomOwnersRequest", + type: 'cosmos-sdk/QueryDenomOwnersRequest', value: QueryDenomOwnersRequest.toAmino(message) }; }, @@ -2470,7 +2470,7 @@ export const QueryDenomOwnersRequest = { }, toProtoMsg(message: QueryDenomOwnersRequest): QueryDenomOwnersRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersRequest', value: QueryDenomOwnersRequest.encode(message).finish() }; } @@ -2479,21 +2479,21 @@ GlobalDecoderRegistry.register(QueryDenomOwnersRequest.typeUrl, QueryDenomOwners GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersRequest.aminoType, QueryDenomOwnersRequest.typeUrl); function createBaseDenomOwner(): DenomOwner { return { - address: "", + address: '', balance: Coin.fromPartial({}) }; } export const DenomOwner = { - typeUrl: "/cosmos.bank.v1beta1.DenomOwner", - aminoType: "cosmos-sdk/DenomOwner", + typeUrl: '/cosmos.bank.v1beta1.DenomOwner', + aminoType: 'cosmos-sdk/DenomOwner', is(o: any): o is DenomOwner { - return o && (o.$typeUrl === DenomOwner.typeUrl || typeof o.address === "string" && Coin.is(o.balance)); + return o && (o.$typeUrl === DenomOwner.typeUrl || typeof o.address === 'string' && Coin.is(o.balance)); }, isAmino(o: any): o is DenomOwnerAmino { - return o && (o.$typeUrl === DenomOwner.typeUrl || typeof o.address === "string" && Coin.isAmino(o.balance)); + return o && (o.$typeUrl === DenomOwner.typeUrl || typeof o.address === 'string' && Coin.isAmino(o.balance)); }, encode(message: DenomOwner, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.balance !== undefined) { @@ -2508,22 +2508,22 @@ export const DenomOwner = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.balance = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DenomOwner { const message = createBaseDenomOwner(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; return message; }, @@ -2539,7 +2539,7 @@ export const DenomOwner = { }, toAmino(message: DenomOwner): DenomOwnerAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.balance = message.balance ? Coin.toAmino(message.balance) : Coin.toAmino(Coin.fromPartial({})); return obj; }, @@ -2548,7 +2548,7 @@ export const DenomOwner = { }, toAminoMsg(message: DenomOwner): DenomOwnerAminoMsg { return { - type: "cosmos-sdk/DenomOwner", + type: 'cosmos-sdk/DenomOwner', value: DenomOwner.toAmino(message) }; }, @@ -2560,7 +2560,7 @@ export const DenomOwner = { }, toProtoMsg(message: DenomOwner): DenomOwnerProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.DenomOwner", + typeUrl: '/cosmos.bank.v1beta1.DenomOwner', value: DenomOwner.encode(message).finish() }; } @@ -2574,8 +2574,8 @@ function createBaseQueryDenomOwnersResponse(): QueryDenomOwnersResponse { }; } export const QueryDenomOwnersResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", - aminoType: "cosmos-sdk/QueryDenomOwnersResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersResponse', + aminoType: 'cosmos-sdk/QueryDenomOwnersResponse', is(o: any): o is QueryDenomOwnersResponse { return o && (o.$typeUrl === QueryDenomOwnersResponse.typeUrl || Array.isArray(o.denomOwners) && (!o.denomOwners.length || DenomOwner.is(o.denomOwners[0]))); }, @@ -2598,15 +2598,15 @@ export const QueryDenomOwnersResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denomOwners.push(DenomOwner.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denomOwners.push(DenomOwner.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2640,7 +2640,7 @@ export const QueryDenomOwnersResponse = { }, toAminoMsg(message: QueryDenomOwnersResponse): QueryDenomOwnersResponseAminoMsg { return { - type: "cosmos-sdk/QueryDenomOwnersResponse", + type: 'cosmos-sdk/QueryDenomOwnersResponse', value: QueryDenomOwnersResponse.toAmino(message) }; }, @@ -2652,7 +2652,7 @@ export const QueryDenomOwnersResponse = { }, toProtoMsg(message: QueryDenomOwnersResponse): QueryDenomOwnersResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersResponse', value: QueryDenomOwnersResponse.encode(message).finish() }; } @@ -2661,21 +2661,21 @@ GlobalDecoderRegistry.register(QueryDenomOwnersResponse.typeUrl, QueryDenomOwner GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersResponse.aminoType, QueryDenomOwnersResponse.typeUrl); function createBaseQueryDenomOwnersByQueryRequest(): QueryDenomOwnersByQueryRequest { return { - denom: "", + denom: '', pagination: undefined }; } export const QueryDenomOwnersByQueryRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", - aminoType: "cosmos-sdk/QueryDenomOwnersByQueryRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest', + aminoType: 'cosmos-sdk/QueryDenomOwnersByQueryRequest', is(o: any): o is QueryDenomOwnersByQueryRequest { - return o && (o.$typeUrl === QueryDenomOwnersByQueryRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomOwnersByQueryRequest.typeUrl || typeof o.denom === 'string'); }, isAmino(o: any): o is QueryDenomOwnersByQueryRequestAmino { - return o && (o.$typeUrl === QueryDenomOwnersByQueryRequest.typeUrl || typeof o.denom === "string"); + return o && (o.$typeUrl === QueryDenomOwnersByQueryRequest.typeUrl || typeof o.denom === 'string'); }, encode(message: QueryDenomOwnersByQueryRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } if (message.pagination !== undefined) { @@ -2690,22 +2690,22 @@ export const QueryDenomOwnersByQueryRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denom = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDenomOwnersByQueryRequest { const message = createBaseQueryDenomOwnersByQueryRequest(); - message.denom = object.denom ?? ""; + message.denom = object.denom ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -2721,7 +2721,7 @@ export const QueryDenomOwnersByQueryRequest = { }, toAmino(message: QueryDenomOwnersByQueryRequest): QueryDenomOwnersByQueryRequestAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; + obj.denom = message.denom === '' ? undefined : message.denom; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -2730,7 +2730,7 @@ export const QueryDenomOwnersByQueryRequest = { }, toAminoMsg(message: QueryDenomOwnersByQueryRequest): QueryDenomOwnersByQueryRequestAminoMsg { return { - type: "cosmos-sdk/QueryDenomOwnersByQueryRequest", + type: 'cosmos-sdk/QueryDenomOwnersByQueryRequest', value: QueryDenomOwnersByQueryRequest.toAmino(message) }; }, @@ -2742,7 +2742,7 @@ export const QueryDenomOwnersByQueryRequest = { }, toProtoMsg(message: QueryDenomOwnersByQueryRequest): QueryDenomOwnersByQueryRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest', value: QueryDenomOwnersByQueryRequest.encode(message).finish() }; } @@ -2756,8 +2756,8 @@ function createBaseQueryDenomOwnersByQueryResponse(): QueryDenomOwnersByQueryRes }; } export const QueryDenomOwnersByQueryResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", - aminoType: "cosmos-sdk/QueryDenomOwnersByQueryResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse', + aminoType: 'cosmos-sdk/QueryDenomOwnersByQueryResponse', is(o: any): o is QueryDenomOwnersByQueryResponse { return o && (o.$typeUrl === QueryDenomOwnersByQueryResponse.typeUrl || Array.isArray(o.denomOwners) && (!o.denomOwners.length || DenomOwner.is(o.denomOwners[0]))); }, @@ -2780,15 +2780,15 @@ export const QueryDenomOwnersByQueryResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denomOwners.push(DenomOwner.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denomOwners.push(DenomOwner.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2822,7 +2822,7 @@ export const QueryDenomOwnersByQueryResponse = { }, toAminoMsg(message: QueryDenomOwnersByQueryResponse): QueryDenomOwnersByQueryResponseAminoMsg { return { - type: "cosmos-sdk/QueryDenomOwnersByQueryResponse", + type: 'cosmos-sdk/QueryDenomOwnersByQueryResponse', value: QueryDenomOwnersByQueryResponse.toAmino(message) }; }, @@ -2834,7 +2834,7 @@ export const QueryDenomOwnersByQueryResponse = { }, toProtoMsg(message: QueryDenomOwnersByQueryResponse): QueryDenomOwnersByQueryResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", + typeUrl: '/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse', value: QueryDenomOwnersByQueryResponse.encode(message).finish() }; } @@ -2848,13 +2848,13 @@ function createBaseQuerySendEnabledRequest(): QuerySendEnabledRequest { }; } export const QuerySendEnabledRequest = { - typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledRequest", - aminoType: "cosmos-sdk/QuerySendEnabledRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySendEnabledRequest', + aminoType: 'cosmos-sdk/QuerySendEnabledRequest', is(o: any): o is QuerySendEnabledRequest { - return o && (o.$typeUrl === QuerySendEnabledRequest.typeUrl || Array.isArray(o.denoms) && (!o.denoms.length || typeof o.denoms[0] === "string")); + return o && (o.$typeUrl === QuerySendEnabledRequest.typeUrl || Array.isArray(o.denoms) && (!o.denoms.length || typeof o.denoms[0] === 'string')); }, isAmino(o: any): o is QuerySendEnabledRequestAmino { - return o && (o.$typeUrl === QuerySendEnabledRequest.typeUrl || Array.isArray(o.denoms) && (!o.denoms.length || typeof o.denoms[0] === "string")); + return o && (o.$typeUrl === QuerySendEnabledRequest.typeUrl || Array.isArray(o.denoms) && (!o.denoms.length || typeof o.denoms[0] === 'string')); }, encode(message: QuerySendEnabledRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.denoms) { @@ -2872,15 +2872,15 @@ export const QuerySendEnabledRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.denoms.push(reader.string()); - break; - case 99: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.denoms.push(reader.string()); + break; + case 99: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2914,7 +2914,7 @@ export const QuerySendEnabledRequest = { }, toAminoMsg(message: QuerySendEnabledRequest): QuerySendEnabledRequestAminoMsg { return { - type: "cosmos-sdk/QuerySendEnabledRequest", + type: 'cosmos-sdk/QuerySendEnabledRequest', value: QuerySendEnabledRequest.toAmino(message) }; }, @@ -2926,7 +2926,7 @@ export const QuerySendEnabledRequest = { }, toProtoMsg(message: QuerySendEnabledRequest): QuerySendEnabledRequestProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledRequest", + typeUrl: '/cosmos.bank.v1beta1.QuerySendEnabledRequest', value: QuerySendEnabledRequest.encode(message).finish() }; } @@ -2940,8 +2940,8 @@ function createBaseQuerySendEnabledResponse(): QuerySendEnabledResponse { }; } export const QuerySendEnabledResponse = { - typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledResponse", - aminoType: "cosmos-sdk/QuerySendEnabledResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySendEnabledResponse', + aminoType: 'cosmos-sdk/QuerySendEnabledResponse', is(o: any): o is QuerySendEnabledResponse { return o && (o.$typeUrl === QuerySendEnabledResponse.typeUrl || Array.isArray(o.sendEnabled) && (!o.sendEnabled.length || SendEnabled.is(o.sendEnabled[0]))); }, @@ -2964,15 +2964,15 @@ export const QuerySendEnabledResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 99: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); + break; + case 99: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3006,7 +3006,7 @@ export const QuerySendEnabledResponse = { }, toAminoMsg(message: QuerySendEnabledResponse): QuerySendEnabledResponseAminoMsg { return { - type: "cosmos-sdk/QuerySendEnabledResponse", + type: 'cosmos-sdk/QuerySendEnabledResponse', value: QuerySendEnabledResponse.toAmino(message) }; }, @@ -3018,7 +3018,7 @@ export const QuerySendEnabledResponse = { }, toProtoMsg(message: QuerySendEnabledResponse): QuerySendEnabledResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledResponse", + typeUrl: '/cosmos.bank.v1beta1.QuerySendEnabledResponse', value: QuerySendEnabledResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/bank/v1beta1/tx.amino.ts b/libs/cosmos-types/cosmos/bank/v1beta1/tx.amino.ts index f146051f..c860c4ed 100644 --- a/libs/cosmos-types/cosmos/bank/v1beta1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/bank/v1beta1/tx.amino.ts @@ -1,22 +1,22 @@ -import { MsgSend, MsgMultiSend, MsgUpdateParams, MsgSetSendEnabled } from "./tx"; +import { MsgMultiSend, MsgSend, MsgSetSendEnabled,MsgUpdateParams } from './tx'; export const AminoConverter = { - "/cosmos.bank.v1beta1.MsgSend": { - aminoType: "cosmos-sdk/MsgSend", + '/cosmos.bank.v1beta1.MsgSend': { + aminoType: 'cosmos-sdk/MsgSend', toAmino: MsgSend.toAmino, fromAmino: MsgSend.fromAmino }, - "/cosmos.bank.v1beta1.MsgMultiSend": { - aminoType: "cosmos-sdk/MsgMultiSend", + '/cosmos.bank.v1beta1.MsgMultiSend': { + aminoType: 'cosmos-sdk/MsgMultiSend', toAmino: MsgMultiSend.toAmino, fromAmino: MsgMultiSend.fromAmino }, - "/cosmos.bank.v1beta1.MsgUpdateParams": { - aminoType: "cosmos-sdk/x/bank/MsgUpdateParams", + '/cosmos.bank.v1beta1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/x/bank/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino }, - "/cosmos.bank.v1beta1.MsgSetSendEnabled": { - aminoType: "cosmos-sdk/MsgSetSendEnabled", + '/cosmos.bank.v1beta1.MsgSetSendEnabled': { + aminoType: 'cosmos-sdk/MsgSetSendEnabled', toAmino: MsgSetSendEnabled.toAmino, fromAmino: MsgSetSendEnabled.fromAmino } diff --git a/libs/cosmos-types/cosmos/bank/v1beta1/tx.registry.ts b/libs/cosmos-types/cosmos/bank/v1beta1/tx.registry.ts index c1e2b7cf..08bb6277 100644 --- a/libs/cosmos-types/cosmos/bank/v1beta1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/bank/v1beta1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgSend, MsgMultiSend, MsgUpdateParams, MsgSetSendEnabled } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.bank.v1beta1.MsgSend", MsgSend], ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], ["/cosmos.bank.v1beta1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.bank.v1beta1.MsgSetSendEnabled", MsgSetSendEnabled]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgMultiSend, MsgSend, MsgSetSendEnabled,MsgUpdateParams } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.bank.v1beta1.MsgSend', MsgSend], ['/cosmos.bank.v1beta1.MsgMultiSend', MsgMultiSend], ['/cosmos.bank.v1beta1.MsgUpdateParams', MsgUpdateParams], ['/cosmos.bank.v1beta1.MsgSetSendEnabled', MsgSetSendEnabled]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/bank/v1beta1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/bank/v1beta1/tx.rpc.msg.ts index 630595ac..1aeead9a 100644 --- a/libs/cosmos-types/cosmos/bank/v1beta1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/bank/v1beta1/tx.rpc.msg.ts @@ -1,18 +1,18 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgSend, MsgMultiSend, MsgUpdateParams, MsgSetSendEnabled } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgMultiSend, MsgSend, MsgSetSendEnabled,MsgUpdateParams } from './tx'; /** Msg defines the bank Msg service. */ export interface Msg { /** Send defines a method for sending coins from one account to another account. */ - send(signerAddress: string, message: MsgSend, fee: number | StdFee | "auto", memo?: string): Promise; + send(signerAddress: string, message: MsgSend, fee: number | StdFee | 'auto', memo?: string): Promise; /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - multiSend(signerAddress: string, message: MsgMultiSend, fee: number | StdFee | "auto", memo?: string): Promise; + multiSend(signerAddress: string, message: MsgMultiSend, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/bank module parameters. * The authority is defined in the keeper. * * Since: cosmos-sdk 0.47 */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * SetSendEnabled is a governance operation for setting the SendEnabled flag * on any number of Denoms. Only the entries to add or update should be @@ -21,21 +21,21 @@ export interface Msg { * * Since: cosmos-sdk 0.47 */ - setSendEnabled(signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | "auto", memo?: string): Promise; + setSendEnabled(signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the bank Msg service. */ export interface StargateImpl { /** Send defines a method for sending coins from one account to another account. */ - send(signerAddress: string, message: MsgSend, fee: number | StdFee | "auto", memo?: string): Promise; + send(signerAddress: string, message: MsgSend, fee: number | StdFee | 'auto', memo?: string): Promise; /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - multiSend(signerAddress: string, message: MsgMultiSend, fee: number | StdFee | "auto", memo?: string): Promise; + multiSend(signerAddress: string, message: MsgMultiSend, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/bank module parameters. * The authority is defined in the keeper. * * Since: cosmos-sdk 0.47 */ - updateBankParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateBankParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * SetSendEnabled is a governance operation for setting the SendEnabled flag * on any number of Denoms. Only the entries to add or update should be @@ -44,21 +44,21 @@ export interface StargateImpl { * * Since: cosmos-sdk 0.47 */ - setSendEnabled(signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | "auto", memo?: string): Promise; + setSendEnabled(signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the bank Msg service. */ export interface CosmWasmStargateImpl { /** Send defines a method for sending coins from one account to another account. */ - send(signerAddress: string, message: MsgSend, fee: number | StdFee | "auto", memo?: string): Promise; + send(signerAddress: string, message: MsgSend, fee: number | StdFee | 'auto', memo?: string): Promise; /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - multiSend(signerAddress: string, message: MsgMultiSend, fee: number | StdFee | "auto", memo?: string): Promise; + multiSend(signerAddress: string, message: MsgMultiSend, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/bank module parameters. * The authority is defined in the keeper. * * Since: cosmos-sdk 0.47 */ - updateBankParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateBankParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * SetSendEnabled is a governance operation for setting the SendEnabled flag * on any number of Denoms. Only the entries to add or update should be @@ -67,7 +67,7 @@ export interface CosmWasmStargateImpl { * * Since: cosmos-sdk 0.47 */ - setSendEnabled(signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | "auto", memo?: string): Promise; + setSendEnabled(signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -75,7 +75,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* Send defines a method for sending coins from one account to another account. */ - send = async (signerAddress: string, message: MsgSend, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + send = async (signerAddress: string, message: MsgSend, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSend.typeUrl, value: message @@ -83,7 +83,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* MultiSend defines a method for sending coins from some accounts to other accounts. */ - multiSend = async (signerAddress: string, message: MsgMultiSend, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + multiSend = async (signerAddress: string, message: MsgMultiSend, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgMultiSend.typeUrl, value: message @@ -94,7 +94,7 @@ export class MsgClientImpl implements Msg { The authority is defined in the keeper. Since: cosmos-sdk 0.47 */ - updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message @@ -107,7 +107,7 @@ export class MsgClientImpl implements Msg { included in this message, will be left unchanged. Since: cosmos-sdk 0.47 */ - setSendEnabled = async (signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + setSendEnabled = async (signerAddress: string, message: MsgSetSendEnabled, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSetSendEnabled.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/bank/v1beta1/tx.ts b/libs/cosmos-types/cosmos/bank/v1beta1/tx.ts index afc67365..4efece98 100644 --- a/libs/cosmos-types/cosmos/bank/v1beta1/tx.ts +++ b/libs/cosmos-types/cosmos/bank/v1beta1/tx.ts @@ -1,8 +1,8 @@ -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { Input, InputAmino, Output, OutputAmino, Params, ParamsAmino, SendEnabled, SendEnabledAmino } from "./bank"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { Input, InputAmino, Output, OutputAmino, Params, ParamsAmino, SendEnabled, SendEnabledAmino } from './bank'; /** MsgSend represents a message to send coins from one account to another. */ export interface MsgSend { fromAddress: string; @@ -10,7 +10,7 @@ export interface MsgSend { amount: Coin[]; } export interface MsgSendProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgSend"; + typeUrl: '/cosmos.bank.v1beta1.MsgSend'; value: Uint8Array; } /** MsgSend represents a message to send coins from one account to another. */ @@ -20,19 +20,19 @@ export interface MsgSendAmino { amount: CoinAmino[]; } export interface MsgSendAminoMsg { - type: "cosmos-sdk/MsgSend"; + type: 'cosmos-sdk/MsgSend'; value: MsgSendAmino; } /** MsgSendResponse defines the Msg/Send response type. */ export interface MsgSendResponse {} export interface MsgSendResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse"; + typeUrl: '/cosmos.bank.v1beta1.MsgSendResponse'; value: Uint8Array; } /** MsgSendResponse defines the Msg/Send response type. */ export interface MsgSendResponseAmino {} export interface MsgSendResponseAminoMsg { - type: "cosmos-sdk/MsgSendResponse"; + type: 'cosmos-sdk/MsgSendResponse'; value: MsgSendResponseAmino; } /** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ @@ -45,7 +45,7 @@ export interface MsgMultiSend { outputs: Output[]; } export interface MsgMultiSendProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend"; + typeUrl: '/cosmos.bank.v1beta1.MsgMultiSend'; value: Uint8Array; } /** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ @@ -58,19 +58,19 @@ export interface MsgMultiSendAmino { outputs: OutputAmino[]; } export interface MsgMultiSendAminoMsg { - type: "cosmos-sdk/MsgMultiSend"; + type: 'cosmos-sdk/MsgMultiSend'; value: MsgMultiSendAmino; } /** MsgMultiSendResponse defines the Msg/MultiSend response type. */ export interface MsgMultiSendResponse {} export interface MsgMultiSendResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse"; + typeUrl: '/cosmos.bank.v1beta1.MsgMultiSendResponse'; value: Uint8Array; } /** MsgMultiSendResponse defines the Msg/MultiSend response type. */ export interface MsgMultiSendResponseAmino {} export interface MsgMultiSendResponseAminoMsg { - type: "cosmos-sdk/MsgMultiSendResponse"; + type: 'cosmos-sdk/MsgMultiSendResponse'; value: MsgMultiSendResponseAmino; } /** @@ -89,7 +89,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams"; + typeUrl: '/cosmos.bank.v1beta1.MsgUpdateParams'; value: Uint8Array; } /** @@ -108,7 +108,7 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/x/bank/MsgUpdateParams"; + type: 'cosmos-sdk/x/bank/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** @@ -119,7 +119,7 @@ export interface MsgUpdateParamsAminoMsg { */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParamsResponse"; + typeUrl: '/cosmos.bank.v1beta1.MsgUpdateParamsResponse'; value: Uint8Array; } /** @@ -130,7 +130,7 @@ export interface MsgUpdateParamsResponseProtoMsg { */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } /** @@ -156,7 +156,7 @@ export interface MsgSetSendEnabled { useDefaultFor: string[]; } export interface MsgSetSendEnabledProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled"; + typeUrl: '/cosmos.bank.v1beta1.MsgSetSendEnabled'; value: Uint8Array; } /** @@ -182,7 +182,7 @@ export interface MsgSetSendEnabledAmino { use_default_for: string[]; } export interface MsgSetSendEnabledAminoMsg { - type: "cosmos-sdk/MsgSetSendEnabled"; + type: 'cosmos-sdk/MsgSetSendEnabled'; value: MsgSetSendEnabledAmino; } /** @@ -192,7 +192,7 @@ export interface MsgSetSendEnabledAminoMsg { */ export interface MsgSetSendEnabledResponse {} export interface MsgSetSendEnabledResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse"; + typeUrl: '/cosmos.bank.v1beta1.MsgSetSendEnabledResponse'; value: Uint8Array; } /** @@ -202,30 +202,30 @@ export interface MsgSetSendEnabledResponseProtoMsg { */ export interface MsgSetSendEnabledResponseAmino {} export interface MsgSetSendEnabledResponseAminoMsg { - type: "cosmos-sdk/MsgSetSendEnabledResponse"; + type: 'cosmos-sdk/MsgSetSendEnabledResponse'; value: MsgSetSendEnabledResponseAmino; } function createBaseMsgSend(): MsgSend { return { - fromAddress: "", - toAddress: "", + fromAddress: '', + toAddress: '', amount: [] }; } export const MsgSend = { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - aminoType: "cosmos-sdk/MsgSend", + typeUrl: '/cosmos.bank.v1beta1.MsgSend', + aminoType: 'cosmos-sdk/MsgSend', is(o: any): o is MsgSend { - return o && (o.$typeUrl === MsgSend.typeUrl || typeof o.fromAddress === "string" && typeof o.toAddress === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === MsgSend.typeUrl || typeof o.fromAddress === 'string' && typeof o.toAddress === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is MsgSendAmino { - return o && (o.$typeUrl === MsgSend.typeUrl || typeof o.from_address === "string" && typeof o.to_address === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === MsgSend.typeUrl || typeof o.from_address === 'string' && typeof o.to_address === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: MsgSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { + if (message.fromAddress !== '') { writer.uint32(10).string(message.fromAddress); } - if (message.toAddress !== "") { + if (message.toAddress !== '') { writer.uint32(18).string(message.toAddress); } for (const v of message.amount) { @@ -240,26 +240,26 @@ export const MsgSend = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgSend { const message = createBaseMsgSend(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; + message.fromAddress = object.fromAddress ?? ''; + message.toAddress = object.toAddress ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -276,8 +276,8 @@ export const MsgSend = { }, toAmino(message: MsgSend): MsgSendAmino { const obj: any = {}; - obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; - obj.to_address = message.toAddress === "" ? undefined : message.toAddress; + obj.from_address = message.fromAddress === '' ? undefined : message.fromAddress; + obj.to_address = message.toAddress === '' ? undefined : message.toAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -290,7 +290,7 @@ export const MsgSend = { }, toAminoMsg(message: MsgSend): MsgSendAminoMsg { return { - type: "cosmos-sdk/MsgSend", + type: 'cosmos-sdk/MsgSend', value: MsgSend.toAmino(message) }; }, @@ -302,7 +302,7 @@ export const MsgSend = { }, toProtoMsg(message: MsgSend): MsgSendProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", + typeUrl: '/cosmos.bank.v1beta1.MsgSend', value: MsgSend.encode(message).finish() }; } @@ -313,8 +313,8 @@ function createBaseMsgSendResponse(): MsgSendResponse { return {}; } export const MsgSendResponse = { - typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", - aminoType: "cosmos-sdk/MsgSendResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgSendResponse', + aminoType: 'cosmos-sdk/MsgSendResponse', is(o: any): o is MsgSendResponse { return o && o.$typeUrl === MsgSendResponse.typeUrl; }, @@ -331,9 +331,9 @@ export const MsgSendResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -355,7 +355,7 @@ export const MsgSendResponse = { }, toAminoMsg(message: MsgSendResponse): MsgSendResponseAminoMsg { return { - type: "cosmos-sdk/MsgSendResponse", + type: 'cosmos-sdk/MsgSendResponse', value: MsgSendResponse.toAmino(message) }; }, @@ -367,7 +367,7 @@ export const MsgSendResponse = { }, toProtoMsg(message: MsgSendResponse): MsgSendResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgSendResponse', value: MsgSendResponse.encode(message).finish() }; } @@ -381,8 +381,8 @@ function createBaseMsgMultiSend(): MsgMultiSend { }; } export const MsgMultiSend = { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - aminoType: "cosmos-sdk/MsgMultiSend", + typeUrl: '/cosmos.bank.v1beta1.MsgMultiSend', + aminoType: 'cosmos-sdk/MsgMultiSend', is(o: any): o is MsgMultiSend { return o && (o.$typeUrl === MsgMultiSend.typeUrl || Array.isArray(o.inputs) && (!o.inputs.length || Input.is(o.inputs[0])) && Array.isArray(o.outputs) && (!o.outputs.length || Output.is(o.outputs[0]))); }, @@ -405,15 +405,15 @@ export const MsgMultiSend = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.inputs.push(Input.decode(reader, reader.uint32())); - break; - case 2: - message.outputs.push(Output.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.inputs.push(Input.decode(reader, reader.uint32())); + break; + case 2: + message.outputs.push(Output.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -449,7 +449,7 @@ export const MsgMultiSend = { }, toAminoMsg(message: MsgMultiSend): MsgMultiSendAminoMsg { return { - type: "cosmos-sdk/MsgMultiSend", + type: 'cosmos-sdk/MsgMultiSend', value: MsgMultiSend.toAmino(message) }; }, @@ -461,7 +461,7 @@ export const MsgMultiSend = { }, toProtoMsg(message: MsgMultiSend): MsgMultiSendProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", + typeUrl: '/cosmos.bank.v1beta1.MsgMultiSend', value: MsgMultiSend.encode(message).finish() }; } @@ -472,8 +472,8 @@ function createBaseMsgMultiSendResponse(): MsgMultiSendResponse { return {}; } export const MsgMultiSendResponse = { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", - aminoType: "cosmos-sdk/MsgMultiSendResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgMultiSendResponse', + aminoType: 'cosmos-sdk/MsgMultiSendResponse', is(o: any): o is MsgMultiSendResponse { return o && o.$typeUrl === MsgMultiSendResponse.typeUrl; }, @@ -490,9 +490,9 @@ export const MsgMultiSendResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -514,7 +514,7 @@ export const MsgMultiSendResponse = { }, toAminoMsg(message: MsgMultiSendResponse): MsgMultiSendResponseAminoMsg { return { - type: "cosmos-sdk/MsgMultiSendResponse", + type: 'cosmos-sdk/MsgMultiSendResponse', value: MsgMultiSendResponse.toAmino(message) }; }, @@ -526,7 +526,7 @@ export const MsgMultiSendResponse = { }, toProtoMsg(message: MsgMultiSendResponse): MsgMultiSendResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgMultiSendResponse', value: MsgMultiSendResponse.encode(message).finish() }; } @@ -535,21 +535,21 @@ GlobalDecoderRegistry.register(MsgMultiSendResponse.typeUrl, MsgMultiSendRespons GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSendResponse.aminoType, MsgMultiSendResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - authority: "", + authority: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams", - aminoType: "cosmos-sdk/x/bank/MsgUpdateParams", + typeUrl: '/cosmos.bank.v1beta1.MsgUpdateParams', + aminoType: 'cosmos-sdk/x/bank/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.params !== undefined) { @@ -564,22 +564,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -595,7 +595,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({})); return obj; }, @@ -604,7 +604,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/x/bank/MsgUpdateParams", + type: 'cosmos-sdk/x/bank/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -616,7 +616,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams", + typeUrl: '/cosmos.bank.v1beta1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -627,8 +627,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/MsgUpdateParamsResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -645,9 +645,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -669,7 +669,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParamsResponse", + type: 'cosmos-sdk/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -681,7 +681,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParamsResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } @@ -690,22 +690,22 @@ GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsR GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSetSendEnabled(): MsgSetSendEnabled { return { - authority: "", + authority: '', sendEnabled: [], useDefaultFor: [] }; } export const MsgSetSendEnabled = { - typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", - aminoType: "cosmos-sdk/MsgSetSendEnabled", + typeUrl: '/cosmos.bank.v1beta1.MsgSetSendEnabled', + aminoType: 'cosmos-sdk/MsgSetSendEnabled', is(o: any): o is MsgSetSendEnabled { - return o && (o.$typeUrl === MsgSetSendEnabled.typeUrl || typeof o.authority === "string" && Array.isArray(o.sendEnabled) && (!o.sendEnabled.length || SendEnabled.is(o.sendEnabled[0])) && Array.isArray(o.useDefaultFor) && (!o.useDefaultFor.length || typeof o.useDefaultFor[0] === "string")); + return o && (o.$typeUrl === MsgSetSendEnabled.typeUrl || typeof o.authority === 'string' && Array.isArray(o.sendEnabled) && (!o.sendEnabled.length || SendEnabled.is(o.sendEnabled[0])) && Array.isArray(o.useDefaultFor) && (!o.useDefaultFor.length || typeof o.useDefaultFor[0] === 'string')); }, isAmino(o: any): o is MsgSetSendEnabledAmino { - return o && (o.$typeUrl === MsgSetSendEnabled.typeUrl || typeof o.authority === "string" && Array.isArray(o.send_enabled) && (!o.send_enabled.length || SendEnabled.isAmino(o.send_enabled[0])) && Array.isArray(o.use_default_for) && (!o.use_default_for.length || typeof o.use_default_for[0] === "string")); + return o && (o.$typeUrl === MsgSetSendEnabled.typeUrl || typeof o.authority === 'string' && Array.isArray(o.send_enabled) && (!o.send_enabled.length || SendEnabled.isAmino(o.send_enabled[0])) && Array.isArray(o.use_default_for) && (!o.use_default_for.length || typeof o.use_default_for[0] === 'string')); }, encode(message: MsgSetSendEnabled, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } for (const v of message.sendEnabled) { @@ -723,25 +723,25 @@ export const MsgSetSendEnabled = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 3: - message.useDefaultFor.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); + break; + case 3: + message.useDefaultFor.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgSetSendEnabled { const message = createBaseMsgSetSendEnabled(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.sendEnabled = object.sendEnabled?.map(e => SendEnabled.fromPartial(e)) || []; message.useDefaultFor = object.useDefaultFor?.map(e => e) || []; return message; @@ -757,7 +757,7 @@ export const MsgSetSendEnabled = { }, toAmino(message: MsgSetSendEnabled): MsgSetSendEnabledAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; if (message.sendEnabled) { obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e) : undefined); } else { @@ -775,7 +775,7 @@ export const MsgSetSendEnabled = { }, toAminoMsg(message: MsgSetSendEnabled): MsgSetSendEnabledAminoMsg { return { - type: "cosmos-sdk/MsgSetSendEnabled", + type: 'cosmos-sdk/MsgSetSendEnabled', value: MsgSetSendEnabled.toAmino(message) }; }, @@ -787,7 +787,7 @@ export const MsgSetSendEnabled = { }, toProtoMsg(message: MsgSetSendEnabled): MsgSetSendEnabledProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", + typeUrl: '/cosmos.bank.v1beta1.MsgSetSendEnabled', value: MsgSetSendEnabled.encode(message).finish() }; } @@ -798,8 +798,8 @@ function createBaseMsgSetSendEnabledResponse(): MsgSetSendEnabledResponse { return {}; } export const MsgSetSendEnabledResponse = { - typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", - aminoType: "cosmos-sdk/MsgSetSendEnabledResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgSetSendEnabledResponse', + aminoType: 'cosmos-sdk/MsgSetSendEnabledResponse', is(o: any): o is MsgSetSendEnabledResponse { return o && o.$typeUrl === MsgSetSendEnabledResponse.typeUrl; }, @@ -816,9 +816,9 @@ export const MsgSetSendEnabledResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -840,7 +840,7 @@ export const MsgSetSendEnabledResponse = { }, toAminoMsg(message: MsgSetSendEnabledResponse): MsgSetSendEnabledResponseAminoMsg { return { - type: "cosmos-sdk/MsgSetSendEnabledResponse", + type: 'cosmos-sdk/MsgSetSendEnabledResponse', value: MsgSetSendEnabledResponse.toAmino(message) }; }, @@ -852,7 +852,7 @@ export const MsgSetSendEnabledResponse = { }, toProtoMsg(message: MsgSetSendEnabledResponse): MsgSetSendEnabledResponseProtoMsg { return { - typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", + typeUrl: '/cosmos.bank.v1beta1.MsgSetSendEnabledResponse', value: MsgSetSendEnabledResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/base/abci/v1beta1/abci.ts b/libs/cosmos-types/cosmos/base/abci/v1beta1/abci.ts new file mode 100644 index 00000000..662426f9 --- /dev/null +++ b/libs/cosmos-types/cosmos/base/abci/v1beta1/abci.ts @@ -0,0 +1,1698 @@ +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { Any, AnyAmino } from '../../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { Event, EventAmino } from '../../../../tendermint/abci/types'; +import { Block, BlockAmino } from '../../../../tendermint/types/block'; +/** + * TxResponse defines a structure containing relevant tx data and metadata. The + * tags are stringified and the log is JSON decoded. + */ +export interface TxResponse { + /** The block height */ + height: bigint; + /** The transaction hash. */ + txhash: string; + /** Namespace for the Code */ + codespace: string; + /** Response code. */ + code: number; + /** Result bytes, if any. */ + data: string; + /** + * The output of the application's logger (raw string). May be + * non-deterministic. + */ + rawLog: string; + /** The output of the application's logger (typed). May be non-deterministic. */ + logs: ABCIMessageLog[]; + /** Additional information. May be non-deterministic. */ + info: string; + /** Amount of gas requested for transaction. */ + gasWanted: bigint; + /** Amount of gas consumed by transaction. */ + gasUsed: bigint; + /** The request transaction bytes. */ + tx?: Any; + /** + * 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. + */ + timestamp: string; + /** + * 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. 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 + */ + events: Event[]; +} +export interface TxResponseProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.TxResponse'; + value: Uint8Array; +} +/** + * TxResponse defines a structure containing relevant tx data and metadata. The + * tags are stringified and the log is JSON decoded. + */ +export interface TxResponseAmino { + /** The block height */ + height: string; + /** The transaction hash. */ + txhash: string; + /** Namespace for the Code */ + codespace: string; + /** Response code. */ + code: number; + /** Result bytes, if any. */ + data: string; + /** + * The output of the application's logger (raw string). May be + * non-deterministic. + */ + raw_log: string; + /** The output of the application's logger (typed). May be non-deterministic. */ + logs: ABCIMessageLogAmino[]; + /** Additional information. May be non-deterministic. */ + info: string; + /** Amount of gas requested for transaction. */ + gas_wanted: string; + /** Amount of gas consumed by transaction. */ + gas_used: string; + /** The request transaction bytes. */ + tx?: AnyAmino; + /** + * 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. + */ + timestamp: string; + /** + * 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. 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 + */ + events: EventAmino[]; +} +export interface TxResponseAminoMsg { + type: 'cosmos-sdk/TxResponse'; + value: TxResponseAmino; +} +/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ +export interface ABCIMessageLog { + msgIndex: number; + log: string; + /** + * Events contains a slice of Event objects that were emitted during some + * execution. + */ + events: StringEvent[]; +} +export interface ABCIMessageLogProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.ABCIMessageLog'; + value: Uint8Array; +} +/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ +export interface ABCIMessageLogAmino { + msg_index: number; + log: string; + /** + * Events contains a slice of Event objects that were emitted during some + * execution. + */ + events: StringEventAmino[]; +} +export interface ABCIMessageLogAminoMsg { + type: 'cosmos-sdk/ABCIMessageLog'; + value: ABCIMessageLogAmino; +} +/** + * StringEvent defines en Event object wrapper where all the attributes + * contain key/value pairs that are strings instead of raw bytes. + */ +export interface StringEvent { + type: string; + attributes: Attribute[]; +} +export interface StringEventProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.StringEvent'; + value: Uint8Array; +} +/** + * StringEvent defines en Event object wrapper where all the attributes + * contain key/value pairs that are strings instead of raw bytes. + */ +export interface StringEventAmino { + type: string; + attributes: AttributeAmino[]; +} +export interface StringEventAminoMsg { + type: 'cosmos-sdk/StringEvent'; + value: StringEventAmino; +} +/** + * Attribute defines an attribute wrapper where the key and value are + * strings instead of raw bytes. + */ +export interface Attribute { + key: string; + value: string; +} +export interface AttributeProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.Attribute'; + value: Uint8Array; +} +/** + * Attribute defines an attribute wrapper where the key and value are + * strings instead of raw bytes. + */ +export interface AttributeAmino { + key: string; + value: string; +} +export interface AttributeAminoMsg { + type: 'cosmos-sdk/Attribute'; + value: AttributeAmino; +} +/** GasInfo defines tx execution gas context. */ +export interface GasInfo { + /** GasWanted is the maximum units of work we allow this tx to perform. */ + gasWanted: bigint; + /** GasUsed is the amount of gas actually consumed. */ + gasUsed: bigint; +} +export interface GasInfoProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.GasInfo'; + value: Uint8Array; +} +/** GasInfo defines tx execution gas context. */ +export interface GasInfoAmino { + /** GasWanted is the maximum units of work we allow this tx to perform. */ + gas_wanted: string; + /** GasUsed is the amount of gas actually consumed. */ + gas_used: string; +} +export interface GasInfoAminoMsg { + type: 'cosmos-sdk/GasInfo'; + value: GasInfoAmino; +} +/** Result is the union of ResponseFormat and ResponseCheckTx. */ +export interface Result { + /** + * Data is any data returned from message or handler execution. It MUST be + * length prefixed in order to separate data from multiple message executions. + * Deprecated. This field is still populated, but prefer msg_response instead + * because it also contains the Msg response typeURL. + */ + /** @deprecated */ + data: Uint8Array; + /** Log contains the log information from message or handler execution. */ + log: string; + /** + * Events contains a slice of Event objects that were emitted during message + * or handler execution. + */ + events: Event[]; + /** + * msg_responses contains the Msg handler responses type packed in Anys. + * + * Since: cosmos-sdk 0.46 + */ + msgResponses: Any[]; +} +export interface ResultProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.Result'; + value: Uint8Array; +} +/** Result is the union of ResponseFormat and ResponseCheckTx. */ +export interface ResultAmino { + /** + * Data is any data returned from message or handler execution. It MUST be + * length prefixed in order to separate data from multiple message executions. + * Deprecated. This field is still populated, but prefer msg_response instead + * because it also contains the Msg response typeURL. + */ + /** @deprecated */ + data: string; + /** Log contains the log information from message or handler execution. */ + log: string; + /** + * Events contains a slice of Event objects that were emitted during message + * or handler execution. + */ + events: EventAmino[]; + /** + * msg_responses contains the Msg handler responses type packed in Anys. + * + * Since: cosmos-sdk 0.46 + */ + msg_responses: AnyAmino[]; +} +export interface ResultAminoMsg { + type: 'cosmos-sdk/Result'; + value: ResultAmino; +} +/** + * SimulationResponse defines the response generated when a transaction is + * successfully simulated. + */ +export interface SimulationResponse { + gasInfo: GasInfo; + result?: Result; +} +export interface SimulationResponseProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.SimulationResponse'; + value: Uint8Array; +} +/** + * SimulationResponse defines the response generated when a transaction is + * successfully simulated. + */ +export interface SimulationResponseAmino { + gas_info: GasInfoAmino; + result?: ResultAmino; +} +export interface SimulationResponseAminoMsg { + type: 'cosmos-sdk/SimulationResponse'; + value: SimulationResponseAmino; +} +/** + * MsgData defines the data returned in a Result object during message + * execution. + */ +/** @deprecated */ +export interface MsgData { + msgType: string; + data: Uint8Array; +} +export interface MsgDataProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.MsgData'; + value: Uint8Array; +} +/** + * MsgData defines the data returned in a Result object during message + * execution. + */ +/** @deprecated */ +export interface MsgDataAmino { + msg_type: string; + data: string; +} +export interface MsgDataAminoMsg { + type: 'cosmos-sdk/MsgData'; + value: MsgDataAmino; +} +/** + * TxMsgData defines a list of MsgData. A transaction will have a MsgData object + * for each message. + */ +export interface TxMsgData { + /** data field is deprecated and not populated. */ + /** @deprecated */ + data: MsgData[]; + /** + * msg_responses contains the Msg handler responses packed into Anys. + * + * Since: cosmos-sdk 0.46 + */ + msgResponses: Any[]; +} +export interface TxMsgDataProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.TxMsgData'; + value: Uint8Array; +} +/** + * TxMsgData defines a list of MsgData. A transaction will have a MsgData object + * for each message. + */ +export interface TxMsgDataAmino { + /** data field is deprecated and not populated. */ + /** @deprecated */ + data: MsgDataAmino[]; + /** + * msg_responses contains the Msg handler responses packed into Anys. + * + * Since: cosmos-sdk 0.46 + */ + msg_responses: AnyAmino[]; +} +export interface TxMsgDataAminoMsg { + type: 'cosmos-sdk/TxMsgData'; + value: TxMsgDataAmino; +} +/** SearchTxsResult defines a structure for querying txs pageable */ +export interface SearchTxsResult { + /** Count of all txs */ + totalCount: bigint; + /** Count of txs in current page */ + count: bigint; + /** Index of current page, start from 1 */ + pageNumber: bigint; + /** Count of total pages */ + pageTotal: bigint; + /** Max count txs per page */ + limit: bigint; + /** List of txs in current page */ + txs: TxResponse[]; +} +export interface SearchTxsResultProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.SearchTxsResult'; + value: Uint8Array; +} +/** SearchTxsResult defines a structure for querying txs pageable */ +export interface SearchTxsResultAmino { + /** Count of all txs */ + total_count: string; + /** Count of txs in current page */ + count: string; + /** Index of current page, start from 1 */ + page_number: string; + /** Count of total pages */ + page_total: string; + /** Max count txs per page */ + limit: string; + /** List of txs in current page */ + txs: TxResponseAmino[]; +} +export interface SearchTxsResultAminoMsg { + type: 'cosmos-sdk/SearchTxsResult'; + value: SearchTxsResultAmino; +} +/** SearchBlocksResult defines a structure for querying blocks pageable */ +export interface SearchBlocksResult { + /** Count of all blocks */ + totalCount: bigint; + /** Count of blocks in current page */ + count: bigint; + /** Index of current page, start from 1 */ + pageNumber: bigint; + /** Count of total pages */ + pageTotal: bigint; + /** Max count blocks per page */ + limit: bigint; + /** List of blocks in current page */ + blocks: Block[]; +} +export interface SearchBlocksResultProtoMsg { + typeUrl: '/cosmos.base.abci.v1beta1.SearchBlocksResult'; + value: Uint8Array; +} +/** SearchBlocksResult defines a structure for querying blocks pageable */ +export interface SearchBlocksResultAmino { + /** Count of all blocks */ + total_count: string; + /** Count of blocks in current page */ + count: string; + /** Index of current page, start from 1 */ + page_number: string; + /** Count of total pages */ + page_total: string; + /** Max count blocks per page */ + limit: string; + /** List of blocks in current page */ + blocks: BlockAmino[]; +} +export interface SearchBlocksResultAminoMsg { + type: 'cosmos-sdk/SearchBlocksResult'; + value: SearchBlocksResultAmino; +} +function createBaseTxResponse(): TxResponse { + return { + height: BigInt(0), + txhash: '', + codespace: '', + code: 0, + data: '', + rawLog: '', + logs: [], + info: '', + gasWanted: BigInt(0), + gasUsed: BigInt(0), + tx: undefined, + timestamp: '', + events: [] + }; +} +export const TxResponse = { + typeUrl: '/cosmos.base.abci.v1beta1.TxResponse', + aminoType: 'cosmos-sdk/TxResponse', + is(o: any): o is TxResponse { + return o && (o.$typeUrl === TxResponse.typeUrl || typeof o.height === 'bigint' && typeof o.txhash === 'string' && typeof o.codespace === 'string' && typeof o.code === 'number' && typeof o.data === 'string' && typeof o.rawLog === 'string' && Array.isArray(o.logs) && (!o.logs.length || ABCIMessageLog.is(o.logs[0])) && typeof o.info === 'string' && typeof o.gasWanted === 'bigint' && typeof o.gasUsed === 'bigint' && typeof o.timestamp === 'string' && Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0]))); + }, + isAmino(o: any): o is TxResponseAmino { + return o && (o.$typeUrl === TxResponse.typeUrl || typeof o.height === 'bigint' && typeof o.txhash === 'string' && typeof o.codespace === 'string' && typeof o.code === 'number' && typeof o.data === 'string' && typeof o.raw_log === 'string' && Array.isArray(o.logs) && (!o.logs.length || ABCIMessageLog.isAmino(o.logs[0])) && typeof o.info === 'string' && typeof o.gas_wanted === 'bigint' && typeof o.gas_used === 'bigint' && typeof o.timestamp === 'string' && Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0]))); + }, + encode(message: TxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.height !== BigInt(0)) { + writer.uint32(8).int64(message.height); + } + if (message.txhash !== '') { + writer.uint32(18).string(message.txhash); + } + if (message.codespace !== '') { + writer.uint32(26).string(message.codespace); + } + if (message.code !== 0) { + writer.uint32(32).uint32(message.code); + } + if (message.data !== '') { + writer.uint32(42).string(message.data); + } + if (message.rawLog !== '') { + writer.uint32(50).string(message.rawLog); + } + for (const v of message.logs) { + ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim(); + } + if (message.info !== '') { + writer.uint32(66).string(message.info); + } + if (message.gasWanted !== BigInt(0)) { + writer.uint32(72).int64(message.gasWanted); + } + if (message.gasUsed !== BigInt(0)) { + writer.uint32(80).int64(message.gasUsed); + } + if (message.tx !== undefined) { + Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); + } + if (message.timestamp !== '') { + writer.uint32(98).string(message.timestamp); + } + for (const v of message.events) { + Event.encode(v!, writer.uint32(106).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.txhash = reader.string(); + break; + case 3: + message.codespace = reader.string(); + break; + case 4: + message.code = reader.uint32(); + break; + case 5: + message.data = reader.string(); + break; + case 6: + message.rawLog = reader.string(); + break; + case 7: + message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); + break; + case 8: + message.info = reader.string(); + break; + case 9: + message.gasWanted = reader.int64(); + break; + case 10: + message.gasUsed = reader.int64(); + break; + case 11: + message.tx = Any.decode(reader, reader.uint32()); + break; + case 12: + message.timestamp = reader.string(); + break; + case 13: + message.events.push(Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxResponse { + const message = createBaseTxResponse(); + message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); + message.txhash = object.txhash ?? ''; + message.codespace = object.codespace ?? ''; + message.code = object.code ?? 0; + message.data = object.data ?? ''; + message.rawLog = object.rawLog ?? ''; + message.logs = object.logs?.map(e => ABCIMessageLog.fromPartial(e)) || []; + message.info = object.info ?? ''; + message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); + message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); + message.tx = object.tx !== undefined && object.tx !== null ? Any.fromPartial(object.tx) : undefined; + message.timestamp = object.timestamp ?? ''; + message.events = object.events?.map(e => Event.fromPartial(e)) || []; + return message; + }, + fromAmino(object: TxResponseAmino): TxResponse { + const message = createBaseTxResponse(); + if (object.height !== undefined && object.height !== null) { + message.height = BigInt(object.height); + } + if (object.txhash !== undefined && object.txhash !== null) { + message.txhash = object.txhash; + } + if (object.codespace !== undefined && object.codespace !== null) { + message.codespace = object.codespace; + } + if (object.code !== undefined && object.code !== null) { + message.code = object.code; + } + if (object.data !== undefined && object.data !== null) { + message.data = object.data; + } + if (object.raw_log !== undefined && object.raw_log !== null) { + message.rawLog = object.raw_log; + } + message.logs = object.logs?.map(e => ABCIMessageLog.fromAmino(e)) || []; + if (object.info !== undefined && object.info !== null) { + message.info = object.info; + } + if (object.gas_wanted !== undefined && object.gas_wanted !== null) { + message.gasWanted = BigInt(object.gas_wanted); + } + if (object.gas_used !== undefined && object.gas_used !== null) { + message.gasUsed = BigInt(object.gas_used); + } + if (object.tx !== undefined && object.tx !== null) { + message.tx = Any.fromAmino(object.tx); + } + if (object.timestamp !== undefined && object.timestamp !== null) { + message.timestamp = object.timestamp; + } + message.events = object.events?.map(e => Event.fromAmino(e)) || []; + return message; + }, + toAmino(message: TxResponse): TxResponseAmino { + const obj: any = {}; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.txhash = message.txhash === '' ? undefined : message.txhash; + obj.codespace = message.codespace === '' ? undefined : message.codespace; + obj.code = message.code === 0 ? undefined : message.code; + obj.data = message.data === '' ? undefined : message.data; + obj.raw_log = message.rawLog === '' ? undefined : message.rawLog; + if (message.logs) { + obj.logs = message.logs.map(e => e ? ABCIMessageLog.toAmino(e) : undefined); + } else { + obj.logs = message.logs; + } + obj.info = message.info === '' ? undefined : message.info; + obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; + obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; + obj.tx = message.tx ? Any.toAmino(message.tx) : undefined; + obj.timestamp = message.timestamp === '' ? undefined : message.timestamp; + if (message.events) { + obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); + } else { + obj.events = message.events; + } + return obj; + }, + fromAminoMsg(object: TxResponseAminoMsg): TxResponse { + return TxResponse.fromAmino(object.value); + }, + toAminoMsg(message: TxResponse): TxResponseAminoMsg { + return { + type: 'cosmos-sdk/TxResponse', + value: TxResponse.toAmino(message) + }; + }, + fromProtoMsg(message: TxResponseProtoMsg): TxResponse { + return TxResponse.decode(message.value); + }, + toProto(message: TxResponse): Uint8Array { + return TxResponse.encode(message).finish(); + }, + toProtoMsg(message: TxResponse): TxResponseProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.TxResponse', + value: TxResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxResponse.typeUrl, TxResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(TxResponse.aminoType, TxResponse.typeUrl); +function createBaseABCIMessageLog(): ABCIMessageLog { + return { + msgIndex: 0, + log: '', + events: [] + }; +} +export const ABCIMessageLog = { + typeUrl: '/cosmos.base.abci.v1beta1.ABCIMessageLog', + aminoType: 'cosmos-sdk/ABCIMessageLog', + is(o: any): o is ABCIMessageLog { + return o && (o.$typeUrl === ABCIMessageLog.typeUrl || typeof o.msgIndex === 'number' && typeof o.log === 'string' && Array.isArray(o.events) && (!o.events.length || StringEvent.is(o.events[0]))); + }, + isAmino(o: any): o is ABCIMessageLogAmino { + return o && (o.$typeUrl === ABCIMessageLog.typeUrl || typeof o.msg_index === 'number' && typeof o.log === 'string' && Array.isArray(o.events) && (!o.events.length || StringEvent.isAmino(o.events[0]))); + }, + encode(message: ABCIMessageLog, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.msgIndex !== 0) { + writer.uint32(8).uint32(message.msgIndex); + } + if (message.log !== '') { + writer.uint32(18).string(message.log); + } + for (const v of message.events) { + StringEvent.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): ABCIMessageLog { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseABCIMessageLog(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.msgIndex = reader.uint32(); + break; + case 2: + message.log = reader.string(); + break; + case 3: + message.events.push(StringEvent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): ABCIMessageLog { + const message = createBaseABCIMessageLog(); + message.msgIndex = object.msgIndex ?? 0; + message.log = object.log ?? ''; + message.events = object.events?.map(e => StringEvent.fromPartial(e)) || []; + return message; + }, + fromAmino(object: ABCIMessageLogAmino): ABCIMessageLog { + const message = createBaseABCIMessageLog(); + if (object.msg_index !== undefined && object.msg_index !== null) { + message.msgIndex = object.msg_index; + } + if (object.log !== undefined && object.log !== null) { + message.log = object.log; + } + message.events = object.events?.map(e => StringEvent.fromAmino(e)) || []; + return message; + }, + toAmino(message: ABCIMessageLog): ABCIMessageLogAmino { + const obj: any = {}; + obj.msg_index = message.msgIndex ?? 0; + obj.log = message.log === '' ? undefined : message.log; + if (message.events) { + obj.events = message.events.map(e => e ? StringEvent.toAmino(e) : undefined); + } else { + obj.events = message.events; + } + return obj; + }, + fromAminoMsg(object: ABCIMessageLogAminoMsg): ABCIMessageLog { + return ABCIMessageLog.fromAmino(object.value); + }, + toAminoMsg(message: ABCIMessageLog): ABCIMessageLogAminoMsg { + return { + type: 'cosmos-sdk/ABCIMessageLog', + value: ABCIMessageLog.toAmino(message) + }; + }, + fromProtoMsg(message: ABCIMessageLogProtoMsg): ABCIMessageLog { + return ABCIMessageLog.decode(message.value); + }, + toProto(message: ABCIMessageLog): Uint8Array { + return ABCIMessageLog.encode(message).finish(); + }, + toProtoMsg(message: ABCIMessageLog): ABCIMessageLogProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.ABCIMessageLog', + value: ABCIMessageLog.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(ABCIMessageLog.typeUrl, ABCIMessageLog); +GlobalDecoderRegistry.registerAminoProtoMapping(ABCIMessageLog.aminoType, ABCIMessageLog.typeUrl); +function createBaseStringEvent(): StringEvent { + return { + type: '', + attributes: [] + }; +} +export const StringEvent = { + typeUrl: '/cosmos.base.abci.v1beta1.StringEvent', + aminoType: 'cosmos-sdk/StringEvent', + is(o: any): o is StringEvent { + return o && (o.$typeUrl === StringEvent.typeUrl || typeof o.type === 'string' && Array.isArray(o.attributes) && (!o.attributes.length || Attribute.is(o.attributes[0]))); + }, + isAmino(o: any): o is StringEventAmino { + return o && (o.$typeUrl === StringEvent.typeUrl || typeof o.type === 'string' && Array.isArray(o.attributes) && (!o.attributes.length || Attribute.isAmino(o.attributes[0]))); + }, + encode(message: StringEvent, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.type !== '') { + writer.uint32(10).string(message.type); + } + for (const v of message.attributes) { + Attribute.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StringEvent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStringEvent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.attributes.push(Attribute.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StringEvent { + const message = createBaseStringEvent(); + message.type = object.type ?? ''; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + return message; + }, + fromAmino(object: StringEventAmino): StringEvent { + const message = createBaseStringEvent(); + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } + message.attributes = object.attributes?.map(e => Attribute.fromAmino(e)) || []; + return message; + }, + toAmino(message: StringEvent): StringEventAmino { + const obj: any = {}; + obj.type = message.type === '' ? undefined : message.type; + if (message.attributes) { + obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e) : undefined); + } else { + obj.attributes = message.attributes; + } + return obj; + }, + fromAminoMsg(object: StringEventAminoMsg): StringEvent { + return StringEvent.fromAmino(object.value); + }, + toAminoMsg(message: StringEvent): StringEventAminoMsg { + return { + type: 'cosmos-sdk/StringEvent', + value: StringEvent.toAmino(message) + }; + }, + fromProtoMsg(message: StringEventProtoMsg): StringEvent { + return StringEvent.decode(message.value); + }, + toProto(message: StringEvent): Uint8Array { + return StringEvent.encode(message).finish(); + }, + toProtoMsg(message: StringEvent): StringEventProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.StringEvent', + value: StringEvent.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(StringEvent.typeUrl, StringEvent); +GlobalDecoderRegistry.registerAminoProtoMapping(StringEvent.aminoType, StringEvent.typeUrl); +function createBaseAttribute(): Attribute { + return { + key: '', + value: '' + }; +} +export const Attribute = { + typeUrl: '/cosmos.base.abci.v1beta1.Attribute', + aminoType: 'cosmos-sdk/Attribute', + is(o: any): o is Attribute { + return o && (o.$typeUrl === Attribute.typeUrl || typeof o.key === 'string' && typeof o.value === 'string'); + }, + isAmino(o: any): o is AttributeAmino { + return o && (o.$typeUrl === Attribute.typeUrl || typeof o.key === 'string' && typeof o.value === 'string'); + }, + encode(message: Attribute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.key !== '') { + writer.uint32(10).string(message.key); + } + if (message.value !== '') { + writer.uint32(18).string(message.value); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): Attribute { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAttribute(); + while (reader.pos < end) { + const 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; + }, + fromPartial(object: DeepPartial): Attribute { + const message = createBaseAttribute(); + message.key = object.key ?? ''; + message.value = object.value ?? ''; + return message; + }, + fromAmino(object: AttributeAmino): Attribute { + const message = createBaseAttribute(); + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } + return message; + }, + toAmino(message: Attribute): AttributeAmino { + const obj: any = {}; + obj.key = message.key === '' ? undefined : message.key; + obj.value = message.value === '' ? undefined : message.value; + return obj; + }, + fromAminoMsg(object: AttributeAminoMsg): Attribute { + return Attribute.fromAmino(object.value); + }, + toAminoMsg(message: Attribute): AttributeAminoMsg { + return { + type: 'cosmos-sdk/Attribute', + value: Attribute.toAmino(message) + }; + }, + fromProtoMsg(message: AttributeProtoMsg): Attribute { + return Attribute.decode(message.value); + }, + toProto(message: Attribute): Uint8Array { + return Attribute.encode(message).finish(); + }, + toProtoMsg(message: Attribute): AttributeProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.Attribute', + value: Attribute.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(Attribute.typeUrl, Attribute); +GlobalDecoderRegistry.registerAminoProtoMapping(Attribute.aminoType, Attribute.typeUrl); +function createBaseGasInfo(): GasInfo { + return { + gasWanted: BigInt(0), + gasUsed: BigInt(0) + }; +} +export const GasInfo = { + typeUrl: '/cosmos.base.abci.v1beta1.GasInfo', + aminoType: 'cosmos-sdk/GasInfo', + is(o: any): o is GasInfo { + return o && (o.$typeUrl === GasInfo.typeUrl || typeof o.gasWanted === 'bigint' && typeof o.gasUsed === 'bigint'); + }, + isAmino(o: any): o is GasInfoAmino { + return o && (o.$typeUrl === GasInfo.typeUrl || typeof o.gas_wanted === 'bigint' && typeof o.gas_used === 'bigint'); + }, + encode(message: GasInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.gasWanted !== BigInt(0)) { + writer.uint32(8).uint64(message.gasWanted); + } + if (message.gasUsed !== BigInt(0)) { + writer.uint32(16).uint64(message.gasUsed); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): GasInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGasInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasWanted = reader.uint64(); + break; + case 2: + message.gasUsed = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): GasInfo { + const message = createBaseGasInfo(); + message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); + message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); + return message; + }, + fromAmino(object: GasInfoAmino): GasInfo { + const message = createBaseGasInfo(); + if (object.gas_wanted !== undefined && object.gas_wanted !== null) { + message.gasWanted = BigInt(object.gas_wanted); + } + if (object.gas_used !== undefined && object.gas_used !== null) { + message.gasUsed = BigInt(object.gas_used); + } + return message; + }, + toAmino(message: GasInfo): GasInfoAmino { + const obj: any = {}; + obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; + obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; + return obj; + }, + fromAminoMsg(object: GasInfoAminoMsg): GasInfo { + return GasInfo.fromAmino(object.value); + }, + toAminoMsg(message: GasInfo): GasInfoAminoMsg { + return { + type: 'cosmos-sdk/GasInfo', + value: GasInfo.toAmino(message) + }; + }, + fromProtoMsg(message: GasInfoProtoMsg): GasInfo { + return GasInfo.decode(message.value); + }, + toProto(message: GasInfo): Uint8Array { + return GasInfo.encode(message).finish(); + }, + toProtoMsg(message: GasInfo): GasInfoProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.GasInfo', + value: GasInfo.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(GasInfo.typeUrl, GasInfo); +GlobalDecoderRegistry.registerAminoProtoMapping(GasInfo.aminoType, GasInfo.typeUrl); +function createBaseResult(): Result { + return { + data: new Uint8Array(), + log: '', + events: [], + msgResponses: [] + }; +} +export const Result = { + typeUrl: '/cosmos.base.abci.v1beta1.Result', + aminoType: 'cosmos-sdk/Result', + is(o: any): o is Result { + return o && (o.$typeUrl === Result.typeUrl || (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.log === 'string' && Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0])) && Array.isArray(o.msgResponses) && (!o.msgResponses.length || Any.is(o.msgResponses[0]))); + }, + isAmino(o: any): o is ResultAmino { + return o && (o.$typeUrl === Result.typeUrl || (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.log === 'string' && Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0])) && Array.isArray(o.msg_responses) && (!o.msg_responses.length || Any.isAmino(o.msg_responses[0]))); + }, + encode(message: Result, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + if (message.log !== '') { + writer.uint32(18).string(message.log); + } + for (const v of message.events) { + Event.encode(v!, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.msgResponses) { + Any.encode(v!, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): Result { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseResult(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.log = reader.string(); + break; + case 3: + message.events.push(Event.decode(reader, reader.uint32())); + break; + case 4: + message.msgResponses.push(Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): Result { + const message = createBaseResult(); + message.data = object.data ?? new Uint8Array(); + message.log = object.log ?? ''; + message.events = object.events?.map(e => Event.fromPartial(e)) || []; + message.msgResponses = object.msgResponses?.map(e => Any.fromPartial(e)) || []; + return message; + }, + fromAmino(object: ResultAmino): Result { + const message = createBaseResult(); + if (object.data !== undefined && object.data !== null) { + message.data = bytesFromBase64(object.data); + } + if (object.log !== undefined && object.log !== null) { + message.log = object.log; + } + message.events = object.events?.map(e => Event.fromAmino(e)) || []; + message.msgResponses = object.msg_responses?.map(e => Any.fromAmino(e)) || []; + return message; + }, + toAmino(message: Result): ResultAmino { + const obj: any = {}; + obj.data = message.data ? base64FromBytes(message.data) : undefined; + obj.log = message.log === '' ? undefined : message.log; + if (message.events) { + obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); + } else { + obj.events = message.events; + } + if (message.msgResponses) { + obj.msg_responses = message.msgResponses.map(e => e ? Any.toAmino(e) : undefined); + } else { + obj.msg_responses = message.msgResponses; + } + return obj; + }, + fromAminoMsg(object: ResultAminoMsg): Result { + return Result.fromAmino(object.value); + }, + toAminoMsg(message: Result): ResultAminoMsg { + return { + type: 'cosmos-sdk/Result', + value: Result.toAmino(message) + }; + }, + fromProtoMsg(message: ResultProtoMsg): Result { + return Result.decode(message.value); + }, + toProto(message: Result): Uint8Array { + return Result.encode(message).finish(); + }, + toProtoMsg(message: Result): ResultProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.Result', + value: Result.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(Result.typeUrl, Result); +GlobalDecoderRegistry.registerAminoProtoMapping(Result.aminoType, Result.typeUrl); +function createBaseSimulationResponse(): SimulationResponse { + return { + gasInfo: GasInfo.fromPartial({}), + result: undefined + }; +} +export const SimulationResponse = { + typeUrl: '/cosmos.base.abci.v1beta1.SimulationResponse', + aminoType: 'cosmos-sdk/SimulationResponse', + is(o: any): o is SimulationResponse { + return o && (o.$typeUrl === SimulationResponse.typeUrl || GasInfo.is(o.gasInfo)); + }, + isAmino(o: any): o is SimulationResponseAmino { + return o && (o.$typeUrl === SimulationResponse.typeUrl || GasInfo.isAmino(o.gas_info)); + }, + encode(message: SimulationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.gasInfo !== undefined) { + GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); + } + if (message.result !== undefined) { + Result.encode(message.result, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SimulationResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSimulationResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasInfo = GasInfo.decode(reader, reader.uint32()); + break; + case 2: + message.result = Result.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SimulationResponse { + const message = createBaseSimulationResponse(); + message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null ? GasInfo.fromPartial(object.gasInfo) : undefined; + message.result = object.result !== undefined && object.result !== null ? Result.fromPartial(object.result) : undefined; + return message; + }, + fromAmino(object: SimulationResponseAmino): SimulationResponse { + const message = createBaseSimulationResponse(); + if (object.gas_info !== undefined && object.gas_info !== null) { + message.gasInfo = GasInfo.fromAmino(object.gas_info); + } + if (object.result !== undefined && object.result !== null) { + message.result = Result.fromAmino(object.result); + } + return message; + }, + toAmino(message: SimulationResponse): SimulationResponseAmino { + const obj: any = {}; + obj.gas_info = message.gasInfo ? GasInfo.toAmino(message.gasInfo) : undefined; + obj.result = message.result ? Result.toAmino(message.result) : undefined; + return obj; + }, + fromAminoMsg(object: SimulationResponseAminoMsg): SimulationResponse { + return SimulationResponse.fromAmino(object.value); + }, + toAminoMsg(message: SimulationResponse): SimulationResponseAminoMsg { + return { + type: 'cosmos-sdk/SimulationResponse', + value: SimulationResponse.toAmino(message) + }; + }, + fromProtoMsg(message: SimulationResponseProtoMsg): SimulationResponse { + return SimulationResponse.decode(message.value); + }, + toProto(message: SimulationResponse): Uint8Array { + return SimulationResponse.encode(message).finish(); + }, + toProtoMsg(message: SimulationResponse): SimulationResponseProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.SimulationResponse', + value: SimulationResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SimulationResponse.typeUrl, SimulationResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(SimulationResponse.aminoType, SimulationResponse.typeUrl); +function createBaseMsgData(): MsgData { + return { + msgType: '', + data: new Uint8Array() + }; +} +export const MsgData = { + typeUrl: '/cosmos.base.abci.v1beta1.MsgData', + aminoType: 'cosmos-sdk/MsgData', + is(o: any): o is MsgData { + return o && (o.$typeUrl === MsgData.typeUrl || typeof o.msgType === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); + }, + isAmino(o: any): o is MsgDataAmino { + return o && (o.$typeUrl === MsgData.typeUrl || typeof o.msg_type === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); + }, + encode(message: MsgData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.msgType !== '') { + writer.uint32(10).string(message.msgType); + } + if (message.data.length !== 0) { + writer.uint32(18).bytes(message.data); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MsgData { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.msgType = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): MsgData { + const message = createBaseMsgData(); + message.msgType = object.msgType ?? ''; + message.data = object.data ?? new Uint8Array(); + return message; + }, + fromAmino(object: MsgDataAmino): MsgData { + const message = createBaseMsgData(); + if (object.msg_type !== undefined && object.msg_type !== null) { + message.msgType = object.msg_type; + } + if (object.data !== undefined && object.data !== null) { + message.data = bytesFromBase64(object.data); + } + return message; + }, + toAmino(message: MsgData): MsgDataAmino { + const obj: any = {}; + obj.msg_type = message.msgType === '' ? undefined : message.msgType; + obj.data = message.data ? base64FromBytes(message.data) : undefined; + return obj; + }, + fromAminoMsg(object: MsgDataAminoMsg): MsgData { + return MsgData.fromAmino(object.value); + }, + toAminoMsg(message: MsgData): MsgDataAminoMsg { + return { + type: 'cosmos-sdk/MsgData', + value: MsgData.toAmino(message) + }; + }, + fromProtoMsg(message: MsgDataProtoMsg): MsgData { + return MsgData.decode(message.value); + }, + toProto(message: MsgData): Uint8Array { + return MsgData.encode(message).finish(); + }, + toProtoMsg(message: MsgData): MsgDataProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.MsgData', + value: MsgData.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(MsgData.typeUrl, MsgData); +GlobalDecoderRegistry.registerAminoProtoMapping(MsgData.aminoType, MsgData.typeUrl); +function createBaseTxMsgData(): TxMsgData { + return { + data: [], + msgResponses: [] + }; +} +export const TxMsgData = { + typeUrl: '/cosmos.base.abci.v1beta1.TxMsgData', + aminoType: 'cosmos-sdk/TxMsgData', + is(o: any): o is TxMsgData { + return o && (o.$typeUrl === TxMsgData.typeUrl || Array.isArray(o.data) && (!o.data.length || MsgData.is(o.data[0])) && Array.isArray(o.msgResponses) && (!o.msgResponses.length || Any.is(o.msgResponses[0]))); + }, + isAmino(o: any): o is TxMsgDataAmino { + return o && (o.$typeUrl === TxMsgData.typeUrl || Array.isArray(o.data) && (!o.data.length || MsgData.isAmino(o.data[0])) && Array.isArray(o.msg_responses) && (!o.msg_responses.length || Any.isAmino(o.msg_responses[0]))); + }, + encode(message: TxMsgData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.data) { + MsgData.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.msgResponses) { + Any.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxMsgData { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxMsgData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data.push(MsgData.decode(reader, reader.uint32())); + break; + case 2: + message.msgResponses.push(Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxMsgData { + const message = createBaseTxMsgData(); + message.data = object.data?.map(e => MsgData.fromPartial(e)) || []; + message.msgResponses = object.msgResponses?.map(e => Any.fromPartial(e)) || []; + return message; + }, + fromAmino(object: TxMsgDataAmino): TxMsgData { + const message = createBaseTxMsgData(); + message.data = object.data?.map(e => MsgData.fromAmino(e)) || []; + message.msgResponses = object.msg_responses?.map(e => Any.fromAmino(e)) || []; + return message; + }, + toAmino(message: TxMsgData): TxMsgDataAmino { + const obj: any = {}; + if (message.data) { + obj.data = message.data.map(e => e ? MsgData.toAmino(e) : undefined); + } else { + obj.data = message.data; + } + if (message.msgResponses) { + obj.msg_responses = message.msgResponses.map(e => e ? Any.toAmino(e) : undefined); + } else { + obj.msg_responses = message.msgResponses; + } + return obj; + }, + fromAminoMsg(object: TxMsgDataAminoMsg): TxMsgData { + return TxMsgData.fromAmino(object.value); + }, + toAminoMsg(message: TxMsgData): TxMsgDataAminoMsg { + return { + type: 'cosmos-sdk/TxMsgData', + value: TxMsgData.toAmino(message) + }; + }, + fromProtoMsg(message: TxMsgDataProtoMsg): TxMsgData { + return TxMsgData.decode(message.value); + }, + toProto(message: TxMsgData): Uint8Array { + return TxMsgData.encode(message).finish(); + }, + toProtoMsg(message: TxMsgData): TxMsgDataProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.TxMsgData', + value: TxMsgData.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxMsgData.typeUrl, TxMsgData); +GlobalDecoderRegistry.registerAminoProtoMapping(TxMsgData.aminoType, TxMsgData.typeUrl); +function createBaseSearchTxsResult(): SearchTxsResult { + return { + totalCount: BigInt(0), + count: BigInt(0), + pageNumber: BigInt(0), + pageTotal: BigInt(0), + limit: BigInt(0), + txs: [] + }; +} +export const SearchTxsResult = { + typeUrl: '/cosmos.base.abci.v1beta1.SearchTxsResult', + aminoType: 'cosmos-sdk/SearchTxsResult', + is(o: any): o is SearchTxsResult { + return o && (o.$typeUrl === SearchTxsResult.typeUrl || typeof o.totalCount === 'bigint' && typeof o.count === 'bigint' && typeof o.pageNumber === 'bigint' && typeof o.pageTotal === 'bigint' && typeof o.limit === 'bigint' && Array.isArray(o.txs) && (!o.txs.length || TxResponse.is(o.txs[0]))); + }, + isAmino(o: any): o is SearchTxsResultAmino { + return o && (o.$typeUrl === SearchTxsResult.typeUrl || typeof o.total_count === 'bigint' && typeof o.count === 'bigint' && typeof o.page_number === 'bigint' && typeof o.page_total === 'bigint' && typeof o.limit === 'bigint' && Array.isArray(o.txs) && (!o.txs.length || TxResponse.isAmino(o.txs[0]))); + }, + encode(message: SearchTxsResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.totalCount !== BigInt(0)) { + writer.uint32(8).uint64(message.totalCount); + } + if (message.count !== BigInt(0)) { + writer.uint32(16).uint64(message.count); + } + if (message.pageNumber !== BigInt(0)) { + writer.uint32(24).uint64(message.pageNumber); + } + if (message.pageTotal !== BigInt(0)) { + writer.uint32(32).uint64(message.pageTotal); + } + if (message.limit !== BigInt(0)) { + writer.uint32(40).uint64(message.limit); + } + for (const v of message.txs) { + TxResponse.encode(v!, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SearchTxsResult { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchTxsResult(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.totalCount = reader.uint64(); + break; + case 2: + message.count = reader.uint64(); + break; + case 3: + message.pageNumber = reader.uint64(); + break; + case 4: + message.pageTotal = reader.uint64(); + break; + case 5: + message.limit = reader.uint64(); + break; + case 6: + message.txs.push(TxResponse.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SearchTxsResult { + const message = createBaseSearchTxsResult(); + message.totalCount = object.totalCount !== undefined && object.totalCount !== null ? BigInt(object.totalCount.toString()) : BigInt(0); + message.count = object.count !== undefined && object.count !== null ? BigInt(object.count.toString()) : BigInt(0); + message.pageNumber = object.pageNumber !== undefined && object.pageNumber !== null ? BigInt(object.pageNumber.toString()) : BigInt(0); + message.pageTotal = object.pageTotal !== undefined && object.pageTotal !== null ? BigInt(object.pageTotal.toString()) : BigInt(0); + message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); + message.txs = object.txs?.map(e => TxResponse.fromPartial(e)) || []; + return message; + }, + fromAmino(object: SearchTxsResultAmino): SearchTxsResult { + const message = createBaseSearchTxsResult(); + if (object.total_count !== undefined && object.total_count !== null) { + message.totalCount = BigInt(object.total_count); + } + if (object.count !== undefined && object.count !== null) { + message.count = BigInt(object.count); + } + if (object.page_number !== undefined && object.page_number !== null) { + message.pageNumber = BigInt(object.page_number); + } + if (object.page_total !== undefined && object.page_total !== null) { + message.pageTotal = BigInt(object.page_total); + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = BigInt(object.limit); + } + message.txs = object.txs?.map(e => TxResponse.fromAmino(e)) || []; + return message; + }, + toAmino(message: SearchTxsResult): SearchTxsResultAmino { + const obj: any = {}; + obj.total_count = message.totalCount !== BigInt(0) ? message.totalCount.toString() : undefined; + obj.count = message.count !== BigInt(0) ? message.count.toString() : undefined; + obj.page_number = message.pageNumber !== BigInt(0) ? message.pageNumber.toString() : undefined; + obj.page_total = message.pageTotal !== BigInt(0) ? message.pageTotal.toString() : undefined; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; + if (message.txs) { + obj.txs = message.txs.map(e => e ? TxResponse.toAmino(e) : undefined); + } else { + obj.txs = message.txs; + } + return obj; + }, + fromAminoMsg(object: SearchTxsResultAminoMsg): SearchTxsResult { + return SearchTxsResult.fromAmino(object.value); + }, + toAminoMsg(message: SearchTxsResult): SearchTxsResultAminoMsg { + return { + type: 'cosmos-sdk/SearchTxsResult', + value: SearchTxsResult.toAmino(message) + }; + }, + fromProtoMsg(message: SearchTxsResultProtoMsg): SearchTxsResult { + return SearchTxsResult.decode(message.value); + }, + toProto(message: SearchTxsResult): Uint8Array { + return SearchTxsResult.encode(message).finish(); + }, + toProtoMsg(message: SearchTxsResult): SearchTxsResultProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.SearchTxsResult', + value: SearchTxsResult.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SearchTxsResult.typeUrl, SearchTxsResult); +GlobalDecoderRegistry.registerAminoProtoMapping(SearchTxsResult.aminoType, SearchTxsResult.typeUrl); +function createBaseSearchBlocksResult(): SearchBlocksResult { + return { + totalCount: BigInt(0), + count: BigInt(0), + pageNumber: BigInt(0), + pageTotal: BigInt(0), + limit: BigInt(0), + blocks: [] + }; +} +export const SearchBlocksResult = { + typeUrl: '/cosmos.base.abci.v1beta1.SearchBlocksResult', + aminoType: 'cosmos-sdk/SearchBlocksResult', + is(o: any): o is SearchBlocksResult { + return o && (o.$typeUrl === SearchBlocksResult.typeUrl || typeof o.totalCount === 'bigint' && typeof o.count === 'bigint' && typeof o.pageNumber === 'bigint' && typeof o.pageTotal === 'bigint' && typeof o.limit === 'bigint' && Array.isArray(o.blocks) && (!o.blocks.length || Block.is(o.blocks[0]))); + }, + isAmino(o: any): o is SearchBlocksResultAmino { + return o && (o.$typeUrl === SearchBlocksResult.typeUrl || typeof o.total_count === 'bigint' && typeof o.count === 'bigint' && typeof o.page_number === 'bigint' && typeof o.page_total === 'bigint' && typeof o.limit === 'bigint' && Array.isArray(o.blocks) && (!o.blocks.length || Block.isAmino(o.blocks[0]))); + }, + encode(message: SearchBlocksResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.totalCount !== BigInt(0)) { + writer.uint32(8).int64(message.totalCount); + } + if (message.count !== BigInt(0)) { + writer.uint32(16).int64(message.count); + } + if (message.pageNumber !== BigInt(0)) { + writer.uint32(24).int64(message.pageNumber); + } + if (message.pageTotal !== BigInt(0)) { + writer.uint32(32).int64(message.pageTotal); + } + if (message.limit !== BigInt(0)) { + writer.uint32(40).int64(message.limit); + } + for (const v of message.blocks) { + Block.encode(v!, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SearchBlocksResult { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchBlocksResult(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.totalCount = reader.int64(); + break; + case 2: + message.count = reader.int64(); + break; + case 3: + message.pageNumber = reader.int64(); + break; + case 4: + message.pageTotal = reader.int64(); + break; + case 5: + message.limit = reader.int64(); + break; + case 6: + message.blocks.push(Block.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SearchBlocksResult { + const message = createBaseSearchBlocksResult(); + message.totalCount = object.totalCount !== undefined && object.totalCount !== null ? BigInt(object.totalCount.toString()) : BigInt(0); + message.count = object.count !== undefined && object.count !== null ? BigInt(object.count.toString()) : BigInt(0); + message.pageNumber = object.pageNumber !== undefined && object.pageNumber !== null ? BigInt(object.pageNumber.toString()) : BigInt(0); + message.pageTotal = object.pageTotal !== undefined && object.pageTotal !== null ? BigInt(object.pageTotal.toString()) : BigInt(0); + message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); + message.blocks = object.blocks?.map(e => Block.fromPartial(e)) || []; + return message; + }, + fromAmino(object: SearchBlocksResultAmino): SearchBlocksResult { + const message = createBaseSearchBlocksResult(); + if (object.total_count !== undefined && object.total_count !== null) { + message.totalCount = BigInt(object.total_count); + } + if (object.count !== undefined && object.count !== null) { + message.count = BigInt(object.count); + } + if (object.page_number !== undefined && object.page_number !== null) { + message.pageNumber = BigInt(object.page_number); + } + if (object.page_total !== undefined && object.page_total !== null) { + message.pageTotal = BigInt(object.page_total); + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = BigInt(object.limit); + } + message.blocks = object.blocks?.map(e => Block.fromAmino(e)) || []; + return message; + }, + toAmino(message: SearchBlocksResult): SearchBlocksResultAmino { + const obj: any = {}; + obj.total_count = message.totalCount !== BigInt(0) ? message.totalCount.toString() : undefined; + obj.count = message.count !== BigInt(0) ? message.count.toString() : undefined; + obj.page_number = message.pageNumber !== BigInt(0) ? message.pageNumber.toString() : undefined; + obj.page_total = message.pageTotal !== BigInt(0) ? message.pageTotal.toString() : undefined; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; + if (message.blocks) { + obj.blocks = message.blocks.map(e => e ? Block.toAmino(e) : undefined); + } else { + obj.blocks = message.blocks; + } + return obj; + }, + fromAminoMsg(object: SearchBlocksResultAminoMsg): SearchBlocksResult { + return SearchBlocksResult.fromAmino(object.value); + }, + toAminoMsg(message: SearchBlocksResult): SearchBlocksResultAminoMsg { + return { + type: 'cosmos-sdk/SearchBlocksResult', + value: SearchBlocksResult.toAmino(message) + }; + }, + fromProtoMsg(message: SearchBlocksResultProtoMsg): SearchBlocksResult { + return SearchBlocksResult.decode(message.value); + }, + toProto(message: SearchBlocksResult): Uint8Array { + return SearchBlocksResult.encode(message).finish(); + }, + toProtoMsg(message: SearchBlocksResult): SearchBlocksResultProtoMsg { + return { + typeUrl: '/cosmos.base.abci.v1beta1.SearchBlocksResult', + value: SearchBlocksResult.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SearchBlocksResult.typeUrl, SearchBlocksResult); +GlobalDecoderRegistry.registerAminoProtoMapping(SearchBlocksResult.aminoType, SearchBlocksResult.typeUrl); \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/base/query/v1beta1/pagination.ts b/libs/cosmos-types/cosmos/base/query/v1beta1/pagination.ts index 1fbf91d7..38ce9348 100644 --- a/libs/cosmos-types/cosmos/base/query/v1beta1/pagination.ts +++ b/libs/cosmos-types/cosmos/base/query/v1beta1/pagination.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; /** * PageRequest is to be embedded in gRPC request messages for efficient * pagination. Ex: @@ -43,7 +43,7 @@ export interface PageRequest { reverse: boolean; } export interface PageRequestProtoMsg { - typeUrl: "/cosmos.base.query.v1beta1.PageRequest"; + typeUrl: '/cosmos.base.query.v1beta1.PageRequest'; value: Uint8Array; } /** @@ -88,7 +88,7 @@ export interface PageRequestAmino { reverse: boolean; } export interface PageRequestAminoMsg { - type: "cosmos-sdk/PageRequest"; + type: 'cosmos-sdk/PageRequest'; value: PageRequestAmino; } /** @@ -114,7 +114,7 @@ export interface PageResponse { total: bigint; } export interface PageResponseProtoMsg { - typeUrl: "/cosmos.base.query.v1beta1.PageResponse"; + typeUrl: '/cosmos.base.query.v1beta1.PageResponse'; value: Uint8Array; } /** @@ -140,7 +140,7 @@ export interface PageResponseAmino { total: string; } export interface PageResponseAminoMsg { - type: "cosmos-sdk/PageResponse"; + type: 'cosmos-sdk/PageResponse'; value: PageResponseAmino; } function createBasePageRequest(): PageRequest { @@ -153,13 +153,13 @@ function createBasePageRequest(): PageRequest { }; } export const PageRequest = { - typeUrl: "/cosmos.base.query.v1beta1.PageRequest", - aminoType: "cosmos-sdk/PageRequest", + typeUrl: '/cosmos.base.query.v1beta1.PageRequest', + aminoType: 'cosmos-sdk/PageRequest', is(o: any): o is PageRequest { - return o && (o.$typeUrl === PageRequest.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && typeof o.offset === "bigint" && typeof o.limit === "bigint" && typeof o.countTotal === "boolean" && typeof o.reverse === "boolean"); + return o && (o.$typeUrl === PageRequest.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && typeof o.offset === 'bigint' && typeof o.limit === 'bigint' && typeof o.countTotal === 'boolean' && typeof o.reverse === 'boolean'); }, isAmino(o: any): o is PageRequestAmino { - return o && (o.$typeUrl === PageRequest.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && typeof o.offset === "bigint" && typeof o.limit === "bigint" && typeof o.count_total === "boolean" && typeof o.reverse === "boolean"); + return o && (o.$typeUrl === PageRequest.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && typeof o.offset === 'bigint' && typeof o.limit === 'bigint' && typeof o.count_total === 'boolean' && typeof o.reverse === 'boolean'); }, encode(message: PageRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -186,24 +186,24 @@ export const PageRequest = { while (reader.pos < end) { const 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.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + case 2: + message.offset = reader.uint64(); + break; + case 3: + message.limit = reader.uint64(); + break; + case 4: + message.countTotal = reader.bool(); + break; + case 5: + message.reverse = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -250,7 +250,7 @@ export const PageRequest = { }, toAminoMsg(message: PageRequest): PageRequestAminoMsg { return { - type: "cosmos-sdk/PageRequest", + type: 'cosmos-sdk/PageRequest', value: PageRequest.toAmino(message) }; }, @@ -262,7 +262,7 @@ export const PageRequest = { }, toProtoMsg(message: PageRequest): PageRequestProtoMsg { return { - typeUrl: "/cosmos.base.query.v1beta1.PageRequest", + typeUrl: '/cosmos.base.query.v1beta1.PageRequest', value: PageRequest.encode(message).finish() }; } @@ -276,13 +276,13 @@ function createBasePageResponse(): PageResponse { }; } export const PageResponse = { - typeUrl: "/cosmos.base.query.v1beta1.PageResponse", - aminoType: "cosmos-sdk/PageResponse", + typeUrl: '/cosmos.base.query.v1beta1.PageResponse', + aminoType: 'cosmos-sdk/PageResponse', is(o: any): o is PageResponse { - return o && (o.$typeUrl === PageResponse.typeUrl || (o.nextKey instanceof Uint8Array || typeof o.nextKey === "string") && typeof o.total === "bigint"); + return o && (o.$typeUrl === PageResponse.typeUrl || (o.nextKey instanceof Uint8Array || typeof o.nextKey === 'string') && typeof o.total === 'bigint'); }, isAmino(o: any): o is PageResponseAmino { - return o && (o.$typeUrl === PageResponse.typeUrl || (o.next_key instanceof Uint8Array || typeof o.next_key === "string") && typeof o.total === "bigint"); + return o && (o.$typeUrl === PageResponse.typeUrl || (o.next_key instanceof Uint8Array || typeof o.next_key === 'string') && typeof o.total === 'bigint'); }, encode(message: PageResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.nextKey.length !== 0) { @@ -300,15 +300,15 @@ export const PageResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.nextKey = reader.bytes(); + break; + case 2: + message.total = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -340,7 +340,7 @@ export const PageResponse = { }, toAminoMsg(message: PageResponse): PageResponseAminoMsg { return { - type: "cosmos-sdk/PageResponse", + type: 'cosmos-sdk/PageResponse', value: PageResponse.toAmino(message) }; }, @@ -352,7 +352,7 @@ export const PageResponse = { }, toProtoMsg(message: PageResponse): PageResponseProtoMsg { return { - typeUrl: "/cosmos.base.query.v1beta1.PageResponse", + typeUrl: '/cosmos.base.query.v1beta1.PageResponse', value: PageResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/base/v1beta1/coin.ts b/libs/cosmos-types/cosmos/base/v1beta1/coin.ts index 155e8009..4ca80814 100644 --- a/libs/cosmos-types/cosmos/base/v1beta1/coin.ts +++ b/libs/cosmos-types/cosmos/base/v1beta1/coin.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** * Coin defines a token with a denomination and an amount. * @@ -12,7 +12,7 @@ export interface Coin { amount: string; } export interface CoinProtoMsg { - typeUrl: "/cosmos.base.v1beta1.Coin"; + typeUrl: '/cosmos.base.v1beta1.Coin'; value: Uint8Array; } /** @@ -26,7 +26,7 @@ export interface CoinAmino { amount: string; } export interface CoinAminoMsg { - type: "cosmos-sdk/Coin"; + type: 'cosmos-sdk/Coin'; value: CoinAmino; } /** @@ -40,7 +40,7 @@ export interface DecCoin { amount: string; } export interface DecCoinProtoMsg { - typeUrl: "/cosmos.base.v1beta1.DecCoin"; + typeUrl: '/cosmos.base.v1beta1.DecCoin'; value: Uint8Array; } /** @@ -54,7 +54,7 @@ export interface DecCoinAmino { amount: string; } export interface DecCoinAminoMsg { - type: "cosmos-sdk/DecCoin"; + type: 'cosmos-sdk/DecCoin'; value: DecCoinAmino; } /** @@ -65,7 +65,7 @@ export interface IntProto { int: string; } export interface IntProtoProtoMsg { - typeUrl: "/cosmos.base.v1beta1.IntProto"; + typeUrl: '/cosmos.base.v1beta1.IntProto'; value: Uint8Array; } /** @@ -76,7 +76,7 @@ export interface IntProtoAmino { int: string; } export interface IntProtoAminoMsg { - type: "cosmos-sdk/IntProto"; + type: 'cosmos-sdk/IntProto'; value: IntProtoAmino; } /** @@ -87,7 +87,7 @@ export interface DecProto { dec: string; } export interface DecProtoProtoMsg { - typeUrl: "/cosmos.base.v1beta1.DecProto"; + typeUrl: '/cosmos.base.v1beta1.DecProto'; value: Uint8Array; } /** @@ -98,29 +98,29 @@ export interface DecProtoAmino { dec: string; } export interface DecProtoAminoMsg { - type: "cosmos-sdk/DecProto"; + type: 'cosmos-sdk/DecProto'; value: DecProtoAmino; } function createBaseCoin(): Coin { return { - denom: "", - amount: "" + denom: '', + amount: '' }; } export const Coin = { - typeUrl: "/cosmos.base.v1beta1.Coin", - aminoType: "cosmos-sdk/Coin", + typeUrl: '/cosmos.base.v1beta1.Coin', + aminoType: 'cosmos-sdk/Coin', is(o: any): o is Coin { - return o && (o.$typeUrl === Coin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string"); + return o && (o.$typeUrl === Coin.typeUrl || typeof o.denom === 'string' && typeof o.amount === 'string'); }, isAmino(o: any): o is CoinAmino { - return o && (o.$typeUrl === Coin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string"); + return o && (o.$typeUrl === Coin.typeUrl || typeof o.denom === 'string' && typeof o.amount === 'string'); }, encode(message: Coin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } - if (message.amount !== "") { + if (message.amount !== '') { writer.uint32(18).string(message.amount); } return writer; @@ -132,23 +132,23 @@ export const Coin = { while (reader.pos < end) { const 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; + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Coin { const message = createBaseCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; + message.denom = object.denom ?? ''; + message.amount = object.amount ?? ''; return message; }, fromAmino(object: CoinAmino): Coin { @@ -163,8 +163,8 @@ export const Coin = { }, toAmino(message: Coin): CoinAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; - obj.amount = message.amount ?? ""; + obj.denom = message.denom === '' ? undefined : message.denom; + obj.amount = message.amount ?? ''; return obj; }, fromAminoMsg(object: CoinAminoMsg): Coin { @@ -172,7 +172,7 @@ export const Coin = { }, toAminoMsg(message: Coin): CoinAminoMsg { return { - type: "cosmos-sdk/Coin", + type: 'cosmos-sdk/Coin', value: Coin.toAmino(message) }; }, @@ -184,7 +184,7 @@ export const Coin = { }, toProtoMsg(message: Coin): CoinProtoMsg { return { - typeUrl: "/cosmos.base.v1beta1.Coin", + typeUrl: '/cosmos.base.v1beta1.Coin', value: Coin.encode(message).finish() }; } @@ -193,24 +193,24 @@ GlobalDecoderRegistry.register(Coin.typeUrl, Coin); GlobalDecoderRegistry.registerAminoProtoMapping(Coin.aminoType, Coin.typeUrl); function createBaseDecCoin(): DecCoin { return { - denom: "", - amount: "" + denom: '', + amount: '' }; } export const DecCoin = { - typeUrl: "/cosmos.base.v1beta1.DecCoin", - aminoType: "cosmos-sdk/DecCoin", + typeUrl: '/cosmos.base.v1beta1.DecCoin', + aminoType: 'cosmos-sdk/DecCoin', is(o: any): o is DecCoin { - return o && (o.$typeUrl === DecCoin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string"); + return o && (o.$typeUrl === DecCoin.typeUrl || typeof o.denom === 'string' && typeof o.amount === 'string'); }, isAmino(o: any): o is DecCoinAmino { - return o && (o.$typeUrl === DecCoin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string"); + return o && (o.$typeUrl === DecCoin.typeUrl || typeof o.denom === 'string' && typeof o.amount === 'string'); }, encode(message: DecCoin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { + if (message.denom !== '') { writer.uint32(10).string(message.denom); } - if (message.amount !== "") { + if (message.amount !== '') { writer.uint32(18).string(message.amount); } return writer; @@ -222,23 +222,23 @@ export const DecCoin = { while (reader.pos < end) { const 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; + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DecCoin { const message = createBaseDecCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; + message.denom = object.denom ?? ''; + message.amount = object.amount ?? ''; return message; }, fromAmino(object: DecCoinAmino): DecCoin { @@ -253,8 +253,8 @@ export const DecCoin = { }, toAmino(message: DecCoin): DecCoinAmino { const obj: any = {}; - obj.denom = message.denom === "" ? undefined : message.denom; - obj.amount = message.amount === "" ? undefined : message.amount; + obj.denom = message.denom === '' ? undefined : message.denom; + obj.amount = message.amount === '' ? undefined : message.amount; return obj; }, fromAminoMsg(object: DecCoinAminoMsg): DecCoin { @@ -262,7 +262,7 @@ export const DecCoin = { }, toAminoMsg(message: DecCoin): DecCoinAminoMsg { return { - type: "cosmos-sdk/DecCoin", + type: 'cosmos-sdk/DecCoin', value: DecCoin.toAmino(message) }; }, @@ -274,7 +274,7 @@ export const DecCoin = { }, toProtoMsg(message: DecCoin): DecCoinProtoMsg { return { - typeUrl: "/cosmos.base.v1beta1.DecCoin", + typeUrl: '/cosmos.base.v1beta1.DecCoin', value: DecCoin.encode(message).finish() }; } @@ -283,20 +283,20 @@ GlobalDecoderRegistry.register(DecCoin.typeUrl, DecCoin); GlobalDecoderRegistry.registerAminoProtoMapping(DecCoin.aminoType, DecCoin.typeUrl); function createBaseIntProto(): IntProto { return { - int: "" + int: '' }; } export const IntProto = { - typeUrl: "/cosmos.base.v1beta1.IntProto", - aminoType: "cosmos-sdk/IntProto", + typeUrl: '/cosmos.base.v1beta1.IntProto', + aminoType: 'cosmos-sdk/IntProto', is(o: any): o is IntProto { - return o && (o.$typeUrl === IntProto.typeUrl || typeof o.int === "string"); + return o && (o.$typeUrl === IntProto.typeUrl || typeof o.int === 'string'); }, isAmino(o: any): o is IntProtoAmino { - return o && (o.$typeUrl === IntProto.typeUrl || typeof o.int === "string"); + return o && (o.$typeUrl === IntProto.typeUrl || typeof o.int === 'string'); }, encode(message: IntProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.int !== "") { + if (message.int !== '') { writer.uint32(10).string(message.int); } return writer; @@ -308,19 +308,19 @@ export const IntProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.int = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): IntProto { const message = createBaseIntProto(); - message.int = object.int ?? ""; + message.int = object.int ?? ''; return message; }, fromAmino(object: IntProtoAmino): IntProto { @@ -332,7 +332,7 @@ export const IntProto = { }, toAmino(message: IntProto): IntProtoAmino { const obj: any = {}; - obj.int = message.int === "" ? undefined : message.int; + obj.int = message.int === '' ? undefined : message.int; return obj; }, fromAminoMsg(object: IntProtoAminoMsg): IntProto { @@ -340,7 +340,7 @@ export const IntProto = { }, toAminoMsg(message: IntProto): IntProtoAminoMsg { return { - type: "cosmos-sdk/IntProto", + type: 'cosmos-sdk/IntProto', value: IntProto.toAmino(message) }; }, @@ -352,7 +352,7 @@ export const IntProto = { }, toProtoMsg(message: IntProto): IntProtoProtoMsg { return { - typeUrl: "/cosmos.base.v1beta1.IntProto", + typeUrl: '/cosmos.base.v1beta1.IntProto', value: IntProto.encode(message).finish() }; } @@ -361,20 +361,20 @@ GlobalDecoderRegistry.register(IntProto.typeUrl, IntProto); GlobalDecoderRegistry.registerAminoProtoMapping(IntProto.aminoType, IntProto.typeUrl); function createBaseDecProto(): DecProto { return { - dec: "" + dec: '' }; } export const DecProto = { - typeUrl: "/cosmos.base.v1beta1.DecProto", - aminoType: "cosmos-sdk/DecProto", + typeUrl: '/cosmos.base.v1beta1.DecProto', + aminoType: 'cosmos-sdk/DecProto', is(o: any): o is DecProto { - return o && (o.$typeUrl === DecProto.typeUrl || typeof o.dec === "string"); + return o && (o.$typeUrl === DecProto.typeUrl || typeof o.dec === 'string'); }, isAmino(o: any): o is DecProtoAmino { - return o && (o.$typeUrl === DecProto.typeUrl || typeof o.dec === "string"); + return o && (o.$typeUrl === DecProto.typeUrl || typeof o.dec === 'string'); }, encode(message: DecProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.dec !== "") { + if (message.dec !== '') { writer.uint32(10).string(message.dec); } return writer; @@ -386,19 +386,19 @@ export const DecProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.dec = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DecProto { const message = createBaseDecProto(); - message.dec = object.dec ?? ""; + message.dec = object.dec ?? ''; return message; }, fromAmino(object: DecProtoAmino): DecProto { @@ -410,7 +410,7 @@ export const DecProto = { }, toAmino(message: DecProto): DecProtoAmino { const obj: any = {}; - obj.dec = message.dec === "" ? undefined : message.dec; + obj.dec = message.dec === '' ? undefined : message.dec; return obj; }, fromAminoMsg(object: DecProtoAminoMsg): DecProto { @@ -418,7 +418,7 @@ export const DecProto = { }, toAminoMsg(message: DecProto): DecProtoAminoMsg { return { - type: "cosmos-sdk/DecProto", + type: 'cosmos-sdk/DecProto', value: DecProto.toAmino(message) }; }, @@ -430,7 +430,7 @@ export const DecProto = { }, toProtoMsg(message: DecProto): DecProtoProtoMsg { return { - typeUrl: "/cosmos.base.v1beta1.DecProto", + typeUrl: '/cosmos.base.v1beta1.DecProto', value: DecProto.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/client.ts b/libs/cosmos-types/cosmos/client.ts index 8a087825..db898dc2 100644 --- a/libs/cosmos-types/cosmos/client.ts +++ b/libs/cosmos-types/cosmos/client.ts @@ -1,24 +1,25 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as cosmosAuthzV1beta1TxRegistry from "./authz/v1beta1/tx.registry"; -import * as cosmosBankV1beta1TxRegistry from "./bank/v1beta1/tx.registry"; -import * as cosmosDistributionV1beta1TxRegistry from "./distribution/v1beta1/tx.registry"; -import * as cosmosFeegrantV1beta1TxRegistry from "./feegrant/v1beta1/tx.registry"; -import * as cosmosGovV1TxRegistry from "./gov/v1/tx.registry"; -import * as cosmosGovV1beta1TxRegistry from "./gov/v1beta1/tx.registry"; -import * as cosmosGroupV1TxRegistry from "./group/v1/tx.registry"; -import * as cosmosStakingV1beta1TxRegistry from "./staking/v1beta1/tx.registry"; -import * as cosmosVestingV1beta1TxRegistry from "./vesting/v1beta1/tx.registry"; -import * as cosmosAuthzV1beta1TxAmino from "./authz/v1beta1/tx.amino"; -import * as cosmosBankV1beta1TxAmino from "./bank/v1beta1/tx.amino"; -import * as cosmosDistributionV1beta1TxAmino from "./distribution/v1beta1/tx.amino"; -import * as cosmosFeegrantV1beta1TxAmino from "./feegrant/v1beta1/tx.amino"; -import * as cosmosGovV1TxAmino from "./gov/v1/tx.amino"; -import * as cosmosGovV1beta1TxAmino from "./gov/v1beta1/tx.amino"; -import * as cosmosGroupV1TxAmino from "./group/v1/tx.amino"; -import * as cosmosStakingV1beta1TxAmino from "./staking/v1beta1/tx.amino"; -import * as cosmosVestingV1beta1TxAmino from "./vesting/v1beta1/tx.amino"; +import { GeneratedType, OfflineSigner,Registry } from '@cosmjs/proto-signing'; +import { AminoTypes, SigningStargateClient } from '@cosmjs/stargate'; +import { HttpEndpoint } from '@cosmjs/tendermint-rpc'; + +import * as cosmosAuthzV1beta1TxAmino from './authz/v1beta1/tx.amino'; +import * as cosmosAuthzV1beta1TxRegistry from './authz/v1beta1/tx.registry'; +import * as cosmosBankV1beta1TxAmino from './bank/v1beta1/tx.amino'; +import * as cosmosBankV1beta1TxRegistry from './bank/v1beta1/tx.registry'; +import * as cosmosDistributionV1beta1TxAmino from './distribution/v1beta1/tx.amino'; +import * as cosmosDistributionV1beta1TxRegistry from './distribution/v1beta1/tx.registry'; +import * as cosmosFeegrantV1beta1TxAmino from './feegrant/v1beta1/tx.amino'; +import * as cosmosFeegrantV1beta1TxRegistry from './feegrant/v1beta1/tx.registry'; +import * as cosmosGovV1TxAmino from './gov/v1/tx.amino'; +import * as cosmosGovV1TxRegistry from './gov/v1/tx.registry'; +import * as cosmosGovV1beta1TxAmino from './gov/v1beta1/tx.amino'; +import * as cosmosGovV1beta1TxRegistry from './gov/v1beta1/tx.registry'; +import * as cosmosGroupV1TxAmino from './group/v1/tx.amino'; +import * as cosmosGroupV1TxRegistry from './group/v1/tx.registry'; +import * as cosmosStakingV1beta1TxAmino from './staking/v1beta1/tx.amino'; +import * as cosmosStakingV1beta1TxRegistry from './staking/v1beta1/tx.registry'; +import * as cosmosVestingV1beta1TxAmino from './vesting/v1beta1/tx.amino'; +import * as cosmosVestingV1beta1TxRegistry from './vesting/v1beta1/tx.registry'; export const cosmosAminoConverters = { ...cosmosAuthzV1beta1TxAmino.AminoConverter, ...cosmosBankV1beta1TxAmino.AminoConverter, diff --git a/libs/cosmos-types/cosmos/crypto/ed25519/keys.ts b/libs/cosmos-types/cosmos/crypto/ed25519/keys.ts index 6f544d77..33f0c097 100644 --- a/libs/cosmos-types/cosmos/crypto/ed25519/keys.ts +++ b/libs/cosmos-types/cosmos/crypto/ed25519/keys.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. * It's needed for Any serialization and SDK compatibility. @@ -12,7 +12,7 @@ export interface PubKey { key: Uint8Array; } export interface PubKeyProtoMsg { - typeUrl: "/cosmos.crypto.ed25519.PubKey"; + typeUrl: '/cosmos.crypto.ed25519.PubKey'; value: Uint8Array; } /** @@ -26,7 +26,7 @@ export interface PubKeyAmino { key: string; } export interface PubKeyAminoMsg { - type: "tendermint/PubKeyEd25519"; + type: 'tendermint/PubKeyEd25519'; value: PubKeyAmino; } /** @@ -37,7 +37,7 @@ export interface PrivKey { key: Uint8Array; } export interface PrivKeyProtoMsg { - typeUrl: "/cosmos.crypto.ed25519.PrivKey"; + typeUrl: '/cosmos.crypto.ed25519.PrivKey'; value: Uint8Array; } /** @@ -48,7 +48,7 @@ export interface PrivKeyAmino { key: string; } export interface PrivKeyAminoMsg { - type: "tendermint/PrivKeyEd25519"; + type: 'tendermint/PrivKeyEd25519'; value: PrivKeyAmino; } function createBasePubKey(): PubKey { @@ -57,13 +57,13 @@ function createBasePubKey(): PubKey { }; } export const PubKey = { - typeUrl: "/cosmos.crypto.ed25519.PubKey", - aminoType: "tendermint/PubKeyEd25519", + typeUrl: '/cosmos.crypto.ed25519.PubKey', + aminoType: 'tendermint/PubKeyEd25519', is(o: any): o is PubKey { - return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is PubKeyAmino { - return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -78,12 +78,12 @@ export const PubKey = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -110,7 +110,7 @@ export const PubKey = { }, toAminoMsg(message: PubKey): PubKeyAminoMsg { return { - type: "tendermint/PubKeyEd25519", + type: 'tendermint/PubKeyEd25519', value: PubKey.toAmino(message) }; }, @@ -122,7 +122,7 @@ export const PubKey = { }, toProtoMsg(message: PubKey): PubKeyProtoMsg { return { - typeUrl: "/cosmos.crypto.ed25519.PubKey", + typeUrl: '/cosmos.crypto.ed25519.PubKey', value: PubKey.encode(message).finish() }; } @@ -135,13 +135,13 @@ function createBasePrivKey(): PrivKey { }; } export const PrivKey = { - typeUrl: "/cosmos.crypto.ed25519.PrivKey", - aminoType: "tendermint/PrivKeyEd25519", + typeUrl: '/cosmos.crypto.ed25519.PrivKey', + aminoType: 'tendermint/PrivKeyEd25519', is(o: any): o is PrivKey { - return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is PrivKeyAmino { - return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -156,12 +156,12 @@ export const PrivKey = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -188,7 +188,7 @@ export const PrivKey = { }, toAminoMsg(message: PrivKey): PrivKeyAminoMsg { return { - type: "tendermint/PrivKeyEd25519", + type: 'tendermint/PrivKeyEd25519', value: PrivKey.toAmino(message) }; }, @@ -200,7 +200,7 @@ export const PrivKey = { }, toProtoMsg(message: PrivKey): PrivKeyProtoMsg { return { - typeUrl: "/cosmos.crypto.ed25519.PrivKey", + typeUrl: '/cosmos.crypto.ed25519.PrivKey', value: PrivKey.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/crypto/multisig/v1beta1/multisig.ts b/libs/cosmos-types/cosmos/crypto/multisig/v1beta1/multisig.ts new file mode 100644 index 00000000..cadd9814 --- /dev/null +++ b/libs/cosmos-types/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -0,0 +1,225 @@ +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +/** + * 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. + */ +export interface MultiSignature { + signatures: Uint8Array[]; +} +export interface MultiSignatureProtoMsg { + typeUrl: '/cosmos.crypto.multisig.v1beta1.MultiSignature'; + value: Uint8Array; +} +/** + * 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. + */ +export interface MultiSignatureAmino { + signatures: string[]; +} +export interface MultiSignatureAminoMsg { + type: 'cosmos-sdk/MultiSignature'; + value: MultiSignatureAmino; +} +/** + * 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. + */ +export interface CompactBitArray { + extraBitsStored: number; + elems: Uint8Array; +} +export interface CompactBitArrayProtoMsg { + typeUrl: '/cosmos.crypto.multisig.v1beta1.CompactBitArray'; + value: Uint8Array; +} +/** + * 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. + */ +export interface CompactBitArrayAmino { + extra_bits_stored: number; + elems: string; +} +export interface CompactBitArrayAminoMsg { + type: 'cosmos-sdk/CompactBitArray'; + value: CompactBitArrayAmino; +} +function createBaseMultiSignature(): MultiSignature { + return { + signatures: [] + }; +} +export const MultiSignature = { + typeUrl: '/cosmos.crypto.multisig.v1beta1.MultiSignature', + aminoType: 'cosmos-sdk/MultiSignature', + is(o: any): o is MultiSignature { + return o && (o.$typeUrl === MultiSignature.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === 'string')); + }, + isAmino(o: any): o is MultiSignatureAmino { + return o && (o.$typeUrl === MultiSignature.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === 'string')); + }, + encode(message: MultiSignature, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.signatures) { + writer.uint32(10).bytes(v!); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MultiSignature { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMultiSignature(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): MultiSignature { + const message = createBaseMultiSignature(); + message.signatures = object.signatures?.map(e => e) || []; + return message; + }, + fromAmino(object: MultiSignatureAmino): MultiSignature { + const message = createBaseMultiSignature(); + message.signatures = object.signatures?.map(e => bytesFromBase64(e)) || []; + return message; + }, + toAmino(message: MultiSignature): MultiSignatureAmino { + const obj: any = {}; + if (message.signatures) { + obj.signatures = message.signatures.map(e => base64FromBytes(e)); + } else { + obj.signatures = message.signatures; + } + return obj; + }, + fromAminoMsg(object: MultiSignatureAminoMsg): MultiSignature { + return MultiSignature.fromAmino(object.value); + }, + toAminoMsg(message: MultiSignature): MultiSignatureAminoMsg { + return { + type: 'cosmos-sdk/MultiSignature', + value: MultiSignature.toAmino(message) + }; + }, + fromProtoMsg(message: MultiSignatureProtoMsg): MultiSignature { + return MultiSignature.decode(message.value); + }, + toProto(message: MultiSignature): Uint8Array { + return MultiSignature.encode(message).finish(); + }, + toProtoMsg(message: MultiSignature): MultiSignatureProtoMsg { + return { + typeUrl: '/cosmos.crypto.multisig.v1beta1.MultiSignature', + value: MultiSignature.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(MultiSignature.typeUrl, MultiSignature); +GlobalDecoderRegistry.registerAminoProtoMapping(MultiSignature.aminoType, MultiSignature.typeUrl); +function createBaseCompactBitArray(): CompactBitArray { + return { + extraBitsStored: 0, + elems: new Uint8Array() + }; +} +export const CompactBitArray = { + typeUrl: '/cosmos.crypto.multisig.v1beta1.CompactBitArray', + aminoType: 'cosmos-sdk/CompactBitArray', + is(o: any): o is CompactBitArray { + return o && (o.$typeUrl === CompactBitArray.typeUrl || typeof o.extraBitsStored === 'number' && (o.elems instanceof Uint8Array || typeof o.elems === 'string')); + }, + isAmino(o: any): o is CompactBitArrayAmino { + return o && (o.$typeUrl === CompactBitArray.typeUrl || typeof o.extra_bits_stored === 'number' && (o.elems instanceof Uint8Array || typeof o.elems === 'string')); + }, + encode(message: CompactBitArray, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.extraBitsStored !== 0) { + writer.uint32(8).uint32(message.extraBitsStored); + } + if (message.elems.length !== 0) { + writer.uint32(18).bytes(message.elems); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): CompactBitArray { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCompactBitArray(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.extraBitsStored = reader.uint32(); + break; + case 2: + message.elems = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): CompactBitArray { + const message = createBaseCompactBitArray(); + message.extraBitsStored = object.extraBitsStored ?? 0; + message.elems = object.elems ?? new Uint8Array(); + return message; + }, + fromAmino(object: CompactBitArrayAmino): CompactBitArray { + const message = createBaseCompactBitArray(); + if (object.extra_bits_stored !== undefined && object.extra_bits_stored !== null) { + message.extraBitsStored = object.extra_bits_stored; + } + if (object.elems !== undefined && object.elems !== null) { + message.elems = bytesFromBase64(object.elems); + } + return message; + }, + toAmino(message: CompactBitArray): CompactBitArrayAmino { + const obj: any = {}; + obj.extra_bits_stored = message.extraBitsStored === 0 ? undefined : message.extraBitsStored; + obj.elems = message.elems ? base64FromBytes(message.elems) : undefined; + return obj; + }, + fromAminoMsg(object: CompactBitArrayAminoMsg): CompactBitArray { + return CompactBitArray.fromAmino(object.value); + }, + toAminoMsg(message: CompactBitArray): CompactBitArrayAminoMsg { + return { + type: 'cosmos-sdk/CompactBitArray', + value: CompactBitArray.toAmino(message) + }; + }, + fromProtoMsg(message: CompactBitArrayProtoMsg): CompactBitArray { + return CompactBitArray.decode(message.value); + }, + toProto(message: CompactBitArray): Uint8Array { + return CompactBitArray.encode(message).finish(); + }, + toProtoMsg(message: CompactBitArray): CompactBitArrayProtoMsg { + return { + typeUrl: '/cosmos.crypto.multisig.v1beta1.CompactBitArray', + value: CompactBitArray.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(CompactBitArray.typeUrl, CompactBitArray); +GlobalDecoderRegistry.registerAminoProtoMapping(CompactBitArray.aminoType, CompactBitArray.typeUrl); \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/crypto/secp256k1/keys.ts b/libs/cosmos-types/cosmos/crypto/secp256k1/keys.ts index c0fdd0ac..88593206 100644 --- a/libs/cosmos-types/cosmos/crypto/secp256k1/keys.ts +++ b/libs/cosmos-types/cosmos/crypto/secp256k1/keys.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** * PubKey defines a secp256k1 public key * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte @@ -12,7 +12,7 @@ export interface PubKey { key: Uint8Array; } export interface PubKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256k1.PubKey"; + typeUrl: '/cosmos.crypto.secp256k1.PubKey'; value: Uint8Array; } /** @@ -26,7 +26,7 @@ export interface PubKeyAmino { key: string; } export interface PubKeyAminoMsg { - type: "tendermint/PubKeySecp256k1"; + type: 'tendermint/PubKeySecp256k1'; value: PubKeyAmino; } /** PrivKey defines a secp256k1 private key. */ @@ -34,7 +34,7 @@ export interface PrivKey { key: Uint8Array; } export interface PrivKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256k1.PrivKey"; + typeUrl: '/cosmos.crypto.secp256k1.PrivKey'; value: Uint8Array; } /** PrivKey defines a secp256k1 private key. */ @@ -42,7 +42,7 @@ export interface PrivKeyAmino { key: string; } export interface PrivKeyAminoMsg { - type: "tendermint/PrivKeySecp256k1"; + type: 'tendermint/PrivKeySecp256k1'; value: PrivKeyAmino; } function createBasePubKey(): PubKey { @@ -51,13 +51,13 @@ function createBasePubKey(): PubKey { }; } export const PubKey = { - typeUrl: "/cosmos.crypto.secp256k1.PubKey", - aminoType: "tendermint/PubKeySecp256k1", + typeUrl: '/cosmos.crypto.secp256k1.PubKey', + aminoType: 'tendermint/PubKeySecp256k1', is(o: any): o is PubKey { - return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is PubKeyAmino { - return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -72,12 +72,12 @@ export const PubKey = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -104,7 +104,7 @@ export const PubKey = { }, toAminoMsg(message: PubKey): PubKeyAminoMsg { return { - type: "tendermint/PubKeySecp256k1", + type: 'tendermint/PubKeySecp256k1', value: PubKey.toAmino(message) }; }, @@ -116,7 +116,7 @@ export const PubKey = { }, toProtoMsg(message: PubKey): PubKeyProtoMsg { return { - typeUrl: "/cosmos.crypto.secp256k1.PubKey", + typeUrl: '/cosmos.crypto.secp256k1.PubKey', value: PubKey.encode(message).finish() }; } @@ -129,13 +129,13 @@ function createBasePrivKey(): PrivKey { }; } export const PrivKey = { - typeUrl: "/cosmos.crypto.secp256k1.PrivKey", - aminoType: "tendermint/PrivKeySecp256k1", + typeUrl: '/cosmos.crypto.secp256k1.PrivKey', + aminoType: 'tendermint/PrivKeySecp256k1', is(o: any): o is PrivKey { - return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is PrivKeyAmino { - return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -150,12 +150,12 @@ export const PrivKey = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -182,7 +182,7 @@ export const PrivKey = { }, toAminoMsg(message: PrivKey): PrivKeyAminoMsg { return { - type: "tendermint/PrivKeySecp256k1", + type: 'tendermint/PrivKeySecp256k1', value: PrivKey.toAmino(message) }; }, @@ -194,7 +194,7 @@ export const PrivKey = { }, toProtoMsg(message: PrivKey): PrivKeyProtoMsg { return { - typeUrl: "/cosmos.crypto.secp256k1.PrivKey", + typeUrl: '/cosmos.crypto.secp256k1.PrivKey', value: PrivKey.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/crypto/secp256r1/keys.ts b/libs/cosmos-types/cosmos/crypto/secp256r1/keys.ts index 6b1edf68..dbb88a35 100644 --- a/libs/cosmos-types/cosmos/crypto/secp256r1/keys.ts +++ b/libs/cosmos-types/cosmos/crypto/secp256r1/keys.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** PubKey defines a secp256r1 ECDSA public key. */ export interface PubKey { /** @@ -10,7 +10,7 @@ export interface PubKey { key: Uint8Array; } export interface PubKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256r1.PubKey"; + typeUrl: '/cosmos.crypto.secp256r1.PubKey'; value: Uint8Array; } /** PubKey defines a secp256r1 ECDSA public key. */ @@ -22,7 +22,7 @@ export interface PubKeyAmino { key: string; } export interface PubKeyAminoMsg { - type: "cosmos-sdk/PubKey"; + type: 'cosmos-sdk/PubKey'; value: PubKeyAmino; } /** PrivKey defines a secp256r1 ECDSA private key. */ @@ -31,7 +31,7 @@ export interface PrivKey { secret: Uint8Array; } export interface PrivKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256r1.PrivKey"; + typeUrl: '/cosmos.crypto.secp256r1.PrivKey'; value: Uint8Array; } /** PrivKey defines a secp256r1 ECDSA private key. */ @@ -40,7 +40,7 @@ export interface PrivKeyAmino { secret: string; } export interface PrivKeyAminoMsg { - type: "cosmos-sdk/PrivKey"; + type: 'cosmos-sdk/PrivKey'; value: PrivKeyAmino; } function createBasePubKey(): PubKey { @@ -49,13 +49,13 @@ function createBasePubKey(): PubKey { }; } export const PubKey = { - typeUrl: "/cosmos.crypto.secp256r1.PubKey", - aminoType: "cosmos-sdk/PubKey", + typeUrl: '/cosmos.crypto.secp256r1.PubKey', + aminoType: 'cosmos-sdk/PubKey', is(o: any): o is PubKey { - return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is PubKeyAmino { - return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -70,12 +70,12 @@ export const PubKey = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -102,7 +102,7 @@ export const PubKey = { }, toAminoMsg(message: PubKey): PubKeyAminoMsg { return { - type: "cosmos-sdk/PubKey", + type: 'cosmos-sdk/PubKey', value: PubKey.toAmino(message) }; }, @@ -114,7 +114,7 @@ export const PubKey = { }, toProtoMsg(message: PubKey): PubKeyProtoMsg { return { - typeUrl: "/cosmos.crypto.secp256r1.PubKey", + typeUrl: '/cosmos.crypto.secp256r1.PubKey', value: PubKey.encode(message).finish() }; } @@ -127,13 +127,13 @@ function createBasePrivKey(): PrivKey { }; } export const PrivKey = { - typeUrl: "/cosmos.crypto.secp256r1.PrivKey", - aminoType: "cosmos-sdk/PrivKey", + typeUrl: '/cosmos.crypto.secp256r1.PrivKey', + aminoType: 'cosmos-sdk/PrivKey', is(o: any): o is PrivKey { - return o && (o.$typeUrl === PrivKey.typeUrl || o.secret instanceof Uint8Array || typeof o.secret === "string"); + return o && (o.$typeUrl === PrivKey.typeUrl || o.secret instanceof Uint8Array || typeof o.secret === 'string'); }, isAmino(o: any): o is PrivKeyAmino { - return o && (o.$typeUrl === PrivKey.typeUrl || o.secret instanceof Uint8Array || typeof o.secret === "string"); + return o && (o.$typeUrl === PrivKey.typeUrl || o.secret instanceof Uint8Array || typeof o.secret === 'string'); }, encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.secret.length !== 0) { @@ -148,12 +148,12 @@ export const PrivKey = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.secret = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.secret = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -180,7 +180,7 @@ export const PrivKey = { }, toAminoMsg(message: PrivKey): PrivKeyAminoMsg { return { - type: "cosmos-sdk/PrivKey", + type: 'cosmos-sdk/PrivKey', value: PrivKey.toAmino(message) }; }, @@ -192,7 +192,7 @@ export const PrivKey = { }, toProtoMsg(message: PrivKey): PrivKeyProtoMsg { return { - typeUrl: "/cosmos.crypto.secp256r1.PrivKey", + typeUrl: '/cosmos.crypto.secp256r1.PrivKey', value: PrivKey.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/distribution/v1beta1/distribution.ts b/libs/cosmos-types/cosmos/distribution/v1beta1/distribution.ts index 1e0dce0a..bbc2ca68 100644 --- a/libs/cosmos-types/cosmos/distribution/v1beta1/distribution.ts +++ b/libs/cosmos-types/cosmos/distribution/v1beta1/distribution.ts @@ -1,7 +1,7 @@ -import { DecCoin, DecCoinAmino, Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino,DecCoin, DecCoinAmino } from '../../base/v1beta1/coin'; /** Params defines the set of params for the distribution module. */ export interface Params { communityTax: string; @@ -20,7 +20,7 @@ export interface Params { withdrawAddrEnabled: boolean; } export interface ParamsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.Params"; + typeUrl: '/cosmos.distribution.v1beta1.Params'; value: Uint8Array; } /** Params defines the set of params for the distribution module. */ @@ -41,7 +41,7 @@ export interface ParamsAmino { withdraw_addr_enabled: boolean; } export interface ParamsAminoMsg { - type: "cosmos-sdk/x/distribution/Params"; + type: 'cosmos-sdk/x/distribution/Params'; value: ParamsAmino; } /** @@ -63,7 +63,7 @@ export interface ValidatorHistoricalRewards { referenceCount: number; } export interface ValidatorHistoricalRewardsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards"; + typeUrl: '/cosmos.distribution.v1beta1.ValidatorHistoricalRewards'; value: Uint8Array; } /** @@ -85,7 +85,7 @@ export interface ValidatorHistoricalRewardsAmino { reference_count: number; } export interface ValidatorHistoricalRewardsAminoMsg { - type: "cosmos-sdk/ValidatorHistoricalRewards"; + type: 'cosmos-sdk/ValidatorHistoricalRewards'; value: ValidatorHistoricalRewardsAmino; } /** @@ -98,7 +98,7 @@ export interface ValidatorCurrentRewards { period: bigint; } export interface ValidatorCurrentRewardsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards"; + typeUrl: '/cosmos.distribution.v1beta1.ValidatorCurrentRewards'; value: Uint8Array; } /** @@ -111,7 +111,7 @@ export interface ValidatorCurrentRewardsAmino { period: string; } export interface ValidatorCurrentRewardsAminoMsg { - type: "cosmos-sdk/ValidatorCurrentRewards"; + type: 'cosmos-sdk/ValidatorCurrentRewards'; value: ValidatorCurrentRewardsAmino; } /** @@ -122,7 +122,7 @@ export interface ValidatorAccumulatedCommission { commission: DecCoin[]; } export interface ValidatorAccumulatedCommissionProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission"; + typeUrl: '/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission'; value: Uint8Array; } /** @@ -133,7 +133,7 @@ export interface ValidatorAccumulatedCommissionAmino { commission: DecCoinAmino[]; } export interface ValidatorAccumulatedCommissionAminoMsg { - type: "cosmos-sdk/ValidatorAccumulatedCommission"; + type: 'cosmos-sdk/ValidatorAccumulatedCommission'; value: ValidatorAccumulatedCommissionAmino; } /** @@ -144,7 +144,7 @@ export interface ValidatorOutstandingRewards { rewards: DecCoin[]; } export interface ValidatorOutstandingRewardsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards"; + typeUrl: '/cosmos.distribution.v1beta1.ValidatorOutstandingRewards'; value: Uint8Array; } /** @@ -155,7 +155,7 @@ export interface ValidatorOutstandingRewardsAmino { rewards: DecCoinAmino[]; } export interface ValidatorOutstandingRewardsAminoMsg { - type: "cosmos-sdk/ValidatorOutstandingRewards"; + type: 'cosmos-sdk/ValidatorOutstandingRewards'; value: ValidatorOutstandingRewardsAmino; } /** @@ -169,7 +169,7 @@ export interface ValidatorSlashEvent { fraction: string; } export interface ValidatorSlashEventProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent"; + typeUrl: '/cosmos.distribution.v1beta1.ValidatorSlashEvent'; value: Uint8Array; } /** @@ -183,7 +183,7 @@ export interface ValidatorSlashEventAmino { fraction: string; } export interface ValidatorSlashEventAminoMsg { - type: "cosmos-sdk/ValidatorSlashEvent"; + type: 'cosmos-sdk/ValidatorSlashEvent'; value: ValidatorSlashEventAmino; } /** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ @@ -191,7 +191,7 @@ export interface ValidatorSlashEvents { validatorSlashEvents: ValidatorSlashEvent[]; } export interface ValidatorSlashEventsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents"; + typeUrl: '/cosmos.distribution.v1beta1.ValidatorSlashEvents'; value: Uint8Array; } /** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ @@ -199,7 +199,7 @@ export interface ValidatorSlashEventsAmino { validator_slash_events: ValidatorSlashEventAmino[]; } export interface ValidatorSlashEventsAminoMsg { - type: "cosmos-sdk/ValidatorSlashEvents"; + type: 'cosmos-sdk/ValidatorSlashEvents'; value: ValidatorSlashEventsAmino; } /** FeePool is the global fee pool for distribution. */ @@ -207,7 +207,7 @@ export interface FeePool { communityPool: DecCoin[]; } export interface FeePoolProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.FeePool"; + typeUrl: '/cosmos.distribution.v1beta1.FeePool'; value: Uint8Array; } /** FeePool is the global fee pool for distribution. */ @@ -215,7 +215,7 @@ export interface FeePoolAmino { community_pool: DecCoinAmino[]; } export interface FeePoolAminoMsg { - type: "cosmos-sdk/FeePool"; + type: 'cosmos-sdk/FeePool'; value: FeePoolAmino; } /** @@ -236,7 +236,7 @@ export interface CommunityPoolSpendProposal { amount: Coin[]; } export interface CommunityPoolSpendProposalProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal"; + typeUrl: '/cosmos.distribution.v1beta1.CommunityPoolSpendProposal'; value: Uint8Array; } /** @@ -257,7 +257,7 @@ export interface CommunityPoolSpendProposalAmino { amount: CoinAmino[]; } export interface CommunityPoolSpendProposalAminoMsg { - type: "cosmos-sdk/CommunityPoolSpendProposal"; + type: 'cosmos-sdk/CommunityPoolSpendProposal'; value: CommunityPoolSpendProposalAmino; } /** @@ -274,7 +274,7 @@ export interface DelegatorStartingInfo { height: bigint; } export interface DelegatorStartingInfoProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo"; + typeUrl: '/cosmos.distribution.v1beta1.DelegatorStartingInfo'; value: Uint8Array; } /** @@ -291,7 +291,7 @@ export interface DelegatorStartingInfoAmino { height: string; } export interface DelegatorStartingInfoAminoMsg { - type: "cosmos-sdk/DelegatorStartingInfo"; + type: 'cosmos-sdk/DelegatorStartingInfo'; value: DelegatorStartingInfoAmino; } /** @@ -303,7 +303,7 @@ export interface DelegationDelegatorReward { reward: DecCoin[]; } export interface DelegationDelegatorRewardProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward"; + typeUrl: '/cosmos.distribution.v1beta1.DelegationDelegatorReward'; value: Uint8Array; } /** @@ -315,7 +315,7 @@ export interface DelegationDelegatorRewardAmino { reward: DecCoinAmino[]; } export interface DelegationDelegatorRewardAminoMsg { - type: "cosmos-sdk/DelegationDelegatorReward"; + type: 'cosmos-sdk/DelegationDelegatorReward'; value: DelegationDelegatorRewardAmino; } /** @@ -330,7 +330,7 @@ export interface CommunityPoolSpendProposalWithDeposit { deposit: string; } export interface CommunityPoolSpendProposalWithDepositProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit"; + typeUrl: '/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit'; value: Uint8Array; } /** @@ -345,34 +345,34 @@ export interface CommunityPoolSpendProposalWithDepositAmino { deposit: string; } export interface CommunityPoolSpendProposalWithDepositAminoMsg { - type: "cosmos-sdk/CommunityPoolSpendProposalWithDeposit"; + type: 'cosmos-sdk/CommunityPoolSpendProposalWithDeposit'; value: CommunityPoolSpendProposalWithDepositAmino; } function createBaseParams(): Params { return { - communityTax: "", - baseProposerReward: "", - bonusProposerReward: "", + communityTax: '', + baseProposerReward: '', + bonusProposerReward: '', withdrawAddrEnabled: false }; } export const Params = { - typeUrl: "/cosmos.distribution.v1beta1.Params", - aminoType: "cosmos-sdk/x/distribution/Params", + typeUrl: '/cosmos.distribution.v1beta1.Params', + aminoType: 'cosmos-sdk/x/distribution/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || typeof o.communityTax === "string" && typeof o.baseProposerReward === "string" && typeof o.bonusProposerReward === "string" && typeof o.withdrawAddrEnabled === "boolean"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.communityTax === 'string' && typeof o.baseProposerReward === 'string' && typeof o.bonusProposerReward === 'string' && typeof o.withdrawAddrEnabled === 'boolean'); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || typeof o.community_tax === "string" && typeof o.base_proposer_reward === "string" && typeof o.bonus_proposer_reward === "string" && typeof o.withdraw_addr_enabled === "boolean"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.community_tax === 'string' && typeof o.base_proposer_reward === 'string' && typeof o.bonus_proposer_reward === 'string' && typeof o.withdraw_addr_enabled === 'boolean'); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.communityTax !== "") { + if (message.communityTax !== '') { writer.uint32(10).string(message.communityTax); } - if (message.baseProposerReward !== "") { + if (message.baseProposerReward !== '') { writer.uint32(18).string(message.baseProposerReward); } - if (message.bonusProposerReward !== "") { + if (message.bonusProposerReward !== '') { writer.uint32(26).string(message.bonusProposerReward); } if (message.withdrawAddrEnabled === true) { @@ -387,30 +387,30 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.communityTax = reader.string(); - break; - case 2: - message.baseProposerReward = reader.string(); - break; - case 3: - message.bonusProposerReward = reader.string(); - break; - case 4: - message.withdrawAddrEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.communityTax = reader.string(); + break; + case 2: + message.baseProposerReward = reader.string(); + break; + case 3: + message.bonusProposerReward = reader.string(); + break; + case 4: + message.withdrawAddrEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.communityTax = object.communityTax ?? ""; - message.baseProposerReward = object.baseProposerReward ?? ""; - message.bonusProposerReward = object.bonusProposerReward ?? ""; + message.communityTax = object.communityTax ?? ''; + message.baseProposerReward = object.baseProposerReward ?? ''; + message.bonusProposerReward = object.bonusProposerReward ?? ''; message.withdrawAddrEnabled = object.withdrawAddrEnabled ?? false; return message; }, @@ -432,9 +432,9 @@ export const Params = { }, toAmino(message: Params): ParamsAmino { const obj: any = {}; - obj.community_tax = message.communityTax ?? ""; - obj.base_proposer_reward = message.baseProposerReward ?? ""; - obj.bonus_proposer_reward = message.bonusProposerReward ?? ""; + obj.community_tax = message.communityTax ?? ''; + obj.base_proposer_reward = message.baseProposerReward ?? ''; + obj.bonus_proposer_reward = message.bonusProposerReward ?? ''; obj.withdraw_addr_enabled = message.withdrawAddrEnabled === false ? undefined : message.withdrawAddrEnabled; return obj; }, @@ -443,7 +443,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/x/distribution/Params", + type: 'cosmos-sdk/x/distribution/Params', value: Params.toAmino(message) }; }, @@ -455,7 +455,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.Params", + typeUrl: '/cosmos.distribution.v1beta1.Params', value: Params.encode(message).finish() }; } @@ -469,13 +469,13 @@ function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards { }; } export const ValidatorHistoricalRewards = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", - aminoType: "cosmos-sdk/ValidatorHistoricalRewards", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorHistoricalRewards', + aminoType: 'cosmos-sdk/ValidatorHistoricalRewards', is(o: any): o is ValidatorHistoricalRewards { - return o && (o.$typeUrl === ValidatorHistoricalRewards.typeUrl || Array.isArray(o.cumulativeRewardRatio) && (!o.cumulativeRewardRatio.length || DecCoin.is(o.cumulativeRewardRatio[0])) && typeof o.referenceCount === "number"); + return o && (o.$typeUrl === ValidatorHistoricalRewards.typeUrl || Array.isArray(o.cumulativeRewardRatio) && (!o.cumulativeRewardRatio.length || DecCoin.is(o.cumulativeRewardRatio[0])) && typeof o.referenceCount === 'number'); }, isAmino(o: any): o is ValidatorHistoricalRewardsAmino { - return o && (o.$typeUrl === ValidatorHistoricalRewards.typeUrl || Array.isArray(o.cumulative_reward_ratio) && (!o.cumulative_reward_ratio.length || DecCoin.isAmino(o.cumulative_reward_ratio[0])) && typeof o.reference_count === "number"); + return o && (o.$typeUrl === ValidatorHistoricalRewards.typeUrl || Array.isArray(o.cumulative_reward_ratio) && (!o.cumulative_reward_ratio.length || DecCoin.isAmino(o.cumulative_reward_ratio[0])) && typeof o.reference_count === 'number'); }, encode(message: ValidatorHistoricalRewards, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.cumulativeRewardRatio) { @@ -493,15 +493,15 @@ export const ValidatorHistoricalRewards = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cumulativeRewardRatio.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.referenceCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.cumulativeRewardRatio.push(DecCoin.decode(reader, reader.uint32())); + break; + case 2: + message.referenceCount = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -535,7 +535,7 @@ export const ValidatorHistoricalRewards = { }, toAminoMsg(message: ValidatorHistoricalRewards): ValidatorHistoricalRewardsAminoMsg { return { - type: "cosmos-sdk/ValidatorHistoricalRewards", + type: 'cosmos-sdk/ValidatorHistoricalRewards', value: ValidatorHistoricalRewards.toAmino(message) }; }, @@ -547,7 +547,7 @@ export const ValidatorHistoricalRewards = { }, toProtoMsg(message: ValidatorHistoricalRewards): ValidatorHistoricalRewardsProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorHistoricalRewards', value: ValidatorHistoricalRewards.encode(message).finish() }; } @@ -561,13 +561,13 @@ function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards { }; } export const ValidatorCurrentRewards = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", - aminoType: "cosmos-sdk/ValidatorCurrentRewards", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorCurrentRewards', + aminoType: 'cosmos-sdk/ValidatorCurrentRewards', is(o: any): o is ValidatorCurrentRewards { - return o && (o.$typeUrl === ValidatorCurrentRewards.typeUrl || Array.isArray(o.rewards) && (!o.rewards.length || DecCoin.is(o.rewards[0])) && typeof o.period === "bigint"); + return o && (o.$typeUrl === ValidatorCurrentRewards.typeUrl || Array.isArray(o.rewards) && (!o.rewards.length || DecCoin.is(o.rewards[0])) && typeof o.period === 'bigint'); }, isAmino(o: any): o is ValidatorCurrentRewardsAmino { - return o && (o.$typeUrl === ValidatorCurrentRewards.typeUrl || Array.isArray(o.rewards) && (!o.rewards.length || DecCoin.isAmino(o.rewards[0])) && typeof o.period === "bigint"); + return o && (o.$typeUrl === ValidatorCurrentRewards.typeUrl || Array.isArray(o.rewards) && (!o.rewards.length || DecCoin.isAmino(o.rewards[0])) && typeof o.period === 'bigint'); }, encode(message: ValidatorCurrentRewards, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.rewards) { @@ -585,15 +585,15 @@ export const ValidatorCurrentRewards = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.period = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.rewards.push(DecCoin.decode(reader, reader.uint32())); + break; + case 2: + message.period = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -627,7 +627,7 @@ export const ValidatorCurrentRewards = { }, toAminoMsg(message: ValidatorCurrentRewards): ValidatorCurrentRewardsAminoMsg { return { - type: "cosmos-sdk/ValidatorCurrentRewards", + type: 'cosmos-sdk/ValidatorCurrentRewards', value: ValidatorCurrentRewards.toAmino(message) }; }, @@ -639,7 +639,7 @@ export const ValidatorCurrentRewards = { }, toProtoMsg(message: ValidatorCurrentRewards): ValidatorCurrentRewardsProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorCurrentRewards', value: ValidatorCurrentRewards.encode(message).finish() }; } @@ -652,8 +652,8 @@ function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommiss }; } export const ValidatorAccumulatedCommission = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", - aminoType: "cosmos-sdk/ValidatorAccumulatedCommission", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission', + aminoType: 'cosmos-sdk/ValidatorAccumulatedCommission', is(o: any): o is ValidatorAccumulatedCommission { return o && (o.$typeUrl === ValidatorAccumulatedCommission.typeUrl || Array.isArray(o.commission) && (!o.commission.length || DecCoin.is(o.commission[0]))); }, @@ -673,12 +673,12 @@ export const ValidatorAccumulatedCommission = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.commission.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.commission.push(DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -707,7 +707,7 @@ export const ValidatorAccumulatedCommission = { }, toAminoMsg(message: ValidatorAccumulatedCommission): ValidatorAccumulatedCommissionAminoMsg { return { - type: "cosmos-sdk/ValidatorAccumulatedCommission", + type: 'cosmos-sdk/ValidatorAccumulatedCommission', value: ValidatorAccumulatedCommission.toAmino(message) }; }, @@ -719,7 +719,7 @@ export const ValidatorAccumulatedCommission = { }, toProtoMsg(message: ValidatorAccumulatedCommission): ValidatorAccumulatedCommissionProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission', value: ValidatorAccumulatedCommission.encode(message).finish() }; } @@ -732,8 +732,8 @@ function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards { }; } export const ValidatorOutstandingRewards = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", - aminoType: "cosmos-sdk/ValidatorOutstandingRewards", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorOutstandingRewards', + aminoType: 'cosmos-sdk/ValidatorOutstandingRewards', is(o: any): o is ValidatorOutstandingRewards { return o && (o.$typeUrl === ValidatorOutstandingRewards.typeUrl || Array.isArray(o.rewards) && (!o.rewards.length || DecCoin.is(o.rewards[0]))); }, @@ -753,12 +753,12 @@ export const ValidatorOutstandingRewards = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.rewards.push(DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -787,7 +787,7 @@ export const ValidatorOutstandingRewards = { }, toAminoMsg(message: ValidatorOutstandingRewards): ValidatorOutstandingRewardsAminoMsg { return { - type: "cosmos-sdk/ValidatorOutstandingRewards", + type: 'cosmos-sdk/ValidatorOutstandingRewards', value: ValidatorOutstandingRewards.toAmino(message) }; }, @@ -799,7 +799,7 @@ export const ValidatorOutstandingRewards = { }, toProtoMsg(message: ValidatorOutstandingRewards): ValidatorOutstandingRewardsProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorOutstandingRewards', value: ValidatorOutstandingRewards.encode(message).finish() }; } @@ -809,23 +809,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorOutstandingRewards.amin function createBaseValidatorSlashEvent(): ValidatorSlashEvent { return { validatorPeriod: BigInt(0), - fraction: "" + fraction: '' }; } export const ValidatorSlashEvent = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", - aminoType: "cosmos-sdk/ValidatorSlashEvent", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorSlashEvent', + aminoType: 'cosmos-sdk/ValidatorSlashEvent', is(o: any): o is ValidatorSlashEvent { - return o && (o.$typeUrl === ValidatorSlashEvent.typeUrl || typeof o.validatorPeriod === "bigint" && typeof o.fraction === "string"); + return o && (o.$typeUrl === ValidatorSlashEvent.typeUrl || typeof o.validatorPeriod === 'bigint' && typeof o.fraction === 'string'); }, isAmino(o: any): o is ValidatorSlashEventAmino { - return o && (o.$typeUrl === ValidatorSlashEvent.typeUrl || typeof o.validator_period === "bigint" && typeof o.fraction === "string"); + return o && (o.$typeUrl === ValidatorSlashEvent.typeUrl || typeof o.validator_period === 'bigint' && typeof o.fraction === 'string'); }, encode(message: ValidatorSlashEvent, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.validatorPeriod !== BigInt(0)) { writer.uint32(8).uint64(message.validatorPeriod); } - if (message.fraction !== "") { + if (message.fraction !== '') { writer.uint32(18).string(message.fraction); } return writer; @@ -837,15 +837,15 @@ export const ValidatorSlashEvent = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validatorPeriod = reader.uint64(); - break; - case 2: - message.fraction = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validatorPeriod = reader.uint64(); + break; + case 2: + message.fraction = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -853,7 +853,7 @@ export const ValidatorSlashEvent = { fromPartial(object: DeepPartial): ValidatorSlashEvent { const message = createBaseValidatorSlashEvent(); message.validatorPeriod = object.validatorPeriod !== undefined && object.validatorPeriod !== null ? BigInt(object.validatorPeriod.toString()) : BigInt(0); - message.fraction = object.fraction ?? ""; + message.fraction = object.fraction ?? ''; return message; }, fromAmino(object: ValidatorSlashEventAmino): ValidatorSlashEvent { @@ -869,7 +869,7 @@ export const ValidatorSlashEvent = { toAmino(message: ValidatorSlashEvent): ValidatorSlashEventAmino { const obj: any = {}; obj.validator_period = message.validatorPeriod !== BigInt(0) ? message.validatorPeriod.toString() : undefined; - obj.fraction = message.fraction === "" ? undefined : message.fraction; + obj.fraction = message.fraction === '' ? undefined : message.fraction; return obj; }, fromAminoMsg(object: ValidatorSlashEventAminoMsg): ValidatorSlashEvent { @@ -877,7 +877,7 @@ export const ValidatorSlashEvent = { }, toAminoMsg(message: ValidatorSlashEvent): ValidatorSlashEventAminoMsg { return { - type: "cosmos-sdk/ValidatorSlashEvent", + type: 'cosmos-sdk/ValidatorSlashEvent', value: ValidatorSlashEvent.toAmino(message) }; }, @@ -889,7 +889,7 @@ export const ValidatorSlashEvent = { }, toProtoMsg(message: ValidatorSlashEvent): ValidatorSlashEventProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorSlashEvent', value: ValidatorSlashEvent.encode(message).finish() }; } @@ -902,8 +902,8 @@ function createBaseValidatorSlashEvents(): ValidatorSlashEvents { }; } export const ValidatorSlashEvents = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", - aminoType: "cosmos-sdk/ValidatorSlashEvents", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorSlashEvents', + aminoType: 'cosmos-sdk/ValidatorSlashEvents', is(o: any): o is ValidatorSlashEvents { return o && (o.$typeUrl === ValidatorSlashEvents.typeUrl || Array.isArray(o.validatorSlashEvents) && (!o.validatorSlashEvents.length || ValidatorSlashEvent.is(o.validatorSlashEvents[0]))); }, @@ -923,12 +923,12 @@ export const ValidatorSlashEvents = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validatorSlashEvents.push(ValidatorSlashEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validatorSlashEvents.push(ValidatorSlashEvent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -957,7 +957,7 @@ export const ValidatorSlashEvents = { }, toAminoMsg(message: ValidatorSlashEvents): ValidatorSlashEventsAminoMsg { return { - type: "cosmos-sdk/ValidatorSlashEvents", + type: 'cosmos-sdk/ValidatorSlashEvents', value: ValidatorSlashEvents.toAmino(message) }; }, @@ -969,7 +969,7 @@ export const ValidatorSlashEvents = { }, toProtoMsg(message: ValidatorSlashEvents): ValidatorSlashEventsProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", + typeUrl: '/cosmos.distribution.v1beta1.ValidatorSlashEvents', value: ValidatorSlashEvents.encode(message).finish() }; } @@ -982,8 +982,8 @@ function createBaseFeePool(): FeePool { }; } export const FeePool = { - typeUrl: "/cosmos.distribution.v1beta1.FeePool", - aminoType: "cosmos-sdk/FeePool", + typeUrl: '/cosmos.distribution.v1beta1.FeePool', + aminoType: 'cosmos-sdk/FeePool', is(o: any): o is FeePool { return o && (o.$typeUrl === FeePool.typeUrl || Array.isArray(o.communityPool) && (!o.communityPool.length || DecCoin.is(o.communityPool[0]))); }, @@ -1003,12 +1003,12 @@ export const FeePool = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.communityPool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.communityPool.push(DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1037,7 +1037,7 @@ export const FeePool = { }, toAminoMsg(message: FeePool): FeePoolAminoMsg { return { - type: "cosmos-sdk/FeePool", + type: 'cosmos-sdk/FeePool', value: FeePool.toAmino(message) }; }, @@ -1049,7 +1049,7 @@ export const FeePool = { }, toProtoMsg(message: FeePool): FeePoolProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.FeePool", + typeUrl: '/cosmos.distribution.v1beta1.FeePool', value: FeePool.encode(message).finish() }; } @@ -1058,29 +1058,29 @@ GlobalDecoderRegistry.register(FeePool.typeUrl, FeePool); GlobalDecoderRegistry.registerAminoProtoMapping(FeePool.aminoType, FeePool.typeUrl); function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal { return { - title: "", - description: "", - recipient: "", + title: '', + description: '', + recipient: '', amount: [] }; } export const CommunityPoolSpendProposal = { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", - aminoType: "cosmos-sdk/CommunityPoolSpendProposal", + typeUrl: '/cosmos.distribution.v1beta1.CommunityPoolSpendProposal', + aminoType: 'cosmos-sdk/CommunityPoolSpendProposal', is(o: any): o is CommunityPoolSpendProposal { - return o && (o.$typeUrl === CommunityPoolSpendProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && typeof o.recipient === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === CommunityPoolSpendProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.recipient === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is CommunityPoolSpendProposalAmino { - return o && (o.$typeUrl === CommunityPoolSpendProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && typeof o.recipient === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === CommunityPoolSpendProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.recipient === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: CommunityPoolSpendProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { + if (message.title !== '') { writer.uint32(10).string(message.title); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } - if (message.recipient !== "") { + if (message.recipient !== '') { writer.uint32(26).string(message.recipient); } for (const v of message.amount) { @@ -1095,30 +1095,30 @@ export const CommunityPoolSpendProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.recipient = reader.string(); + break; + case 4: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): CommunityPoolSpendProposal { const message = createBaseCommunityPoolSpendProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.recipient = object.recipient ?? ""; + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.recipient = object.recipient ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -1138,9 +1138,9 @@ export const CommunityPoolSpendProposal = { }, toAmino(message: CommunityPoolSpendProposal): CommunityPoolSpendProposalAmino { const obj: any = {}; - obj.title = message.title === "" ? undefined : message.title; - obj.description = message.description === "" ? undefined : message.description; - obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.recipient = message.recipient === '' ? undefined : message.recipient; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -1153,7 +1153,7 @@ export const CommunityPoolSpendProposal = { }, toAminoMsg(message: CommunityPoolSpendProposal): CommunityPoolSpendProposalAminoMsg { return { - type: "cosmos-sdk/CommunityPoolSpendProposal", + type: 'cosmos-sdk/CommunityPoolSpendProposal', value: CommunityPoolSpendProposal.toAmino(message) }; }, @@ -1165,7 +1165,7 @@ export const CommunityPoolSpendProposal = { }, toProtoMsg(message: CommunityPoolSpendProposal): CommunityPoolSpendProposalProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", + typeUrl: '/cosmos.distribution.v1beta1.CommunityPoolSpendProposal', value: CommunityPoolSpendProposal.encode(message).finish() }; } @@ -1175,24 +1175,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.amino function createBaseDelegatorStartingInfo(): DelegatorStartingInfo { return { previousPeriod: BigInt(0), - stake: "", + stake: '', height: BigInt(0) }; } export const DelegatorStartingInfo = { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", - aminoType: "cosmos-sdk/DelegatorStartingInfo", + typeUrl: '/cosmos.distribution.v1beta1.DelegatorStartingInfo', + aminoType: 'cosmos-sdk/DelegatorStartingInfo', is(o: any): o is DelegatorStartingInfo { - return o && (o.$typeUrl === DelegatorStartingInfo.typeUrl || typeof o.previousPeriod === "bigint" && typeof o.stake === "string" && typeof o.height === "bigint"); + return o && (o.$typeUrl === DelegatorStartingInfo.typeUrl || typeof o.previousPeriod === 'bigint' && typeof o.stake === 'string' && typeof o.height === 'bigint'); }, isAmino(o: any): o is DelegatorStartingInfoAmino { - return o && (o.$typeUrl === DelegatorStartingInfo.typeUrl || typeof o.previous_period === "bigint" && typeof o.stake === "string" && typeof o.height === "bigint"); + return o && (o.$typeUrl === DelegatorStartingInfo.typeUrl || typeof o.previous_period === 'bigint' && typeof o.stake === 'string' && typeof o.height === 'bigint'); }, encode(message: DelegatorStartingInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.previousPeriod !== BigInt(0)) { writer.uint32(8).uint64(message.previousPeriod); } - if (message.stake !== "") { + if (message.stake !== '') { writer.uint32(18).string(message.stake); } if (message.height !== BigInt(0)) { @@ -1207,18 +1207,18 @@ export const DelegatorStartingInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.previousPeriod = reader.uint64(); - break; - case 2: - message.stake = reader.string(); - break; - case 3: - message.height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.previousPeriod = reader.uint64(); + break; + case 2: + message.stake = reader.string(); + break; + case 3: + message.height = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1226,7 +1226,7 @@ export const DelegatorStartingInfo = { fromPartial(object: DeepPartial): DelegatorStartingInfo { const message = createBaseDelegatorStartingInfo(); message.previousPeriod = object.previousPeriod !== undefined && object.previousPeriod !== null ? BigInt(object.previousPeriod.toString()) : BigInt(0); - message.stake = object.stake ?? ""; + message.stake = object.stake ?? ''; message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); return message; }, @@ -1246,8 +1246,8 @@ export const DelegatorStartingInfo = { toAmino(message: DelegatorStartingInfo): DelegatorStartingInfoAmino { const obj: any = {}; obj.previous_period = message.previousPeriod !== BigInt(0) ? message.previousPeriod.toString() : undefined; - obj.stake = message.stake ?? ""; - obj.height = message.height ? message.height.toString() : "0"; + obj.stake = message.stake ?? ''; + obj.height = message.height ? message.height.toString() : '0'; return obj; }, fromAminoMsg(object: DelegatorStartingInfoAminoMsg): DelegatorStartingInfo { @@ -1255,7 +1255,7 @@ export const DelegatorStartingInfo = { }, toAminoMsg(message: DelegatorStartingInfo): DelegatorStartingInfoAminoMsg { return { - type: "cosmos-sdk/DelegatorStartingInfo", + type: 'cosmos-sdk/DelegatorStartingInfo', value: DelegatorStartingInfo.toAmino(message) }; }, @@ -1267,7 +1267,7 @@ export const DelegatorStartingInfo = { }, toProtoMsg(message: DelegatorStartingInfo): DelegatorStartingInfoProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", + typeUrl: '/cosmos.distribution.v1beta1.DelegatorStartingInfo', value: DelegatorStartingInfo.encode(message).finish() }; } @@ -1276,21 +1276,21 @@ GlobalDecoderRegistry.register(DelegatorStartingInfo.typeUrl, DelegatorStartingI GlobalDecoderRegistry.registerAminoProtoMapping(DelegatorStartingInfo.aminoType, DelegatorStartingInfo.typeUrl); function createBaseDelegationDelegatorReward(): DelegationDelegatorReward { return { - validatorAddress: "", + validatorAddress: '', reward: [] }; } export const DelegationDelegatorReward = { - typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", - aminoType: "cosmos-sdk/DelegationDelegatorReward", + typeUrl: '/cosmos.distribution.v1beta1.DelegationDelegatorReward', + aminoType: 'cosmos-sdk/DelegationDelegatorReward', is(o: any): o is DelegationDelegatorReward { - return o && (o.$typeUrl === DelegationDelegatorReward.typeUrl || typeof o.validatorAddress === "string" && Array.isArray(o.reward) && (!o.reward.length || DecCoin.is(o.reward[0]))); + return o && (o.$typeUrl === DelegationDelegatorReward.typeUrl || typeof o.validatorAddress === 'string' && Array.isArray(o.reward) && (!o.reward.length || DecCoin.is(o.reward[0]))); }, isAmino(o: any): o is DelegationDelegatorRewardAmino { - return o && (o.$typeUrl === DelegationDelegatorReward.typeUrl || typeof o.validator_address === "string" && Array.isArray(o.reward) && (!o.reward.length || DecCoin.isAmino(o.reward[0]))); + return o && (o.$typeUrl === DelegationDelegatorReward.typeUrl || typeof o.validator_address === 'string' && Array.isArray(o.reward) && (!o.reward.length || DecCoin.isAmino(o.reward[0]))); }, encode(message: DelegationDelegatorReward, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(10).string(message.validatorAddress); } for (const v of message.reward) { @@ -1305,22 +1305,22 @@ export const DelegationDelegatorReward = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.reward.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + message.reward.push(DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DelegationDelegatorReward { const message = createBaseDelegationDelegatorReward(); - message.validatorAddress = object.validatorAddress ?? ""; + message.validatorAddress = object.validatorAddress ?? ''; message.reward = object.reward?.map(e => DecCoin.fromPartial(e)) || []; return message; }, @@ -1334,7 +1334,7 @@ export const DelegationDelegatorReward = { }, toAmino(message: DelegationDelegatorReward): DelegationDelegatorRewardAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; if (message.reward) { obj.reward = message.reward.map(e => e ? DecCoin.toAmino(e) : undefined); } else { @@ -1347,7 +1347,7 @@ export const DelegationDelegatorReward = { }, toAminoMsg(message: DelegationDelegatorReward): DelegationDelegatorRewardAminoMsg { return { - type: "cosmos-sdk/DelegationDelegatorReward", + type: 'cosmos-sdk/DelegationDelegatorReward', value: DelegationDelegatorReward.toAmino(message) }; }, @@ -1359,7 +1359,7 @@ export const DelegationDelegatorReward = { }, toProtoMsg(message: DelegationDelegatorReward): DelegationDelegatorRewardProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", + typeUrl: '/cosmos.distribution.v1beta1.DelegationDelegatorReward', value: DelegationDelegatorReward.encode(message).finish() }; } @@ -1368,36 +1368,36 @@ GlobalDecoderRegistry.register(DelegationDelegatorReward.typeUrl, DelegationDele GlobalDecoderRegistry.registerAminoProtoMapping(DelegationDelegatorReward.aminoType, DelegationDelegatorReward.typeUrl); function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit { return { - title: "", - description: "", - recipient: "", - amount: "", - deposit: "" + title: '', + description: '', + recipient: '', + amount: '', + deposit: '' }; } export const CommunityPoolSpendProposalWithDeposit = { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", - aminoType: "cosmos-sdk/CommunityPoolSpendProposalWithDeposit", + typeUrl: '/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit', + aminoType: 'cosmos-sdk/CommunityPoolSpendProposalWithDeposit', is(o: any): o is CommunityPoolSpendProposalWithDeposit { - return o && (o.$typeUrl === CommunityPoolSpendProposalWithDeposit.typeUrl || typeof o.title === "string" && typeof o.description === "string" && typeof o.recipient === "string" && typeof o.amount === "string" && typeof o.deposit === "string"); + return o && (o.$typeUrl === CommunityPoolSpendProposalWithDeposit.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.recipient === 'string' && typeof o.amount === 'string' && typeof o.deposit === 'string'); }, isAmino(o: any): o is CommunityPoolSpendProposalWithDepositAmino { - return o && (o.$typeUrl === CommunityPoolSpendProposalWithDeposit.typeUrl || typeof o.title === "string" && typeof o.description === "string" && typeof o.recipient === "string" && typeof o.amount === "string" && typeof o.deposit === "string"); + return o && (o.$typeUrl === CommunityPoolSpendProposalWithDeposit.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.recipient === 'string' && typeof o.amount === 'string' && typeof o.deposit === 'string'); }, encode(message: CommunityPoolSpendProposalWithDeposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { + if (message.title !== '') { writer.uint32(10).string(message.title); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } - if (message.recipient !== "") { + if (message.recipient !== '') { writer.uint32(26).string(message.recipient); } - if (message.amount !== "") { + if (message.amount !== '') { writer.uint32(34).string(message.amount); } - if (message.deposit !== "") { + if (message.deposit !== '') { writer.uint32(42).string(message.deposit); } return writer; @@ -1409,35 +1409,35 @@ export const CommunityPoolSpendProposalWithDeposit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount = reader.string(); - break; - case 5: - message.deposit = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.recipient = reader.string(); + break; + case 4: + message.amount = reader.string(); + break; + case 5: + message.deposit = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): CommunityPoolSpendProposalWithDeposit { const message = createBaseCommunityPoolSpendProposalWithDeposit(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.recipient = object.recipient ?? ""; - message.amount = object.amount ?? ""; - message.deposit = object.deposit ?? ""; + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.recipient = object.recipient ?? ''; + message.amount = object.amount ?? ''; + message.deposit = object.deposit ?? ''; return message; }, fromAmino(object: CommunityPoolSpendProposalWithDepositAmino): CommunityPoolSpendProposalWithDeposit { @@ -1461,11 +1461,11 @@ export const CommunityPoolSpendProposalWithDeposit = { }, toAmino(message: CommunityPoolSpendProposalWithDeposit): CommunityPoolSpendProposalWithDepositAmino { const obj: any = {}; - obj.title = message.title === "" ? undefined : message.title; - obj.description = message.description === "" ? undefined : message.description; - obj.recipient = message.recipient === "" ? undefined : message.recipient; - obj.amount = message.amount === "" ? undefined : message.amount; - obj.deposit = message.deposit === "" ? undefined : message.deposit; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.recipient = message.recipient === '' ? undefined : message.recipient; + obj.amount = message.amount === '' ? undefined : message.amount; + obj.deposit = message.deposit === '' ? undefined : message.deposit; return obj; }, fromAminoMsg(object: CommunityPoolSpendProposalWithDepositAminoMsg): CommunityPoolSpendProposalWithDeposit { @@ -1473,7 +1473,7 @@ export const CommunityPoolSpendProposalWithDeposit = { }, toAminoMsg(message: CommunityPoolSpendProposalWithDeposit): CommunityPoolSpendProposalWithDepositAminoMsg { return { - type: "cosmos-sdk/CommunityPoolSpendProposalWithDeposit", + type: 'cosmos-sdk/CommunityPoolSpendProposalWithDeposit', value: CommunityPoolSpendProposalWithDeposit.toAmino(message) }; }, @@ -1485,7 +1485,7 @@ export const CommunityPoolSpendProposalWithDeposit = { }, toProtoMsg(message: CommunityPoolSpendProposalWithDeposit): CommunityPoolSpendProposalWithDepositProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", + typeUrl: '/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit', value: CommunityPoolSpendProposalWithDeposit.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.amino.ts b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.amino.ts index 34f6bac6..bd7d3d74 100644 --- a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.amino.ts @@ -1,37 +1,37 @@ -import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgUpdateParams, MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool } from "./tx"; +import { MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool,MsgFundCommunityPool, MsgSetWithdrawAddress, MsgUpdateParams, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission } from './tx'; export const AminoConverter = { - "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress": { - aminoType: "cosmos-sdk/MsgModifyWithdrawAddress", + '/cosmos.distribution.v1beta1.MsgSetWithdrawAddress': { + aminoType: 'cosmos-sdk/MsgModifyWithdrawAddress', toAmino: MsgSetWithdrawAddress.toAmino, fromAmino: MsgSetWithdrawAddress.fromAmino }, - "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward": { - aminoType: "cosmos-sdk/MsgWithdrawDelegationReward", + '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward': { + aminoType: 'cosmos-sdk/MsgWithdrawDelegationReward', toAmino: MsgWithdrawDelegatorReward.toAmino, fromAmino: MsgWithdrawDelegatorReward.fromAmino }, - "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission": { - aminoType: "cosmos-sdk/MsgWithdrawValidatorCommission", + '/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission': { + aminoType: 'cosmos-sdk/MsgWithdrawValidatorCommission', toAmino: MsgWithdrawValidatorCommission.toAmino, fromAmino: MsgWithdrawValidatorCommission.fromAmino }, - "/cosmos.distribution.v1beta1.MsgFundCommunityPool": { - aminoType: "cosmos-sdk/MsgFundCommunityPool", + '/cosmos.distribution.v1beta1.MsgFundCommunityPool': { + aminoType: 'cosmos-sdk/MsgFundCommunityPool', toAmino: MsgFundCommunityPool.toAmino, fromAmino: MsgFundCommunityPool.fromAmino }, - "/cosmos.distribution.v1beta1.MsgUpdateParams": { - aminoType: "cosmos-sdk/distribution/MsgUpdateParams", + '/cosmos.distribution.v1beta1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/distribution/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino }, - "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend": { - aminoType: "cosmos-sdk/distr/MsgCommunityPoolSpend", + '/cosmos.distribution.v1beta1.MsgCommunityPoolSpend': { + aminoType: 'cosmos-sdk/distr/MsgCommunityPoolSpend', toAmino: MsgCommunityPoolSpend.toAmino, fromAmino: MsgCommunityPoolSpend.fromAmino }, - "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool": { - aminoType: "cosmos-sdk/distr/MsgDepositValRewards", + '/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool': { + aminoType: 'cosmos-sdk/distr/MsgDepositValRewards', toAmino: MsgDepositValidatorRewardsPool.toAmino, fromAmino: MsgDepositValidatorRewardsPool.fromAmino } diff --git a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.registry.ts b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.registry.ts index bb74c52a..2be7b6ff 100644 --- a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgUpdateParams, MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], ["/cosmos.distribution.v1beta1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", MsgCommunityPoolSpend], ["/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", MsgDepositValidatorRewardsPool]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool,MsgFundCommunityPool, MsgSetWithdrawAddress, MsgUpdateParams, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.distribution.v1beta1.MsgSetWithdrawAddress', MsgSetWithdrawAddress], ['/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward', MsgWithdrawDelegatorReward], ['/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission', MsgWithdrawValidatorCommission], ['/cosmos.distribution.v1beta1.MsgFundCommunityPool', MsgFundCommunityPool], ['/cosmos.distribution.v1beta1.MsgUpdateParams', MsgUpdateParams], ['/cosmos.distribution.v1beta1.MsgCommunityPoolSpend', MsgCommunityPoolSpend], ['/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool', MsgDepositValidatorRewardsPool]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.rpc.msg.ts index 7867bdd8..7f6492c7 100644 --- a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.rpc.msg.ts @@ -1,34 +1,34 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgUpdateParams, MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool,MsgFundCommunityPool, MsgSetWithdrawAddress, MsgUpdateParams, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission } from './tx'; /** Msg defines the distribution Msg service. */ export interface Msg { /** * SetWithdrawAddress defines a method to change the withdraw address * for a delegator (or validator self-delegation). */ - setWithdrawAddress(signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | "auto", memo?: string): Promise; + setWithdrawAddress(signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | 'auto', memo?: string): Promise; /** * WithdrawDelegatorReward defines a method to withdraw rewards of delegator * from a single validator. */ - withdrawDelegatorReward(signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | "auto", memo?: string): Promise; + withdrawDelegatorReward(signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | 'auto', memo?: string): Promise; /** * WithdrawValidatorCommission defines a method to withdraw the * full commission to the validator address. */ - withdrawValidatorCommission(signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | "auto", memo?: string): Promise; + withdrawValidatorCommission(signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | 'auto', memo?: string): Promise; /** * FundCommunityPool defines a method to allow an account to directly * fund the community pool. */ - fundCommunityPool(signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | "auto", memo?: string): Promise; + fundCommunityPool(signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/distribution * module parameters. The authority is defined in the keeper. * * Since: cosmos-sdk 0.47 */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CommunityPoolSpend defines a governance operation for sending tokens from * the community pool in the x/distribution module to another account, which @@ -37,14 +37,14 @@ export interface Msg { * * Since: cosmos-sdk 0.47 */ - communityPoolSpend(signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | "auto", memo?: string): Promise; + communityPoolSpend(signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | 'auto', memo?: string): Promise; /** * DepositValidatorRewardsPool defines a method to provide additional rewards * to delegators to a specific validator. * * Since: cosmos-sdk 0.50 */ - depositValidatorRewardsPool(signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | "auto", memo?: string): Promise; + depositValidatorRewardsPool(signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the distribution Msg service. */ export interface StargateImpl { @@ -52,29 +52,29 @@ export interface StargateImpl { * SetWithdrawAddress defines a method to change the withdraw address * for a delegator (or validator self-delegation). */ - setWithdrawAddress(signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | "auto", memo?: string): Promise; + setWithdrawAddress(signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | 'auto', memo?: string): Promise; /** * WithdrawDelegatorReward defines a method to withdraw rewards of delegator * from a single validator. */ - withdrawDelegatorReward(signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | "auto", memo?: string): Promise; + withdrawDelegatorReward(signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | 'auto', memo?: string): Promise; /** * WithdrawValidatorCommission defines a method to withdraw the * full commission to the validator address. */ - withdrawValidatorCommission(signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | "auto", memo?: string): Promise; + withdrawValidatorCommission(signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | 'auto', memo?: string): Promise; /** * FundCommunityPool defines a method to allow an account to directly * fund the community pool. */ - fundCommunityPool(signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | "auto", memo?: string): Promise; + fundCommunityPool(signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/distribution * module parameters. The authority is defined in the keeper. * * Since: cosmos-sdk 0.47 */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CommunityPoolSpend defines a governance operation for sending tokens from * the community pool in the x/distribution module to another account, which @@ -83,14 +83,14 @@ export interface StargateImpl { * * Since: cosmos-sdk 0.47 */ - communityPoolSpend(signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | "auto", memo?: string): Promise; + communityPoolSpend(signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | 'auto', memo?: string): Promise; /** * DepositValidatorRewardsPool defines a method to provide additional rewards * to delegators to a specific validator. * * Since: cosmos-sdk 0.50 */ - depositValidatorRewardsPool(signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | "auto", memo?: string): Promise; + depositValidatorRewardsPool(signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the distribution Msg service. */ export interface CosmWasmStargateImpl { @@ -98,29 +98,29 @@ export interface CosmWasmStargateImpl { * SetWithdrawAddress defines a method to change the withdraw address * for a delegator (or validator self-delegation). */ - setWithdrawAddress(signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | "auto", memo?: string): Promise; + setWithdrawAddress(signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | 'auto', memo?: string): Promise; /** * WithdrawDelegatorReward defines a method to withdraw rewards of delegator * from a single validator. */ - withdrawDelegatorReward(signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | "auto", memo?: string): Promise; + withdrawDelegatorReward(signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | 'auto', memo?: string): Promise; /** * WithdrawValidatorCommission defines a method to withdraw the * full commission to the validator address. */ - withdrawValidatorCommission(signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | "auto", memo?: string): Promise; + withdrawValidatorCommission(signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | 'auto', memo?: string): Promise; /** * FundCommunityPool defines a method to allow an account to directly * fund the community pool. */ - fundCommunityPool(signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | "auto", memo?: string): Promise; + fundCommunityPool(signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/distribution * module parameters. The authority is defined in the keeper. * * Since: cosmos-sdk 0.47 */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CommunityPoolSpend defines a governance operation for sending tokens from * the community pool in the x/distribution module to another account, which @@ -129,14 +129,14 @@ export interface CosmWasmStargateImpl { * * Since: cosmos-sdk 0.47 */ - communityPoolSpend(signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | "auto", memo?: string): Promise; + communityPoolSpend(signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | 'auto', memo?: string): Promise; /** * DepositValidatorRewardsPool defines a method to provide additional rewards * to delegators to a specific validator. * * Since: cosmos-sdk 0.50 */ - depositValidatorRewardsPool(signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | "auto", memo?: string): Promise; + depositValidatorRewardsPool(signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -145,7 +145,7 @@ export class MsgClientImpl implements Msg { } /* SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). */ - setWithdrawAddress = async (signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + setWithdrawAddress = async (signerAddress: string, message: MsgSetWithdrawAddress, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSetWithdrawAddress.typeUrl, value: message @@ -154,7 +154,7 @@ export class MsgClientImpl implements Msg { }; /* WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. */ - withdrawDelegatorReward = async (signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + withdrawDelegatorReward = async (signerAddress: string, message: MsgWithdrawDelegatorReward, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgWithdrawDelegatorReward.typeUrl, value: message @@ -163,7 +163,7 @@ export class MsgClientImpl implements Msg { }; /* WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. */ - withdrawValidatorCommission = async (signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + withdrawValidatorCommission = async (signerAddress: string, message: MsgWithdrawValidatorCommission, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgWithdrawValidatorCommission.typeUrl, value: message @@ -172,7 +172,7 @@ export class MsgClientImpl implements Msg { }; /* FundCommunityPool defines a method to allow an account to directly fund the community pool. */ - fundCommunityPool = async (signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + fundCommunityPool = async (signerAddress: string, message: MsgFundCommunityPool, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgFundCommunityPool.typeUrl, value: message @@ -183,7 +183,7 @@ export class MsgClientImpl implements Msg { module parameters. The authority is defined in the keeper. Since: cosmos-sdk 0.47 */ - updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message @@ -196,7 +196,7 @@ export class MsgClientImpl implements Msg { keeper. Since: cosmos-sdk 0.47 */ - communityPoolSpend = async (signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + communityPoolSpend = async (signerAddress: string, message: MsgCommunityPoolSpend, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCommunityPoolSpend.typeUrl, value: message @@ -207,7 +207,7 @@ export class MsgClientImpl implements Msg { to delegators to a specific validator. Since: cosmos-sdk 0.50 */ - depositValidatorRewardsPool = async (signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + depositValidatorRewardsPool = async (signerAddress: string, message: MsgDepositValidatorRewardsPool, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgDepositValidatorRewardsPool.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.ts b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.ts index 64517d0b..b1a9edf9 100644 --- a/libs/cosmos-types/cosmos/distribution/v1beta1/tx.ts +++ b/libs/cosmos-types/cosmos/distribution/v1beta1/tx.ts @@ -1,8 +1,8 @@ -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { Params, ParamsAmino } from "./distribution"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { Params, ParamsAmino } from './distribution'; /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). @@ -12,7 +12,7 @@ export interface MsgSetWithdrawAddress { withdrawAddress: string; } export interface MsgSetWithdrawAddressProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress"; + typeUrl: '/cosmos.distribution.v1beta1.MsgSetWithdrawAddress'; value: Uint8Array; } /** @@ -24,7 +24,7 @@ export interface MsgSetWithdrawAddressAmino { withdraw_address: string; } export interface MsgSetWithdrawAddressAminoMsg { - type: "cosmos-sdk/MsgModifyWithdrawAddress"; + type: 'cosmos-sdk/MsgModifyWithdrawAddress'; value: MsgSetWithdrawAddressAmino; } /** @@ -33,7 +33,7 @@ export interface MsgSetWithdrawAddressAminoMsg { */ export interface MsgSetWithdrawAddressResponse {} export interface MsgSetWithdrawAddressResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse"; + typeUrl: '/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse'; value: Uint8Array; } /** @@ -42,7 +42,7 @@ export interface MsgSetWithdrawAddressResponseProtoMsg { */ export interface MsgSetWithdrawAddressResponseAmino {} export interface MsgSetWithdrawAddressResponseAminoMsg { - type: "cosmos-sdk/MsgSetWithdrawAddressResponse"; + type: 'cosmos-sdk/MsgSetWithdrawAddressResponse'; value: MsgSetWithdrawAddressResponseAmino; } /** @@ -54,7 +54,7 @@ export interface MsgWithdrawDelegatorReward { validatorAddress: string; } export interface MsgWithdrawDelegatorRewardProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"; + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward'; value: Uint8Array; } /** @@ -66,7 +66,7 @@ export interface MsgWithdrawDelegatorRewardAmino { validator_address: string; } export interface MsgWithdrawDelegatorRewardAminoMsg { - type: "cosmos-sdk/MsgWithdrawDelegationReward"; + type: 'cosmos-sdk/MsgWithdrawDelegationReward'; value: MsgWithdrawDelegatorRewardAmino; } /** @@ -78,7 +78,7 @@ export interface MsgWithdrawDelegatorRewardResponse { amount: Coin[]; } export interface MsgWithdrawDelegatorRewardResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse"; + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse'; value: Uint8Array; } /** @@ -90,7 +90,7 @@ export interface MsgWithdrawDelegatorRewardResponseAmino { amount: CoinAmino[]; } export interface MsgWithdrawDelegatorRewardResponseAminoMsg { - type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse"; + type: 'cosmos-sdk/MsgWithdrawDelegatorRewardResponse'; value: MsgWithdrawDelegatorRewardResponseAmino; } /** @@ -101,7 +101,7 @@ export interface MsgWithdrawValidatorCommission { validatorAddress: string; } export interface MsgWithdrawValidatorCommissionProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"; + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission'; value: Uint8Array; } /** @@ -112,7 +112,7 @@ export interface MsgWithdrawValidatorCommissionAmino { validator_address: string; } export interface MsgWithdrawValidatorCommissionAminoMsg { - type: "cosmos-sdk/MsgWithdrawValidatorCommission"; + type: 'cosmos-sdk/MsgWithdrawValidatorCommission'; value: MsgWithdrawValidatorCommissionAmino; } /** @@ -124,7 +124,7 @@ export interface MsgWithdrawValidatorCommissionResponse { amount: Coin[]; } export interface MsgWithdrawValidatorCommissionResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse"; + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse'; value: Uint8Array; } /** @@ -136,7 +136,7 @@ export interface MsgWithdrawValidatorCommissionResponseAmino { amount: CoinAmino[]; } export interface MsgWithdrawValidatorCommissionResponseAminoMsg { - type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse"; + type: 'cosmos-sdk/MsgWithdrawValidatorCommissionResponse'; value: MsgWithdrawValidatorCommissionResponseAmino; } /** @@ -148,7 +148,7 @@ export interface MsgFundCommunityPool { depositor: string; } export interface MsgFundCommunityPoolProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool"; + typeUrl: '/cosmos.distribution.v1beta1.MsgFundCommunityPool'; value: Uint8Array; } /** @@ -160,19 +160,19 @@ export interface MsgFundCommunityPoolAmino { depositor: string; } export interface MsgFundCommunityPoolAminoMsg { - type: "cosmos-sdk/MsgFundCommunityPool"; + type: 'cosmos-sdk/MsgFundCommunityPool'; value: MsgFundCommunityPoolAmino; } /** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ export interface MsgFundCommunityPoolResponse {} export interface MsgFundCommunityPoolResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse"; + typeUrl: '/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse'; value: Uint8Array; } /** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ export interface MsgFundCommunityPoolResponseAmino {} export interface MsgFundCommunityPoolResponseAminoMsg { - type: "cosmos-sdk/MsgFundCommunityPoolResponse"; + type: 'cosmos-sdk/MsgFundCommunityPoolResponse'; value: MsgFundCommunityPoolResponseAmino; } /** @@ -191,7 +191,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams"; + typeUrl: '/cosmos.distribution.v1beta1.MsgUpdateParams'; value: Uint8Array; } /** @@ -210,7 +210,7 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/distribution/MsgUpdateParams"; + type: 'cosmos-sdk/distribution/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** @@ -221,7 +221,7 @@ export interface MsgUpdateParamsAminoMsg { */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse"; + typeUrl: '/cosmos.distribution.v1beta1.MsgUpdateParamsResponse'; value: Uint8Array; } /** @@ -232,7 +232,7 @@ export interface MsgUpdateParamsResponseProtoMsg { */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } /** @@ -249,7 +249,7 @@ export interface MsgCommunityPoolSpend { amount: Coin[]; } export interface MsgCommunityPoolSpendProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend"; + typeUrl: '/cosmos.distribution.v1beta1.MsgCommunityPoolSpend'; value: Uint8Array; } /** @@ -266,7 +266,7 @@ export interface MsgCommunityPoolSpendAmino { amount: CoinAmino[]; } export interface MsgCommunityPoolSpendAminoMsg { - type: "cosmos-sdk/distr/MsgCommunityPoolSpend"; + type: 'cosmos-sdk/distr/MsgCommunityPoolSpend'; value: MsgCommunityPoolSpendAmino; } /** @@ -277,7 +277,7 @@ export interface MsgCommunityPoolSpendAminoMsg { */ export interface MsgCommunityPoolSpendResponse {} export interface MsgCommunityPoolSpendResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse"; + typeUrl: '/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse'; value: Uint8Array; } /** @@ -288,7 +288,7 @@ export interface MsgCommunityPoolSpendResponseProtoMsg { */ export interface MsgCommunityPoolSpendResponseAmino {} export interface MsgCommunityPoolSpendResponseAminoMsg { - type: "cosmos-sdk/MsgCommunityPoolSpendResponse"; + type: 'cosmos-sdk/MsgCommunityPoolSpendResponse'; value: MsgCommunityPoolSpendResponseAmino; } /** @@ -303,7 +303,7 @@ export interface MsgDepositValidatorRewardsPool { amount: Coin[]; } export interface MsgDepositValidatorRewardsPoolProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool"; + typeUrl: '/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool'; value: Uint8Array; } /** @@ -318,7 +318,7 @@ export interface MsgDepositValidatorRewardsPoolAmino { amount: CoinAmino[]; } export interface MsgDepositValidatorRewardsPoolAminoMsg { - type: "cosmos-sdk/distr/MsgDepositValRewards"; + type: 'cosmos-sdk/distr/MsgDepositValRewards'; value: MsgDepositValidatorRewardsPoolAmino; } /** @@ -329,7 +329,7 @@ export interface MsgDepositValidatorRewardsPoolAminoMsg { */ export interface MsgDepositValidatorRewardsPoolResponse {} export interface MsgDepositValidatorRewardsPoolResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse"; + typeUrl: '/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse'; value: Uint8Array; } /** @@ -340,29 +340,29 @@ export interface MsgDepositValidatorRewardsPoolResponseProtoMsg { */ export interface MsgDepositValidatorRewardsPoolResponseAmino {} export interface MsgDepositValidatorRewardsPoolResponseAminoMsg { - type: "cosmos-sdk/MsgDepositValidatorRewardsPoolResponse"; + type: 'cosmos-sdk/MsgDepositValidatorRewardsPoolResponse'; value: MsgDepositValidatorRewardsPoolResponseAmino; } function createBaseMsgSetWithdrawAddress(): MsgSetWithdrawAddress { return { - delegatorAddress: "", - withdrawAddress: "" + delegatorAddress: '', + withdrawAddress: '' }; } export const MsgSetWithdrawAddress = { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - aminoType: "cosmos-sdk/MsgModifyWithdrawAddress", + typeUrl: '/cosmos.distribution.v1beta1.MsgSetWithdrawAddress', + aminoType: 'cosmos-sdk/MsgModifyWithdrawAddress', is(o: any): o is MsgSetWithdrawAddress { - return o && (o.$typeUrl === MsgSetWithdrawAddress.typeUrl || typeof o.delegatorAddress === "string" && typeof o.withdrawAddress === "string"); + return o && (o.$typeUrl === MsgSetWithdrawAddress.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.withdrawAddress === 'string'); }, isAmino(o: any): o is MsgSetWithdrawAddressAmino { - return o && (o.$typeUrl === MsgSetWithdrawAddress.typeUrl || typeof o.delegator_address === "string" && typeof o.withdraw_address === "string"); + return o && (o.$typeUrl === MsgSetWithdrawAddress.typeUrl || typeof o.delegator_address === 'string' && typeof o.withdraw_address === 'string'); }, encode(message: MsgSetWithdrawAddress, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.withdrawAddress !== "") { + if (message.withdrawAddress !== '') { writer.uint32(18).string(message.withdrawAddress); } return writer; @@ -374,23 +374,23 @@ export const MsgSetWithdrawAddress = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.withdrawAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgSetWithdrawAddress { const message = createBaseMsgSetWithdrawAddress(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.withdrawAddress = object.withdrawAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.withdrawAddress = object.withdrawAddress ?? ''; return message; }, fromAmino(object: MsgSetWithdrawAddressAmino): MsgSetWithdrawAddress { @@ -405,8 +405,8 @@ export const MsgSetWithdrawAddress = { }, toAmino(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.withdraw_address = message.withdrawAddress === "" ? undefined : message.withdrawAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.withdraw_address = message.withdrawAddress === '' ? undefined : message.withdrawAddress; return obj; }, fromAminoMsg(object: MsgSetWithdrawAddressAminoMsg): MsgSetWithdrawAddress { @@ -414,7 +414,7 @@ export const MsgSetWithdrawAddress = { }, toAminoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAminoMsg { return { - type: "cosmos-sdk/MsgModifyWithdrawAddress", + type: 'cosmos-sdk/MsgModifyWithdrawAddress', value: MsgSetWithdrawAddress.toAmino(message) }; }, @@ -426,7 +426,7 @@ export const MsgSetWithdrawAddress = { }, toProtoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + typeUrl: '/cosmos.distribution.v1beta1.MsgSetWithdrawAddress', value: MsgSetWithdrawAddress.encode(message).finish() }; } @@ -437,8 +437,8 @@ function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressRespons return {}; } export const MsgSetWithdrawAddressResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", - aminoType: "cosmos-sdk/MsgSetWithdrawAddressResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse', + aminoType: 'cosmos-sdk/MsgSetWithdrawAddressResponse', is(o: any): o is MsgSetWithdrawAddressResponse { return o && o.$typeUrl === MsgSetWithdrawAddressResponse.typeUrl; }, @@ -455,9 +455,9 @@ export const MsgSetWithdrawAddressResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -479,7 +479,7 @@ export const MsgSetWithdrawAddressResponse = { }, toAminoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseAminoMsg { return { - type: "cosmos-sdk/MsgSetWithdrawAddressResponse", + type: 'cosmos-sdk/MsgSetWithdrawAddressResponse', value: MsgSetWithdrawAddressResponse.toAmino(message) }; }, @@ -491,7 +491,7 @@ export const MsgSetWithdrawAddressResponse = { }, toProtoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse', value: MsgSetWithdrawAddressResponse.encode(message).finish() }; } @@ -500,24 +500,24 @@ GlobalDecoderRegistry.register(MsgSetWithdrawAddressResponse.typeUrl, MsgSetWith GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddressResponse.aminoType, MsgSetWithdrawAddressResponse.typeUrl); function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { return { - delegatorAddress: "", - validatorAddress: "" + delegatorAddress: '', + validatorAddress: '' }; } export const MsgWithdrawDelegatorReward = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - aminoType: "cosmos-sdk/MsgWithdrawDelegationReward", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward', + aminoType: 'cosmos-sdk/MsgWithdrawDelegationReward', is(o: any): o is MsgWithdrawDelegatorReward { - return o && (o.$typeUrl === MsgWithdrawDelegatorReward.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string"); + return o && (o.$typeUrl === MsgWithdrawDelegatorReward.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string'); }, isAmino(o: any): o is MsgWithdrawDelegatorRewardAmino { - return o && (o.$typeUrl === MsgWithdrawDelegatorReward.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string"); + return o && (o.$typeUrl === MsgWithdrawDelegatorReward.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_address === 'string'); }, encode(message: MsgWithdrawDelegatorReward, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } return writer; @@ -529,23 +529,23 @@ export const MsgWithdrawDelegatorReward = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgWithdrawDelegatorReward { const message = createBaseMsgWithdrawDelegatorReward(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; return message; }, fromAmino(object: MsgWithdrawDelegatorRewardAmino): MsgWithdrawDelegatorReward { @@ -560,8 +560,8 @@ export const MsgWithdrawDelegatorReward = { }, toAmino(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: MsgWithdrawDelegatorRewardAminoMsg): MsgWithdrawDelegatorReward { @@ -569,7 +569,7 @@ export const MsgWithdrawDelegatorReward = { }, toAminoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAminoMsg { return { - type: "cosmos-sdk/MsgWithdrawDelegationReward", + type: 'cosmos-sdk/MsgWithdrawDelegationReward', value: MsgWithdrawDelegatorReward.toAmino(message) }; }, @@ -581,7 +581,7 @@ export const MsgWithdrawDelegatorReward = { }, toProtoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward', value: MsgWithdrawDelegatorReward.encode(message).finish() }; } @@ -594,8 +594,8 @@ function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRew }; } export const MsgWithdrawDelegatorRewardResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", - aminoType: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse', + aminoType: 'cosmos-sdk/MsgWithdrawDelegatorRewardResponse', is(o: any): o is MsgWithdrawDelegatorRewardResponse { return o && (o.$typeUrl === MsgWithdrawDelegatorRewardResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, @@ -615,12 +615,12 @@ export const MsgWithdrawDelegatorRewardResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -649,7 +649,7 @@ export const MsgWithdrawDelegatorRewardResponse = { }, toAminoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseAminoMsg { return { - type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse", + type: 'cosmos-sdk/MsgWithdrawDelegatorRewardResponse', value: MsgWithdrawDelegatorRewardResponse.toAmino(message) }; }, @@ -661,7 +661,7 @@ export const MsgWithdrawDelegatorRewardResponse = { }, toProtoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse', value: MsgWithdrawDelegatorRewardResponse.encode(message).finish() }; } @@ -670,20 +670,20 @@ GlobalDecoderRegistry.register(MsgWithdrawDelegatorRewardResponse.typeUrl, MsgWi GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorRewardResponse.aminoType, MsgWithdrawDelegatorRewardResponse.typeUrl); function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { return { - validatorAddress: "" + validatorAddress: '' }; } export const MsgWithdrawValidatorCommission = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - aminoType: "cosmos-sdk/MsgWithdrawValidatorCommission", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission', + aminoType: 'cosmos-sdk/MsgWithdrawValidatorCommission', is(o: any): o is MsgWithdrawValidatorCommission { - return o && (o.$typeUrl === MsgWithdrawValidatorCommission.typeUrl || typeof o.validatorAddress === "string"); + return o && (o.$typeUrl === MsgWithdrawValidatorCommission.typeUrl || typeof o.validatorAddress === 'string'); }, isAmino(o: any): o is MsgWithdrawValidatorCommissionAmino { - return o && (o.$typeUrl === MsgWithdrawValidatorCommission.typeUrl || typeof o.validator_address === "string"); + return o && (o.$typeUrl === MsgWithdrawValidatorCommission.typeUrl || typeof o.validator_address === 'string'); }, encode(message: MsgWithdrawValidatorCommission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(10).string(message.validatorAddress); } return writer; @@ -695,19 +695,19 @@ export const MsgWithdrawValidatorCommission = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgWithdrawValidatorCommission { const message = createBaseMsgWithdrawValidatorCommission(); - message.validatorAddress = object.validatorAddress ?? ""; + message.validatorAddress = object.validatorAddress ?? ''; return message; }, fromAmino(object: MsgWithdrawValidatorCommissionAmino): MsgWithdrawValidatorCommission { @@ -719,7 +719,7 @@ export const MsgWithdrawValidatorCommission = { }, toAmino(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAmino { const obj: any = {}; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: MsgWithdrawValidatorCommissionAminoMsg): MsgWithdrawValidatorCommission { @@ -727,7 +727,7 @@ export const MsgWithdrawValidatorCommission = { }, toAminoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAminoMsg { return { - type: "cosmos-sdk/MsgWithdrawValidatorCommission", + type: 'cosmos-sdk/MsgWithdrawValidatorCommission', value: MsgWithdrawValidatorCommission.toAmino(message) }; }, @@ -739,7 +739,7 @@ export const MsgWithdrawValidatorCommission = { }, toProtoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission', value: MsgWithdrawValidatorCommission.encode(message).finish() }; } @@ -752,8 +752,8 @@ function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidato }; } export const MsgWithdrawValidatorCommissionResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", - aminoType: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse', + aminoType: 'cosmos-sdk/MsgWithdrawValidatorCommissionResponse', is(o: any): o is MsgWithdrawValidatorCommissionResponse { return o && (o.$typeUrl === MsgWithdrawValidatorCommissionResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, @@ -773,12 +773,12 @@ export const MsgWithdrawValidatorCommissionResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -807,7 +807,7 @@ export const MsgWithdrawValidatorCommissionResponse = { }, toAminoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseAminoMsg { return { - type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse", + type: 'cosmos-sdk/MsgWithdrawValidatorCommissionResponse', value: MsgWithdrawValidatorCommissionResponse.toAmino(message) }; }, @@ -819,7 +819,7 @@ export const MsgWithdrawValidatorCommissionResponse = { }, toProtoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse', value: MsgWithdrawValidatorCommissionResponse.encode(message).finish() }; } @@ -829,23 +829,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommissionRe function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { return { amount: [], - depositor: "" + depositor: '' }; } export const MsgFundCommunityPool = { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - aminoType: "cosmos-sdk/MsgFundCommunityPool", + typeUrl: '/cosmos.distribution.v1beta1.MsgFundCommunityPool', + aminoType: 'cosmos-sdk/MsgFundCommunityPool', is(o: any): o is MsgFundCommunityPool { - return o && (o.$typeUrl === MsgFundCommunityPool.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])) && typeof o.depositor === "string"); + return o && (o.$typeUrl === MsgFundCommunityPool.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])) && typeof o.depositor === 'string'); }, isAmino(o: any): o is MsgFundCommunityPoolAmino { - return o && (o.$typeUrl === MsgFundCommunityPool.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])) && typeof o.depositor === "string"); + return o && (o.$typeUrl === MsgFundCommunityPool.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])) && typeof o.depositor === 'string'); }, encode(message: MsgFundCommunityPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.amount) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(18).string(message.depositor); } return writer; @@ -857,15 +857,15 @@ export const MsgFundCommunityPool = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.depositor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -873,7 +873,7 @@ export const MsgFundCommunityPool = { fromPartial(object: DeepPartial): MsgFundCommunityPool { const message = createBaseMsgFundCommunityPool(); message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - message.depositor = object.depositor ?? ""; + message.depositor = object.depositor ?? ''; return message; }, fromAmino(object: MsgFundCommunityPoolAmino): MsgFundCommunityPool { @@ -891,7 +891,7 @@ export const MsgFundCommunityPool = { } else { obj.amount = message.amount; } - obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.depositor = message.depositor === '' ? undefined : message.depositor; return obj; }, fromAminoMsg(object: MsgFundCommunityPoolAminoMsg): MsgFundCommunityPool { @@ -899,7 +899,7 @@ export const MsgFundCommunityPool = { }, toAminoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolAminoMsg { return { - type: "cosmos-sdk/MsgFundCommunityPool", + type: 'cosmos-sdk/MsgFundCommunityPool', value: MsgFundCommunityPool.toAmino(message) }; }, @@ -911,7 +911,7 @@ export const MsgFundCommunityPool = { }, toProtoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", + typeUrl: '/cosmos.distribution.v1beta1.MsgFundCommunityPool', value: MsgFundCommunityPool.encode(message).finish() }; } @@ -922,8 +922,8 @@ function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse return {}; } export const MsgFundCommunityPoolResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", - aminoType: "cosmos-sdk/MsgFundCommunityPoolResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse', + aminoType: 'cosmos-sdk/MsgFundCommunityPoolResponse', is(o: any): o is MsgFundCommunityPoolResponse { return o && o.$typeUrl === MsgFundCommunityPoolResponse.typeUrl; }, @@ -940,9 +940,9 @@ export const MsgFundCommunityPoolResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -964,7 +964,7 @@ export const MsgFundCommunityPoolResponse = { }, toAminoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseAminoMsg { return { - type: "cosmos-sdk/MsgFundCommunityPoolResponse", + type: 'cosmos-sdk/MsgFundCommunityPoolResponse', value: MsgFundCommunityPoolResponse.toAmino(message) }; }, @@ -976,7 +976,7 @@ export const MsgFundCommunityPoolResponse = { }, toProtoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse', value: MsgFundCommunityPoolResponse.encode(message).finish() }; } @@ -985,21 +985,21 @@ GlobalDecoderRegistry.register(MsgFundCommunityPoolResponse.typeUrl, MsgFundComm GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPoolResponse.aminoType, MsgFundCommunityPoolResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - authority: "", + authority: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", - aminoType: "cosmos-sdk/distribution/MsgUpdateParams", + typeUrl: '/cosmos.distribution.v1beta1.MsgUpdateParams', + aminoType: 'cosmos-sdk/distribution/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.params !== undefined) { @@ -1014,22 +1014,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -1045,7 +1045,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({})); return obj; }, @@ -1054,7 +1054,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/distribution/MsgUpdateParams", + type: 'cosmos-sdk/distribution/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -1066,7 +1066,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", + typeUrl: '/cosmos.distribution.v1beta1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -1077,8 +1077,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/MsgUpdateParamsResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -1095,9 +1095,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1119,7 +1119,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParamsResponse", + type: 'cosmos-sdk/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -1131,7 +1131,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } @@ -1140,25 +1140,25 @@ GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsR GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCommunityPoolSpend(): MsgCommunityPoolSpend { return { - authority: "", - recipient: "", + authority: '', + recipient: '', amount: [] }; } export const MsgCommunityPoolSpend = { - typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", - aminoType: "cosmos-sdk/distr/MsgCommunityPoolSpend", + typeUrl: '/cosmos.distribution.v1beta1.MsgCommunityPoolSpend', + aminoType: 'cosmos-sdk/distr/MsgCommunityPoolSpend', is(o: any): o is MsgCommunityPoolSpend { - return o && (o.$typeUrl === MsgCommunityPoolSpend.typeUrl || typeof o.authority === "string" && typeof o.recipient === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === MsgCommunityPoolSpend.typeUrl || typeof o.authority === 'string' && typeof o.recipient === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is MsgCommunityPoolSpendAmino { - return o && (o.$typeUrl === MsgCommunityPoolSpend.typeUrl || typeof o.authority === "string" && typeof o.recipient === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === MsgCommunityPoolSpend.typeUrl || typeof o.authority === 'string' && typeof o.recipient === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: MsgCommunityPoolSpend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } - if (message.recipient !== "") { + if (message.recipient !== '') { writer.uint32(18).string(message.recipient); } for (const v of message.amount) { @@ -1173,26 +1173,26 @@ export const MsgCommunityPoolSpend = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.recipient = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.recipient = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCommunityPoolSpend { const message = createBaseMsgCommunityPoolSpend(); - message.authority = object.authority ?? ""; - message.recipient = object.recipient ?? ""; + message.authority = object.authority ?? ''; + message.recipient = object.recipient ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -1209,8 +1209,8 @@ export const MsgCommunityPoolSpend = { }, toAmino(message: MsgCommunityPoolSpend): MsgCommunityPoolSpendAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; - obj.recipient = message.recipient === "" ? undefined : message.recipient; + obj.authority = message.authority === '' ? undefined : message.authority; + obj.recipient = message.recipient === '' ? undefined : message.recipient; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -1223,7 +1223,7 @@ export const MsgCommunityPoolSpend = { }, toAminoMsg(message: MsgCommunityPoolSpend): MsgCommunityPoolSpendAminoMsg { return { - type: "cosmos-sdk/distr/MsgCommunityPoolSpend", + type: 'cosmos-sdk/distr/MsgCommunityPoolSpend', value: MsgCommunityPoolSpend.toAmino(message) }; }, @@ -1235,7 +1235,7 @@ export const MsgCommunityPoolSpend = { }, toProtoMsg(message: MsgCommunityPoolSpend): MsgCommunityPoolSpendProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", + typeUrl: '/cosmos.distribution.v1beta1.MsgCommunityPoolSpend', value: MsgCommunityPoolSpend.encode(message).finish() }; } @@ -1246,8 +1246,8 @@ function createBaseMsgCommunityPoolSpendResponse(): MsgCommunityPoolSpendRespons return {}; } export const MsgCommunityPoolSpendResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", - aminoType: "cosmos-sdk/MsgCommunityPoolSpendResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse', + aminoType: 'cosmos-sdk/MsgCommunityPoolSpendResponse', is(o: any): o is MsgCommunityPoolSpendResponse { return o && o.$typeUrl === MsgCommunityPoolSpendResponse.typeUrl; }, @@ -1264,9 +1264,9 @@ export const MsgCommunityPoolSpendResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1288,7 +1288,7 @@ export const MsgCommunityPoolSpendResponse = { }, toAminoMsg(message: MsgCommunityPoolSpendResponse): MsgCommunityPoolSpendResponseAminoMsg { return { - type: "cosmos-sdk/MsgCommunityPoolSpendResponse", + type: 'cosmos-sdk/MsgCommunityPoolSpendResponse', value: MsgCommunityPoolSpendResponse.toAmino(message) }; }, @@ -1300,7 +1300,7 @@ export const MsgCommunityPoolSpendResponse = { }, toProtoMsg(message: MsgCommunityPoolSpendResponse): MsgCommunityPoolSpendResponseProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse', value: MsgCommunityPoolSpendResponse.encode(message).finish() }; } @@ -1309,25 +1309,25 @@ GlobalDecoderRegistry.register(MsgCommunityPoolSpendResponse.typeUrl, MsgCommuni GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpendResponse.aminoType, MsgCommunityPoolSpendResponse.typeUrl); function createBaseMsgDepositValidatorRewardsPool(): MsgDepositValidatorRewardsPool { return { - depositor: "", - validatorAddress: "", + depositor: '', + validatorAddress: '', amount: [] }; } export const MsgDepositValidatorRewardsPool = { - typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", - aminoType: "cosmos-sdk/distr/MsgDepositValRewards", + typeUrl: '/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool', + aminoType: 'cosmos-sdk/distr/MsgDepositValRewards', is(o: any): o is MsgDepositValidatorRewardsPool { - return o && (o.$typeUrl === MsgDepositValidatorRewardsPool.typeUrl || typeof o.depositor === "string" && typeof o.validatorAddress === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === MsgDepositValidatorRewardsPool.typeUrl || typeof o.depositor === 'string' && typeof o.validatorAddress === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is MsgDepositValidatorRewardsPoolAmino { - return o && (o.$typeUrl === MsgDepositValidatorRewardsPool.typeUrl || typeof o.depositor === "string" && typeof o.validator_address === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === MsgDepositValidatorRewardsPool.typeUrl || typeof o.depositor === 'string' && typeof o.validator_address === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: MsgDepositValidatorRewardsPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(10).string(message.depositor); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } for (const v of message.amount) { @@ -1342,26 +1342,26 @@ export const MsgDepositValidatorRewardsPool = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.depositor = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.depositor = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgDepositValidatorRewardsPool { const message = createBaseMsgDepositValidatorRewardsPool(); - message.depositor = object.depositor ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.depositor = object.depositor ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -1378,8 +1378,8 @@ export const MsgDepositValidatorRewardsPool = { }, toAmino(message: MsgDepositValidatorRewardsPool): MsgDepositValidatorRewardsPoolAmino { const obj: any = {}; - obj.depositor = message.depositor === "" ? undefined : message.depositor; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.depositor = message.depositor === '' ? undefined : message.depositor; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -1392,7 +1392,7 @@ export const MsgDepositValidatorRewardsPool = { }, toAminoMsg(message: MsgDepositValidatorRewardsPool): MsgDepositValidatorRewardsPoolAminoMsg { return { - type: "cosmos-sdk/distr/MsgDepositValRewards", + type: 'cosmos-sdk/distr/MsgDepositValRewards', value: MsgDepositValidatorRewardsPool.toAmino(message) }; }, @@ -1404,7 +1404,7 @@ export const MsgDepositValidatorRewardsPool = { }, toProtoMsg(message: MsgDepositValidatorRewardsPool): MsgDepositValidatorRewardsPoolProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", + typeUrl: '/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool', value: MsgDepositValidatorRewardsPool.encode(message).finish() }; } @@ -1415,8 +1415,8 @@ function createBaseMsgDepositValidatorRewardsPoolResponse(): MsgDepositValidator return {}; } export const MsgDepositValidatorRewardsPoolResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", - aminoType: "cosmos-sdk/MsgDepositValidatorRewardsPoolResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse', + aminoType: 'cosmos-sdk/MsgDepositValidatorRewardsPoolResponse', is(o: any): o is MsgDepositValidatorRewardsPoolResponse { return o && o.$typeUrl === MsgDepositValidatorRewardsPoolResponse.typeUrl; }, @@ -1433,9 +1433,9 @@ export const MsgDepositValidatorRewardsPoolResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1457,7 +1457,7 @@ export const MsgDepositValidatorRewardsPoolResponse = { }, toAminoMsg(message: MsgDepositValidatorRewardsPoolResponse): MsgDepositValidatorRewardsPoolResponseAminoMsg { return { - type: "cosmos-sdk/MsgDepositValidatorRewardsPoolResponse", + type: 'cosmos-sdk/MsgDepositValidatorRewardsPoolResponse', value: MsgDepositValidatorRewardsPoolResponse.toAmino(message) }; }, @@ -1469,7 +1469,7 @@ export const MsgDepositValidatorRewardsPoolResponse = { }, toProtoMsg(message: MsgDepositValidatorRewardsPoolResponse): MsgDepositValidatorRewardsPoolResponseProtoMsg { return { - typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", + typeUrl: '/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse', value: MsgDepositValidatorRewardsPoolResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.amino.ts b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.amino.ts index abc5f21a..53a9db78 100644 --- a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.amino.ts @@ -1,17 +1,17 @@ -import { MsgGrantAllowance, MsgRevokeAllowance, MsgPruneAllowances } from "./tx"; +import { MsgGrantAllowance, MsgPruneAllowances,MsgRevokeAllowance } from './tx'; export const AminoConverter = { - "/cosmos.feegrant.v1beta1.MsgGrantAllowance": { - aminoType: "cosmos-sdk/MsgGrantAllowance", + '/cosmos.feegrant.v1beta1.MsgGrantAllowance': { + aminoType: 'cosmos-sdk/MsgGrantAllowance', toAmino: MsgGrantAllowance.toAmino, fromAmino: MsgGrantAllowance.fromAmino }, - "/cosmos.feegrant.v1beta1.MsgRevokeAllowance": { - aminoType: "cosmos-sdk/MsgRevokeAllowance", + '/cosmos.feegrant.v1beta1.MsgRevokeAllowance': { + aminoType: 'cosmos-sdk/MsgRevokeAllowance', toAmino: MsgRevokeAllowance.toAmino, fromAmino: MsgRevokeAllowance.fromAmino }, - "/cosmos.feegrant.v1beta1.MsgPruneAllowances": { - aminoType: "cosmos-sdk/MsgPruneAllowances", + '/cosmos.feegrant.v1beta1.MsgPruneAllowances': { + aminoType: 'cosmos-sdk/MsgPruneAllowances', toAmino: MsgPruneAllowances.toAmino, fromAmino: MsgPruneAllowances.fromAmino } diff --git a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.registry.ts b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.registry.ts index 7e4a084d..07904837 100644 --- a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgGrantAllowance, MsgRevokeAllowance, MsgPruneAllowances } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], ["/cosmos.feegrant.v1beta1.MsgPruneAllowances", MsgPruneAllowances]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgGrantAllowance, MsgPruneAllowances,MsgRevokeAllowance } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.feegrant.v1beta1.MsgGrantAllowance', MsgGrantAllowance], ['/cosmos.feegrant.v1beta1.MsgRevokeAllowance', MsgRevokeAllowance], ['/cosmos.feegrant.v1beta1.MsgPruneAllowances', MsgPruneAllowances]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.rpc.msg.ts index cd3e0147..ce826f76 100644 --- a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.rpc.msg.ts @@ -1,23 +1,23 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgGrantAllowance, MsgRevokeAllowance, MsgPruneAllowances } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgGrantAllowance, MsgPruneAllowances,MsgRevokeAllowance } from './tx'; /** Msg defines the feegrant msg service. */ export interface Msg { /** * GrantAllowance grants fee allowance to the grantee on the granter's * account with the provided expiration time. */ - grantAllowance(signerAddress: string, message: MsgGrantAllowance, fee: number | StdFee | "auto", memo?: string): Promise; + grantAllowance(signerAddress: string, message: MsgGrantAllowance, fee: number | StdFee | 'auto', memo?: string): Promise; /** * RevokeAllowance revokes any fee allowance of granter's account that * has been granted to the grantee. */ - revokeAllowance(signerAddress: string, message: MsgRevokeAllowance, fee: number | StdFee | "auto", memo?: string): Promise; + revokeAllowance(signerAddress: string, message: MsgRevokeAllowance, fee: number | StdFee | 'auto', memo?: string): Promise; /** * PruneAllowances prunes expired fee allowances, currently up to 75 at a time. * * Since cosmos-sdk 0.50 */ - pruneAllowances(signerAddress: string, message: MsgPruneAllowances, fee: number | StdFee | "auto", memo?: string): Promise; + pruneAllowances(signerAddress: string, message: MsgPruneAllowances, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -26,7 +26,7 @@ export class MsgClientImpl implements Msg { } /* GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time. */ - grantAllowance = async (signerAddress: string, message: MsgGrantAllowance, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + grantAllowance = async (signerAddress: string, message: MsgGrantAllowance, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgGrantAllowance.typeUrl, value: message @@ -35,7 +35,7 @@ export class MsgClientImpl implements Msg { }; /* RevokeAllowance revokes any fee allowance of granter's account that has been granted to the grantee. */ - revokeAllowance = async (signerAddress: string, message: MsgRevokeAllowance, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + revokeAllowance = async (signerAddress: string, message: MsgRevokeAllowance, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgRevokeAllowance.typeUrl, value: message @@ -45,7 +45,7 @@ export class MsgClientImpl implements Msg { /* PruneAllowances prunes expired fee allowances, currently up to 75 at a time. Since cosmos-sdk 0.50 */ - pruneAllowances = async (signerAddress: string, message: MsgPruneAllowances, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + pruneAllowances = async (signerAddress: string, message: MsgPruneAllowances, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgPruneAllowances.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.ts b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.ts index 9e674784..029bfeeb 100644 --- a/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.ts +++ b/libs/cosmos-types/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance * of fees from the account of Granter. @@ -15,10 +15,10 @@ export interface MsgGrantAllowance { allowance?: Any | undefined; } export interface MsgGrantAllowanceProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance"; + typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowance'; value: Uint8Array; } -export type MsgGrantAllowanceEncoded = Omit & { +export type MsgGrantAllowanceEncoded = Omit & { /** allowance can be any of basic, periodic, allowed fee allowance. */allowance?: AnyProtoMsg | undefined; }; /** @@ -34,19 +34,19 @@ export interface MsgGrantAllowanceAmino { allowance?: AnyAmino; } export interface MsgGrantAllowanceAminoMsg { - type: "cosmos-sdk/MsgGrantAllowance"; + type: 'cosmos-sdk/MsgGrantAllowance'; value: MsgGrantAllowanceAmino; } /** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ export interface MsgGrantAllowanceResponse {} export interface MsgGrantAllowanceResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse"; + typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse'; value: Uint8Array; } /** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ export interface MsgGrantAllowanceResponseAmino {} export interface MsgGrantAllowanceResponseAminoMsg { - type: "cosmos-sdk/MsgGrantAllowanceResponse"; + type: 'cosmos-sdk/MsgGrantAllowanceResponse'; value: MsgGrantAllowanceResponseAmino; } /** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ @@ -57,7 +57,7 @@ export interface MsgRevokeAllowance { grantee: string; } export interface MsgRevokeAllowanceProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance"; + typeUrl: '/cosmos.feegrant.v1beta1.MsgRevokeAllowance'; value: Uint8Array; } /** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ @@ -68,19 +68,19 @@ export interface MsgRevokeAllowanceAmino { grantee: string; } export interface MsgRevokeAllowanceAminoMsg { - type: "cosmos-sdk/MsgRevokeAllowance"; + type: 'cosmos-sdk/MsgRevokeAllowance'; value: MsgRevokeAllowanceAmino; } /** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ export interface MsgRevokeAllowanceResponse {} export interface MsgRevokeAllowanceResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse"; + typeUrl: '/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse'; value: Uint8Array; } /** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ export interface MsgRevokeAllowanceResponseAmino {} export interface MsgRevokeAllowanceResponseAminoMsg { - type: "cosmos-sdk/MsgRevokeAllowanceResponse"; + type: 'cosmos-sdk/MsgRevokeAllowanceResponse'; value: MsgRevokeAllowanceResponseAmino; } /** @@ -93,7 +93,7 @@ export interface MsgPruneAllowances { pruner: string; } export interface MsgPruneAllowancesProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances"; + typeUrl: '/cosmos.feegrant.v1beta1.MsgPruneAllowances'; value: Uint8Array; } /** @@ -106,7 +106,7 @@ export interface MsgPruneAllowancesAmino { pruner: string; } export interface MsgPruneAllowancesAminoMsg { - type: "cosmos-sdk/MsgPruneAllowances"; + type: 'cosmos-sdk/MsgPruneAllowances'; value: MsgPruneAllowancesAmino; } /** @@ -116,7 +116,7 @@ export interface MsgPruneAllowancesAminoMsg { */ export interface MsgPruneAllowancesResponse {} export interface MsgPruneAllowancesResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse"; + typeUrl: '/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse'; value: Uint8Array; } /** @@ -126,30 +126,30 @@ export interface MsgPruneAllowancesResponseProtoMsg { */ export interface MsgPruneAllowancesResponseAmino {} export interface MsgPruneAllowancesResponseAminoMsg { - type: "cosmos-sdk/MsgPruneAllowancesResponse"; + type: 'cosmos-sdk/MsgPruneAllowancesResponse'; value: MsgPruneAllowancesResponseAmino; } function createBaseMsgGrantAllowance(): MsgGrantAllowance { return { - granter: "", - grantee: "", + granter: '', + grantee: '', allowance: undefined }; } export const MsgGrantAllowance = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - aminoType: "cosmos-sdk/MsgGrantAllowance", + typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowance', + aminoType: 'cosmos-sdk/MsgGrantAllowance', is(o: any): o is MsgGrantAllowance { - return o && (o.$typeUrl === MsgGrantAllowance.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string"); + return o && (o.$typeUrl === MsgGrantAllowance.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string'); }, isAmino(o: any): o is MsgGrantAllowanceAmino { - return o && (o.$typeUrl === MsgGrantAllowance.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string"); + return o && (o.$typeUrl === MsgGrantAllowance.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string'); }, encode(message: MsgGrantAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { + if (message.granter !== '') { writer.uint32(10).string(message.granter); } - if (message.grantee !== "") { + if (message.grantee !== '') { writer.uint32(18).string(message.grantee); } if (message.allowance !== undefined) { @@ -164,26 +164,26 @@ export const MsgGrantAllowance = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.allowance = GlobalDecoderRegistry.unwrapAny(reader); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.granter = reader.string(); + break; + case 2: + message.grantee = reader.string(); + break; + case 3: + message.allowance = GlobalDecoderRegistry.unwrapAny(reader); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgGrantAllowance { const message = createBaseMsgGrantAllowance(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; + message.granter = object.granter ?? ''; + message.grantee = object.grantee ?? ''; message.allowance = object.allowance !== undefined && object.allowance !== null ? GlobalDecoderRegistry.fromPartial(object.allowance) : undefined; return message; }, @@ -202,8 +202,8 @@ export const MsgGrantAllowance = { }, toAmino(message: MsgGrantAllowance): MsgGrantAllowanceAmino { const obj: any = {}; - obj.granter = message.granter === "" ? undefined : message.granter; - obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.granter = message.granter === '' ? undefined : message.granter; + obj.grantee = message.grantee === '' ? undefined : message.grantee; obj.allowance = message.allowance ? GlobalDecoderRegistry.toAminoMsg(message.allowance) : undefined; return obj; }, @@ -212,7 +212,7 @@ export const MsgGrantAllowance = { }, toAminoMsg(message: MsgGrantAllowance): MsgGrantAllowanceAminoMsg { return { - type: "cosmos-sdk/MsgGrantAllowance", + type: 'cosmos-sdk/MsgGrantAllowance', value: MsgGrantAllowance.toAmino(message) }; }, @@ -224,7 +224,7 @@ export const MsgGrantAllowance = { }, toProtoMsg(message: MsgGrantAllowance): MsgGrantAllowanceProtoMsg { return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", + typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowance', value: MsgGrantAllowance.encode(message).finish() }; } @@ -235,8 +235,8 @@ function createBaseMsgGrantAllowanceResponse(): MsgGrantAllowanceResponse { return {}; } export const MsgGrantAllowanceResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", - aminoType: "cosmos-sdk/MsgGrantAllowanceResponse", + typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse', + aminoType: 'cosmos-sdk/MsgGrantAllowanceResponse', is(o: any): o is MsgGrantAllowanceResponse { return o && o.$typeUrl === MsgGrantAllowanceResponse.typeUrl; }, @@ -253,9 +253,9 @@ export const MsgGrantAllowanceResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -277,7 +277,7 @@ export const MsgGrantAllowanceResponse = { }, toAminoMsg(message: MsgGrantAllowanceResponse): MsgGrantAllowanceResponseAminoMsg { return { - type: "cosmos-sdk/MsgGrantAllowanceResponse", + type: 'cosmos-sdk/MsgGrantAllowanceResponse', value: MsgGrantAllowanceResponse.toAmino(message) }; }, @@ -289,7 +289,7 @@ export const MsgGrantAllowanceResponse = { }, toProtoMsg(message: MsgGrantAllowanceResponse): MsgGrantAllowanceResponseProtoMsg { return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", + typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse', value: MsgGrantAllowanceResponse.encode(message).finish() }; } @@ -298,24 +298,24 @@ GlobalDecoderRegistry.register(MsgGrantAllowanceResponse.typeUrl, MsgGrantAllowa GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowanceResponse.aminoType, MsgGrantAllowanceResponse.typeUrl); function createBaseMsgRevokeAllowance(): MsgRevokeAllowance { return { - granter: "", - grantee: "" + granter: '', + grantee: '' }; } export const MsgRevokeAllowance = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - aminoType: "cosmos-sdk/MsgRevokeAllowance", + typeUrl: '/cosmos.feegrant.v1beta1.MsgRevokeAllowance', + aminoType: 'cosmos-sdk/MsgRevokeAllowance', is(o: any): o is MsgRevokeAllowance { - return o && (o.$typeUrl === MsgRevokeAllowance.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string"); + return o && (o.$typeUrl === MsgRevokeAllowance.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string'); }, isAmino(o: any): o is MsgRevokeAllowanceAmino { - return o && (o.$typeUrl === MsgRevokeAllowance.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string"); + return o && (o.$typeUrl === MsgRevokeAllowance.typeUrl || typeof o.granter === 'string' && typeof o.grantee === 'string'); }, encode(message: MsgRevokeAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { + if (message.granter !== '') { writer.uint32(10).string(message.granter); } - if (message.grantee !== "") { + if (message.grantee !== '') { writer.uint32(18).string(message.grantee); } return writer; @@ -327,23 +327,23 @@ export const MsgRevokeAllowance = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.granter = reader.string(); + break; + case 2: + message.grantee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgRevokeAllowance { const message = createBaseMsgRevokeAllowance(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; + message.granter = object.granter ?? ''; + message.grantee = object.grantee ?? ''; return message; }, fromAmino(object: MsgRevokeAllowanceAmino): MsgRevokeAllowance { @@ -358,8 +358,8 @@ export const MsgRevokeAllowance = { }, toAmino(message: MsgRevokeAllowance): MsgRevokeAllowanceAmino { const obj: any = {}; - obj.granter = message.granter === "" ? undefined : message.granter; - obj.grantee = message.grantee === "" ? undefined : message.grantee; + obj.granter = message.granter === '' ? undefined : message.granter; + obj.grantee = message.grantee === '' ? undefined : message.grantee; return obj; }, fromAminoMsg(object: MsgRevokeAllowanceAminoMsg): MsgRevokeAllowance { @@ -367,7 +367,7 @@ export const MsgRevokeAllowance = { }, toAminoMsg(message: MsgRevokeAllowance): MsgRevokeAllowanceAminoMsg { return { - type: "cosmos-sdk/MsgRevokeAllowance", + type: 'cosmos-sdk/MsgRevokeAllowance', value: MsgRevokeAllowance.toAmino(message) }; }, @@ -379,7 +379,7 @@ export const MsgRevokeAllowance = { }, toProtoMsg(message: MsgRevokeAllowance): MsgRevokeAllowanceProtoMsg { return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", + typeUrl: '/cosmos.feegrant.v1beta1.MsgRevokeAllowance', value: MsgRevokeAllowance.encode(message).finish() }; } @@ -390,8 +390,8 @@ function createBaseMsgRevokeAllowanceResponse(): MsgRevokeAllowanceResponse { return {}; } export const MsgRevokeAllowanceResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", - aminoType: "cosmos-sdk/MsgRevokeAllowanceResponse", + typeUrl: '/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse', + aminoType: 'cosmos-sdk/MsgRevokeAllowanceResponse', is(o: any): o is MsgRevokeAllowanceResponse { return o && o.$typeUrl === MsgRevokeAllowanceResponse.typeUrl; }, @@ -408,9 +408,9 @@ export const MsgRevokeAllowanceResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -432,7 +432,7 @@ export const MsgRevokeAllowanceResponse = { }, toAminoMsg(message: MsgRevokeAllowanceResponse): MsgRevokeAllowanceResponseAminoMsg { return { - type: "cosmos-sdk/MsgRevokeAllowanceResponse", + type: 'cosmos-sdk/MsgRevokeAllowanceResponse', value: MsgRevokeAllowanceResponse.toAmino(message) }; }, @@ -444,7 +444,7 @@ export const MsgRevokeAllowanceResponse = { }, toProtoMsg(message: MsgRevokeAllowanceResponse): MsgRevokeAllowanceResponseProtoMsg { return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", + typeUrl: '/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse', value: MsgRevokeAllowanceResponse.encode(message).finish() }; } @@ -453,20 +453,20 @@ GlobalDecoderRegistry.register(MsgRevokeAllowanceResponse.typeUrl, MsgRevokeAllo GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowanceResponse.aminoType, MsgRevokeAllowanceResponse.typeUrl); function createBaseMsgPruneAllowances(): MsgPruneAllowances { return { - pruner: "" + pruner: '' }; } export const MsgPruneAllowances = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances", - aminoType: "cosmos-sdk/MsgPruneAllowances", + typeUrl: '/cosmos.feegrant.v1beta1.MsgPruneAllowances', + aminoType: 'cosmos-sdk/MsgPruneAllowances', is(o: any): o is MsgPruneAllowances { - return o && (o.$typeUrl === MsgPruneAllowances.typeUrl || typeof o.pruner === "string"); + return o && (o.$typeUrl === MsgPruneAllowances.typeUrl || typeof o.pruner === 'string'); }, isAmino(o: any): o is MsgPruneAllowancesAmino { - return o && (o.$typeUrl === MsgPruneAllowances.typeUrl || typeof o.pruner === "string"); + return o && (o.$typeUrl === MsgPruneAllowances.typeUrl || typeof o.pruner === 'string'); }, encode(message: MsgPruneAllowances, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pruner !== "") { + if (message.pruner !== '') { writer.uint32(10).string(message.pruner); } return writer; @@ -478,19 +478,19 @@ export const MsgPruneAllowances = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pruner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pruner = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgPruneAllowances { const message = createBaseMsgPruneAllowances(); - message.pruner = object.pruner ?? ""; + message.pruner = object.pruner ?? ''; return message; }, fromAmino(object: MsgPruneAllowancesAmino): MsgPruneAllowances { @@ -502,7 +502,7 @@ export const MsgPruneAllowances = { }, toAmino(message: MsgPruneAllowances): MsgPruneAllowancesAmino { const obj: any = {}; - obj.pruner = message.pruner === "" ? undefined : message.pruner; + obj.pruner = message.pruner === '' ? undefined : message.pruner; return obj; }, fromAminoMsg(object: MsgPruneAllowancesAminoMsg): MsgPruneAllowances { @@ -510,7 +510,7 @@ export const MsgPruneAllowances = { }, toAminoMsg(message: MsgPruneAllowances): MsgPruneAllowancesAminoMsg { return { - type: "cosmos-sdk/MsgPruneAllowances", + type: 'cosmos-sdk/MsgPruneAllowances', value: MsgPruneAllowances.toAmino(message) }; }, @@ -522,7 +522,7 @@ export const MsgPruneAllowances = { }, toProtoMsg(message: MsgPruneAllowances): MsgPruneAllowancesProtoMsg { return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances", + typeUrl: '/cosmos.feegrant.v1beta1.MsgPruneAllowances', value: MsgPruneAllowances.encode(message).finish() }; } @@ -533,8 +533,8 @@ function createBaseMsgPruneAllowancesResponse(): MsgPruneAllowancesResponse { return {}; } export const MsgPruneAllowancesResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", - aminoType: "cosmos-sdk/MsgPruneAllowancesResponse", + typeUrl: '/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse', + aminoType: 'cosmos-sdk/MsgPruneAllowancesResponse', is(o: any): o is MsgPruneAllowancesResponse { return o && o.$typeUrl === MsgPruneAllowancesResponse.typeUrl; }, @@ -551,9 +551,9 @@ export const MsgPruneAllowancesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -575,7 +575,7 @@ export const MsgPruneAllowancesResponse = { }, toAminoMsg(message: MsgPruneAllowancesResponse): MsgPruneAllowancesResponseAminoMsg { return { - type: "cosmos-sdk/MsgPruneAllowancesResponse", + type: 'cosmos-sdk/MsgPruneAllowancesResponse', value: MsgPruneAllowancesResponse.toAmino(message) }; }, @@ -587,7 +587,7 @@ export const MsgPruneAllowancesResponse = { }, toProtoMsg(message: MsgPruneAllowancesResponse): MsgPruneAllowancesResponseProtoMsg { return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", + typeUrl: '/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse', value: MsgPruneAllowancesResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/gov/v1/gov.ts b/libs/cosmos-types/cosmos/gov/v1/gov.ts index f6b2c25b..ab8f6854 100644 --- a/libs/cosmos-types/cosmos/gov/v1/gov.ts +++ b/libs/cosmos-types/cosmos/gov/v1/gov.ts @@ -1,10 +1,10 @@ -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { Any, AnyAmino } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino } from "../../../google/protobuf/duration"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino } from '../../../google/protobuf/any'; +import { Duration, DurationAmino } from '../../../google/protobuf/duration'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { DeepPartial, fromTimestamp,isSet, toTimestamp } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; /** VoteOption enumerates the valid vote options for a given governance proposal. */ export enum VoteOption { /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ @@ -22,42 +22,42 @@ export enum VoteOption { export const VoteOptionAmino = VoteOption; export function voteOptionFromJSON(object: any): VoteOption { switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; + case 0: + case 'VOTE_OPTION_UNSPECIFIED': + return VoteOption.VOTE_OPTION_UNSPECIFIED; + case 1: + case 'VOTE_OPTION_YES': + return VoteOption.VOTE_OPTION_YES; + case 2: + case 'VOTE_OPTION_ABSTAIN': + return VoteOption.VOTE_OPTION_ABSTAIN; + case 3: + case 'VOTE_OPTION_NO': + return VoteOption.VOTE_OPTION_NO; + case 4: + case 'VOTE_OPTION_NO_WITH_VETO': + return VoteOption.VOTE_OPTION_NO_WITH_VETO; + case -1: + case 'UNRECOGNIZED': + default: + return VoteOption.UNRECOGNIZED; } } export function voteOptionToJSON(object: VoteOption): string { switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - case VoteOption.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case VoteOption.VOTE_OPTION_UNSPECIFIED: + return 'VOTE_OPTION_UNSPECIFIED'; + case VoteOption.VOTE_OPTION_YES: + return 'VOTE_OPTION_YES'; + case VoteOption.VOTE_OPTION_ABSTAIN: + return 'VOTE_OPTION_ABSTAIN'; + case VoteOption.VOTE_OPTION_NO: + return 'VOTE_OPTION_NO'; + case VoteOption.VOTE_OPTION_NO_WITH_VETO: + return 'VOTE_OPTION_NO_WITH_VETO'; + case VoteOption.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** ProposalStatus enumerates the valid statuses of a proposal. */ @@ -94,47 +94,47 @@ export enum ProposalStatus { export const ProposalStatusAmino = ProposalStatus; export function proposalStatusFromJSON(object: any): ProposalStatus { switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; + case 0: + case 'PROPOSAL_STATUS_UNSPECIFIED': + return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; + case 1: + case 'PROPOSAL_STATUS_DEPOSIT_PERIOD': + return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; + case 2: + case 'PROPOSAL_STATUS_VOTING_PERIOD': + return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; + case 3: + case 'PROPOSAL_STATUS_PASSED': + return ProposalStatus.PROPOSAL_STATUS_PASSED; + case 4: + case 'PROPOSAL_STATUS_REJECTED': + return ProposalStatus.PROPOSAL_STATUS_REJECTED; + case 5: + case 'PROPOSAL_STATUS_FAILED': + return ProposalStatus.PROPOSAL_STATUS_FAILED; + case -1: + case 'UNRECOGNIZED': + default: + return ProposalStatus.UNRECOGNIZED; } } export function proposalStatusToJSON(object: ProposalStatus): string { switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - case ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: + return 'PROPOSAL_STATUS_UNSPECIFIED'; + case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: + return 'PROPOSAL_STATUS_DEPOSIT_PERIOD'; + case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: + return 'PROPOSAL_STATUS_VOTING_PERIOD'; + case ProposalStatus.PROPOSAL_STATUS_PASSED: + return 'PROPOSAL_STATUS_PASSED'; + case ProposalStatus.PROPOSAL_STATUS_REJECTED: + return 'PROPOSAL_STATUS_REJECTED'; + case ProposalStatus.PROPOSAL_STATUS_FAILED: + return 'PROPOSAL_STATUS_FAILED'; + case ProposalStatus.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** WeightedVoteOption defines a unit of vote for vote split. */ @@ -145,7 +145,7 @@ export interface WeightedVoteOption { weight: string; } export interface WeightedVoteOptionProtoMsg { - typeUrl: "/cosmos.gov.v1.WeightedVoteOption"; + typeUrl: '/cosmos.gov.v1.WeightedVoteOption'; value: Uint8Array; } /** WeightedVoteOption defines a unit of vote for vote split. */ @@ -156,7 +156,7 @@ export interface WeightedVoteOptionAmino { weight: string; } export interface WeightedVoteOptionAminoMsg { - type: "cosmos-sdk/v1/WeightedVoteOption"; + type: 'cosmos-sdk/v1/WeightedVoteOption'; value: WeightedVoteOptionAmino; } /** @@ -172,7 +172,7 @@ export interface Deposit { amount: Coin[]; } export interface DepositProtoMsg { - typeUrl: "/cosmos.gov.v1.Deposit"; + typeUrl: '/cosmos.gov.v1.Deposit'; value: Uint8Array; } /** @@ -188,7 +188,7 @@ export interface DepositAmino { amount: CoinAmino[]; } export interface DepositAminoMsg { - type: "cosmos-sdk/v1/Deposit"; + type: 'cosmos-sdk/v1/Deposit'; value: DepositAmino; } /** Proposal defines the core field members of a governance proposal. */ @@ -253,7 +253,7 @@ export interface Proposal { failedReason: string; } export interface ProposalProtoMsg { - typeUrl: "/cosmos.gov.v1.Proposal"; + typeUrl: '/cosmos.gov.v1.Proposal'; value: Uint8Array; } /** Proposal defines the core field members of a governance proposal. */ @@ -318,7 +318,7 @@ export interface ProposalAmino { failed_reason: string; } export interface ProposalAminoMsg { - type: "cosmos-sdk/v1/Proposal"; + type: 'cosmos-sdk/v1/Proposal'; value: ProposalAmino; } /** TallyResult defines a standard tally for a governance proposal. */ @@ -333,7 +333,7 @@ export interface TallyResult { noWithVetoCount: string; } export interface TallyResultProtoMsg { - typeUrl: "/cosmos.gov.v1.TallyResult"; + typeUrl: '/cosmos.gov.v1.TallyResult'; value: Uint8Array; } /** TallyResult defines a standard tally for a governance proposal. */ @@ -348,7 +348,7 @@ export interface TallyResultAmino { no_with_veto_count: string; } export interface TallyResultAminoMsg { - type: "cosmos-sdk/v1/TallyResult"; + type: 'cosmos-sdk/v1/TallyResult'; value: TallyResultAmino; } /** @@ -369,7 +369,7 @@ export interface Vote { metadata: string; } export interface VoteProtoMsg { - typeUrl: "/cosmos.gov.v1.Vote"; + typeUrl: '/cosmos.gov.v1.Vote'; value: Uint8Array; } /** @@ -390,7 +390,7 @@ export interface VoteAmino { metadata: string; } export interface VoteAminoMsg { - type: "cosmos-sdk/v1/Vote"; + type: 'cosmos-sdk/v1/Vote'; value: VoteAmino; } /** DepositParams defines the params for deposits on governance proposals. */ @@ -405,7 +405,7 @@ export interface DepositParams { maxDepositPeriod?: Duration; } export interface DepositParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.DepositParams"; + typeUrl: '/cosmos.gov.v1.DepositParams'; value: Uint8Array; } /** DepositParams defines the params for deposits on governance proposals. */ @@ -420,7 +420,7 @@ export interface DepositParamsAmino { max_deposit_period?: DurationAmino; } export interface DepositParamsAminoMsg { - type: "cosmos-sdk/v1/DepositParams"; + type: 'cosmos-sdk/v1/DepositParams'; value: DepositParamsAmino; } /** VotingParams defines the params for voting on governance proposals. */ @@ -430,7 +430,7 @@ export interface VotingParams { votingPeriod?: Duration; } export interface VotingParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.VotingParams"; + typeUrl: '/cosmos.gov.v1.VotingParams'; value: Uint8Array; } /** VotingParams defines the params for voting on governance proposals. */ @@ -440,7 +440,7 @@ export interface VotingParamsAmino { voting_period?: DurationAmino; } export interface VotingParamsAminoMsg { - type: "cosmos-sdk/v1/VotingParams"; + type: 'cosmos-sdk/v1/VotingParams'; value: VotingParamsAmino; } /** TallyParams defines the params for tallying votes on governance proposals. */ @@ -460,7 +460,7 @@ export interface TallyParams { vetoThreshold: string; } export interface TallyParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.TallyParams"; + typeUrl: '/cosmos.gov.v1.TallyParams'; value: Uint8Array; } /** TallyParams defines the params for tallying votes on governance proposals. */ @@ -480,7 +480,7 @@ export interface TallyParamsAmino { veto_threshold: string; } export interface TallyParamsAminoMsg { - type: "cosmos-sdk/v1/TallyParams"; + type: 'cosmos-sdk/v1/TallyParams'; value: TallyParamsAmino; } /** @@ -555,7 +555,7 @@ export interface Params { minDepositRatio: string; } export interface ParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.Params"; + typeUrl: '/cosmos.gov.v1.Params'; value: Uint8Array; } /** @@ -630,29 +630,29 @@ export interface ParamsAmino { min_deposit_ratio: string; } export interface ParamsAminoMsg { - type: "cosmos-sdk/v1/Params"; + type: 'cosmos-sdk/v1/Params'; value: ParamsAmino; } function createBaseWeightedVoteOption(): WeightedVoteOption { return { option: 0, - weight: "" + weight: '' }; } export const WeightedVoteOption = { - typeUrl: "/cosmos.gov.v1.WeightedVoteOption", - aminoType: "cosmos-sdk/v1/WeightedVoteOption", + typeUrl: '/cosmos.gov.v1.WeightedVoteOption', + aminoType: 'cosmos-sdk/v1/WeightedVoteOption', is(o: any): o is WeightedVoteOption { - return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string"); + return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === 'string'); }, isAmino(o: any): o is WeightedVoteOptionAmino { - return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string"); + return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === 'string'); }, encode(message: WeightedVoteOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.option !== 0) { writer.uint32(8).int32(message.option); } - if (message.weight !== "") { + if (message.weight !== '') { writer.uint32(18).string(message.weight); } return writer; @@ -664,15 +664,15 @@ export const WeightedVoteOption = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.option = (reader.int32() as any); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.option = (reader.int32() as any); + break; + case 2: + message.weight = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -680,7 +680,7 @@ export const WeightedVoteOption = { fromPartial(object: DeepPartial): WeightedVoteOption { const message = createBaseWeightedVoteOption(); message.option = object.option ?? 0; - message.weight = object.weight ?? ""; + message.weight = object.weight ?? ''; return message; }, fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption { @@ -696,7 +696,7 @@ export const WeightedVoteOption = { toAmino(message: WeightedVoteOption): WeightedVoteOptionAmino { const obj: any = {}; obj.option = message.option === 0 ? undefined : message.option; - obj.weight = message.weight === "" ? undefined : message.weight; + obj.weight = message.weight === '' ? undefined : message.weight; return obj; }, fromAminoMsg(object: WeightedVoteOptionAminoMsg): WeightedVoteOption { @@ -704,7 +704,7 @@ export const WeightedVoteOption = { }, toAminoMsg(message: WeightedVoteOption): WeightedVoteOptionAminoMsg { return { - type: "cosmos-sdk/v1/WeightedVoteOption", + type: 'cosmos-sdk/v1/WeightedVoteOption', value: WeightedVoteOption.toAmino(message) }; }, @@ -716,7 +716,7 @@ export const WeightedVoteOption = { }, toProtoMsg(message: WeightedVoteOption): WeightedVoteOptionProtoMsg { return { - typeUrl: "/cosmos.gov.v1.WeightedVoteOption", + typeUrl: '/cosmos.gov.v1.WeightedVoteOption', value: WeightedVoteOption.encode(message).finish() }; } @@ -726,24 +726,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, We function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), - depositor: "", + depositor: '', amount: [] }; } export const Deposit = { - typeUrl: "/cosmos.gov.v1.Deposit", - aminoType: "cosmos-sdk/v1/Deposit", + typeUrl: '/cosmos.gov.v1.Deposit', + aminoType: 'cosmos-sdk/v1/Deposit', is(o: any): o is Deposit { - return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposalId === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposalId === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is DepositAmino { - return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposal_id === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: Deposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(18).string(message.depositor); } for (const v of message.amount) { @@ -758,18 +758,18 @@ export const Deposit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -777,7 +777,7 @@ export const Deposit = { fromPartial(object: DeepPartial): Deposit { const message = createBaseDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; + message.depositor = object.depositor ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -795,7 +795,7 @@ export const Deposit = { toAmino(message: Deposit): DepositAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.depositor = message.depositor === '' ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -808,7 +808,7 @@ export const Deposit = { }, toAminoMsg(message: Deposit): DepositAminoMsg { return { - type: "cosmos-sdk/v1/Deposit", + type: 'cosmos-sdk/v1/Deposit', value: Deposit.toAmino(message) }; }, @@ -820,7 +820,7 @@ export const Deposit = { }, toProtoMsg(message: Deposit): DepositProtoMsg { return { - typeUrl: "/cosmos.gov.v1.Deposit", + typeUrl: '/cosmos.gov.v1.Deposit', value: Deposit.encode(message).finish() }; } @@ -838,22 +838,22 @@ function createBaseProposal(): Proposal { totalDeposit: [], votingStartTime: undefined, votingEndTime: undefined, - metadata: "", - title: "", - summary: "", - proposer: "", + metadata: '', + title: '', + summary: '', + proposer: '', expedited: false, - failedReason: "" + failedReason: '' }; } export const Proposal = { - typeUrl: "/cosmos.gov.v1.Proposal", - aminoType: "cosmos-sdk/v1/Proposal", + typeUrl: '/cosmos.gov.v1.Proposal', + aminoType: 'cosmos-sdk/v1/Proposal', is(o: any): o is Proposal { - return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === "bigint" && Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && isSet(o.status) && Array.isArray(o.totalDeposit) && (!o.totalDeposit.length || Coin.is(o.totalDeposit[0])) && typeof o.metadata === "string" && typeof o.title === "string" && typeof o.summary === "string" && typeof o.proposer === "string" && typeof o.expedited === "boolean" && typeof o.failedReason === "string"); + return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === 'bigint' && Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && isSet(o.status) && Array.isArray(o.totalDeposit) && (!o.totalDeposit.length || Coin.is(o.totalDeposit[0])) && typeof o.metadata === 'string' && typeof o.title === 'string' && typeof o.summary === 'string' && typeof o.proposer === 'string' && typeof o.expedited === 'boolean' && typeof o.failedReason === 'string'); }, isAmino(o: any): o is ProposalAmino { - return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === "bigint" && Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && isSet(o.status) && Array.isArray(o.total_deposit) && (!o.total_deposit.length || Coin.isAmino(o.total_deposit[0])) && typeof o.metadata === "string" && typeof o.title === "string" && typeof o.summary === "string" && typeof o.proposer === "string" && typeof o.expedited === "boolean" && typeof o.failed_reason === "string"); + return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === 'bigint' && Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && isSet(o.status) && Array.isArray(o.total_deposit) && (!o.total_deposit.length || Coin.isAmino(o.total_deposit[0])) && typeof o.metadata === 'string' && typeof o.title === 'string' && typeof o.summary === 'string' && typeof o.proposer === 'string' && typeof o.expedited === 'boolean' && typeof o.failed_reason === 'string'); }, encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.id !== BigInt(0)) { @@ -883,22 +883,22 @@ export const Proposal = { if (message.votingEndTime !== undefined) { Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim(); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(82).string(message.metadata); } - if (message.title !== "") { + if (message.title !== '') { writer.uint32(90).string(message.title); } - if (message.summary !== "") { + if (message.summary !== '') { writer.uint32(98).string(message.summary); } - if (message.proposer !== "") { + if (message.proposer !== '') { writer.uint32(106).string(message.proposer); } if (message.expedited === true) { writer.uint32(112).bool(message.expedited); } - if (message.failedReason !== "") { + if (message.failedReason !== '') { writer.uint32(122).string(message.failedReason); } return writer; @@ -910,54 +910,54 @@ export const Proposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 3: - message.status = (reader.int32() as any); - break; - case 4: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.totalDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 9: - message.votingEndTime = fromTimestamp(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; - case 14: - message.expedited = reader.bool(); - break; - case 15: - message.failedReason = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.id = reader.uint64(); + break; + case 2: + message.messages.push(Any.decode(reader, reader.uint32())); + break; + case 3: + message.status = (reader.int32() as any); + break; + case 4: + message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); + break; + case 5: + message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 6: + message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 7: + message.totalDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 8: + message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 9: + message.votingEndTime = fromTimestamp(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; + case 14: + message.expedited = reader.bool(); + break; + case 15: + message.failedReason = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -973,12 +973,12 @@ export const Proposal = { message.totalDeposit = object.totalDeposit?.map(e => Coin.fromPartial(e)) || []; message.votingStartTime = object.votingStartTime ?? undefined; message.votingEndTime = object.votingEndTime ?? undefined; - message.metadata = object.metadata ?? ""; - message.title = object.title ?? ""; - message.summary = object.summary ?? ""; - message.proposer = object.proposer ?? ""; + message.metadata = object.metadata ?? ''; + message.title = object.title ?? ''; + message.summary = object.summary ?? ''; + message.proposer = object.proposer ?? ''; message.expedited = object.expedited ?? false; - message.failedReason = object.failedReason ?? ""; + message.failedReason = object.failedReason ?? ''; return message; }, fromAmino(object: ProposalAmino): Proposal { @@ -1045,12 +1045,12 @@ export const Proposal = { } obj.voting_start_time = message.votingStartTime ? Timestamp.toAmino(toTimestamp(message.votingStartTime)) : undefined; obj.voting_end_time = message.votingEndTime ? Timestamp.toAmino(toTimestamp(message.votingEndTime)) : undefined; - obj.metadata = message.metadata === "" ? undefined : message.metadata; - obj.title = message.title === "" ? undefined : message.title; - obj.summary = message.summary === "" ? undefined : message.summary; - obj.proposer = message.proposer === "" ? undefined : message.proposer; + obj.metadata = message.metadata === '' ? undefined : message.metadata; + obj.title = message.title === '' ? undefined : message.title; + obj.summary = message.summary === '' ? undefined : message.summary; + obj.proposer = message.proposer === '' ? undefined : message.proposer; obj.expedited = message.expedited === false ? undefined : message.expedited; - obj.failed_reason = message.failedReason === "" ? undefined : message.failedReason; + obj.failed_reason = message.failedReason === '' ? undefined : message.failedReason; return obj; }, fromAminoMsg(object: ProposalAminoMsg): Proposal { @@ -1058,7 +1058,7 @@ export const Proposal = { }, toAminoMsg(message: Proposal): ProposalAminoMsg { return { - type: "cosmos-sdk/v1/Proposal", + type: 'cosmos-sdk/v1/Proposal', value: Proposal.toAmino(message) }; }, @@ -1070,7 +1070,7 @@ export const Proposal = { }, toProtoMsg(message: Proposal): ProposalProtoMsg { return { - typeUrl: "/cosmos.gov.v1.Proposal", + typeUrl: '/cosmos.gov.v1.Proposal', value: Proposal.encode(message).finish() }; } @@ -1079,32 +1079,32 @@ GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { - yesCount: "", - abstainCount: "", - noCount: "", - noWithVetoCount: "" + yesCount: '', + abstainCount: '', + noCount: '', + noWithVetoCount: '' }; } export const TallyResult = { - typeUrl: "/cosmos.gov.v1.TallyResult", - aminoType: "cosmos-sdk/v1/TallyResult", + typeUrl: '/cosmos.gov.v1.TallyResult', + aminoType: 'cosmos-sdk/v1/TallyResult', is(o: any): o is TallyResult { - return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yesCount === "string" && typeof o.abstainCount === "string" && typeof o.noCount === "string" && typeof o.noWithVetoCount === "string"); + return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yesCount === 'string' && typeof o.abstainCount === 'string' && typeof o.noCount === 'string' && typeof o.noWithVetoCount === 'string'); }, isAmino(o: any): o is TallyResultAmino { - return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes_count === "string" && typeof o.abstain_count === "string" && typeof o.no_count === "string" && typeof o.no_with_veto_count === "string"); + return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes_count === 'string' && typeof o.abstain_count === 'string' && typeof o.no_count === 'string' && typeof o.no_with_veto_count === 'string'); }, encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.yesCount !== "") { + if (message.yesCount !== '') { writer.uint32(10).string(message.yesCount); } - if (message.abstainCount !== "") { + if (message.abstainCount !== '') { writer.uint32(18).string(message.abstainCount); } - if (message.noCount !== "") { + if (message.noCount !== '') { writer.uint32(26).string(message.noCount); } - if (message.noWithVetoCount !== "") { + if (message.noWithVetoCount !== '') { writer.uint32(34).string(message.noWithVetoCount); } return writer; @@ -1116,31 +1116,31 @@ export const TallyResult = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.yesCount = reader.string(); - break; - case 2: - message.abstainCount = reader.string(); - break; - case 3: - message.noCount = reader.string(); - break; - case 4: - message.noWithVetoCount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.yesCount = reader.string(); + break; + case 2: + message.abstainCount = reader.string(); + break; + case 3: + message.noCount = reader.string(); + break; + case 4: + message.noWithVetoCount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): TallyResult { const message = createBaseTallyResult(); - message.yesCount = object.yesCount ?? ""; - message.abstainCount = object.abstainCount ?? ""; - message.noCount = object.noCount ?? ""; - message.noWithVetoCount = object.noWithVetoCount ?? ""; + message.yesCount = object.yesCount ?? ''; + message.abstainCount = object.abstainCount ?? ''; + message.noCount = object.noCount ?? ''; + message.noWithVetoCount = object.noWithVetoCount ?? ''; return message; }, fromAmino(object: TallyResultAmino): TallyResult { @@ -1161,10 +1161,10 @@ export const TallyResult = { }, toAmino(message: TallyResult): TallyResultAmino { const obj: any = {}; - obj.yes_count = message.yesCount === "" ? undefined : message.yesCount; - obj.abstain_count = message.abstainCount === "" ? undefined : message.abstainCount; - obj.no_count = message.noCount === "" ? undefined : message.noCount; - obj.no_with_veto_count = message.noWithVetoCount === "" ? undefined : message.noWithVetoCount; + obj.yes_count = message.yesCount === '' ? undefined : message.yesCount; + obj.abstain_count = message.abstainCount === '' ? undefined : message.abstainCount; + obj.no_count = message.noCount === '' ? undefined : message.noCount; + obj.no_with_veto_count = message.noWithVetoCount === '' ? undefined : message.noWithVetoCount; return obj; }, fromAminoMsg(object: TallyResultAminoMsg): TallyResult { @@ -1172,7 +1172,7 @@ export const TallyResult = { }, toAminoMsg(message: TallyResult): TallyResultAminoMsg { return { - type: "cosmos-sdk/v1/TallyResult", + type: 'cosmos-sdk/v1/TallyResult', value: TallyResult.toAmino(message) }; }, @@ -1184,7 +1184,7 @@ export const TallyResult = { }, toProtoMsg(message: TallyResult): TallyResultProtoMsg { return { - typeUrl: "/cosmos.gov.v1.TallyResult", + typeUrl: '/cosmos.gov.v1.TallyResult', value: TallyResult.encode(message).finish() }; } @@ -1194,31 +1194,31 @@ GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResu function createBaseVote(): Vote { return { proposalId: BigInt(0), - voter: "", + voter: '', options: [], - metadata: "" + metadata: '' }; } export const Vote = { - typeUrl: "/cosmos.gov.v1.Vote", - aminoType: "cosmos-sdk/v1/Vote", + typeUrl: '/cosmos.gov.v1.Vote', + aminoType: 'cosmos-sdk/v1/Vote', is(o: any): o is Vote { - return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0])) && typeof o.metadata === "string"); + return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0])) && typeof o.metadata === 'string'); }, isAmino(o: any): o is VoteAmino { - return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0])) && typeof o.metadata === "string"); + return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0])) && typeof o.metadata === 'string'); }, encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } for (const v of message.options) { WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim(); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(42).string(message.metadata); } return writer; @@ -1230,21 +1230,21 @@ export const Vote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 4: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - case 5: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 4: + message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); + break; + case 5: + message.metadata = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1252,9 +1252,9 @@ export const Vote = { fromPartial(object: DeepPartial): Vote { const message = createBaseVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; return message; }, fromAmino(object: VoteAmino): Vote { @@ -1274,13 +1274,13 @@ export const Vote = { toAmino(message: Vote): VoteAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.voter = message.voter === '' ? undefined : message.voter; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); } else { obj.options = message.options; } - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; return obj; }, fromAminoMsg(object: VoteAminoMsg): Vote { @@ -1288,7 +1288,7 @@ export const Vote = { }, toAminoMsg(message: Vote): VoteAminoMsg { return { - type: "cosmos-sdk/v1/Vote", + type: 'cosmos-sdk/v1/Vote', value: Vote.toAmino(message) }; }, @@ -1300,7 +1300,7 @@ export const Vote = { }, toProtoMsg(message: Vote): VoteProtoMsg { return { - typeUrl: "/cosmos.gov.v1.Vote", + typeUrl: '/cosmos.gov.v1.Vote', value: Vote.encode(message).finish() }; } @@ -1314,8 +1314,8 @@ function createBaseDepositParams(): DepositParams { }; } export const DepositParams = { - typeUrl: "/cosmos.gov.v1.DepositParams", - aminoType: "cosmos-sdk/v1/DepositParams", + typeUrl: '/cosmos.gov.v1.DepositParams', + aminoType: 'cosmos-sdk/v1/DepositParams', is(o: any): o is DepositParams { return o && (o.$typeUrl === DepositParams.typeUrl || Array.isArray(o.minDeposit) && (!o.minDeposit.length || Coin.is(o.minDeposit[0]))); }, @@ -1338,15 +1338,15 @@ export const DepositParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.minDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1380,7 +1380,7 @@ export const DepositParams = { }, toAminoMsg(message: DepositParams): DepositParamsAminoMsg { return { - type: "cosmos-sdk/v1/DepositParams", + type: 'cosmos-sdk/v1/DepositParams', value: DepositParams.toAmino(message) }; }, @@ -1392,7 +1392,7 @@ export const DepositParams = { }, toProtoMsg(message: DepositParams): DepositParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1.DepositParams", + typeUrl: '/cosmos.gov.v1.DepositParams', value: DepositParams.encode(message).finish() }; } @@ -1405,8 +1405,8 @@ function createBaseVotingParams(): VotingParams { }; } export const VotingParams = { - typeUrl: "/cosmos.gov.v1.VotingParams", - aminoType: "cosmos-sdk/v1/VotingParams", + typeUrl: '/cosmos.gov.v1.VotingParams', + aminoType: 'cosmos-sdk/v1/VotingParams', is(o: any): o is VotingParams { return o && o.$typeUrl === VotingParams.typeUrl; }, @@ -1426,12 +1426,12 @@ export const VotingParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.votingPeriod = Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1458,7 +1458,7 @@ export const VotingParams = { }, toAminoMsg(message: VotingParams): VotingParamsAminoMsg { return { - type: "cosmos-sdk/v1/VotingParams", + type: 'cosmos-sdk/v1/VotingParams', value: VotingParams.toAmino(message) }; }, @@ -1470,7 +1470,7 @@ export const VotingParams = { }, toProtoMsg(message: VotingParams): VotingParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1.VotingParams", + typeUrl: '/cosmos.gov.v1.VotingParams', value: VotingParams.encode(message).finish() }; } @@ -1479,28 +1479,28 @@ GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { - quorum: "", - threshold: "", - vetoThreshold: "" + quorum: '', + threshold: '', + vetoThreshold: '' }; } export const TallyParams = { - typeUrl: "/cosmos.gov.v1.TallyParams", - aminoType: "cosmos-sdk/v1/TallyParams", + typeUrl: '/cosmos.gov.v1.TallyParams', + aminoType: 'cosmos-sdk/v1/TallyParams', is(o: any): o is TallyParams { - return o && (o.$typeUrl === TallyParams.typeUrl || typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.vetoThreshold === "string"); + return o && (o.$typeUrl === TallyParams.typeUrl || typeof o.quorum === 'string' && typeof o.threshold === 'string' && typeof o.vetoThreshold === 'string'); }, isAmino(o: any): o is TallyParamsAmino { - return o && (o.$typeUrl === TallyParams.typeUrl || typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.veto_threshold === "string"); + return o && (o.$typeUrl === TallyParams.typeUrl || typeof o.quorum === 'string' && typeof o.threshold === 'string' && typeof o.veto_threshold === 'string'); }, encode(message: TallyParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.quorum !== "") { + if (message.quorum !== '') { writer.uint32(10).string(message.quorum); } - if (message.threshold !== "") { + if (message.threshold !== '') { writer.uint32(18).string(message.threshold); } - if (message.vetoThreshold !== "") { + if (message.vetoThreshold !== '') { writer.uint32(26).string(message.vetoThreshold); } return writer; @@ -1512,27 +1512,27 @@ export const TallyParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.quorum = reader.string(); - break; - case 2: - message.threshold = reader.string(); - break; - case 3: - message.vetoThreshold = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.quorum = reader.string(); + break; + case 2: + message.threshold = reader.string(); + break; + case 3: + message.vetoThreshold = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): TallyParams { const message = createBaseTallyParams(); - message.quorum = object.quorum ?? ""; - message.threshold = object.threshold ?? ""; - message.vetoThreshold = object.vetoThreshold ?? ""; + message.quorum = object.quorum ?? ''; + message.threshold = object.threshold ?? ''; + message.vetoThreshold = object.vetoThreshold ?? ''; return message; }, fromAmino(object: TallyParamsAmino): TallyParams { @@ -1550,9 +1550,9 @@ export const TallyParams = { }, toAmino(message: TallyParams): TallyParamsAmino { const obj: any = {}; - obj.quorum = message.quorum === "" ? undefined : message.quorum; - obj.threshold = message.threshold === "" ? undefined : message.threshold; - obj.veto_threshold = message.vetoThreshold === "" ? undefined : message.vetoThreshold; + obj.quorum = message.quorum === '' ? undefined : message.quorum; + obj.threshold = message.threshold === '' ? undefined : message.threshold; + obj.veto_threshold = message.vetoThreshold === '' ? undefined : message.vetoThreshold; return obj; }, fromAminoMsg(object: TallyParamsAminoMsg): TallyParams { @@ -1560,7 +1560,7 @@ export const TallyParams = { }, toAminoMsg(message: TallyParams): TallyParamsAminoMsg { return { - type: "cosmos-sdk/v1/TallyParams", + type: 'cosmos-sdk/v1/TallyParams', value: TallyParams.toAmino(message) }; }, @@ -1572,7 +1572,7 @@ export const TallyParams = { }, toProtoMsg(message: TallyParams): TallyParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1.TallyParams", + typeUrl: '/cosmos.gov.v1.TallyParams', value: TallyParams.encode(message).finish() }; } @@ -1584,29 +1584,29 @@ function createBaseParams(): Params { minDeposit: [], maxDepositPeriod: undefined, votingPeriod: undefined, - quorum: "", - threshold: "", - vetoThreshold: "", - minInitialDepositRatio: "", - proposalCancelRatio: "", - proposalCancelDest: "", + quorum: '', + threshold: '', + vetoThreshold: '', + minInitialDepositRatio: '', + proposalCancelRatio: '', + proposalCancelDest: '', expeditedVotingPeriod: undefined, - expeditedThreshold: "", + expeditedThreshold: '', expeditedMinDeposit: [], burnVoteQuorum: false, burnProposalDepositPrevote: false, burnVoteVeto: false, - minDepositRatio: "" + minDepositRatio: '' }; } export const Params = { - typeUrl: "/cosmos.gov.v1.Params", - aminoType: "cosmos-sdk/v1/Params", + typeUrl: '/cosmos.gov.v1.Params', + aminoType: 'cosmos-sdk/v1/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.minDeposit) && (!o.minDeposit.length || Coin.is(o.minDeposit[0])) && typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.vetoThreshold === "string" && typeof o.minInitialDepositRatio === "string" && typeof o.proposalCancelRatio === "string" && typeof o.proposalCancelDest === "string" && typeof o.expeditedThreshold === "string" && Array.isArray(o.expeditedMinDeposit) && (!o.expeditedMinDeposit.length || Coin.is(o.expeditedMinDeposit[0])) && typeof o.burnVoteQuorum === "boolean" && typeof o.burnProposalDepositPrevote === "boolean" && typeof o.burnVoteVeto === "boolean" && typeof o.minDepositRatio === "string"); + return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.minDeposit) && (!o.minDeposit.length || Coin.is(o.minDeposit[0])) && typeof o.quorum === 'string' && typeof o.threshold === 'string' && typeof o.vetoThreshold === 'string' && typeof o.minInitialDepositRatio === 'string' && typeof o.proposalCancelRatio === 'string' && typeof o.proposalCancelDest === 'string' && typeof o.expeditedThreshold === 'string' && Array.isArray(o.expeditedMinDeposit) && (!o.expeditedMinDeposit.length || Coin.is(o.expeditedMinDeposit[0])) && typeof o.burnVoteQuorum === 'boolean' && typeof o.burnProposalDepositPrevote === 'boolean' && typeof o.burnVoteVeto === 'boolean' && typeof o.minDepositRatio === 'string'); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.min_deposit) && (!o.min_deposit.length || Coin.isAmino(o.min_deposit[0])) && typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.veto_threshold === "string" && typeof o.min_initial_deposit_ratio === "string" && typeof o.proposal_cancel_ratio === "string" && typeof o.proposal_cancel_dest === "string" && typeof o.expedited_threshold === "string" && Array.isArray(o.expedited_min_deposit) && (!o.expedited_min_deposit.length || Coin.isAmino(o.expedited_min_deposit[0])) && typeof o.burn_vote_quorum === "boolean" && typeof o.burn_proposal_deposit_prevote === "boolean" && typeof o.burn_vote_veto === "boolean" && typeof o.min_deposit_ratio === "string"); + return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.min_deposit) && (!o.min_deposit.length || Coin.isAmino(o.min_deposit[0])) && typeof o.quorum === 'string' && typeof o.threshold === 'string' && typeof o.veto_threshold === 'string' && typeof o.min_initial_deposit_ratio === 'string' && typeof o.proposal_cancel_ratio === 'string' && typeof o.proposal_cancel_dest === 'string' && typeof o.expedited_threshold === 'string' && Array.isArray(o.expedited_min_deposit) && (!o.expedited_min_deposit.length || Coin.isAmino(o.expedited_min_deposit[0])) && typeof o.burn_vote_quorum === 'boolean' && typeof o.burn_proposal_deposit_prevote === 'boolean' && typeof o.burn_vote_veto === 'boolean' && typeof o.min_deposit_ratio === 'string'); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.minDeposit) { @@ -1618,28 +1618,28 @@ export const Params = { if (message.votingPeriod !== undefined) { Duration.encode(message.votingPeriod, writer.uint32(26).fork()).ldelim(); } - if (message.quorum !== "") { + if (message.quorum !== '') { writer.uint32(34).string(message.quorum); } - if (message.threshold !== "") { + if (message.threshold !== '') { writer.uint32(42).string(message.threshold); } - if (message.vetoThreshold !== "") { + if (message.vetoThreshold !== '') { writer.uint32(50).string(message.vetoThreshold); } - if (message.minInitialDepositRatio !== "") { + if (message.minInitialDepositRatio !== '') { writer.uint32(58).string(message.minInitialDepositRatio); } - if (message.proposalCancelRatio !== "") { + if (message.proposalCancelRatio !== '') { writer.uint32(66).string(message.proposalCancelRatio); } - if (message.proposalCancelDest !== "") { + if (message.proposalCancelDest !== '') { writer.uint32(74).string(message.proposalCancelDest); } if (message.expeditedVotingPeriod !== undefined) { Duration.encode(message.expeditedVotingPeriod, writer.uint32(82).fork()).ldelim(); } - if (message.expeditedThreshold !== "") { + if (message.expeditedThreshold !== '') { writer.uint32(90).string(message.expeditedThreshold); } for (const v of message.expeditedMinDeposit) { @@ -1654,7 +1654,7 @@ export const Params = { if (message.burnVoteVeto === true) { writer.uint32(120).bool(message.burnVoteVeto); } - if (message.minDepositRatio !== "") { + if (message.minDepositRatio !== '') { writer.uint32(130).string(message.minDepositRatio); } return writer; @@ -1666,57 +1666,57 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.quorum = reader.string(); - break; - case 5: - message.threshold = reader.string(); - break; - case 6: - message.vetoThreshold = reader.string(); - break; - case 7: - message.minInitialDepositRatio = reader.string(); - break; - case 8: - message.proposalCancelRatio = reader.string(); - break; - case 9: - message.proposalCancelDest = reader.string(); - break; - case 10: - message.expeditedVotingPeriod = Duration.decode(reader, reader.uint32()); - break; - case 11: - message.expeditedThreshold = reader.string(); - break; - case 12: - message.expeditedMinDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 13: - message.burnVoteQuorum = reader.bool(); - break; - case 14: - message.burnProposalDepositPrevote = reader.bool(); - break; - case 15: - message.burnVoteVeto = reader.bool(); - break; - case 16: - message.minDepositRatio = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.minDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); + break; + case 3: + message.votingPeriod = Duration.decode(reader, reader.uint32()); + break; + case 4: + message.quorum = reader.string(); + break; + case 5: + message.threshold = reader.string(); + break; + case 6: + message.vetoThreshold = reader.string(); + break; + case 7: + message.minInitialDepositRatio = reader.string(); + break; + case 8: + message.proposalCancelRatio = reader.string(); + break; + case 9: + message.proposalCancelDest = reader.string(); + break; + case 10: + message.expeditedVotingPeriod = Duration.decode(reader, reader.uint32()); + break; + case 11: + message.expeditedThreshold = reader.string(); + break; + case 12: + message.expeditedMinDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 13: + message.burnVoteQuorum = reader.bool(); + break; + case 14: + message.burnProposalDepositPrevote = reader.bool(); + break; + case 15: + message.burnVoteVeto = reader.bool(); + break; + case 16: + message.minDepositRatio = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1726,19 +1726,19 @@ export const Params = { message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || []; message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? Duration.fromPartial(object.maxDepositPeriod) : undefined; message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined; - message.quorum = object.quorum ?? ""; - message.threshold = object.threshold ?? ""; - message.vetoThreshold = object.vetoThreshold ?? ""; - message.minInitialDepositRatio = object.minInitialDepositRatio ?? ""; - message.proposalCancelRatio = object.proposalCancelRatio ?? ""; - message.proposalCancelDest = object.proposalCancelDest ?? ""; + message.quorum = object.quorum ?? ''; + message.threshold = object.threshold ?? ''; + message.vetoThreshold = object.vetoThreshold ?? ''; + message.minInitialDepositRatio = object.minInitialDepositRatio ?? ''; + message.proposalCancelRatio = object.proposalCancelRatio ?? ''; + message.proposalCancelDest = object.proposalCancelDest ?? ''; message.expeditedVotingPeriod = object.expeditedVotingPeriod !== undefined && object.expeditedVotingPeriod !== null ? Duration.fromPartial(object.expeditedVotingPeriod) : undefined; - message.expeditedThreshold = object.expeditedThreshold ?? ""; + message.expeditedThreshold = object.expeditedThreshold ?? ''; message.expeditedMinDeposit = object.expeditedMinDeposit?.map(e => Coin.fromPartial(e)) || []; message.burnVoteQuorum = object.burnVoteQuorum ?? false; message.burnProposalDepositPrevote = object.burnProposalDepositPrevote ?? false; message.burnVoteVeto = object.burnVoteVeto ?? false; - message.minDepositRatio = object.minDepositRatio ?? ""; + message.minDepositRatio = object.minDepositRatio ?? ''; return message; }, fromAmino(object: ParamsAmino): Params { @@ -1798,14 +1798,14 @@ export const Params = { } obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod) : undefined; obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined; - obj.quorum = message.quorum === "" ? undefined : message.quorum; - obj.threshold = message.threshold === "" ? undefined : message.threshold; - obj.veto_threshold = message.vetoThreshold === "" ? undefined : message.vetoThreshold; - obj.min_initial_deposit_ratio = message.minInitialDepositRatio === "" ? undefined : message.minInitialDepositRatio; - obj.proposal_cancel_ratio = message.proposalCancelRatio === "" ? undefined : message.proposalCancelRatio; - obj.proposal_cancel_dest = message.proposalCancelDest === "" ? undefined : message.proposalCancelDest; + obj.quorum = message.quorum === '' ? undefined : message.quorum; + obj.threshold = message.threshold === '' ? undefined : message.threshold; + obj.veto_threshold = message.vetoThreshold === '' ? undefined : message.vetoThreshold; + obj.min_initial_deposit_ratio = message.minInitialDepositRatio === '' ? undefined : message.minInitialDepositRatio; + obj.proposal_cancel_ratio = message.proposalCancelRatio === '' ? undefined : message.proposalCancelRatio; + obj.proposal_cancel_dest = message.proposalCancelDest === '' ? undefined : message.proposalCancelDest; obj.expedited_voting_period = message.expeditedVotingPeriod ? Duration.toAmino(message.expeditedVotingPeriod) : undefined; - obj.expedited_threshold = message.expeditedThreshold === "" ? undefined : message.expeditedThreshold; + obj.expedited_threshold = message.expeditedThreshold === '' ? undefined : message.expeditedThreshold; if (message.expeditedMinDeposit) { obj.expedited_min_deposit = message.expeditedMinDeposit.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -1814,7 +1814,7 @@ export const Params = { obj.burn_vote_quorum = message.burnVoteQuorum === false ? undefined : message.burnVoteQuorum; obj.burn_proposal_deposit_prevote = message.burnProposalDepositPrevote === false ? undefined : message.burnProposalDepositPrevote; obj.burn_vote_veto = message.burnVoteVeto === false ? undefined : message.burnVoteVeto; - obj.min_deposit_ratio = message.minDepositRatio === "" ? undefined : message.minDepositRatio; + obj.min_deposit_ratio = message.minDepositRatio === '' ? undefined : message.minDepositRatio; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -1822,7 +1822,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/v1/Params", + type: 'cosmos-sdk/v1/Params', value: Params.toAmino(message) }; }, @@ -1834,7 +1834,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1.Params", + typeUrl: '/cosmos.gov.v1.Params', value: Params.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/gov/v1/tx.amino.ts b/libs/cosmos-types/cosmos/gov/v1/tx.amino.ts index 6b91907b..1148db2b 100644 --- a/libs/cosmos-types/cosmos/gov/v1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/gov/v1/tx.amino.ts @@ -1,37 +1,37 @@ -import { MsgSubmitProposal, MsgExecLegacyContent, MsgVote, MsgVoteWeighted, MsgDeposit, MsgUpdateParams, MsgCancelProposal } from "./tx"; +import { MsgCancelProposal,MsgDeposit, MsgExecLegacyContent, MsgSubmitProposal, MsgUpdateParams, MsgVote, MsgVoteWeighted } from './tx'; export const AminoConverter = { - "/cosmos.gov.v1.MsgSubmitProposal": { - aminoType: "cosmos-sdk/v1/MsgSubmitProposal", + '/cosmos.gov.v1.MsgSubmitProposal': { + aminoType: 'cosmos-sdk/v1/MsgSubmitProposal', toAmino: MsgSubmitProposal.toAmino, fromAmino: MsgSubmitProposal.fromAmino }, - "/cosmos.gov.v1.MsgExecLegacyContent": { - aminoType: "cosmos-sdk/v1/MsgExecLegacyContent", + '/cosmos.gov.v1.MsgExecLegacyContent': { + aminoType: 'cosmos-sdk/v1/MsgExecLegacyContent', toAmino: MsgExecLegacyContent.toAmino, fromAmino: MsgExecLegacyContent.fromAmino }, - "/cosmos.gov.v1.MsgVote": { - aminoType: "cosmos-sdk/v1/MsgVote", + '/cosmos.gov.v1.MsgVote': { + aminoType: 'cosmos-sdk/v1/MsgVote', toAmino: MsgVote.toAmino, fromAmino: MsgVote.fromAmino }, - "/cosmos.gov.v1.MsgVoteWeighted": { - aminoType: "cosmos-sdk/v1/MsgVoteWeighted", + '/cosmos.gov.v1.MsgVoteWeighted': { + aminoType: 'cosmos-sdk/v1/MsgVoteWeighted', toAmino: MsgVoteWeighted.toAmino, fromAmino: MsgVoteWeighted.fromAmino }, - "/cosmos.gov.v1.MsgDeposit": { - aminoType: "cosmos-sdk/v1/MsgDeposit", + '/cosmos.gov.v1.MsgDeposit': { + aminoType: 'cosmos-sdk/v1/MsgDeposit', toAmino: MsgDeposit.toAmino, fromAmino: MsgDeposit.fromAmino }, - "/cosmos.gov.v1.MsgUpdateParams": { - aminoType: "cosmos-sdk/x/gov/v1/MsgUpdateParams", + '/cosmos.gov.v1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/x/gov/v1/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino }, - "/cosmos.gov.v1.MsgCancelProposal": { - aminoType: "cosmos-sdk/v1/MsgCancelProposal", + '/cosmos.gov.v1.MsgCancelProposal': { + aminoType: 'cosmos-sdk/v1/MsgCancelProposal', toAmino: MsgCancelProposal.toAmino, fromAmino: MsgCancelProposal.fromAmino } diff --git a/libs/cosmos-types/cosmos/gov/v1/tx.registry.ts b/libs/cosmos-types/cosmos/gov/v1/tx.registry.ts index cf133f8f..2772f41f 100644 --- a/libs/cosmos-types/cosmos/gov/v1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/gov/v1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgSubmitProposal, MsgExecLegacyContent, MsgVote, MsgVoteWeighted, MsgDeposit, MsgUpdateParams, MsgCancelProposal } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.gov.v1.MsgExecLegacyContent", MsgExecLegacyContent], ["/cosmos.gov.v1.MsgVote", MsgVote], ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted], ["/cosmos.gov.v1.MsgDeposit", MsgDeposit], ["/cosmos.gov.v1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.gov.v1.MsgCancelProposal", MsgCancelProposal]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgCancelProposal,MsgDeposit, MsgExecLegacyContent, MsgSubmitProposal, MsgUpdateParams, MsgVote, MsgVoteWeighted } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.gov.v1.MsgSubmitProposal', MsgSubmitProposal], ['/cosmos.gov.v1.MsgExecLegacyContent', MsgExecLegacyContent], ['/cosmos.gov.v1.MsgVote', MsgVote], ['/cosmos.gov.v1.MsgVoteWeighted', MsgVoteWeighted], ['/cosmos.gov.v1.MsgDeposit', MsgDeposit], ['/cosmos.gov.v1.MsgUpdateParams', MsgUpdateParams], ['/cosmos.gov.v1.MsgCancelProposal', MsgCancelProposal]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/gov/v1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/gov/v1/tx.rpc.msg.ts index 64e28e57..e95d7878 100644 --- a/libs/cosmos-types/cosmos/gov/v1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/gov/v1/tx.rpc.msg.ts @@ -1,33 +1,33 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgSubmitProposal, MsgExecLegacyContent, MsgVote, MsgVoteWeighted, MsgDeposit, MsgUpdateParams, MsgCancelProposal } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgCancelProposal,MsgDeposit, MsgExecLegacyContent, MsgSubmitProposal, MsgUpdateParams, MsgVote, MsgVoteWeighted } from './tx'; /** Msg defines the gov Msg service. */ export interface Msg { /** SubmitProposal defines a method to create new proposal given the messages. */ - submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto", memo?: string): Promise; + submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto', memo?: string): Promise; /** * ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal * to execute a legacy content-based proposal. */ - execLegacyContent(signerAddress: string, message: MsgExecLegacyContent, fee: number | StdFee | "auto", memo?: string): Promise; + execLegacyContent(signerAddress: string, message: MsgExecLegacyContent, fee: number | StdFee | 'auto', memo?: string): Promise; /** Vote defines a method to add a vote on a specific proposal. */ - vote(signerAddress: string, message: MsgVote, fee: number | StdFee | "auto", memo?: string): Promise; + vote(signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto', memo?: string): Promise; /** VoteWeighted defines a method to add a weighted vote on a specific proposal. */ - voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | "auto", memo?: string): Promise; + voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | 'auto', memo?: string): Promise; /** Deposit defines a method to add deposit on a specific proposal. */ - deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | "auto", memo?: string): Promise; + deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/gov module * parameters. The authority is defined in the keeper. * * Since: cosmos-sdk 0.47 */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CancelProposal defines a method to cancel governance proposal * * Since: cosmos-sdk 0.50 */ - cancelProposal(signerAddress: string, message: MsgCancelProposal, fee: number | StdFee | "auto", memo?: string): Promise; + cancelProposal(signerAddress: string, message: MsgCancelProposal, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -35,7 +35,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* SubmitProposal defines a method to create new proposal given the messages. */ - submitProposal = async (signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + submitProposal = async (signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSubmitProposal.typeUrl, value: message @@ -44,7 +44,7 @@ export class MsgClientImpl implements Msg { }; /* ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal to execute a legacy content-based proposal. */ - execLegacyContent = async (signerAddress: string, message: MsgExecLegacyContent, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + execLegacyContent = async (signerAddress: string, message: MsgExecLegacyContent, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgExecLegacyContent.typeUrl, value: message @@ -52,7 +52,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Vote defines a method to add a vote on a specific proposal. */ - vote = async (signerAddress: string, message: MsgVote, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + vote = async (signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgVote.typeUrl, value: message @@ -60,7 +60,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* VoteWeighted defines a method to add a weighted vote on a specific proposal. */ - voteWeighted = async (signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + voteWeighted = async (signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgVoteWeighted.typeUrl, value: message @@ -68,7 +68,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Deposit defines a method to add deposit on a specific proposal. */ - deposit = async (signerAddress: string, message: MsgDeposit, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + deposit = async (signerAddress: string, message: MsgDeposit, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgDeposit.typeUrl, value: message @@ -79,7 +79,7 @@ export class MsgClientImpl implements Msg { parameters. The authority is defined in the keeper. Since: cosmos-sdk 0.47 */ - updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message @@ -89,7 +89,7 @@ export class MsgClientImpl implements Msg { /* CancelProposal defines a method to cancel governance proposal Since: cosmos-sdk 0.50 */ - cancelProposal = async (signerAddress: string, message: MsgCancelProposal, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + cancelProposal = async (signerAddress: string, message: MsgCancelProposal, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCancelProposal.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/gov/v1/tx.ts b/libs/cosmos-types/cosmos/gov/v1/tx.ts index 4bce17ce..4e19beab 100644 --- a/libs/cosmos-types/cosmos/gov/v1/tx.ts +++ b/libs/cosmos-types/cosmos/gov/v1/tx.ts @@ -1,14 +1,14 @@ -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, Params, ParamsAmino } from "./gov"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution"; -import { TextProposal, TextProposalProtoMsg } from "../v1beta1/gov"; -import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade"; -import { ClientUpdateProposal, ClientUpdateProposalProtoMsg, UpgradeProposal, UpgradeProposalProtoMsg } from "../../../ibc/core/client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet, toTimestamp, fromTimestamp } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { DeepPartial, fromTimestamp,isSet, toTimestamp } from '../../../helpers'; +import { ClientUpdateProposal, ClientUpdateProposalProtoMsg, UpgradeProposal, UpgradeProposalProtoMsg } from '../../../ibc/core/client/v1/client'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from '../../distribution/v1beta1/distribution'; +import { CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg,SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg } from '../../upgrade/v1beta1/upgrade'; +import { TextProposal, TextProposalProtoMsg } from '../v1beta1/gov'; +import { Params, ParamsAmino,VoteOption, WeightedVoteOption, WeightedVoteOptionAmino } from './gov'; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary * proposal Content. @@ -42,7 +42,7 @@ export interface MsgSubmitProposal { expedited: boolean; } export interface MsgSubmitProposalProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal"; + typeUrl: '/cosmos.gov.v1.MsgSubmitProposal'; value: Uint8Array; } /** @@ -78,7 +78,7 @@ export interface MsgSubmitProposalAmino { expedited: boolean; } export interface MsgSubmitProposalAminoMsg { - type: "cosmos-sdk/v1/MsgSubmitProposal"; + type: 'cosmos-sdk/v1/MsgSubmitProposal'; value: MsgSubmitProposalAmino; } /** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ @@ -87,7 +87,7 @@ export interface MsgSubmitProposalResponse { proposalId: bigint; } export interface MsgSubmitProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse"; + typeUrl: '/cosmos.gov.v1.MsgSubmitProposalResponse'; value: Uint8Array; } /** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ @@ -96,7 +96,7 @@ export interface MsgSubmitProposalResponseAmino { proposal_id: string; } export interface MsgSubmitProposalResponseAminoMsg { - type: "cosmos-sdk/v1/MsgSubmitProposalResponse"; + type: 'cosmos-sdk/v1/MsgSubmitProposalResponse'; value: MsgSubmitProposalResponseAmino; } /** @@ -110,10 +110,10 @@ export interface MsgExecLegacyContent { authority: string; } export interface MsgExecLegacyContentProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent"; + typeUrl: '/cosmos.gov.v1.MsgExecLegacyContent'; value: Uint8Array; } -export type MsgExecLegacyContentEncoded = Omit & { +export type MsgExecLegacyContentEncoded = Omit & { /** content is the proposal's content. */content?: CommunityPoolSpendProposalProtoMsg | CommunityPoolSpendProposalWithDepositProtoMsg | TextProposalProtoMsg | SoftwareUpgradeProposalProtoMsg | CancelSoftwareUpgradeProposalProtoMsg | ClientUpdateProposalProtoMsg | UpgradeProposalProtoMsg | AnyProtoMsg | undefined; }; /** @@ -127,19 +127,19 @@ export interface MsgExecLegacyContentAmino { authority: string; } export interface MsgExecLegacyContentAminoMsg { - type: "cosmos-sdk/v1/MsgExecLegacyContent"; + type: 'cosmos-sdk/v1/MsgExecLegacyContent'; value: MsgExecLegacyContentAmino; } /** MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. */ export interface MsgExecLegacyContentResponse {} export interface MsgExecLegacyContentResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse"; + typeUrl: '/cosmos.gov.v1.MsgExecLegacyContentResponse'; value: Uint8Array; } /** MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. */ export interface MsgExecLegacyContentResponseAmino {} export interface MsgExecLegacyContentResponseAminoMsg { - type: "cosmos-sdk/v1/MsgExecLegacyContentResponse"; + type: 'cosmos-sdk/v1/MsgExecLegacyContentResponse'; value: MsgExecLegacyContentResponseAmino; } /** MsgVote defines a message to cast a vote. */ @@ -154,7 +154,7 @@ export interface MsgVote { metadata: string; } export interface MsgVoteProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVote"; + typeUrl: '/cosmos.gov.v1.MsgVote'; value: Uint8Array; } /** MsgVote defines a message to cast a vote. */ @@ -169,19 +169,19 @@ export interface MsgVoteAmino { metadata: string; } export interface MsgVoteAminoMsg { - type: "cosmos-sdk/v1/MsgVote"; + type: 'cosmos-sdk/v1/MsgVote'; value: MsgVoteAmino; } /** MsgVoteResponse defines the Msg/Vote response type. */ export interface MsgVoteResponse {} export interface MsgVoteResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVoteResponse"; + typeUrl: '/cosmos.gov.v1.MsgVoteResponse'; value: Uint8Array; } /** MsgVoteResponse defines the Msg/Vote response type. */ export interface MsgVoteResponseAmino {} export interface MsgVoteResponseAminoMsg { - type: "cosmos-sdk/v1/MsgVoteResponse"; + type: 'cosmos-sdk/v1/MsgVoteResponse'; value: MsgVoteResponseAmino; } /** MsgVoteWeighted defines a message to cast a vote. */ @@ -196,7 +196,7 @@ export interface MsgVoteWeighted { metadata: string; } export interface MsgVoteWeightedProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted"; + typeUrl: '/cosmos.gov.v1.MsgVoteWeighted'; value: Uint8Array; } /** MsgVoteWeighted defines a message to cast a vote. */ @@ -211,19 +211,19 @@ export interface MsgVoteWeightedAmino { metadata: string; } export interface MsgVoteWeightedAminoMsg { - type: "cosmos-sdk/v1/MsgVoteWeighted"; + type: 'cosmos-sdk/v1/MsgVoteWeighted'; value: MsgVoteWeightedAmino; } /** MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. */ export interface MsgVoteWeightedResponse {} export interface MsgVoteWeightedResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse"; + typeUrl: '/cosmos.gov.v1.MsgVoteWeightedResponse'; value: Uint8Array; } /** MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. */ export interface MsgVoteWeightedResponseAmino {} export interface MsgVoteWeightedResponseAminoMsg { - type: "cosmos-sdk/v1/MsgVoteWeightedResponse"; + type: 'cosmos-sdk/v1/MsgVoteWeightedResponse'; value: MsgVoteWeightedResponseAmino; } /** MsgDeposit defines a message to submit a deposit to an existing proposal. */ @@ -236,7 +236,7 @@ export interface MsgDeposit { amount: Coin[]; } export interface MsgDepositProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgDeposit"; + typeUrl: '/cosmos.gov.v1.MsgDeposit'; value: Uint8Array; } /** MsgDeposit defines a message to submit a deposit to an existing proposal. */ @@ -249,19 +249,19 @@ export interface MsgDepositAmino { amount: CoinAmino[]; } export interface MsgDepositAminoMsg { - type: "cosmos-sdk/v1/MsgDeposit"; + type: 'cosmos-sdk/v1/MsgDeposit'; value: MsgDepositAmino; } /** MsgDepositResponse defines the Msg/Deposit response type. */ export interface MsgDepositResponse {} export interface MsgDepositResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgDepositResponse"; + typeUrl: '/cosmos.gov.v1.MsgDepositResponse'; value: Uint8Array; } /** MsgDepositResponse defines the Msg/Deposit response type. */ export interface MsgDepositResponseAmino {} export interface MsgDepositResponseAminoMsg { - type: "cosmos-sdk/v1/MsgDepositResponse"; + type: 'cosmos-sdk/v1/MsgDepositResponse'; value: MsgDepositResponseAmino; } /** @@ -280,7 +280,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgUpdateParams"; + typeUrl: '/cosmos.gov.v1.MsgUpdateParams'; value: Uint8Array; } /** @@ -299,7 +299,7 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/x/gov/v1/MsgUpdateParams"; + type: 'cosmos-sdk/x/gov/v1/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** @@ -310,7 +310,7 @@ export interface MsgUpdateParamsAminoMsg { */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgUpdateParamsResponse"; + typeUrl: '/cosmos.gov.v1.MsgUpdateParamsResponse'; value: Uint8Array; } /** @@ -321,7 +321,7 @@ export interface MsgUpdateParamsResponseProtoMsg { */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/v1/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/v1/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } /** @@ -336,7 +336,7 @@ export interface MsgCancelProposal { proposer: string; } export interface MsgCancelProposalProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgCancelProposal"; + typeUrl: '/cosmos.gov.v1.MsgCancelProposal'; value: Uint8Array; } /** @@ -351,7 +351,7 @@ export interface MsgCancelProposalAmino { proposer: string; } export interface MsgCancelProposalAminoMsg { - type: "cosmos-sdk/v1/MsgCancelProposal"; + type: 'cosmos-sdk/v1/MsgCancelProposal'; value: MsgCancelProposalAmino; } /** @@ -369,7 +369,7 @@ export interface MsgCancelProposalResponse { canceledHeight: bigint; } export interface MsgCancelProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgCancelProposalResponse"; + typeUrl: '/cosmos.gov.v1.MsgCancelProposalResponse'; value: Uint8Array; } /** @@ -387,28 +387,28 @@ export interface MsgCancelProposalResponseAmino { canceled_height: string; } export interface MsgCancelProposalResponseAminoMsg { - type: "cosmos-sdk/v1/MsgCancelProposalResponse"; + type: 'cosmos-sdk/v1/MsgCancelProposalResponse'; value: MsgCancelProposalResponseAmino; } function createBaseMsgSubmitProposal(): MsgSubmitProposal { return { messages: [], initialDeposit: [], - proposer: "", - metadata: "", - title: "", - summary: "", + proposer: '', + metadata: '', + title: '', + summary: '', expedited: false }; } export const MsgSubmitProposal = { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - aminoType: "cosmos-sdk/v1/MsgSubmitProposal", + typeUrl: '/cosmos.gov.v1.MsgSubmitProposal', + aminoType: 'cosmos-sdk/v1/MsgSubmitProposal', is(o: any): o is MsgSubmitProposal { - return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && Array.isArray(o.initialDeposit) && (!o.initialDeposit.length || Coin.is(o.initialDeposit[0])) && typeof o.proposer === "string" && typeof o.metadata === "string" && typeof o.title === "string" && typeof o.summary === "string" && typeof o.expedited === "boolean"); + return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && Array.isArray(o.initialDeposit) && (!o.initialDeposit.length || Coin.is(o.initialDeposit[0])) && typeof o.proposer === 'string' && typeof o.metadata === 'string' && typeof o.title === 'string' && typeof o.summary === 'string' && typeof o.expedited === 'boolean'); }, isAmino(o: any): o is MsgSubmitProposalAmino { - return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && Array.isArray(o.initial_deposit) && (!o.initial_deposit.length || Coin.isAmino(o.initial_deposit[0])) && typeof o.proposer === "string" && typeof o.metadata === "string" && typeof o.title === "string" && typeof o.summary === "string" && typeof o.expedited === "boolean"); + return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && Array.isArray(o.initial_deposit) && (!o.initial_deposit.length || Coin.isAmino(o.initial_deposit[0])) && typeof o.proposer === 'string' && typeof o.metadata === 'string' && typeof o.title === 'string' && typeof o.summary === 'string' && typeof o.expedited === 'boolean'); }, encode(message: MsgSubmitProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.messages) { @@ -417,16 +417,16 @@ export const MsgSubmitProposal = { for (const v of message.initialDeposit) { Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.proposer !== "") { + if (message.proposer !== '') { writer.uint32(26).string(message.proposer); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(34).string(message.metadata); } - if (message.title !== "") { + if (message.title !== '') { writer.uint32(42).string(message.title); } - if (message.summary !== "") { + if (message.summary !== '') { writer.uint32(50).string(message.summary); } if (message.expedited === true) { @@ -441,30 +441,30 @@ export const MsgSubmitProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.initialDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - case 4: - message.metadata = reader.string(); - break; - case 5: - message.title = reader.string(); - break; - case 6: - message.summary = reader.string(); - break; - case 7: - message.expedited = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.messages.push(Any.decode(reader, reader.uint32())); + break; + case 2: + message.initialDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 3: + message.proposer = reader.string(); + break; + case 4: + message.metadata = reader.string(); + break; + case 5: + message.title = reader.string(); + break; + case 6: + message.summary = reader.string(); + break; + case 7: + message.expedited = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -473,10 +473,10 @@ export const MsgSubmitProposal = { const message = createBaseMsgSubmitProposal(); message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; message.initialDeposit = object.initialDeposit?.map(e => Coin.fromPartial(e)) || []; - message.proposer = object.proposer ?? ""; - message.metadata = object.metadata ?? ""; - message.title = object.title ?? ""; - message.summary = object.summary ?? ""; + message.proposer = object.proposer ?? ''; + message.metadata = object.metadata ?? ''; + message.title = object.title ?? ''; + message.summary = object.summary ?? ''; message.expedited = object.expedited ?? false; return message; }, @@ -513,10 +513,10 @@ export const MsgSubmitProposal = { } else { obj.initial_deposit = message.initialDeposit; } - obj.proposer = message.proposer === "" ? undefined : message.proposer; - obj.metadata = message.metadata === "" ? undefined : message.metadata; - obj.title = message.title === "" ? undefined : message.title; - obj.summary = message.summary === "" ? undefined : message.summary; + obj.proposer = message.proposer === '' ? undefined : message.proposer; + obj.metadata = message.metadata === '' ? undefined : message.metadata; + obj.title = message.title === '' ? undefined : message.title; + obj.summary = message.summary === '' ? undefined : message.summary; obj.expedited = message.expedited === false ? undefined : message.expedited; return obj; }, @@ -525,7 +525,7 @@ export const MsgSubmitProposal = { }, toAminoMsg(message: MsgSubmitProposal): MsgSubmitProposalAminoMsg { return { - type: "cosmos-sdk/v1/MsgSubmitProposal", + type: 'cosmos-sdk/v1/MsgSubmitProposal', value: MsgSubmitProposal.toAmino(message) }; }, @@ -537,7 +537,7 @@ export const MsgSubmitProposal = { }, toProtoMsg(message: MsgSubmitProposal): MsgSubmitProposalProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", + typeUrl: '/cosmos.gov.v1.MsgSubmitProposal', value: MsgSubmitProposal.encode(message).finish() }; } @@ -550,13 +550,13 @@ function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { }; } export const MsgSubmitProposalResponse = { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", - aminoType: "cosmos-sdk/v1/MsgSubmitProposalResponse", + typeUrl: '/cosmos.gov.v1.MsgSubmitProposalResponse', + aminoType: 'cosmos-sdk/v1/MsgSubmitProposalResponse', is(o: any): o is MsgSubmitProposalResponse { - return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposalId === "bigint"); + return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposalId === 'bigint'); }, isAmino(o: any): o is MsgSubmitProposalResponseAmino { - return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposal_id === "bigint"); + return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposal_id === 'bigint'); }, encode(message: MsgSubmitProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -571,12 +571,12 @@ export const MsgSubmitProposalResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -603,7 +603,7 @@ export const MsgSubmitProposalResponse = { }, toAminoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAminoMsg { return { - type: "cosmos-sdk/v1/MsgSubmitProposalResponse", + type: 'cosmos-sdk/v1/MsgSubmitProposalResponse', value: MsgSubmitProposalResponse.toAmino(message) }; }, @@ -615,7 +615,7 @@ export const MsgSubmitProposalResponse = { }, toProtoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", + typeUrl: '/cosmos.gov.v1.MsgSubmitProposalResponse', value: MsgSubmitProposalResponse.encode(message).finish() }; } @@ -625,23 +625,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoT function createBaseMsgExecLegacyContent(): MsgExecLegacyContent { return { content: undefined, - authority: "" + authority: '' }; } export const MsgExecLegacyContent = { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - aminoType: "cosmos-sdk/v1/MsgExecLegacyContent", + typeUrl: '/cosmos.gov.v1.MsgExecLegacyContent', + aminoType: 'cosmos-sdk/v1/MsgExecLegacyContent', is(o: any): o is MsgExecLegacyContent { - return o && (o.$typeUrl === MsgExecLegacyContent.typeUrl || typeof o.authority === "string"); + return o && (o.$typeUrl === MsgExecLegacyContent.typeUrl || typeof o.authority === 'string'); }, isAmino(o: any): o is MsgExecLegacyContentAmino { - return o && (o.$typeUrl === MsgExecLegacyContent.typeUrl || typeof o.authority === "string"); + return o && (o.$typeUrl === MsgExecLegacyContent.typeUrl || typeof o.authority === 'string'); }, encode(message: MsgExecLegacyContent, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.content !== undefined) { Any.encode(GlobalDecoderRegistry.wrapAny(message.content), writer.uint32(10).fork()).ldelim(); } - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(18).string(message.authority); } return writer; @@ -653,15 +653,15 @@ export const MsgExecLegacyContent = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.content = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 2: - message.authority = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.content = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 2: + message.authority = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -669,7 +669,7 @@ export const MsgExecLegacyContent = { fromPartial(object: DeepPartial): MsgExecLegacyContent { const message = createBaseMsgExecLegacyContent(); message.content = object.content !== undefined && object.content !== null ? GlobalDecoderRegistry.fromPartial(object.content) : undefined; - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; return message; }, fromAmino(object: MsgExecLegacyContentAmino): MsgExecLegacyContent { @@ -685,7 +685,7 @@ export const MsgExecLegacyContent = { toAmino(message: MsgExecLegacyContent): MsgExecLegacyContentAmino { const obj: any = {}; obj.content = message.content ? GlobalDecoderRegistry.toAminoMsg(message.content) : undefined; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; return obj; }, fromAminoMsg(object: MsgExecLegacyContentAminoMsg): MsgExecLegacyContent { @@ -693,7 +693,7 @@ export const MsgExecLegacyContent = { }, toAminoMsg(message: MsgExecLegacyContent): MsgExecLegacyContentAminoMsg { return { - type: "cosmos-sdk/v1/MsgExecLegacyContent", + type: 'cosmos-sdk/v1/MsgExecLegacyContent', value: MsgExecLegacyContent.toAmino(message) }; }, @@ -705,7 +705,7 @@ export const MsgExecLegacyContent = { }, toProtoMsg(message: MsgExecLegacyContent): MsgExecLegacyContentProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", + typeUrl: '/cosmos.gov.v1.MsgExecLegacyContent', value: MsgExecLegacyContent.encode(message).finish() }; } @@ -716,8 +716,8 @@ function createBaseMsgExecLegacyContentResponse(): MsgExecLegacyContentResponse return {}; } export const MsgExecLegacyContentResponse = { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", - aminoType: "cosmos-sdk/v1/MsgExecLegacyContentResponse", + typeUrl: '/cosmos.gov.v1.MsgExecLegacyContentResponse', + aminoType: 'cosmos-sdk/v1/MsgExecLegacyContentResponse', is(o: any): o is MsgExecLegacyContentResponse { return o && o.$typeUrl === MsgExecLegacyContentResponse.typeUrl; }, @@ -734,9 +734,9 @@ export const MsgExecLegacyContentResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -758,7 +758,7 @@ export const MsgExecLegacyContentResponse = { }, toAminoMsg(message: MsgExecLegacyContentResponse): MsgExecLegacyContentResponseAminoMsg { return { - type: "cosmos-sdk/v1/MsgExecLegacyContentResponse", + type: 'cosmos-sdk/v1/MsgExecLegacyContentResponse', value: MsgExecLegacyContentResponse.toAmino(message) }; }, @@ -770,7 +770,7 @@ export const MsgExecLegacyContentResponse = { }, toProtoMsg(message: MsgExecLegacyContentResponse): MsgExecLegacyContentResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", + typeUrl: '/cosmos.gov.v1.MsgExecLegacyContentResponse', value: MsgExecLegacyContentResponse.encode(message).finish() }; } @@ -780,31 +780,31 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContentResponse.ami function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), - voter: "", + voter: '', option: 0, - metadata: "" + metadata: '' }; } export const MsgVote = { - typeUrl: "/cosmos.gov.v1.MsgVote", - aminoType: "cosmos-sdk/v1/MsgVote", + typeUrl: '/cosmos.gov.v1.MsgVote', + aminoType: 'cosmos-sdk/v1/MsgVote', is(o: any): o is MsgVote { - return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && isSet(o.option) && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && typeof o.metadata === 'string'); }, isAmino(o: any): o is MsgVoteAmino { - return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && isSet(o.option) && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && typeof o.metadata === 'string'); }, encode(message: MsgVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } if (message.option !== 0) { writer.uint32(24).int32(message.option); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(34).string(message.metadata); } return writer; @@ -816,21 +816,21 @@ export const MsgVote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = (reader.int32() as any); + break; + case 4: + message.metadata = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -838,9 +838,9 @@ export const MsgVote = { fromPartial(object: DeepPartial): MsgVote { const message = createBaseMsgVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; return message; }, fromAmino(object: MsgVoteAmino): MsgVote { @@ -861,10 +861,10 @@ export const MsgVote = { }, toAmino(message: MsgVote): MsgVoteAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; + obj.voter = message.voter === '' ? undefined : message.voter; obj.option = message.option === 0 ? undefined : message.option; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgVoteAminoMsg): MsgVote { @@ -872,7 +872,7 @@ export const MsgVote = { }, toAminoMsg(message: MsgVote): MsgVoteAminoMsg { return { - type: "cosmos-sdk/v1/MsgVote", + type: 'cosmos-sdk/v1/MsgVote', value: MsgVote.toAmino(message) }; }, @@ -884,7 +884,7 @@ export const MsgVote = { }, toProtoMsg(message: MsgVote): MsgVoteProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgVote", + typeUrl: '/cosmos.gov.v1.MsgVote', value: MsgVote.encode(message).finish() }; } @@ -895,8 +895,8 @@ function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } export const MsgVoteResponse = { - typeUrl: "/cosmos.gov.v1.MsgVoteResponse", - aminoType: "cosmos-sdk/v1/MsgVoteResponse", + typeUrl: '/cosmos.gov.v1.MsgVoteResponse', + aminoType: 'cosmos-sdk/v1/MsgVoteResponse', is(o: any): o is MsgVoteResponse { return o && o.$typeUrl === MsgVoteResponse.typeUrl; }, @@ -913,9 +913,9 @@ export const MsgVoteResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -937,7 +937,7 @@ export const MsgVoteResponse = { }, toAminoMsg(message: MsgVoteResponse): MsgVoteResponseAminoMsg { return { - type: "cosmos-sdk/v1/MsgVoteResponse", + type: 'cosmos-sdk/v1/MsgVoteResponse', value: MsgVoteResponse.toAmino(message) }; }, @@ -949,7 +949,7 @@ export const MsgVoteResponse = { }, toProtoMsg(message: MsgVoteResponse): MsgVoteResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgVoteResponse", + typeUrl: '/cosmos.gov.v1.MsgVoteResponse', value: MsgVoteResponse.encode(message).finish() }; } @@ -959,31 +959,31 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVo function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), - voter: "", + voter: '', options: [], - metadata: "" + metadata: '' }; } export const MsgVoteWeighted = { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - aminoType: "cosmos-sdk/v1/MsgVoteWeighted", + typeUrl: '/cosmos.gov.v1.MsgVoteWeighted', + aminoType: 'cosmos-sdk/v1/MsgVoteWeighted', is(o: any): o is MsgVoteWeighted { - return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0])) && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0])) && typeof o.metadata === 'string'); }, isAmino(o: any): o is MsgVoteWeightedAmino { - return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0])) && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0])) && typeof o.metadata === 'string'); }, encode(message: MsgVoteWeighted, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } for (const v of message.options) { WeightedVoteOption.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(34).string(message.metadata); } return writer; @@ -995,21 +995,21 @@ export const MsgVoteWeighted = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - case 4: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); + break; + case 4: + message.metadata = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1017,9 +1017,9 @@ export const MsgVoteWeighted = { fromPartial(object: DeepPartial): MsgVoteWeighted { const message = createBaseMsgVoteWeighted(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; return message; }, fromAmino(object: MsgVoteWeightedAmino): MsgVoteWeighted { @@ -1038,14 +1038,14 @@ export const MsgVoteWeighted = { }, toAmino(message: MsgVoteWeighted): MsgVoteWeightedAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; + obj.voter = message.voter === '' ? undefined : message.voter; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); } else { obj.options = message.options; } - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgVoteWeightedAminoMsg): MsgVoteWeighted { @@ -1053,7 +1053,7 @@ export const MsgVoteWeighted = { }, toAminoMsg(message: MsgVoteWeighted): MsgVoteWeightedAminoMsg { return { - type: "cosmos-sdk/v1/MsgVoteWeighted", + type: 'cosmos-sdk/v1/MsgVoteWeighted', value: MsgVoteWeighted.toAmino(message) }; }, @@ -1065,7 +1065,7 @@ export const MsgVoteWeighted = { }, toProtoMsg(message: MsgVoteWeighted): MsgVoteWeightedProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", + typeUrl: '/cosmos.gov.v1.MsgVoteWeighted', value: MsgVoteWeighted.encode(message).finish() }; } @@ -1076,8 +1076,8 @@ function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } export const MsgVoteWeightedResponse = { - typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", - aminoType: "cosmos-sdk/v1/MsgVoteWeightedResponse", + typeUrl: '/cosmos.gov.v1.MsgVoteWeightedResponse', + aminoType: 'cosmos-sdk/v1/MsgVoteWeightedResponse', is(o: any): o is MsgVoteWeightedResponse { return o && o.$typeUrl === MsgVoteWeightedResponse.typeUrl; }, @@ -1094,9 +1094,9 @@ export const MsgVoteWeightedResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1118,7 +1118,7 @@ export const MsgVoteWeightedResponse = { }, toAminoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseAminoMsg { return { - type: "cosmos-sdk/v1/MsgVoteWeightedResponse", + type: 'cosmos-sdk/v1/MsgVoteWeightedResponse', value: MsgVoteWeightedResponse.toAmino(message) }; }, @@ -1130,7 +1130,7 @@ export const MsgVoteWeightedResponse = { }, toProtoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", + typeUrl: '/cosmos.gov.v1.MsgVoteWeightedResponse', value: MsgVoteWeightedResponse.encode(message).finish() }; } @@ -1140,24 +1140,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoTyp function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), - depositor: "", + depositor: '', amount: [] }; } export const MsgDeposit = { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - aminoType: "cosmos-sdk/v1/MsgDeposit", + typeUrl: '/cosmos.gov.v1.MsgDeposit', + aminoType: 'cosmos-sdk/v1/MsgDeposit', is(o: any): o is MsgDeposit { - return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposalId === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposalId === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is MsgDepositAmino { - return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposal_id === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: MsgDeposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(18).string(message.depositor); } for (const v of message.amount) { @@ -1172,18 +1172,18 @@ export const MsgDeposit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1191,7 +1191,7 @@ export const MsgDeposit = { fromPartial(object: DeepPartial): MsgDeposit { const message = createBaseMsgDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; + message.depositor = object.depositor ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -1208,8 +1208,8 @@ export const MsgDeposit = { }, toAmino(message: MsgDeposit): MsgDepositAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; + obj.depositor = message.depositor === '' ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -1222,7 +1222,7 @@ export const MsgDeposit = { }, toAminoMsg(message: MsgDeposit): MsgDepositAminoMsg { return { - type: "cosmos-sdk/v1/MsgDeposit", + type: 'cosmos-sdk/v1/MsgDeposit', value: MsgDeposit.toAmino(message) }; }, @@ -1234,7 +1234,7 @@ export const MsgDeposit = { }, toProtoMsg(message: MsgDeposit): MsgDepositProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgDeposit", + typeUrl: '/cosmos.gov.v1.MsgDeposit', value: MsgDeposit.encode(message).finish() }; } @@ -1245,8 +1245,8 @@ function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } export const MsgDepositResponse = { - typeUrl: "/cosmos.gov.v1.MsgDepositResponse", - aminoType: "cosmos-sdk/v1/MsgDepositResponse", + typeUrl: '/cosmos.gov.v1.MsgDepositResponse', + aminoType: 'cosmos-sdk/v1/MsgDepositResponse', is(o: any): o is MsgDepositResponse { return o && o.$typeUrl === MsgDepositResponse.typeUrl; }, @@ -1263,9 +1263,9 @@ export const MsgDepositResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1287,7 +1287,7 @@ export const MsgDepositResponse = { }, toAminoMsg(message: MsgDepositResponse): MsgDepositResponseAminoMsg { return { - type: "cosmos-sdk/v1/MsgDepositResponse", + type: 'cosmos-sdk/v1/MsgDepositResponse', value: MsgDepositResponse.toAmino(message) }; }, @@ -1299,7 +1299,7 @@ export const MsgDepositResponse = { }, toProtoMsg(message: MsgDepositResponse): MsgDepositResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgDepositResponse", + typeUrl: '/cosmos.gov.v1.MsgDepositResponse', value: MsgDepositResponse.encode(message).finish() }; } @@ -1308,21 +1308,21 @@ GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - authority: "", + authority: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/cosmos.gov.v1.MsgUpdateParams", - aminoType: "cosmos-sdk/x/gov/v1/MsgUpdateParams", + typeUrl: '/cosmos.gov.v1.MsgUpdateParams', + aminoType: 'cosmos-sdk/x/gov/v1/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.params !== undefined) { @@ -1337,22 +1337,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -1368,7 +1368,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({})); return obj; }, @@ -1377,7 +1377,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/x/gov/v1/MsgUpdateParams", + type: 'cosmos-sdk/x/gov/v1/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -1389,7 +1389,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgUpdateParams", + typeUrl: '/cosmos.gov.v1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -1400,8 +1400,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/cosmos.gov.v1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/v1/MsgUpdateParamsResponse", + typeUrl: '/cosmos.gov.v1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/v1/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -1418,9 +1418,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1442,7 +1442,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/v1/MsgUpdateParamsResponse", + type: 'cosmos-sdk/v1/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -1454,7 +1454,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgUpdateParamsResponse", + typeUrl: '/cosmos.gov.v1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } @@ -1464,23 +1464,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoTyp function createBaseMsgCancelProposal(): MsgCancelProposal { return { proposalId: BigInt(0), - proposer: "" + proposer: '' }; } export const MsgCancelProposal = { - typeUrl: "/cosmos.gov.v1.MsgCancelProposal", - aminoType: "cosmos-sdk/v1/MsgCancelProposal", + typeUrl: '/cosmos.gov.v1.MsgCancelProposal', + aminoType: 'cosmos-sdk/v1/MsgCancelProposal', is(o: any): o is MsgCancelProposal { - return o && (o.$typeUrl === MsgCancelProposal.typeUrl || typeof o.proposalId === "bigint" && typeof o.proposer === "string"); + return o && (o.$typeUrl === MsgCancelProposal.typeUrl || typeof o.proposalId === 'bigint' && typeof o.proposer === 'string'); }, isAmino(o: any): o is MsgCancelProposalAmino { - return o && (o.$typeUrl === MsgCancelProposal.typeUrl || typeof o.proposal_id === "bigint" && typeof o.proposer === "string"); + return o && (o.$typeUrl === MsgCancelProposal.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.proposer === 'string'); }, encode(message: MsgCancelProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.proposer !== "") { + if (message.proposer !== '') { writer.uint32(18).string(message.proposer); } return writer; @@ -1492,15 +1492,15 @@ export const MsgCancelProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.proposer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1508,7 +1508,7 @@ export const MsgCancelProposal = { fromPartial(object: DeepPartial): MsgCancelProposal { const message = createBaseMsgCancelProposal(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.proposer = object.proposer ?? ""; + message.proposer = object.proposer ?? ''; return message; }, fromAmino(object: MsgCancelProposalAmino): MsgCancelProposal { @@ -1523,8 +1523,8 @@ export const MsgCancelProposal = { }, toAmino(message: MsgCancelProposal): MsgCancelProposalAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.proposer = message.proposer === "" ? undefined : message.proposer; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; + obj.proposer = message.proposer === '' ? undefined : message.proposer; return obj; }, fromAminoMsg(object: MsgCancelProposalAminoMsg): MsgCancelProposal { @@ -1532,7 +1532,7 @@ export const MsgCancelProposal = { }, toAminoMsg(message: MsgCancelProposal): MsgCancelProposalAminoMsg { return { - type: "cosmos-sdk/v1/MsgCancelProposal", + type: 'cosmos-sdk/v1/MsgCancelProposal', value: MsgCancelProposal.toAmino(message) }; }, @@ -1544,7 +1544,7 @@ export const MsgCancelProposal = { }, toProtoMsg(message: MsgCancelProposal): MsgCancelProposalProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgCancelProposal", + typeUrl: '/cosmos.gov.v1.MsgCancelProposal', value: MsgCancelProposal.encode(message).finish() }; } @@ -1559,13 +1559,13 @@ function createBaseMsgCancelProposalResponse(): MsgCancelProposalResponse { }; } export const MsgCancelProposalResponse = { - typeUrl: "/cosmos.gov.v1.MsgCancelProposalResponse", - aminoType: "cosmos-sdk/v1/MsgCancelProposalResponse", + typeUrl: '/cosmos.gov.v1.MsgCancelProposalResponse', + aminoType: 'cosmos-sdk/v1/MsgCancelProposalResponse', is(o: any): o is MsgCancelProposalResponse { - return o && (o.$typeUrl === MsgCancelProposalResponse.typeUrl || typeof o.proposalId === "bigint" && Timestamp.is(o.canceledTime) && typeof o.canceledHeight === "bigint"); + return o && (o.$typeUrl === MsgCancelProposalResponse.typeUrl || typeof o.proposalId === 'bigint' && Timestamp.is(o.canceledTime) && typeof o.canceledHeight === 'bigint'); }, isAmino(o: any): o is MsgCancelProposalResponseAmino { - return o && (o.$typeUrl === MsgCancelProposalResponse.typeUrl || typeof o.proposal_id === "bigint" && Timestamp.isAmino(o.canceled_time) && typeof o.canceled_height === "bigint"); + return o && (o.$typeUrl === MsgCancelProposalResponse.typeUrl || typeof o.proposal_id === 'bigint' && Timestamp.isAmino(o.canceled_time) && typeof o.canceled_height === 'bigint'); }, encode(message: MsgCancelProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -1586,18 +1586,18 @@ export const MsgCancelProposalResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.canceledTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.canceledHeight = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.canceledTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 3: + message.canceledHeight = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1624,7 +1624,7 @@ export const MsgCancelProposalResponse = { }, toAmino(message: MsgCancelProposalResponse): MsgCancelProposalResponseAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; obj.canceled_time = message.canceledTime ? Timestamp.toAmino(toTimestamp(message.canceledTime)) : undefined; obj.canceled_height = message.canceledHeight !== BigInt(0) ? message.canceledHeight.toString() : undefined; return obj; @@ -1634,7 +1634,7 @@ export const MsgCancelProposalResponse = { }, toAminoMsg(message: MsgCancelProposalResponse): MsgCancelProposalResponseAminoMsg { return { - type: "cosmos-sdk/v1/MsgCancelProposalResponse", + type: 'cosmos-sdk/v1/MsgCancelProposalResponse', value: MsgCancelProposalResponse.toAmino(message) }; }, @@ -1646,7 +1646,7 @@ export const MsgCancelProposalResponse = { }, toProtoMsg(message: MsgCancelProposalResponse): MsgCancelProposalResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1.MsgCancelProposalResponse", + typeUrl: '/cosmos.gov.v1.MsgCancelProposalResponse', value: MsgCancelProposalResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/gov/v1beta1/gov.ts b/libs/cosmos-types/cosmos/gov/v1beta1/gov.ts index f690042d..5af48b2c 100644 --- a/libs/cosmos-types/cosmos/gov/v1beta1/gov.ts +++ b/libs/cosmos-types/cosmos/gov/v1beta1/gov.ts @@ -1,13 +1,13 @@ -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino } from "../../../google/protobuf/duration"; -import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution"; -import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade"; -import { ClientUpdateProposal, ClientUpdateProposalProtoMsg, UpgradeProposal, UpgradeProposalProtoMsg } from "../../../ibc/core/client/v1/client"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { Duration, DurationAmino } from '../../../google/protobuf/duration'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { base64FromBytes,bytesFromBase64, DeepPartial, fromTimestamp, isSet, toTimestamp } from '../../../helpers'; +import { ClientUpdateProposal, ClientUpdateProposalProtoMsg, UpgradeProposal, UpgradeProposalProtoMsg } from '../../../ibc/core/client/v1/client'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from '../../distribution/v1beta1/distribution'; +import { CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg,SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg } from '../../upgrade/v1beta1/upgrade'; /** VoteOption enumerates the valid vote options for a given governance proposal. */ export enum VoteOption { /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ @@ -25,42 +25,42 @@ export enum VoteOption { export const VoteOptionAmino = VoteOption; export function voteOptionFromJSON(object: any): VoteOption { switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; + case 0: + case 'VOTE_OPTION_UNSPECIFIED': + return VoteOption.VOTE_OPTION_UNSPECIFIED; + case 1: + case 'VOTE_OPTION_YES': + return VoteOption.VOTE_OPTION_YES; + case 2: + case 'VOTE_OPTION_ABSTAIN': + return VoteOption.VOTE_OPTION_ABSTAIN; + case 3: + case 'VOTE_OPTION_NO': + return VoteOption.VOTE_OPTION_NO; + case 4: + case 'VOTE_OPTION_NO_WITH_VETO': + return VoteOption.VOTE_OPTION_NO_WITH_VETO; + case -1: + case 'UNRECOGNIZED': + default: + return VoteOption.UNRECOGNIZED; } } export function voteOptionToJSON(object: VoteOption): string { switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - case VoteOption.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case VoteOption.VOTE_OPTION_UNSPECIFIED: + return 'VOTE_OPTION_UNSPECIFIED'; + case VoteOption.VOTE_OPTION_YES: + return 'VOTE_OPTION_YES'; + case VoteOption.VOTE_OPTION_ABSTAIN: + return 'VOTE_OPTION_ABSTAIN'; + case VoteOption.VOTE_OPTION_NO: + return 'VOTE_OPTION_NO'; + case VoteOption.VOTE_OPTION_NO_WITH_VETO: + return 'VOTE_OPTION_NO_WITH_VETO'; + case VoteOption.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** ProposalStatus enumerates the valid statuses of a proposal. */ @@ -97,47 +97,47 @@ export enum ProposalStatus { export const ProposalStatusAmino = ProposalStatus; export function proposalStatusFromJSON(object: any): ProposalStatus { switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; + case 0: + case 'PROPOSAL_STATUS_UNSPECIFIED': + return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; + case 1: + case 'PROPOSAL_STATUS_DEPOSIT_PERIOD': + return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; + case 2: + case 'PROPOSAL_STATUS_VOTING_PERIOD': + return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; + case 3: + case 'PROPOSAL_STATUS_PASSED': + return ProposalStatus.PROPOSAL_STATUS_PASSED; + case 4: + case 'PROPOSAL_STATUS_REJECTED': + return ProposalStatus.PROPOSAL_STATUS_REJECTED; + case 5: + case 'PROPOSAL_STATUS_FAILED': + return ProposalStatus.PROPOSAL_STATUS_FAILED; + case -1: + case 'UNRECOGNIZED': + default: + return ProposalStatus.UNRECOGNIZED; } } export function proposalStatusToJSON(object: ProposalStatus): string { switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - case ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: + return 'PROPOSAL_STATUS_UNSPECIFIED'; + case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: + return 'PROPOSAL_STATUS_DEPOSIT_PERIOD'; + case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: + return 'PROPOSAL_STATUS_VOTING_PERIOD'; + case ProposalStatus.PROPOSAL_STATUS_PASSED: + return 'PROPOSAL_STATUS_PASSED'; + case ProposalStatus.PROPOSAL_STATUS_REJECTED: + return 'PROPOSAL_STATUS_REJECTED'; + case ProposalStatus.PROPOSAL_STATUS_FAILED: + return 'PROPOSAL_STATUS_FAILED'; + case ProposalStatus.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -152,7 +152,7 @@ export interface WeightedVoteOption { weight: string; } export interface WeightedVoteOptionProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption"; + typeUrl: '/cosmos.gov.v1beta1.WeightedVoteOption'; value: Uint8Array; } /** @@ -167,7 +167,7 @@ export interface WeightedVoteOptionAmino { weight: string; } export interface WeightedVoteOptionAminoMsg { - type: "cosmos-sdk/WeightedVoteOption"; + type: 'cosmos-sdk/WeightedVoteOption'; value: WeightedVoteOptionAmino; } /** @@ -181,7 +181,7 @@ export interface TextProposal { description: string; } export interface TextProposalProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.TextProposal"; + typeUrl: '/cosmos.gov.v1beta1.TextProposal'; value: Uint8Array; } /** @@ -195,7 +195,7 @@ export interface TextProposalAmino { description: string; } export interface TextProposalAminoMsg { - type: "cosmos-sdk/TextProposal"; + type: 'cosmos-sdk/TextProposal'; value: TextProposalAmino; } /** @@ -211,7 +211,7 @@ export interface Deposit { amount: Coin[]; } export interface DepositProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.Deposit"; + typeUrl: '/cosmos.gov.v1beta1.Deposit'; value: Uint8Array; } /** @@ -227,7 +227,7 @@ export interface DepositAmino { amount: CoinAmino[]; } export interface DepositAminoMsg { - type: "cosmos-sdk/Deposit"; + type: 'cosmos-sdk/Deposit'; value: DepositAmino; } /** Proposal defines the core field members of a governance proposal. */ @@ -256,10 +256,10 @@ export interface Proposal { votingEndTime: Date; } export interface ProposalProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.Proposal"; + typeUrl: '/cosmos.gov.v1beta1.Proposal'; value: Uint8Array; } -export type ProposalEncoded = Omit & { +export type ProposalEncoded = Omit & { /** content is the proposal's content. */content?: TextProposalProtoMsg | CommunityPoolSpendProposalProtoMsg | CommunityPoolSpendProposalWithDepositProtoMsg | SoftwareUpgradeProposalProtoMsg | CancelSoftwareUpgradeProposalProtoMsg | ClientUpdateProposalProtoMsg | UpgradeProposalProtoMsg | AnyProtoMsg | undefined; }; /** Proposal defines the core field members of a governance proposal. */ @@ -288,7 +288,7 @@ export interface ProposalAmino { voting_end_time: string; } export interface ProposalAminoMsg { - type: "cosmos-sdk/Proposal"; + type: 'cosmos-sdk/Proposal'; value: ProposalAmino; } /** TallyResult defines a standard tally for a governance proposal. */ @@ -303,7 +303,7 @@ export interface TallyResult { noWithVeto: string; } export interface TallyResultProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.TallyResult"; + typeUrl: '/cosmos.gov.v1beta1.TallyResult'; value: Uint8Array; } /** TallyResult defines a standard tally for a governance proposal. */ @@ -318,7 +318,7 @@ export interface TallyResultAmino { no_with_veto: string; } export interface TallyResultAminoMsg { - type: "cosmos-sdk/TallyResult"; + type: 'cosmos-sdk/TallyResult'; value: TallyResultAmino; } /** @@ -345,7 +345,7 @@ export interface Vote { options: WeightedVoteOption[]; } export interface VoteProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.Vote"; + typeUrl: '/cosmos.gov.v1beta1.Vote'; value: Uint8Array; } /** @@ -372,7 +372,7 @@ export interface VoteAmino { options: WeightedVoteOptionAmino[]; } export interface VoteAminoMsg { - type: "cosmos-sdk/Vote"; + type: 'cosmos-sdk/Vote'; value: VoteAmino; } /** DepositParams defines the params for deposits on governance proposals. */ @@ -386,7 +386,7 @@ export interface DepositParams { maxDepositPeriod: Duration; } export interface DepositParamsProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.DepositParams"; + typeUrl: '/cosmos.gov.v1beta1.DepositParams'; value: Uint8Array; } /** DepositParams defines the params for deposits on governance proposals. */ @@ -400,7 +400,7 @@ export interface DepositParamsAmino { max_deposit_period: DurationAmino; } export interface DepositParamsAminoMsg { - type: "cosmos-sdk/DepositParams"; + type: 'cosmos-sdk/DepositParams'; value: DepositParamsAmino; } /** VotingParams defines the params for voting on governance proposals. */ @@ -409,7 +409,7 @@ export interface VotingParams { votingPeriod: Duration; } export interface VotingParamsProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.VotingParams"; + typeUrl: '/cosmos.gov.v1beta1.VotingParams'; value: Uint8Array; } /** VotingParams defines the params for voting on governance proposals. */ @@ -418,7 +418,7 @@ export interface VotingParamsAmino { voting_period: DurationAmino; } export interface VotingParamsAminoMsg { - type: "cosmos-sdk/VotingParams"; + type: 'cosmos-sdk/VotingParams'; value: VotingParamsAmino; } /** TallyParams defines the params for tallying votes on governance proposals. */ @@ -437,7 +437,7 @@ export interface TallyParams { vetoThreshold: Uint8Array; } export interface TallyParamsProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.TallyParams"; + typeUrl: '/cosmos.gov.v1beta1.TallyParams'; value: Uint8Array; } /** TallyParams defines the params for tallying votes on governance proposals. */ @@ -456,29 +456,29 @@ export interface TallyParamsAmino { veto_threshold: string; } export interface TallyParamsAminoMsg { - type: "cosmos-sdk/TallyParams"; + type: 'cosmos-sdk/TallyParams'; value: TallyParamsAmino; } function createBaseWeightedVoteOption(): WeightedVoteOption { return { option: 0, - weight: "" + weight: '' }; } export const WeightedVoteOption = { - typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", - aminoType: "cosmos-sdk/WeightedVoteOption", + typeUrl: '/cosmos.gov.v1beta1.WeightedVoteOption', + aminoType: 'cosmos-sdk/WeightedVoteOption', is(o: any): o is WeightedVoteOption { - return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string"); + return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === 'string'); }, isAmino(o: any): o is WeightedVoteOptionAmino { - return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string"); + return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === 'string'); }, encode(message: WeightedVoteOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.option !== 0) { writer.uint32(8).int32(message.option); } - if (message.weight !== "") { + if (message.weight !== '') { writer.uint32(18).string(message.weight); } return writer; @@ -490,15 +490,15 @@ export const WeightedVoteOption = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.option = (reader.int32() as any); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.option = (reader.int32() as any); + break; + case 2: + message.weight = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -506,7 +506,7 @@ export const WeightedVoteOption = { fromPartial(object: DeepPartial): WeightedVoteOption { const message = createBaseWeightedVoteOption(); message.option = object.option ?? 0; - message.weight = object.weight ?? ""; + message.weight = object.weight ?? ''; return message; }, fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption { @@ -522,7 +522,7 @@ export const WeightedVoteOption = { toAmino(message: WeightedVoteOption): WeightedVoteOptionAmino { const obj: any = {}; obj.option = message.option === 0 ? undefined : message.option; - obj.weight = message.weight ?? ""; + obj.weight = message.weight ?? ''; return obj; }, fromAminoMsg(object: WeightedVoteOptionAminoMsg): WeightedVoteOption { @@ -530,7 +530,7 @@ export const WeightedVoteOption = { }, toAminoMsg(message: WeightedVoteOption): WeightedVoteOptionAminoMsg { return { - type: "cosmos-sdk/WeightedVoteOption", + type: 'cosmos-sdk/WeightedVoteOption', value: WeightedVoteOption.toAmino(message) }; }, @@ -542,7 +542,7 @@ export const WeightedVoteOption = { }, toProtoMsg(message: WeightedVoteOption): WeightedVoteOptionProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", + typeUrl: '/cosmos.gov.v1beta1.WeightedVoteOption', value: WeightedVoteOption.encode(message).finish() }; } @@ -551,24 +551,24 @@ GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseTextProposal(): TextProposal { return { - title: "", - description: "" + title: '', + description: '' }; } export const TextProposal = { - typeUrl: "/cosmos.gov.v1beta1.TextProposal", - aminoType: "cosmos-sdk/TextProposal", + typeUrl: '/cosmos.gov.v1beta1.TextProposal', + aminoType: 'cosmos-sdk/TextProposal', is(o: any): o is TextProposal { - return o && (o.$typeUrl === TextProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string"); + return o && (o.$typeUrl === TextProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string'); }, isAmino(o: any): o is TextProposalAmino { - return o && (o.$typeUrl === TextProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string"); + return o && (o.$typeUrl === TextProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string'); }, encode(message: TextProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { + if (message.title !== '') { writer.uint32(10).string(message.title); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } return writer; @@ -580,23 +580,23 @@ export const TextProposal = { while (reader.pos < end) { const 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; + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): TextProposal { const message = createBaseTextProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; + message.title = object.title ?? ''; + message.description = object.description ?? ''; return message; }, fromAmino(object: TextProposalAmino): TextProposal { @@ -611,8 +611,8 @@ export const TextProposal = { }, toAmino(message: TextProposal): TextProposalAmino { const obj: any = {}; - obj.title = message.title === "" ? undefined : message.title; - obj.description = message.description === "" ? undefined : message.description; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; return obj; }, fromAminoMsg(object: TextProposalAminoMsg): TextProposal { @@ -620,7 +620,7 @@ export const TextProposal = { }, toAminoMsg(message: TextProposal): TextProposalAminoMsg { return { - type: "cosmos-sdk/TextProposal", + type: 'cosmos-sdk/TextProposal', value: TextProposal.toAmino(message) }; }, @@ -632,7 +632,7 @@ export const TextProposal = { }, toProtoMsg(message: TextProposal): TextProposalProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.TextProposal", + typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: TextProposal.encode(message).finish() }; } @@ -642,24 +642,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProp function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), - depositor: "", + depositor: '', amount: [] }; } export const Deposit = { - typeUrl: "/cosmos.gov.v1beta1.Deposit", - aminoType: "cosmos-sdk/Deposit", + typeUrl: '/cosmos.gov.v1beta1.Deposit', + aminoType: 'cosmos-sdk/Deposit', is(o: any): o is Deposit { - return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposalId === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposalId === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is DepositAmino { - return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposal_id === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: Deposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(18).string(message.depositor); } for (const v of message.amount) { @@ -674,18 +674,18 @@ export const Deposit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -693,7 +693,7 @@ export const Deposit = { fromPartial(object: DeepPartial): Deposit { const message = createBaseDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; + message.depositor = object.depositor ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -711,7 +711,7 @@ export const Deposit = { toAmino(message: Deposit): DepositAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.depositor = message.depositor === '' ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -724,7 +724,7 @@ export const Deposit = { }, toAminoMsg(message: Deposit): DepositAminoMsg { return { - type: "cosmos-sdk/Deposit", + type: 'cosmos-sdk/Deposit', value: Deposit.toAmino(message) }; }, @@ -736,7 +736,7 @@ export const Deposit = { }, toProtoMsg(message: Deposit): DepositProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.Deposit", + typeUrl: '/cosmos.gov.v1beta1.Deposit', value: Deposit.encode(message).finish() }; } @@ -757,13 +757,13 @@ function createBaseProposal(): Proposal { }; } export const Proposal = { - typeUrl: "/cosmos.gov.v1beta1.Proposal", - aminoType: "cosmos-sdk/Proposal", + typeUrl: '/cosmos.gov.v1beta1.Proposal', + aminoType: 'cosmos-sdk/Proposal', is(o: any): o is Proposal { - return o && (o.$typeUrl === Proposal.typeUrl || typeof o.proposalId === "bigint" && isSet(o.status) && TallyResult.is(o.finalTallyResult) && Timestamp.is(o.submitTime) && Timestamp.is(o.depositEndTime) && Array.isArray(o.totalDeposit) && (!o.totalDeposit.length || Coin.is(o.totalDeposit[0])) && Timestamp.is(o.votingStartTime) && Timestamp.is(o.votingEndTime)); + return o && (o.$typeUrl === Proposal.typeUrl || typeof o.proposalId === 'bigint' && isSet(o.status) && TallyResult.is(o.finalTallyResult) && Timestamp.is(o.submitTime) && Timestamp.is(o.depositEndTime) && Array.isArray(o.totalDeposit) && (!o.totalDeposit.length || Coin.is(o.totalDeposit[0])) && Timestamp.is(o.votingStartTime) && Timestamp.is(o.votingEndTime)); }, isAmino(o: any): o is ProposalAmino { - return o && (o.$typeUrl === Proposal.typeUrl || typeof o.proposal_id === "bigint" && isSet(o.status) && TallyResult.isAmino(o.final_tally_result) && Timestamp.isAmino(o.submit_time) && Timestamp.isAmino(o.deposit_end_time) && Array.isArray(o.total_deposit) && (!o.total_deposit.length || Coin.isAmino(o.total_deposit[0])) && Timestamp.isAmino(o.voting_start_time) && Timestamp.isAmino(o.voting_end_time)); + return o && (o.$typeUrl === Proposal.typeUrl || typeof o.proposal_id === 'bigint' && isSet(o.status) && TallyResult.isAmino(o.final_tally_result) && Timestamp.isAmino(o.submit_time) && Timestamp.isAmino(o.deposit_end_time) && Array.isArray(o.total_deposit) && (!o.total_deposit.length || Coin.isAmino(o.total_deposit[0])) && Timestamp.isAmino(o.voting_start_time) && Timestamp.isAmino(o.voting_end_time)); }, encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -802,36 +802,36 @@ export const Proposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.content = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 3: - message.status = (reader.int32() as any); - break; - case 4: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.totalDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 9: - message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.content = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 3: + message.status = (reader.int32() as any); + break; + case 4: + message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); + break; + case 5: + message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 6: + message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 7: + message.totalDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 8: + message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 9: + message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -900,7 +900,7 @@ export const Proposal = { }, toAminoMsg(message: Proposal): ProposalAminoMsg { return { - type: "cosmos-sdk/Proposal", + type: 'cosmos-sdk/Proposal', value: Proposal.toAmino(message) }; }, @@ -912,7 +912,7 @@ export const Proposal = { }, toProtoMsg(message: Proposal): ProposalProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.Proposal", + typeUrl: '/cosmos.gov.v1beta1.Proposal', value: Proposal.encode(message).finish() }; } @@ -921,32 +921,32 @@ GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { - yes: "", - abstain: "", - no: "", - noWithVeto: "" + yes: '', + abstain: '', + no: '', + noWithVeto: '' }; } export const TallyResult = { - typeUrl: "/cosmos.gov.v1beta1.TallyResult", - aminoType: "cosmos-sdk/TallyResult", + typeUrl: '/cosmos.gov.v1beta1.TallyResult', + aminoType: 'cosmos-sdk/TallyResult', is(o: any): o is TallyResult { - return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes === "string" && typeof o.abstain === "string" && typeof o.no === "string" && typeof o.noWithVeto === "string"); + return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes === 'string' && typeof o.abstain === 'string' && typeof o.no === 'string' && typeof o.noWithVeto === 'string'); }, isAmino(o: any): o is TallyResultAmino { - return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes === "string" && typeof o.abstain === "string" && typeof o.no === "string" && typeof o.no_with_veto === "string"); + return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes === 'string' && typeof o.abstain === 'string' && typeof o.no === 'string' && typeof o.no_with_veto === 'string'); }, encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.yes !== "") { + if (message.yes !== '') { writer.uint32(10).string(message.yes); } - if (message.abstain !== "") { + if (message.abstain !== '') { writer.uint32(18).string(message.abstain); } - if (message.no !== "") { + if (message.no !== '') { writer.uint32(26).string(message.no); } - if (message.noWithVeto !== "") { + if (message.noWithVeto !== '') { writer.uint32(34).string(message.noWithVeto); } return writer; @@ -958,31 +958,31 @@ export const TallyResult = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.yes = reader.string(); - break; - case 2: - message.abstain = reader.string(); - break; - case 3: - message.no = reader.string(); - break; - case 4: - message.noWithVeto = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.yes = reader.string(); + break; + case 2: + message.abstain = reader.string(); + break; + case 3: + message.no = reader.string(); + break; + case 4: + message.noWithVeto = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): TallyResult { const message = createBaseTallyResult(); - message.yes = object.yes ?? ""; - message.abstain = object.abstain ?? ""; - message.no = object.no ?? ""; - message.noWithVeto = object.noWithVeto ?? ""; + message.yes = object.yes ?? ''; + message.abstain = object.abstain ?? ''; + message.no = object.no ?? ''; + message.noWithVeto = object.noWithVeto ?? ''; return message; }, fromAmino(object: TallyResultAmino): TallyResult { @@ -1003,10 +1003,10 @@ export const TallyResult = { }, toAmino(message: TallyResult): TallyResultAmino { const obj: any = {}; - obj.yes = message.yes === "" ? undefined : message.yes; - obj.abstain = message.abstain === "" ? undefined : message.abstain; - obj.no = message.no === "" ? undefined : message.no; - obj.no_with_veto = message.noWithVeto === "" ? undefined : message.noWithVeto; + obj.yes = message.yes === '' ? undefined : message.yes; + obj.abstain = message.abstain === '' ? undefined : message.abstain; + obj.no = message.no === '' ? undefined : message.no; + obj.no_with_veto = message.noWithVeto === '' ? undefined : message.noWithVeto; return obj; }, fromAminoMsg(object: TallyResultAminoMsg): TallyResult { @@ -1014,7 +1014,7 @@ export const TallyResult = { }, toAminoMsg(message: TallyResult): TallyResultAminoMsg { return { - type: "cosmos-sdk/TallyResult", + type: 'cosmos-sdk/TallyResult', value: TallyResult.toAmino(message) }; }, @@ -1026,7 +1026,7 @@ export const TallyResult = { }, toProtoMsg(message: TallyResult): TallyResultProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.TallyResult", + typeUrl: '/cosmos.gov.v1beta1.TallyResult', value: TallyResult.encode(message).finish() }; } @@ -1036,25 +1036,25 @@ GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResu function createBaseVote(): Vote { return { proposalId: BigInt(0), - voter: "", + voter: '', option: 0, options: [] }; } export const Vote = { - typeUrl: "/cosmos.gov.v1beta1.Vote", - aminoType: "cosmos-sdk/Vote", + typeUrl: '/cosmos.gov.v1beta1.Vote', + aminoType: 'cosmos-sdk/Vote', is(o: any): o is Vote { - return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && isSet(o.option) && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0]))); + return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0]))); }, isAmino(o: any): o is VoteAmino { - return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && isSet(o.option) && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0]))); + return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0]))); }, encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } if (message.option !== 0) { @@ -1072,21 +1072,21 @@ export const Vote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = (reader.int32() as any); + break; + case 4: + message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1094,7 +1094,7 @@ export const Vote = { fromPartial(object: DeepPartial): Vote { const message = createBaseVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.option = object.option ?? 0; message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; return message; @@ -1115,8 +1115,8 @@ export const Vote = { }, toAmino(message: Vote): VoteAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; + obj.voter = message.voter === '' ? undefined : message.voter; obj.option = message.option === 0 ? undefined : message.option; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); @@ -1130,7 +1130,7 @@ export const Vote = { }, toAminoMsg(message: Vote): VoteAminoMsg { return { - type: "cosmos-sdk/Vote", + type: 'cosmos-sdk/Vote', value: Vote.toAmino(message) }; }, @@ -1142,7 +1142,7 @@ export const Vote = { }, toProtoMsg(message: Vote): VoteProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.Vote", + typeUrl: '/cosmos.gov.v1beta1.Vote', value: Vote.encode(message).finish() }; } @@ -1156,8 +1156,8 @@ function createBaseDepositParams(): DepositParams { }; } export const DepositParams = { - typeUrl: "/cosmos.gov.v1beta1.DepositParams", - aminoType: "cosmos-sdk/DepositParams", + typeUrl: '/cosmos.gov.v1beta1.DepositParams', + aminoType: 'cosmos-sdk/DepositParams', is(o: any): o is DepositParams { return o && (o.$typeUrl === DepositParams.typeUrl || Array.isArray(o.minDeposit) && (!o.minDeposit.length || Coin.is(o.minDeposit[0])) && Duration.is(o.maxDepositPeriod)); }, @@ -1180,15 +1180,15 @@ export const DepositParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.minDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1222,7 +1222,7 @@ export const DepositParams = { }, toAminoMsg(message: DepositParams): DepositParamsAminoMsg { return { - type: "cosmos-sdk/DepositParams", + type: 'cosmos-sdk/DepositParams', value: DepositParams.toAmino(message) }; }, @@ -1234,7 +1234,7 @@ export const DepositParams = { }, toProtoMsg(message: DepositParams): DepositParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.DepositParams", + typeUrl: '/cosmos.gov.v1beta1.DepositParams', value: DepositParams.encode(message).finish() }; } @@ -1247,8 +1247,8 @@ function createBaseVotingParams(): VotingParams { }; } export const VotingParams = { - typeUrl: "/cosmos.gov.v1beta1.VotingParams", - aminoType: "cosmos-sdk/VotingParams", + typeUrl: '/cosmos.gov.v1beta1.VotingParams', + aminoType: 'cosmos-sdk/VotingParams', is(o: any): o is VotingParams { return o && (o.$typeUrl === VotingParams.typeUrl || Duration.is(o.votingPeriod)); }, @@ -1268,12 +1268,12 @@ export const VotingParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.votingPeriod = Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1300,7 +1300,7 @@ export const VotingParams = { }, toAminoMsg(message: VotingParams): VotingParamsAminoMsg { return { - type: "cosmos-sdk/VotingParams", + type: 'cosmos-sdk/VotingParams', value: VotingParams.toAmino(message) }; }, @@ -1312,7 +1312,7 @@ export const VotingParams = { }, toProtoMsg(message: VotingParams): VotingParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.VotingParams", + typeUrl: '/cosmos.gov.v1beta1.VotingParams', value: VotingParams.encode(message).finish() }; } @@ -1327,13 +1327,13 @@ function createBaseTallyParams(): TallyParams { }; } export const TallyParams = { - typeUrl: "/cosmos.gov.v1beta1.TallyParams", - aminoType: "cosmos-sdk/TallyParams", + typeUrl: '/cosmos.gov.v1beta1.TallyParams', + aminoType: 'cosmos-sdk/TallyParams', is(o: any): o is TallyParams { - return o && (o.$typeUrl === TallyParams.typeUrl || (o.quorum instanceof Uint8Array || typeof o.quorum === "string") && (o.threshold instanceof Uint8Array || typeof o.threshold === "string") && (o.vetoThreshold instanceof Uint8Array || typeof o.vetoThreshold === "string")); + return o && (o.$typeUrl === TallyParams.typeUrl || (o.quorum instanceof Uint8Array || typeof o.quorum === 'string') && (o.threshold instanceof Uint8Array || typeof o.threshold === 'string') && (o.vetoThreshold instanceof Uint8Array || typeof o.vetoThreshold === 'string')); }, isAmino(o: any): o is TallyParamsAmino { - return o && (o.$typeUrl === TallyParams.typeUrl || (o.quorum instanceof Uint8Array || typeof o.quorum === "string") && (o.threshold instanceof Uint8Array || typeof o.threshold === "string") && (o.veto_threshold instanceof Uint8Array || typeof o.veto_threshold === "string")); + return o && (o.$typeUrl === TallyParams.typeUrl || (o.quorum instanceof Uint8Array || typeof o.quorum === 'string') && (o.threshold instanceof Uint8Array || typeof o.threshold === 'string') && (o.veto_threshold instanceof Uint8Array || typeof o.veto_threshold === 'string')); }, encode(message: TallyParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.quorum.length !== 0) { @@ -1354,18 +1354,18 @@ export const TallyParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.vetoThreshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.quorum = reader.bytes(); + break; + case 2: + message.threshold = reader.bytes(); + break; + case 3: + message.vetoThreshold = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1402,7 +1402,7 @@ export const TallyParams = { }, toAminoMsg(message: TallyParams): TallyParamsAminoMsg { return { - type: "cosmos-sdk/TallyParams", + type: 'cosmos-sdk/TallyParams', value: TallyParams.toAmino(message) }; }, @@ -1414,7 +1414,7 @@ export const TallyParams = { }, toProtoMsg(message: TallyParams): TallyParamsProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.TallyParams", + typeUrl: '/cosmos.gov.v1beta1.TallyParams', value: TallyParams.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/gov/v1beta1/query.rpc.Query.ts b/libs/cosmos-types/cosmos/gov/v1beta1/query.rpc.Query.ts index 0853f800..cb329ea5 100644 --- a/libs/cosmos-types/cosmos/gov/v1beta1/query.rpc.Query.ts +++ b/libs/cosmos-types/cosmos/gov/v1beta1/query.rpc.Query.ts @@ -1,6 +1,6 @@ -import { TxRpc } from "../../../types"; -import { BinaryReader } from "../../../binary"; -import { QueryProposalRequest, QueryProposalResponse, QueryProposalsRequest, QueryProposalsResponse, QueryVoteRequest, QueryVoteResponse, QueryVotesRequest, QueryVotesResponse, QueryParamsRequest, QueryParamsResponse, QueryDepositRequest, QueryDepositResponse, QueryDepositsRequest, QueryDepositsResponse, QueryTallyResultRequest, QueryTallyResultResponse } from "./query"; +import { BinaryReader } from '../../../binary'; +import { TxRpc } from '../../../types'; +import { QueryDepositRequest, QueryDepositResponse, QueryDepositsRequest, QueryDepositsResponse, QueryParamsRequest, QueryParamsResponse, QueryProposalRequest, QueryProposalResponse, QueryProposalsRequest, QueryProposalsResponse, QueryTallyResultRequest, QueryTallyResultResponse,QueryVoteRequest, QueryVoteResponse, QueryVotesRequest, QueryVotesResponse } from './query'; /** Query defines the gRPC querier service for gov module */ export interface Query { /** Proposal queries proposal details based on ProposalID. */ @@ -47,49 +47,49 @@ export class QueryClientImpl implements Query { /* Proposal queries proposal details based on ProposalID. */ proposal = async (request: QueryProposalRequest): Promise => { const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposal", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'Proposal', data); return promise.then(data => QueryProposalResponse.decode(new BinaryReader(data))); }; /* Proposals queries all proposals based on given status. */ proposals = async (request: QueryProposalsRequest): Promise => { const data = QueryProposalsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposals", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'Proposals', data); return promise.then(data => QueryProposalsResponse.decode(new BinaryReader(data))); }; /* Vote queries voted information based on proposalID, voterAddr. */ vote = async (request: QueryVoteRequest): Promise => { const data = QueryVoteRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Vote", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'Vote', data); return promise.then(data => QueryVoteResponse.decode(new BinaryReader(data))); }; /* Votes queries votes of a given proposal. */ votes = async (request: QueryVotesRequest): Promise => { const data = QueryVotesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Votes", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'Votes', data); return promise.then(data => QueryVotesResponse.decode(new BinaryReader(data))); }; /* Params queries all parameters of the gov module. */ params = async (request: QueryParamsRequest): Promise => { const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Params", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'Params', data); return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); }; /* Deposit queries single deposit information based on proposalID, depositor address. */ deposit = async (request: QueryDepositRequest): Promise => { const data = QueryDepositRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposit", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'Deposit', data); return promise.then(data => QueryDepositResponse.decode(new BinaryReader(data))); }; /* Deposits queries all deposits of a single proposal. */ deposits = async (request: QueryDepositsRequest): Promise => { const data = QueryDepositsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposits", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'Deposits', data); return promise.then(data => QueryDepositsResponse.decode(new BinaryReader(data))); }; /* TallyResult queries the tally of a proposal vote. */ tallyResult = async (request: QueryTallyResultRequest): Promise => { const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "TallyResult", data); + const promise = this.rpc.request('cosmos.gov.v1beta1.Query', 'TallyResult', data); return promise.then(data => QueryTallyResultResponse.decode(new BinaryReader(data))); }; } diff --git a/libs/cosmos-types/cosmos/gov/v1beta1/query.ts b/libs/cosmos-types/cosmos/gov/v1beta1/query.ts index 53a71248..b8cbdbca 100644 --- a/libs/cosmos-types/cosmos/gov/v1beta1/query.ts +++ b/libs/cosmos-types/cosmos/gov/v1beta1/query.ts @@ -1,15 +1,15 @@ -import { ProposalStatus, Proposal, ProposalAmino, Vote, VoteAmino, VotingParams, VotingParamsAmino, DepositParams, DepositParamsAmino, TallyParams, TallyParamsAmino, Deposit, DepositAmino, TallyResult, TallyResultAmino } from "./gov"; -import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial, isSet } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from '../../base/query/v1beta1/pagination'; +import { Deposit, DepositAmino, DepositParams, DepositParamsAmino, Proposal, ProposalAmino, ProposalStatus, TallyParams, TallyParamsAmino, TallyResult, TallyResultAmino,Vote, VoteAmino, VotingParams, VotingParamsAmino } from './gov'; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ export interface QueryProposalRequest { /** proposal_id defines the unique id of the proposal. */ proposalId: bigint; } export interface QueryProposalRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryProposalRequest'; value: Uint8Array; } /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ @@ -18,7 +18,7 @@ export interface QueryProposalRequestAmino { proposal_id: string; } export interface QueryProposalRequestAminoMsg { - type: "cosmos-sdk/QueryProposalRequest"; + type: 'cosmos-sdk/QueryProposalRequest'; value: QueryProposalRequestAmino; } /** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ @@ -26,7 +26,7 @@ export interface QueryProposalResponse { proposal: Proposal; } export interface QueryProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryProposalResponse'; value: Uint8Array; } /** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ @@ -34,7 +34,7 @@ export interface QueryProposalResponseAmino { proposal: ProposalAmino; } export interface QueryProposalResponseAminoMsg { - type: "cosmos-sdk/QueryProposalResponse"; + type: 'cosmos-sdk/QueryProposalResponse'; value: QueryProposalResponseAmino; } /** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ @@ -49,7 +49,7 @@ export interface QueryProposalsRequest { pagination?: PageRequest; } export interface QueryProposalsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryProposalsRequest'; value: Uint8Array; } /** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ @@ -64,7 +64,7 @@ export interface QueryProposalsRequestAmino { pagination?: PageRequestAmino; } export interface QueryProposalsRequestAminoMsg { - type: "cosmos-sdk/QueryProposalsRequest"; + type: 'cosmos-sdk/QueryProposalsRequest'; value: QueryProposalsRequestAmino; } /** @@ -78,7 +78,7 @@ export interface QueryProposalsResponse { pagination?: PageResponse; } export interface QueryProposalsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryProposalsResponse'; value: Uint8Array; } /** @@ -92,7 +92,7 @@ export interface QueryProposalsResponseAmino { pagination?: PageResponseAmino; } export interface QueryProposalsResponseAminoMsg { - type: "cosmos-sdk/QueryProposalsResponse"; + type: 'cosmos-sdk/QueryProposalsResponse'; value: QueryProposalsResponseAmino; } /** QueryVoteRequest is the request type for the Query/Vote RPC method. */ @@ -103,7 +103,7 @@ export interface QueryVoteRequest { voter: string; } export interface QueryVoteRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryVoteRequest'; value: Uint8Array; } /** QueryVoteRequest is the request type for the Query/Vote RPC method. */ @@ -114,7 +114,7 @@ export interface QueryVoteRequestAmino { voter: string; } export interface QueryVoteRequestAminoMsg { - type: "cosmos-sdk/QueryVoteRequest"; + type: 'cosmos-sdk/QueryVoteRequest'; value: QueryVoteRequestAmino; } /** QueryVoteResponse is the response type for the Query/Vote RPC method. */ @@ -123,7 +123,7 @@ export interface QueryVoteResponse { vote: Vote; } export interface QueryVoteResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryVoteResponse'; value: Uint8Array; } /** QueryVoteResponse is the response type for the Query/Vote RPC method. */ @@ -132,7 +132,7 @@ export interface QueryVoteResponseAmino { vote: VoteAmino; } export interface QueryVoteResponseAminoMsg { - type: "cosmos-sdk/QueryVoteResponse"; + type: 'cosmos-sdk/QueryVoteResponse'; value: QueryVoteResponseAmino; } /** QueryVotesRequest is the request type for the Query/Votes RPC method. */ @@ -143,7 +143,7 @@ export interface QueryVotesRequest { pagination?: PageRequest; } export interface QueryVotesRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryVotesRequest'; value: Uint8Array; } /** QueryVotesRequest is the request type for the Query/Votes RPC method. */ @@ -154,7 +154,7 @@ export interface QueryVotesRequestAmino { pagination?: PageRequestAmino; } export interface QueryVotesRequestAminoMsg { - type: "cosmos-sdk/QueryVotesRequest"; + type: 'cosmos-sdk/QueryVotesRequest'; value: QueryVotesRequestAmino; } /** QueryVotesResponse is the response type for the Query/Votes RPC method. */ @@ -165,7 +165,7 @@ export interface QueryVotesResponse { pagination?: PageResponse; } export interface QueryVotesResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryVotesResponse'; value: Uint8Array; } /** QueryVotesResponse is the response type for the Query/Votes RPC method. */ @@ -176,7 +176,7 @@ export interface QueryVotesResponseAmino { pagination?: PageResponseAmino; } export interface QueryVotesResponseAminoMsg { - type: "cosmos-sdk/QueryVotesResponse"; + type: 'cosmos-sdk/QueryVotesResponse'; value: QueryVotesResponseAmino; } /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -188,7 +188,7 @@ export interface QueryParamsRequest { paramsType: string; } export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryParamsRequest'; value: Uint8Array; } /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -200,7 +200,7 @@ export interface QueryParamsRequestAmino { params_type: string; } export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; + type: 'cosmos-sdk/QueryParamsRequest'; value: QueryParamsRequestAmino; } /** QueryParamsResponse is the response type for the Query/Params RPC method. */ @@ -213,7 +213,7 @@ export interface QueryParamsResponse { tallyParams: TallyParams; } export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryParamsResponse'; value: Uint8Array; } /** QueryParamsResponse is the response type for the Query/Params RPC method. */ @@ -226,7 +226,7 @@ export interface QueryParamsResponseAmino { tally_params: TallyParamsAmino; } export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; + type: 'cosmos-sdk/QueryParamsResponse'; value: QueryParamsResponseAmino; } /** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ @@ -237,7 +237,7 @@ export interface QueryDepositRequest { depositor: string; } export interface QueryDepositRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryDepositRequest'; value: Uint8Array; } /** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ @@ -248,7 +248,7 @@ export interface QueryDepositRequestAmino { depositor: string; } export interface QueryDepositRequestAminoMsg { - type: "cosmos-sdk/QueryDepositRequest"; + type: 'cosmos-sdk/QueryDepositRequest'; value: QueryDepositRequestAmino; } /** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ @@ -257,7 +257,7 @@ export interface QueryDepositResponse { deposit: Deposit; } export interface QueryDepositResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryDepositResponse'; value: Uint8Array; } /** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ @@ -266,7 +266,7 @@ export interface QueryDepositResponseAmino { deposit: DepositAmino; } export interface QueryDepositResponseAminoMsg { - type: "cosmos-sdk/QueryDepositResponse"; + type: 'cosmos-sdk/QueryDepositResponse'; value: QueryDepositResponseAmino; } /** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ @@ -277,7 +277,7 @@ export interface QueryDepositsRequest { pagination?: PageRequest; } export interface QueryDepositsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryDepositsRequest'; value: Uint8Array; } /** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ @@ -288,7 +288,7 @@ export interface QueryDepositsRequestAmino { pagination?: PageRequestAmino; } export interface QueryDepositsRequestAminoMsg { - type: "cosmos-sdk/QueryDepositsRequest"; + type: 'cosmos-sdk/QueryDepositsRequest'; value: QueryDepositsRequestAmino; } /** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ @@ -299,7 +299,7 @@ export interface QueryDepositsResponse { pagination?: PageResponse; } export interface QueryDepositsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryDepositsResponse'; value: Uint8Array; } /** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ @@ -310,7 +310,7 @@ export interface QueryDepositsResponseAmino { pagination?: PageResponseAmino; } export interface QueryDepositsResponseAminoMsg { - type: "cosmos-sdk/QueryDepositsResponse"; + type: 'cosmos-sdk/QueryDepositsResponse'; value: QueryDepositsResponseAmino; } /** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ @@ -319,7 +319,7 @@ export interface QueryTallyResultRequest { proposalId: bigint; } export interface QueryTallyResultRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest"; + typeUrl: '/cosmos.gov.v1beta1.QueryTallyResultRequest'; value: Uint8Array; } /** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ @@ -328,7 +328,7 @@ export interface QueryTallyResultRequestAmino { proposal_id: string; } export interface QueryTallyResultRequestAminoMsg { - type: "cosmos-sdk/QueryTallyResultRequest"; + type: 'cosmos-sdk/QueryTallyResultRequest'; value: QueryTallyResultRequestAmino; } /** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ @@ -337,7 +337,7 @@ export interface QueryTallyResultResponse { tally: TallyResult; } export interface QueryTallyResultResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse"; + typeUrl: '/cosmos.gov.v1beta1.QueryTallyResultResponse'; value: Uint8Array; } /** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ @@ -346,7 +346,7 @@ export interface QueryTallyResultResponseAmino { tally: TallyResultAmino; } export interface QueryTallyResultResponseAminoMsg { - type: "cosmos-sdk/QueryTallyResultResponse"; + type: 'cosmos-sdk/QueryTallyResultResponse'; value: QueryTallyResultResponseAmino; } function createBaseQueryProposalRequest(): QueryProposalRequest { @@ -355,13 +355,13 @@ function createBaseQueryProposalRequest(): QueryProposalRequest { }; } export const QueryProposalRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", - aminoType: "cosmos-sdk/QueryProposalRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalRequest', + aminoType: 'cosmos-sdk/QueryProposalRequest', is(o: any): o is QueryProposalRequest { - return o && (o.$typeUrl === QueryProposalRequest.typeUrl || typeof o.proposalId === "bigint"); + return o && (o.$typeUrl === QueryProposalRequest.typeUrl || typeof o.proposalId === 'bigint'); }, isAmino(o: any): o is QueryProposalRequestAmino { - return o && (o.$typeUrl === QueryProposalRequest.typeUrl || typeof o.proposal_id === "bigint"); + return o && (o.$typeUrl === QueryProposalRequest.typeUrl || typeof o.proposal_id === 'bigint'); }, encode(message: QueryProposalRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -376,12 +376,12 @@ export const QueryProposalRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -408,7 +408,7 @@ export const QueryProposalRequest = { }, toAminoMsg(message: QueryProposalRequest): QueryProposalRequestAminoMsg { return { - type: "cosmos-sdk/QueryProposalRequest", + type: 'cosmos-sdk/QueryProposalRequest', value: QueryProposalRequest.toAmino(message) }; }, @@ -420,7 +420,7 @@ export const QueryProposalRequest = { }, toProtoMsg(message: QueryProposalRequest): QueryProposalRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalRequest', value: QueryProposalRequest.encode(message).finish() }; } @@ -433,8 +433,8 @@ function createBaseQueryProposalResponse(): QueryProposalResponse { }; } export const QueryProposalResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", - aminoType: "cosmos-sdk/QueryProposalResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalResponse', + aminoType: 'cosmos-sdk/QueryProposalResponse', is(o: any): o is QueryProposalResponse { return o && (o.$typeUrl === QueryProposalResponse.typeUrl || Proposal.is(o.proposal)); }, @@ -454,12 +454,12 @@ export const QueryProposalResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposal = Proposal.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -486,7 +486,7 @@ export const QueryProposalResponse = { }, toAminoMsg(message: QueryProposalResponse): QueryProposalResponseAminoMsg { return { - type: "cosmos-sdk/QueryProposalResponse", + type: 'cosmos-sdk/QueryProposalResponse', value: QueryProposalResponse.toAmino(message) }; }, @@ -498,7 +498,7 @@ export const QueryProposalResponse = { }, toProtoMsg(message: QueryProposalResponse): QueryProposalResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalResponse', value: QueryProposalResponse.encode(message).finish() }; } @@ -508,28 +508,28 @@ GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalResponse.aminoType, function createBaseQueryProposalsRequest(): QueryProposalsRequest { return { proposalStatus: 0, - voter: "", - depositor: "", + voter: '', + depositor: '', pagination: undefined }; } export const QueryProposalsRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", - aminoType: "cosmos-sdk/QueryProposalsRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalsRequest', + aminoType: 'cosmos-sdk/QueryProposalsRequest', is(o: any): o is QueryProposalsRequest { - return o && (o.$typeUrl === QueryProposalsRequest.typeUrl || isSet(o.proposalStatus) && typeof o.voter === "string" && typeof o.depositor === "string"); + return o && (o.$typeUrl === QueryProposalsRequest.typeUrl || isSet(o.proposalStatus) && typeof o.voter === 'string' && typeof o.depositor === 'string'); }, isAmino(o: any): o is QueryProposalsRequestAmino { - return o && (o.$typeUrl === QueryProposalsRequest.typeUrl || isSet(o.proposal_status) && typeof o.voter === "string" && typeof o.depositor === "string"); + return o && (o.$typeUrl === QueryProposalsRequest.typeUrl || isSet(o.proposal_status) && typeof o.voter === 'string' && typeof o.depositor === 'string'); }, encode(message: QueryProposalsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalStatus !== 0) { writer.uint32(8).int32(message.proposalStatus); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(26).string(message.depositor); } if (message.pagination !== undefined) { @@ -544,21 +544,21 @@ export const QueryProposalsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalStatus = (reader.int32() as any); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.depositor = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalStatus = (reader.int32() as any); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.depositor = reader.string(); + break; + case 4: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -566,8 +566,8 @@ export const QueryProposalsRequest = { fromPartial(object: DeepPartial): QueryProposalsRequest { const message = createBaseQueryProposalsRequest(); message.proposalStatus = object.proposalStatus ?? 0; - message.voter = object.voter ?? ""; - message.depositor = object.depositor ?? ""; + message.voter = object.voter ?? ''; + message.depositor = object.depositor ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -590,8 +590,8 @@ export const QueryProposalsRequest = { toAmino(message: QueryProposalsRequest): QueryProposalsRequestAmino { const obj: any = {}; obj.proposal_status = message.proposalStatus === 0 ? undefined : message.proposalStatus; - obj.voter = message.voter === "" ? undefined : message.voter; - obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.voter = message.voter === '' ? undefined : message.voter; + obj.depositor = message.depositor === '' ? undefined : message.depositor; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -600,7 +600,7 @@ export const QueryProposalsRequest = { }, toAminoMsg(message: QueryProposalsRequest): QueryProposalsRequestAminoMsg { return { - type: "cosmos-sdk/QueryProposalsRequest", + type: 'cosmos-sdk/QueryProposalsRequest', value: QueryProposalsRequest.toAmino(message) }; }, @@ -612,7 +612,7 @@ export const QueryProposalsRequest = { }, toProtoMsg(message: QueryProposalsRequest): QueryProposalsRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalsRequest', value: QueryProposalsRequest.encode(message).finish() }; } @@ -626,8 +626,8 @@ function createBaseQueryProposalsResponse(): QueryProposalsResponse { }; } export const QueryProposalsResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", - aminoType: "cosmos-sdk/QueryProposalsResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalsResponse', + aminoType: 'cosmos-sdk/QueryProposalsResponse', is(o: any): o is QueryProposalsResponse { return o && (o.$typeUrl === QueryProposalsResponse.typeUrl || Array.isArray(o.proposals) && (!o.proposals.length || Proposal.is(o.proposals[0]))); }, @@ -650,15 +650,15 @@ export const QueryProposalsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposals.push(Proposal.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -692,7 +692,7 @@ export const QueryProposalsResponse = { }, toAminoMsg(message: QueryProposalsResponse): QueryProposalsResponseAminoMsg { return { - type: "cosmos-sdk/QueryProposalsResponse", + type: 'cosmos-sdk/QueryProposalsResponse', value: QueryProposalsResponse.toAmino(message) }; }, @@ -704,7 +704,7 @@ export const QueryProposalsResponse = { }, toProtoMsg(message: QueryProposalsResponse): QueryProposalsResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryProposalsResponse', value: QueryProposalsResponse.encode(message).finish() }; } @@ -714,23 +714,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsResponse.aminoType function createBaseQueryVoteRequest(): QueryVoteRequest { return { proposalId: BigInt(0), - voter: "" + voter: '' }; } export const QueryVoteRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", - aminoType: "cosmos-sdk/QueryVoteRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryVoteRequest', + aminoType: 'cosmos-sdk/QueryVoteRequest', is(o: any): o is QueryVoteRequest { - return o && (o.$typeUrl === QueryVoteRequest.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string"); + return o && (o.$typeUrl === QueryVoteRequest.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string'); }, isAmino(o: any): o is QueryVoteRequestAmino { - return o && (o.$typeUrl === QueryVoteRequest.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string"); + return o && (o.$typeUrl === QueryVoteRequest.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string'); }, encode(message: QueryVoteRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } return writer; @@ -742,15 +742,15 @@ export const QueryVoteRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -758,7 +758,7 @@ export const QueryVoteRequest = { fromPartial(object: DeepPartial): QueryVoteRequest { const message = createBaseQueryVoteRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; return message; }, fromAmino(object: QueryVoteRequestAmino): QueryVoteRequest { @@ -774,7 +774,7 @@ export const QueryVoteRequest = { toAmino(message: QueryVoteRequest): QueryVoteRequestAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.voter = message.voter === '' ? undefined : message.voter; return obj; }, fromAminoMsg(object: QueryVoteRequestAminoMsg): QueryVoteRequest { @@ -782,7 +782,7 @@ export const QueryVoteRequest = { }, toAminoMsg(message: QueryVoteRequest): QueryVoteRequestAminoMsg { return { - type: "cosmos-sdk/QueryVoteRequest", + type: 'cosmos-sdk/QueryVoteRequest', value: QueryVoteRequest.toAmino(message) }; }, @@ -794,7 +794,7 @@ export const QueryVoteRequest = { }, toProtoMsg(message: QueryVoteRequest): QueryVoteRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryVoteRequest', value: QueryVoteRequest.encode(message).finish() }; } @@ -807,8 +807,8 @@ function createBaseQueryVoteResponse(): QueryVoteResponse { }; } export const QueryVoteResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", - aminoType: "cosmos-sdk/QueryVoteResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryVoteResponse', + aminoType: 'cosmos-sdk/QueryVoteResponse', is(o: any): o is QueryVoteResponse { return o && (o.$typeUrl === QueryVoteResponse.typeUrl || Vote.is(o.vote)); }, @@ -828,12 +828,12 @@ export const QueryVoteResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.vote = Vote.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -860,7 +860,7 @@ export const QueryVoteResponse = { }, toAminoMsg(message: QueryVoteResponse): QueryVoteResponseAminoMsg { return { - type: "cosmos-sdk/QueryVoteResponse", + type: 'cosmos-sdk/QueryVoteResponse', value: QueryVoteResponse.toAmino(message) }; }, @@ -872,7 +872,7 @@ export const QueryVoteResponse = { }, toProtoMsg(message: QueryVoteResponse): QueryVoteResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryVoteResponse', value: QueryVoteResponse.encode(message).finish() }; } @@ -886,13 +886,13 @@ function createBaseQueryVotesRequest(): QueryVotesRequest { }; } export const QueryVotesRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", - aminoType: "cosmos-sdk/QueryVotesRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryVotesRequest', + aminoType: 'cosmos-sdk/QueryVotesRequest', is(o: any): o is QueryVotesRequest { - return o && (o.$typeUrl === QueryVotesRequest.typeUrl || typeof o.proposalId === "bigint"); + return o && (o.$typeUrl === QueryVotesRequest.typeUrl || typeof o.proposalId === 'bigint'); }, isAmino(o: any): o is QueryVotesRequestAmino { - return o && (o.$typeUrl === QueryVotesRequest.typeUrl || typeof o.proposal_id === "bigint"); + return o && (o.$typeUrl === QueryVotesRequest.typeUrl || typeof o.proposal_id === 'bigint'); }, encode(message: QueryVotesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -910,15 +910,15 @@ export const QueryVotesRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -950,7 +950,7 @@ export const QueryVotesRequest = { }, toAminoMsg(message: QueryVotesRequest): QueryVotesRequestAminoMsg { return { - type: "cosmos-sdk/QueryVotesRequest", + type: 'cosmos-sdk/QueryVotesRequest', value: QueryVotesRequest.toAmino(message) }; }, @@ -962,7 +962,7 @@ export const QueryVotesRequest = { }, toProtoMsg(message: QueryVotesRequest): QueryVotesRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryVotesRequest', value: QueryVotesRequest.encode(message).finish() }; } @@ -976,8 +976,8 @@ function createBaseQueryVotesResponse(): QueryVotesResponse { }; } export const QueryVotesResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", - aminoType: "cosmos-sdk/QueryVotesResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryVotesResponse', + aminoType: 'cosmos-sdk/QueryVotesResponse', is(o: any): o is QueryVotesResponse { return o && (o.$typeUrl === QueryVotesResponse.typeUrl || Array.isArray(o.votes) && (!o.votes.length || Vote.is(o.votes[0]))); }, @@ -1000,15 +1000,15 @@ export const QueryVotesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.votes.push(Vote.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1042,7 +1042,7 @@ export const QueryVotesResponse = { }, toAminoMsg(message: QueryVotesResponse): QueryVotesResponseAminoMsg { return { - type: "cosmos-sdk/QueryVotesResponse", + type: 'cosmos-sdk/QueryVotesResponse', value: QueryVotesResponse.toAmino(message) }; }, @@ -1054,7 +1054,7 @@ export const QueryVotesResponse = { }, toProtoMsg(message: QueryVotesResponse): QueryVotesResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryVotesResponse', value: QueryVotesResponse.encode(message).finish() }; } @@ -1063,20 +1063,20 @@ GlobalDecoderRegistry.register(QueryVotesResponse.typeUrl, QueryVotesResponse); GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesResponse.aminoType, QueryVotesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return { - paramsType: "" + paramsType: '' }; } export const QueryParamsRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryParamsRequest', + aminoType: 'cosmos-sdk/QueryParamsRequest', is(o: any): o is QueryParamsRequest { - return o && (o.$typeUrl === QueryParamsRequest.typeUrl || typeof o.paramsType === "string"); + return o && (o.$typeUrl === QueryParamsRequest.typeUrl || typeof o.paramsType === 'string'); }, isAmino(o: any): o is QueryParamsRequestAmino { - return o && (o.$typeUrl === QueryParamsRequest.typeUrl || typeof o.params_type === "string"); + return o && (o.$typeUrl === QueryParamsRequest.typeUrl || typeof o.params_type === 'string'); }, encode(message: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.paramsType !== "") { + if (message.paramsType !== '') { writer.uint32(10).string(message.paramsType); } return writer; @@ -1088,19 +1088,19 @@ export const QueryParamsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.paramsType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.paramsType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); - message.paramsType = object.paramsType ?? ""; + message.paramsType = object.paramsType ?? ''; return message; }, fromAmino(object: QueryParamsRequestAmino): QueryParamsRequest { @@ -1112,7 +1112,7 @@ export const QueryParamsRequest = { }, toAmino(message: QueryParamsRequest): QueryParamsRequestAmino { const obj: any = {}; - obj.params_type = message.paramsType === "" ? undefined : message.paramsType; + obj.params_type = message.paramsType === '' ? undefined : message.paramsType; return obj; }, fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { @@ -1120,7 +1120,7 @@ export const QueryParamsRequest = { }, toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { return { - type: "cosmos-sdk/QueryParamsRequest", + type: 'cosmos-sdk/QueryParamsRequest', value: QueryParamsRequest.toAmino(message) }; }, @@ -1132,7 +1132,7 @@ export const QueryParamsRequest = { }, toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryParamsRequest', value: QueryParamsRequest.encode(message).finish() }; } @@ -1147,8 +1147,8 @@ function createBaseQueryParamsResponse(): QueryParamsResponse { }; } export const QueryParamsResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryParamsResponse', + aminoType: 'cosmos-sdk/QueryParamsResponse', is(o: any): o is QueryParamsResponse { return o && (o.$typeUrl === QueryParamsResponse.typeUrl || VotingParams.is(o.votingParams) && DepositParams.is(o.depositParams) && TallyParams.is(o.tallyParams)); }, @@ -1174,18 +1174,18 @@ export const QueryParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 2: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 3: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.votingParams = VotingParams.decode(reader, reader.uint32()); + break; + case 2: + message.depositParams = DepositParams.decode(reader, reader.uint32()); + break; + case 3: + message.tallyParams = TallyParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1222,7 +1222,7 @@ export const QueryParamsResponse = { }, toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { return { - type: "cosmos-sdk/QueryParamsResponse", + type: 'cosmos-sdk/QueryParamsResponse', value: QueryParamsResponse.toAmino(message) }; }, @@ -1234,7 +1234,7 @@ export const QueryParamsResponse = { }, toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryParamsResponse', value: QueryParamsResponse.encode(message).finish() }; } @@ -1244,23 +1244,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, Q function createBaseQueryDepositRequest(): QueryDepositRequest { return { proposalId: BigInt(0), - depositor: "" + depositor: '' }; } export const QueryDepositRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", - aminoType: "cosmos-sdk/QueryDepositRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositRequest', + aminoType: 'cosmos-sdk/QueryDepositRequest', is(o: any): o is QueryDepositRequest { - return o && (o.$typeUrl === QueryDepositRequest.typeUrl || typeof o.proposalId === "bigint" && typeof o.depositor === "string"); + return o && (o.$typeUrl === QueryDepositRequest.typeUrl || typeof o.proposalId === 'bigint' && typeof o.depositor === 'string'); }, isAmino(o: any): o is QueryDepositRequestAmino { - return o && (o.$typeUrl === QueryDepositRequest.typeUrl || typeof o.proposal_id === "bigint" && typeof o.depositor === "string"); + return o && (o.$typeUrl === QueryDepositRequest.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.depositor === 'string'); }, encode(message: QueryDepositRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(18).string(message.depositor); } return writer; @@ -1272,15 +1272,15 @@ export const QueryDepositRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1288,7 +1288,7 @@ export const QueryDepositRequest = { fromPartial(object: DeepPartial): QueryDepositRequest { const message = createBaseQueryDepositRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; + message.depositor = object.depositor ?? ''; return message; }, fromAmino(object: QueryDepositRequestAmino): QueryDepositRequest { @@ -1304,7 +1304,7 @@ export const QueryDepositRequest = { toAmino(message: QueryDepositRequest): QueryDepositRequestAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.depositor = message.depositor === '' ? undefined : message.depositor; return obj; }, fromAminoMsg(object: QueryDepositRequestAminoMsg): QueryDepositRequest { @@ -1312,7 +1312,7 @@ export const QueryDepositRequest = { }, toAminoMsg(message: QueryDepositRequest): QueryDepositRequestAminoMsg { return { - type: "cosmos-sdk/QueryDepositRequest", + type: 'cosmos-sdk/QueryDepositRequest', value: QueryDepositRequest.toAmino(message) }; }, @@ -1324,7 +1324,7 @@ export const QueryDepositRequest = { }, toProtoMsg(message: QueryDepositRequest): QueryDepositRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositRequest', value: QueryDepositRequest.encode(message).finish() }; } @@ -1337,8 +1337,8 @@ function createBaseQueryDepositResponse(): QueryDepositResponse { }; } export const QueryDepositResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", - aminoType: "cosmos-sdk/QueryDepositResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositResponse', + aminoType: 'cosmos-sdk/QueryDepositResponse', is(o: any): o is QueryDepositResponse { return o && (o.$typeUrl === QueryDepositResponse.typeUrl || Deposit.is(o.deposit)); }, @@ -1358,12 +1358,12 @@ export const QueryDepositResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deposit = Deposit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.deposit = Deposit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1390,7 +1390,7 @@ export const QueryDepositResponse = { }, toAminoMsg(message: QueryDepositResponse): QueryDepositResponseAminoMsg { return { - type: "cosmos-sdk/QueryDepositResponse", + type: 'cosmos-sdk/QueryDepositResponse', value: QueryDepositResponse.toAmino(message) }; }, @@ -1402,7 +1402,7 @@ export const QueryDepositResponse = { }, toProtoMsg(message: QueryDepositResponse): QueryDepositResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositResponse', value: QueryDepositResponse.encode(message).finish() }; } @@ -1416,13 +1416,13 @@ function createBaseQueryDepositsRequest(): QueryDepositsRequest { }; } export const QueryDepositsRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", - aminoType: "cosmos-sdk/QueryDepositsRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositsRequest', + aminoType: 'cosmos-sdk/QueryDepositsRequest', is(o: any): o is QueryDepositsRequest { - return o && (o.$typeUrl === QueryDepositsRequest.typeUrl || typeof o.proposalId === "bigint"); + return o && (o.$typeUrl === QueryDepositsRequest.typeUrl || typeof o.proposalId === 'bigint'); }, isAmino(o: any): o is QueryDepositsRequestAmino { - return o && (o.$typeUrl === QueryDepositsRequest.typeUrl || typeof o.proposal_id === "bigint"); + return o && (o.$typeUrl === QueryDepositsRequest.typeUrl || typeof o.proposal_id === 'bigint'); }, encode(message: QueryDepositsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -1440,15 +1440,15 @@ export const QueryDepositsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1480,7 +1480,7 @@ export const QueryDepositsRequest = { }, toAminoMsg(message: QueryDepositsRequest): QueryDepositsRequestAminoMsg { return { - type: "cosmos-sdk/QueryDepositsRequest", + type: 'cosmos-sdk/QueryDepositsRequest', value: QueryDepositsRequest.toAmino(message) }; }, @@ -1492,7 +1492,7 @@ export const QueryDepositsRequest = { }, toProtoMsg(message: QueryDepositsRequest): QueryDepositsRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositsRequest', value: QueryDepositsRequest.encode(message).finish() }; } @@ -1506,8 +1506,8 @@ function createBaseQueryDepositsResponse(): QueryDepositsResponse { }; } export const QueryDepositsResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", - aminoType: "cosmos-sdk/QueryDepositsResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositsResponse', + aminoType: 'cosmos-sdk/QueryDepositsResponse', is(o: any): o is QueryDepositsResponse { return o && (o.$typeUrl === QueryDepositsResponse.typeUrl || Array.isArray(o.deposits) && (!o.deposits.length || Deposit.is(o.deposits[0]))); }, @@ -1530,15 +1530,15 @@ export const QueryDepositsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.deposits.push(Deposit.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1572,7 +1572,7 @@ export const QueryDepositsResponse = { }, toAminoMsg(message: QueryDepositsResponse): QueryDepositsResponseAminoMsg { return { - type: "cosmos-sdk/QueryDepositsResponse", + type: 'cosmos-sdk/QueryDepositsResponse', value: QueryDepositsResponse.toAmino(message) }; }, @@ -1584,7 +1584,7 @@ export const QueryDepositsResponse = { }, toProtoMsg(message: QueryDepositsResponse): QueryDepositsResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryDepositsResponse', value: QueryDepositsResponse.encode(message).finish() }; } @@ -1597,13 +1597,13 @@ function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { }; } export const QueryTallyResultRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", - aminoType: "cosmos-sdk/QueryTallyResultRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryTallyResultRequest', + aminoType: 'cosmos-sdk/QueryTallyResultRequest', is(o: any): o is QueryTallyResultRequest { - return o && (o.$typeUrl === QueryTallyResultRequest.typeUrl || typeof o.proposalId === "bigint"); + return o && (o.$typeUrl === QueryTallyResultRequest.typeUrl || typeof o.proposalId === 'bigint'); }, isAmino(o: any): o is QueryTallyResultRequestAmino { - return o && (o.$typeUrl === QueryTallyResultRequest.typeUrl || typeof o.proposal_id === "bigint"); + return o && (o.$typeUrl === QueryTallyResultRequest.typeUrl || typeof o.proposal_id === 'bigint'); }, encode(message: QueryTallyResultRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -1618,12 +1618,12 @@ export const QueryTallyResultRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1650,7 +1650,7 @@ export const QueryTallyResultRequest = { }, toAminoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestAminoMsg { return { - type: "cosmos-sdk/QueryTallyResultRequest", + type: 'cosmos-sdk/QueryTallyResultRequest', value: QueryTallyResultRequest.toAmino(message) }; }, @@ -1662,7 +1662,7 @@ export const QueryTallyResultRequest = { }, toProtoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", + typeUrl: '/cosmos.gov.v1beta1.QueryTallyResultRequest', value: QueryTallyResultRequest.encode(message).finish() }; } @@ -1675,8 +1675,8 @@ function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { }; } export const QueryTallyResultResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", - aminoType: "cosmos-sdk/QueryTallyResultResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryTallyResultResponse', + aminoType: 'cosmos-sdk/QueryTallyResultResponse', is(o: any): o is QueryTallyResultResponse { return o && (o.$typeUrl === QueryTallyResultResponse.typeUrl || TallyResult.is(o.tally)); }, @@ -1696,12 +1696,12 @@ export const QueryTallyResultResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.tally = TallyResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1728,7 +1728,7 @@ export const QueryTallyResultResponse = { }, toAminoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseAminoMsg { return { - type: "cosmos-sdk/QueryTallyResultResponse", + type: 'cosmos-sdk/QueryTallyResultResponse', value: QueryTallyResultResponse.toAmino(message) }; }, @@ -1740,7 +1740,7 @@ export const QueryTallyResultResponse = { }, toProtoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", + typeUrl: '/cosmos.gov.v1beta1.QueryTallyResultResponse', value: QueryTallyResultResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/gov/v1beta1/tx.amino.ts b/libs/cosmos-types/cosmos/gov/v1beta1/tx.amino.ts index 1d618905..aa7667ba 100644 --- a/libs/cosmos-types/cosmos/gov/v1beta1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/gov/v1beta1/tx.amino.ts @@ -1,22 +1,22 @@ -import { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; +import { MsgDeposit,MsgSubmitProposal, MsgVote, MsgVoteWeighted } from './tx'; export const AminoConverter = { - "/cosmos.gov.v1beta1.MsgSubmitProposal": { - aminoType: "cosmos-sdk/MsgSubmitProposal", + '/cosmos.gov.v1beta1.MsgSubmitProposal': { + aminoType: 'cosmos-sdk/MsgSubmitProposal', toAmino: MsgSubmitProposal.toAmino, fromAmino: MsgSubmitProposal.fromAmino }, - "/cosmos.gov.v1beta1.MsgVote": { - aminoType: "cosmos-sdk/MsgVote", + '/cosmos.gov.v1beta1.MsgVote': { + aminoType: 'cosmos-sdk/MsgVote', toAmino: MsgVote.toAmino, fromAmino: MsgVote.fromAmino }, - "/cosmos.gov.v1beta1.MsgVoteWeighted": { - aminoType: "cosmos-sdk/MsgVoteWeighted", + '/cosmos.gov.v1beta1.MsgVoteWeighted': { + aminoType: 'cosmos-sdk/MsgVoteWeighted', toAmino: MsgVoteWeighted.toAmino, fromAmino: MsgVoteWeighted.fromAmino }, - "/cosmos.gov.v1beta1.MsgDeposit": { - aminoType: "cosmos-sdk/MsgDeposit", + '/cosmos.gov.v1beta1.MsgDeposit': { + aminoType: 'cosmos-sdk/MsgDeposit', toAmino: MsgDeposit.toAmino, fromAmino: MsgDeposit.fromAmino } diff --git a/libs/cosmos-types/cosmos/gov/v1beta1/tx.registry.ts b/libs/cosmos-types/cosmos/gov/v1beta1/tx.registry.ts index 6de50b07..f31824ae 100644 --- a/libs/cosmos-types/cosmos/gov/v1beta1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/gov/v1beta1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.gov.v1beta1.MsgVote", MsgVote], ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted], ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgDeposit,MsgSubmitProposal, MsgVote, MsgVoteWeighted } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.gov.v1beta1.MsgSubmitProposal', MsgSubmitProposal], ['/cosmos.gov.v1beta1.MsgVote', MsgVote], ['/cosmos.gov.v1beta1.MsgVoteWeighted', MsgVoteWeighted], ['/cosmos.gov.v1beta1.MsgDeposit', MsgDeposit]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/gov/v1beta1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/gov/v1beta1/tx.rpc.msg.ts index 92c5dcc5..933107f8 100644 --- a/libs/cosmos-types/cosmos/gov/v1beta1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/gov/v1beta1/tx.rpc.msg.ts @@ -1,49 +1,49 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgDeposit,MsgSubmitProposal, MsgVote, MsgVoteWeighted } from './tx'; /** Msg defines the gov Msg service. */ export interface Msg { /** SubmitProposal defines a method to create new proposal given a content. */ - submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto", memo?: string): Promise; + submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto', memo?: string): Promise; /** Vote defines a method to add a vote on a specific proposal. */ - vote(signerAddress: string, message: MsgVote, fee: number | StdFee | "auto", memo?: string): Promise; + vote(signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto', memo?: string): Promise; /** * VoteWeighted defines a method to add a weighted vote on a specific proposal. * * Since: cosmos-sdk 0.43 */ - voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | "auto", memo?: string): Promise; + voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | 'auto', memo?: string): Promise; /** Deposit defines a method to add deposit on a specific proposal. */ - deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | "auto", memo?: string): Promise; + deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the gov Msg service. */ export interface StargateImpl { /** SubmitProposal defines a method to create new proposal given a content. */ - submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto", memo?: string): Promise; + submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto', memo?: string): Promise; /** Vote defines a method to add a vote on a specific proposal. */ - vote(signerAddress: string, message: MsgVote, fee: number | StdFee | "auto", memo?: string): Promise; + vote(signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto', memo?: string): Promise; /** * VoteWeighted defines a method to add a weighted vote on a specific proposal. * * Since: cosmos-sdk 0.43 */ - voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | "auto", memo?: string): Promise; + voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | 'auto', memo?: string): Promise; /** Deposit defines a method to add deposit on a specific proposal. */ - deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | "auto", memo?: string): Promise; + deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the gov Msg service. */ export interface CosmWasmStargateImpl { /** SubmitProposal defines a method to create new proposal given a content. */ - submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto", memo?: string): Promise; + submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto', memo?: string): Promise; /** Vote defines a method to add a vote on a specific proposal. */ - vote(signerAddress: string, message: MsgVote, fee: number | StdFee | "auto", memo?: string): Promise; + vote(signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto', memo?: string): Promise; /** * VoteWeighted defines a method to add a weighted vote on a specific proposal. * * Since: cosmos-sdk 0.43 */ - voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | "auto", memo?: string): Promise; + voteWeighted(signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | 'auto', memo?: string): Promise; /** Deposit defines a method to add deposit on a specific proposal. */ - deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | "auto", memo?: string): Promise; + deposit(signerAddress: string, message: MsgDeposit, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -51,7 +51,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* SubmitProposal defines a method to create new proposal given a content. */ - submitProposal = async (signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + submitProposal = async (signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSubmitProposal.typeUrl, value: message @@ -59,7 +59,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Vote defines a method to add a vote on a specific proposal. */ - vote = async (signerAddress: string, message: MsgVote, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + vote = async (signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgVote.typeUrl, value: message @@ -69,7 +69,7 @@ export class MsgClientImpl implements Msg { /* VoteWeighted defines a method to add a weighted vote on a specific proposal. Since: cosmos-sdk 0.43 */ - voteWeighted = async (signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + voteWeighted = async (signerAddress: string, message: MsgVoteWeighted, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgVoteWeighted.typeUrl, value: message @@ -77,7 +77,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Deposit defines a method to add deposit on a specific proposal. */ - deposit = async (signerAddress: string, message: MsgDeposit, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + deposit = async (signerAddress: string, message: MsgDeposit, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgDeposit.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/gov/v1beta1/tx.ts b/libs/cosmos-types/cosmos/gov/v1beta1/tx.ts index cfa74a5c..abdd40ab 100644 --- a/libs/cosmos-types/cosmos/gov/v1beta1/tx.ts +++ b/libs/cosmos-types/cosmos/gov/v1beta1/tx.ts @@ -1,12 +1,12 @@ -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, TextProposal, TextProposalProtoMsg } from "./gov"; -import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution"; -import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade"; -import { ClientUpdateProposal, ClientUpdateProposalProtoMsg, UpgradeProposal, UpgradeProposalProtoMsg } from "../../../ibc/core/client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { DeepPartial, isSet } from '../../../helpers'; +import { ClientUpdateProposal, ClientUpdateProposalProtoMsg, UpgradeProposal, UpgradeProposalProtoMsg } from '../../../ibc/core/client/v1/client'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from '../../distribution/v1beta1/distribution'; +import { CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg,SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg } from '../../upgrade/v1beta1/upgrade'; +import { TextProposal, TextProposalProtoMsg,VoteOption, WeightedVoteOption, WeightedVoteOptionAmino } from './gov'; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary * proposal Content. @@ -20,10 +20,10 @@ export interface MsgSubmitProposal { proposer: string; } export interface MsgSubmitProposalProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal"; + typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal'; value: Uint8Array; } -export type MsgSubmitProposalEncoded = Omit & { +export type MsgSubmitProposalEncoded = Omit & { /** content is the proposal's content. */content?: CommunityPoolSpendProposalProtoMsg | CommunityPoolSpendProposalWithDepositProtoMsg | TextProposalProtoMsg | SoftwareUpgradeProposalProtoMsg | CancelSoftwareUpgradeProposalProtoMsg | ClientUpdateProposalProtoMsg | UpgradeProposalProtoMsg | AnyProtoMsg | undefined; }; /** @@ -39,7 +39,7 @@ export interface MsgSubmitProposalAmino { proposer: string; } export interface MsgSubmitProposalAminoMsg { - type: "cosmos-sdk/MsgSubmitProposal"; + type: 'cosmos-sdk/MsgSubmitProposal'; value: MsgSubmitProposalAmino; } /** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ @@ -48,7 +48,7 @@ export interface MsgSubmitProposalResponse { proposalId: bigint; } export interface MsgSubmitProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse"; + typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposalResponse'; value: Uint8Array; } /** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ @@ -57,7 +57,7 @@ export interface MsgSubmitProposalResponseAmino { proposal_id: string; } export interface MsgSubmitProposalResponseAminoMsg { - type: "cosmos-sdk/MsgSubmitProposalResponse"; + type: 'cosmos-sdk/MsgSubmitProposalResponse'; value: MsgSubmitProposalResponseAmino; } /** MsgVote defines a message to cast a vote. */ @@ -70,7 +70,7 @@ export interface MsgVote { option: VoteOption; } export interface MsgVoteProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVote"; + typeUrl: '/cosmos.gov.v1beta1.MsgVote'; value: Uint8Array; } /** MsgVote defines a message to cast a vote. */ @@ -83,19 +83,19 @@ export interface MsgVoteAmino { option: VoteOption; } export interface MsgVoteAminoMsg { - type: "cosmos-sdk/MsgVote"; + type: 'cosmos-sdk/MsgVote'; value: MsgVoteAmino; } /** MsgVoteResponse defines the Msg/Vote response type. */ export interface MsgVoteResponse {} export interface MsgVoteResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse"; + typeUrl: '/cosmos.gov.v1beta1.MsgVoteResponse'; value: Uint8Array; } /** MsgVoteResponse defines the Msg/Vote response type. */ export interface MsgVoteResponseAmino {} export interface MsgVoteResponseAminoMsg { - type: "cosmos-sdk/MsgVoteResponse"; + type: 'cosmos-sdk/MsgVoteResponse'; value: MsgVoteResponseAmino; } /** @@ -112,7 +112,7 @@ export interface MsgVoteWeighted { options: WeightedVoteOption[]; } export interface MsgVoteWeightedProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted"; + typeUrl: '/cosmos.gov.v1beta1.MsgVoteWeighted'; value: Uint8Array; } /** @@ -129,7 +129,7 @@ export interface MsgVoteWeightedAmino { options: WeightedVoteOptionAmino[]; } export interface MsgVoteWeightedAminoMsg { - type: "cosmos-sdk/MsgVoteWeighted"; + type: 'cosmos-sdk/MsgVoteWeighted'; value: MsgVoteWeightedAmino; } /** @@ -139,7 +139,7 @@ export interface MsgVoteWeightedAminoMsg { */ export interface MsgVoteWeightedResponse {} export interface MsgVoteWeightedResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse"; + typeUrl: '/cosmos.gov.v1beta1.MsgVoteWeightedResponse'; value: Uint8Array; } /** @@ -149,7 +149,7 @@ export interface MsgVoteWeightedResponseProtoMsg { */ export interface MsgVoteWeightedResponseAmino {} export interface MsgVoteWeightedResponseAminoMsg { - type: "cosmos-sdk/MsgVoteWeightedResponse"; + type: 'cosmos-sdk/MsgVoteWeightedResponse'; value: MsgVoteWeightedResponseAmino; } /** MsgDeposit defines a message to submit a deposit to an existing proposal. */ @@ -162,7 +162,7 @@ export interface MsgDeposit { amount: Coin[]; } export interface MsgDepositProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit"; + typeUrl: '/cosmos.gov.v1beta1.MsgDeposit'; value: Uint8Array; } /** MsgDeposit defines a message to submit a deposit to an existing proposal. */ @@ -175,36 +175,36 @@ export interface MsgDepositAmino { amount: CoinAmino[]; } export interface MsgDepositAminoMsg { - type: "cosmos-sdk/MsgDeposit"; + type: 'cosmos-sdk/MsgDeposit'; value: MsgDepositAmino; } /** MsgDepositResponse defines the Msg/Deposit response type. */ export interface MsgDepositResponse {} export interface MsgDepositResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse"; + typeUrl: '/cosmos.gov.v1beta1.MsgDepositResponse'; value: Uint8Array; } /** MsgDepositResponse defines the Msg/Deposit response type. */ export interface MsgDepositResponseAmino {} export interface MsgDepositResponseAminoMsg { - type: "cosmos-sdk/MsgDepositResponse"; + type: 'cosmos-sdk/MsgDepositResponse'; value: MsgDepositResponseAmino; } function createBaseMsgSubmitProposal(): MsgSubmitProposal { return { content: undefined, initialDeposit: [], - proposer: "" + proposer: '' }; } export const MsgSubmitProposal = { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - aminoType: "cosmos-sdk/MsgSubmitProposal", + typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', + aminoType: 'cosmos-sdk/MsgSubmitProposal', is(o: any): o is MsgSubmitProposal { - return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.initialDeposit) && (!o.initialDeposit.length || Coin.is(o.initialDeposit[0])) && typeof o.proposer === "string"); + return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.initialDeposit) && (!o.initialDeposit.length || Coin.is(o.initialDeposit[0])) && typeof o.proposer === 'string'); }, isAmino(o: any): o is MsgSubmitProposalAmino { - return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.initial_deposit) && (!o.initial_deposit.length || Coin.isAmino(o.initial_deposit[0])) && typeof o.proposer === "string"); + return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || Array.isArray(o.initial_deposit) && (!o.initial_deposit.length || Coin.isAmino(o.initial_deposit[0])) && typeof o.proposer === 'string'); }, encode(message: MsgSubmitProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.content !== undefined) { @@ -213,7 +213,7 @@ export const MsgSubmitProposal = { for (const v of message.initialDeposit) { Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.proposer !== "") { + if (message.proposer !== '') { writer.uint32(26).string(message.proposer); } return writer; @@ -225,18 +225,18 @@ export const MsgSubmitProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.content = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 2: - message.initialDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.content = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 2: + message.initialDeposit.push(Coin.decode(reader, reader.uint32())); + break; + case 3: + message.proposer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -245,7 +245,7 @@ export const MsgSubmitProposal = { const message = createBaseMsgSubmitProposal(); message.content = object.content !== undefined && object.content !== null ? GlobalDecoderRegistry.fromPartial(object.content) : undefined; message.initialDeposit = object.initialDeposit?.map(e => Coin.fromPartial(e)) || []; - message.proposer = object.proposer ?? ""; + message.proposer = object.proposer ?? ''; return message; }, fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal { @@ -267,7 +267,7 @@ export const MsgSubmitProposal = { } else { obj.initial_deposit = message.initialDeposit; } - obj.proposer = message.proposer === "" ? undefined : message.proposer; + obj.proposer = message.proposer === '' ? undefined : message.proposer; return obj; }, fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { @@ -275,7 +275,7 @@ export const MsgSubmitProposal = { }, toAminoMsg(message: MsgSubmitProposal): MsgSubmitProposalAminoMsg { return { - type: "cosmos-sdk/MsgSubmitProposal", + type: 'cosmos-sdk/MsgSubmitProposal', value: MsgSubmitProposal.toAmino(message) }; }, @@ -287,7 +287,7 @@ export const MsgSubmitProposal = { }, toProtoMsg(message: MsgSubmitProposal): MsgSubmitProposalProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", + typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: MsgSubmitProposal.encode(message).finish() }; } @@ -300,13 +300,13 @@ function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { }; } export const MsgSubmitProposalResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", - aminoType: "cosmos-sdk/MsgSubmitProposalResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposalResponse', + aminoType: 'cosmos-sdk/MsgSubmitProposalResponse', is(o: any): o is MsgSubmitProposalResponse { - return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposalId === "bigint"); + return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposalId === 'bigint'); }, isAmino(o: any): o is MsgSubmitProposalResponseAmino { - return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposal_id === "bigint"); + return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposal_id === 'bigint'); }, encode(message: MsgSubmitProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -321,12 +321,12 @@ export const MsgSubmitProposalResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -345,7 +345,7 @@ export const MsgSubmitProposalResponse = { }, toAmino(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; return obj; }, fromAminoMsg(object: MsgSubmitProposalResponseAminoMsg): MsgSubmitProposalResponse { @@ -353,7 +353,7 @@ export const MsgSubmitProposalResponse = { }, toAminoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAminoMsg { return { - type: "cosmos-sdk/MsgSubmitProposalResponse", + type: 'cosmos-sdk/MsgSubmitProposalResponse', value: MsgSubmitProposalResponse.toAmino(message) }; }, @@ -365,7 +365,7 @@ export const MsgSubmitProposalResponse = { }, toProtoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposalResponse', value: MsgSubmitProposalResponse.encode(message).finish() }; } @@ -375,24 +375,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoT function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), - voter: "", + voter: '', option: 0 }; } export const MsgVote = { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - aminoType: "cosmos-sdk/MsgVote", + typeUrl: '/cosmos.gov.v1beta1.MsgVote', + aminoType: 'cosmos-sdk/MsgVote', is(o: any): o is MsgVote { - return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && isSet(o.option)); + return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && isSet(o.option)); }, isAmino(o: any): o is MsgVoteAmino { - return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && isSet(o.option)); + return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && isSet(o.option)); }, encode(message: MsgVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } if (message.option !== 0) { @@ -407,18 +407,18 @@ export const MsgVote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -426,7 +426,7 @@ export const MsgVote = { fromPartial(object: DeepPartial): MsgVote { const message = createBaseMsgVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.option = object.option ?? 0; return message; }, @@ -446,7 +446,7 @@ export const MsgVote = { toAmino(message: MsgVote): MsgVoteAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.voter = message.voter === '' ? undefined : message.voter; obj.option = message.option === 0 ? undefined : message.option; return obj; }, @@ -455,7 +455,7 @@ export const MsgVote = { }, toAminoMsg(message: MsgVote): MsgVoteAminoMsg { return { - type: "cosmos-sdk/MsgVote", + type: 'cosmos-sdk/MsgVote', value: MsgVote.toAmino(message) }; }, @@ -467,7 +467,7 @@ export const MsgVote = { }, toProtoMsg(message: MsgVote): MsgVoteProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", + typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: MsgVote.encode(message).finish() }; } @@ -478,8 +478,8 @@ function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } export const MsgVoteResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", - aminoType: "cosmos-sdk/MsgVoteResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgVoteResponse', + aminoType: 'cosmos-sdk/MsgVoteResponse', is(o: any): o is MsgVoteResponse { return o && o.$typeUrl === MsgVoteResponse.typeUrl; }, @@ -496,9 +496,9 @@ export const MsgVoteResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -520,7 +520,7 @@ export const MsgVoteResponse = { }, toAminoMsg(message: MsgVoteResponse): MsgVoteResponseAminoMsg { return { - type: "cosmos-sdk/MsgVoteResponse", + type: 'cosmos-sdk/MsgVoteResponse', value: MsgVoteResponse.toAmino(message) }; }, @@ -532,7 +532,7 @@ export const MsgVoteResponse = { }, toProtoMsg(message: MsgVoteResponse): MsgVoteResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgVoteResponse', value: MsgVoteResponse.encode(message).finish() }; } @@ -542,24 +542,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVo function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), - voter: "", + voter: '', options: [] }; } export const MsgVoteWeighted = { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - aminoType: "cosmos-sdk/MsgVoteWeighted", + typeUrl: '/cosmos.gov.v1beta1.MsgVoteWeighted', + aminoType: 'cosmos-sdk/MsgVoteWeighted', is(o: any): o is MsgVoteWeighted { - return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0]))); + return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0]))); }, isAmino(o: any): o is MsgVoteWeightedAmino { - return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0]))); + return o && (o.$typeUrl === MsgVoteWeighted.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0]))); }, encode(message: MsgVoteWeighted, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } for (const v of message.options) { @@ -574,18 +574,18 @@ export const MsgVoteWeighted = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -593,7 +593,7 @@ export const MsgVoteWeighted = { fromPartial(object: DeepPartial): MsgVoteWeighted { const message = createBaseMsgVoteWeighted(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; return message; }, @@ -610,8 +610,8 @@ export const MsgVoteWeighted = { }, toAmino(message: MsgVoteWeighted): MsgVoteWeightedAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; + obj.voter = message.voter === '' ? undefined : message.voter; if (message.options) { obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); } else { @@ -624,7 +624,7 @@ export const MsgVoteWeighted = { }, toAminoMsg(message: MsgVoteWeighted): MsgVoteWeightedAminoMsg { return { - type: "cosmos-sdk/MsgVoteWeighted", + type: 'cosmos-sdk/MsgVoteWeighted', value: MsgVoteWeighted.toAmino(message) }; }, @@ -636,7 +636,7 @@ export const MsgVoteWeighted = { }, toProtoMsg(message: MsgVoteWeighted): MsgVoteWeightedProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", + typeUrl: '/cosmos.gov.v1beta1.MsgVoteWeighted', value: MsgVoteWeighted.encode(message).finish() }; } @@ -647,8 +647,8 @@ function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } export const MsgVoteWeightedResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", - aminoType: "cosmos-sdk/MsgVoteWeightedResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgVoteWeightedResponse', + aminoType: 'cosmos-sdk/MsgVoteWeightedResponse', is(o: any): o is MsgVoteWeightedResponse { return o && o.$typeUrl === MsgVoteWeightedResponse.typeUrl; }, @@ -665,9 +665,9 @@ export const MsgVoteWeightedResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -689,7 +689,7 @@ export const MsgVoteWeightedResponse = { }, toAminoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseAminoMsg { return { - type: "cosmos-sdk/MsgVoteWeightedResponse", + type: 'cosmos-sdk/MsgVoteWeightedResponse', value: MsgVoteWeightedResponse.toAmino(message) }; }, @@ -701,7 +701,7 @@ export const MsgVoteWeightedResponse = { }, toProtoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgVoteWeightedResponse', value: MsgVoteWeightedResponse.encode(message).finish() }; } @@ -711,24 +711,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoTyp function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), - depositor: "", + depositor: '', amount: [] }; } export const MsgDeposit = { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - aminoType: "cosmos-sdk/MsgDeposit", + typeUrl: '/cosmos.gov.v1beta1.MsgDeposit', + aminoType: 'cosmos-sdk/MsgDeposit', is(o: any): o is MsgDeposit { - return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposalId === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposalId === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is MsgDepositAmino { - return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposal_id === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === MsgDeposit.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.depositor === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: MsgDeposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.depositor !== "") { + if (message.depositor !== '') { writer.uint32(18).string(message.depositor); } for (const v of message.amount) { @@ -743,18 +743,18 @@ export const MsgDeposit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -762,7 +762,7 @@ export const MsgDeposit = { fromPartial(object: DeepPartial): MsgDeposit { const message = createBaseMsgDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; + message.depositor = object.depositor ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -779,8 +779,8 @@ export const MsgDeposit = { }, toAmino(message: MsgDeposit): MsgDepositAmino { const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : "0"; - obj.depositor = message.depositor === "" ? undefined : message.depositor; + obj.proposal_id = message.proposalId ? message.proposalId.toString() : '0'; + obj.depositor = message.depositor === '' ? undefined : message.depositor; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -793,7 +793,7 @@ export const MsgDeposit = { }, toAminoMsg(message: MsgDeposit): MsgDepositAminoMsg { return { - type: "cosmos-sdk/MsgDeposit", + type: 'cosmos-sdk/MsgDeposit', value: MsgDeposit.toAmino(message) }; }, @@ -805,7 +805,7 @@ export const MsgDeposit = { }, toProtoMsg(message: MsgDeposit): MsgDepositProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", + typeUrl: '/cosmos.gov.v1beta1.MsgDeposit', value: MsgDeposit.encode(message).finish() }; } @@ -816,8 +816,8 @@ function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } export const MsgDepositResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", - aminoType: "cosmos-sdk/MsgDepositResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgDepositResponse', + aminoType: 'cosmos-sdk/MsgDepositResponse', is(o: any): o is MsgDepositResponse { return o && o.$typeUrl === MsgDepositResponse.typeUrl; }, @@ -834,9 +834,9 @@ export const MsgDepositResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -858,7 +858,7 @@ export const MsgDepositResponse = { }, toAminoMsg(message: MsgDepositResponse): MsgDepositResponseAminoMsg { return { - type: "cosmos-sdk/MsgDepositResponse", + type: 'cosmos-sdk/MsgDepositResponse', value: MsgDepositResponse.toAmino(message) }; }, @@ -870,7 +870,7 @@ export const MsgDepositResponse = { }, toProtoMsg(message: MsgDepositResponse): MsgDepositResponseProtoMsg { return { - typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", + typeUrl: '/cosmos.gov.v1beta1.MsgDepositResponse', value: MsgDepositResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/group/v1/tx.amino.ts b/libs/cosmos-types/cosmos/group/v1/tx.amino.ts index 3a5c0e59..0c62095a 100644 --- a/libs/cosmos-types/cosmos/group/v1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/group/v1/tx.amino.ts @@ -1,72 +1,72 @@ -import { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup } from "./tx"; +import { MsgCreateGroup, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgExec, MsgLeaveGroup,MsgSubmitProposal, MsgUpdateGroupAdmin, MsgUpdateGroupMembers, MsgUpdateGroupMetadata, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgVote, MsgWithdrawProposal } from './tx'; export const AminoConverter = { - "/cosmos.group.v1.MsgCreateGroup": { - aminoType: "cosmos-sdk/MsgCreateGroup", + '/cosmos.group.v1.MsgCreateGroup': { + aminoType: 'cosmos-sdk/MsgCreateGroup', toAmino: MsgCreateGroup.toAmino, fromAmino: MsgCreateGroup.fromAmino }, - "/cosmos.group.v1.MsgUpdateGroupMembers": { - aminoType: "cosmos-sdk/MsgUpdateGroupMembers", + '/cosmos.group.v1.MsgUpdateGroupMembers': { + aminoType: 'cosmos-sdk/MsgUpdateGroupMembers', toAmino: MsgUpdateGroupMembers.toAmino, fromAmino: MsgUpdateGroupMembers.fromAmino }, - "/cosmos.group.v1.MsgUpdateGroupAdmin": { - aminoType: "cosmos-sdk/MsgUpdateGroupAdmin", + '/cosmos.group.v1.MsgUpdateGroupAdmin': { + aminoType: 'cosmos-sdk/MsgUpdateGroupAdmin', toAmino: MsgUpdateGroupAdmin.toAmino, fromAmino: MsgUpdateGroupAdmin.fromAmino }, - "/cosmos.group.v1.MsgUpdateGroupMetadata": { - aminoType: "cosmos-sdk/MsgUpdateGroupMetadata", + '/cosmos.group.v1.MsgUpdateGroupMetadata': { + aminoType: 'cosmos-sdk/MsgUpdateGroupMetadata', toAmino: MsgUpdateGroupMetadata.toAmino, fromAmino: MsgUpdateGroupMetadata.fromAmino }, - "/cosmos.group.v1.MsgCreateGroupPolicy": { - aminoType: "cosmos-sdk/MsgCreateGroupPolicy", + '/cosmos.group.v1.MsgCreateGroupPolicy': { + aminoType: 'cosmos-sdk/MsgCreateGroupPolicy', toAmino: MsgCreateGroupPolicy.toAmino, fromAmino: MsgCreateGroupPolicy.fromAmino }, - "/cosmos.group.v1.MsgCreateGroupWithPolicy": { - aminoType: "cosmos-sdk/MsgCreateGroupWithPolicy", + '/cosmos.group.v1.MsgCreateGroupWithPolicy': { + aminoType: 'cosmos-sdk/MsgCreateGroupWithPolicy', toAmino: MsgCreateGroupWithPolicy.toAmino, fromAmino: MsgCreateGroupWithPolicy.fromAmino }, - "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin": { - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyAdmin", + '/cosmos.group.v1.MsgUpdateGroupPolicyAdmin': { + aminoType: 'cosmos-sdk/MsgUpdateGroupPolicyAdmin', toAmino: MsgUpdateGroupPolicyAdmin.toAmino, fromAmino: MsgUpdateGroupPolicyAdmin.fromAmino }, - "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy": { - aminoType: "cosmos-sdk/MsgUpdateGroupDecisionPolicy", + '/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy': { + aminoType: 'cosmos-sdk/MsgUpdateGroupDecisionPolicy', toAmino: MsgUpdateGroupPolicyDecisionPolicy.toAmino, fromAmino: MsgUpdateGroupPolicyDecisionPolicy.fromAmino }, - "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata": { - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyMetadata", + '/cosmos.group.v1.MsgUpdateGroupPolicyMetadata': { + aminoType: 'cosmos-sdk/MsgUpdateGroupPolicyMetadata', toAmino: MsgUpdateGroupPolicyMetadata.toAmino, fromAmino: MsgUpdateGroupPolicyMetadata.fromAmino }, - "/cosmos.group.v1.MsgSubmitProposal": { - aminoType: "cosmos-sdk/group/MsgSubmitProposal", + '/cosmos.group.v1.MsgSubmitProposal': { + aminoType: 'cosmos-sdk/group/MsgSubmitProposal', toAmino: MsgSubmitProposal.toAmino, fromAmino: MsgSubmitProposal.fromAmino }, - "/cosmos.group.v1.MsgWithdrawProposal": { - aminoType: "cosmos-sdk/group/MsgWithdrawProposal", + '/cosmos.group.v1.MsgWithdrawProposal': { + aminoType: 'cosmos-sdk/group/MsgWithdrawProposal', toAmino: MsgWithdrawProposal.toAmino, fromAmino: MsgWithdrawProposal.fromAmino }, - "/cosmos.group.v1.MsgVote": { - aminoType: "cosmos-sdk/group/MsgVote", + '/cosmos.group.v1.MsgVote': { + aminoType: 'cosmos-sdk/group/MsgVote', toAmino: MsgVote.toAmino, fromAmino: MsgVote.fromAmino }, - "/cosmos.group.v1.MsgExec": { - aminoType: "cosmos-sdk/group/MsgExec", + '/cosmos.group.v1.MsgExec': { + aminoType: 'cosmos-sdk/group/MsgExec', toAmino: MsgExec.toAmino, fromAmino: MsgExec.fromAmino }, - "/cosmos.group.v1.MsgLeaveGroup": { - aminoType: "cosmos-sdk/group/MsgLeaveGroup", + '/cosmos.group.v1.MsgLeaveGroup': { + aminoType: 'cosmos-sdk/group/MsgLeaveGroup', toAmino: MsgLeaveGroup.toAmino, fromAmino: MsgLeaveGroup.fromAmino } diff --git a/libs/cosmos-types/cosmos/group/v1/tx.registry.ts b/libs/cosmos-types/cosmos/group/v1/tx.registry.ts index 59506439..548c81c2 100644 --- a/libs/cosmos-types/cosmos/group/v1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/group/v1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.group.v1.MsgCreateGroup", MsgCreateGroup], ["/cosmos.group.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers], ["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin], ["/cosmos.group.v1.MsgUpdateGroupMetadata", MsgUpdateGroupMetadata], ["/cosmos.group.v1.MsgCreateGroupPolicy", MsgCreateGroupPolicy], ["/cosmos.group.v1.MsgCreateGroupWithPolicy", MsgCreateGroupWithPolicy], ["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", MsgUpdateGroupPolicyAdmin], ["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy], ["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", MsgUpdateGroupPolicyMetadata], ["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal], ["/cosmos.group.v1.MsgVote", MsgVote], ["/cosmos.group.v1.MsgExec", MsgExec], ["/cosmos.group.v1.MsgLeaveGroup", MsgLeaveGroup]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgCreateGroup, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgExec, MsgLeaveGroup,MsgSubmitProposal, MsgUpdateGroupAdmin, MsgUpdateGroupMembers, MsgUpdateGroupMetadata, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgVote, MsgWithdrawProposal } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.group.v1.MsgCreateGroup', MsgCreateGroup], ['/cosmos.group.v1.MsgUpdateGroupMembers', MsgUpdateGroupMembers], ['/cosmos.group.v1.MsgUpdateGroupAdmin', MsgUpdateGroupAdmin], ['/cosmos.group.v1.MsgUpdateGroupMetadata', MsgUpdateGroupMetadata], ['/cosmos.group.v1.MsgCreateGroupPolicy', MsgCreateGroupPolicy], ['/cosmos.group.v1.MsgCreateGroupWithPolicy', MsgCreateGroupWithPolicy], ['/cosmos.group.v1.MsgUpdateGroupPolicyAdmin', MsgUpdateGroupPolicyAdmin], ['/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy', MsgUpdateGroupPolicyDecisionPolicy], ['/cosmos.group.v1.MsgUpdateGroupPolicyMetadata', MsgUpdateGroupPolicyMetadata], ['/cosmos.group.v1.MsgSubmitProposal', MsgSubmitProposal], ['/cosmos.group.v1.MsgWithdrawProposal', MsgWithdrawProposal], ['/cosmos.group.v1.MsgVote', MsgVote], ['/cosmos.group.v1.MsgExec', MsgExec], ['/cosmos.group.v1.MsgLeaveGroup', MsgLeaveGroup]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/group/v1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/group/v1/tx.rpc.msg.ts index b42df770..05ac5dc2 100644 --- a/libs/cosmos-types/cosmos/group/v1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/group/v1/tx.rpc.msg.ts @@ -1,35 +1,35 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgCreateGroup, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgExec, MsgLeaveGroup,MsgSubmitProposal, MsgUpdateGroupAdmin, MsgUpdateGroupMembers, MsgUpdateGroupMetadata, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgVote, MsgWithdrawProposal } from './tx'; /** Msg is the cosmos.group.v1 Msg service. */ export interface Msg { /** CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. */ - createGroup(signerAddress: string, message: MsgCreateGroup, fee: number | StdFee | "auto", memo?: string): Promise; + createGroup(signerAddress: string, message: MsgCreateGroup, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateGroupMembers updates the group members with given group id and admin address. */ - updateGroupMembers(signerAddress: string, message: MsgUpdateGroupMembers, fee: number | StdFee | "auto", memo?: string): Promise; + updateGroupMembers(signerAddress: string, message: MsgUpdateGroupMembers, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateGroupAdmin updates the group admin with given group id and previous admin address. */ - updateGroupAdmin(signerAddress: string, message: MsgUpdateGroupAdmin, fee: number | StdFee | "auto", memo?: string): Promise; + updateGroupAdmin(signerAddress: string, message: MsgUpdateGroupAdmin, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateGroupMetadata updates the group metadata with given group id and admin address. */ - updateGroupMetadata(signerAddress: string, message: MsgUpdateGroupMetadata, fee: number | StdFee | "auto", memo?: string): Promise; + updateGroupMetadata(signerAddress: string, message: MsgUpdateGroupMetadata, fee: number | StdFee | 'auto', memo?: string): Promise; /** CreateGroupPolicy creates a new group policy using given DecisionPolicy. */ - createGroupPolicy(signerAddress: string, message: MsgCreateGroupPolicy, fee: number | StdFee | "auto", memo?: string): Promise; + createGroupPolicy(signerAddress: string, message: MsgCreateGroupPolicy, fee: number | StdFee | 'auto', memo?: string): Promise; /** CreateGroupWithPolicy creates a new group with policy. */ - createGroupWithPolicy(signerAddress: string, message: MsgCreateGroupWithPolicy, fee: number | StdFee | "auto", memo?: string): Promise; + createGroupWithPolicy(signerAddress: string, message: MsgCreateGroupWithPolicy, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateGroupPolicyAdmin updates a group policy admin. */ - updateGroupPolicyAdmin(signerAddress: string, message: MsgUpdateGroupPolicyAdmin, fee: number | StdFee | "auto", memo?: string): Promise; + updateGroupPolicyAdmin(signerAddress: string, message: MsgUpdateGroupPolicyAdmin, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. */ - updateGroupPolicyDecisionPolicy(signerAddress: string, message: MsgUpdateGroupPolicyDecisionPolicy, fee: number | StdFee | "auto", memo?: string): Promise; + updateGroupPolicyDecisionPolicy(signerAddress: string, message: MsgUpdateGroupPolicyDecisionPolicy, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateGroupPolicyMetadata updates a group policy metadata. */ - updateGroupPolicyMetadata(signerAddress: string, message: MsgUpdateGroupPolicyMetadata, fee: number | StdFee | "auto", memo?: string): Promise; + updateGroupPolicyMetadata(signerAddress: string, message: MsgUpdateGroupPolicyMetadata, fee: number | StdFee | 'auto', memo?: string): Promise; /** SubmitProposal submits a new proposal. */ - submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto", memo?: string): Promise; + submitProposal(signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto', memo?: string): Promise; /** WithdrawProposal withdraws a proposal. */ - withdrawProposal(signerAddress: string, message: MsgWithdrawProposal, fee: number | StdFee | "auto", memo?: string): Promise; + withdrawProposal(signerAddress: string, message: MsgWithdrawProposal, fee: number | StdFee | 'auto', memo?: string): Promise; /** Vote allows a voter to vote on a proposal. */ - vote(signerAddress: string, message: MsgVote, fee: number | StdFee | "auto", memo?: string): Promise; + vote(signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto', memo?: string): Promise; /** Exec executes a proposal. */ - exec(signerAddress: string, message: MsgExec, fee: number | StdFee | "auto", memo?: string): Promise; + exec(signerAddress: string, message: MsgExec, fee: number | StdFee | 'auto', memo?: string): Promise; /** LeaveGroup allows a group member to leave the group. */ - leaveGroup(signerAddress: string, message: MsgLeaveGroup, fee: number | StdFee | "auto", memo?: string): Promise; + leaveGroup(signerAddress: string, message: MsgLeaveGroup, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -37,7 +37,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. */ - createGroup = async (signerAddress: string, message: MsgCreateGroup, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createGroup = async (signerAddress: string, message: MsgCreateGroup, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreateGroup.typeUrl, value: message @@ -45,7 +45,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateGroupMembers updates the group members with given group id and admin address. */ - updateGroupMembers = async (signerAddress: string, message: MsgUpdateGroupMembers, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateGroupMembers = async (signerAddress: string, message: MsgUpdateGroupMembers, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateGroupMembers.typeUrl, value: message @@ -53,7 +53,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateGroupAdmin updates the group admin with given group id and previous admin address. */ - updateGroupAdmin = async (signerAddress: string, message: MsgUpdateGroupAdmin, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateGroupAdmin = async (signerAddress: string, message: MsgUpdateGroupAdmin, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateGroupAdmin.typeUrl, value: message @@ -61,7 +61,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateGroupMetadata updates the group metadata with given group id and admin address. */ - updateGroupMetadata = async (signerAddress: string, message: MsgUpdateGroupMetadata, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateGroupMetadata = async (signerAddress: string, message: MsgUpdateGroupMetadata, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateGroupMetadata.typeUrl, value: message @@ -69,7 +69,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* CreateGroupPolicy creates a new group policy using given DecisionPolicy. */ - createGroupPolicy = async (signerAddress: string, message: MsgCreateGroupPolicy, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createGroupPolicy = async (signerAddress: string, message: MsgCreateGroupPolicy, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreateGroupPolicy.typeUrl, value: message @@ -77,7 +77,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* CreateGroupWithPolicy creates a new group with policy. */ - createGroupWithPolicy = async (signerAddress: string, message: MsgCreateGroupWithPolicy, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createGroupWithPolicy = async (signerAddress: string, message: MsgCreateGroupWithPolicy, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreateGroupWithPolicy.typeUrl, value: message @@ -85,7 +85,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateGroupPolicyAdmin updates a group policy admin. */ - updateGroupPolicyAdmin = async (signerAddress: string, message: MsgUpdateGroupPolicyAdmin, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateGroupPolicyAdmin = async (signerAddress: string, message: MsgUpdateGroupPolicyAdmin, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateGroupPolicyAdmin.typeUrl, value: message @@ -93,7 +93,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. */ - updateGroupPolicyDecisionPolicy = async (signerAddress: string, message: MsgUpdateGroupPolicyDecisionPolicy, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateGroupPolicyDecisionPolicy = async (signerAddress: string, message: MsgUpdateGroupPolicyDecisionPolicy, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateGroupPolicyDecisionPolicy.typeUrl, value: message @@ -101,7 +101,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateGroupPolicyMetadata updates a group policy metadata. */ - updateGroupPolicyMetadata = async (signerAddress: string, message: MsgUpdateGroupPolicyMetadata, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateGroupPolicyMetadata = async (signerAddress: string, message: MsgUpdateGroupPolicyMetadata, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateGroupPolicyMetadata.typeUrl, value: message @@ -109,7 +109,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* SubmitProposal submits a new proposal. */ - submitProposal = async (signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + submitProposal = async (signerAddress: string, message: MsgSubmitProposal, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSubmitProposal.typeUrl, value: message @@ -117,7 +117,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* WithdrawProposal withdraws a proposal. */ - withdrawProposal = async (signerAddress: string, message: MsgWithdrawProposal, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + withdrawProposal = async (signerAddress: string, message: MsgWithdrawProposal, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgWithdrawProposal.typeUrl, value: message @@ -125,7 +125,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Vote allows a voter to vote on a proposal. */ - vote = async (signerAddress: string, message: MsgVote, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + vote = async (signerAddress: string, message: MsgVote, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgVote.typeUrl, value: message @@ -133,7 +133,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Exec executes a proposal. */ - exec = async (signerAddress: string, message: MsgExec, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + exec = async (signerAddress: string, message: MsgExec, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgExec.typeUrl, value: message @@ -141,7 +141,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* LeaveGroup allows a group member to leave the group. */ - leaveGroup = async (signerAddress: string, message: MsgLeaveGroup, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + leaveGroup = async (signerAddress: string, message: MsgLeaveGroup, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgLeaveGroup.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/group/v1/tx.ts b/libs/cosmos-types/cosmos/group/v1/tx.ts index eecffee2..8b90c9ff 100644 --- a/libs/cosmos-types/cosmos/group/v1/tx.ts +++ b/libs/cosmos-types/cosmos/group/v1/tx.ts @@ -1,8 +1,8 @@ -import { MemberRequest, MemberRequestAmino, VoteOption, ProposalExecutorResult, ThresholdDecisionPolicy, ThresholdDecisionPolicyProtoMsg, PercentageDecisionPolicy, PercentageDecisionPolicyProtoMsg } from "./types"; -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { DeepPartial, isSet } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { MemberRequest, MemberRequestAmino, PercentageDecisionPolicy, PercentageDecisionPolicyProtoMsg,ProposalExecutorResult, ThresholdDecisionPolicy, ThresholdDecisionPolicyProtoMsg, VoteOption } from './types'; /** Exec defines modes of execution of a proposal on creation or on new vote. */ export enum Exec { /** @@ -22,27 +22,27 @@ export enum Exec { export const ExecAmino = Exec; export function execFromJSON(object: any): Exec { switch (object) { - case 0: - case "EXEC_UNSPECIFIED": - return Exec.EXEC_UNSPECIFIED; - case 1: - case "EXEC_TRY": - return Exec.EXEC_TRY; - case -1: - case "UNRECOGNIZED": - default: - return Exec.UNRECOGNIZED; + case 0: + case 'EXEC_UNSPECIFIED': + return Exec.EXEC_UNSPECIFIED; + case 1: + case 'EXEC_TRY': + return Exec.EXEC_TRY; + case -1: + case 'UNRECOGNIZED': + default: + return Exec.UNRECOGNIZED; } } export function execToJSON(object: Exec): string { switch (object) { - case Exec.EXEC_UNSPECIFIED: - return "EXEC_UNSPECIFIED"; - case Exec.EXEC_TRY: - return "EXEC_TRY"; - case Exec.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case Exec.EXEC_UNSPECIFIED: + return 'EXEC_UNSPECIFIED'; + case Exec.EXEC_TRY: + return 'EXEC_TRY'; + case Exec.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** MsgCreateGroup is the Msg/CreateGroup request type. */ @@ -55,7 +55,7 @@ export interface MsgCreateGroup { metadata: string; } export interface MsgCreateGroupProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroup"; + typeUrl: '/cosmos.group.v1.MsgCreateGroup'; value: Uint8Array; } /** MsgCreateGroup is the Msg/CreateGroup request type. */ @@ -68,7 +68,7 @@ export interface MsgCreateGroupAmino { metadata: string; } export interface MsgCreateGroupAminoMsg { - type: "cosmos-sdk/MsgCreateGroup"; + type: 'cosmos-sdk/MsgCreateGroup'; value: MsgCreateGroupAmino; } /** MsgCreateGroupResponse is the Msg/CreateGroup response type. */ @@ -77,7 +77,7 @@ export interface MsgCreateGroupResponse { groupId: bigint; } export interface MsgCreateGroupResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse"; + typeUrl: '/cosmos.group.v1.MsgCreateGroupResponse'; value: Uint8Array; } /** MsgCreateGroupResponse is the Msg/CreateGroup response type. */ @@ -86,7 +86,7 @@ export interface MsgCreateGroupResponseAmino { group_id: string; } export interface MsgCreateGroupResponseAminoMsg { - type: "cosmos-sdk/MsgCreateGroupResponse"; + type: 'cosmos-sdk/MsgCreateGroupResponse'; value: MsgCreateGroupResponseAmino; } /** MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. */ @@ -102,7 +102,7 @@ export interface MsgUpdateGroupMembers { memberUpdates: MemberRequest[]; } export interface MsgUpdateGroupMembersProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMembers'; value: Uint8Array; } /** MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. */ @@ -118,19 +118,19 @@ export interface MsgUpdateGroupMembersAmino { member_updates: MemberRequestAmino[]; } export interface MsgUpdateGroupMembersAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMembers"; + type: 'cosmos-sdk/MsgUpdateGroupMembers'; value: MsgUpdateGroupMembersAmino; } /** MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. */ export interface MsgUpdateGroupMembersResponse {} export interface MsgUpdateGroupMembersResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMembersResponse'; value: Uint8Array; } /** MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. */ export interface MsgUpdateGroupMembersResponseAmino {} export interface MsgUpdateGroupMembersResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMembersResponse"; + type: 'cosmos-sdk/MsgUpdateGroupMembersResponse'; value: MsgUpdateGroupMembersResponseAmino; } /** MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. */ @@ -143,7 +143,7 @@ export interface MsgUpdateGroupAdmin { newAdmin: string; } export interface MsgUpdateGroupAdminProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupAdmin'; value: Uint8Array; } /** MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. */ @@ -156,19 +156,19 @@ export interface MsgUpdateGroupAdminAmino { new_admin: string; } export interface MsgUpdateGroupAdminAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupAdmin"; + type: 'cosmos-sdk/MsgUpdateGroupAdmin'; value: MsgUpdateGroupAdminAmino; } /** MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. */ export interface MsgUpdateGroupAdminResponse {} export interface MsgUpdateGroupAdminResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupAdminResponse'; value: Uint8Array; } /** MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. */ export interface MsgUpdateGroupAdminResponseAmino {} export interface MsgUpdateGroupAdminResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupAdminResponse"; + type: 'cosmos-sdk/MsgUpdateGroupAdminResponse'; value: MsgUpdateGroupAdminResponseAmino; } /** MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. */ @@ -181,7 +181,7 @@ export interface MsgUpdateGroupMetadata { metadata: string; } export interface MsgUpdateGroupMetadataProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMetadata'; value: Uint8Array; } /** MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. */ @@ -194,19 +194,19 @@ export interface MsgUpdateGroupMetadataAmino { metadata: string; } export interface MsgUpdateGroupMetadataAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMetadata"; + type: 'cosmos-sdk/MsgUpdateGroupMetadata'; value: MsgUpdateGroupMetadataAmino; } /** MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. */ export interface MsgUpdateGroupMetadataResponse {} export interface MsgUpdateGroupMetadataResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMetadataResponse'; value: Uint8Array; } /** MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. */ export interface MsgUpdateGroupMetadataResponseAmino {} export interface MsgUpdateGroupMetadataResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMetadataResponse"; + type: 'cosmos-sdk/MsgUpdateGroupMetadataResponse'; value: MsgUpdateGroupMetadataResponseAmino; } /** MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. */ @@ -221,10 +221,10 @@ export interface MsgCreateGroupPolicy { decisionPolicy?: ThresholdDecisionPolicy | PercentageDecisionPolicy | Any | undefined; } export interface MsgCreateGroupPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy"; + typeUrl: '/cosmos.group.v1.MsgCreateGroupPolicy'; value: Uint8Array; } -export type MsgCreateGroupPolicyEncoded = Omit & { +export type MsgCreateGroupPolicyEncoded = Omit & { /** decision_policy specifies the group policy's decision policy. */decisionPolicy?: ThresholdDecisionPolicyProtoMsg | PercentageDecisionPolicyProtoMsg | AnyProtoMsg | undefined; }; /** MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. */ @@ -239,7 +239,7 @@ export interface MsgCreateGroupPolicyAmino { decision_policy?: AnyAmino; } export interface MsgCreateGroupPolicyAminoMsg { - type: "cosmos-sdk/MsgCreateGroupPolicy"; + type: 'cosmos-sdk/MsgCreateGroupPolicy'; value: MsgCreateGroupPolicyAmino; } /** MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. */ @@ -248,7 +248,7 @@ export interface MsgCreateGroupPolicyResponse { address: string; } export interface MsgCreateGroupPolicyResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse"; + typeUrl: '/cosmos.group.v1.MsgCreateGroupPolicyResponse'; value: Uint8Array; } /** MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. */ @@ -257,7 +257,7 @@ export interface MsgCreateGroupPolicyResponseAmino { address: string; } export interface MsgCreateGroupPolicyResponseAminoMsg { - type: "cosmos-sdk/MsgCreateGroupPolicyResponse"; + type: 'cosmos-sdk/MsgCreateGroupPolicyResponse'; value: MsgCreateGroupPolicyResponseAmino; } /** MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. */ @@ -270,7 +270,7 @@ export interface MsgUpdateGroupPolicyAdmin { newAdmin: string; } export interface MsgUpdateGroupPolicyAdminProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyAdmin'; value: Uint8Array; } /** MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. */ @@ -283,19 +283,19 @@ export interface MsgUpdateGroupPolicyAdminAmino { new_admin: string; } export interface MsgUpdateGroupPolicyAdminAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdmin"; + type: 'cosmos-sdk/MsgUpdateGroupPolicyAdmin'; value: MsgUpdateGroupPolicyAdminAmino; } /** MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. */ export interface MsgUpdateGroupPolicyAdminResponse {} export interface MsgUpdateGroupPolicyAdminResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse'; value: Uint8Array; } /** MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. */ export interface MsgUpdateGroupPolicyAdminResponseAmino {} export interface MsgUpdateGroupPolicyAdminResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdminResponse"; + type: 'cosmos-sdk/MsgUpdateGroupPolicyAdminResponse'; value: MsgUpdateGroupPolicyAdminResponseAmino; } /** MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. */ @@ -317,10 +317,10 @@ export interface MsgCreateGroupWithPolicy { decisionPolicy?: ThresholdDecisionPolicy | PercentageDecisionPolicy | Any | undefined; } export interface MsgCreateGroupWithPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy"; + typeUrl: '/cosmos.group.v1.MsgCreateGroupWithPolicy'; value: Uint8Array; } -export type MsgCreateGroupWithPolicyEncoded = Omit & { +export type MsgCreateGroupWithPolicyEncoded = Omit & { /** decision_policy specifies the group policy's decision policy. */decisionPolicy?: ThresholdDecisionPolicyProtoMsg | PercentageDecisionPolicyProtoMsg | AnyProtoMsg | undefined; }; /** MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. */ @@ -342,7 +342,7 @@ export interface MsgCreateGroupWithPolicyAmino { decision_policy?: AnyAmino; } export interface MsgCreateGroupWithPolicyAminoMsg { - type: "cosmos-sdk/MsgCreateGroupWithPolicy"; + type: 'cosmos-sdk/MsgCreateGroupWithPolicy'; value: MsgCreateGroupWithPolicyAmino; } /** MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. */ @@ -353,7 +353,7 @@ export interface MsgCreateGroupWithPolicyResponse { groupPolicyAddress: string; } export interface MsgCreateGroupWithPolicyResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse"; + typeUrl: '/cosmos.group.v1.MsgCreateGroupWithPolicyResponse'; value: Uint8Array; } /** MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. */ @@ -364,7 +364,7 @@ export interface MsgCreateGroupWithPolicyResponseAmino { group_policy_address: string; } export interface MsgCreateGroupWithPolicyResponseAminoMsg { - type: "cosmos-sdk/MsgCreateGroupWithPolicyResponse"; + type: 'cosmos-sdk/MsgCreateGroupWithPolicyResponse'; value: MsgCreateGroupWithPolicyResponseAmino; } /** MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. */ @@ -377,10 +377,10 @@ export interface MsgUpdateGroupPolicyDecisionPolicy { decisionPolicy?: ThresholdDecisionPolicy | PercentageDecisionPolicy | Any | undefined; } export interface MsgUpdateGroupPolicyDecisionPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy'; value: Uint8Array; } -export type MsgUpdateGroupPolicyDecisionPolicyEncoded = Omit & { +export type MsgUpdateGroupPolicyDecisionPolicyEncoded = Omit & { /** decision_policy is the updated group policy's decision policy. */decisionPolicy?: ThresholdDecisionPolicyProtoMsg | PercentageDecisionPolicyProtoMsg | AnyProtoMsg | undefined; }; /** MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. */ @@ -393,19 +393,19 @@ export interface MsgUpdateGroupPolicyDecisionPolicyAmino { decision_policy?: AnyAmino; } export interface MsgUpdateGroupPolicyDecisionPolicyAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupDecisionPolicy"; + type: 'cosmos-sdk/MsgUpdateGroupDecisionPolicy'; value: MsgUpdateGroupPolicyDecisionPolicyAmino; } /** MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. */ export interface MsgUpdateGroupPolicyDecisionPolicyResponse {} export interface MsgUpdateGroupPolicyDecisionPolicyResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse'; value: Uint8Array; } /** MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. */ export interface MsgUpdateGroupPolicyDecisionPolicyResponseAmino {} export interface MsgUpdateGroupPolicyDecisionPolicyResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse"; + type: 'cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse'; value: MsgUpdateGroupPolicyDecisionPolicyResponseAmino; } /** MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. */ @@ -418,7 +418,7 @@ export interface MsgUpdateGroupPolicyMetadata { metadata: string; } export interface MsgUpdateGroupPolicyMetadataProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyMetadata'; value: Uint8Array; } /** MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. */ @@ -431,19 +431,19 @@ export interface MsgUpdateGroupPolicyMetadataAmino { metadata: string; } export interface MsgUpdateGroupPolicyMetadataAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadata"; + type: 'cosmos-sdk/MsgUpdateGroupPolicyMetadata'; value: MsgUpdateGroupPolicyMetadataAmino; } /** MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. */ export interface MsgUpdateGroupPolicyMetadataResponse {} export interface MsgUpdateGroupPolicyMetadataResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse"; + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse'; value: Uint8Array; } /** MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. */ export interface MsgUpdateGroupPolicyMetadataResponseAmino {} export interface MsgUpdateGroupPolicyMetadataResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse"; + type: 'cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse'; value: MsgUpdateGroupPolicyMetadataResponseAmino; } /** MsgSubmitProposal is the Msg/SubmitProposal request type. */ @@ -479,7 +479,7 @@ export interface MsgSubmitProposal { summary: string; } export interface MsgSubmitProposalProtoMsg { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal"; + typeUrl: '/cosmos.group.v1.MsgSubmitProposal'; value: Uint8Array; } /** MsgSubmitProposal is the Msg/SubmitProposal request type. */ @@ -515,7 +515,7 @@ export interface MsgSubmitProposalAmino { summary: string; } export interface MsgSubmitProposalAminoMsg { - type: "cosmos-sdk/group/MsgSubmitProposal"; + type: 'cosmos-sdk/group/MsgSubmitProposal'; value: MsgSubmitProposalAmino; } /** MsgSubmitProposalResponse is the Msg/SubmitProposal response type. */ @@ -524,7 +524,7 @@ export interface MsgSubmitProposalResponse { proposalId: bigint; } export interface MsgSubmitProposalResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse"; + typeUrl: '/cosmos.group.v1.MsgSubmitProposalResponse'; value: Uint8Array; } /** MsgSubmitProposalResponse is the Msg/SubmitProposal response type. */ @@ -533,7 +533,7 @@ export interface MsgSubmitProposalResponseAmino { proposal_id: string; } export interface MsgSubmitProposalResponseAminoMsg { - type: "cosmos-sdk/MsgSubmitProposalResponse"; + type: 'cosmos-sdk/MsgSubmitProposalResponse'; value: MsgSubmitProposalResponseAmino; } /** MsgWithdrawProposal is the Msg/WithdrawProposal request type. */ @@ -544,7 +544,7 @@ export interface MsgWithdrawProposal { address: string; } export interface MsgWithdrawProposalProtoMsg { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal"; + typeUrl: '/cosmos.group.v1.MsgWithdrawProposal'; value: Uint8Array; } /** MsgWithdrawProposal is the Msg/WithdrawProposal request type. */ @@ -555,19 +555,19 @@ export interface MsgWithdrawProposalAmino { address: string; } export interface MsgWithdrawProposalAminoMsg { - type: "cosmos-sdk/group/MsgWithdrawProposal"; + type: 'cosmos-sdk/group/MsgWithdrawProposal'; value: MsgWithdrawProposalAmino; } /** MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. */ export interface MsgWithdrawProposalResponse {} export interface MsgWithdrawProposalResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse"; + typeUrl: '/cosmos.group.v1.MsgWithdrawProposalResponse'; value: Uint8Array; } /** MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. */ export interface MsgWithdrawProposalResponseAmino {} export interface MsgWithdrawProposalResponseAminoMsg { - type: "cosmos-sdk/MsgWithdrawProposalResponse"; + type: 'cosmos-sdk/MsgWithdrawProposalResponse'; value: MsgWithdrawProposalResponseAmino; } /** MsgVote is the Msg/Vote request type. */ @@ -587,7 +587,7 @@ export interface MsgVote { exec: Exec; } export interface MsgVoteProtoMsg { - typeUrl: "/cosmos.group.v1.MsgVote"; + typeUrl: '/cosmos.group.v1.MsgVote'; value: Uint8Array; } /** MsgVote is the Msg/Vote request type. */ @@ -607,19 +607,19 @@ export interface MsgVoteAmino { exec: Exec; } export interface MsgVoteAminoMsg { - type: "cosmos-sdk/group/MsgVote"; + type: 'cosmos-sdk/group/MsgVote'; value: MsgVoteAmino; } /** MsgVoteResponse is the Msg/Vote response type. */ export interface MsgVoteResponse {} export interface MsgVoteResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgVoteResponse"; + typeUrl: '/cosmos.group.v1.MsgVoteResponse'; value: Uint8Array; } /** MsgVoteResponse is the Msg/Vote response type. */ export interface MsgVoteResponseAmino {} export interface MsgVoteResponseAminoMsg { - type: "cosmos-sdk/MsgVoteResponse"; + type: 'cosmos-sdk/MsgVoteResponse'; value: MsgVoteResponseAmino; } /** MsgExec is the Msg/Exec request type. */ @@ -630,7 +630,7 @@ export interface MsgExec { executor: string; } export interface MsgExecProtoMsg { - typeUrl: "/cosmos.group.v1.MsgExec"; + typeUrl: '/cosmos.group.v1.MsgExec'; value: Uint8Array; } /** MsgExec is the Msg/Exec request type. */ @@ -641,7 +641,7 @@ export interface MsgExecAmino { executor: string; } export interface MsgExecAminoMsg { - type: "cosmos-sdk/group/MsgExec"; + type: 'cosmos-sdk/group/MsgExec'; value: MsgExecAmino; } /** MsgExecResponse is the Msg/Exec request type. */ @@ -650,7 +650,7 @@ export interface MsgExecResponse { result: ProposalExecutorResult; } export interface MsgExecResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgExecResponse"; + typeUrl: '/cosmos.group.v1.MsgExecResponse'; value: Uint8Array; } /** MsgExecResponse is the Msg/Exec request type. */ @@ -659,7 +659,7 @@ export interface MsgExecResponseAmino { result: ProposalExecutorResult; } export interface MsgExecResponseAminoMsg { - type: "cosmos-sdk/MsgExecResponse"; + type: 'cosmos-sdk/MsgExecResponse'; value: MsgExecResponseAmino; } /** MsgLeaveGroup is the Msg/LeaveGroup request type. */ @@ -670,7 +670,7 @@ export interface MsgLeaveGroup { groupId: bigint; } export interface MsgLeaveGroupProtoMsg { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup"; + typeUrl: '/cosmos.group.v1.MsgLeaveGroup'; value: Uint8Array; } /** MsgLeaveGroup is the Msg/LeaveGroup request type. */ @@ -681,45 +681,45 @@ export interface MsgLeaveGroupAmino { group_id: string; } export interface MsgLeaveGroupAminoMsg { - type: "cosmos-sdk/group/MsgLeaveGroup"; + type: 'cosmos-sdk/group/MsgLeaveGroup'; value: MsgLeaveGroupAmino; } /** MsgLeaveGroupResponse is the Msg/LeaveGroup response type. */ export interface MsgLeaveGroupResponse {} export interface MsgLeaveGroupResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse"; + typeUrl: '/cosmos.group.v1.MsgLeaveGroupResponse'; value: Uint8Array; } /** MsgLeaveGroupResponse is the Msg/LeaveGroup response type. */ export interface MsgLeaveGroupResponseAmino {} export interface MsgLeaveGroupResponseAminoMsg { - type: "cosmos-sdk/MsgLeaveGroupResponse"; + type: 'cosmos-sdk/MsgLeaveGroupResponse'; value: MsgLeaveGroupResponseAmino; } function createBaseMsgCreateGroup(): MsgCreateGroup { return { - admin: "", + admin: '', members: [], - metadata: "" + metadata: '' }; } export const MsgCreateGroup = { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - aminoType: "cosmos-sdk/MsgCreateGroup", + typeUrl: '/cosmos.group.v1.MsgCreateGroup', + aminoType: 'cosmos-sdk/MsgCreateGroup', is(o: any): o is MsgCreateGroup { - return o && (o.$typeUrl === MsgCreateGroup.typeUrl || typeof o.admin === "string" && Array.isArray(o.members) && (!o.members.length || MemberRequest.is(o.members[0])) && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgCreateGroup.typeUrl || typeof o.admin === 'string' && Array.isArray(o.members) && (!o.members.length || MemberRequest.is(o.members[0])) && typeof o.metadata === 'string'); }, isAmino(o: any): o is MsgCreateGroupAmino { - return o && (o.$typeUrl === MsgCreateGroup.typeUrl || typeof o.admin === "string" && Array.isArray(o.members) && (!o.members.length || MemberRequest.isAmino(o.members[0])) && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgCreateGroup.typeUrl || typeof o.admin === 'string' && Array.isArray(o.members) && (!o.members.length || MemberRequest.isAmino(o.members[0])) && typeof o.metadata === 'string'); }, encode(message: MsgCreateGroup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } for (const v of message.members) { MemberRequest.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } return writer; @@ -731,27 +731,27 @@ export const MsgCreateGroup = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.members.push(MemberRequest.decode(reader, reader.uint32())); - break; - case 3: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.members.push(MemberRequest.decode(reader, reader.uint32())); + break; + case 3: + message.metadata = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCreateGroup { const message = createBaseMsgCreateGroup(); - message.admin = object.admin ?? ""; + message.admin = object.admin ?? ''; message.members = object.members?.map(e => MemberRequest.fromPartial(e)) || []; - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; return message; }, fromAmino(object: MsgCreateGroupAmino): MsgCreateGroup { @@ -767,13 +767,13 @@ export const MsgCreateGroup = { }, toAmino(message: MsgCreateGroup): MsgCreateGroupAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.admin = message.admin === '' ? undefined : message.admin; if (message.members) { obj.members = message.members.map(e => e ? MemberRequest.toAmino(e) : undefined); } else { obj.members = message.members; } - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgCreateGroupAminoMsg): MsgCreateGroup { @@ -781,7 +781,7 @@ export const MsgCreateGroup = { }, toAminoMsg(message: MsgCreateGroup): MsgCreateGroupAminoMsg { return { - type: "cosmos-sdk/MsgCreateGroup", + type: 'cosmos-sdk/MsgCreateGroup', value: MsgCreateGroup.toAmino(message) }; }, @@ -793,7 +793,7 @@ export const MsgCreateGroup = { }, toProtoMsg(message: MsgCreateGroup): MsgCreateGroupProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", + typeUrl: '/cosmos.group.v1.MsgCreateGroup', value: MsgCreateGroup.encode(message).finish() }; } @@ -806,13 +806,13 @@ function createBaseMsgCreateGroupResponse(): MsgCreateGroupResponse { }; } export const MsgCreateGroupResponse = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", - aminoType: "cosmos-sdk/MsgCreateGroupResponse", + typeUrl: '/cosmos.group.v1.MsgCreateGroupResponse', + aminoType: 'cosmos-sdk/MsgCreateGroupResponse', is(o: any): o is MsgCreateGroupResponse { - return o && (o.$typeUrl === MsgCreateGroupResponse.typeUrl || typeof o.groupId === "bigint"); + return o && (o.$typeUrl === MsgCreateGroupResponse.typeUrl || typeof o.groupId === 'bigint'); }, isAmino(o: any): o is MsgCreateGroupResponseAmino { - return o && (o.$typeUrl === MsgCreateGroupResponse.typeUrl || typeof o.group_id === "bigint"); + return o && (o.$typeUrl === MsgCreateGroupResponse.typeUrl || typeof o.group_id === 'bigint'); }, encode(message: MsgCreateGroupResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.groupId !== BigInt(0)) { @@ -827,12 +827,12 @@ export const MsgCreateGroupResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.groupId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -859,7 +859,7 @@ export const MsgCreateGroupResponse = { }, toAminoMsg(message: MsgCreateGroupResponse): MsgCreateGroupResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreateGroupResponse", + type: 'cosmos-sdk/MsgCreateGroupResponse', value: MsgCreateGroupResponse.toAmino(message) }; }, @@ -871,7 +871,7 @@ export const MsgCreateGroupResponse = { }, toProtoMsg(message: MsgCreateGroupResponse): MsgCreateGroupResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", + typeUrl: '/cosmos.group.v1.MsgCreateGroupResponse', value: MsgCreateGroupResponse.encode(message).finish() }; } @@ -880,22 +880,22 @@ GlobalDecoderRegistry.register(MsgCreateGroupResponse.typeUrl, MsgCreateGroupRes GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupResponse.aminoType, MsgCreateGroupResponse.typeUrl); function createBaseMsgUpdateGroupMembers(): MsgUpdateGroupMembers { return { - admin: "", + admin: '', groupId: BigInt(0), memberUpdates: [] }; } export const MsgUpdateGroupMembers = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - aminoType: "cosmos-sdk/MsgUpdateGroupMembers", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMembers', + aminoType: 'cosmos-sdk/MsgUpdateGroupMembers', is(o: any): o is MsgUpdateGroupMembers { - return o && (o.$typeUrl === MsgUpdateGroupMembers.typeUrl || typeof o.admin === "string" && typeof o.groupId === "bigint" && Array.isArray(o.memberUpdates) && (!o.memberUpdates.length || MemberRequest.is(o.memberUpdates[0]))); + return o && (o.$typeUrl === MsgUpdateGroupMembers.typeUrl || typeof o.admin === 'string' && typeof o.groupId === 'bigint' && Array.isArray(o.memberUpdates) && (!o.memberUpdates.length || MemberRequest.is(o.memberUpdates[0]))); }, isAmino(o: any): o is MsgUpdateGroupMembersAmino { - return o && (o.$typeUrl === MsgUpdateGroupMembers.typeUrl || typeof o.admin === "string" && typeof o.group_id === "bigint" && Array.isArray(o.member_updates) && (!o.member_updates.length || MemberRequest.isAmino(o.member_updates[0]))); + return o && (o.$typeUrl === MsgUpdateGroupMembers.typeUrl || typeof o.admin === 'string' && typeof o.group_id === 'bigint' && Array.isArray(o.member_updates) && (!o.member_updates.length || MemberRequest.isAmino(o.member_updates[0]))); }, encode(message: MsgUpdateGroupMembers, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } if (message.groupId !== BigInt(0)) { @@ -913,25 +913,25 @@ export const MsgUpdateGroupMembers = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.memberUpdates.push(MemberRequest.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.groupId = reader.uint64(); + break; + case 3: + message.memberUpdates.push(MemberRequest.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateGroupMembers { const message = createBaseMsgUpdateGroupMembers(); - message.admin = object.admin ?? ""; + message.admin = object.admin ?? ''; message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); message.memberUpdates = object.memberUpdates?.map(e => MemberRequest.fromPartial(e)) || []; return message; @@ -949,7 +949,7 @@ export const MsgUpdateGroupMembers = { }, toAmino(message: MsgUpdateGroupMembers): MsgUpdateGroupMembersAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.admin = message.admin === '' ? undefined : message.admin; obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; if (message.memberUpdates) { obj.member_updates = message.memberUpdates.map(e => e ? MemberRequest.toAmino(e) : undefined); @@ -963,7 +963,7 @@ export const MsgUpdateGroupMembers = { }, toAminoMsg(message: MsgUpdateGroupMembers): MsgUpdateGroupMembersAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupMembers", + type: 'cosmos-sdk/MsgUpdateGroupMembers', value: MsgUpdateGroupMembers.toAmino(message) }; }, @@ -975,7 +975,7 @@ export const MsgUpdateGroupMembers = { }, toProtoMsg(message: MsgUpdateGroupMembers): MsgUpdateGroupMembersProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMembers', value: MsgUpdateGroupMembers.encode(message).finish() }; } @@ -986,8 +986,8 @@ function createBaseMsgUpdateGroupMembersResponse(): MsgUpdateGroupMembersRespons return {}; } export const MsgUpdateGroupMembersResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupMembersResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMembersResponse', + aminoType: 'cosmos-sdk/MsgUpdateGroupMembersResponse', is(o: any): o is MsgUpdateGroupMembersResponse { return o && o.$typeUrl === MsgUpdateGroupMembersResponse.typeUrl; }, @@ -1004,9 +1004,9 @@ export const MsgUpdateGroupMembersResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1028,7 +1028,7 @@ export const MsgUpdateGroupMembersResponse = { }, toAminoMsg(message: MsgUpdateGroupMembersResponse): MsgUpdateGroupMembersResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupMembersResponse", + type: 'cosmos-sdk/MsgUpdateGroupMembersResponse', value: MsgUpdateGroupMembersResponse.toAmino(message) }; }, @@ -1040,7 +1040,7 @@ export const MsgUpdateGroupMembersResponse = { }, toProtoMsg(message: MsgUpdateGroupMembersResponse): MsgUpdateGroupMembersResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMembersResponse', value: MsgUpdateGroupMembersResponse.encode(message).finish() }; } @@ -1049,28 +1049,28 @@ GlobalDecoderRegistry.register(MsgUpdateGroupMembersResponse.typeUrl, MsgUpdateG GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembersResponse.aminoType, MsgUpdateGroupMembersResponse.typeUrl); function createBaseMsgUpdateGroupAdmin(): MsgUpdateGroupAdmin { return { - admin: "", + admin: '', groupId: BigInt(0), - newAdmin: "" + newAdmin: '' }; } export const MsgUpdateGroupAdmin = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - aminoType: "cosmos-sdk/MsgUpdateGroupAdmin", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupAdmin', + aminoType: 'cosmos-sdk/MsgUpdateGroupAdmin', is(o: any): o is MsgUpdateGroupAdmin { - return o && (o.$typeUrl === MsgUpdateGroupAdmin.typeUrl || typeof o.admin === "string" && typeof o.groupId === "bigint" && typeof o.newAdmin === "string"); + return o && (o.$typeUrl === MsgUpdateGroupAdmin.typeUrl || typeof o.admin === 'string' && typeof o.groupId === 'bigint' && typeof o.newAdmin === 'string'); }, isAmino(o: any): o is MsgUpdateGroupAdminAmino { - return o && (o.$typeUrl === MsgUpdateGroupAdmin.typeUrl || typeof o.admin === "string" && typeof o.group_id === "bigint" && typeof o.new_admin === "string"); + return o && (o.$typeUrl === MsgUpdateGroupAdmin.typeUrl || typeof o.admin === 'string' && typeof o.group_id === 'bigint' && typeof o.new_admin === 'string'); }, encode(message: MsgUpdateGroupAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } if (message.groupId !== BigInt(0)) { writer.uint32(16).uint64(message.groupId); } - if (message.newAdmin !== "") { + if (message.newAdmin !== '') { writer.uint32(26).string(message.newAdmin); } return writer; @@ -1082,27 +1082,27 @@ export const MsgUpdateGroupAdmin = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.newAdmin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.groupId = reader.uint64(); + break; + case 3: + message.newAdmin = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateGroupAdmin { const message = createBaseMsgUpdateGroupAdmin(); - message.admin = object.admin ?? ""; + message.admin = object.admin ?? ''; message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.newAdmin = object.newAdmin ?? ""; + message.newAdmin = object.newAdmin ?? ''; return message; }, fromAmino(object: MsgUpdateGroupAdminAmino): MsgUpdateGroupAdmin { @@ -1120,9 +1120,9 @@ export const MsgUpdateGroupAdmin = { }, toAmino(message: MsgUpdateGroupAdmin): MsgUpdateGroupAdminAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.admin = message.admin === '' ? undefined : message.admin; obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; - obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; + obj.new_admin = message.newAdmin === '' ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgUpdateGroupAdminAminoMsg): MsgUpdateGroupAdmin { @@ -1130,7 +1130,7 @@ export const MsgUpdateGroupAdmin = { }, toAminoMsg(message: MsgUpdateGroupAdmin): MsgUpdateGroupAdminAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupAdmin", + type: 'cosmos-sdk/MsgUpdateGroupAdmin', value: MsgUpdateGroupAdmin.toAmino(message) }; }, @@ -1142,7 +1142,7 @@ export const MsgUpdateGroupAdmin = { }, toProtoMsg(message: MsgUpdateGroupAdmin): MsgUpdateGroupAdminProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupAdmin', value: MsgUpdateGroupAdmin.encode(message).finish() }; } @@ -1153,8 +1153,8 @@ function createBaseMsgUpdateGroupAdminResponse(): MsgUpdateGroupAdminResponse { return {}; } export const MsgUpdateGroupAdminResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupAdminResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupAdminResponse', + aminoType: 'cosmos-sdk/MsgUpdateGroupAdminResponse', is(o: any): o is MsgUpdateGroupAdminResponse { return o && o.$typeUrl === MsgUpdateGroupAdminResponse.typeUrl; }, @@ -1171,9 +1171,9 @@ export const MsgUpdateGroupAdminResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1195,7 +1195,7 @@ export const MsgUpdateGroupAdminResponse = { }, toAminoMsg(message: MsgUpdateGroupAdminResponse): MsgUpdateGroupAdminResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupAdminResponse", + type: 'cosmos-sdk/MsgUpdateGroupAdminResponse', value: MsgUpdateGroupAdminResponse.toAmino(message) }; }, @@ -1207,7 +1207,7 @@ export const MsgUpdateGroupAdminResponse = { }, toProtoMsg(message: MsgUpdateGroupAdminResponse): MsgUpdateGroupAdminResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupAdminResponse', value: MsgUpdateGroupAdminResponse.encode(message).finish() }; } @@ -1216,28 +1216,28 @@ GlobalDecoderRegistry.register(MsgUpdateGroupAdminResponse.typeUrl, MsgUpdateGro GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdminResponse.aminoType, MsgUpdateGroupAdminResponse.typeUrl); function createBaseMsgUpdateGroupMetadata(): MsgUpdateGroupMetadata { return { - admin: "", + admin: '', groupId: BigInt(0), - metadata: "" + metadata: '' }; } export const MsgUpdateGroupMetadata = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - aminoType: "cosmos-sdk/MsgUpdateGroupMetadata", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMetadata', + aminoType: 'cosmos-sdk/MsgUpdateGroupMetadata', is(o: any): o is MsgUpdateGroupMetadata { - return o && (o.$typeUrl === MsgUpdateGroupMetadata.typeUrl || typeof o.admin === "string" && typeof o.groupId === "bigint" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgUpdateGroupMetadata.typeUrl || typeof o.admin === 'string' && typeof o.groupId === 'bigint' && typeof o.metadata === 'string'); }, isAmino(o: any): o is MsgUpdateGroupMetadataAmino { - return o && (o.$typeUrl === MsgUpdateGroupMetadata.typeUrl || typeof o.admin === "string" && typeof o.group_id === "bigint" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgUpdateGroupMetadata.typeUrl || typeof o.admin === 'string' && typeof o.group_id === 'bigint' && typeof o.metadata === 'string'); }, encode(message: MsgUpdateGroupMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } if (message.groupId !== BigInt(0)) { writer.uint32(16).uint64(message.groupId); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } return writer; @@ -1249,27 +1249,27 @@ export const MsgUpdateGroupMetadata = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.groupId = reader.uint64(); + break; + case 3: + message.metadata = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateGroupMetadata { const message = createBaseMsgUpdateGroupMetadata(); - message.admin = object.admin ?? ""; + message.admin = object.admin ?? ''; message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; return message; }, fromAmino(object: MsgUpdateGroupMetadataAmino): MsgUpdateGroupMetadata { @@ -1287,9 +1287,9 @@ export const MsgUpdateGroupMetadata = { }, toAmino(message: MsgUpdateGroupMetadata): MsgUpdateGroupMetadataAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.admin = message.admin === '' ? undefined : message.admin; obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgUpdateGroupMetadataAminoMsg): MsgUpdateGroupMetadata { @@ -1297,7 +1297,7 @@ export const MsgUpdateGroupMetadata = { }, toAminoMsg(message: MsgUpdateGroupMetadata): MsgUpdateGroupMetadataAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupMetadata", + type: 'cosmos-sdk/MsgUpdateGroupMetadata', value: MsgUpdateGroupMetadata.toAmino(message) }; }, @@ -1309,7 +1309,7 @@ export const MsgUpdateGroupMetadata = { }, toProtoMsg(message: MsgUpdateGroupMetadata): MsgUpdateGroupMetadataProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMetadata', value: MsgUpdateGroupMetadata.encode(message).finish() }; } @@ -1320,8 +1320,8 @@ function createBaseMsgUpdateGroupMetadataResponse(): MsgUpdateGroupMetadataRespo return {}; } export const MsgUpdateGroupMetadataResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupMetadataResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMetadataResponse', + aminoType: 'cosmos-sdk/MsgUpdateGroupMetadataResponse', is(o: any): o is MsgUpdateGroupMetadataResponse { return o && o.$typeUrl === MsgUpdateGroupMetadataResponse.typeUrl; }, @@ -1338,9 +1338,9 @@ export const MsgUpdateGroupMetadataResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1362,7 +1362,7 @@ export const MsgUpdateGroupMetadataResponse = { }, toAminoMsg(message: MsgUpdateGroupMetadataResponse): MsgUpdateGroupMetadataResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupMetadataResponse", + type: 'cosmos-sdk/MsgUpdateGroupMetadataResponse', value: MsgUpdateGroupMetadataResponse.toAmino(message) }; }, @@ -1374,7 +1374,7 @@ export const MsgUpdateGroupMetadataResponse = { }, toProtoMsg(message: MsgUpdateGroupMetadataResponse): MsgUpdateGroupMetadataResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupMetadataResponse', value: MsgUpdateGroupMetadataResponse.encode(message).finish() }; } @@ -1383,29 +1383,29 @@ GlobalDecoderRegistry.register(MsgUpdateGroupMetadataResponse.typeUrl, MsgUpdate GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadataResponse.aminoType, MsgUpdateGroupMetadataResponse.typeUrl); function createBaseMsgCreateGroupPolicy(): MsgCreateGroupPolicy { return { - admin: "", + admin: '', groupId: BigInt(0), - metadata: "", + metadata: '', decisionPolicy: undefined }; } export const MsgCreateGroupPolicy = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - aminoType: "cosmos-sdk/MsgCreateGroupPolicy", + typeUrl: '/cosmos.group.v1.MsgCreateGroupPolicy', + aminoType: 'cosmos-sdk/MsgCreateGroupPolicy', is(o: any): o is MsgCreateGroupPolicy { - return o && (o.$typeUrl === MsgCreateGroupPolicy.typeUrl || typeof o.admin === "string" && typeof o.groupId === "bigint" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgCreateGroupPolicy.typeUrl || typeof o.admin === 'string' && typeof o.groupId === 'bigint' && typeof o.metadata === 'string'); }, isAmino(o: any): o is MsgCreateGroupPolicyAmino { - return o && (o.$typeUrl === MsgCreateGroupPolicy.typeUrl || typeof o.admin === "string" && typeof o.group_id === "bigint" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgCreateGroupPolicy.typeUrl || typeof o.admin === 'string' && typeof o.group_id === 'bigint' && typeof o.metadata === 'string'); }, encode(message: MsgCreateGroupPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } if (message.groupId !== BigInt(0)) { writer.uint32(16).uint64(message.groupId); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } if (message.decisionPolicy !== undefined) { @@ -1420,30 +1420,30 @@ export const MsgCreateGroupPolicy = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.groupId = reader.uint64(); + break; + case 3: + message.metadata = reader.string(); + break; + case 4: + message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCreateGroupPolicy { const message = createBaseMsgCreateGroupPolicy(); - message.admin = object.admin ?? ""; + message.admin = object.admin ?? ''; message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? GlobalDecoderRegistry.fromPartial(object.decisionPolicy) : undefined; return message; }, @@ -1465,9 +1465,9 @@ export const MsgCreateGroupPolicy = { }, toAmino(message: MsgCreateGroupPolicy): MsgCreateGroupPolicyAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.admin = message.admin === '' ? undefined : message.admin; obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; obj.decision_policy = message.decisionPolicy ? GlobalDecoderRegistry.toAminoMsg(message.decisionPolicy) : undefined; return obj; }, @@ -1476,7 +1476,7 @@ export const MsgCreateGroupPolicy = { }, toAminoMsg(message: MsgCreateGroupPolicy): MsgCreateGroupPolicyAminoMsg { return { - type: "cosmos-sdk/MsgCreateGroupPolicy", + type: 'cosmos-sdk/MsgCreateGroupPolicy', value: MsgCreateGroupPolicy.toAmino(message) }; }, @@ -1488,7 +1488,7 @@ export const MsgCreateGroupPolicy = { }, toProtoMsg(message: MsgCreateGroupPolicy): MsgCreateGroupPolicyProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", + typeUrl: '/cosmos.group.v1.MsgCreateGroupPolicy', value: MsgCreateGroupPolicy.encode(message).finish() }; } @@ -1497,20 +1497,20 @@ GlobalDecoderRegistry.register(MsgCreateGroupPolicy.typeUrl, MsgCreateGroupPolic GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicy.aminoType, MsgCreateGroupPolicy.typeUrl); function createBaseMsgCreateGroupPolicyResponse(): MsgCreateGroupPolicyResponse { return { - address: "" + address: '' }; } export const MsgCreateGroupPolicyResponse = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", - aminoType: "cosmos-sdk/MsgCreateGroupPolicyResponse", + typeUrl: '/cosmos.group.v1.MsgCreateGroupPolicyResponse', + aminoType: 'cosmos-sdk/MsgCreateGroupPolicyResponse', is(o: any): o is MsgCreateGroupPolicyResponse { - return o && (o.$typeUrl === MsgCreateGroupPolicyResponse.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === MsgCreateGroupPolicyResponse.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is MsgCreateGroupPolicyResponseAmino { - return o && (o.$typeUrl === MsgCreateGroupPolicyResponse.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === MsgCreateGroupPolicyResponse.typeUrl || typeof o.address === 'string'); }, encode(message: MsgCreateGroupPolicyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } return writer; @@ -1522,19 +1522,19 @@ export const MsgCreateGroupPolicyResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCreateGroupPolicyResponse { const message = createBaseMsgCreateGroupPolicyResponse(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; return message; }, fromAmino(object: MsgCreateGroupPolicyResponseAmino): MsgCreateGroupPolicyResponse { @@ -1546,7 +1546,7 @@ export const MsgCreateGroupPolicyResponse = { }, toAmino(message: MsgCreateGroupPolicyResponse): MsgCreateGroupPolicyResponseAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; return obj; }, fromAminoMsg(object: MsgCreateGroupPolicyResponseAminoMsg): MsgCreateGroupPolicyResponse { @@ -1554,7 +1554,7 @@ export const MsgCreateGroupPolicyResponse = { }, toAminoMsg(message: MsgCreateGroupPolicyResponse): MsgCreateGroupPolicyResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreateGroupPolicyResponse", + type: 'cosmos-sdk/MsgCreateGroupPolicyResponse', value: MsgCreateGroupPolicyResponse.toAmino(message) }; }, @@ -1566,7 +1566,7 @@ export const MsgCreateGroupPolicyResponse = { }, toProtoMsg(message: MsgCreateGroupPolicyResponse): MsgCreateGroupPolicyResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", + typeUrl: '/cosmos.group.v1.MsgCreateGroupPolicyResponse', value: MsgCreateGroupPolicyResponse.encode(message).finish() }; } @@ -1575,28 +1575,28 @@ GlobalDecoderRegistry.register(MsgCreateGroupPolicyResponse.typeUrl, MsgCreateGr GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicyResponse.aminoType, MsgCreateGroupPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyAdmin(): MsgUpdateGroupPolicyAdmin { return { - admin: "", - groupPolicyAddress: "", - newAdmin: "" + admin: '', + groupPolicyAddress: '', + newAdmin: '' }; } export const MsgUpdateGroupPolicyAdmin = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyAdmin", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyAdmin', + aminoType: 'cosmos-sdk/MsgUpdateGroupPolicyAdmin', is(o: any): o is MsgUpdateGroupPolicyAdmin { - return o && (o.$typeUrl === MsgUpdateGroupPolicyAdmin.typeUrl || typeof o.admin === "string" && typeof o.groupPolicyAddress === "string" && typeof o.newAdmin === "string"); + return o && (o.$typeUrl === MsgUpdateGroupPolicyAdmin.typeUrl || typeof o.admin === 'string' && typeof o.groupPolicyAddress === 'string' && typeof o.newAdmin === 'string'); }, isAmino(o: any): o is MsgUpdateGroupPolicyAdminAmino { - return o && (o.$typeUrl === MsgUpdateGroupPolicyAdmin.typeUrl || typeof o.admin === "string" && typeof o.group_policy_address === "string" && typeof o.new_admin === "string"); + return o && (o.$typeUrl === MsgUpdateGroupPolicyAdmin.typeUrl || typeof o.admin === 'string' && typeof o.group_policy_address === 'string' && typeof o.new_admin === 'string'); }, encode(message: MsgUpdateGroupPolicyAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } - if (message.groupPolicyAddress !== "") { + if (message.groupPolicyAddress !== '') { writer.uint32(18).string(message.groupPolicyAddress); } - if (message.newAdmin !== "") { + if (message.newAdmin !== '') { writer.uint32(26).string(message.newAdmin); } return writer; @@ -1608,27 +1608,27 @@ export const MsgUpdateGroupPolicyAdmin = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupPolicyAddress = reader.string(); - break; - case 3: - message.newAdmin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.groupPolicyAddress = reader.string(); + break; + case 3: + message.newAdmin = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateGroupPolicyAdmin { const message = createBaseMsgUpdateGroupPolicyAdmin(); - message.admin = object.admin ?? ""; - message.groupPolicyAddress = object.groupPolicyAddress ?? ""; - message.newAdmin = object.newAdmin ?? ""; + message.admin = object.admin ?? ''; + message.groupPolicyAddress = object.groupPolicyAddress ?? ''; + message.newAdmin = object.newAdmin ?? ''; return message; }, fromAmino(object: MsgUpdateGroupPolicyAdminAmino): MsgUpdateGroupPolicyAdmin { @@ -1646,9 +1646,9 @@ export const MsgUpdateGroupPolicyAdmin = { }, toAmino(message: MsgUpdateGroupPolicyAdmin): MsgUpdateGroupPolicyAdminAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; - obj.group_policy_address = message.groupPolicyAddress === "" ? undefined : message.groupPolicyAddress; - obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.group_policy_address = message.groupPolicyAddress === '' ? undefined : message.groupPolicyAddress; + obj.new_admin = message.newAdmin === '' ? undefined : message.newAdmin; return obj; }, fromAminoMsg(object: MsgUpdateGroupPolicyAdminAminoMsg): MsgUpdateGroupPolicyAdmin { @@ -1656,7 +1656,7 @@ export const MsgUpdateGroupPolicyAdmin = { }, toAminoMsg(message: MsgUpdateGroupPolicyAdmin): MsgUpdateGroupPolicyAdminAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdmin", + type: 'cosmos-sdk/MsgUpdateGroupPolicyAdmin', value: MsgUpdateGroupPolicyAdmin.toAmino(message) }; }, @@ -1668,7 +1668,7 @@ export const MsgUpdateGroupPolicyAdmin = { }, toProtoMsg(message: MsgUpdateGroupPolicyAdmin): MsgUpdateGroupPolicyAdminProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyAdmin', value: MsgUpdateGroupPolicyAdmin.encode(message).finish() }; } @@ -1679,8 +1679,8 @@ function createBaseMsgUpdateGroupPolicyAdminResponse(): MsgUpdateGroupPolicyAdmi return {}; } export const MsgUpdateGroupPolicyAdminResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyAdminResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse', + aminoType: 'cosmos-sdk/MsgUpdateGroupPolicyAdminResponse', is(o: any): o is MsgUpdateGroupPolicyAdminResponse { return o && o.$typeUrl === MsgUpdateGroupPolicyAdminResponse.typeUrl; }, @@ -1697,9 +1697,9 @@ export const MsgUpdateGroupPolicyAdminResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1721,7 +1721,7 @@ export const MsgUpdateGroupPolicyAdminResponse = { }, toAminoMsg(message: MsgUpdateGroupPolicyAdminResponse): MsgUpdateGroupPolicyAdminResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdminResponse", + type: 'cosmos-sdk/MsgUpdateGroupPolicyAdminResponse', value: MsgUpdateGroupPolicyAdminResponse.toAmino(message) }; }, @@ -1733,7 +1733,7 @@ export const MsgUpdateGroupPolicyAdminResponse = { }, toProtoMsg(message: MsgUpdateGroupPolicyAdminResponse): MsgUpdateGroupPolicyAdminResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse', value: MsgUpdateGroupPolicyAdminResponse.encode(message).finish() }; } @@ -1742,34 +1742,34 @@ GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdminResponse.typeUrl, MsgUpd GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdminResponse.aminoType, MsgUpdateGroupPolicyAdminResponse.typeUrl); function createBaseMsgCreateGroupWithPolicy(): MsgCreateGroupWithPolicy { return { - admin: "", + admin: '', members: [], - groupMetadata: "", - groupPolicyMetadata: "", + groupMetadata: '', + groupPolicyMetadata: '', groupPolicyAsAdmin: false, decisionPolicy: undefined }; } export const MsgCreateGroupWithPolicy = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - aminoType: "cosmos-sdk/MsgCreateGroupWithPolicy", + typeUrl: '/cosmos.group.v1.MsgCreateGroupWithPolicy', + aminoType: 'cosmos-sdk/MsgCreateGroupWithPolicy', is(o: any): o is MsgCreateGroupWithPolicy { - return o && (o.$typeUrl === MsgCreateGroupWithPolicy.typeUrl || typeof o.admin === "string" && Array.isArray(o.members) && (!o.members.length || MemberRequest.is(o.members[0])) && typeof o.groupMetadata === "string" && typeof o.groupPolicyMetadata === "string" && typeof o.groupPolicyAsAdmin === "boolean"); + return o && (o.$typeUrl === MsgCreateGroupWithPolicy.typeUrl || typeof o.admin === 'string' && Array.isArray(o.members) && (!o.members.length || MemberRequest.is(o.members[0])) && typeof o.groupMetadata === 'string' && typeof o.groupPolicyMetadata === 'string' && typeof o.groupPolicyAsAdmin === 'boolean'); }, isAmino(o: any): o is MsgCreateGroupWithPolicyAmino { - return o && (o.$typeUrl === MsgCreateGroupWithPolicy.typeUrl || typeof o.admin === "string" && Array.isArray(o.members) && (!o.members.length || MemberRequest.isAmino(o.members[0])) && typeof o.group_metadata === "string" && typeof o.group_policy_metadata === "string" && typeof o.group_policy_as_admin === "boolean"); + return o && (o.$typeUrl === MsgCreateGroupWithPolicy.typeUrl || typeof o.admin === 'string' && Array.isArray(o.members) && (!o.members.length || MemberRequest.isAmino(o.members[0])) && typeof o.group_metadata === 'string' && typeof o.group_policy_metadata === 'string' && typeof o.group_policy_as_admin === 'boolean'); }, encode(message: MsgCreateGroupWithPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } for (const v of message.members) { MemberRequest.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.groupMetadata !== "") { + if (message.groupMetadata !== '') { writer.uint32(26).string(message.groupMetadata); } - if (message.groupPolicyMetadata !== "") { + if (message.groupPolicyMetadata !== '') { writer.uint32(34).string(message.groupPolicyMetadata); } if (message.groupPolicyAsAdmin === true) { @@ -1787,37 +1787,37 @@ export const MsgCreateGroupWithPolicy = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.members.push(MemberRequest.decode(reader, reader.uint32())); - break; - case 3: - message.groupMetadata = reader.string(); - break; - case 4: - message.groupPolicyMetadata = reader.string(); - break; - case 5: - message.groupPolicyAsAdmin = reader.bool(); - break; - case 6: - message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.members.push(MemberRequest.decode(reader, reader.uint32())); + break; + case 3: + message.groupMetadata = reader.string(); + break; + case 4: + message.groupPolicyMetadata = reader.string(); + break; + case 5: + message.groupPolicyAsAdmin = reader.bool(); + break; + case 6: + message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCreateGroupWithPolicy { const message = createBaseMsgCreateGroupWithPolicy(); - message.admin = object.admin ?? ""; + message.admin = object.admin ?? ''; message.members = object.members?.map(e => MemberRequest.fromPartial(e)) || []; - message.groupMetadata = object.groupMetadata ?? ""; - message.groupPolicyMetadata = object.groupPolicyMetadata ?? ""; + message.groupMetadata = object.groupMetadata ?? ''; + message.groupPolicyMetadata = object.groupPolicyMetadata ?? ''; message.groupPolicyAsAdmin = object.groupPolicyAsAdmin ?? false; message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? GlobalDecoderRegistry.fromPartial(object.decisionPolicy) : undefined; return message; @@ -1844,14 +1844,14 @@ export const MsgCreateGroupWithPolicy = { }, toAmino(message: MsgCreateGroupWithPolicy): MsgCreateGroupWithPolicyAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.admin = message.admin === '' ? undefined : message.admin; if (message.members) { obj.members = message.members.map(e => e ? MemberRequest.toAmino(e) : undefined); } else { obj.members = message.members; } - obj.group_metadata = message.groupMetadata === "" ? undefined : message.groupMetadata; - obj.group_policy_metadata = message.groupPolicyMetadata === "" ? undefined : message.groupPolicyMetadata; + obj.group_metadata = message.groupMetadata === '' ? undefined : message.groupMetadata; + obj.group_policy_metadata = message.groupPolicyMetadata === '' ? undefined : message.groupPolicyMetadata; obj.group_policy_as_admin = message.groupPolicyAsAdmin === false ? undefined : message.groupPolicyAsAdmin; obj.decision_policy = message.decisionPolicy ? GlobalDecoderRegistry.toAminoMsg(message.decisionPolicy) : undefined; return obj; @@ -1861,7 +1861,7 @@ export const MsgCreateGroupWithPolicy = { }, toAminoMsg(message: MsgCreateGroupWithPolicy): MsgCreateGroupWithPolicyAminoMsg { return { - type: "cosmos-sdk/MsgCreateGroupWithPolicy", + type: 'cosmos-sdk/MsgCreateGroupWithPolicy', value: MsgCreateGroupWithPolicy.toAmino(message) }; }, @@ -1873,7 +1873,7 @@ export const MsgCreateGroupWithPolicy = { }, toProtoMsg(message: MsgCreateGroupWithPolicy): MsgCreateGroupWithPolicyProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", + typeUrl: '/cosmos.group.v1.MsgCreateGroupWithPolicy', value: MsgCreateGroupWithPolicy.encode(message).finish() }; } @@ -1883,23 +1883,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicy.aminoTy function createBaseMsgCreateGroupWithPolicyResponse(): MsgCreateGroupWithPolicyResponse { return { groupId: BigInt(0), - groupPolicyAddress: "" + groupPolicyAddress: '' }; } export const MsgCreateGroupWithPolicyResponse = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", - aminoType: "cosmos-sdk/MsgCreateGroupWithPolicyResponse", + typeUrl: '/cosmos.group.v1.MsgCreateGroupWithPolicyResponse', + aminoType: 'cosmos-sdk/MsgCreateGroupWithPolicyResponse', is(o: any): o is MsgCreateGroupWithPolicyResponse { - return o && (o.$typeUrl === MsgCreateGroupWithPolicyResponse.typeUrl || typeof o.groupId === "bigint" && typeof o.groupPolicyAddress === "string"); + return o && (o.$typeUrl === MsgCreateGroupWithPolicyResponse.typeUrl || typeof o.groupId === 'bigint' && typeof o.groupPolicyAddress === 'string'); }, isAmino(o: any): o is MsgCreateGroupWithPolicyResponseAmino { - return o && (o.$typeUrl === MsgCreateGroupWithPolicyResponse.typeUrl || typeof o.group_id === "bigint" && typeof o.group_policy_address === "string"); + return o && (o.$typeUrl === MsgCreateGroupWithPolicyResponse.typeUrl || typeof o.group_id === 'bigint' && typeof o.group_policy_address === 'string'); }, encode(message: MsgCreateGroupWithPolicyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.groupId !== BigInt(0)) { writer.uint32(8).uint64(message.groupId); } - if (message.groupPolicyAddress !== "") { + if (message.groupPolicyAddress !== '') { writer.uint32(18).string(message.groupPolicyAddress); } return writer; @@ -1911,15 +1911,15 @@ export const MsgCreateGroupWithPolicyResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - case 2: - message.groupPolicyAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.groupId = reader.uint64(); + break; + case 2: + message.groupPolicyAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1927,7 +1927,7 @@ export const MsgCreateGroupWithPolicyResponse = { fromPartial(object: DeepPartial): MsgCreateGroupWithPolicyResponse { const message = createBaseMsgCreateGroupWithPolicyResponse(); message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.groupPolicyAddress = object.groupPolicyAddress ?? ""; + message.groupPolicyAddress = object.groupPolicyAddress ?? ''; return message; }, fromAmino(object: MsgCreateGroupWithPolicyResponseAmino): MsgCreateGroupWithPolicyResponse { @@ -1943,7 +1943,7 @@ export const MsgCreateGroupWithPolicyResponse = { toAmino(message: MsgCreateGroupWithPolicyResponse): MsgCreateGroupWithPolicyResponseAmino { const obj: any = {}; obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; - obj.group_policy_address = message.groupPolicyAddress === "" ? undefined : message.groupPolicyAddress; + obj.group_policy_address = message.groupPolicyAddress === '' ? undefined : message.groupPolicyAddress; return obj; }, fromAminoMsg(object: MsgCreateGroupWithPolicyResponseAminoMsg): MsgCreateGroupWithPolicyResponse { @@ -1951,7 +1951,7 @@ export const MsgCreateGroupWithPolicyResponse = { }, toAminoMsg(message: MsgCreateGroupWithPolicyResponse): MsgCreateGroupWithPolicyResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreateGroupWithPolicyResponse", + type: 'cosmos-sdk/MsgCreateGroupWithPolicyResponse', value: MsgCreateGroupWithPolicyResponse.toAmino(message) }; }, @@ -1963,7 +1963,7 @@ export const MsgCreateGroupWithPolicyResponse = { }, toProtoMsg(message: MsgCreateGroupWithPolicyResponse): MsgCreateGroupWithPolicyResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", + typeUrl: '/cosmos.group.v1.MsgCreateGroupWithPolicyResponse', value: MsgCreateGroupWithPolicyResponse.encode(message).finish() }; } @@ -1972,25 +1972,25 @@ GlobalDecoderRegistry.register(MsgCreateGroupWithPolicyResponse.typeUrl, MsgCrea GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicyResponse.aminoType, MsgCreateGroupWithPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicy(): MsgUpdateGroupPolicyDecisionPolicy { return { - admin: "", - groupPolicyAddress: "", + admin: '', + groupPolicyAddress: '', decisionPolicy: undefined }; } export const MsgUpdateGroupPolicyDecisionPolicy = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - aminoType: "cosmos-sdk/MsgUpdateGroupDecisionPolicy", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy', + aminoType: 'cosmos-sdk/MsgUpdateGroupDecisionPolicy', is(o: any): o is MsgUpdateGroupPolicyDecisionPolicy { - return o && (o.$typeUrl === MsgUpdateGroupPolicyDecisionPolicy.typeUrl || typeof o.admin === "string" && typeof o.groupPolicyAddress === "string"); + return o && (o.$typeUrl === MsgUpdateGroupPolicyDecisionPolicy.typeUrl || typeof o.admin === 'string' && typeof o.groupPolicyAddress === 'string'); }, isAmino(o: any): o is MsgUpdateGroupPolicyDecisionPolicyAmino { - return o && (o.$typeUrl === MsgUpdateGroupPolicyDecisionPolicy.typeUrl || typeof o.admin === "string" && typeof o.group_policy_address === "string"); + return o && (o.$typeUrl === MsgUpdateGroupPolicyDecisionPolicy.typeUrl || typeof o.admin === 'string' && typeof o.group_policy_address === 'string'); }, encode(message: MsgUpdateGroupPolicyDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } - if (message.groupPolicyAddress !== "") { + if (message.groupPolicyAddress !== '') { writer.uint32(18).string(message.groupPolicyAddress); } if (message.decisionPolicy !== undefined) { @@ -2005,26 +2005,26 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupPolicyAddress = reader.string(); - break; - case 3: - message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.groupPolicyAddress = reader.string(); + break; + case 3: + message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateGroupPolicyDecisionPolicy { const message = createBaseMsgUpdateGroupPolicyDecisionPolicy(); - message.admin = object.admin ?? ""; - message.groupPolicyAddress = object.groupPolicyAddress ?? ""; + message.admin = object.admin ?? ''; + message.groupPolicyAddress = object.groupPolicyAddress ?? ''; message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? GlobalDecoderRegistry.fromPartial(object.decisionPolicy) : undefined; return message; }, @@ -2043,8 +2043,8 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { }, toAmino(message: MsgUpdateGroupPolicyDecisionPolicy): MsgUpdateGroupPolicyDecisionPolicyAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; - obj.group_policy_address = message.groupPolicyAddress === "" ? undefined : message.groupPolicyAddress; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.group_policy_address = message.groupPolicyAddress === '' ? undefined : message.groupPolicyAddress; obj.decision_policy = message.decisionPolicy ? GlobalDecoderRegistry.toAminoMsg(message.decisionPolicy) : undefined; return obj; }, @@ -2053,7 +2053,7 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { }, toAminoMsg(message: MsgUpdateGroupPolicyDecisionPolicy): MsgUpdateGroupPolicyDecisionPolicyAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupDecisionPolicy", + type: 'cosmos-sdk/MsgUpdateGroupDecisionPolicy', value: MsgUpdateGroupPolicyDecisionPolicy.toAmino(message) }; }, @@ -2065,7 +2065,7 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { }, toProtoMsg(message: MsgUpdateGroupPolicyDecisionPolicy): MsgUpdateGroupPolicyDecisionPolicyProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy', value: MsgUpdateGroupPolicyDecisionPolicy.encode(message).finish() }; } @@ -2076,8 +2076,8 @@ function createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(): MsgUpdateGroupP return {}; } export const MsgUpdateGroupPolicyDecisionPolicyResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse', + aminoType: 'cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse', is(o: any): o is MsgUpdateGroupPolicyDecisionPolicyResponse { return o && o.$typeUrl === MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl; }, @@ -2094,9 +2094,9 @@ export const MsgUpdateGroupPolicyDecisionPolicyResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2118,7 +2118,7 @@ export const MsgUpdateGroupPolicyDecisionPolicyResponse = { }, toAminoMsg(message: MsgUpdateGroupPolicyDecisionPolicyResponse): MsgUpdateGroupPolicyDecisionPolicyResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse", + type: 'cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse', value: MsgUpdateGroupPolicyDecisionPolicyResponse.toAmino(message) }; }, @@ -2130,7 +2130,7 @@ export const MsgUpdateGroupPolicyDecisionPolicyResponse = { }, toProtoMsg(message: MsgUpdateGroupPolicyDecisionPolicyResponse): MsgUpdateGroupPolicyDecisionPolicyResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse', value: MsgUpdateGroupPolicyDecisionPolicyResponse.encode(message).finish() }; } @@ -2139,28 +2139,28 @@ GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicyResponse.typeUr GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicyResponse.aminoType, MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyMetadata(): MsgUpdateGroupPolicyMetadata { return { - admin: "", - groupPolicyAddress: "", - metadata: "" + admin: '', + groupPolicyAddress: '', + metadata: '' }; } export const MsgUpdateGroupPolicyMetadata = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyMetadata", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyMetadata', + aminoType: 'cosmos-sdk/MsgUpdateGroupPolicyMetadata', is(o: any): o is MsgUpdateGroupPolicyMetadata { - return o && (o.$typeUrl === MsgUpdateGroupPolicyMetadata.typeUrl || typeof o.admin === "string" && typeof o.groupPolicyAddress === "string" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgUpdateGroupPolicyMetadata.typeUrl || typeof o.admin === 'string' && typeof o.groupPolicyAddress === 'string' && typeof o.metadata === 'string'); }, isAmino(o: any): o is MsgUpdateGroupPolicyMetadataAmino { - return o && (o.$typeUrl === MsgUpdateGroupPolicyMetadata.typeUrl || typeof o.admin === "string" && typeof o.group_policy_address === "string" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MsgUpdateGroupPolicyMetadata.typeUrl || typeof o.admin === 'string' && typeof o.group_policy_address === 'string' && typeof o.metadata === 'string'); }, encode(message: MsgUpdateGroupPolicyMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(10).string(message.admin); } - if (message.groupPolicyAddress !== "") { + if (message.groupPolicyAddress !== '') { writer.uint32(18).string(message.groupPolicyAddress); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } return writer; @@ -2172,27 +2172,27 @@ export const MsgUpdateGroupPolicyMetadata = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupPolicyAddress = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.admin = reader.string(); + break; + case 2: + message.groupPolicyAddress = reader.string(); + break; + case 3: + message.metadata = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateGroupPolicyMetadata { const message = createBaseMsgUpdateGroupPolicyMetadata(); - message.admin = object.admin ?? ""; - message.groupPolicyAddress = object.groupPolicyAddress ?? ""; - message.metadata = object.metadata ?? ""; + message.admin = object.admin ?? ''; + message.groupPolicyAddress = object.groupPolicyAddress ?? ''; + message.metadata = object.metadata ?? ''; return message; }, fromAmino(object: MsgUpdateGroupPolicyMetadataAmino): MsgUpdateGroupPolicyMetadata { @@ -2210,9 +2210,9 @@ export const MsgUpdateGroupPolicyMetadata = { }, toAmino(message: MsgUpdateGroupPolicyMetadata): MsgUpdateGroupPolicyMetadataAmino { const obj: any = {}; - obj.admin = message.admin === "" ? undefined : message.admin; - obj.group_policy_address = message.groupPolicyAddress === "" ? undefined : message.groupPolicyAddress; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.group_policy_address = message.groupPolicyAddress === '' ? undefined : message.groupPolicyAddress; + obj.metadata = message.metadata === '' ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MsgUpdateGroupPolicyMetadataAminoMsg): MsgUpdateGroupPolicyMetadata { @@ -2220,7 +2220,7 @@ export const MsgUpdateGroupPolicyMetadata = { }, toAminoMsg(message: MsgUpdateGroupPolicyMetadata): MsgUpdateGroupPolicyMetadataAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadata", + type: 'cosmos-sdk/MsgUpdateGroupPolicyMetadata', value: MsgUpdateGroupPolicyMetadata.toAmino(message) }; }, @@ -2232,7 +2232,7 @@ export const MsgUpdateGroupPolicyMetadata = { }, toProtoMsg(message: MsgUpdateGroupPolicyMetadata): MsgUpdateGroupPolicyMetadataProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyMetadata', value: MsgUpdateGroupPolicyMetadata.encode(message).finish() }; } @@ -2243,8 +2243,8 @@ function createBaseMsgUpdateGroupPolicyMetadataResponse(): MsgUpdateGroupPolicyM return {}; } export const MsgUpdateGroupPolicyMetadataResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse', + aminoType: 'cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse', is(o: any): o is MsgUpdateGroupPolicyMetadataResponse { return o && o.$typeUrl === MsgUpdateGroupPolicyMetadataResponse.typeUrl; }, @@ -2261,9 +2261,9 @@ export const MsgUpdateGroupPolicyMetadataResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2285,7 +2285,7 @@ export const MsgUpdateGroupPolicyMetadataResponse = { }, toAminoMsg(message: MsgUpdateGroupPolicyMetadataResponse): MsgUpdateGroupPolicyMetadataResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse", + type: 'cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse', value: MsgUpdateGroupPolicyMetadataResponse.toAmino(message) }; }, @@ -2297,7 +2297,7 @@ export const MsgUpdateGroupPolicyMetadataResponse = { }, toProtoMsg(message: MsgUpdateGroupPolicyMetadataResponse): MsgUpdateGroupPolicyMetadataResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", + typeUrl: '/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse', value: MsgUpdateGroupPolicyMetadataResponse.encode(message).finish() }; } @@ -2306,32 +2306,32 @@ GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadataResponse.typeUrl, Msg GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadataResponse.aminoType, MsgUpdateGroupPolicyMetadataResponse.typeUrl); function createBaseMsgSubmitProposal(): MsgSubmitProposal { return { - groupPolicyAddress: "", + groupPolicyAddress: '', proposers: [], - metadata: "", + metadata: '', messages: [], exec: 0, - title: "", - summary: "" + title: '', + summary: '' }; } export const MsgSubmitProposal = { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - aminoType: "cosmos-sdk/group/MsgSubmitProposal", + typeUrl: '/cosmos.group.v1.MsgSubmitProposal', + aminoType: 'cosmos-sdk/group/MsgSubmitProposal', is(o: any): o is MsgSubmitProposal { - return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || typeof o.groupPolicyAddress === "string" && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === "string") && typeof o.metadata === "string" && Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && isSet(o.exec) && typeof o.title === "string" && typeof o.summary === "string"); + return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || typeof o.groupPolicyAddress === 'string' && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === 'string') && typeof o.metadata === 'string' && Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && isSet(o.exec) && typeof o.title === 'string' && typeof o.summary === 'string'); }, isAmino(o: any): o is MsgSubmitProposalAmino { - return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || typeof o.group_policy_address === "string" && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === "string") && typeof o.metadata === "string" && Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && isSet(o.exec) && typeof o.title === "string" && typeof o.summary === "string"); + return o && (o.$typeUrl === MsgSubmitProposal.typeUrl || typeof o.group_policy_address === 'string' && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === 'string') && typeof o.metadata === 'string' && Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && isSet(o.exec) && typeof o.title === 'string' && typeof o.summary === 'string'); }, encode(message: MsgSubmitProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupPolicyAddress !== "") { + if (message.groupPolicyAddress !== '') { writer.uint32(10).string(message.groupPolicyAddress); } for (const v of message.proposers) { writer.uint32(18).string(v!); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } for (const v of message.messages) { @@ -2340,10 +2340,10 @@ export const MsgSubmitProposal = { if (message.exec !== 0) { writer.uint32(40).int32(message.exec); } - if (message.title !== "") { + if (message.title !== '') { writer.uint32(50).string(message.title); } - if (message.summary !== "") { + if (message.summary !== '') { writer.uint32(58).string(message.summary); } return writer; @@ -2355,43 +2355,43 @@ export const MsgSubmitProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.groupPolicyAddress = reader.string(); - break; - case 2: - message.proposers.push(reader.string()); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 5: - message.exec = (reader.int32() as any); - break; - case 6: - message.title = reader.string(); - break; - case 7: - message.summary = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.groupPolicyAddress = reader.string(); + break; + case 2: + message.proposers.push(reader.string()); + break; + case 3: + message.metadata = reader.string(); + break; + case 4: + message.messages.push(Any.decode(reader, reader.uint32())); + break; + case 5: + message.exec = (reader.int32() as any); + break; + case 6: + message.title = reader.string(); + break; + case 7: + message.summary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgSubmitProposal { const message = createBaseMsgSubmitProposal(); - message.groupPolicyAddress = object.groupPolicyAddress ?? ""; + message.groupPolicyAddress = object.groupPolicyAddress ?? ''; message.proposers = object.proposers?.map(e => e) || []; - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; message.exec = object.exec ?? 0; - message.title = object.title ?? ""; - message.summary = object.summary ?? ""; + message.title = object.title ?? ''; + message.summary = object.summary ?? ''; return message; }, fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal { @@ -2417,21 +2417,21 @@ export const MsgSubmitProposal = { }, toAmino(message: MsgSubmitProposal): MsgSubmitProposalAmino { const obj: any = {}; - obj.group_policy_address = message.groupPolicyAddress === "" ? undefined : message.groupPolicyAddress; + obj.group_policy_address = message.groupPolicyAddress === '' ? undefined : message.groupPolicyAddress; if (message.proposers) { obj.proposers = message.proposers.map(e => e); } else { obj.proposers = message.proposers; } - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; if (message.messages) { obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined); } else { obj.messages = message.messages; } obj.exec = message.exec === 0 ? undefined : message.exec; - obj.title = message.title === "" ? undefined : message.title; - obj.summary = message.summary === "" ? undefined : message.summary; + obj.title = message.title === '' ? undefined : message.title; + obj.summary = message.summary === '' ? undefined : message.summary; return obj; }, fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { @@ -2439,7 +2439,7 @@ export const MsgSubmitProposal = { }, toAminoMsg(message: MsgSubmitProposal): MsgSubmitProposalAminoMsg { return { - type: "cosmos-sdk/group/MsgSubmitProposal", + type: 'cosmos-sdk/group/MsgSubmitProposal', value: MsgSubmitProposal.toAmino(message) }; }, @@ -2451,7 +2451,7 @@ export const MsgSubmitProposal = { }, toProtoMsg(message: MsgSubmitProposal): MsgSubmitProposalProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", + typeUrl: '/cosmos.group.v1.MsgSubmitProposal', value: MsgSubmitProposal.encode(message).finish() }; } @@ -2464,13 +2464,13 @@ function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { }; } export const MsgSubmitProposalResponse = { - typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", - aminoType: "cosmos-sdk/MsgSubmitProposalResponse", + typeUrl: '/cosmos.group.v1.MsgSubmitProposalResponse', + aminoType: 'cosmos-sdk/MsgSubmitProposalResponse', is(o: any): o is MsgSubmitProposalResponse { - return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposalId === "bigint"); + return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposalId === 'bigint'); }, isAmino(o: any): o is MsgSubmitProposalResponseAmino { - return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposal_id === "bigint"); + return o && (o.$typeUrl === MsgSubmitProposalResponse.typeUrl || typeof o.proposal_id === 'bigint'); }, encode(message: MsgSubmitProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { @@ -2485,12 +2485,12 @@ export const MsgSubmitProposalResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2517,7 +2517,7 @@ export const MsgSubmitProposalResponse = { }, toAminoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAminoMsg { return { - type: "cosmos-sdk/MsgSubmitProposalResponse", + type: 'cosmos-sdk/MsgSubmitProposalResponse', value: MsgSubmitProposalResponse.toAmino(message) }; }, @@ -2529,7 +2529,7 @@ export const MsgSubmitProposalResponse = { }, toProtoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", + typeUrl: '/cosmos.group.v1.MsgSubmitProposalResponse', value: MsgSubmitProposalResponse.encode(message).finish() }; } @@ -2539,23 +2539,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoT function createBaseMsgWithdrawProposal(): MsgWithdrawProposal { return { proposalId: BigInt(0), - address: "" + address: '' }; } export const MsgWithdrawProposal = { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - aminoType: "cosmos-sdk/group/MsgWithdrawProposal", + typeUrl: '/cosmos.group.v1.MsgWithdrawProposal', + aminoType: 'cosmos-sdk/group/MsgWithdrawProposal', is(o: any): o is MsgWithdrawProposal { - return o && (o.$typeUrl === MsgWithdrawProposal.typeUrl || typeof o.proposalId === "bigint" && typeof o.address === "string"); + return o && (o.$typeUrl === MsgWithdrawProposal.typeUrl || typeof o.proposalId === 'bigint' && typeof o.address === 'string'); }, isAmino(o: any): o is MsgWithdrawProposalAmino { - return o && (o.$typeUrl === MsgWithdrawProposal.typeUrl || typeof o.proposal_id === "bigint" && typeof o.address === "string"); + return o && (o.$typeUrl === MsgWithdrawProposal.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.address === 'string'); }, encode(message: MsgWithdrawProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.address !== "") { + if (message.address !== '') { writer.uint32(18).string(message.address); } return writer; @@ -2567,15 +2567,15 @@ export const MsgWithdrawProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.address = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2583,7 +2583,7 @@ export const MsgWithdrawProposal = { fromPartial(object: DeepPartial): MsgWithdrawProposal { const message = createBaseMsgWithdrawProposal(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.address = object.address ?? ""; + message.address = object.address ?? ''; return message; }, fromAmino(object: MsgWithdrawProposalAmino): MsgWithdrawProposal { @@ -2599,7 +2599,7 @@ export const MsgWithdrawProposal = { toAmino(message: MsgWithdrawProposal): MsgWithdrawProposalAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; return obj; }, fromAminoMsg(object: MsgWithdrawProposalAminoMsg): MsgWithdrawProposal { @@ -2607,7 +2607,7 @@ export const MsgWithdrawProposal = { }, toAminoMsg(message: MsgWithdrawProposal): MsgWithdrawProposalAminoMsg { return { - type: "cosmos-sdk/group/MsgWithdrawProposal", + type: 'cosmos-sdk/group/MsgWithdrawProposal', value: MsgWithdrawProposal.toAmino(message) }; }, @@ -2619,7 +2619,7 @@ export const MsgWithdrawProposal = { }, toProtoMsg(message: MsgWithdrawProposal): MsgWithdrawProposalProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", + typeUrl: '/cosmos.group.v1.MsgWithdrawProposal', value: MsgWithdrawProposal.encode(message).finish() }; } @@ -2630,8 +2630,8 @@ function createBaseMsgWithdrawProposalResponse(): MsgWithdrawProposalResponse { return {}; } export const MsgWithdrawProposalResponse = { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", - aminoType: "cosmos-sdk/MsgWithdrawProposalResponse", + typeUrl: '/cosmos.group.v1.MsgWithdrawProposalResponse', + aminoType: 'cosmos-sdk/MsgWithdrawProposalResponse', is(o: any): o is MsgWithdrawProposalResponse { return o && o.$typeUrl === MsgWithdrawProposalResponse.typeUrl; }, @@ -2648,9 +2648,9 @@ export const MsgWithdrawProposalResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2672,7 +2672,7 @@ export const MsgWithdrawProposalResponse = { }, toAminoMsg(message: MsgWithdrawProposalResponse): MsgWithdrawProposalResponseAminoMsg { return { - type: "cosmos-sdk/MsgWithdrawProposalResponse", + type: 'cosmos-sdk/MsgWithdrawProposalResponse', value: MsgWithdrawProposalResponse.toAmino(message) }; }, @@ -2684,7 +2684,7 @@ export const MsgWithdrawProposalResponse = { }, toProtoMsg(message: MsgWithdrawProposalResponse): MsgWithdrawProposalResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", + typeUrl: '/cosmos.group.v1.MsgWithdrawProposalResponse', value: MsgWithdrawProposalResponse.encode(message).finish() }; } @@ -2694,32 +2694,32 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposalResponse.amin function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), - voter: "", + voter: '', option: 0, - metadata: "", + metadata: '', exec: 0 }; } export const MsgVote = { - typeUrl: "/cosmos.group.v1.MsgVote", - aminoType: "cosmos-sdk/group/MsgVote", + typeUrl: '/cosmos.group.v1.MsgVote', + aminoType: 'cosmos-sdk/group/MsgVote', is(o: any): o is MsgVote { - return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && isSet(o.option) && typeof o.metadata === "string" && isSet(o.exec)); + return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && typeof o.metadata === 'string' && isSet(o.exec)); }, isAmino(o: any): o is MsgVoteAmino { - return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && isSet(o.option) && typeof o.metadata === "string" && isSet(o.exec)); + return o && (o.$typeUrl === MsgVote.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && typeof o.metadata === 'string' && isSet(o.exec)); }, encode(message: MsgVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } if (message.option !== 0) { writer.uint32(24).int32(message.option); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(34).string(message.metadata); } if (message.exec !== 0) { @@ -2734,24 +2734,24 @@ export const MsgVote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.metadata = reader.string(); - break; - case 5: - message.exec = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = (reader.int32() as any); + break; + case 4: + message.metadata = reader.string(); + break; + case 5: + message.exec = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2759,9 +2759,9 @@ export const MsgVote = { fromPartial(object: DeepPartial): MsgVote { const message = createBaseMsgVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; message.exec = object.exec ?? 0; return message; }, @@ -2787,9 +2787,9 @@ export const MsgVote = { toAmino(message: MsgVote): MsgVoteAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.voter = message.voter === '' ? undefined : message.voter; obj.option = message.option === 0 ? undefined : message.option; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; obj.exec = message.exec === 0 ? undefined : message.exec; return obj; }, @@ -2798,7 +2798,7 @@ export const MsgVote = { }, toAminoMsg(message: MsgVote): MsgVoteAminoMsg { return { - type: "cosmos-sdk/group/MsgVote", + type: 'cosmos-sdk/group/MsgVote', value: MsgVote.toAmino(message) }; }, @@ -2810,7 +2810,7 @@ export const MsgVote = { }, toProtoMsg(message: MsgVote): MsgVoteProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgVote", + typeUrl: '/cosmos.group.v1.MsgVote', value: MsgVote.encode(message).finish() }; } @@ -2821,8 +2821,8 @@ function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } export const MsgVoteResponse = { - typeUrl: "/cosmos.group.v1.MsgVoteResponse", - aminoType: "cosmos-sdk/MsgVoteResponse", + typeUrl: '/cosmos.group.v1.MsgVoteResponse', + aminoType: 'cosmos-sdk/MsgVoteResponse', is(o: any): o is MsgVoteResponse { return o && o.$typeUrl === MsgVoteResponse.typeUrl; }, @@ -2839,9 +2839,9 @@ export const MsgVoteResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2863,7 +2863,7 @@ export const MsgVoteResponse = { }, toAminoMsg(message: MsgVoteResponse): MsgVoteResponseAminoMsg { return { - type: "cosmos-sdk/MsgVoteResponse", + type: 'cosmos-sdk/MsgVoteResponse', value: MsgVoteResponse.toAmino(message) }; }, @@ -2875,7 +2875,7 @@ export const MsgVoteResponse = { }, toProtoMsg(message: MsgVoteResponse): MsgVoteResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgVoteResponse", + typeUrl: '/cosmos.group.v1.MsgVoteResponse', value: MsgVoteResponse.encode(message).finish() }; } @@ -2885,23 +2885,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVo function createBaseMsgExec(): MsgExec { return { proposalId: BigInt(0), - executor: "" + executor: '' }; } export const MsgExec = { - typeUrl: "/cosmos.group.v1.MsgExec", - aminoType: "cosmos-sdk/group/MsgExec", + typeUrl: '/cosmos.group.v1.MsgExec', + aminoType: 'cosmos-sdk/group/MsgExec', is(o: any): o is MsgExec { - return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.proposalId === "bigint" && typeof o.executor === "string"); + return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.proposalId === 'bigint' && typeof o.executor === 'string'); }, isAmino(o: any): o is MsgExecAmino { - return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.proposal_id === "bigint" && typeof o.executor === "string"); + return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.executor === 'string'); }, encode(message: MsgExec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.executor !== "") { + if (message.executor !== '') { writer.uint32(18).string(message.executor); } return writer; @@ -2913,15 +2913,15 @@ export const MsgExec = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.executor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.executor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2929,7 +2929,7 @@ export const MsgExec = { fromPartial(object: DeepPartial): MsgExec { const message = createBaseMsgExec(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.executor = object.executor ?? ""; + message.executor = object.executor ?? ''; return message; }, fromAmino(object: MsgExecAmino): MsgExec { @@ -2945,7 +2945,7 @@ export const MsgExec = { toAmino(message: MsgExec): MsgExecAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.executor = message.executor === "" ? undefined : message.executor; + obj.executor = message.executor === '' ? undefined : message.executor; return obj; }, fromAminoMsg(object: MsgExecAminoMsg): MsgExec { @@ -2953,7 +2953,7 @@ export const MsgExec = { }, toAminoMsg(message: MsgExec): MsgExecAminoMsg { return { - type: "cosmos-sdk/group/MsgExec", + type: 'cosmos-sdk/group/MsgExec', value: MsgExec.toAmino(message) }; }, @@ -2965,7 +2965,7 @@ export const MsgExec = { }, toProtoMsg(message: MsgExec): MsgExecProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgExec", + typeUrl: '/cosmos.group.v1.MsgExec', value: MsgExec.encode(message).finish() }; } @@ -2978,8 +2978,8 @@ function createBaseMsgExecResponse(): MsgExecResponse { }; } export const MsgExecResponse = { - typeUrl: "/cosmos.group.v1.MsgExecResponse", - aminoType: "cosmos-sdk/MsgExecResponse", + typeUrl: '/cosmos.group.v1.MsgExecResponse', + aminoType: 'cosmos-sdk/MsgExecResponse', is(o: any): o is MsgExecResponse { return o && (o.$typeUrl === MsgExecResponse.typeUrl || isSet(o.result)); }, @@ -2999,12 +2999,12 @@ export const MsgExecResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 2: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3031,7 +3031,7 @@ export const MsgExecResponse = { }, toAminoMsg(message: MsgExecResponse): MsgExecResponseAminoMsg { return { - type: "cosmos-sdk/MsgExecResponse", + type: 'cosmos-sdk/MsgExecResponse', value: MsgExecResponse.toAmino(message) }; }, @@ -3043,7 +3043,7 @@ export const MsgExecResponse = { }, toProtoMsg(message: MsgExecResponse): MsgExecResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgExecResponse", + typeUrl: '/cosmos.group.v1.MsgExecResponse', value: MsgExecResponse.encode(message).finish() }; } @@ -3052,21 +3052,21 @@ GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgLeaveGroup(): MsgLeaveGroup { return { - address: "", + address: '', groupId: BigInt(0) }; } export const MsgLeaveGroup = { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - aminoType: "cosmos-sdk/group/MsgLeaveGroup", + typeUrl: '/cosmos.group.v1.MsgLeaveGroup', + aminoType: 'cosmos-sdk/group/MsgLeaveGroup', is(o: any): o is MsgLeaveGroup { - return o && (o.$typeUrl === MsgLeaveGroup.typeUrl || typeof o.address === "string" && typeof o.groupId === "bigint"); + return o && (o.$typeUrl === MsgLeaveGroup.typeUrl || typeof o.address === 'string' && typeof o.groupId === 'bigint'); }, isAmino(o: any): o is MsgLeaveGroupAmino { - return o && (o.$typeUrl === MsgLeaveGroup.typeUrl || typeof o.address === "string" && typeof o.group_id === "bigint"); + return o && (o.$typeUrl === MsgLeaveGroup.typeUrl || typeof o.address === 'string' && typeof o.group_id === 'bigint'); }, encode(message: MsgLeaveGroup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.groupId !== BigInt(0)) { @@ -3081,22 +3081,22 @@ export const MsgLeaveGroup = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.groupId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgLeaveGroup { const message = createBaseMsgLeaveGroup(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); return message; }, @@ -3112,7 +3112,7 @@ export const MsgLeaveGroup = { }, toAmino(message: MsgLeaveGroup): MsgLeaveGroupAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; return obj; }, @@ -3121,7 +3121,7 @@ export const MsgLeaveGroup = { }, toAminoMsg(message: MsgLeaveGroup): MsgLeaveGroupAminoMsg { return { - type: "cosmos-sdk/group/MsgLeaveGroup", + type: 'cosmos-sdk/group/MsgLeaveGroup', value: MsgLeaveGroup.toAmino(message) }; }, @@ -3133,7 +3133,7 @@ export const MsgLeaveGroup = { }, toProtoMsg(message: MsgLeaveGroup): MsgLeaveGroupProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", + typeUrl: '/cosmos.group.v1.MsgLeaveGroup', value: MsgLeaveGroup.encode(message).finish() }; } @@ -3144,8 +3144,8 @@ function createBaseMsgLeaveGroupResponse(): MsgLeaveGroupResponse { return {}; } export const MsgLeaveGroupResponse = { - typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", - aminoType: "cosmos-sdk/MsgLeaveGroupResponse", + typeUrl: '/cosmos.group.v1.MsgLeaveGroupResponse', + aminoType: 'cosmos-sdk/MsgLeaveGroupResponse', is(o: any): o is MsgLeaveGroupResponse { return o && o.$typeUrl === MsgLeaveGroupResponse.typeUrl; }, @@ -3162,9 +3162,9 @@ export const MsgLeaveGroupResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3186,7 +3186,7 @@ export const MsgLeaveGroupResponse = { }, toAminoMsg(message: MsgLeaveGroupResponse): MsgLeaveGroupResponseAminoMsg { return { - type: "cosmos-sdk/MsgLeaveGroupResponse", + type: 'cosmos-sdk/MsgLeaveGroupResponse', value: MsgLeaveGroupResponse.toAmino(message) }; }, @@ -3198,7 +3198,7 @@ export const MsgLeaveGroupResponse = { }, toProtoMsg(message: MsgLeaveGroupResponse): MsgLeaveGroupResponseProtoMsg { return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", + typeUrl: '/cosmos.group.v1.MsgLeaveGroupResponse', value: MsgLeaveGroupResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/group/v1/types.ts b/libs/cosmos-types/cosmos/group/v1/types.ts index dc815dbf..13de41e5 100644 --- a/libs/cosmos-types/cosmos/group/v1/types.ts +++ b/libs/cosmos-types/cosmos/group/v1/types.ts @@ -1,9 +1,9 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino } from "../../../google/protobuf/duration"; -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { Duration, DurationAmino } from '../../../google/protobuf/duration'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { DeepPartial, fromTimestamp, isSet,toTimestamp } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** VoteOption enumerates the valid vote options for a given proposal. */ export enum VoteOption { /** @@ -24,42 +24,42 @@ export enum VoteOption { export const VoteOptionAmino = VoteOption; export function voteOptionFromJSON(object: any): VoteOption { switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; + case 0: + case 'VOTE_OPTION_UNSPECIFIED': + return VoteOption.VOTE_OPTION_UNSPECIFIED; + case 1: + case 'VOTE_OPTION_YES': + return VoteOption.VOTE_OPTION_YES; + case 2: + case 'VOTE_OPTION_ABSTAIN': + return VoteOption.VOTE_OPTION_ABSTAIN; + case 3: + case 'VOTE_OPTION_NO': + return VoteOption.VOTE_OPTION_NO; + case 4: + case 'VOTE_OPTION_NO_WITH_VETO': + return VoteOption.VOTE_OPTION_NO_WITH_VETO; + case -1: + case 'UNRECOGNIZED': + default: + return VoteOption.UNRECOGNIZED; } } export function voteOptionToJSON(object: VoteOption): string { switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - case VoteOption.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case VoteOption.VOTE_OPTION_UNSPECIFIED: + return 'VOTE_OPTION_UNSPECIFIED'; + case VoteOption.VOTE_OPTION_YES: + return 'VOTE_OPTION_YES'; + case VoteOption.VOTE_OPTION_ABSTAIN: + return 'VOTE_OPTION_ABSTAIN'; + case VoteOption.VOTE_OPTION_NO: + return 'VOTE_OPTION_NO'; + case VoteOption.VOTE_OPTION_NO_WITH_VETO: + return 'VOTE_OPTION_NO_WITH_VETO'; + case VoteOption.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** ProposalStatus defines proposal statuses. */ @@ -93,47 +93,47 @@ export enum ProposalStatus { export const ProposalStatusAmino = ProposalStatus; export function proposalStatusFromJSON(object: any): ProposalStatus { switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_SUBMITTED": - return ProposalStatus.PROPOSAL_STATUS_SUBMITTED; - case 2: - case "PROPOSAL_STATUS_ACCEPTED": - return ProposalStatus.PROPOSAL_STATUS_ACCEPTED; - case 3: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 4: - case "PROPOSAL_STATUS_ABORTED": - return ProposalStatus.PROPOSAL_STATUS_ABORTED; - case 5: - case "PROPOSAL_STATUS_WITHDRAWN": - return ProposalStatus.PROPOSAL_STATUS_WITHDRAWN; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; + case 0: + case 'PROPOSAL_STATUS_UNSPECIFIED': + return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; + case 1: + case 'PROPOSAL_STATUS_SUBMITTED': + return ProposalStatus.PROPOSAL_STATUS_SUBMITTED; + case 2: + case 'PROPOSAL_STATUS_ACCEPTED': + return ProposalStatus.PROPOSAL_STATUS_ACCEPTED; + case 3: + case 'PROPOSAL_STATUS_REJECTED': + return ProposalStatus.PROPOSAL_STATUS_REJECTED; + case 4: + case 'PROPOSAL_STATUS_ABORTED': + return ProposalStatus.PROPOSAL_STATUS_ABORTED; + case 5: + case 'PROPOSAL_STATUS_WITHDRAWN': + return ProposalStatus.PROPOSAL_STATUS_WITHDRAWN; + case -1: + case 'UNRECOGNIZED': + default: + return ProposalStatus.UNRECOGNIZED; } } export function proposalStatusToJSON(object: ProposalStatus): string { switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_SUBMITTED: - return "PROPOSAL_STATUS_SUBMITTED"; - case ProposalStatus.PROPOSAL_STATUS_ACCEPTED: - return "PROPOSAL_STATUS_ACCEPTED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_ABORTED: - return "PROPOSAL_STATUS_ABORTED"; - case ProposalStatus.PROPOSAL_STATUS_WITHDRAWN: - return "PROPOSAL_STATUS_WITHDRAWN"; - case ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: + return 'PROPOSAL_STATUS_UNSPECIFIED'; + case ProposalStatus.PROPOSAL_STATUS_SUBMITTED: + return 'PROPOSAL_STATUS_SUBMITTED'; + case ProposalStatus.PROPOSAL_STATUS_ACCEPTED: + return 'PROPOSAL_STATUS_ACCEPTED'; + case ProposalStatus.PROPOSAL_STATUS_REJECTED: + return 'PROPOSAL_STATUS_REJECTED'; + case ProposalStatus.PROPOSAL_STATUS_ABORTED: + return 'PROPOSAL_STATUS_ABORTED'; + case ProposalStatus.PROPOSAL_STATUS_WITHDRAWN: + return 'PROPOSAL_STATUS_WITHDRAWN'; + case ProposalStatus.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** ProposalExecutorResult defines types of proposal executor results. */ @@ -151,37 +151,37 @@ export enum ProposalExecutorResult { export const ProposalExecutorResultAmino = ProposalExecutorResult; export function proposalExecutorResultFromJSON(object: any): ProposalExecutorResult { switch (object) { - case 0: - case "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED; - case 1: - case "PROPOSAL_EXECUTOR_RESULT_NOT_RUN": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN; - case 2: - case "PROPOSAL_EXECUTOR_RESULT_SUCCESS": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS; - case 3: - case "PROPOSAL_EXECUTOR_RESULT_FAILURE": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE; - case -1: - case "UNRECOGNIZED": - default: - return ProposalExecutorResult.UNRECOGNIZED; + case 0: + case 'PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED': + return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED; + case 1: + case 'PROPOSAL_EXECUTOR_RESULT_NOT_RUN': + return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN; + case 2: + case 'PROPOSAL_EXECUTOR_RESULT_SUCCESS': + return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS; + case 3: + case 'PROPOSAL_EXECUTOR_RESULT_FAILURE': + return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE; + case -1: + case 'UNRECOGNIZED': + default: + return ProposalExecutorResult.UNRECOGNIZED; } } export function proposalExecutorResultToJSON(object: ProposalExecutorResult): string { switch (object) { - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: - return "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN: - return "PROPOSAL_EXECUTOR_RESULT_NOT_RUN"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS: - return "PROPOSAL_EXECUTOR_RESULT_SUCCESS"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE: - return "PROPOSAL_EXECUTOR_RESULT_FAILURE"; - case ProposalExecutorResult.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: + return 'PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED'; + case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN: + return 'PROPOSAL_EXECUTOR_RESULT_NOT_RUN'; + case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS: + return 'PROPOSAL_EXECUTOR_RESULT_SUCCESS'; + case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE: + return 'PROPOSAL_EXECUTOR_RESULT_FAILURE'; + case ProposalExecutorResult.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -199,7 +199,7 @@ export interface Member { addedAt: Date; } export interface MemberProtoMsg { - typeUrl: "/cosmos.group.v1.Member"; + typeUrl: '/cosmos.group.v1.Member'; value: Uint8Array; } /** @@ -217,7 +217,7 @@ export interface MemberAmino { added_at: string; } export interface MemberAminoMsg { - type: "cosmos-sdk/Member"; + type: 'cosmos-sdk/Member'; value: MemberAmino; } /** @@ -234,7 +234,7 @@ export interface MemberRequest { metadata: string; } export interface MemberRequestProtoMsg { - typeUrl: "/cosmos.group.v1.MemberRequest"; + typeUrl: '/cosmos.group.v1.MemberRequest'; value: Uint8Array; } /** @@ -251,7 +251,7 @@ export interface MemberRequestAmino { metadata: string; } export interface MemberRequestAminoMsg { - type: "cosmos-sdk/MemberRequest"; + type: 'cosmos-sdk/MemberRequest'; value: MemberRequestAmino; } /** @@ -272,7 +272,7 @@ export interface ThresholdDecisionPolicy { windows?: DecisionPolicyWindows; } export interface ThresholdDecisionPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy"; + typeUrl: '/cosmos.group.v1.ThresholdDecisionPolicy'; value: Uint8Array; } /** @@ -293,7 +293,7 @@ export interface ThresholdDecisionPolicyAmino { windows?: DecisionPolicyWindowsAmino; } export interface ThresholdDecisionPolicyAminoMsg { - type: "cosmos-sdk/ThresholdDecisionPolicy"; + type: 'cosmos-sdk/ThresholdDecisionPolicy'; value: ThresholdDecisionPolicyAmino; } /** @@ -314,7 +314,7 @@ export interface PercentageDecisionPolicy { windows?: DecisionPolicyWindows; } export interface PercentageDecisionPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy"; + typeUrl: '/cosmos.group.v1.PercentageDecisionPolicy'; value: Uint8Array; } /** @@ -335,7 +335,7 @@ export interface PercentageDecisionPolicyAmino { windows?: DecisionPolicyWindowsAmino; } export interface PercentageDecisionPolicyAminoMsg { - type: "cosmos-sdk/PercentageDecisionPolicy"; + type: 'cosmos-sdk/PercentageDecisionPolicy'; value: PercentageDecisionPolicyAmino; } /** DecisionPolicyWindows defines the different windows for voting and execution. */ @@ -361,7 +361,7 @@ export interface DecisionPolicyWindows { minExecutionPeriod: Duration; } export interface DecisionPolicyWindowsProtoMsg { - typeUrl: "/cosmos.group.v1.DecisionPolicyWindows"; + typeUrl: '/cosmos.group.v1.DecisionPolicyWindows'; value: Uint8Array; } /** DecisionPolicyWindows defines the different windows for voting and execution. */ @@ -387,7 +387,7 @@ export interface DecisionPolicyWindowsAmino { min_execution_period: DurationAmino; } export interface DecisionPolicyWindowsAminoMsg { - type: "cosmos-sdk/DecisionPolicyWindows"; + type: 'cosmos-sdk/DecisionPolicyWindows'; value: DecisionPolicyWindowsAmino; } /** GroupInfo represents the high-level on-chain information for a group. */ @@ -414,7 +414,7 @@ export interface GroupInfo { createdAt: Date; } export interface GroupInfoProtoMsg { - typeUrl: "/cosmos.group.v1.GroupInfo"; + typeUrl: '/cosmos.group.v1.GroupInfo'; value: Uint8Array; } /** GroupInfo represents the high-level on-chain information for a group. */ @@ -441,7 +441,7 @@ export interface GroupInfoAmino { created_at: string; } export interface GroupInfoAminoMsg { - type: "cosmos-sdk/GroupInfo"; + type: 'cosmos-sdk/GroupInfo'; value: GroupInfoAmino; } /** GroupMember represents the relationship between a group and a member. */ @@ -452,7 +452,7 @@ export interface GroupMember { member?: Member; } export interface GroupMemberProtoMsg { - typeUrl: "/cosmos.group.v1.GroupMember"; + typeUrl: '/cosmos.group.v1.GroupMember'; value: Uint8Array; } /** GroupMember represents the relationship between a group and a member. */ @@ -463,7 +463,7 @@ export interface GroupMemberAmino { member?: MemberAmino; } export interface GroupMemberAminoMsg { - type: "cosmos-sdk/GroupMember"; + type: 'cosmos-sdk/GroupMember'; value: GroupMemberAmino; } /** GroupPolicyInfo represents the high-level on-chain information for a group policy. */ @@ -491,10 +491,10 @@ export interface GroupPolicyInfo { createdAt: Date; } export interface GroupPolicyInfoProtoMsg { - typeUrl: "/cosmos.group.v1.GroupPolicyInfo"; + typeUrl: '/cosmos.group.v1.GroupPolicyInfo'; value: Uint8Array; } -export type GroupPolicyInfoEncoded = Omit & { +export type GroupPolicyInfoEncoded = Omit & { /** decision_policy specifies the group policy's decision policy. */decisionPolicy?: ThresholdDecisionPolicyProtoMsg | PercentageDecisionPolicyProtoMsg | AnyProtoMsg | undefined; }; /** GroupPolicyInfo represents the high-level on-chain information for a group policy. */ @@ -522,7 +522,7 @@ export interface GroupPolicyInfoAmino { created_at: string; } export interface GroupPolicyInfoAminoMsg { - type: "cosmos-sdk/GroupPolicyInfo"; + type: 'cosmos-sdk/GroupPolicyInfo'; value: GroupPolicyInfoAmino; } /** @@ -593,7 +593,7 @@ export interface Proposal { summary: string; } export interface ProposalProtoMsg { - typeUrl: "/cosmos.group.v1.Proposal"; + typeUrl: '/cosmos.group.v1.Proposal'; value: Uint8Array; } /** @@ -664,7 +664,7 @@ export interface ProposalAmino { summary: string; } export interface ProposalAminoMsg { - type: "cosmos-sdk/Proposal"; + type: 'cosmos-sdk/Proposal'; value: ProposalAmino; } /** TallyResult represents the sum of weighted votes for each vote option. */ @@ -679,7 +679,7 @@ export interface TallyResult { noWithVetoCount: string; } export interface TallyResultProtoMsg { - typeUrl: "/cosmos.group.v1.TallyResult"; + typeUrl: '/cosmos.group.v1.TallyResult'; value: Uint8Array; } /** TallyResult represents the sum of weighted votes for each vote option. */ @@ -694,7 +694,7 @@ export interface TallyResultAmino { no_with_veto_count: string; } export interface TallyResultAminoMsg { - type: "cosmos-sdk/TallyResult"; + type: 'cosmos-sdk/TallyResult'; value: TallyResultAmino; } /** Vote represents a vote for a proposal.string metadata */ @@ -714,7 +714,7 @@ export interface Vote { submitTime: Date; } export interface VoteProtoMsg { - typeUrl: "/cosmos.group.v1.Vote"; + typeUrl: '/cosmos.group.v1.Vote'; value: Uint8Array; } /** Vote represents a vote for a proposal.string metadata */ @@ -734,34 +734,34 @@ export interface VoteAmino { submit_time: string; } export interface VoteAminoMsg { - type: "cosmos-sdk/Vote"; + type: 'cosmos-sdk/Vote'; value: VoteAmino; } function createBaseMember(): Member { return { - address: "", - weight: "", - metadata: "", + address: '', + weight: '', + metadata: '', addedAt: new Date() }; } export const Member = { - typeUrl: "/cosmos.group.v1.Member", - aminoType: "cosmos-sdk/Member", + typeUrl: '/cosmos.group.v1.Member', + aminoType: 'cosmos-sdk/Member', is(o: any): o is Member { - return o && (o.$typeUrl === Member.typeUrl || typeof o.address === "string" && typeof o.weight === "string" && typeof o.metadata === "string" && Timestamp.is(o.addedAt)); + return o && (o.$typeUrl === Member.typeUrl || typeof o.address === 'string' && typeof o.weight === 'string' && typeof o.metadata === 'string' && Timestamp.is(o.addedAt)); }, isAmino(o: any): o is MemberAmino { - return o && (o.$typeUrl === Member.typeUrl || typeof o.address === "string" && typeof o.weight === "string" && typeof o.metadata === "string" && Timestamp.isAmino(o.added_at)); + return o && (o.$typeUrl === Member.typeUrl || typeof o.address === 'string' && typeof o.weight === 'string' && typeof o.metadata === 'string' && Timestamp.isAmino(o.added_at)); }, encode(message: Member, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } - if (message.weight !== "") { + if (message.weight !== '') { writer.uint32(18).string(message.weight); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } if (message.addedAt !== undefined) { @@ -776,30 +776,30 @@ export const Member = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.weight = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.addedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.weight = reader.string(); + break; + case 3: + message.metadata = reader.string(); + break; + case 4: + message.addedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Member { const message = createBaseMember(); - message.address = object.address ?? ""; - message.weight = object.weight ?? ""; - message.metadata = object.metadata ?? ""; + message.address = object.address ?? ''; + message.weight = object.weight ?? ''; + message.metadata = object.metadata ?? ''; message.addedAt = object.addedAt ?? undefined; return message; }, @@ -821,9 +821,9 @@ export const Member = { }, toAmino(message: Member): MemberAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; - obj.weight = message.weight === "" ? undefined : message.weight; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.address = message.address === '' ? undefined : message.address; + obj.weight = message.weight === '' ? undefined : message.weight; + obj.metadata = message.metadata === '' ? undefined : message.metadata; obj.added_at = message.addedAt ? Timestamp.toAmino(toTimestamp(message.addedAt)) : new Date(); return obj; }, @@ -832,7 +832,7 @@ export const Member = { }, toAminoMsg(message: Member): MemberAminoMsg { return { - type: "cosmos-sdk/Member", + type: 'cosmos-sdk/Member', value: Member.toAmino(message) }; }, @@ -844,7 +844,7 @@ export const Member = { }, toProtoMsg(message: Member): MemberProtoMsg { return { - typeUrl: "/cosmos.group.v1.Member", + typeUrl: '/cosmos.group.v1.Member', value: Member.encode(message).finish() }; } @@ -853,28 +853,28 @@ GlobalDecoderRegistry.register(Member.typeUrl, Member); GlobalDecoderRegistry.registerAminoProtoMapping(Member.aminoType, Member.typeUrl); function createBaseMemberRequest(): MemberRequest { return { - address: "", - weight: "", - metadata: "" + address: '', + weight: '', + metadata: '' }; } export const MemberRequest = { - typeUrl: "/cosmos.group.v1.MemberRequest", - aminoType: "cosmos-sdk/MemberRequest", + typeUrl: '/cosmos.group.v1.MemberRequest', + aminoType: 'cosmos-sdk/MemberRequest', is(o: any): o is MemberRequest { - return o && (o.$typeUrl === MemberRequest.typeUrl || typeof o.address === "string" && typeof o.weight === "string" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MemberRequest.typeUrl || typeof o.address === 'string' && typeof o.weight === 'string' && typeof o.metadata === 'string'); }, isAmino(o: any): o is MemberRequestAmino { - return o && (o.$typeUrl === MemberRequest.typeUrl || typeof o.address === "string" && typeof o.weight === "string" && typeof o.metadata === "string"); + return o && (o.$typeUrl === MemberRequest.typeUrl || typeof o.address === 'string' && typeof o.weight === 'string' && typeof o.metadata === 'string'); }, encode(message: MemberRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } - if (message.weight !== "") { + if (message.weight !== '') { writer.uint32(18).string(message.weight); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } return writer; @@ -886,27 +886,27 @@ export const MemberRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.weight = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.weight = reader.string(); + break; + case 3: + message.metadata = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MemberRequest { const message = createBaseMemberRequest(); - message.address = object.address ?? ""; - message.weight = object.weight ?? ""; - message.metadata = object.metadata ?? ""; + message.address = object.address ?? ''; + message.weight = object.weight ?? ''; + message.metadata = object.metadata ?? ''; return message; }, fromAmino(object: MemberRequestAmino): MemberRequest { @@ -924,9 +924,9 @@ export const MemberRequest = { }, toAmino(message: MemberRequest): MemberRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; - obj.weight = message.weight === "" ? undefined : message.weight; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.address = message.address === '' ? undefined : message.address; + obj.weight = message.weight === '' ? undefined : message.weight; + obj.metadata = message.metadata === '' ? undefined : message.metadata; return obj; }, fromAminoMsg(object: MemberRequestAminoMsg): MemberRequest { @@ -934,7 +934,7 @@ export const MemberRequest = { }, toAminoMsg(message: MemberRequest): MemberRequestAminoMsg { return { - type: "cosmos-sdk/MemberRequest", + type: 'cosmos-sdk/MemberRequest', value: MemberRequest.toAmino(message) }; }, @@ -946,7 +946,7 @@ export const MemberRequest = { }, toProtoMsg(message: MemberRequest): MemberRequestProtoMsg { return { - typeUrl: "/cosmos.group.v1.MemberRequest", + typeUrl: '/cosmos.group.v1.MemberRequest', value: MemberRequest.encode(message).finish() }; } @@ -955,21 +955,21 @@ GlobalDecoderRegistry.register(MemberRequest.typeUrl, MemberRequest); GlobalDecoderRegistry.registerAminoProtoMapping(MemberRequest.aminoType, MemberRequest.typeUrl); function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy { return { - threshold: "", + threshold: '', windows: undefined }; } export const ThresholdDecisionPolicy = { - typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", - aminoType: "cosmos-sdk/ThresholdDecisionPolicy", + typeUrl: '/cosmos.group.v1.ThresholdDecisionPolicy', + aminoType: 'cosmos-sdk/ThresholdDecisionPolicy', is(o: any): o is ThresholdDecisionPolicy { - return o && (o.$typeUrl === ThresholdDecisionPolicy.typeUrl || typeof o.threshold === "string"); + return o && (o.$typeUrl === ThresholdDecisionPolicy.typeUrl || typeof o.threshold === 'string'); }, isAmino(o: any): o is ThresholdDecisionPolicyAmino { - return o && (o.$typeUrl === ThresholdDecisionPolicy.typeUrl || typeof o.threshold === "string"); + return o && (o.$typeUrl === ThresholdDecisionPolicy.typeUrl || typeof o.threshold === 'string'); }, encode(message: ThresholdDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.threshold !== "") { + if (message.threshold !== '') { writer.uint32(10).string(message.threshold); } if (message.windows !== undefined) { @@ -984,22 +984,22 @@ export const ThresholdDecisionPolicy = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.threshold = reader.string(); - break; - case 2: - message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.threshold = reader.string(); + break; + case 2: + message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ThresholdDecisionPolicy { const message = createBaseThresholdDecisionPolicy(); - message.threshold = object.threshold ?? ""; + message.threshold = object.threshold ?? ''; message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined; return message; }, @@ -1015,7 +1015,7 @@ export const ThresholdDecisionPolicy = { }, toAmino(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAmino { const obj: any = {}; - obj.threshold = message.threshold === "" ? undefined : message.threshold; + obj.threshold = message.threshold === '' ? undefined : message.threshold; obj.windows = message.windows ? DecisionPolicyWindows.toAmino(message.windows) : undefined; return obj; }, @@ -1024,7 +1024,7 @@ export const ThresholdDecisionPolicy = { }, toAminoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAminoMsg { return { - type: "cosmos-sdk/ThresholdDecisionPolicy", + type: 'cosmos-sdk/ThresholdDecisionPolicy', value: ThresholdDecisionPolicy.toAmino(message) }; }, @@ -1036,7 +1036,7 @@ export const ThresholdDecisionPolicy = { }, toProtoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyProtoMsg { return { - typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", + typeUrl: '/cosmos.group.v1.ThresholdDecisionPolicy', value: ThresholdDecisionPolicy.encode(message).finish() }; } @@ -1045,21 +1045,21 @@ GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisio GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy { return { - percentage: "", + percentage: '', windows: undefined }; } export const PercentageDecisionPolicy = { - typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", - aminoType: "cosmos-sdk/PercentageDecisionPolicy", + typeUrl: '/cosmos.group.v1.PercentageDecisionPolicy', + aminoType: 'cosmos-sdk/PercentageDecisionPolicy', is(o: any): o is PercentageDecisionPolicy { - return o && (o.$typeUrl === PercentageDecisionPolicy.typeUrl || typeof o.percentage === "string"); + return o && (o.$typeUrl === PercentageDecisionPolicy.typeUrl || typeof o.percentage === 'string'); }, isAmino(o: any): o is PercentageDecisionPolicyAmino { - return o && (o.$typeUrl === PercentageDecisionPolicy.typeUrl || typeof o.percentage === "string"); + return o && (o.$typeUrl === PercentageDecisionPolicy.typeUrl || typeof o.percentage === 'string'); }, encode(message: PercentageDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.percentage !== "") { + if (message.percentage !== '') { writer.uint32(10).string(message.percentage); } if (message.windows !== undefined) { @@ -1074,22 +1074,22 @@ export const PercentageDecisionPolicy = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.percentage = reader.string(); - break; - case 2: - message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.percentage = reader.string(); + break; + case 2: + message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): PercentageDecisionPolicy { const message = createBasePercentageDecisionPolicy(); - message.percentage = object.percentage ?? ""; + message.percentage = object.percentage ?? ''; message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined; return message; }, @@ -1105,7 +1105,7 @@ export const PercentageDecisionPolicy = { }, toAmino(message: PercentageDecisionPolicy): PercentageDecisionPolicyAmino { const obj: any = {}; - obj.percentage = message.percentage === "" ? undefined : message.percentage; + obj.percentage = message.percentage === '' ? undefined : message.percentage; obj.windows = message.windows ? DecisionPolicyWindows.toAmino(message.windows) : undefined; return obj; }, @@ -1114,7 +1114,7 @@ export const PercentageDecisionPolicy = { }, toAminoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyAminoMsg { return { - type: "cosmos-sdk/PercentageDecisionPolicy", + type: 'cosmos-sdk/PercentageDecisionPolicy', value: PercentageDecisionPolicy.toAmino(message) }; }, @@ -1126,7 +1126,7 @@ export const PercentageDecisionPolicy = { }, toProtoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyProtoMsg { return { - typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", + typeUrl: '/cosmos.group.v1.PercentageDecisionPolicy', value: PercentageDecisionPolicy.encode(message).finish() }; } @@ -1140,8 +1140,8 @@ function createBaseDecisionPolicyWindows(): DecisionPolicyWindows { }; } export const DecisionPolicyWindows = { - typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", - aminoType: "cosmos-sdk/DecisionPolicyWindows", + typeUrl: '/cosmos.group.v1.DecisionPolicyWindows', + aminoType: 'cosmos-sdk/DecisionPolicyWindows', is(o: any): o is DecisionPolicyWindows { return o && (o.$typeUrl === DecisionPolicyWindows.typeUrl || Duration.is(o.votingPeriod) && Duration.is(o.minExecutionPeriod)); }, @@ -1164,15 +1164,15 @@ export const DecisionPolicyWindows = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.minExecutionPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.votingPeriod = Duration.decode(reader, reader.uint32()); + break; + case 2: + message.minExecutionPeriod = Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1204,7 +1204,7 @@ export const DecisionPolicyWindows = { }, toAminoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsAminoMsg { return { - type: "cosmos-sdk/DecisionPolicyWindows", + type: 'cosmos-sdk/DecisionPolicyWindows', value: DecisionPolicyWindows.toAmino(message) }; }, @@ -1216,7 +1216,7 @@ export const DecisionPolicyWindows = { }, toProtoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsProtoMsg { return { - typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", + typeUrl: '/cosmos.group.v1.DecisionPolicyWindows', value: DecisionPolicyWindows.encode(message).finish() }; } @@ -1226,36 +1226,36 @@ GlobalDecoderRegistry.registerAminoProtoMapping(DecisionPolicyWindows.aminoType, function createBaseGroupInfo(): GroupInfo { return { id: BigInt(0), - admin: "", - metadata: "", + admin: '', + metadata: '', version: BigInt(0), - totalWeight: "", + totalWeight: '', createdAt: new Date() }; } export const GroupInfo = { - typeUrl: "/cosmos.group.v1.GroupInfo", - aminoType: "cosmos-sdk/GroupInfo", + typeUrl: '/cosmos.group.v1.GroupInfo', + aminoType: 'cosmos-sdk/GroupInfo', is(o: any): o is GroupInfo { - return o && (o.$typeUrl === GroupInfo.typeUrl || typeof o.id === "bigint" && typeof o.admin === "string" && typeof o.metadata === "string" && typeof o.version === "bigint" && typeof o.totalWeight === "string" && Timestamp.is(o.createdAt)); + return o && (o.$typeUrl === GroupInfo.typeUrl || typeof o.id === 'bigint' && typeof o.admin === 'string' && typeof o.metadata === 'string' && typeof o.version === 'bigint' && typeof o.totalWeight === 'string' && Timestamp.is(o.createdAt)); }, isAmino(o: any): o is GroupInfoAmino { - return o && (o.$typeUrl === GroupInfo.typeUrl || typeof o.id === "bigint" && typeof o.admin === "string" && typeof o.metadata === "string" && typeof o.version === "bigint" && typeof o.total_weight === "string" && Timestamp.isAmino(o.created_at)); + return o && (o.$typeUrl === GroupInfo.typeUrl || typeof o.id === 'bigint' && typeof o.admin === 'string' && typeof o.metadata === 'string' && typeof o.version === 'bigint' && typeof o.total_weight === 'string' && Timestamp.isAmino(o.created_at)); }, encode(message: GroupInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.id !== BigInt(0)) { writer.uint32(8).uint64(message.id); } - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(18).string(message.admin); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } if (message.version !== BigInt(0)) { writer.uint32(32).uint64(message.version); } - if (message.totalWeight !== "") { + if (message.totalWeight !== '') { writer.uint32(42).string(message.totalWeight); } if (message.createdAt !== undefined) { @@ -1270,27 +1270,27 @@ export const GroupInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.version = reader.uint64(); - break; - case 5: - message.totalWeight = reader.string(); - break; - case 6: - message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.id = reader.uint64(); + break; + case 2: + message.admin = reader.string(); + break; + case 3: + message.metadata = reader.string(); + break; + case 4: + message.version = reader.uint64(); + break; + case 5: + message.totalWeight = reader.string(); + break; + case 6: + message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1298,10 +1298,10 @@ export const GroupInfo = { fromPartial(object: DeepPartial): GroupInfo { const message = createBaseGroupInfo(); message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.admin = object.admin ?? ""; - message.metadata = object.metadata ?? ""; + message.admin = object.admin ?? ''; + message.metadata = object.metadata ?? ''; message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); - message.totalWeight = object.totalWeight ?? ""; + message.totalWeight = object.totalWeight ?? ''; message.createdAt = object.createdAt ?? undefined; return message; }, @@ -1330,10 +1330,10 @@ export const GroupInfo = { toAmino(message: GroupInfo): GroupInfoAmino { const obj: any = {}; obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; - obj.admin = message.admin === "" ? undefined : message.admin; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.metadata = message.metadata === '' ? undefined : message.metadata; obj.version = message.version !== BigInt(0) ? message.version.toString() : undefined; - obj.total_weight = message.totalWeight === "" ? undefined : message.totalWeight; + obj.total_weight = message.totalWeight === '' ? undefined : message.totalWeight; obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : new Date(); return obj; }, @@ -1342,7 +1342,7 @@ export const GroupInfo = { }, toAminoMsg(message: GroupInfo): GroupInfoAminoMsg { return { - type: "cosmos-sdk/GroupInfo", + type: 'cosmos-sdk/GroupInfo', value: GroupInfo.toAmino(message) }; }, @@ -1354,7 +1354,7 @@ export const GroupInfo = { }, toProtoMsg(message: GroupInfo): GroupInfoProtoMsg { return { - typeUrl: "/cosmos.group.v1.GroupInfo", + typeUrl: '/cosmos.group.v1.GroupInfo', value: GroupInfo.encode(message).finish() }; } @@ -1368,13 +1368,13 @@ function createBaseGroupMember(): GroupMember { }; } export const GroupMember = { - typeUrl: "/cosmos.group.v1.GroupMember", - aminoType: "cosmos-sdk/GroupMember", + typeUrl: '/cosmos.group.v1.GroupMember', + aminoType: 'cosmos-sdk/GroupMember', is(o: any): o is GroupMember { - return o && (o.$typeUrl === GroupMember.typeUrl || typeof o.groupId === "bigint"); + return o && (o.$typeUrl === GroupMember.typeUrl || typeof o.groupId === 'bigint'); }, isAmino(o: any): o is GroupMemberAmino { - return o && (o.$typeUrl === GroupMember.typeUrl || typeof o.group_id === "bigint"); + return o && (o.$typeUrl === GroupMember.typeUrl || typeof o.group_id === 'bigint'); }, encode(message: GroupMember, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.groupId !== BigInt(0)) { @@ -1392,15 +1392,15 @@ export const GroupMember = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - case 2: - message.member = Member.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.groupId = reader.uint64(); + break; + case 2: + message.member = Member.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1432,7 +1432,7 @@ export const GroupMember = { }, toAminoMsg(message: GroupMember): GroupMemberAminoMsg { return { - type: "cosmos-sdk/GroupMember", + type: 'cosmos-sdk/GroupMember', value: GroupMember.toAmino(message) }; }, @@ -1444,7 +1444,7 @@ export const GroupMember = { }, toProtoMsg(message: GroupMember): GroupMemberProtoMsg { return { - typeUrl: "/cosmos.group.v1.GroupMember", + typeUrl: '/cosmos.group.v1.GroupMember', value: GroupMember.encode(message).finish() }; } @@ -1453,35 +1453,35 @@ GlobalDecoderRegistry.register(GroupMember.typeUrl, GroupMember); GlobalDecoderRegistry.registerAminoProtoMapping(GroupMember.aminoType, GroupMember.typeUrl); function createBaseGroupPolicyInfo(): GroupPolicyInfo { return { - address: "", + address: '', groupId: BigInt(0), - admin: "", - metadata: "", + admin: '', + metadata: '', version: BigInt(0), decisionPolicy: undefined, createdAt: new Date() }; } export const GroupPolicyInfo = { - typeUrl: "/cosmos.group.v1.GroupPolicyInfo", - aminoType: "cosmos-sdk/GroupPolicyInfo", + typeUrl: '/cosmos.group.v1.GroupPolicyInfo', + aminoType: 'cosmos-sdk/GroupPolicyInfo', is(o: any): o is GroupPolicyInfo { - return o && (o.$typeUrl === GroupPolicyInfo.typeUrl || typeof o.address === "string" && typeof o.groupId === "bigint" && typeof o.admin === "string" && typeof o.metadata === "string" && typeof o.version === "bigint" && Timestamp.is(o.createdAt)); + return o && (o.$typeUrl === GroupPolicyInfo.typeUrl || typeof o.address === 'string' && typeof o.groupId === 'bigint' && typeof o.admin === 'string' && typeof o.metadata === 'string' && typeof o.version === 'bigint' && Timestamp.is(o.createdAt)); }, isAmino(o: any): o is GroupPolicyInfoAmino { - return o && (o.$typeUrl === GroupPolicyInfo.typeUrl || typeof o.address === "string" && typeof o.group_id === "bigint" && typeof o.admin === "string" && typeof o.metadata === "string" && typeof o.version === "bigint" && Timestamp.isAmino(o.created_at)); + return o && (o.$typeUrl === GroupPolicyInfo.typeUrl || typeof o.address === 'string' && typeof o.group_id === 'bigint' && typeof o.admin === 'string' && typeof o.metadata === 'string' && typeof o.version === 'bigint' && Timestamp.isAmino(o.created_at)); }, encode(message: GroupPolicyInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.groupId !== BigInt(0)) { writer.uint32(16).uint64(message.groupId); } - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(26).string(message.admin); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(34).string(message.metadata); } if (message.version !== BigInt(0)) { @@ -1502,40 +1502,40 @@ export const GroupPolicyInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.admin = reader.string(); - break; - case 4: - message.metadata = reader.string(); - break; - case 5: - message.version = reader.uint64(); - break; - case 6: - message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 7: - message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.groupId = reader.uint64(); + break; + case 3: + message.admin = reader.string(); + break; + case 4: + message.metadata = reader.string(); + break; + case 5: + message.version = reader.uint64(); + break; + case 6: + message.decisionPolicy = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 7: + message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): GroupPolicyInfo { const message = createBaseGroupPolicyInfo(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.admin = object.admin ?? ""; - message.metadata = object.metadata ?? ""; + message.admin = object.admin ?? ''; + message.metadata = object.metadata ?? ''; message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? GlobalDecoderRegistry.fromPartial(object.decisionPolicy) : undefined; message.createdAt = object.createdAt ?? undefined; @@ -1568,10 +1568,10 @@ export const GroupPolicyInfo = { }, toAmino(message: GroupPolicyInfo): GroupPolicyInfoAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.group_id = message.groupId !== BigInt(0) ? message.groupId.toString() : undefined; - obj.admin = message.admin === "" ? undefined : message.admin; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.metadata = message.metadata === '' ? undefined : message.metadata; obj.version = message.version !== BigInt(0) ? message.version.toString() : undefined; obj.decision_policy = message.decisionPolicy ? GlobalDecoderRegistry.toAminoMsg(message.decisionPolicy) : undefined; obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : new Date(); @@ -1582,7 +1582,7 @@ export const GroupPolicyInfo = { }, toAminoMsg(message: GroupPolicyInfo): GroupPolicyInfoAminoMsg { return { - type: "cosmos-sdk/GroupPolicyInfo", + type: 'cosmos-sdk/GroupPolicyInfo', value: GroupPolicyInfo.toAmino(message) }; }, @@ -1594,7 +1594,7 @@ export const GroupPolicyInfo = { }, toProtoMsg(message: GroupPolicyInfo): GroupPolicyInfoProtoMsg { return { - typeUrl: "/cosmos.group.v1.GroupPolicyInfo", + typeUrl: '/cosmos.group.v1.GroupPolicyInfo', value: GroupPolicyInfo.encode(message).finish() }; } @@ -1604,8 +1604,8 @@ GlobalDecoderRegistry.registerAminoProtoMapping(GroupPolicyInfo.aminoType, Group function createBaseProposal(): Proposal { return { id: BigInt(0), - groupPolicyAddress: "", - metadata: "", + groupPolicyAddress: '', + metadata: '', proposers: [], submitTime: new Date(), groupVersion: BigInt(0), @@ -1615,27 +1615,27 @@ function createBaseProposal(): Proposal { votingPeriodEnd: new Date(), executorResult: 0, messages: [], - title: "", - summary: "" + title: '', + summary: '' }; } export const Proposal = { - typeUrl: "/cosmos.group.v1.Proposal", - aminoType: "cosmos-sdk/Proposal", + typeUrl: '/cosmos.group.v1.Proposal', + aminoType: 'cosmos-sdk/Proposal', is(o: any): o is Proposal { - return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === "bigint" && typeof o.groupPolicyAddress === "string" && typeof o.metadata === "string" && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === "string") && Timestamp.is(o.submitTime) && typeof o.groupVersion === "bigint" && typeof o.groupPolicyVersion === "bigint" && isSet(o.status) && TallyResult.is(o.finalTallyResult) && Timestamp.is(o.votingPeriodEnd) && isSet(o.executorResult) && Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && typeof o.title === "string" && typeof o.summary === "string"); + return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === 'bigint' && typeof o.groupPolicyAddress === 'string' && typeof o.metadata === 'string' && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === 'string') && Timestamp.is(o.submitTime) && typeof o.groupVersion === 'bigint' && typeof o.groupPolicyVersion === 'bigint' && isSet(o.status) && TallyResult.is(o.finalTallyResult) && Timestamp.is(o.votingPeriodEnd) && isSet(o.executorResult) && Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && typeof o.title === 'string' && typeof o.summary === 'string'); }, isAmino(o: any): o is ProposalAmino { - return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === "bigint" && typeof o.group_policy_address === "string" && typeof o.metadata === "string" && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === "string") && Timestamp.isAmino(o.submit_time) && typeof o.group_version === "bigint" && typeof o.group_policy_version === "bigint" && isSet(o.status) && TallyResult.isAmino(o.final_tally_result) && Timestamp.isAmino(o.voting_period_end) && isSet(o.executor_result) && Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && typeof o.title === "string" && typeof o.summary === "string"); + return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === 'bigint' && typeof o.group_policy_address === 'string' && typeof o.metadata === 'string' && Array.isArray(o.proposers) && (!o.proposers.length || typeof o.proposers[0] === 'string') && Timestamp.isAmino(o.submit_time) && typeof o.group_version === 'bigint' && typeof o.group_policy_version === 'bigint' && isSet(o.status) && TallyResult.isAmino(o.final_tally_result) && Timestamp.isAmino(o.voting_period_end) && isSet(o.executor_result) && Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && typeof o.title === 'string' && typeof o.summary === 'string'); }, encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.id !== BigInt(0)) { writer.uint32(8).uint64(message.id); } - if (message.groupPolicyAddress !== "") { + if (message.groupPolicyAddress !== '') { writer.uint32(18).string(message.groupPolicyAddress); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(26).string(message.metadata); } for (const v of message.proposers) { @@ -1665,10 +1665,10 @@ export const Proposal = { for (const v of message.messages) { Any.encode(v!, writer.uint32(98).fork()).ldelim(); } - if (message.title !== "") { + if (message.title !== '') { writer.uint32(106).string(message.title); } - if (message.summary !== "") { + if (message.summary !== '') { writer.uint32(114).string(message.summary); } return writer; @@ -1680,51 +1680,51 @@ export const Proposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.groupPolicyAddress = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.proposers.push(reader.string()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.groupVersion = reader.uint64(); - break; - case 7: - message.groupPolicyVersion = reader.uint64(); - break; - case 8: - message.status = (reader.int32() as any); - break; - case 9: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 10: - message.votingPeriodEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 11: - message.executorResult = (reader.int32() as any); - break; - case 12: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 13: - message.title = reader.string(); - break; - case 14: - message.summary = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.id = reader.uint64(); + break; + case 2: + message.groupPolicyAddress = reader.string(); + break; + case 3: + message.metadata = reader.string(); + break; + case 4: + message.proposers.push(reader.string()); + break; + case 5: + message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 6: + message.groupVersion = reader.uint64(); + break; + case 7: + message.groupPolicyVersion = reader.uint64(); + break; + case 8: + message.status = (reader.int32() as any); + break; + case 9: + message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); + break; + case 10: + message.votingPeriodEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 11: + message.executorResult = (reader.int32() as any); + break; + case 12: + message.messages.push(Any.decode(reader, reader.uint32())); + break; + case 13: + message.title = reader.string(); + break; + case 14: + message.summary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1732,8 +1732,8 @@ export const Proposal = { fromPartial(object: DeepPartial): Proposal { const message = createBaseProposal(); message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.groupPolicyAddress = object.groupPolicyAddress ?? ""; - message.metadata = object.metadata ?? ""; + message.groupPolicyAddress = object.groupPolicyAddress ?? ''; + message.metadata = object.metadata ?? ''; message.proposers = object.proposers?.map(e => e) || []; message.submitTime = object.submitTime ?? undefined; message.groupVersion = object.groupVersion !== undefined && object.groupVersion !== null ? BigInt(object.groupVersion.toString()) : BigInt(0); @@ -1743,8 +1743,8 @@ export const Proposal = { message.votingPeriodEnd = object.votingPeriodEnd ?? undefined; message.executorResult = object.executorResult ?? 0; message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; - message.title = object.title ?? ""; - message.summary = object.summary ?? ""; + message.title = object.title ?? ''; + message.summary = object.summary ?? ''; return message; }, fromAmino(object: ProposalAmino): Proposal { @@ -1792,8 +1792,8 @@ export const Proposal = { toAmino(message: Proposal): ProposalAmino { const obj: any = {}; obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined; - obj.group_policy_address = message.groupPolicyAddress === "" ? undefined : message.groupPolicyAddress; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.group_policy_address = message.groupPolicyAddress === '' ? undefined : message.groupPolicyAddress; + obj.metadata = message.metadata === '' ? undefined : message.metadata; if (message.proposers) { obj.proposers = message.proposers.map(e => e); } else { @@ -1811,8 +1811,8 @@ export const Proposal = { } else { obj.messages = message.messages; } - obj.title = message.title === "" ? undefined : message.title; - obj.summary = message.summary === "" ? undefined : message.summary; + obj.title = message.title === '' ? undefined : message.title; + obj.summary = message.summary === '' ? undefined : message.summary; return obj; }, fromAminoMsg(object: ProposalAminoMsg): Proposal { @@ -1820,7 +1820,7 @@ export const Proposal = { }, toAminoMsg(message: Proposal): ProposalAminoMsg { return { - type: "cosmos-sdk/Proposal", + type: 'cosmos-sdk/Proposal', value: Proposal.toAmino(message) }; }, @@ -1832,7 +1832,7 @@ export const Proposal = { }, toProtoMsg(message: Proposal): ProposalProtoMsg { return { - typeUrl: "/cosmos.group.v1.Proposal", + typeUrl: '/cosmos.group.v1.Proposal', value: Proposal.encode(message).finish() }; } @@ -1841,32 +1841,32 @@ GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { - yesCount: "", - abstainCount: "", - noCount: "", - noWithVetoCount: "" + yesCount: '', + abstainCount: '', + noCount: '', + noWithVetoCount: '' }; } export const TallyResult = { - typeUrl: "/cosmos.group.v1.TallyResult", - aminoType: "cosmos-sdk/TallyResult", + typeUrl: '/cosmos.group.v1.TallyResult', + aminoType: 'cosmos-sdk/TallyResult', is(o: any): o is TallyResult { - return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yesCount === "string" && typeof o.abstainCount === "string" && typeof o.noCount === "string" && typeof o.noWithVetoCount === "string"); + return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yesCount === 'string' && typeof o.abstainCount === 'string' && typeof o.noCount === 'string' && typeof o.noWithVetoCount === 'string'); }, isAmino(o: any): o is TallyResultAmino { - return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes_count === "string" && typeof o.abstain_count === "string" && typeof o.no_count === "string" && typeof o.no_with_veto_count === "string"); + return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes_count === 'string' && typeof o.abstain_count === 'string' && typeof o.no_count === 'string' && typeof o.no_with_veto_count === 'string'); }, encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.yesCount !== "") { + if (message.yesCount !== '') { writer.uint32(10).string(message.yesCount); } - if (message.abstainCount !== "") { + if (message.abstainCount !== '') { writer.uint32(18).string(message.abstainCount); } - if (message.noCount !== "") { + if (message.noCount !== '') { writer.uint32(26).string(message.noCount); } - if (message.noWithVetoCount !== "") { + if (message.noWithVetoCount !== '') { writer.uint32(34).string(message.noWithVetoCount); } return writer; @@ -1878,31 +1878,31 @@ export const TallyResult = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.yesCount = reader.string(); - break; - case 2: - message.abstainCount = reader.string(); - break; - case 3: - message.noCount = reader.string(); - break; - case 4: - message.noWithVetoCount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.yesCount = reader.string(); + break; + case 2: + message.abstainCount = reader.string(); + break; + case 3: + message.noCount = reader.string(); + break; + case 4: + message.noWithVetoCount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): TallyResult { const message = createBaseTallyResult(); - message.yesCount = object.yesCount ?? ""; - message.abstainCount = object.abstainCount ?? ""; - message.noCount = object.noCount ?? ""; - message.noWithVetoCount = object.noWithVetoCount ?? ""; + message.yesCount = object.yesCount ?? ''; + message.abstainCount = object.abstainCount ?? ''; + message.noCount = object.noCount ?? ''; + message.noWithVetoCount = object.noWithVetoCount ?? ''; return message; }, fromAmino(object: TallyResultAmino): TallyResult { @@ -1923,10 +1923,10 @@ export const TallyResult = { }, toAmino(message: TallyResult): TallyResultAmino { const obj: any = {}; - obj.yes_count = message.yesCount === "" ? undefined : message.yesCount; - obj.abstain_count = message.abstainCount === "" ? undefined : message.abstainCount; - obj.no_count = message.noCount === "" ? undefined : message.noCount; - obj.no_with_veto_count = message.noWithVetoCount === "" ? undefined : message.noWithVetoCount; + obj.yes_count = message.yesCount === '' ? undefined : message.yesCount; + obj.abstain_count = message.abstainCount === '' ? undefined : message.abstainCount; + obj.no_count = message.noCount === '' ? undefined : message.noCount; + obj.no_with_veto_count = message.noWithVetoCount === '' ? undefined : message.noWithVetoCount; return obj; }, fromAminoMsg(object: TallyResultAminoMsg): TallyResult { @@ -1934,7 +1934,7 @@ export const TallyResult = { }, toAminoMsg(message: TallyResult): TallyResultAminoMsg { return { - type: "cosmos-sdk/TallyResult", + type: 'cosmos-sdk/TallyResult', value: TallyResult.toAmino(message) }; }, @@ -1946,7 +1946,7 @@ export const TallyResult = { }, toProtoMsg(message: TallyResult): TallyResultProtoMsg { return { - typeUrl: "/cosmos.group.v1.TallyResult", + typeUrl: '/cosmos.group.v1.TallyResult', value: TallyResult.encode(message).finish() }; } @@ -1956,32 +1956,32 @@ GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResu function createBaseVote(): Vote { return { proposalId: BigInt(0), - voter: "", + voter: '', option: 0, - metadata: "", + metadata: '', submitTime: new Date() }; } export const Vote = { - typeUrl: "/cosmos.group.v1.Vote", - aminoType: "cosmos-sdk/Vote", + typeUrl: '/cosmos.group.v1.Vote', + aminoType: 'cosmos-sdk/Vote', is(o: any): o is Vote { - return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && isSet(o.option) && typeof o.metadata === "string" && Timestamp.is(o.submitTime)); + return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && typeof o.metadata === 'string' && Timestamp.is(o.submitTime)); }, isAmino(o: any): o is VoteAmino { - return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && isSet(o.option) && typeof o.metadata === "string" && Timestamp.isAmino(o.submit_time)); + return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === 'bigint' && typeof o.voter === 'string' && isSet(o.option) && typeof o.metadata === 'string' && Timestamp.isAmino(o.submit_time)); }, encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.proposalId !== BigInt(0)) { writer.uint32(8).uint64(message.proposalId); } - if (message.voter !== "") { + if (message.voter !== '') { writer.uint32(18).string(message.voter); } if (message.option !== 0) { writer.uint32(24).int32(message.option); } - if (message.metadata !== "") { + if (message.metadata !== '') { writer.uint32(34).string(message.metadata); } if (message.submitTime !== undefined) { @@ -1996,24 +1996,24 @@ export const Vote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.metadata = reader.string(); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = (reader.int32() as any); + break; + case 4: + message.metadata = reader.string(); + break; + case 5: + message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2021,9 +2021,9 @@ export const Vote = { fromPartial(object: DeepPartial): Vote { const message = createBaseVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; + message.voter = object.voter ?? ''; message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; + message.metadata = object.metadata ?? ''; message.submitTime = object.submitTime ?? undefined; return message; }, @@ -2049,9 +2049,9 @@ export const Vote = { toAmino(message: Vote): VoteAmino { const obj: any = {}; obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId.toString() : undefined; - obj.voter = message.voter === "" ? undefined : message.voter; + obj.voter = message.voter === '' ? undefined : message.voter; obj.option = message.option === 0 ? undefined : message.option; - obj.metadata = message.metadata === "" ? undefined : message.metadata; + obj.metadata = message.metadata === '' ? undefined : message.metadata; obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : new Date(); return obj; }, @@ -2060,7 +2060,7 @@ export const Vote = { }, toAminoMsg(message: Vote): VoteAminoMsg { return { - type: "cosmos-sdk/Vote", + type: 'cosmos-sdk/Vote', value: Vote.toAmino(message) }; }, @@ -2072,7 +2072,7 @@ export const Vote = { }, toProtoMsg(message: Vote): VoteProtoMsg { return { - typeUrl: "/cosmos.group.v1.Vote", + typeUrl: '/cosmos.group.v1.Vote', value: Vote.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/ics23/v1/proofs.ts b/libs/cosmos-types/cosmos/ics23/v1/proofs.ts index c36d57da..49ae3311 100644 --- a/libs/cosmos-types/cosmos/ics23/v1/proofs.ts +++ b/libs/cosmos-types/cosmos/ics23/v1/proofs.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { base64FromBytes, bytesFromBase64, DeepPartial, isSet } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; export enum HashOp { /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ NO_HASH = 0, @@ -19,67 +19,67 @@ export enum HashOp { export const HashOpAmino = HashOp; export function hashOpFromJSON(object: any): HashOp { switch (object) { - case 0: - case "NO_HASH": - return HashOp.NO_HASH; - case 1: - case "SHA256": - return HashOp.SHA256; - case 2: - case "SHA512": - return HashOp.SHA512; - case 3: - case "KECCAK256": - return HashOp.KECCAK256; - case 4: - case "RIPEMD160": - return HashOp.RIPEMD160; - case 5: - case "BITCOIN": - return HashOp.BITCOIN; - case 6: - case "SHA512_256": - return HashOp.SHA512_256; - case 7: - case "BLAKE2B_512": - return HashOp.BLAKE2B_512; - case 8: - case "BLAKE2S_256": - return HashOp.BLAKE2S_256; - case 9: - case "BLAKE3": - return HashOp.BLAKE3; - case -1: - case "UNRECOGNIZED": - default: - return HashOp.UNRECOGNIZED; + case 0: + case 'NO_HASH': + return HashOp.NO_HASH; + case 1: + case 'SHA256': + return HashOp.SHA256; + case 2: + case 'SHA512': + return HashOp.SHA512; + case 3: + case 'KECCAK256': + return HashOp.KECCAK256; + case 4: + case 'RIPEMD160': + return HashOp.RIPEMD160; + case 5: + case 'BITCOIN': + return HashOp.BITCOIN; + case 6: + case 'SHA512_256': + return HashOp.SHA512_256; + case 7: + case 'BLAKE2B_512': + return HashOp.BLAKE2B_512; + case 8: + case 'BLAKE2S_256': + return HashOp.BLAKE2S_256; + case 9: + case 'BLAKE3': + return HashOp.BLAKE3; + case -1: + case 'UNRECOGNIZED': + default: + return HashOp.UNRECOGNIZED; } } export function hashOpToJSON(object: HashOp): string { switch (object) { - case HashOp.NO_HASH: - return "NO_HASH"; - case HashOp.SHA256: - return "SHA256"; - case HashOp.SHA512: - return "SHA512"; - case HashOp.KECCAK256: - return "KECCAK256"; - case HashOp.RIPEMD160: - return "RIPEMD160"; - case HashOp.BITCOIN: - return "BITCOIN"; - case HashOp.SHA512_256: - return "SHA512_256"; - case HashOp.BLAKE2B_512: - return "BLAKE2B_512"; - case HashOp.BLAKE2S_256: - return "BLAKE2S_256"; - case HashOp.BLAKE3: - return "BLAKE3"; - case HashOp.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case HashOp.NO_HASH: + return 'NO_HASH'; + case HashOp.SHA256: + return 'SHA256'; + case HashOp.SHA512: + return 'SHA512'; + case HashOp.KECCAK256: + return 'KECCAK256'; + case HashOp.RIPEMD160: + return 'RIPEMD160'; + case HashOp.BITCOIN: + return 'BITCOIN'; + case HashOp.SHA512_256: + return 'SHA512_256'; + case HashOp.BLAKE2B_512: + return 'BLAKE2B_512'; + case HashOp.BLAKE2S_256: + return 'BLAKE2S_256'; + case HashOp.BLAKE3: + return 'BLAKE3'; + case HashOp.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -112,62 +112,62 @@ export enum LengthOp { export const LengthOpAmino = LengthOp; export function lengthOpFromJSON(object: any): LengthOp { switch (object) { - case 0: - case "NO_PREFIX": - return LengthOp.NO_PREFIX; - case 1: - case "VAR_PROTO": - return LengthOp.VAR_PROTO; - case 2: - case "VAR_RLP": - return LengthOp.VAR_RLP; - case 3: - case "FIXED32_BIG": - return LengthOp.FIXED32_BIG; - case 4: - case "FIXED32_LITTLE": - return LengthOp.FIXED32_LITTLE; - case 5: - case "FIXED64_BIG": - return LengthOp.FIXED64_BIG; - case 6: - case "FIXED64_LITTLE": - return LengthOp.FIXED64_LITTLE; - case 7: - case "REQUIRE_32_BYTES": - return LengthOp.REQUIRE_32_BYTES; - case 8: - case "REQUIRE_64_BYTES": - return LengthOp.REQUIRE_64_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return LengthOp.UNRECOGNIZED; + case 0: + case 'NO_PREFIX': + return LengthOp.NO_PREFIX; + case 1: + case 'VAR_PROTO': + return LengthOp.VAR_PROTO; + case 2: + case 'VAR_RLP': + return LengthOp.VAR_RLP; + case 3: + case 'FIXED32_BIG': + return LengthOp.FIXED32_BIG; + case 4: + case 'FIXED32_LITTLE': + return LengthOp.FIXED32_LITTLE; + case 5: + case 'FIXED64_BIG': + return LengthOp.FIXED64_BIG; + case 6: + case 'FIXED64_LITTLE': + return LengthOp.FIXED64_LITTLE; + case 7: + case 'REQUIRE_32_BYTES': + return LengthOp.REQUIRE_32_BYTES; + case 8: + case 'REQUIRE_64_BYTES': + return LengthOp.REQUIRE_64_BYTES; + case -1: + case 'UNRECOGNIZED': + default: + return LengthOp.UNRECOGNIZED; } } export function lengthOpToJSON(object: LengthOp): string { switch (object) { - case LengthOp.NO_PREFIX: - return "NO_PREFIX"; - case LengthOp.VAR_PROTO: - return "VAR_PROTO"; - case LengthOp.VAR_RLP: - return "VAR_RLP"; - case LengthOp.FIXED32_BIG: - return "FIXED32_BIG"; - case LengthOp.FIXED32_LITTLE: - return "FIXED32_LITTLE"; - case LengthOp.FIXED64_BIG: - return "FIXED64_BIG"; - case LengthOp.FIXED64_LITTLE: - return "FIXED64_LITTLE"; - case LengthOp.REQUIRE_32_BYTES: - return "REQUIRE_32_BYTES"; - case LengthOp.REQUIRE_64_BYTES: - return "REQUIRE_64_BYTES"; - case LengthOp.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case LengthOp.NO_PREFIX: + return 'NO_PREFIX'; + case LengthOp.VAR_PROTO: + return 'VAR_PROTO'; + case LengthOp.VAR_RLP: + return 'VAR_RLP'; + case LengthOp.FIXED32_BIG: + return 'FIXED32_BIG'; + case LengthOp.FIXED32_LITTLE: + return 'FIXED32_LITTLE'; + case LengthOp.FIXED64_BIG: + return 'FIXED64_BIG'; + case LengthOp.FIXED64_LITTLE: + return 'FIXED64_LITTLE'; + case LengthOp.REQUIRE_32_BYTES: + return 'REQUIRE_32_BYTES'; + case LengthOp.REQUIRE_64_BYTES: + return 'REQUIRE_64_BYTES'; + case LengthOp.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -198,7 +198,7 @@ export interface ExistenceProof { path: InnerOp[]; } export interface ExistenceProofProtoMsg { - typeUrl: "/cosmos.ics23.v1.ExistenceProof"; + typeUrl: '/cosmos.ics23.v1.ExistenceProof'; value: Uint8Array; } /** @@ -229,7 +229,7 @@ export interface ExistenceProofAmino { path: InnerOpAmino[]; } export interface ExistenceProofAminoMsg { - type: "cosmos-sdk/ExistenceProof"; + type: 'cosmos-sdk/ExistenceProof'; value: ExistenceProofAmino; } /** @@ -244,7 +244,7 @@ export interface NonExistenceProof { right?: ExistenceProof; } export interface NonExistenceProofProtoMsg { - typeUrl: "/cosmos.ics23.v1.NonExistenceProof"; + typeUrl: '/cosmos.ics23.v1.NonExistenceProof'; value: Uint8Array; } /** @@ -259,7 +259,7 @@ export interface NonExistenceProofAmino { right?: ExistenceProofAmino; } export interface NonExistenceProofAminoMsg { - type: "cosmos-sdk/NonExistenceProof"; + type: 'cosmos-sdk/NonExistenceProof'; value: NonExistenceProofAmino; } /** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ @@ -270,7 +270,7 @@ export interface CommitmentProof { compressed?: CompressedBatchProof; } export interface CommitmentProofProtoMsg { - typeUrl: "/cosmos.ics23.v1.CommitmentProof"; + typeUrl: '/cosmos.ics23.v1.CommitmentProof'; value: Uint8Array; } /** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ @@ -281,7 +281,7 @@ export interface CommitmentProofAmino { compressed?: CompressedBatchProofAmino; } export interface CommitmentProofAminoMsg { - type: "cosmos-sdk/CommitmentProof"; + type: 'cosmos-sdk/CommitmentProof'; value: CommitmentProofAmino; } /** @@ -312,7 +312,7 @@ export interface LeafOp { prefix: Uint8Array; } export interface LeafOpProtoMsg { - typeUrl: "/cosmos.ics23.v1.LeafOp"; + typeUrl: '/cosmos.ics23.v1.LeafOp'; value: Uint8Array; } /** @@ -343,7 +343,7 @@ export interface LeafOpAmino { prefix: string; } export interface LeafOpAminoMsg { - type: "cosmos-sdk/LeafOp"; + type: 'cosmos-sdk/LeafOp'; value: LeafOpAmino; } /** @@ -369,7 +369,7 @@ export interface InnerOp { suffix: Uint8Array; } export interface InnerOpProtoMsg { - typeUrl: "/cosmos.ics23.v1.InnerOp"; + typeUrl: '/cosmos.ics23.v1.InnerOp'; value: Uint8Array; } /** @@ -395,7 +395,7 @@ export interface InnerOpAmino { suffix: string; } export interface InnerOpAminoMsg { - type: "cosmos-sdk/InnerOp"; + type: 'cosmos-sdk/InnerOp'; value: InnerOpAmino; } /** @@ -429,7 +429,7 @@ export interface ProofSpec { prehashKeyBeforeComparison: boolean; } export interface ProofSpecProtoMsg { - typeUrl: "/cosmos.ics23.v1.ProofSpec"; + typeUrl: '/cosmos.ics23.v1.ProofSpec'; value: Uint8Array; } /** @@ -463,7 +463,7 @@ export interface ProofSpecAmino { prehash_key_before_comparison: boolean; } export interface ProofSpecAminoMsg { - type: "cosmos-sdk/ProofSpec"; + type: 'cosmos-sdk/ProofSpec'; value: ProofSpecAmino; } /** @@ -492,7 +492,7 @@ export interface InnerSpec { hash: HashOp; } export interface InnerSpecProtoMsg { - typeUrl: "/cosmos.ics23.v1.InnerSpec"; + typeUrl: '/cosmos.ics23.v1.InnerSpec'; value: Uint8Array; } /** @@ -521,7 +521,7 @@ export interface InnerSpecAmino { hash: HashOp; } export interface InnerSpecAminoMsg { - type: "cosmos-sdk/InnerSpec"; + type: 'cosmos-sdk/InnerSpec'; value: InnerSpecAmino; } /** BatchProof is a group of multiple proof types than can be compressed */ @@ -529,7 +529,7 @@ export interface BatchProof { entries: BatchEntry[]; } export interface BatchProofProtoMsg { - typeUrl: "/cosmos.ics23.v1.BatchProof"; + typeUrl: '/cosmos.ics23.v1.BatchProof'; value: Uint8Array; } /** BatchProof is a group of multiple proof types than can be compressed */ @@ -537,7 +537,7 @@ export interface BatchProofAmino { entries: BatchEntryAmino[]; } export interface BatchProofAminoMsg { - type: "cosmos-sdk/BatchProof"; + type: 'cosmos-sdk/BatchProof'; value: BatchProofAmino; } /** Use BatchEntry not CommitmentProof, to avoid recursion */ @@ -546,7 +546,7 @@ export interface BatchEntry { nonexist?: NonExistenceProof; } export interface BatchEntryProtoMsg { - typeUrl: "/cosmos.ics23.v1.BatchEntry"; + typeUrl: '/cosmos.ics23.v1.BatchEntry'; value: Uint8Array; } /** Use BatchEntry not CommitmentProof, to avoid recursion */ @@ -555,7 +555,7 @@ export interface BatchEntryAmino { nonexist?: NonExistenceProofAmino; } export interface BatchEntryAminoMsg { - type: "cosmos-sdk/BatchEntry"; + type: 'cosmos-sdk/BatchEntry'; value: BatchEntryAmino; } export interface CompressedBatchProof { @@ -563,7 +563,7 @@ export interface CompressedBatchProof { lookupInners: InnerOp[]; } export interface CompressedBatchProofProtoMsg { - typeUrl: "/cosmos.ics23.v1.CompressedBatchProof"; + typeUrl: '/cosmos.ics23.v1.CompressedBatchProof'; value: Uint8Array; } export interface CompressedBatchProofAmino { @@ -571,7 +571,7 @@ export interface CompressedBatchProofAmino { lookup_inners: InnerOpAmino[]; } export interface CompressedBatchProofAminoMsg { - type: "cosmos-sdk/CompressedBatchProof"; + type: 'cosmos-sdk/CompressedBatchProof'; value: CompressedBatchProofAmino; } /** Use BatchEntry not CommitmentProof, to avoid recursion */ @@ -580,7 +580,7 @@ export interface CompressedBatchEntry { nonexist?: CompressedNonExistenceProof; } export interface CompressedBatchEntryProtoMsg { - typeUrl: "/cosmos.ics23.v1.CompressedBatchEntry"; + typeUrl: '/cosmos.ics23.v1.CompressedBatchEntry'; value: Uint8Array; } /** Use BatchEntry not CommitmentProof, to avoid recursion */ @@ -589,7 +589,7 @@ export interface CompressedBatchEntryAmino { nonexist?: CompressedNonExistenceProofAmino; } export interface CompressedBatchEntryAminoMsg { - type: "cosmos-sdk/CompressedBatchEntry"; + type: 'cosmos-sdk/CompressedBatchEntry'; value: CompressedBatchEntryAmino; } export interface CompressedExistenceProof { @@ -600,7 +600,7 @@ export interface CompressedExistenceProof { path: number[]; } export interface CompressedExistenceProofProtoMsg { - typeUrl: "/cosmos.ics23.v1.CompressedExistenceProof"; + typeUrl: '/cosmos.ics23.v1.CompressedExistenceProof'; value: Uint8Array; } export interface CompressedExistenceProofAmino { @@ -611,7 +611,7 @@ export interface CompressedExistenceProofAmino { path: number[]; } export interface CompressedExistenceProofAminoMsg { - type: "cosmos-sdk/CompressedExistenceProof"; + type: 'cosmos-sdk/CompressedExistenceProof'; value: CompressedExistenceProofAmino; } export interface CompressedNonExistenceProof { @@ -621,7 +621,7 @@ export interface CompressedNonExistenceProof { right?: CompressedExistenceProof; } export interface CompressedNonExistenceProofProtoMsg { - typeUrl: "/cosmos.ics23.v1.CompressedNonExistenceProof"; + typeUrl: '/cosmos.ics23.v1.CompressedNonExistenceProof'; value: Uint8Array; } export interface CompressedNonExistenceProofAmino { @@ -631,7 +631,7 @@ export interface CompressedNonExistenceProofAmino { right?: CompressedExistenceProofAmino; } export interface CompressedNonExistenceProofAminoMsg { - type: "cosmos-sdk/CompressedNonExistenceProof"; + type: 'cosmos-sdk/CompressedNonExistenceProof'; value: CompressedNonExistenceProofAmino; } function createBaseExistenceProof(): ExistenceProof { @@ -643,13 +643,13 @@ function createBaseExistenceProof(): ExistenceProof { }; } export const ExistenceProof = { - typeUrl: "/cosmos.ics23.v1.ExistenceProof", - aminoType: "cosmos-sdk/ExistenceProof", + typeUrl: '/cosmos.ics23.v1.ExistenceProof', + aminoType: 'cosmos-sdk/ExistenceProof', is(o: any): o is ExistenceProof { - return o && (o.$typeUrl === ExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string") && Array.isArray(o.path) && (!o.path.length || InnerOp.is(o.path[0]))); + return o && (o.$typeUrl === ExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string') && Array.isArray(o.path) && (!o.path.length || InnerOp.is(o.path[0]))); }, isAmino(o: any): o is ExistenceProofAmino { - return o && (o.$typeUrl === ExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string") && Array.isArray(o.path) && (!o.path.length || InnerOp.isAmino(o.path[0]))); + return o && (o.$typeUrl === ExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string') && Array.isArray(o.path) && (!o.path.length || InnerOp.isAmino(o.path[0]))); }, encode(message: ExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -673,21 +673,21 @@ export const ExistenceProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - message.path.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.leaf = LeafOp.decode(reader, reader.uint32()); + break; + case 4: + message.path.push(InnerOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -731,7 +731,7 @@ export const ExistenceProof = { }, toAminoMsg(message: ExistenceProof): ExistenceProofAminoMsg { return { - type: "cosmos-sdk/ExistenceProof", + type: 'cosmos-sdk/ExistenceProof', value: ExistenceProof.toAmino(message) }; }, @@ -743,7 +743,7 @@ export const ExistenceProof = { }, toProtoMsg(message: ExistenceProof): ExistenceProofProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.ExistenceProof", + typeUrl: '/cosmos.ics23.v1.ExistenceProof', value: ExistenceProof.encode(message).finish() }; } @@ -758,13 +758,13 @@ function createBaseNonExistenceProof(): NonExistenceProof { }; } export const NonExistenceProof = { - typeUrl: "/cosmos.ics23.v1.NonExistenceProof", - aminoType: "cosmos-sdk/NonExistenceProof", + typeUrl: '/cosmos.ics23.v1.NonExistenceProof', + aminoType: 'cosmos-sdk/NonExistenceProof', is(o: any): o is NonExistenceProof { - return o && (o.$typeUrl === NonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === NonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is NonExistenceProofAmino { - return o && (o.$typeUrl === NonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === NonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: NonExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -785,18 +785,18 @@ export const NonExistenceProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = ExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = ExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + case 2: + message.left = ExistenceProof.decode(reader, reader.uint32()); + break; + case 3: + message.right = ExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -833,7 +833,7 @@ export const NonExistenceProof = { }, toAminoMsg(message: NonExistenceProof): NonExistenceProofAminoMsg { return { - type: "cosmos-sdk/NonExistenceProof", + type: 'cosmos-sdk/NonExistenceProof', value: NonExistenceProof.toAmino(message) }; }, @@ -845,7 +845,7 @@ export const NonExistenceProof = { }, toProtoMsg(message: NonExistenceProof): NonExistenceProofProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.NonExistenceProof", + typeUrl: '/cosmos.ics23.v1.NonExistenceProof', value: NonExistenceProof.encode(message).finish() }; } @@ -861,8 +861,8 @@ function createBaseCommitmentProof(): CommitmentProof { }; } export const CommitmentProof = { - typeUrl: "/cosmos.ics23.v1.CommitmentProof", - aminoType: "cosmos-sdk/CommitmentProof", + typeUrl: '/cosmos.ics23.v1.CommitmentProof', + aminoType: 'cosmos-sdk/CommitmentProof', is(o: any): o is CommitmentProof { return o && o.$typeUrl === CommitmentProof.typeUrl; }, @@ -891,21 +891,21 @@ export const CommitmentProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.batch = BatchProof.decode(reader, reader.uint32()); - break; - case 4: - message.compressed = CompressedBatchProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.exist = ExistenceProof.decode(reader, reader.uint32()); + break; + case 2: + message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); + break; + case 3: + message.batch = BatchProof.decode(reader, reader.uint32()); + break; + case 4: + message.compressed = CompressedBatchProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -947,7 +947,7 @@ export const CommitmentProof = { }, toAminoMsg(message: CommitmentProof): CommitmentProofAminoMsg { return { - type: "cosmos-sdk/CommitmentProof", + type: 'cosmos-sdk/CommitmentProof', value: CommitmentProof.toAmino(message) }; }, @@ -959,7 +959,7 @@ export const CommitmentProof = { }, toProtoMsg(message: CommitmentProof): CommitmentProofProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.CommitmentProof", + typeUrl: '/cosmos.ics23.v1.CommitmentProof', value: CommitmentProof.encode(message).finish() }; } @@ -976,13 +976,13 @@ function createBaseLeafOp(): LeafOp { }; } export const LeafOp = { - typeUrl: "/cosmos.ics23.v1.LeafOp", - aminoType: "cosmos-sdk/LeafOp", + typeUrl: '/cosmos.ics23.v1.LeafOp', + aminoType: 'cosmos-sdk/LeafOp', is(o: any): o is LeafOp { - return o && (o.$typeUrl === LeafOp.typeUrl || isSet(o.hash) && isSet(o.prehashKey) && isSet(o.prehashValue) && isSet(o.length) && (o.prefix instanceof Uint8Array || typeof o.prefix === "string")); + return o && (o.$typeUrl === LeafOp.typeUrl || isSet(o.hash) && isSet(o.prehashKey) && isSet(o.prehashValue) && isSet(o.length) && (o.prefix instanceof Uint8Array || typeof o.prefix === 'string')); }, isAmino(o: any): o is LeafOpAmino { - return o && (o.$typeUrl === LeafOp.typeUrl || isSet(o.hash) && isSet(o.prehash_key) && isSet(o.prehash_value) && isSet(o.length) && (o.prefix instanceof Uint8Array || typeof o.prefix === "string")); + return o && (o.$typeUrl === LeafOp.typeUrl || isSet(o.hash) && isSet(o.prehash_key) && isSet(o.prehash_value) && isSet(o.length) && (o.prefix instanceof Uint8Array || typeof o.prefix === 'string')); }, encode(message: LeafOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.hash !== 0) { @@ -1009,24 +1009,24 @@ export const LeafOp = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hash = (reader.int32() as any); - break; - case 2: - message.prehashKey = (reader.int32() as any); - break; - case 3: - message.prehashValue = (reader.int32() as any); - break; - case 4: - message.length = (reader.int32() as any); - break; - case 5: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hash = (reader.int32() as any); + break; + case 2: + message.prehashKey = (reader.int32() as any); + break; + case 3: + message.prehashValue = (reader.int32() as any); + break; + case 4: + message.length = (reader.int32() as any); + break; + case 5: + message.prefix = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1073,7 +1073,7 @@ export const LeafOp = { }, toAminoMsg(message: LeafOp): LeafOpAminoMsg { return { - type: "cosmos-sdk/LeafOp", + type: 'cosmos-sdk/LeafOp', value: LeafOp.toAmino(message) }; }, @@ -1085,7 +1085,7 @@ export const LeafOp = { }, toProtoMsg(message: LeafOp): LeafOpProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.LeafOp", + typeUrl: '/cosmos.ics23.v1.LeafOp', value: LeafOp.encode(message).finish() }; } @@ -1100,13 +1100,13 @@ function createBaseInnerOp(): InnerOp { }; } export const InnerOp = { - typeUrl: "/cosmos.ics23.v1.InnerOp", - aminoType: "cosmos-sdk/InnerOp", + typeUrl: '/cosmos.ics23.v1.InnerOp', + aminoType: 'cosmos-sdk/InnerOp', is(o: any): o is InnerOp { - return o && (o.$typeUrl === InnerOp.typeUrl || isSet(o.hash) && (o.prefix instanceof Uint8Array || typeof o.prefix === "string") && (o.suffix instanceof Uint8Array || typeof o.suffix === "string")); + return o && (o.$typeUrl === InnerOp.typeUrl || isSet(o.hash) && (o.prefix instanceof Uint8Array || typeof o.prefix === 'string') && (o.suffix instanceof Uint8Array || typeof o.suffix === 'string')); }, isAmino(o: any): o is InnerOpAmino { - return o && (o.$typeUrl === InnerOp.typeUrl || isSet(o.hash) && (o.prefix instanceof Uint8Array || typeof o.prefix === "string") && (o.suffix instanceof Uint8Array || typeof o.suffix === "string")); + return o && (o.$typeUrl === InnerOp.typeUrl || isSet(o.hash) && (o.prefix instanceof Uint8Array || typeof o.prefix === 'string') && (o.suffix instanceof Uint8Array || typeof o.suffix === 'string')); }, encode(message: InnerOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.hash !== 0) { @@ -1127,18 +1127,18 @@ export const InnerOp = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hash = (reader.int32() as any); - break; - case 2: - message.prefix = reader.bytes(); - break; - case 3: - message.suffix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hash = (reader.int32() as any); + break; + case 2: + message.prefix = reader.bytes(); + break; + case 3: + message.suffix = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1175,7 +1175,7 @@ export const InnerOp = { }, toAminoMsg(message: InnerOp): InnerOpAminoMsg { return { - type: "cosmos-sdk/InnerOp", + type: 'cosmos-sdk/InnerOp', value: InnerOp.toAmino(message) }; }, @@ -1187,7 +1187,7 @@ export const InnerOp = { }, toProtoMsg(message: InnerOp): InnerOpProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.InnerOp", + typeUrl: '/cosmos.ics23.v1.InnerOp', value: InnerOp.encode(message).finish() }; } @@ -1204,13 +1204,13 @@ function createBaseProofSpec(): ProofSpec { }; } export const ProofSpec = { - typeUrl: "/cosmos.ics23.v1.ProofSpec", - aminoType: "cosmos-sdk/ProofSpec", + typeUrl: '/cosmos.ics23.v1.ProofSpec', + aminoType: 'cosmos-sdk/ProofSpec', is(o: any): o is ProofSpec { - return o && (o.$typeUrl === ProofSpec.typeUrl || typeof o.maxDepth === "number" && typeof o.minDepth === "number" && typeof o.prehashKeyBeforeComparison === "boolean"); + return o && (o.$typeUrl === ProofSpec.typeUrl || typeof o.maxDepth === 'number' && typeof o.minDepth === 'number' && typeof o.prehashKeyBeforeComparison === 'boolean'); }, isAmino(o: any): o is ProofSpecAmino { - return o && (o.$typeUrl === ProofSpec.typeUrl || typeof o.max_depth === "number" && typeof o.min_depth === "number" && typeof o.prehash_key_before_comparison === "boolean"); + return o && (o.$typeUrl === ProofSpec.typeUrl || typeof o.max_depth === 'number' && typeof o.min_depth === 'number' && typeof o.prehash_key_before_comparison === 'boolean'); }, encode(message: ProofSpec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.leafSpec !== undefined) { @@ -1237,24 +1237,24 @@ export const ProofSpec = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.leafSpec = LeafOp.decode(reader, reader.uint32()); - break; - case 2: - message.innerSpec = InnerSpec.decode(reader, reader.uint32()); - break; - case 3: - message.maxDepth = reader.int32(); - break; - case 4: - message.minDepth = reader.int32(); - break; - case 5: - message.prehashKeyBeforeComparison = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.leafSpec = LeafOp.decode(reader, reader.uint32()); + break; + case 2: + message.innerSpec = InnerSpec.decode(reader, reader.uint32()); + break; + case 3: + message.maxDepth = reader.int32(); + break; + case 4: + message.minDepth = reader.int32(); + break; + case 5: + message.prehashKeyBeforeComparison = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1301,7 +1301,7 @@ export const ProofSpec = { }, toAminoMsg(message: ProofSpec): ProofSpecAminoMsg { return { - type: "cosmos-sdk/ProofSpec", + type: 'cosmos-sdk/ProofSpec', value: ProofSpec.toAmino(message) }; }, @@ -1313,7 +1313,7 @@ export const ProofSpec = { }, toProtoMsg(message: ProofSpec): ProofSpecProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.ProofSpec", + typeUrl: '/cosmos.ics23.v1.ProofSpec', value: ProofSpec.encode(message).finish() }; } @@ -1331,13 +1331,13 @@ function createBaseInnerSpec(): InnerSpec { }; } export const InnerSpec = { - typeUrl: "/cosmos.ics23.v1.InnerSpec", - aminoType: "cosmos-sdk/InnerSpec", + typeUrl: '/cosmos.ics23.v1.InnerSpec', + aminoType: 'cosmos-sdk/InnerSpec', is(o: any): o is InnerSpec { - return o && (o.$typeUrl === InnerSpec.typeUrl || Array.isArray(o.childOrder) && (!o.childOrder.length || typeof o.childOrder[0] === "number") && typeof o.childSize === "number" && typeof o.minPrefixLength === "number" && typeof o.maxPrefixLength === "number" && (o.emptyChild instanceof Uint8Array || typeof o.emptyChild === "string") && isSet(o.hash)); + return o && (o.$typeUrl === InnerSpec.typeUrl || Array.isArray(o.childOrder) && (!o.childOrder.length || typeof o.childOrder[0] === 'number') && typeof o.childSize === 'number' && typeof o.minPrefixLength === 'number' && typeof o.maxPrefixLength === 'number' && (o.emptyChild instanceof Uint8Array || typeof o.emptyChild === 'string') && isSet(o.hash)); }, isAmino(o: any): o is InnerSpecAmino { - return o && (o.$typeUrl === InnerSpec.typeUrl || Array.isArray(o.child_order) && (!o.child_order.length || typeof o.child_order[0] === "number") && typeof o.child_size === "number" && typeof o.min_prefix_length === "number" && typeof o.max_prefix_length === "number" && (o.empty_child instanceof Uint8Array || typeof o.empty_child === "string") && isSet(o.hash)); + return o && (o.$typeUrl === InnerSpec.typeUrl || Array.isArray(o.child_order) && (!o.child_order.length || typeof o.child_order[0] === 'number') && typeof o.child_size === 'number' && typeof o.min_prefix_length === 'number' && typeof o.max_prefix_length === 'number' && (o.empty_child instanceof Uint8Array || typeof o.empty_child === 'string') && isSet(o.hash)); }, encode(message: InnerSpec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { writer.uint32(10).fork(); @@ -1369,34 +1369,34 @@ export const InnerSpec = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.childOrder.push(reader.int32()); - } - } else { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.childOrder.push(reader.int32()); } - break; - case 2: - message.childSize = reader.int32(); - break; - case 3: - message.minPrefixLength = reader.int32(); - break; - case 4: - message.maxPrefixLength = reader.int32(); - break; - case 5: - message.emptyChild = reader.bytes(); - break; - case 6: - message.hash = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.childOrder.push(reader.int32()); + } + break; + case 2: + message.childSize = reader.int32(); + break; + case 3: + message.minPrefixLength = reader.int32(); + break; + case 4: + message.maxPrefixLength = reader.int32(); + break; + case 5: + message.emptyChild = reader.bytes(); + break; + case 6: + message.hash = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1450,7 +1450,7 @@ export const InnerSpec = { }, toAminoMsg(message: InnerSpec): InnerSpecAminoMsg { return { - type: "cosmos-sdk/InnerSpec", + type: 'cosmos-sdk/InnerSpec', value: InnerSpec.toAmino(message) }; }, @@ -1462,7 +1462,7 @@ export const InnerSpec = { }, toProtoMsg(message: InnerSpec): InnerSpecProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.InnerSpec", + typeUrl: '/cosmos.ics23.v1.InnerSpec', value: InnerSpec.encode(message).finish() }; } @@ -1475,8 +1475,8 @@ function createBaseBatchProof(): BatchProof { }; } export const BatchProof = { - typeUrl: "/cosmos.ics23.v1.BatchProof", - aminoType: "cosmos-sdk/BatchProof", + typeUrl: '/cosmos.ics23.v1.BatchProof', + aminoType: 'cosmos-sdk/BatchProof', is(o: any): o is BatchProof { return o && (o.$typeUrl === BatchProof.typeUrl || Array.isArray(o.entries) && (!o.entries.length || BatchEntry.is(o.entries[0]))); }, @@ -1496,12 +1496,12 @@ export const BatchProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.entries.push(BatchEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.entries.push(BatchEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1530,7 +1530,7 @@ export const BatchProof = { }, toAminoMsg(message: BatchProof): BatchProofAminoMsg { return { - type: "cosmos-sdk/BatchProof", + type: 'cosmos-sdk/BatchProof', value: BatchProof.toAmino(message) }; }, @@ -1542,7 +1542,7 @@ export const BatchProof = { }, toProtoMsg(message: BatchProof): BatchProofProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.BatchProof", + typeUrl: '/cosmos.ics23.v1.BatchProof', value: BatchProof.encode(message).finish() }; } @@ -1556,8 +1556,8 @@ function createBaseBatchEntry(): BatchEntry { }; } export const BatchEntry = { - typeUrl: "/cosmos.ics23.v1.BatchEntry", - aminoType: "cosmos-sdk/BatchEntry", + typeUrl: '/cosmos.ics23.v1.BatchEntry', + aminoType: 'cosmos-sdk/BatchEntry', is(o: any): o is BatchEntry { return o && o.$typeUrl === BatchEntry.typeUrl; }, @@ -1580,15 +1580,15 @@ export const BatchEntry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.exist = ExistenceProof.decode(reader, reader.uint32()); + break; + case 2: + message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1620,7 +1620,7 @@ export const BatchEntry = { }, toAminoMsg(message: BatchEntry): BatchEntryAminoMsg { return { - type: "cosmos-sdk/BatchEntry", + type: 'cosmos-sdk/BatchEntry', value: BatchEntry.toAmino(message) }; }, @@ -1632,7 +1632,7 @@ export const BatchEntry = { }, toProtoMsg(message: BatchEntry): BatchEntryProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.BatchEntry", + typeUrl: '/cosmos.ics23.v1.BatchEntry', value: BatchEntry.encode(message).finish() }; } @@ -1646,8 +1646,8 @@ function createBaseCompressedBatchProof(): CompressedBatchProof { }; } export const CompressedBatchProof = { - typeUrl: "/cosmos.ics23.v1.CompressedBatchProof", - aminoType: "cosmos-sdk/CompressedBatchProof", + typeUrl: '/cosmos.ics23.v1.CompressedBatchProof', + aminoType: 'cosmos-sdk/CompressedBatchProof', is(o: any): o is CompressedBatchProof { return o && (o.$typeUrl === CompressedBatchProof.typeUrl || Array.isArray(o.entries) && (!o.entries.length || CompressedBatchEntry.is(o.entries[0])) && Array.isArray(o.lookupInners) && (!o.lookupInners.length || InnerOp.is(o.lookupInners[0]))); }, @@ -1670,15 +1670,15 @@ export const CompressedBatchProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.entries.push(CompressedBatchEntry.decode(reader, reader.uint32())); - break; - case 2: - message.lookupInners.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.entries.push(CompressedBatchEntry.decode(reader, reader.uint32())); + break; + case 2: + message.lookupInners.push(InnerOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1714,7 +1714,7 @@ export const CompressedBatchProof = { }, toAminoMsg(message: CompressedBatchProof): CompressedBatchProofAminoMsg { return { - type: "cosmos-sdk/CompressedBatchProof", + type: 'cosmos-sdk/CompressedBatchProof', value: CompressedBatchProof.toAmino(message) }; }, @@ -1726,7 +1726,7 @@ export const CompressedBatchProof = { }, toProtoMsg(message: CompressedBatchProof): CompressedBatchProofProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.CompressedBatchProof", + typeUrl: '/cosmos.ics23.v1.CompressedBatchProof', value: CompressedBatchProof.encode(message).finish() }; } @@ -1740,8 +1740,8 @@ function createBaseCompressedBatchEntry(): CompressedBatchEntry { }; } export const CompressedBatchEntry = { - typeUrl: "/cosmos.ics23.v1.CompressedBatchEntry", - aminoType: "cosmos-sdk/CompressedBatchEntry", + typeUrl: '/cosmos.ics23.v1.CompressedBatchEntry', + aminoType: 'cosmos-sdk/CompressedBatchEntry', is(o: any): o is CompressedBatchEntry { return o && o.$typeUrl === CompressedBatchEntry.typeUrl; }, @@ -1764,15 +1764,15 @@ export const CompressedBatchEntry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.exist = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = CompressedNonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.exist = CompressedExistenceProof.decode(reader, reader.uint32()); + break; + case 2: + message.nonexist = CompressedNonExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1804,7 +1804,7 @@ export const CompressedBatchEntry = { }, toAminoMsg(message: CompressedBatchEntry): CompressedBatchEntryAminoMsg { return { - type: "cosmos-sdk/CompressedBatchEntry", + type: 'cosmos-sdk/CompressedBatchEntry', value: CompressedBatchEntry.toAmino(message) }; }, @@ -1816,7 +1816,7 @@ export const CompressedBatchEntry = { }, toProtoMsg(message: CompressedBatchEntry): CompressedBatchEntryProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.CompressedBatchEntry", + typeUrl: '/cosmos.ics23.v1.CompressedBatchEntry', value: CompressedBatchEntry.encode(message).finish() }; } @@ -1832,13 +1832,13 @@ function createBaseCompressedExistenceProof(): CompressedExistenceProof { }; } export const CompressedExistenceProof = { - typeUrl: "/cosmos.ics23.v1.CompressedExistenceProof", - aminoType: "cosmos-sdk/CompressedExistenceProof", + typeUrl: '/cosmos.ics23.v1.CompressedExistenceProof', + aminoType: 'cosmos-sdk/CompressedExistenceProof', is(o: any): o is CompressedExistenceProof { - return o && (o.$typeUrl === CompressedExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string") && Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === "number")); + return o && (o.$typeUrl === CompressedExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string') && Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === 'number')); }, isAmino(o: any): o is CompressedExistenceProofAmino { - return o && (o.$typeUrl === CompressedExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string") && Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === "number")); + return o && (o.$typeUrl === CompressedExistenceProof.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string') && Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === 'number')); }, encode(message: CompressedExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -1864,28 +1864,28 @@ export const CompressedExistenceProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.leaf = LeafOp.decode(reader, reader.uint32()); + break; + case 4: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.path.push(reader.int32()); } - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.path.push(reader.int32()); + } + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1929,7 +1929,7 @@ export const CompressedExistenceProof = { }, toAminoMsg(message: CompressedExistenceProof): CompressedExistenceProofAminoMsg { return { - type: "cosmos-sdk/CompressedExistenceProof", + type: 'cosmos-sdk/CompressedExistenceProof', value: CompressedExistenceProof.toAmino(message) }; }, @@ -1941,7 +1941,7 @@ export const CompressedExistenceProof = { }, toProtoMsg(message: CompressedExistenceProof): CompressedExistenceProofProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.CompressedExistenceProof", + typeUrl: '/cosmos.ics23.v1.CompressedExistenceProof', value: CompressedExistenceProof.encode(message).finish() }; } @@ -1956,13 +1956,13 @@ function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { }; } export const CompressedNonExistenceProof = { - typeUrl: "/cosmos.ics23.v1.CompressedNonExistenceProof", - aminoType: "cosmos-sdk/CompressedNonExistenceProof", + typeUrl: '/cosmos.ics23.v1.CompressedNonExistenceProof', + aminoType: 'cosmos-sdk/CompressedNonExistenceProof', is(o: any): o is CompressedNonExistenceProof { - return o && (o.$typeUrl === CompressedNonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === CompressedNonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is CompressedNonExistenceProofAmino { - return o && (o.$typeUrl === CompressedNonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === CompressedNonExistenceProof.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: CompressedNonExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -1983,18 +1983,18 @@ export const CompressedNonExistenceProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + case 2: + message.left = CompressedExistenceProof.decode(reader, reader.uint32()); + break; + case 3: + message.right = CompressedExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2031,7 +2031,7 @@ export const CompressedNonExistenceProof = { }, toAminoMsg(message: CompressedNonExistenceProof): CompressedNonExistenceProofAminoMsg { return { - type: "cosmos-sdk/CompressedNonExistenceProof", + type: 'cosmos-sdk/CompressedNonExistenceProof', value: CompressedNonExistenceProof.toAmino(message) }; }, @@ -2043,7 +2043,7 @@ export const CompressedNonExistenceProof = { }, toProtoMsg(message: CompressedNonExistenceProof): CompressedNonExistenceProofProtoMsg { return { - typeUrl: "/cosmos.ics23.v1.CompressedNonExistenceProof", + typeUrl: '/cosmos.ics23.v1.CompressedNonExistenceProof', value: CompressedNonExistenceProof.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/msg/v1/msg.ts b/libs/cosmos-types/cosmos/msg/v1/msg.ts index 693da49f..8cec2e9c 100644 --- a/libs/cosmos-types/cosmos/msg/v1/msg.ts +++ b/libs/cosmos-types/cosmos/msg/v1/msg.ts @@ -1 +1 @@ -export {} \ No newline at end of file +export {}; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/query/v1/query.ts b/libs/cosmos-types/cosmos/query/v1/query.ts index 693da49f..8cec2e9c 100644 --- a/libs/cosmos-types/cosmos/query/v1/query.ts +++ b/libs/cosmos-types/cosmos/query/v1/query.ts @@ -1 +1 @@ -export {} \ No newline at end of file +export {}; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/rpc.query.ts b/libs/cosmos-types/cosmos/rpc.query.ts index 5346af42..e01141b0 100644 --- a/libs/cosmos-types/cosmos/rpc.query.ts +++ b/libs/cosmos-types/cosmos/rpc.query.ts @@ -1,4 +1,4 @@ -import { Rpc } from "../helpers"; +import { Rpc } from '../helpers'; export const createRPCQueryClient = async ({ rpc }: { @@ -7,16 +7,19 @@ export const createRPCQueryClient = async ({ return { cosmos: { auth: { - v1beta1: (await import("./auth/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('./auth/v1beta1/query.rpc.Query')).createClientImpl(rpc) }, bank: { - v1beta1: (await import("./bank/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('./bank/v1beta1/query.rpc.Query')).createClientImpl(rpc) }, gov: { - v1beta1: (await import("./gov/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('./gov/v1beta1/query.rpc.Query')).createClientImpl(rpc) }, staking: { - v1beta1: (await import("./staking/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('./staking/v1beta1/query.rpc.Query')).createClientImpl(rpc) + }, + tx: { + v1beta1: (await import('./tx/v1beta1/service.rpc.Service')).createClientImpl(rpc) } } }; diff --git a/libs/cosmos-types/cosmos/rpc.tx.ts b/libs/cosmos-types/cosmos/rpc.tx.ts index 983ebb25..58e73a17 100644 --- a/libs/cosmos-types/cosmos/rpc.tx.ts +++ b/libs/cosmos-types/cosmos/rpc.tx.ts @@ -1,4 +1,4 @@ -import { Rpc } from "../helpers"; +import { Rpc } from '../helpers'; export const createRPCMsgClient = async ({ rpc }: { @@ -6,29 +6,29 @@ export const createRPCMsgClient = async ({ }) => ({ cosmos: { authz: { - v1beta1: new (await import("./authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('./authz/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, bank: { - v1beta1: new (await import("./bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('./bank/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, distribution: { - v1beta1: new (await import("./distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('./distribution/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, feegrant: { - v1beta1: new (await import("./feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('./feegrant/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, gov: { - v1: new (await import("./gov/v1/tx.rpc.msg")).MsgClientImpl(rpc), - v1beta1: new (await import("./gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('./gov/v1/tx.rpc.msg')).MsgClientImpl(rpc), + v1beta1: new (await import('./gov/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, group: { - v1: new (await import("./group/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('./group/v1/tx.rpc.msg')).MsgClientImpl(rpc) }, staking: { - v1beta1: new (await import("./staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('./staking/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, vesting: { - v1beta1: new (await import("./vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('./vesting/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) } } }); \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/staking/v1beta1/query.rpc.Query.ts b/libs/cosmos-types/cosmos/staking/v1beta1/query.rpc.Query.ts index a101a76e..c87234d8 100644 --- a/libs/cosmos-types/cosmos/staking/v1beta1/query.rpc.Query.ts +++ b/libs/cosmos-types/cosmos/staking/v1beta1/query.rpc.Query.ts @@ -1,6 +1,6 @@ -import { TxRpc } from "../../../types"; -import { BinaryReader } from "../../../binary"; -import { QueryValidatorsRequest, QueryValidatorsResponse, QueryValidatorRequest, QueryValidatorResponse, QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse, QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse, QueryDelegationRequest, QueryDelegationResponse, QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse, QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse, QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse, QueryRedelegationsRequest, QueryRedelegationsResponse, QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse, QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse, QueryHistoricalInfoRequest, QueryHistoricalInfoResponse, QueryPoolRequest, QueryPoolResponse, QueryParamsRequest, QueryParamsResponse } from "./query"; +import { BinaryReader } from '../../../binary'; +import { TxRpc } from '../../../types'; +import { QueryDelegationRequest, QueryDelegationResponse, QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse, QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse, QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse, QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse, QueryHistoricalInfoRequest, QueryHistoricalInfoResponse, QueryParamsRequest, QueryParamsResponse,QueryPoolRequest, QueryPoolResponse, QueryRedelegationsRequest, QueryRedelegationsResponse, QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse, QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse, QueryValidatorRequest, QueryValidatorResponse, QueryValidatorsRequest, QueryValidatorsResponse, QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse } from './query'; /** Query defines the gRPC querier service. */ export interface Query { /** @@ -160,13 +160,13 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ validators = async (request: QueryValidatorsRequest): Promise => { const data = QueryValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validators", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'Validators', data); return promise.then(data => QueryValidatorsResponse.decode(new BinaryReader(data))); }; /* Validator queries validator info for given validator address. */ validator = async (request: QueryValidatorRequest): Promise => { const data = QueryValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validator", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'Validator', data); return promise.then(data => QueryValidatorResponse.decode(new BinaryReader(data))); }; /* ValidatorDelegations queries delegate info for given validator. @@ -175,7 +175,7 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ validatorDelegations = async (request: QueryValidatorDelegationsRequest): Promise => { const data = QueryValidatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorDelegations", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'ValidatorDelegations', data); return promise.then(data => QueryValidatorDelegationsResponse.decode(new BinaryReader(data))); }; /* ValidatorUnbondingDelegations queries unbonding delegations of a validator. @@ -184,20 +184,20 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ validatorUnbondingDelegations = async (request: QueryValidatorUnbondingDelegationsRequest): Promise => { const data = QueryValidatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorUnbondingDelegations", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'ValidatorUnbondingDelegations', data); return promise.then(data => QueryValidatorUnbondingDelegationsResponse.decode(new BinaryReader(data))); }; /* Delegation queries delegate info for given validator delegator pair. */ delegation = async (request: QueryDelegationRequest): Promise => { const data = QueryDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Delegation", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'Delegation', data); return promise.then(data => QueryDelegationResponse.decode(new BinaryReader(data))); }; /* UnbondingDelegation queries unbonding info for given validator delegator pair. */ unbondingDelegation = async (request: QueryUnbondingDelegationRequest): Promise => { const data = QueryUnbondingDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "UnbondingDelegation", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'UnbondingDelegation', data); return promise.then(data => QueryUnbondingDelegationResponse.decode(new BinaryReader(data))); }; /* DelegatorDelegations queries all delegations of a given delegator address. @@ -206,7 +206,7 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ delegatorDelegations = async (request: QueryDelegatorDelegationsRequest): Promise => { const data = QueryDelegatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorDelegations", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'DelegatorDelegations', data); return promise.then(data => QueryDelegatorDelegationsResponse.decode(new BinaryReader(data))); }; /* DelegatorUnbondingDelegations queries all unbonding delegations of a given @@ -216,7 +216,7 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ delegatorUnbondingDelegations = async (request: QueryDelegatorUnbondingDelegationsRequest): Promise => { const data = QueryDelegatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorUnbondingDelegations", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'DelegatorUnbondingDelegations', data); return promise.then(data => QueryDelegatorUnbondingDelegationsResponse.decode(new BinaryReader(data))); }; /* Redelegations queries redelegations of given address. @@ -225,7 +225,7 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ redelegations = async (request: QueryRedelegationsRequest): Promise => { const data = QueryRedelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Redelegations", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'Redelegations', data); return promise.then(data => QueryRedelegationsResponse.decode(new BinaryReader(data))); }; /* DelegatorValidators queries all validators info for given delegator @@ -235,32 +235,32 @@ export class QueryClientImpl implements Query { gas if the pagination field is incorrectly set. */ delegatorValidators = async (request: QueryDelegatorValidatorsRequest): Promise => { const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidators", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'DelegatorValidators', data); return promise.then(data => QueryDelegatorValidatorsResponse.decode(new BinaryReader(data))); }; /* DelegatorValidator queries validator info for given delegator validator pair. */ delegatorValidator = async (request: QueryDelegatorValidatorRequest): Promise => { const data = QueryDelegatorValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidator", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'DelegatorValidator', data); return promise.then(data => QueryDelegatorValidatorResponse.decode(new BinaryReader(data))); }; /* HistoricalInfo queries the historical info for given height. */ historicalInfo = async (request: QueryHistoricalInfoRequest): Promise => { const data = QueryHistoricalInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "HistoricalInfo", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'HistoricalInfo', data); return promise.then(data => QueryHistoricalInfoResponse.decode(new BinaryReader(data))); }; /* Pool queries the pool info. */ pool = async (request: QueryPoolRequest = {}): Promise => { const data = QueryPoolRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Pool", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'Pool', data); return promise.then(data => QueryPoolResponse.decode(new BinaryReader(data))); }; /* Parameters queries the staking parameters. */ params = async (request: QueryParamsRequest = {}): Promise => { const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Params", data); + const promise = this.rpc.request('cosmos.staking.v1beta1.Query', 'Params', data); return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); }; } diff --git a/libs/cosmos-types/cosmos/staking/v1beta1/query.ts b/libs/cosmos-types/cosmos/staking/v1beta1/query.ts index 0ea5f176..c062425b 100644 --- a/libs/cosmos-types/cosmos/staking/v1beta1/query.ts +++ b/libs/cosmos-types/cosmos/staking/v1beta1/query.ts @@ -1,8 +1,8 @@ -import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; -import { Validator, ValidatorAmino, DelegationResponse, DelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, RedelegationResponse, RedelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Pool, PoolAmino, Params, ParamsAmino } from "./staking"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from '../../base/query/v1beta1/pagination'; +import { DelegationResponse, DelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Params, ParamsAmino,Pool, PoolAmino, RedelegationResponse, RedelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, Validator, ValidatorAmino } from './staking'; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ export interface QueryValidatorsRequest { /** status enables to query for validators matching a given status. */ @@ -11,7 +11,7 @@ export interface QueryValidatorsRequest { pagination?: PageRequest; } export interface QueryValidatorsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorsRequest'; value: Uint8Array; } /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ @@ -22,7 +22,7 @@ export interface QueryValidatorsRequestAmino { pagination?: PageRequestAmino; } export interface QueryValidatorsRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorsRequest"; + type: 'cosmos-sdk/QueryValidatorsRequest'; value: QueryValidatorsRequestAmino; } /** QueryValidatorsResponse is response type for the Query/Validators RPC method */ @@ -33,7 +33,7 @@ export interface QueryValidatorsResponse { pagination?: PageResponse; } export interface QueryValidatorsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorsResponse'; value: Uint8Array; } /** QueryValidatorsResponse is response type for the Query/Validators RPC method */ @@ -44,7 +44,7 @@ export interface QueryValidatorsResponseAmino { pagination?: PageResponseAmino; } export interface QueryValidatorsResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorsResponse"; + type: 'cosmos-sdk/QueryValidatorsResponse'; value: QueryValidatorsResponseAmino; } /** QueryValidatorRequest is response type for the Query/Validator RPC method */ @@ -53,7 +53,7 @@ export interface QueryValidatorRequest { validatorAddr: string; } export interface QueryValidatorRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorRequest'; value: Uint8Array; } /** QueryValidatorRequest is response type for the Query/Validator RPC method */ @@ -62,7 +62,7 @@ export interface QueryValidatorRequestAmino { validator_addr: string; } export interface QueryValidatorRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorRequest"; + type: 'cosmos-sdk/QueryValidatorRequest'; value: QueryValidatorRequestAmino; } /** QueryValidatorResponse is response type for the Query/Validator RPC method */ @@ -71,7 +71,7 @@ export interface QueryValidatorResponse { validator: Validator; } export interface QueryValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorResponse'; value: Uint8Array; } /** QueryValidatorResponse is response type for the Query/Validator RPC method */ @@ -80,7 +80,7 @@ export interface QueryValidatorResponseAmino { validator: ValidatorAmino; } export interface QueryValidatorResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorResponse"; + type: 'cosmos-sdk/QueryValidatorResponse'; value: QueryValidatorResponseAmino; } /** @@ -94,7 +94,7 @@ export interface QueryValidatorDelegationsRequest { pagination?: PageRequest; } export interface QueryValidatorDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest'; value: Uint8Array; } /** @@ -108,7 +108,7 @@ export interface QueryValidatorDelegationsRequestAmino { pagination?: PageRequestAmino; } export interface QueryValidatorDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorDelegationsRequest"; + type: 'cosmos-sdk/QueryValidatorDelegationsRequest'; value: QueryValidatorDelegationsRequestAmino; } /** @@ -121,7 +121,7 @@ export interface QueryValidatorDelegationsResponse { pagination?: PageResponse; } export interface QueryValidatorDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse'; value: Uint8Array; } /** @@ -134,7 +134,7 @@ export interface QueryValidatorDelegationsResponseAmino { pagination?: PageResponseAmino; } export interface QueryValidatorDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorDelegationsResponse"; + type: 'cosmos-sdk/QueryValidatorDelegationsResponse'; value: QueryValidatorDelegationsResponseAmino; } /** @@ -148,7 +148,7 @@ export interface QueryValidatorUnbondingDelegationsRequest { pagination?: PageRequest; } export interface QueryValidatorUnbondingDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest'; value: Uint8Array; } /** @@ -162,7 +162,7 @@ export interface QueryValidatorUnbondingDelegationsRequestAmino { pagination?: PageRequestAmino; } export interface QueryValidatorUnbondingDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsRequest"; + type: 'cosmos-sdk/QueryValidatorUnbondingDelegationsRequest'; value: QueryValidatorUnbondingDelegationsRequestAmino; } /** @@ -175,7 +175,7 @@ export interface QueryValidatorUnbondingDelegationsResponse { pagination?: PageResponse; } export interface QueryValidatorUnbondingDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse'; value: Uint8Array; } /** @@ -188,7 +188,7 @@ export interface QueryValidatorUnbondingDelegationsResponseAmino { pagination?: PageResponseAmino; } export interface QueryValidatorUnbondingDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsResponse"; + type: 'cosmos-sdk/QueryValidatorUnbondingDelegationsResponse'; value: QueryValidatorUnbondingDelegationsResponseAmino; } /** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ @@ -199,7 +199,7 @@ export interface QueryDelegationRequest { validatorAddr: string; } export interface QueryDelegationRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegationRequest'; value: Uint8Array; } /** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ @@ -210,7 +210,7 @@ export interface QueryDelegationRequestAmino { validator_addr: string; } export interface QueryDelegationRequestAminoMsg { - type: "cosmos-sdk/QueryDelegationRequest"; + type: 'cosmos-sdk/QueryDelegationRequest'; value: QueryDelegationRequestAmino; } /** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ @@ -219,7 +219,7 @@ export interface QueryDelegationResponse { delegationResponse?: DelegationResponse; } export interface QueryDelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegationResponse'; value: Uint8Array; } /** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ @@ -228,7 +228,7 @@ export interface QueryDelegationResponseAmino { delegation_response?: DelegationResponseAmino; } export interface QueryDelegationResponseAminoMsg { - type: "cosmos-sdk/QueryDelegationResponse"; + type: 'cosmos-sdk/QueryDelegationResponse'; value: QueryDelegationResponseAmino; } /** @@ -242,7 +242,7 @@ export interface QueryUnbondingDelegationRequest { validatorAddr: string; } export interface QueryUnbondingDelegationRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest'; value: Uint8Array; } /** @@ -256,7 +256,7 @@ export interface QueryUnbondingDelegationRequestAmino { validator_addr: string; } export interface QueryUnbondingDelegationRequestAminoMsg { - type: "cosmos-sdk/QueryUnbondingDelegationRequest"; + type: 'cosmos-sdk/QueryUnbondingDelegationRequest'; value: QueryUnbondingDelegationRequestAmino; } /** @@ -268,7 +268,7 @@ export interface QueryUnbondingDelegationResponse { unbond: UnbondingDelegation; } export interface QueryUnbondingDelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse'; value: Uint8Array; } /** @@ -280,7 +280,7 @@ export interface QueryUnbondingDelegationResponseAmino { unbond: UnbondingDelegationAmino; } export interface QueryUnbondingDelegationResponseAminoMsg { - type: "cosmos-sdk/QueryUnbondingDelegationResponse"; + type: 'cosmos-sdk/QueryUnbondingDelegationResponse'; value: QueryUnbondingDelegationResponseAmino; } /** @@ -294,7 +294,7 @@ export interface QueryDelegatorDelegationsRequest { pagination?: PageRequest; } export interface QueryDelegatorDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest'; value: Uint8Array; } /** @@ -308,7 +308,7 @@ export interface QueryDelegatorDelegationsRequestAmino { pagination?: PageRequestAmino; } export interface QueryDelegatorDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorDelegationsRequest"; + type: 'cosmos-sdk/QueryDelegatorDelegationsRequest'; value: QueryDelegatorDelegationsRequestAmino; } /** @@ -322,7 +322,7 @@ export interface QueryDelegatorDelegationsResponse { pagination?: PageResponse; } export interface QueryDelegatorDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse'; value: Uint8Array; } /** @@ -336,7 +336,7 @@ export interface QueryDelegatorDelegationsResponseAmino { pagination?: PageResponseAmino; } export interface QueryDelegatorDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorDelegationsResponse"; + type: 'cosmos-sdk/QueryDelegatorDelegationsResponse'; value: QueryDelegatorDelegationsResponseAmino; } /** @@ -350,7 +350,7 @@ export interface QueryDelegatorUnbondingDelegationsRequest { pagination?: PageRequest; } export interface QueryDelegatorUnbondingDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest'; value: Uint8Array; } /** @@ -364,7 +364,7 @@ export interface QueryDelegatorUnbondingDelegationsRequestAmino { pagination?: PageRequestAmino; } export interface QueryDelegatorUnbondingDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest"; + type: 'cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest'; value: QueryDelegatorUnbondingDelegationsRequestAmino; } /** @@ -377,7 +377,7 @@ export interface QueryDelegatorUnbondingDelegationsResponse { pagination?: PageResponse; } export interface QueryDelegatorUnbondingDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse'; value: Uint8Array; } /** @@ -390,7 +390,7 @@ export interface QueryDelegatorUnbondingDelegationsResponseAmino { pagination?: PageResponseAmino; } export interface QueryDelegatorUnbondingDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse"; + type: 'cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse'; value: QueryDelegatorUnbondingDelegationsResponseAmino; } /** @@ -408,7 +408,7 @@ export interface QueryRedelegationsRequest { pagination?: PageRequest; } export interface QueryRedelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryRedelegationsRequest'; value: Uint8Array; } /** @@ -426,7 +426,7 @@ export interface QueryRedelegationsRequestAmino { pagination?: PageRequestAmino; } export interface QueryRedelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryRedelegationsRequest"; + type: 'cosmos-sdk/QueryRedelegationsRequest'; value: QueryRedelegationsRequestAmino; } /** @@ -439,7 +439,7 @@ export interface QueryRedelegationsResponse { pagination?: PageResponse; } export interface QueryRedelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryRedelegationsResponse'; value: Uint8Array; } /** @@ -452,7 +452,7 @@ export interface QueryRedelegationsResponseAmino { pagination?: PageResponseAmino; } export interface QueryRedelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryRedelegationsResponse"; + type: 'cosmos-sdk/QueryRedelegationsResponse'; value: QueryRedelegationsResponseAmino; } /** @@ -466,7 +466,7 @@ export interface QueryDelegatorValidatorsRequest { pagination?: PageRequest; } export interface QueryDelegatorValidatorsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest'; value: Uint8Array; } /** @@ -480,7 +480,7 @@ export interface QueryDelegatorValidatorsRequestAmino { pagination?: PageRequestAmino; } export interface QueryDelegatorValidatorsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorsRequest"; + type: 'cosmos-sdk/QueryDelegatorValidatorsRequest'; value: QueryDelegatorValidatorsRequestAmino; } /** @@ -494,7 +494,7 @@ export interface QueryDelegatorValidatorsResponse { pagination?: PageResponse; } export interface QueryDelegatorValidatorsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse'; value: Uint8Array; } /** @@ -508,7 +508,7 @@ export interface QueryDelegatorValidatorsResponseAmino { pagination?: PageResponseAmino; } export interface QueryDelegatorValidatorsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorsResponse"; + type: 'cosmos-sdk/QueryDelegatorValidatorsResponse'; value: QueryDelegatorValidatorsResponseAmino; } /** @@ -522,7 +522,7 @@ export interface QueryDelegatorValidatorRequest { validatorAddr: string; } export interface QueryDelegatorValidatorRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest'; value: Uint8Array; } /** @@ -536,7 +536,7 @@ export interface QueryDelegatorValidatorRequestAmino { validator_addr: string; } export interface QueryDelegatorValidatorRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorRequest"; + type: 'cosmos-sdk/QueryDelegatorValidatorRequest'; value: QueryDelegatorValidatorRequestAmino; } /** @@ -548,7 +548,7 @@ export interface QueryDelegatorValidatorResponse { validator: Validator; } export interface QueryDelegatorValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse'; value: Uint8Array; } /** @@ -560,7 +560,7 @@ export interface QueryDelegatorValidatorResponseAmino { validator: ValidatorAmino; } export interface QueryDelegatorValidatorResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorResponse"; + type: 'cosmos-sdk/QueryDelegatorValidatorResponse'; value: QueryDelegatorValidatorResponseAmino; } /** @@ -572,7 +572,7 @@ export interface QueryHistoricalInfoRequest { height: bigint; } export interface QueryHistoricalInfoRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryHistoricalInfoRequest'; value: Uint8Array; } /** @@ -584,7 +584,7 @@ export interface QueryHistoricalInfoRequestAmino { height: string; } export interface QueryHistoricalInfoRequestAminoMsg { - type: "cosmos-sdk/QueryHistoricalInfoRequest"; + type: 'cosmos-sdk/QueryHistoricalInfoRequest'; value: QueryHistoricalInfoRequestAmino; } /** @@ -596,7 +596,7 @@ export interface QueryHistoricalInfoResponse { hist?: HistoricalInfo; } export interface QueryHistoricalInfoResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryHistoricalInfoResponse'; value: Uint8Array; } /** @@ -608,19 +608,19 @@ export interface QueryHistoricalInfoResponseAmino { hist?: HistoricalInfoAmino; } export interface QueryHistoricalInfoResponseAminoMsg { - type: "cosmos-sdk/QueryHistoricalInfoResponse"; + type: 'cosmos-sdk/QueryHistoricalInfoResponse'; value: QueryHistoricalInfoResponseAmino; } /** QueryPoolRequest is request type for the Query/Pool RPC method. */ export interface QueryPoolRequest {} export interface QueryPoolRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryPoolRequest'; value: Uint8Array; } /** QueryPoolRequest is request type for the Query/Pool RPC method. */ export interface QueryPoolRequestAmino {} export interface QueryPoolRequestAminoMsg { - type: "cosmos-sdk/QueryPoolRequest"; + type: 'cosmos-sdk/QueryPoolRequest'; value: QueryPoolRequestAmino; } /** QueryPoolResponse is response type for the Query/Pool RPC method. */ @@ -629,7 +629,7 @@ export interface QueryPoolResponse { pool: Pool; } export interface QueryPoolResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryPoolResponse'; value: Uint8Array; } /** QueryPoolResponse is response type for the Query/Pool RPC method. */ @@ -638,19 +638,19 @@ export interface QueryPoolResponseAmino { pool: PoolAmino; } export interface QueryPoolResponseAminoMsg { - type: "cosmos-sdk/QueryPoolResponse"; + type: 'cosmos-sdk/QueryPoolResponse'; value: QueryPoolResponseAmino; } /** QueryParamsRequest is request type for the Query/Params RPC method. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest"; + typeUrl: '/cosmos.staking.v1beta1.QueryParamsRequest'; value: Uint8Array; } /** QueryParamsRequest is request type for the Query/Params RPC method. */ export interface QueryParamsRequestAmino {} export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; + type: 'cosmos-sdk/QueryParamsRequest'; value: QueryParamsRequestAmino; } /** QueryParamsResponse is response type for the Query/Params RPC method. */ @@ -659,7 +659,7 @@ export interface QueryParamsResponse { params: Params; } export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse"; + typeUrl: '/cosmos.staking.v1beta1.QueryParamsResponse'; value: Uint8Array; } /** QueryParamsResponse is response type for the Query/Params RPC method. */ @@ -668,26 +668,26 @@ export interface QueryParamsResponseAmino { params: ParamsAmino; } export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; + type: 'cosmos-sdk/QueryParamsResponse'; value: QueryParamsResponseAmino; } function createBaseQueryValidatorsRequest(): QueryValidatorsRequest { return { - status: "", + status: '', pagination: undefined }; } export const QueryValidatorsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", - aminoType: "cosmos-sdk/QueryValidatorsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorsRequest', + aminoType: 'cosmos-sdk/QueryValidatorsRequest', is(o: any): o is QueryValidatorsRequest { - return o && (o.$typeUrl === QueryValidatorsRequest.typeUrl || typeof o.status === "string"); + return o && (o.$typeUrl === QueryValidatorsRequest.typeUrl || typeof o.status === 'string'); }, isAmino(o: any): o is QueryValidatorsRequestAmino { - return o && (o.$typeUrl === QueryValidatorsRequest.typeUrl || typeof o.status === "string"); + return o && (o.$typeUrl === QueryValidatorsRequest.typeUrl || typeof o.status === 'string'); }, encode(message: QueryValidatorsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.status !== "") { + if (message.status !== '') { writer.uint32(10).string(message.status); } if (message.pagination !== undefined) { @@ -702,22 +702,22 @@ export const QueryValidatorsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.status = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryValidatorsRequest { const message = createBaseQueryValidatorsRequest(); - message.status = object.status ?? ""; + message.status = object.status ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -733,7 +733,7 @@ export const QueryValidatorsRequest = { }, toAmino(message: QueryValidatorsRequest): QueryValidatorsRequestAmino { const obj: any = {}; - obj.status = message.status === "" ? undefined : message.status; + obj.status = message.status === '' ? undefined : message.status; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -742,7 +742,7 @@ export const QueryValidatorsRequest = { }, toAminoMsg(message: QueryValidatorsRequest): QueryValidatorsRequestAminoMsg { return { - type: "cosmos-sdk/QueryValidatorsRequest", + type: 'cosmos-sdk/QueryValidatorsRequest', value: QueryValidatorsRequest.toAmino(message) }; }, @@ -754,7 +754,7 @@ export const QueryValidatorsRequest = { }, toProtoMsg(message: QueryValidatorsRequest): QueryValidatorsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorsRequest', value: QueryValidatorsRequest.encode(message).finish() }; } @@ -768,8 +768,8 @@ function createBaseQueryValidatorsResponse(): QueryValidatorsResponse { }; } export const QueryValidatorsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", - aminoType: "cosmos-sdk/QueryValidatorsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorsResponse', + aminoType: 'cosmos-sdk/QueryValidatorsResponse', is(o: any): o is QueryValidatorsResponse { return o && (o.$typeUrl === QueryValidatorsResponse.typeUrl || Array.isArray(o.validators) && (!o.validators.length || Validator.is(o.validators[0]))); }, @@ -792,15 +792,15 @@ export const QueryValidatorsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validators.push(Validator.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -834,7 +834,7 @@ export const QueryValidatorsResponse = { }, toAminoMsg(message: QueryValidatorsResponse): QueryValidatorsResponseAminoMsg { return { - type: "cosmos-sdk/QueryValidatorsResponse", + type: 'cosmos-sdk/QueryValidatorsResponse', value: QueryValidatorsResponse.toAmino(message) }; }, @@ -846,7 +846,7 @@ export const QueryValidatorsResponse = { }, toProtoMsg(message: QueryValidatorsResponse): QueryValidatorsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorsResponse', value: QueryValidatorsResponse.encode(message).finish() }; } @@ -855,20 +855,20 @@ GlobalDecoderRegistry.register(QueryValidatorsResponse.typeUrl, QueryValidatorsR GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsResponse.aminoType, QueryValidatorsResponse.typeUrl); function createBaseQueryValidatorRequest(): QueryValidatorRequest { return { - validatorAddr: "" + validatorAddr: '' }; } export const QueryValidatorRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", - aminoType: "cosmos-sdk/QueryValidatorRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorRequest', + aminoType: 'cosmos-sdk/QueryValidatorRequest', is(o: any): o is QueryValidatorRequest { - return o && (o.$typeUrl === QueryValidatorRequest.typeUrl || typeof o.validatorAddr === "string"); + return o && (o.$typeUrl === QueryValidatorRequest.typeUrl || typeof o.validatorAddr === 'string'); }, isAmino(o: any): o is QueryValidatorRequestAmino { - return o && (o.$typeUrl === QueryValidatorRequest.typeUrl || typeof o.validator_addr === "string"); + return o && (o.$typeUrl === QueryValidatorRequest.typeUrl || typeof o.validator_addr === 'string'); }, encode(message: QueryValidatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddr !== "") { + if (message.validatorAddr !== '') { writer.uint32(10).string(message.validatorAddr); } return writer; @@ -880,19 +880,19 @@ export const QueryValidatorRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryValidatorRequest { const message = createBaseQueryValidatorRequest(); - message.validatorAddr = object.validatorAddr ?? ""; + message.validatorAddr = object.validatorAddr ?? ''; return message; }, fromAmino(object: QueryValidatorRequestAmino): QueryValidatorRequest { @@ -904,7 +904,7 @@ export const QueryValidatorRequest = { }, toAmino(message: QueryValidatorRequest): QueryValidatorRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.validator_addr = message.validatorAddr === '' ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryValidatorRequestAminoMsg): QueryValidatorRequest { @@ -912,7 +912,7 @@ export const QueryValidatorRequest = { }, toAminoMsg(message: QueryValidatorRequest): QueryValidatorRequestAminoMsg { return { - type: "cosmos-sdk/QueryValidatorRequest", + type: 'cosmos-sdk/QueryValidatorRequest', value: QueryValidatorRequest.toAmino(message) }; }, @@ -924,7 +924,7 @@ export const QueryValidatorRequest = { }, toProtoMsg(message: QueryValidatorRequest): QueryValidatorRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorRequest', value: QueryValidatorRequest.encode(message).finish() }; } @@ -937,8 +937,8 @@ function createBaseQueryValidatorResponse(): QueryValidatorResponse { }; } export const QueryValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", - aminoType: "cosmos-sdk/QueryValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorResponse', + aminoType: 'cosmos-sdk/QueryValidatorResponse', is(o: any): o is QueryValidatorResponse { return o && (o.$typeUrl === QueryValidatorResponse.typeUrl || Validator.is(o.validator)); }, @@ -958,12 +958,12 @@ export const QueryValidatorResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validator = Validator.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -990,7 +990,7 @@ export const QueryValidatorResponse = { }, toAminoMsg(message: QueryValidatorResponse): QueryValidatorResponseAminoMsg { return { - type: "cosmos-sdk/QueryValidatorResponse", + type: 'cosmos-sdk/QueryValidatorResponse', value: QueryValidatorResponse.toAmino(message) }; }, @@ -1002,7 +1002,7 @@ export const QueryValidatorResponse = { }, toProtoMsg(message: QueryValidatorResponse): QueryValidatorResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorResponse', value: QueryValidatorResponse.encode(message).finish() }; } @@ -1011,21 +1011,21 @@ GlobalDecoderRegistry.register(QueryValidatorResponse.typeUrl, QueryValidatorRes GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorResponse.aminoType, QueryValidatorResponse.typeUrl); function createBaseQueryValidatorDelegationsRequest(): QueryValidatorDelegationsRequest { return { - validatorAddr: "", + validatorAddr: '', pagination: undefined }; } export const QueryValidatorDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", - aminoType: "cosmos-sdk/QueryValidatorDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest', + aminoType: 'cosmos-sdk/QueryValidatorDelegationsRequest', is(o: any): o is QueryValidatorDelegationsRequest { - return o && (o.$typeUrl === QueryValidatorDelegationsRequest.typeUrl || typeof o.validatorAddr === "string"); + return o && (o.$typeUrl === QueryValidatorDelegationsRequest.typeUrl || typeof o.validatorAddr === 'string'); }, isAmino(o: any): o is QueryValidatorDelegationsRequestAmino { - return o && (o.$typeUrl === QueryValidatorDelegationsRequest.typeUrl || typeof o.validator_addr === "string"); + return o && (o.$typeUrl === QueryValidatorDelegationsRequest.typeUrl || typeof o.validator_addr === 'string'); }, encode(message: QueryValidatorDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddr !== "") { + if (message.validatorAddr !== '') { writer.uint32(10).string(message.validatorAddr); } if (message.pagination !== undefined) { @@ -1040,22 +1040,22 @@ export const QueryValidatorDelegationsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validatorAddr = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryValidatorDelegationsRequest { const message = createBaseQueryValidatorDelegationsRequest(); - message.validatorAddr = object.validatorAddr ?? ""; + message.validatorAddr = object.validatorAddr ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -1071,7 +1071,7 @@ export const QueryValidatorDelegationsRequest = { }, toAmino(message: QueryValidatorDelegationsRequest): QueryValidatorDelegationsRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.validator_addr = message.validatorAddr === '' ? undefined : message.validatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -1080,7 +1080,7 @@ export const QueryValidatorDelegationsRequest = { }, toAminoMsg(message: QueryValidatorDelegationsRequest): QueryValidatorDelegationsRequestAminoMsg { return { - type: "cosmos-sdk/QueryValidatorDelegationsRequest", + type: 'cosmos-sdk/QueryValidatorDelegationsRequest', value: QueryValidatorDelegationsRequest.toAmino(message) }; }, @@ -1092,7 +1092,7 @@ export const QueryValidatorDelegationsRequest = { }, toProtoMsg(message: QueryValidatorDelegationsRequest): QueryValidatorDelegationsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest', value: QueryValidatorDelegationsRequest.encode(message).finish() }; } @@ -1106,8 +1106,8 @@ function createBaseQueryValidatorDelegationsResponse(): QueryValidatorDelegation }; } export const QueryValidatorDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", - aminoType: "cosmos-sdk/QueryValidatorDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse', + aminoType: 'cosmos-sdk/QueryValidatorDelegationsResponse', is(o: any): o is QueryValidatorDelegationsResponse { return o && (o.$typeUrl === QueryValidatorDelegationsResponse.typeUrl || Array.isArray(o.delegationResponses) && (!o.delegationResponses.length || DelegationResponse.is(o.delegationResponses[0]))); }, @@ -1130,15 +1130,15 @@ export const QueryValidatorDelegationsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1172,7 +1172,7 @@ export const QueryValidatorDelegationsResponse = { }, toAminoMsg(message: QueryValidatorDelegationsResponse): QueryValidatorDelegationsResponseAminoMsg { return { - type: "cosmos-sdk/QueryValidatorDelegationsResponse", + type: 'cosmos-sdk/QueryValidatorDelegationsResponse', value: QueryValidatorDelegationsResponse.toAmino(message) }; }, @@ -1184,7 +1184,7 @@ export const QueryValidatorDelegationsResponse = { }, toProtoMsg(message: QueryValidatorDelegationsResponse): QueryValidatorDelegationsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse', value: QueryValidatorDelegationsResponse.encode(message).finish() }; } @@ -1193,21 +1193,21 @@ GlobalDecoderRegistry.register(QueryValidatorDelegationsResponse.typeUrl, QueryV GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsResponse.aminoType, QueryValidatorDelegationsResponse.typeUrl); function createBaseQueryValidatorUnbondingDelegationsRequest(): QueryValidatorUnbondingDelegationsRequest { return { - validatorAddr: "", + validatorAddr: '', pagination: undefined }; } export const QueryValidatorUnbondingDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", - aminoType: "cosmos-sdk/QueryValidatorUnbondingDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest', + aminoType: 'cosmos-sdk/QueryValidatorUnbondingDelegationsRequest', is(o: any): o is QueryValidatorUnbondingDelegationsRequest { - return o && (o.$typeUrl === QueryValidatorUnbondingDelegationsRequest.typeUrl || typeof o.validatorAddr === "string"); + return o && (o.$typeUrl === QueryValidatorUnbondingDelegationsRequest.typeUrl || typeof o.validatorAddr === 'string'); }, isAmino(o: any): o is QueryValidatorUnbondingDelegationsRequestAmino { - return o && (o.$typeUrl === QueryValidatorUnbondingDelegationsRequest.typeUrl || typeof o.validator_addr === "string"); + return o && (o.$typeUrl === QueryValidatorUnbondingDelegationsRequest.typeUrl || typeof o.validator_addr === 'string'); }, encode(message: QueryValidatorUnbondingDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddr !== "") { + if (message.validatorAddr !== '') { writer.uint32(10).string(message.validatorAddr); } if (message.pagination !== undefined) { @@ -1222,22 +1222,22 @@ export const QueryValidatorUnbondingDelegationsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validatorAddr = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryValidatorUnbondingDelegationsRequest { const message = createBaseQueryValidatorUnbondingDelegationsRequest(); - message.validatorAddr = object.validatorAddr ?? ""; + message.validatorAddr = object.validatorAddr ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -1253,7 +1253,7 @@ export const QueryValidatorUnbondingDelegationsRequest = { }, toAmino(message: QueryValidatorUnbondingDelegationsRequest): QueryValidatorUnbondingDelegationsRequestAmino { const obj: any = {}; - obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.validator_addr = message.validatorAddr === '' ? undefined : message.validatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -1262,7 +1262,7 @@ export const QueryValidatorUnbondingDelegationsRequest = { }, toAminoMsg(message: QueryValidatorUnbondingDelegationsRequest): QueryValidatorUnbondingDelegationsRequestAminoMsg { return { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsRequest", + type: 'cosmos-sdk/QueryValidatorUnbondingDelegationsRequest', value: QueryValidatorUnbondingDelegationsRequest.toAmino(message) }; }, @@ -1274,7 +1274,7 @@ export const QueryValidatorUnbondingDelegationsRequest = { }, toProtoMsg(message: QueryValidatorUnbondingDelegationsRequest): QueryValidatorUnbondingDelegationsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest', value: QueryValidatorUnbondingDelegationsRequest.encode(message).finish() }; } @@ -1288,8 +1288,8 @@ function createBaseQueryValidatorUnbondingDelegationsResponse(): QueryValidatorU }; } export const QueryValidatorUnbondingDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", - aminoType: "cosmos-sdk/QueryValidatorUnbondingDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse', + aminoType: 'cosmos-sdk/QueryValidatorUnbondingDelegationsResponse', is(o: any): o is QueryValidatorUnbondingDelegationsResponse { return o && (o.$typeUrl === QueryValidatorUnbondingDelegationsResponse.typeUrl || Array.isArray(o.unbondingResponses) && (!o.unbondingResponses.length || UnbondingDelegation.is(o.unbondingResponses[0]))); }, @@ -1312,15 +1312,15 @@ export const QueryValidatorUnbondingDelegationsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1354,7 +1354,7 @@ export const QueryValidatorUnbondingDelegationsResponse = { }, toAminoMsg(message: QueryValidatorUnbondingDelegationsResponse): QueryValidatorUnbondingDelegationsResponseAminoMsg { return { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsResponse", + type: 'cosmos-sdk/QueryValidatorUnbondingDelegationsResponse', value: QueryValidatorUnbondingDelegationsResponse.toAmino(message) }; }, @@ -1366,7 +1366,7 @@ export const QueryValidatorUnbondingDelegationsResponse = { }, toProtoMsg(message: QueryValidatorUnbondingDelegationsResponse): QueryValidatorUnbondingDelegationsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse', value: QueryValidatorUnbondingDelegationsResponse.encode(message).finish() }; } @@ -1375,24 +1375,24 @@ GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsResponse.typeUr GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsResponse.aminoType, QueryValidatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryDelegationRequest(): QueryDelegationRequest { return { - delegatorAddr: "", - validatorAddr: "" + delegatorAddr: '', + validatorAddr: '' }; } export const QueryDelegationRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", - aminoType: "cosmos-sdk/QueryDelegationRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegationRequest', + aminoType: 'cosmos-sdk/QueryDelegationRequest', is(o: any): o is QueryDelegationRequest { - return o && (o.$typeUrl === QueryDelegationRequest.typeUrl || typeof o.delegatorAddr === "string" && typeof o.validatorAddr === "string"); + return o && (o.$typeUrl === QueryDelegationRequest.typeUrl || typeof o.delegatorAddr === 'string' && typeof o.validatorAddr === 'string'); }, isAmino(o: any): o is QueryDelegationRequestAmino { - return o && (o.$typeUrl === QueryDelegationRequest.typeUrl || typeof o.delegator_addr === "string" && typeof o.validator_addr === "string"); + return o && (o.$typeUrl === QueryDelegationRequest.typeUrl || typeof o.delegator_addr === 'string' && typeof o.validator_addr === 'string'); }, encode(message: QueryDelegationRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { + if (message.delegatorAddr !== '') { writer.uint32(10).string(message.delegatorAddr); } - if (message.validatorAddr !== "") { + if (message.validatorAddr !== '') { writer.uint32(18).string(message.validatorAddr); } return writer; @@ -1404,23 +1404,23 @@ export const QueryDelegationRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDelegationRequest { const message = createBaseQueryDelegationRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.validatorAddr = object.validatorAddr ?? ""; + message.delegatorAddr = object.delegatorAddr ?? ''; + message.validatorAddr = object.validatorAddr ?? ''; return message; }, fromAmino(object: QueryDelegationRequestAmino): QueryDelegationRequest { @@ -1435,8 +1435,8 @@ export const QueryDelegationRequest = { }, toAmino(message: QueryDelegationRequest): QueryDelegationRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; - obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.delegator_addr = message.delegatorAddr === '' ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === '' ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryDelegationRequestAminoMsg): QueryDelegationRequest { @@ -1444,7 +1444,7 @@ export const QueryDelegationRequest = { }, toAminoMsg(message: QueryDelegationRequest): QueryDelegationRequestAminoMsg { return { - type: "cosmos-sdk/QueryDelegationRequest", + type: 'cosmos-sdk/QueryDelegationRequest', value: QueryDelegationRequest.toAmino(message) }; }, @@ -1456,7 +1456,7 @@ export const QueryDelegationRequest = { }, toProtoMsg(message: QueryDelegationRequest): QueryDelegationRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegationRequest', value: QueryDelegationRequest.encode(message).finish() }; } @@ -1469,8 +1469,8 @@ function createBaseQueryDelegationResponse(): QueryDelegationResponse { }; } export const QueryDelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", - aminoType: "cosmos-sdk/QueryDelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegationResponse', + aminoType: 'cosmos-sdk/QueryDelegationResponse', is(o: any): o is QueryDelegationResponse { return o && o.$typeUrl === QueryDelegationResponse.typeUrl; }, @@ -1490,12 +1490,12 @@ export const QueryDelegationResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegationResponse = DelegationResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegationResponse = DelegationResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1522,7 +1522,7 @@ export const QueryDelegationResponse = { }, toAminoMsg(message: QueryDelegationResponse): QueryDelegationResponseAminoMsg { return { - type: "cosmos-sdk/QueryDelegationResponse", + type: 'cosmos-sdk/QueryDelegationResponse', value: QueryDelegationResponse.toAmino(message) }; }, @@ -1534,7 +1534,7 @@ export const QueryDelegationResponse = { }, toProtoMsg(message: QueryDelegationResponse): QueryDelegationResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegationResponse', value: QueryDelegationResponse.encode(message).finish() }; } @@ -1543,24 +1543,24 @@ GlobalDecoderRegistry.register(QueryDelegationResponse.typeUrl, QueryDelegationR GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationResponse.aminoType, QueryDelegationResponse.typeUrl); function createBaseQueryUnbondingDelegationRequest(): QueryUnbondingDelegationRequest { return { - delegatorAddr: "", - validatorAddr: "" + delegatorAddr: '', + validatorAddr: '' }; } export const QueryUnbondingDelegationRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", - aminoType: "cosmos-sdk/QueryUnbondingDelegationRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest', + aminoType: 'cosmos-sdk/QueryUnbondingDelegationRequest', is(o: any): o is QueryUnbondingDelegationRequest { - return o && (o.$typeUrl === QueryUnbondingDelegationRequest.typeUrl || typeof o.delegatorAddr === "string" && typeof o.validatorAddr === "string"); + return o && (o.$typeUrl === QueryUnbondingDelegationRequest.typeUrl || typeof o.delegatorAddr === 'string' && typeof o.validatorAddr === 'string'); }, isAmino(o: any): o is QueryUnbondingDelegationRequestAmino { - return o && (o.$typeUrl === QueryUnbondingDelegationRequest.typeUrl || typeof o.delegator_addr === "string" && typeof o.validator_addr === "string"); + return o && (o.$typeUrl === QueryUnbondingDelegationRequest.typeUrl || typeof o.delegator_addr === 'string' && typeof o.validator_addr === 'string'); }, encode(message: QueryUnbondingDelegationRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { + if (message.delegatorAddr !== '') { writer.uint32(10).string(message.delegatorAddr); } - if (message.validatorAddr !== "") { + if (message.validatorAddr !== '') { writer.uint32(18).string(message.validatorAddr); } return writer; @@ -1572,23 +1572,23 @@ export const QueryUnbondingDelegationRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryUnbondingDelegationRequest { const message = createBaseQueryUnbondingDelegationRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.validatorAddr = object.validatorAddr ?? ""; + message.delegatorAddr = object.delegatorAddr ?? ''; + message.validatorAddr = object.validatorAddr ?? ''; return message; }, fromAmino(object: QueryUnbondingDelegationRequestAmino): QueryUnbondingDelegationRequest { @@ -1603,8 +1603,8 @@ export const QueryUnbondingDelegationRequest = { }, toAmino(message: QueryUnbondingDelegationRequest): QueryUnbondingDelegationRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; - obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.delegator_addr = message.delegatorAddr === '' ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === '' ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryUnbondingDelegationRequestAminoMsg): QueryUnbondingDelegationRequest { @@ -1612,7 +1612,7 @@ export const QueryUnbondingDelegationRequest = { }, toAminoMsg(message: QueryUnbondingDelegationRequest): QueryUnbondingDelegationRequestAminoMsg { return { - type: "cosmos-sdk/QueryUnbondingDelegationRequest", + type: 'cosmos-sdk/QueryUnbondingDelegationRequest', value: QueryUnbondingDelegationRequest.toAmino(message) }; }, @@ -1624,7 +1624,7 @@ export const QueryUnbondingDelegationRequest = { }, toProtoMsg(message: QueryUnbondingDelegationRequest): QueryUnbondingDelegationRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest', value: QueryUnbondingDelegationRequest.encode(message).finish() }; } @@ -1637,8 +1637,8 @@ function createBaseQueryUnbondingDelegationResponse(): QueryUnbondingDelegationR }; } export const QueryUnbondingDelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", - aminoType: "cosmos-sdk/QueryUnbondingDelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse', + aminoType: 'cosmos-sdk/QueryUnbondingDelegationResponse', is(o: any): o is QueryUnbondingDelegationResponse { return o && (o.$typeUrl === QueryUnbondingDelegationResponse.typeUrl || UnbondingDelegation.is(o.unbond)); }, @@ -1658,12 +1658,12 @@ export const QueryUnbondingDelegationResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.unbond = UnbondingDelegation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.unbond = UnbondingDelegation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1690,7 +1690,7 @@ export const QueryUnbondingDelegationResponse = { }, toAminoMsg(message: QueryUnbondingDelegationResponse): QueryUnbondingDelegationResponseAminoMsg { return { - type: "cosmos-sdk/QueryUnbondingDelegationResponse", + type: 'cosmos-sdk/QueryUnbondingDelegationResponse', value: QueryUnbondingDelegationResponse.toAmino(message) }; }, @@ -1702,7 +1702,7 @@ export const QueryUnbondingDelegationResponse = { }, toProtoMsg(message: QueryUnbondingDelegationResponse): QueryUnbondingDelegationResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse', value: QueryUnbondingDelegationResponse.encode(message).finish() }; } @@ -1711,21 +1711,21 @@ GlobalDecoderRegistry.register(QueryUnbondingDelegationResponse.typeUrl, QueryUn GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationResponse.aminoType, QueryUnbondingDelegationResponse.typeUrl); function createBaseQueryDelegatorDelegationsRequest(): QueryDelegatorDelegationsRequest { return { - delegatorAddr: "", + delegatorAddr: '', pagination: undefined }; } export const QueryDelegatorDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", - aminoType: "cosmos-sdk/QueryDelegatorDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest', + aminoType: 'cosmos-sdk/QueryDelegatorDelegationsRequest', is(o: any): o is QueryDelegatorDelegationsRequest { - return o && (o.$typeUrl === QueryDelegatorDelegationsRequest.typeUrl || typeof o.delegatorAddr === "string"); + return o && (o.$typeUrl === QueryDelegatorDelegationsRequest.typeUrl || typeof o.delegatorAddr === 'string'); }, isAmino(o: any): o is QueryDelegatorDelegationsRequestAmino { - return o && (o.$typeUrl === QueryDelegatorDelegationsRequest.typeUrl || typeof o.delegator_addr === "string"); + return o && (o.$typeUrl === QueryDelegatorDelegationsRequest.typeUrl || typeof o.delegator_addr === 'string'); }, encode(message: QueryDelegatorDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { + if (message.delegatorAddr !== '') { writer.uint32(10).string(message.delegatorAddr); } if (message.pagination !== undefined) { @@ -1740,22 +1740,22 @@ export const QueryDelegatorDelegationsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDelegatorDelegationsRequest { const message = createBaseQueryDelegatorDelegationsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; + message.delegatorAddr = object.delegatorAddr ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -1771,7 +1771,7 @@ export const QueryDelegatorDelegationsRequest = { }, toAmino(message: QueryDelegatorDelegationsRequest): QueryDelegatorDelegationsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.delegator_addr = message.delegatorAddr === '' ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -1780,7 +1780,7 @@ export const QueryDelegatorDelegationsRequest = { }, toAminoMsg(message: QueryDelegatorDelegationsRequest): QueryDelegatorDelegationsRequestAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorDelegationsRequest", + type: 'cosmos-sdk/QueryDelegatorDelegationsRequest', value: QueryDelegatorDelegationsRequest.toAmino(message) }; }, @@ -1792,7 +1792,7 @@ export const QueryDelegatorDelegationsRequest = { }, toProtoMsg(message: QueryDelegatorDelegationsRequest): QueryDelegatorDelegationsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest', value: QueryDelegatorDelegationsRequest.encode(message).finish() }; } @@ -1806,8 +1806,8 @@ function createBaseQueryDelegatorDelegationsResponse(): QueryDelegatorDelegation }; } export const QueryDelegatorDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", - aminoType: "cosmos-sdk/QueryDelegatorDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse', + aminoType: 'cosmos-sdk/QueryDelegatorDelegationsResponse', is(o: any): o is QueryDelegatorDelegationsResponse { return o && (o.$typeUrl === QueryDelegatorDelegationsResponse.typeUrl || Array.isArray(o.delegationResponses) && (!o.delegationResponses.length || DelegationResponse.is(o.delegationResponses[0]))); }, @@ -1830,15 +1830,15 @@ export const QueryDelegatorDelegationsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1872,7 +1872,7 @@ export const QueryDelegatorDelegationsResponse = { }, toAminoMsg(message: QueryDelegatorDelegationsResponse): QueryDelegatorDelegationsResponseAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorDelegationsResponse", + type: 'cosmos-sdk/QueryDelegatorDelegationsResponse', value: QueryDelegatorDelegationsResponse.toAmino(message) }; }, @@ -1884,7 +1884,7 @@ export const QueryDelegatorDelegationsResponse = { }, toProtoMsg(message: QueryDelegatorDelegationsResponse): QueryDelegatorDelegationsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse', value: QueryDelegatorDelegationsResponse.encode(message).finish() }; } @@ -1893,21 +1893,21 @@ GlobalDecoderRegistry.register(QueryDelegatorDelegationsResponse.typeUrl, QueryD GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsResponse.aminoType, QueryDelegatorDelegationsResponse.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsRequest(): QueryDelegatorUnbondingDelegationsRequest { return { - delegatorAddr: "", + delegatorAddr: '', pagination: undefined }; } export const QueryDelegatorUnbondingDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", - aminoType: "cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest', + aminoType: 'cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest', is(o: any): o is QueryDelegatorUnbondingDelegationsRequest { - return o && (o.$typeUrl === QueryDelegatorUnbondingDelegationsRequest.typeUrl || typeof o.delegatorAddr === "string"); + return o && (o.$typeUrl === QueryDelegatorUnbondingDelegationsRequest.typeUrl || typeof o.delegatorAddr === 'string'); }, isAmino(o: any): o is QueryDelegatorUnbondingDelegationsRequestAmino { - return o && (o.$typeUrl === QueryDelegatorUnbondingDelegationsRequest.typeUrl || typeof o.delegator_addr === "string"); + return o && (o.$typeUrl === QueryDelegatorUnbondingDelegationsRequest.typeUrl || typeof o.delegator_addr === 'string'); }, encode(message: QueryDelegatorUnbondingDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { + if (message.delegatorAddr !== '') { writer.uint32(10).string(message.delegatorAddr); } if (message.pagination !== undefined) { @@ -1922,22 +1922,22 @@ export const QueryDelegatorUnbondingDelegationsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDelegatorUnbondingDelegationsRequest { const message = createBaseQueryDelegatorUnbondingDelegationsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; + message.delegatorAddr = object.delegatorAddr ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -1953,7 +1953,7 @@ export const QueryDelegatorUnbondingDelegationsRequest = { }, toAmino(message: QueryDelegatorUnbondingDelegationsRequest): QueryDelegatorUnbondingDelegationsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.delegator_addr = message.delegatorAddr === '' ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -1962,7 +1962,7 @@ export const QueryDelegatorUnbondingDelegationsRequest = { }, toAminoMsg(message: QueryDelegatorUnbondingDelegationsRequest): QueryDelegatorUnbondingDelegationsRequestAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest", + type: 'cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest', value: QueryDelegatorUnbondingDelegationsRequest.toAmino(message) }; }, @@ -1974,7 +1974,7 @@ export const QueryDelegatorUnbondingDelegationsRequest = { }, toProtoMsg(message: QueryDelegatorUnbondingDelegationsRequest): QueryDelegatorUnbondingDelegationsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest', value: QueryDelegatorUnbondingDelegationsRequest.encode(message).finish() }; } @@ -1988,8 +1988,8 @@ function createBaseQueryDelegatorUnbondingDelegationsResponse(): QueryDelegatorU }; } export const QueryDelegatorUnbondingDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", - aminoType: "cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse', + aminoType: 'cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse', is(o: any): o is QueryDelegatorUnbondingDelegationsResponse { return o && (o.$typeUrl === QueryDelegatorUnbondingDelegationsResponse.typeUrl || Array.isArray(o.unbondingResponses) && (!o.unbondingResponses.length || UnbondingDelegation.is(o.unbondingResponses[0]))); }, @@ -2012,15 +2012,15 @@ export const QueryDelegatorUnbondingDelegationsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2054,7 +2054,7 @@ export const QueryDelegatorUnbondingDelegationsResponse = { }, toAminoMsg(message: QueryDelegatorUnbondingDelegationsResponse): QueryDelegatorUnbondingDelegationsResponseAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse", + type: 'cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse', value: QueryDelegatorUnbondingDelegationsResponse.toAmino(message) }; }, @@ -2066,7 +2066,7 @@ export const QueryDelegatorUnbondingDelegationsResponse = { }, toProtoMsg(message: QueryDelegatorUnbondingDelegationsResponse): QueryDelegatorUnbondingDelegationsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse', value: QueryDelegatorUnbondingDelegationsResponse.encode(message).finish() }; } @@ -2075,29 +2075,29 @@ GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsResponse.typeUr GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsResponse.aminoType, QueryDelegatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryRedelegationsRequest(): QueryRedelegationsRequest { return { - delegatorAddr: "", - srcValidatorAddr: "", - dstValidatorAddr: "", + delegatorAddr: '', + srcValidatorAddr: '', + dstValidatorAddr: '', pagination: undefined }; } export const QueryRedelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", - aminoType: "cosmos-sdk/QueryRedelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryRedelegationsRequest', + aminoType: 'cosmos-sdk/QueryRedelegationsRequest', is(o: any): o is QueryRedelegationsRequest { - return o && (o.$typeUrl === QueryRedelegationsRequest.typeUrl || typeof o.delegatorAddr === "string" && typeof o.srcValidatorAddr === "string" && typeof o.dstValidatorAddr === "string"); + return o && (o.$typeUrl === QueryRedelegationsRequest.typeUrl || typeof o.delegatorAddr === 'string' && typeof o.srcValidatorAddr === 'string' && typeof o.dstValidatorAddr === 'string'); }, isAmino(o: any): o is QueryRedelegationsRequestAmino { - return o && (o.$typeUrl === QueryRedelegationsRequest.typeUrl || typeof o.delegator_addr === "string" && typeof o.src_validator_addr === "string" && typeof o.dst_validator_addr === "string"); + return o && (o.$typeUrl === QueryRedelegationsRequest.typeUrl || typeof o.delegator_addr === 'string' && typeof o.src_validator_addr === 'string' && typeof o.dst_validator_addr === 'string'); }, encode(message: QueryRedelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { + if (message.delegatorAddr !== '') { writer.uint32(10).string(message.delegatorAddr); } - if (message.srcValidatorAddr !== "") { + if (message.srcValidatorAddr !== '') { writer.uint32(18).string(message.srcValidatorAddr); } - if (message.dstValidatorAddr !== "") { + if (message.dstValidatorAddr !== '') { writer.uint32(26).string(message.dstValidatorAddr); } if (message.pagination !== undefined) { @@ -2112,30 +2112,30 @@ export const QueryRedelegationsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.srcValidatorAddr = reader.string(); - break; - case 3: - message.dstValidatorAddr = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.srcValidatorAddr = reader.string(); + break; + case 3: + message.dstValidatorAddr = reader.string(); + break; + case 4: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryRedelegationsRequest { const message = createBaseQueryRedelegationsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.srcValidatorAddr = object.srcValidatorAddr ?? ""; - message.dstValidatorAddr = object.dstValidatorAddr ?? ""; + message.delegatorAddr = object.delegatorAddr ?? ''; + message.srcValidatorAddr = object.srcValidatorAddr ?? ''; + message.dstValidatorAddr = object.dstValidatorAddr ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -2157,9 +2157,9 @@ export const QueryRedelegationsRequest = { }, toAmino(message: QueryRedelegationsRequest): QueryRedelegationsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; - obj.src_validator_addr = message.srcValidatorAddr === "" ? undefined : message.srcValidatorAddr; - obj.dst_validator_addr = message.dstValidatorAddr === "" ? undefined : message.dstValidatorAddr; + obj.delegator_addr = message.delegatorAddr === '' ? undefined : message.delegatorAddr; + obj.src_validator_addr = message.srcValidatorAddr === '' ? undefined : message.srcValidatorAddr; + obj.dst_validator_addr = message.dstValidatorAddr === '' ? undefined : message.dstValidatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -2168,7 +2168,7 @@ export const QueryRedelegationsRequest = { }, toAminoMsg(message: QueryRedelegationsRequest): QueryRedelegationsRequestAminoMsg { return { - type: "cosmos-sdk/QueryRedelegationsRequest", + type: 'cosmos-sdk/QueryRedelegationsRequest', value: QueryRedelegationsRequest.toAmino(message) }; }, @@ -2180,7 +2180,7 @@ export const QueryRedelegationsRequest = { }, toProtoMsg(message: QueryRedelegationsRequest): QueryRedelegationsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryRedelegationsRequest', value: QueryRedelegationsRequest.encode(message).finish() }; } @@ -2194,8 +2194,8 @@ function createBaseQueryRedelegationsResponse(): QueryRedelegationsResponse { }; } export const QueryRedelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", - aminoType: "cosmos-sdk/QueryRedelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryRedelegationsResponse', + aminoType: 'cosmos-sdk/QueryRedelegationsResponse', is(o: any): o is QueryRedelegationsResponse { return o && (o.$typeUrl === QueryRedelegationsResponse.typeUrl || Array.isArray(o.redelegationResponses) && (!o.redelegationResponses.length || RedelegationResponse.is(o.redelegationResponses[0]))); }, @@ -2218,15 +2218,15 @@ export const QueryRedelegationsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.redelegationResponses.push(RedelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.redelegationResponses.push(RedelegationResponse.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2260,7 +2260,7 @@ export const QueryRedelegationsResponse = { }, toAminoMsg(message: QueryRedelegationsResponse): QueryRedelegationsResponseAminoMsg { return { - type: "cosmos-sdk/QueryRedelegationsResponse", + type: 'cosmos-sdk/QueryRedelegationsResponse', value: QueryRedelegationsResponse.toAmino(message) }; }, @@ -2272,7 +2272,7 @@ export const QueryRedelegationsResponse = { }, toProtoMsg(message: QueryRedelegationsResponse): QueryRedelegationsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryRedelegationsResponse', value: QueryRedelegationsResponse.encode(message).finish() }; } @@ -2281,21 +2281,21 @@ GlobalDecoderRegistry.register(QueryRedelegationsResponse.typeUrl, QueryRedelega GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsResponse.aminoType, QueryRedelegationsResponse.typeUrl); function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { return { - delegatorAddr: "", + delegatorAddr: '', pagination: undefined }; } export const QueryDelegatorValidatorsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", - aminoType: "cosmos-sdk/QueryDelegatorValidatorsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest', + aminoType: 'cosmos-sdk/QueryDelegatorValidatorsRequest', is(o: any): o is QueryDelegatorValidatorsRequest { - return o && (o.$typeUrl === QueryDelegatorValidatorsRequest.typeUrl || typeof o.delegatorAddr === "string"); + return o && (o.$typeUrl === QueryDelegatorValidatorsRequest.typeUrl || typeof o.delegatorAddr === 'string'); }, isAmino(o: any): o is QueryDelegatorValidatorsRequestAmino { - return o && (o.$typeUrl === QueryDelegatorValidatorsRequest.typeUrl || typeof o.delegator_addr === "string"); + return o && (o.$typeUrl === QueryDelegatorValidatorsRequest.typeUrl || typeof o.delegator_addr === 'string'); }, encode(message: QueryDelegatorValidatorsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { + if (message.delegatorAddr !== '') { writer.uint32(10).string(message.delegatorAddr); } if (message.pagination !== undefined) { @@ -2310,22 +2310,22 @@ export const QueryDelegatorValidatorsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest { const message = createBaseQueryDelegatorValidatorsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; + message.delegatorAddr = object.delegatorAddr ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -2341,7 +2341,7 @@ export const QueryDelegatorValidatorsRequest = { }, toAmino(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; + obj.delegator_addr = message.delegatorAddr === '' ? undefined : message.delegatorAddr; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -2350,7 +2350,7 @@ export const QueryDelegatorValidatorsRequest = { }, toAminoMsg(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorValidatorsRequest", + type: 'cosmos-sdk/QueryDelegatorValidatorsRequest', value: QueryDelegatorValidatorsRequest.toAmino(message) }; }, @@ -2362,7 +2362,7 @@ export const QueryDelegatorValidatorsRequest = { }, toProtoMsg(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest', value: QueryDelegatorValidatorsRequest.encode(message).finish() }; } @@ -2376,8 +2376,8 @@ function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsR }; } export const QueryDelegatorValidatorsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", - aminoType: "cosmos-sdk/QueryDelegatorValidatorsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse', + aminoType: 'cosmos-sdk/QueryDelegatorValidatorsResponse', is(o: any): o is QueryDelegatorValidatorsResponse { return o && (o.$typeUrl === QueryDelegatorValidatorsResponse.typeUrl || Array.isArray(o.validators) && (!o.validators.length || Validator.is(o.validators[0]))); }, @@ -2400,15 +2400,15 @@ export const QueryDelegatorValidatorsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validators.push(Validator.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2442,7 +2442,7 @@ export const QueryDelegatorValidatorsResponse = { }, toAminoMsg(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorValidatorsResponse", + type: 'cosmos-sdk/QueryDelegatorValidatorsResponse', value: QueryDelegatorValidatorsResponse.toAmino(message) }; }, @@ -2454,7 +2454,7 @@ export const QueryDelegatorValidatorsResponse = { }, toProtoMsg(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse', value: QueryDelegatorValidatorsResponse.encode(message).finish() }; } @@ -2463,24 +2463,24 @@ GlobalDecoderRegistry.register(QueryDelegatorValidatorsResponse.typeUrl, QueryDe GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsResponse.aminoType, QueryDelegatorValidatorsResponse.typeUrl); function createBaseQueryDelegatorValidatorRequest(): QueryDelegatorValidatorRequest { return { - delegatorAddr: "", - validatorAddr: "" + delegatorAddr: '', + validatorAddr: '' }; } export const QueryDelegatorValidatorRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", - aminoType: "cosmos-sdk/QueryDelegatorValidatorRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest', + aminoType: 'cosmos-sdk/QueryDelegatorValidatorRequest', is(o: any): o is QueryDelegatorValidatorRequest { - return o && (o.$typeUrl === QueryDelegatorValidatorRequest.typeUrl || typeof o.delegatorAddr === "string" && typeof o.validatorAddr === "string"); + return o && (o.$typeUrl === QueryDelegatorValidatorRequest.typeUrl || typeof o.delegatorAddr === 'string' && typeof o.validatorAddr === 'string'); }, isAmino(o: any): o is QueryDelegatorValidatorRequestAmino { - return o && (o.$typeUrl === QueryDelegatorValidatorRequest.typeUrl || typeof o.delegator_addr === "string" && typeof o.validator_addr === "string"); + return o && (o.$typeUrl === QueryDelegatorValidatorRequest.typeUrl || typeof o.delegator_addr === 'string' && typeof o.validator_addr === 'string'); }, encode(message: QueryDelegatorValidatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { + if (message.delegatorAddr !== '') { writer.uint32(10).string(message.delegatorAddr); } - if (message.validatorAddr !== "") { + if (message.validatorAddr !== '') { writer.uint32(18).string(message.validatorAddr); } return writer; @@ -2492,23 +2492,23 @@ export const QueryDelegatorValidatorRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryDelegatorValidatorRequest { const message = createBaseQueryDelegatorValidatorRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.validatorAddr = object.validatorAddr ?? ""; + message.delegatorAddr = object.delegatorAddr ?? ''; + message.validatorAddr = object.validatorAddr ?? ''; return message; }, fromAmino(object: QueryDelegatorValidatorRequestAmino): QueryDelegatorValidatorRequest { @@ -2523,8 +2523,8 @@ export const QueryDelegatorValidatorRequest = { }, toAmino(message: QueryDelegatorValidatorRequest): QueryDelegatorValidatorRequestAmino { const obj: any = {}; - obj.delegator_addr = message.delegatorAddr === "" ? undefined : message.delegatorAddr; - obj.validator_addr = message.validatorAddr === "" ? undefined : message.validatorAddr; + obj.delegator_addr = message.delegatorAddr === '' ? undefined : message.delegatorAddr; + obj.validator_addr = message.validatorAddr === '' ? undefined : message.validatorAddr; return obj; }, fromAminoMsg(object: QueryDelegatorValidatorRequestAminoMsg): QueryDelegatorValidatorRequest { @@ -2532,7 +2532,7 @@ export const QueryDelegatorValidatorRequest = { }, toAminoMsg(message: QueryDelegatorValidatorRequest): QueryDelegatorValidatorRequestAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorValidatorRequest", + type: 'cosmos-sdk/QueryDelegatorValidatorRequest', value: QueryDelegatorValidatorRequest.toAmino(message) }; }, @@ -2544,7 +2544,7 @@ export const QueryDelegatorValidatorRequest = { }, toProtoMsg(message: QueryDelegatorValidatorRequest): QueryDelegatorValidatorRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest', value: QueryDelegatorValidatorRequest.encode(message).finish() }; } @@ -2557,8 +2557,8 @@ function createBaseQueryDelegatorValidatorResponse(): QueryDelegatorValidatorRes }; } export const QueryDelegatorValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", - aminoType: "cosmos-sdk/QueryDelegatorValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse', + aminoType: 'cosmos-sdk/QueryDelegatorValidatorResponse', is(o: any): o is QueryDelegatorValidatorResponse { return o && (o.$typeUrl === QueryDelegatorValidatorResponse.typeUrl || Validator.is(o.validator)); }, @@ -2578,12 +2578,12 @@ export const QueryDelegatorValidatorResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validator = Validator.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2610,7 +2610,7 @@ export const QueryDelegatorValidatorResponse = { }, toAminoMsg(message: QueryDelegatorValidatorResponse): QueryDelegatorValidatorResponseAminoMsg { return { - type: "cosmos-sdk/QueryDelegatorValidatorResponse", + type: 'cosmos-sdk/QueryDelegatorValidatorResponse', value: QueryDelegatorValidatorResponse.toAmino(message) }; }, @@ -2622,7 +2622,7 @@ export const QueryDelegatorValidatorResponse = { }, toProtoMsg(message: QueryDelegatorValidatorResponse): QueryDelegatorValidatorResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse', value: QueryDelegatorValidatorResponse.encode(message).finish() }; } @@ -2635,13 +2635,13 @@ function createBaseQueryHistoricalInfoRequest(): QueryHistoricalInfoRequest { }; } export const QueryHistoricalInfoRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", - aminoType: "cosmos-sdk/QueryHistoricalInfoRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryHistoricalInfoRequest', + aminoType: 'cosmos-sdk/QueryHistoricalInfoRequest', is(o: any): o is QueryHistoricalInfoRequest { - return o && (o.$typeUrl === QueryHistoricalInfoRequest.typeUrl || typeof o.height === "bigint"); + return o && (o.$typeUrl === QueryHistoricalInfoRequest.typeUrl || typeof o.height === 'bigint'); }, isAmino(o: any): o is QueryHistoricalInfoRequestAmino { - return o && (o.$typeUrl === QueryHistoricalInfoRequest.typeUrl || typeof o.height === "bigint"); + return o && (o.$typeUrl === QueryHistoricalInfoRequest.typeUrl || typeof o.height === 'bigint'); }, encode(message: QueryHistoricalInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.height !== BigInt(0)) { @@ -2656,12 +2656,12 @@ export const QueryHistoricalInfoRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2688,7 +2688,7 @@ export const QueryHistoricalInfoRequest = { }, toAminoMsg(message: QueryHistoricalInfoRequest): QueryHistoricalInfoRequestAminoMsg { return { - type: "cosmos-sdk/QueryHistoricalInfoRequest", + type: 'cosmos-sdk/QueryHistoricalInfoRequest', value: QueryHistoricalInfoRequest.toAmino(message) }; }, @@ -2700,7 +2700,7 @@ export const QueryHistoricalInfoRequest = { }, toProtoMsg(message: QueryHistoricalInfoRequest): QueryHistoricalInfoRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryHistoricalInfoRequest', value: QueryHistoricalInfoRequest.encode(message).finish() }; } @@ -2713,8 +2713,8 @@ function createBaseQueryHistoricalInfoResponse(): QueryHistoricalInfoResponse { }; } export const QueryHistoricalInfoResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", - aminoType: "cosmos-sdk/QueryHistoricalInfoResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryHistoricalInfoResponse', + aminoType: 'cosmos-sdk/QueryHistoricalInfoResponse', is(o: any): o is QueryHistoricalInfoResponse { return o && o.$typeUrl === QueryHistoricalInfoResponse.typeUrl; }, @@ -2734,12 +2734,12 @@ export const QueryHistoricalInfoResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hist = HistoricalInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hist = HistoricalInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2766,7 +2766,7 @@ export const QueryHistoricalInfoResponse = { }, toAminoMsg(message: QueryHistoricalInfoResponse): QueryHistoricalInfoResponseAminoMsg { return { - type: "cosmos-sdk/QueryHistoricalInfoResponse", + type: 'cosmos-sdk/QueryHistoricalInfoResponse', value: QueryHistoricalInfoResponse.toAmino(message) }; }, @@ -2778,7 +2778,7 @@ export const QueryHistoricalInfoResponse = { }, toProtoMsg(message: QueryHistoricalInfoResponse): QueryHistoricalInfoResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryHistoricalInfoResponse', value: QueryHistoricalInfoResponse.encode(message).finish() }; } @@ -2789,8 +2789,8 @@ function createBaseQueryPoolRequest(): QueryPoolRequest { return {}; } export const QueryPoolRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", - aminoType: "cosmos-sdk/QueryPoolRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryPoolRequest', + aminoType: 'cosmos-sdk/QueryPoolRequest', is(o: any): o is QueryPoolRequest { return o && o.$typeUrl === QueryPoolRequest.typeUrl; }, @@ -2807,9 +2807,9 @@ export const QueryPoolRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2831,7 +2831,7 @@ export const QueryPoolRequest = { }, toAminoMsg(message: QueryPoolRequest): QueryPoolRequestAminoMsg { return { - type: "cosmos-sdk/QueryPoolRequest", + type: 'cosmos-sdk/QueryPoolRequest', value: QueryPoolRequest.toAmino(message) }; }, @@ -2843,7 +2843,7 @@ export const QueryPoolRequest = { }, toProtoMsg(message: QueryPoolRequest): QueryPoolRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryPoolRequest', value: QueryPoolRequest.encode(message).finish() }; } @@ -2856,8 +2856,8 @@ function createBaseQueryPoolResponse(): QueryPoolResponse { }; } export const QueryPoolResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", - aminoType: "cosmos-sdk/QueryPoolResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryPoolResponse', + aminoType: 'cosmos-sdk/QueryPoolResponse', is(o: any): o is QueryPoolResponse { return o && (o.$typeUrl === QueryPoolResponse.typeUrl || Pool.is(o.pool)); }, @@ -2877,12 +2877,12 @@ export const QueryPoolResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pool = Pool.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pool = Pool.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2909,7 +2909,7 @@ export const QueryPoolResponse = { }, toAminoMsg(message: QueryPoolResponse): QueryPoolResponseAminoMsg { return { - type: "cosmos-sdk/QueryPoolResponse", + type: 'cosmos-sdk/QueryPoolResponse', value: QueryPoolResponse.toAmino(message) }; }, @@ -2921,7 +2921,7 @@ export const QueryPoolResponse = { }, toProtoMsg(message: QueryPoolResponse): QueryPoolResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryPoolResponse', value: QueryPoolResponse.encode(message).finish() }; } @@ -2932,8 +2932,8 @@ function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } export const QueryParamsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryParamsRequest', + aminoType: 'cosmos-sdk/QueryParamsRequest', is(o: any): o is QueryParamsRequest { return o && o.$typeUrl === QueryParamsRequest.typeUrl; }, @@ -2950,9 +2950,9 @@ export const QueryParamsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2974,7 +2974,7 @@ export const QueryParamsRequest = { }, toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { return { - type: "cosmos-sdk/QueryParamsRequest", + type: 'cosmos-sdk/QueryParamsRequest', value: QueryParamsRequest.toAmino(message) }; }, @@ -2986,7 +2986,7 @@ export const QueryParamsRequest = { }, toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", + typeUrl: '/cosmos.staking.v1beta1.QueryParamsRequest', value: QueryParamsRequest.encode(message).finish() }; } @@ -2999,8 +2999,8 @@ function createBaseQueryParamsResponse(): QueryParamsResponse { }; } export const QueryParamsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryParamsResponse', + aminoType: 'cosmos-sdk/QueryParamsResponse', is(o: any): o is QueryParamsResponse { return o && (o.$typeUrl === QueryParamsResponse.typeUrl || Params.is(o.params)); }, @@ -3020,12 +3020,12 @@ export const QueryParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3052,7 +3052,7 @@ export const QueryParamsResponse = { }, toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { return { - type: "cosmos-sdk/QueryParamsResponse", + type: 'cosmos-sdk/QueryParamsResponse', value: QueryParamsResponse.toAmino(message) }; }, @@ -3064,7 +3064,7 @@ export const QueryParamsResponse = { }, toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", + typeUrl: '/cosmos.staking.v1beta1.QueryParamsResponse', value: QueryParamsResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/staking/v1beta1/staking.ts b/libs/cosmos-types/cosmos/staking/v1beta1/staking.ts index 2b5676ce..324f0bb5 100644 --- a/libs/cosmos-types/cosmos/staking/v1beta1/staking.ts +++ b/libs/cosmos-types/cosmos/staking/v1beta1/staking.ts @@ -1,13 +1,14 @@ -import { Header, HeaderAmino } from "../../../tendermint/types/types"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { Duration, DurationAmino } from "../../../google/protobuf/duration"; -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; -import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; +import { decodePubkey,encodePubkey } from '@cosmjs/proto-signing'; + +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { Duration, DurationAmino } from '../../../google/protobuf/duration'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { DeepPartial, fromTimestamp, isSet,toTimestamp } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { ValidatorUpdate, ValidatorUpdateAmino } from '../../../tendermint/abci/types'; +import { Header, HeaderAmino } from '../../../tendermint/types/types'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; /** BondStatus is the status of a validator. */ export enum BondStatus { /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ @@ -23,37 +24,37 @@ export enum BondStatus { export const BondStatusAmino = BondStatus; export function bondStatusFromJSON(object: any): BondStatus { switch (object) { - case 0: - case "BOND_STATUS_UNSPECIFIED": - return BondStatus.BOND_STATUS_UNSPECIFIED; - case 1: - case "BOND_STATUS_UNBONDED": - return BondStatus.BOND_STATUS_UNBONDED; - case 2: - case "BOND_STATUS_UNBONDING": - return BondStatus.BOND_STATUS_UNBONDING; - case 3: - case "BOND_STATUS_BONDED": - return BondStatus.BOND_STATUS_BONDED; - case -1: - case "UNRECOGNIZED": - default: - return BondStatus.UNRECOGNIZED; + case 0: + case 'BOND_STATUS_UNSPECIFIED': + return BondStatus.BOND_STATUS_UNSPECIFIED; + case 1: + case 'BOND_STATUS_UNBONDED': + return BondStatus.BOND_STATUS_UNBONDED; + case 2: + case 'BOND_STATUS_UNBONDING': + return BondStatus.BOND_STATUS_UNBONDING; + case 3: + case 'BOND_STATUS_BONDED': + return BondStatus.BOND_STATUS_BONDED; + case -1: + case 'UNRECOGNIZED': + default: + return BondStatus.UNRECOGNIZED; } } export function bondStatusToJSON(object: BondStatus): string { switch (object) { - case BondStatus.BOND_STATUS_UNSPECIFIED: - return "BOND_STATUS_UNSPECIFIED"; - case BondStatus.BOND_STATUS_UNBONDED: - return "BOND_STATUS_UNBONDED"; - case BondStatus.BOND_STATUS_UNBONDING: - return "BOND_STATUS_UNBONDING"; - case BondStatus.BOND_STATUS_BONDED: - return "BOND_STATUS_BONDED"; - case BondStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case BondStatus.BOND_STATUS_UNSPECIFIED: + return 'BOND_STATUS_UNSPECIFIED'; + case BondStatus.BOND_STATUS_UNBONDED: + return 'BOND_STATUS_UNBONDED'; + case BondStatus.BOND_STATUS_UNBONDING: + return 'BOND_STATUS_UNBONDING'; + case BondStatus.BOND_STATUS_BONDED: + return 'BOND_STATUS_BONDED'; + case BondStatus.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** Infraction indicates the infraction a validator commited. */ @@ -69,32 +70,32 @@ export enum Infraction { export const InfractionAmino = Infraction; export function infractionFromJSON(object: any): Infraction { switch (object) { - case 0: - case "INFRACTION_UNSPECIFIED": - return Infraction.INFRACTION_UNSPECIFIED; - case 1: - case "INFRACTION_DOUBLE_SIGN": - return Infraction.INFRACTION_DOUBLE_SIGN; - case 2: - case "INFRACTION_DOWNTIME": - return Infraction.INFRACTION_DOWNTIME; - case -1: - case "UNRECOGNIZED": - default: - return Infraction.UNRECOGNIZED; + case 0: + case 'INFRACTION_UNSPECIFIED': + return Infraction.INFRACTION_UNSPECIFIED; + case 1: + case 'INFRACTION_DOUBLE_SIGN': + return Infraction.INFRACTION_DOUBLE_SIGN; + case 2: + case 'INFRACTION_DOWNTIME': + return Infraction.INFRACTION_DOWNTIME; + case -1: + case 'UNRECOGNIZED': + default: + return Infraction.UNRECOGNIZED; } } export function infractionToJSON(object: Infraction): string { switch (object) { - case Infraction.INFRACTION_UNSPECIFIED: - return "INFRACTION_UNSPECIFIED"; - case Infraction.INFRACTION_DOUBLE_SIGN: - return "INFRACTION_DOUBLE_SIGN"; - case Infraction.INFRACTION_DOWNTIME: - return "INFRACTION_DOWNTIME"; - case Infraction.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case Infraction.INFRACTION_UNSPECIFIED: + return 'INFRACTION_UNSPECIFIED'; + case Infraction.INFRACTION_DOUBLE_SIGN: + return 'INFRACTION_DOUBLE_SIGN'; + case Infraction.INFRACTION_DOWNTIME: + return 'INFRACTION_DOWNTIME'; + case Infraction.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -108,7 +109,7 @@ export interface HistoricalInfo { valset: Validator[]; } export interface HistoricalInfoProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo"; + typeUrl: '/cosmos.staking.v1beta1.HistoricalInfo'; value: Uint8Array; } /** @@ -122,7 +123,7 @@ export interface HistoricalInfoAmino { valset: ValidatorAmino[]; } export interface HistoricalInfoAminoMsg { - type: "cosmos-sdk/HistoricalInfo"; + type: 'cosmos-sdk/HistoricalInfo'; value: HistoricalInfoAmino; } /** @@ -138,7 +139,7 @@ export interface CommissionRates { maxChangeRate: string; } export interface CommissionRatesProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.CommissionRates"; + typeUrl: '/cosmos.staking.v1beta1.CommissionRates'; value: Uint8Array; } /** @@ -154,7 +155,7 @@ export interface CommissionRatesAmino { max_change_rate: string; } export interface CommissionRatesAminoMsg { - type: "cosmos-sdk/CommissionRates"; + type: 'cosmos-sdk/CommissionRates'; value: CommissionRatesAmino; } /** Commission defines commission parameters for a given validator. */ @@ -165,7 +166,7 @@ export interface Commission { updateTime: Date; } export interface CommissionProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Commission"; + typeUrl: '/cosmos.staking.v1beta1.Commission'; value: Uint8Array; } /** Commission defines commission parameters for a given validator. */ @@ -176,7 +177,7 @@ export interface CommissionAmino { update_time: string; } export interface CommissionAminoMsg { - type: "cosmos-sdk/Commission"; + type: 'cosmos-sdk/Commission'; value: CommissionAmino; } /** Description defines a validator description. */ @@ -193,7 +194,7 @@ export interface Description { details: string; } export interface DescriptionProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Description"; + typeUrl: '/cosmos.staking.v1beta1.Description'; value: Uint8Array; } /** Description defines a validator description. */ @@ -210,7 +211,7 @@ export interface DescriptionAmino { details: string; } export interface DescriptionAminoMsg { - type: "cosmos-sdk/Description"; + type: 'cosmos-sdk/Description'; value: DescriptionAmino; } /** @@ -256,10 +257,10 @@ export interface Validator { unbondingIds: bigint[]; } export interface ValidatorProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Validator"; + typeUrl: '/cosmos.staking.v1beta1.Validator'; value: Uint8Array; } -export type ValidatorEncoded = Omit & { +export type ValidatorEncoded = Omit & { /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */consensusPubkey?: AnyProtoMsg | undefined; }; /** @@ -305,7 +306,7 @@ export interface ValidatorAmino { unbonding_ids: string[]; } export interface ValidatorAminoMsg { - type: "cosmos-sdk/Validator"; + type: 'cosmos-sdk/Validator'; value: ValidatorAmino; } /** ValAddresses defines a repeated set of validator addresses. */ @@ -313,7 +314,7 @@ export interface ValAddresses { addresses: string[]; } export interface ValAddressesProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.ValAddresses"; + typeUrl: '/cosmos.staking.v1beta1.ValAddresses'; value: Uint8Array; } /** ValAddresses defines a repeated set of validator addresses. */ @@ -321,7 +322,7 @@ export interface ValAddressesAmino { addresses: string[]; } export interface ValAddressesAminoMsg { - type: "cosmos-sdk/ValAddresses"; + type: 'cosmos-sdk/ValAddresses'; value: ValAddressesAmino; } /** @@ -334,7 +335,7 @@ export interface DVPair { validatorAddress: string; } export interface DVPairProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVPair"; + typeUrl: '/cosmos.staking.v1beta1.DVPair'; value: Uint8Array; } /** @@ -347,7 +348,7 @@ export interface DVPairAmino { validator_address: string; } export interface DVPairAminoMsg { - type: "cosmos-sdk/DVPair"; + type: 'cosmos-sdk/DVPair'; value: DVPairAmino; } /** DVPairs defines an array of DVPair objects. */ @@ -355,7 +356,7 @@ export interface DVPairs { pairs: DVPair[]; } export interface DVPairsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVPairs"; + typeUrl: '/cosmos.staking.v1beta1.DVPairs'; value: Uint8Array; } /** DVPairs defines an array of DVPair objects. */ @@ -363,7 +364,7 @@ export interface DVPairsAmino { pairs: DVPairAmino[]; } export interface DVPairsAminoMsg { - type: "cosmos-sdk/DVPairs"; + type: 'cosmos-sdk/DVPairs'; value: DVPairsAmino; } /** @@ -378,7 +379,7 @@ export interface DVVTriplet { validatorDstAddress: string; } export interface DVVTripletProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplet"; + typeUrl: '/cosmos.staking.v1beta1.DVVTriplet'; value: Uint8Array; } /** @@ -393,7 +394,7 @@ export interface DVVTripletAmino { validator_dst_address: string; } export interface DVVTripletAminoMsg { - type: "cosmos-sdk/DVVTriplet"; + type: 'cosmos-sdk/DVVTriplet'; value: DVVTripletAmino; } /** DVVTriplets defines an array of DVVTriplet objects. */ @@ -401,7 +402,7 @@ export interface DVVTriplets { triplets: DVVTriplet[]; } export interface DVVTripletsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplets"; + typeUrl: '/cosmos.staking.v1beta1.DVVTriplets'; value: Uint8Array; } /** DVVTriplets defines an array of DVVTriplet objects. */ @@ -409,7 +410,7 @@ export interface DVVTripletsAmino { triplets: DVVTripletAmino[]; } export interface DVVTripletsAminoMsg { - type: "cosmos-sdk/DVVTriplets"; + type: 'cosmos-sdk/DVVTriplets'; value: DVVTripletsAmino; } /** @@ -426,7 +427,7 @@ export interface Delegation { shares: string; } export interface DelegationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Delegation"; + typeUrl: '/cosmos.staking.v1beta1.Delegation'; value: Uint8Array; } /** @@ -443,7 +444,7 @@ export interface DelegationAmino { shares: string; } export interface DelegationAminoMsg { - type: "cosmos-sdk/Delegation"; + type: 'cosmos-sdk/Delegation'; value: DelegationAmino; } /** @@ -459,7 +460,7 @@ export interface UnbondingDelegation { entries: UnbondingDelegationEntry[]; } export interface UnbondingDelegationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation"; + typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegation'; value: Uint8Array; } /** @@ -475,7 +476,7 @@ export interface UnbondingDelegationAmino { entries: UnbondingDelegationEntryAmino[]; } export interface UnbondingDelegationAminoMsg { - type: "cosmos-sdk/UnbondingDelegation"; + type: 'cosmos-sdk/UnbondingDelegation'; value: UnbondingDelegationAmino; } /** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ @@ -494,7 +495,7 @@ export interface UnbondingDelegationEntry { unbondingOnHoldRefCount: bigint; } export interface UnbondingDelegationEntryProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry"; + typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegationEntry'; value: Uint8Array; } /** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ @@ -513,7 +514,7 @@ export interface UnbondingDelegationEntryAmino { unbonding_on_hold_ref_count: string; } export interface UnbondingDelegationEntryAminoMsg { - type: "cosmos-sdk/UnbondingDelegationEntry"; + type: 'cosmos-sdk/UnbondingDelegationEntry'; value: UnbondingDelegationEntryAmino; } /** RedelegationEntry defines a redelegation object with relevant metadata. */ @@ -532,7 +533,7 @@ export interface RedelegationEntry { unbondingOnHoldRefCount: bigint; } export interface RedelegationEntryProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry"; + typeUrl: '/cosmos.staking.v1beta1.RedelegationEntry'; value: Uint8Array; } /** RedelegationEntry defines a redelegation object with relevant metadata. */ @@ -551,7 +552,7 @@ export interface RedelegationEntryAmino { unbonding_on_hold_ref_count: string; } export interface RedelegationEntryAminoMsg { - type: "cosmos-sdk/RedelegationEntry"; + type: 'cosmos-sdk/RedelegationEntry'; value: RedelegationEntryAmino; } /** @@ -569,7 +570,7 @@ export interface Redelegation { entries: RedelegationEntry[]; } export interface RedelegationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Redelegation"; + typeUrl: '/cosmos.staking.v1beta1.Redelegation'; value: Uint8Array; } /** @@ -587,7 +588,7 @@ export interface RedelegationAmino { entries: RedelegationEntryAmino[]; } export interface RedelegationAminoMsg { - type: "cosmos-sdk/Redelegation"; + type: 'cosmos-sdk/Redelegation'; value: RedelegationAmino; } /** Params defines the parameters for the x/staking module. */ @@ -606,7 +607,7 @@ export interface Params { minCommissionRate: string; } export interface ParamsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Params"; + typeUrl: '/cosmos.staking.v1beta1.Params'; value: Uint8Array; } /** Params defines the parameters for the x/staking module. */ @@ -625,7 +626,7 @@ export interface ParamsAmino { min_commission_rate: string; } export interface ParamsAminoMsg { - type: "cosmos-sdk/x/staking/Params"; + type: 'cosmos-sdk/x/staking/Params'; value: ParamsAmino; } /** @@ -637,7 +638,7 @@ export interface DelegationResponse { balance: Coin; } export interface DelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DelegationResponse"; + typeUrl: '/cosmos.staking.v1beta1.DelegationResponse'; value: Uint8Array; } /** @@ -649,7 +650,7 @@ export interface DelegationResponseAmino { balance: CoinAmino; } export interface DelegationResponseAminoMsg { - type: "cosmos-sdk/DelegationResponse"; + type: 'cosmos-sdk/DelegationResponse'; value: DelegationResponseAmino; } /** @@ -662,7 +663,7 @@ export interface RedelegationEntryResponse { balance: string; } export interface RedelegationEntryResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse"; + typeUrl: '/cosmos.staking.v1beta1.RedelegationEntryResponse'; value: Uint8Array; } /** @@ -675,7 +676,7 @@ export interface RedelegationEntryResponseAmino { balance: string; } export interface RedelegationEntryResponseAminoMsg { - type: "cosmos-sdk/RedelegationEntryResponse"; + type: 'cosmos-sdk/RedelegationEntryResponse'; value: RedelegationEntryResponseAmino; } /** @@ -688,7 +689,7 @@ export interface RedelegationResponse { entries: RedelegationEntryResponse[]; } export interface RedelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse"; + typeUrl: '/cosmos.staking.v1beta1.RedelegationResponse'; value: Uint8Array; } /** @@ -701,7 +702,7 @@ export interface RedelegationResponseAmino { entries: RedelegationEntryResponseAmino[]; } export interface RedelegationResponseAminoMsg { - type: "cosmos-sdk/RedelegationResponse"; + type: 'cosmos-sdk/RedelegationResponse'; value: RedelegationResponseAmino; } /** @@ -713,7 +714,7 @@ export interface Pool { bondedTokens: string; } export interface PoolProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Pool"; + typeUrl: '/cosmos.staking.v1beta1.Pool'; value: Uint8Array; } /** @@ -725,7 +726,7 @@ export interface PoolAmino { bonded_tokens: string; } export interface PoolAminoMsg { - type: "cosmos-sdk/Pool"; + type: 'cosmos-sdk/Pool'; value: PoolAmino; } /** @@ -736,7 +737,7 @@ export interface ValidatorUpdates { updates: ValidatorUpdate[]; } export interface ValidatorUpdatesProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates"; + typeUrl: '/cosmos.staking.v1beta1.ValidatorUpdates'; value: Uint8Array; } /** @@ -747,7 +748,7 @@ export interface ValidatorUpdatesAmino { updates: ValidatorUpdateAmino[]; } export interface ValidatorUpdatesAminoMsg { - type: "cosmos-sdk/ValidatorUpdates"; + type: 'cosmos-sdk/ValidatorUpdates'; value: ValidatorUpdatesAmino; } function createBaseHistoricalInfo(): HistoricalInfo { @@ -757,8 +758,8 @@ function createBaseHistoricalInfo(): HistoricalInfo { }; } export const HistoricalInfo = { - typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", - aminoType: "cosmos-sdk/HistoricalInfo", + typeUrl: '/cosmos.staking.v1beta1.HistoricalInfo', + aminoType: 'cosmos-sdk/HistoricalInfo', is(o: any): o is HistoricalInfo { return o && (o.$typeUrl === HistoricalInfo.typeUrl || Header.is(o.header) && Array.isArray(o.valset) && (!o.valset.length || Validator.is(o.valset[0]))); }, @@ -781,15 +782,15 @@ export const HistoricalInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.valset.push(Validator.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.header = Header.decode(reader, reader.uint32()); + break; + case 2: + message.valset.push(Validator.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -823,7 +824,7 @@ export const HistoricalInfo = { }, toAminoMsg(message: HistoricalInfo): HistoricalInfoAminoMsg { return { - type: "cosmos-sdk/HistoricalInfo", + type: 'cosmos-sdk/HistoricalInfo', value: HistoricalInfo.toAmino(message) }; }, @@ -835,7 +836,7 @@ export const HistoricalInfo = { }, toProtoMsg(message: HistoricalInfo): HistoricalInfoProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", + typeUrl: '/cosmos.staking.v1beta1.HistoricalInfo', value: HistoricalInfo.encode(message).finish() }; } @@ -844,28 +845,28 @@ GlobalDecoderRegistry.register(HistoricalInfo.typeUrl, HistoricalInfo); GlobalDecoderRegistry.registerAminoProtoMapping(HistoricalInfo.aminoType, HistoricalInfo.typeUrl); function createBaseCommissionRates(): CommissionRates { return { - rate: "", - maxRate: "", - maxChangeRate: "" + rate: '', + maxRate: '', + maxChangeRate: '' }; } export const CommissionRates = { - typeUrl: "/cosmos.staking.v1beta1.CommissionRates", - aminoType: "cosmos-sdk/CommissionRates", + typeUrl: '/cosmos.staking.v1beta1.CommissionRates', + aminoType: 'cosmos-sdk/CommissionRates', is(o: any): o is CommissionRates { - return o && (o.$typeUrl === CommissionRates.typeUrl || typeof o.rate === "string" && typeof o.maxRate === "string" && typeof o.maxChangeRate === "string"); + return o && (o.$typeUrl === CommissionRates.typeUrl || typeof o.rate === 'string' && typeof o.maxRate === 'string' && typeof o.maxChangeRate === 'string'); }, isAmino(o: any): o is CommissionRatesAmino { - return o && (o.$typeUrl === CommissionRates.typeUrl || typeof o.rate === "string" && typeof o.max_rate === "string" && typeof o.max_change_rate === "string"); + return o && (o.$typeUrl === CommissionRates.typeUrl || typeof o.rate === 'string' && typeof o.max_rate === 'string' && typeof o.max_change_rate === 'string'); }, encode(message: CommissionRates, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.rate !== "") { + if (message.rate !== '') { writer.uint32(10).string(message.rate); } - if (message.maxRate !== "") { + if (message.maxRate !== '') { writer.uint32(18).string(message.maxRate); } - if (message.maxChangeRate !== "") { + if (message.maxChangeRate !== '') { writer.uint32(26).string(message.maxChangeRate); } return writer; @@ -877,27 +878,27 @@ export const CommissionRates = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rate = reader.string(); - break; - case 2: - message.maxRate = reader.string(); - break; - case 3: - message.maxChangeRate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.rate = reader.string(); + break; + case 2: + message.maxRate = reader.string(); + break; + case 3: + message.maxChangeRate = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): CommissionRates { const message = createBaseCommissionRates(); - message.rate = object.rate ?? ""; - message.maxRate = object.maxRate ?? ""; - message.maxChangeRate = object.maxChangeRate ?? ""; + message.rate = object.rate ?? ''; + message.maxRate = object.maxRate ?? ''; + message.maxChangeRate = object.maxChangeRate ?? ''; return message; }, fromAmino(object: CommissionRatesAmino): CommissionRates { @@ -915,9 +916,9 @@ export const CommissionRates = { }, toAmino(message: CommissionRates): CommissionRatesAmino { const obj: any = {}; - obj.rate = message.rate ?? ""; - obj.max_rate = message.maxRate ?? ""; - obj.max_change_rate = message.maxChangeRate ?? ""; + obj.rate = message.rate ?? ''; + obj.max_rate = message.maxRate ?? ''; + obj.max_change_rate = message.maxChangeRate ?? ''; return obj; }, fromAminoMsg(object: CommissionRatesAminoMsg): CommissionRates { @@ -925,7 +926,7 @@ export const CommissionRates = { }, toAminoMsg(message: CommissionRates): CommissionRatesAminoMsg { return { - type: "cosmos-sdk/CommissionRates", + type: 'cosmos-sdk/CommissionRates', value: CommissionRates.toAmino(message) }; }, @@ -937,7 +938,7 @@ export const CommissionRates = { }, toProtoMsg(message: CommissionRates): CommissionRatesProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.CommissionRates", + typeUrl: '/cosmos.staking.v1beta1.CommissionRates', value: CommissionRates.encode(message).finish() }; } @@ -951,8 +952,8 @@ function createBaseCommission(): Commission { }; } export const Commission = { - typeUrl: "/cosmos.staking.v1beta1.Commission", - aminoType: "cosmos-sdk/Commission", + typeUrl: '/cosmos.staking.v1beta1.Commission', + aminoType: 'cosmos-sdk/Commission', is(o: any): o is Commission { return o && (o.$typeUrl === Commission.typeUrl || CommissionRates.is(o.commissionRates) && Timestamp.is(o.updateTime)); }, @@ -975,15 +976,15 @@ export const Commission = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.commissionRates = CommissionRates.decode(reader, reader.uint32()); - break; - case 2: - message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.commissionRates = CommissionRates.decode(reader, reader.uint32()); + break; + case 2: + message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1015,7 +1016,7 @@ export const Commission = { }, toAminoMsg(message: Commission): CommissionAminoMsg { return { - type: "cosmos-sdk/Commission", + type: 'cosmos-sdk/Commission', value: Commission.toAmino(message) }; }, @@ -1027,7 +1028,7 @@ export const Commission = { }, toProtoMsg(message: Commission): CommissionProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.Commission", + typeUrl: '/cosmos.staking.v1beta1.Commission', value: Commission.encode(message).finish() }; } @@ -1036,36 +1037,36 @@ GlobalDecoderRegistry.register(Commission.typeUrl, Commission); GlobalDecoderRegistry.registerAminoProtoMapping(Commission.aminoType, Commission.typeUrl); function createBaseDescription(): Description { return { - moniker: "", - identity: "", - website: "", - securityContact: "", - details: "" + moniker: '', + identity: '', + website: '', + securityContact: '', + details: '' }; } export const Description = { - typeUrl: "/cosmos.staking.v1beta1.Description", - aminoType: "cosmos-sdk/Description", + typeUrl: '/cosmos.staking.v1beta1.Description', + aminoType: 'cosmos-sdk/Description', is(o: any): o is Description { - return o && (o.$typeUrl === Description.typeUrl || typeof o.moniker === "string" && typeof o.identity === "string" && typeof o.website === "string" && typeof o.securityContact === "string" && typeof o.details === "string"); + return o && (o.$typeUrl === Description.typeUrl || typeof o.moniker === 'string' && typeof o.identity === 'string' && typeof o.website === 'string' && typeof o.securityContact === 'string' && typeof o.details === 'string'); }, isAmino(o: any): o is DescriptionAmino { - return o && (o.$typeUrl === Description.typeUrl || typeof o.moniker === "string" && typeof o.identity === "string" && typeof o.website === "string" && typeof o.security_contact === "string" && typeof o.details === "string"); + return o && (o.$typeUrl === Description.typeUrl || typeof o.moniker === 'string' && typeof o.identity === 'string' && typeof o.website === 'string' && typeof o.security_contact === 'string' && typeof o.details === 'string'); }, encode(message: Description, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.moniker !== "") { + if (message.moniker !== '') { writer.uint32(10).string(message.moniker); } - if (message.identity !== "") { + if (message.identity !== '') { writer.uint32(18).string(message.identity); } - if (message.website !== "") { + if (message.website !== '') { writer.uint32(26).string(message.website); } - if (message.securityContact !== "") { + if (message.securityContact !== '') { writer.uint32(34).string(message.securityContact); } - if (message.details !== "") { + if (message.details !== '') { writer.uint32(42).string(message.details); } return writer; @@ -1077,35 +1078,35 @@ export const Description = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.moniker = reader.string(); - break; - case 2: - message.identity = reader.string(); - break; - case 3: - message.website = reader.string(); - break; - case 4: - message.securityContact = reader.string(); - break; - case 5: - message.details = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.moniker = reader.string(); + break; + case 2: + message.identity = reader.string(); + break; + case 3: + message.website = reader.string(); + break; + case 4: + message.securityContact = reader.string(); + break; + case 5: + message.details = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Description { const message = createBaseDescription(); - message.moniker = object.moniker ?? ""; - message.identity = object.identity ?? ""; - message.website = object.website ?? ""; - message.securityContact = object.securityContact ?? ""; - message.details = object.details ?? ""; + message.moniker = object.moniker ?? ''; + message.identity = object.identity ?? ''; + message.website = object.website ?? ''; + message.securityContact = object.securityContact ?? ''; + message.details = object.details ?? ''; return message; }, fromAmino(object: DescriptionAmino): Description { @@ -1129,11 +1130,11 @@ export const Description = { }, toAmino(message: Description): DescriptionAmino { const obj: any = {}; - obj.moniker = message.moniker === "" ? undefined : message.moniker; - obj.identity = message.identity === "" ? undefined : message.identity; - obj.website = message.website === "" ? undefined : message.website; - obj.security_contact = message.securityContact === "" ? undefined : message.securityContact; - obj.details = message.details === "" ? undefined : message.details; + obj.moniker = message.moniker === '' ? undefined : message.moniker; + obj.identity = message.identity === '' ? undefined : message.identity; + obj.website = message.website === '' ? undefined : message.website; + obj.security_contact = message.securityContact === '' ? undefined : message.securityContact; + obj.details = message.details === '' ? undefined : message.details; return obj; }, fromAminoMsg(object: DescriptionAminoMsg): Description { @@ -1141,7 +1142,7 @@ export const Description = { }, toAminoMsg(message: Description): DescriptionAminoMsg { return { - type: "cosmos-sdk/Description", + type: 'cosmos-sdk/Description', value: Description.toAmino(message) }; }, @@ -1153,7 +1154,7 @@ export const Description = { }, toProtoMsg(message: Description): DescriptionProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.Description", + typeUrl: '/cosmos.staking.v1beta1.Description', value: Description.encode(message).finish() }; } @@ -1162,32 +1163,32 @@ GlobalDecoderRegistry.register(Description.typeUrl, Description); GlobalDecoderRegistry.registerAminoProtoMapping(Description.aminoType, Description.typeUrl); function createBaseValidator(): Validator { return { - operatorAddress: "", + operatorAddress: '', consensusPubkey: undefined, jailed: false, status: 0, - tokens: "", - delegatorShares: "", + tokens: '', + delegatorShares: '', description: Description.fromPartial({}), unbondingHeight: BigInt(0), unbondingTime: new Date(), commission: Commission.fromPartial({}), - minSelfDelegation: "", + minSelfDelegation: '', unbondingOnHoldRefCount: BigInt(0), unbondingIds: [] }; } export const Validator = { - typeUrl: "/cosmos.staking.v1beta1.Validator", - aminoType: "cosmos-sdk/Validator", + typeUrl: '/cosmos.staking.v1beta1.Validator', + aminoType: 'cosmos-sdk/Validator', is(o: any): o is Validator { - return o && (o.$typeUrl === Validator.typeUrl || typeof o.operatorAddress === "string" && typeof o.jailed === "boolean" && isSet(o.status) && typeof o.tokens === "string" && typeof o.delegatorShares === "string" && Description.is(o.description) && typeof o.unbondingHeight === "bigint" && Timestamp.is(o.unbondingTime) && Commission.is(o.commission) && typeof o.minSelfDelegation === "string" && typeof o.unbondingOnHoldRefCount === "bigint" && Array.isArray(o.unbondingIds) && (!o.unbondingIds.length || typeof o.unbondingIds[0] === "bigint")); + return o && (o.$typeUrl === Validator.typeUrl || typeof o.operatorAddress === 'string' && typeof o.jailed === 'boolean' && isSet(o.status) && typeof o.tokens === 'string' && typeof o.delegatorShares === 'string' && Description.is(o.description) && typeof o.unbondingHeight === 'bigint' && Timestamp.is(o.unbondingTime) && Commission.is(o.commission) && typeof o.minSelfDelegation === 'string' && typeof o.unbondingOnHoldRefCount === 'bigint' && Array.isArray(o.unbondingIds) && (!o.unbondingIds.length || typeof o.unbondingIds[0] === 'bigint')); }, isAmino(o: any): o is ValidatorAmino { - return o && (o.$typeUrl === Validator.typeUrl || typeof o.operator_address === "string" && typeof o.jailed === "boolean" && isSet(o.status) && typeof o.tokens === "string" && typeof o.delegator_shares === "string" && Description.isAmino(o.description) && typeof o.unbonding_height === "bigint" && Timestamp.isAmino(o.unbonding_time) && Commission.isAmino(o.commission) && typeof o.min_self_delegation === "string" && typeof o.unbonding_on_hold_ref_count === "bigint" && Array.isArray(o.unbonding_ids) && (!o.unbonding_ids.length || typeof o.unbonding_ids[0] === "bigint")); + return o && (o.$typeUrl === Validator.typeUrl || typeof o.operator_address === 'string' && typeof o.jailed === 'boolean' && isSet(o.status) && typeof o.tokens === 'string' && typeof o.delegator_shares === 'string' && Description.isAmino(o.description) && typeof o.unbonding_height === 'bigint' && Timestamp.isAmino(o.unbonding_time) && Commission.isAmino(o.commission) && typeof o.min_self_delegation === 'string' && typeof o.unbonding_on_hold_ref_count === 'bigint' && Array.isArray(o.unbonding_ids) && (!o.unbonding_ids.length || typeof o.unbonding_ids[0] === 'bigint')); }, encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.operatorAddress !== "") { + if (message.operatorAddress !== '') { writer.uint32(10).string(message.operatorAddress); } if (message.consensusPubkey !== undefined) { @@ -1199,10 +1200,10 @@ export const Validator = { if (message.status !== 0) { writer.uint32(32).int32(message.status); } - if (message.tokens !== "") { + if (message.tokens !== '') { writer.uint32(42).string(message.tokens); } - if (message.delegatorShares !== "") { + if (message.delegatorShares !== '') { writer.uint32(50).string(message.delegatorShares); } if (message.description !== undefined) { @@ -1217,7 +1218,7 @@ export const Validator = { if (message.commission !== undefined) { Commission.encode(message.commission, writer.uint32(82).fork()).ldelim(); } - if (message.minSelfDelegation !== "") { + if (message.minSelfDelegation !== '') { writer.uint32(90).string(message.minSelfDelegation); } if (message.unbondingOnHoldRefCount !== BigInt(0)) { @@ -1237,72 +1238,72 @@ export const Validator = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.operatorAddress = reader.string(); - break; - case 2: - message.consensusPubkey = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 3: - message.jailed = reader.bool(); - break; - case 4: - message.status = (reader.int32() as any); - break; - case 5: - message.tokens = reader.string(); - break; - case 6: - message.delegatorShares = reader.string(); - break; - case 7: - message.description = Description.decode(reader, reader.uint32()); - break; - case 8: - message.unbondingHeight = reader.int64(); - break; - case 9: - message.unbondingTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 10: - message.commission = Commission.decode(reader, reader.uint32()); - break; - case 11: - message.minSelfDelegation = reader.string(); - break; - case 12: - message.unbondingOnHoldRefCount = reader.int64(); - break; - case 13: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.unbondingIds.push(reader.uint64()); - } - } else { + case 1: + message.operatorAddress = reader.string(); + break; + case 2: + message.consensusPubkey = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 3: + message.jailed = reader.bool(); + break; + case 4: + message.status = (reader.int32() as any); + break; + case 5: + message.tokens = reader.string(); + break; + case 6: + message.delegatorShares = reader.string(); + break; + case 7: + message.description = Description.decode(reader, reader.uint32()); + break; + case 8: + message.unbondingHeight = reader.int64(); + break; + case 9: + message.unbondingTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 10: + message.commission = Commission.decode(reader, reader.uint32()); + break; + case 11: + message.minSelfDelegation = reader.string(); + break; + case 12: + message.unbondingOnHoldRefCount = reader.int64(); + break; + case 13: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.unbondingIds.push(reader.uint64()); } - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.unbondingIds.push(reader.uint64()); + } + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); - message.operatorAddress = object.operatorAddress ?? ""; + message.operatorAddress = object.operatorAddress ?? ''; message.consensusPubkey = object.consensusPubkey !== undefined && object.consensusPubkey !== null ? GlobalDecoderRegistry.fromPartial(object.consensusPubkey) : undefined; message.jailed = object.jailed ?? false; message.status = object.status ?? 0; - message.tokens = object.tokens ?? ""; - message.delegatorShares = object.delegatorShares ?? ""; + message.tokens = object.tokens ?? ''; + message.delegatorShares = object.delegatorShares ?? ''; message.description = object.description !== undefined && object.description !== null ? Description.fromPartial(object.description) : undefined; message.unbondingHeight = object.unbondingHeight !== undefined && object.unbondingHeight !== null ? BigInt(object.unbondingHeight.toString()) : BigInt(0); message.unbondingTime = object.unbondingTime ?? undefined; message.commission = object.commission !== undefined && object.commission !== null ? Commission.fromPartial(object.commission) : undefined; - message.minSelfDelegation = object.minSelfDelegation ?? ""; + message.minSelfDelegation = object.minSelfDelegation ?? ''; message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount !== undefined && object.unbondingOnHoldRefCount !== null ? BigInt(object.unbondingOnHoldRefCount.toString()) : BigInt(0); message.unbondingIds = object.unbondingIds?.map(e => BigInt(e.toString())) || []; return message; @@ -1350,17 +1351,17 @@ export const Validator = { }, toAmino(message: Validator): ValidatorAmino { const obj: any = {}; - obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress; + obj.operator_address = message.operatorAddress === '' ? undefined : message.operatorAddress; obj.consensus_pubkey = message.consensusPubkey ? decodePubkey(message.consensusPubkey) : undefined; obj.jailed = message.jailed === false ? undefined : message.jailed; obj.status = message.status === 0 ? undefined : message.status; - obj.tokens = message.tokens === "" ? undefined : message.tokens; - obj.delegator_shares = message.delegatorShares === "" ? undefined : message.delegatorShares; + obj.tokens = message.tokens === '' ? undefined : message.tokens; + obj.delegator_shares = message.delegatorShares === '' ? undefined : message.delegatorShares; obj.description = message.description ? Description.toAmino(message.description) : Description.toAmino(Description.fromPartial({})); obj.unbonding_height = message.unbondingHeight !== BigInt(0) ? message.unbondingHeight.toString() : undefined; obj.unbonding_time = message.unbondingTime ? Timestamp.toAmino(toTimestamp(message.unbondingTime)) : new Date(); obj.commission = message.commission ? Commission.toAmino(message.commission) : Commission.toAmino(Commission.fromPartial({})); - obj.min_self_delegation = message.minSelfDelegation === "" ? undefined : message.minSelfDelegation; + obj.min_self_delegation = message.minSelfDelegation === '' ? undefined : message.minSelfDelegation; obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount.toString() : undefined; if (message.unbondingIds) { obj.unbonding_ids = message.unbondingIds.map(e => e.toString()); @@ -1374,7 +1375,7 @@ export const Validator = { }, toAminoMsg(message: Validator): ValidatorAminoMsg { return { - type: "cosmos-sdk/Validator", + type: 'cosmos-sdk/Validator', value: Validator.toAmino(message) }; }, @@ -1386,7 +1387,7 @@ export const Validator = { }, toProtoMsg(message: Validator): ValidatorProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.Validator", + typeUrl: '/cosmos.staking.v1beta1.Validator', value: Validator.encode(message).finish() }; } @@ -1399,13 +1400,13 @@ function createBaseValAddresses(): ValAddresses { }; } export const ValAddresses = { - typeUrl: "/cosmos.staking.v1beta1.ValAddresses", - aminoType: "cosmos-sdk/ValAddresses", + typeUrl: '/cosmos.staking.v1beta1.ValAddresses', + aminoType: 'cosmos-sdk/ValAddresses', is(o: any): o is ValAddresses { - return o && (o.$typeUrl === ValAddresses.typeUrl || Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === ValAddresses.typeUrl || Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, isAmino(o: any): o is ValAddressesAmino { - return o && (o.$typeUrl === ValAddresses.typeUrl || Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === ValAddresses.typeUrl || Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, encode(message: ValAddresses, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.addresses) { @@ -1420,12 +1421,12 @@ export const ValAddresses = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1454,7 +1455,7 @@ export const ValAddresses = { }, toAminoMsg(message: ValAddresses): ValAddressesAminoMsg { return { - type: "cosmos-sdk/ValAddresses", + type: 'cosmos-sdk/ValAddresses', value: ValAddresses.toAmino(message) }; }, @@ -1466,7 +1467,7 @@ export const ValAddresses = { }, toProtoMsg(message: ValAddresses): ValAddressesProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.ValAddresses", + typeUrl: '/cosmos.staking.v1beta1.ValAddresses', value: ValAddresses.encode(message).finish() }; } @@ -1475,24 +1476,24 @@ GlobalDecoderRegistry.register(ValAddresses.typeUrl, ValAddresses); GlobalDecoderRegistry.registerAminoProtoMapping(ValAddresses.aminoType, ValAddresses.typeUrl); function createBaseDVPair(): DVPair { return { - delegatorAddress: "", - validatorAddress: "" + delegatorAddress: '', + validatorAddress: '' }; } export const DVPair = { - typeUrl: "/cosmos.staking.v1beta1.DVPair", - aminoType: "cosmos-sdk/DVPair", + typeUrl: '/cosmos.staking.v1beta1.DVPair', + aminoType: 'cosmos-sdk/DVPair', is(o: any): o is DVPair { - return o && (o.$typeUrl === DVPair.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string"); + return o && (o.$typeUrl === DVPair.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string'); }, isAmino(o: any): o is DVPairAmino { - return o && (o.$typeUrl === DVPair.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string"); + return o && (o.$typeUrl === DVPair.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_address === 'string'); }, encode(message: DVPair, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } return writer; @@ -1504,23 +1505,23 @@ export const DVPair = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DVPair { const message = createBaseDVPair(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; return message; }, fromAmino(object: DVPairAmino): DVPair { @@ -1535,8 +1536,8 @@ export const DVPair = { }, toAmino(message: DVPair): DVPairAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: DVPairAminoMsg): DVPair { @@ -1544,7 +1545,7 @@ export const DVPair = { }, toAminoMsg(message: DVPair): DVPairAminoMsg { return { - type: "cosmos-sdk/DVPair", + type: 'cosmos-sdk/DVPair', value: DVPair.toAmino(message) }; }, @@ -1556,7 +1557,7 @@ export const DVPair = { }, toProtoMsg(message: DVPair): DVPairProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.DVPair", + typeUrl: '/cosmos.staking.v1beta1.DVPair', value: DVPair.encode(message).finish() }; } @@ -1569,8 +1570,8 @@ function createBaseDVPairs(): DVPairs { }; } export const DVPairs = { - typeUrl: "/cosmos.staking.v1beta1.DVPairs", - aminoType: "cosmos-sdk/DVPairs", + typeUrl: '/cosmos.staking.v1beta1.DVPairs', + aminoType: 'cosmos-sdk/DVPairs', is(o: any): o is DVPairs { return o && (o.$typeUrl === DVPairs.typeUrl || Array.isArray(o.pairs) && (!o.pairs.length || DVPair.is(o.pairs[0]))); }, @@ -1590,12 +1591,12 @@ export const DVPairs = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pairs.push(DVPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pairs.push(DVPair.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1624,7 +1625,7 @@ export const DVPairs = { }, toAminoMsg(message: DVPairs): DVPairsAminoMsg { return { - type: "cosmos-sdk/DVPairs", + type: 'cosmos-sdk/DVPairs', value: DVPairs.toAmino(message) }; }, @@ -1636,7 +1637,7 @@ export const DVPairs = { }, toProtoMsg(message: DVPairs): DVPairsProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.DVPairs", + typeUrl: '/cosmos.staking.v1beta1.DVPairs', value: DVPairs.encode(message).finish() }; } @@ -1645,28 +1646,28 @@ GlobalDecoderRegistry.register(DVPairs.typeUrl, DVPairs); GlobalDecoderRegistry.registerAminoProtoMapping(DVPairs.aminoType, DVPairs.typeUrl); function createBaseDVVTriplet(): DVVTriplet { return { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "" + delegatorAddress: '', + validatorSrcAddress: '', + validatorDstAddress: '' }; } export const DVVTriplet = { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", - aminoType: "cosmos-sdk/DVVTriplet", + typeUrl: '/cosmos.staking.v1beta1.DVVTriplet', + aminoType: 'cosmos-sdk/DVVTriplet', is(o: any): o is DVVTriplet { - return o && (o.$typeUrl === DVVTriplet.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorSrcAddress === "string" && typeof o.validatorDstAddress === "string"); + return o && (o.$typeUrl === DVVTriplet.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorSrcAddress === 'string' && typeof o.validatorDstAddress === 'string'); }, isAmino(o: any): o is DVVTripletAmino { - return o && (o.$typeUrl === DVVTriplet.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_src_address === "string" && typeof o.validator_dst_address === "string"); + return o && (o.$typeUrl === DVVTriplet.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_src_address === 'string' && typeof o.validator_dst_address === 'string'); }, encode(message: DVVTriplet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorSrcAddress !== "") { + if (message.validatorSrcAddress !== '') { writer.uint32(18).string(message.validatorSrcAddress); } - if (message.validatorDstAddress !== "") { + if (message.validatorDstAddress !== '') { writer.uint32(26).string(message.validatorDstAddress); } return writer; @@ -1678,27 +1679,27 @@ export const DVVTriplet = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DVVTriplet { const message = createBaseDVVTriplet(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorSrcAddress = object.validatorSrcAddress ?? ""; - message.validatorDstAddress = object.validatorDstAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorSrcAddress = object.validatorSrcAddress ?? ''; + message.validatorDstAddress = object.validatorDstAddress ?? ''; return message; }, fromAmino(object: DVVTripletAmino): DVVTriplet { @@ -1716,9 +1717,9 @@ export const DVVTriplet = { }, toAmino(message: DVVTriplet): DVVTripletAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_src_address = message.validatorSrcAddress === '' ? undefined : message.validatorSrcAddress; + obj.validator_dst_address = message.validatorDstAddress === '' ? undefined : message.validatorDstAddress; return obj; }, fromAminoMsg(object: DVVTripletAminoMsg): DVVTriplet { @@ -1726,7 +1727,7 @@ export const DVVTriplet = { }, toAminoMsg(message: DVVTriplet): DVVTripletAminoMsg { return { - type: "cosmos-sdk/DVVTriplet", + type: 'cosmos-sdk/DVVTriplet', value: DVVTriplet.toAmino(message) }; }, @@ -1738,7 +1739,7 @@ export const DVVTriplet = { }, toProtoMsg(message: DVVTriplet): DVVTripletProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", + typeUrl: '/cosmos.staking.v1beta1.DVVTriplet', value: DVVTriplet.encode(message).finish() }; } @@ -1751,8 +1752,8 @@ function createBaseDVVTriplets(): DVVTriplets { }; } export const DVVTriplets = { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", - aminoType: "cosmos-sdk/DVVTriplets", + typeUrl: '/cosmos.staking.v1beta1.DVVTriplets', + aminoType: 'cosmos-sdk/DVVTriplets', is(o: any): o is DVVTriplets { return o && (o.$typeUrl === DVVTriplets.typeUrl || Array.isArray(o.triplets) && (!o.triplets.length || DVVTriplet.is(o.triplets[0]))); }, @@ -1772,12 +1773,12 @@ export const DVVTriplets = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.triplets.push(DVVTriplet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.triplets.push(DVVTriplet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1806,7 +1807,7 @@ export const DVVTriplets = { }, toAminoMsg(message: DVVTriplets): DVVTripletsAminoMsg { return { - type: "cosmos-sdk/DVVTriplets", + type: 'cosmos-sdk/DVVTriplets', value: DVVTriplets.toAmino(message) }; }, @@ -1818,7 +1819,7 @@ export const DVVTriplets = { }, toProtoMsg(message: DVVTriplets): DVVTripletsProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", + typeUrl: '/cosmos.staking.v1beta1.DVVTriplets', value: DVVTriplets.encode(message).finish() }; } @@ -1827,28 +1828,28 @@ GlobalDecoderRegistry.register(DVVTriplets.typeUrl, DVVTriplets); GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplets.aminoType, DVVTriplets.typeUrl); function createBaseDelegation(): Delegation { return { - delegatorAddress: "", - validatorAddress: "", - shares: "" + delegatorAddress: '', + validatorAddress: '', + shares: '' }; } export const Delegation = { - typeUrl: "/cosmos.staking.v1beta1.Delegation", - aminoType: "cosmos-sdk/Delegation", + typeUrl: '/cosmos.staking.v1beta1.Delegation', + aminoType: 'cosmos-sdk/Delegation', is(o: any): o is Delegation { - return o && (o.$typeUrl === Delegation.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string" && typeof o.shares === "string"); + return o && (o.$typeUrl === Delegation.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string' && typeof o.shares === 'string'); }, isAmino(o: any): o is DelegationAmino { - return o && (o.$typeUrl === Delegation.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string" && typeof o.shares === "string"); + return o && (o.$typeUrl === Delegation.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_address === 'string' && typeof o.shares === 'string'); }, encode(message: Delegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } - if (message.shares !== "") { + if (message.shares !== '') { writer.uint32(26).string(message.shares); } return writer; @@ -1860,27 +1861,27 @@ export const Delegation = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.shares = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.shares = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Delegation { const message = createBaseDelegation(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.shares = object.shares ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; + message.shares = object.shares ?? ''; return message; }, fromAmino(object: DelegationAmino): Delegation { @@ -1898,9 +1899,9 @@ export const Delegation = { }, toAmino(message: Delegation): DelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; - obj.shares = message.shares === "" ? undefined : message.shares; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; + obj.shares = message.shares === '' ? undefined : message.shares; return obj; }, fromAminoMsg(object: DelegationAminoMsg): Delegation { @@ -1908,7 +1909,7 @@ export const Delegation = { }, toAminoMsg(message: Delegation): DelegationAminoMsg { return { - type: "cosmos-sdk/Delegation", + type: 'cosmos-sdk/Delegation', value: Delegation.toAmino(message) }; }, @@ -1920,7 +1921,7 @@ export const Delegation = { }, toProtoMsg(message: Delegation): DelegationProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.Delegation", + typeUrl: '/cosmos.staking.v1beta1.Delegation', value: Delegation.encode(message).finish() }; } @@ -1929,25 +1930,25 @@ GlobalDecoderRegistry.register(Delegation.typeUrl, Delegation); GlobalDecoderRegistry.registerAminoProtoMapping(Delegation.aminoType, Delegation.typeUrl); function createBaseUnbondingDelegation(): UnbondingDelegation { return { - delegatorAddress: "", - validatorAddress: "", + delegatorAddress: '', + validatorAddress: '', entries: [] }; } export const UnbondingDelegation = { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", - aminoType: "cosmos-sdk/UnbondingDelegation", + typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegation', + aminoType: 'cosmos-sdk/UnbondingDelegation', is(o: any): o is UnbondingDelegation { - return o && (o.$typeUrl === UnbondingDelegation.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string" && Array.isArray(o.entries) && (!o.entries.length || UnbondingDelegationEntry.is(o.entries[0]))); + return o && (o.$typeUrl === UnbondingDelegation.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string' && Array.isArray(o.entries) && (!o.entries.length || UnbondingDelegationEntry.is(o.entries[0]))); }, isAmino(o: any): o is UnbondingDelegationAmino { - return o && (o.$typeUrl === UnbondingDelegation.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string" && Array.isArray(o.entries) && (!o.entries.length || UnbondingDelegationEntry.isAmino(o.entries[0]))); + return o && (o.$typeUrl === UnbondingDelegation.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_address === 'string' && Array.isArray(o.entries) && (!o.entries.length || UnbondingDelegationEntry.isAmino(o.entries[0]))); }, encode(message: UnbondingDelegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } for (const v of message.entries) { @@ -1962,26 +1963,26 @@ export const UnbondingDelegation = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): UnbondingDelegation { const message = createBaseUnbondingDelegation(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; message.entries = object.entries?.map(e => UnbondingDelegationEntry.fromPartial(e)) || []; return message; }, @@ -1998,8 +1999,8 @@ export const UnbondingDelegation = { }, toAmino(message: UnbondingDelegation): UnbondingDelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; if (message.entries) { obj.entries = message.entries.map(e => e ? UnbondingDelegationEntry.toAmino(e) : undefined); } else { @@ -2012,7 +2013,7 @@ export const UnbondingDelegation = { }, toAminoMsg(message: UnbondingDelegation): UnbondingDelegationAminoMsg { return { - type: "cosmos-sdk/UnbondingDelegation", + type: 'cosmos-sdk/UnbondingDelegation', value: UnbondingDelegation.toAmino(message) }; }, @@ -2024,7 +2025,7 @@ export const UnbondingDelegation = { }, toProtoMsg(message: UnbondingDelegation): UnbondingDelegationProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", + typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegation', value: UnbondingDelegation.encode(message).finish() }; } @@ -2035,20 +2036,20 @@ function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry { return { creationHeight: BigInt(0), completionTime: new Date(), - initialBalance: "", - balance: "", + initialBalance: '', + balance: '', unbondingId: BigInt(0), unbondingOnHoldRefCount: BigInt(0) }; } export const UnbondingDelegationEntry = { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", - aminoType: "cosmos-sdk/UnbondingDelegationEntry", + typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegationEntry', + aminoType: 'cosmos-sdk/UnbondingDelegationEntry', is(o: any): o is UnbondingDelegationEntry { - return o && (o.$typeUrl === UnbondingDelegationEntry.typeUrl || typeof o.creationHeight === "bigint" && Timestamp.is(o.completionTime) && typeof o.initialBalance === "string" && typeof o.balance === "string" && typeof o.unbondingId === "bigint" && typeof o.unbondingOnHoldRefCount === "bigint"); + return o && (o.$typeUrl === UnbondingDelegationEntry.typeUrl || typeof o.creationHeight === 'bigint' && Timestamp.is(o.completionTime) && typeof o.initialBalance === 'string' && typeof o.balance === 'string' && typeof o.unbondingId === 'bigint' && typeof o.unbondingOnHoldRefCount === 'bigint'); }, isAmino(o: any): o is UnbondingDelegationEntryAmino { - return o && (o.$typeUrl === UnbondingDelegationEntry.typeUrl || typeof o.creation_height === "bigint" && Timestamp.isAmino(o.completion_time) && typeof o.initial_balance === "string" && typeof o.balance === "string" && typeof o.unbonding_id === "bigint" && typeof o.unbonding_on_hold_ref_count === "bigint"); + return o && (o.$typeUrl === UnbondingDelegationEntry.typeUrl || typeof o.creation_height === 'bigint' && Timestamp.isAmino(o.completion_time) && typeof o.initial_balance === 'string' && typeof o.balance === 'string' && typeof o.unbonding_id === 'bigint' && typeof o.unbonding_on_hold_ref_count === 'bigint'); }, encode(message: UnbondingDelegationEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.creationHeight !== BigInt(0)) { @@ -2057,10 +2058,10 @@ export const UnbondingDelegationEntry = { if (message.completionTime !== undefined) { Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); } - if (message.initialBalance !== "") { + if (message.initialBalance !== '') { writer.uint32(26).string(message.initialBalance); } - if (message.balance !== "") { + if (message.balance !== '') { writer.uint32(34).string(message.balance); } if (message.unbondingId !== BigInt(0)) { @@ -2078,27 +2079,27 @@ export const UnbondingDelegationEntry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.creationHeight = reader.int64(); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.balance = reader.string(); - break; - case 5: - message.unbondingId = reader.uint64(); - break; - case 6: - message.unbondingOnHoldRefCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.balance = reader.string(); + break; + case 5: + message.unbondingId = reader.uint64(); + break; + case 6: + message.unbondingOnHoldRefCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2107,8 +2108,8 @@ export const UnbondingDelegationEntry = { const message = createBaseUnbondingDelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null ? BigInt(object.creationHeight.toString()) : BigInt(0); message.completionTime = object.completionTime ?? undefined; - message.initialBalance = object.initialBalance ?? ""; - message.balance = object.balance ?? ""; + message.initialBalance = object.initialBalance ?? ''; + message.balance = object.balance ?? ''; message.unbondingId = object.unbondingId !== undefined && object.unbondingId !== null ? BigInt(object.unbondingId.toString()) : BigInt(0); message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount !== undefined && object.unbondingOnHoldRefCount !== null ? BigInt(object.unbondingOnHoldRefCount.toString()) : BigInt(0); return message; @@ -2139,8 +2140,8 @@ export const UnbondingDelegationEntry = { const obj: any = {}; obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight.toString() : undefined; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : new Date(); - obj.initial_balance = message.initialBalance === "" ? undefined : message.initialBalance; - obj.balance = message.balance === "" ? undefined : message.balance; + obj.initial_balance = message.initialBalance === '' ? undefined : message.initialBalance; + obj.balance = message.balance === '' ? undefined : message.balance; obj.unbonding_id = message.unbondingId !== BigInt(0) ? message.unbondingId.toString() : undefined; obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount.toString() : undefined; return obj; @@ -2150,7 +2151,7 @@ export const UnbondingDelegationEntry = { }, toAminoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryAminoMsg { return { - type: "cosmos-sdk/UnbondingDelegationEntry", + type: 'cosmos-sdk/UnbondingDelegationEntry', value: UnbondingDelegationEntry.toAmino(message) }; }, @@ -2162,7 +2163,7 @@ export const UnbondingDelegationEntry = { }, toProtoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", + typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegationEntry', value: UnbondingDelegationEntry.encode(message).finish() }; } @@ -2173,20 +2174,20 @@ function createBaseRedelegationEntry(): RedelegationEntry { return { creationHeight: BigInt(0), completionTime: new Date(), - initialBalance: "", - sharesDst: "", + initialBalance: '', + sharesDst: '', unbondingId: BigInt(0), unbondingOnHoldRefCount: BigInt(0) }; } export const RedelegationEntry = { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", - aminoType: "cosmos-sdk/RedelegationEntry", + typeUrl: '/cosmos.staking.v1beta1.RedelegationEntry', + aminoType: 'cosmos-sdk/RedelegationEntry', is(o: any): o is RedelegationEntry { - return o && (o.$typeUrl === RedelegationEntry.typeUrl || typeof o.creationHeight === "bigint" && Timestamp.is(o.completionTime) && typeof o.initialBalance === "string" && typeof o.sharesDst === "string" && typeof o.unbondingId === "bigint" && typeof o.unbondingOnHoldRefCount === "bigint"); + return o && (o.$typeUrl === RedelegationEntry.typeUrl || typeof o.creationHeight === 'bigint' && Timestamp.is(o.completionTime) && typeof o.initialBalance === 'string' && typeof o.sharesDst === 'string' && typeof o.unbondingId === 'bigint' && typeof o.unbondingOnHoldRefCount === 'bigint'); }, isAmino(o: any): o is RedelegationEntryAmino { - return o && (o.$typeUrl === RedelegationEntry.typeUrl || typeof o.creation_height === "bigint" && Timestamp.isAmino(o.completion_time) && typeof o.initial_balance === "string" && typeof o.shares_dst === "string" && typeof o.unbonding_id === "bigint" && typeof o.unbonding_on_hold_ref_count === "bigint"); + return o && (o.$typeUrl === RedelegationEntry.typeUrl || typeof o.creation_height === 'bigint' && Timestamp.isAmino(o.completion_time) && typeof o.initial_balance === 'string' && typeof o.shares_dst === 'string' && typeof o.unbonding_id === 'bigint' && typeof o.unbonding_on_hold_ref_count === 'bigint'); }, encode(message: RedelegationEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.creationHeight !== BigInt(0)) { @@ -2195,10 +2196,10 @@ export const RedelegationEntry = { if (message.completionTime !== undefined) { Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); } - if (message.initialBalance !== "") { + if (message.initialBalance !== '') { writer.uint32(26).string(message.initialBalance); } - if (message.sharesDst !== "") { + if (message.sharesDst !== '') { writer.uint32(34).string(message.sharesDst); } if (message.unbondingId !== BigInt(0)) { @@ -2216,27 +2217,27 @@ export const RedelegationEntry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.creationHeight = reader.int64(); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.sharesDst = reader.string(); - break; - case 5: - message.unbondingId = reader.uint64(); - break; - case 6: - message.unbondingOnHoldRefCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.sharesDst = reader.string(); + break; + case 5: + message.unbondingId = reader.uint64(); + break; + case 6: + message.unbondingOnHoldRefCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2245,8 +2246,8 @@ export const RedelegationEntry = { const message = createBaseRedelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null ? BigInt(object.creationHeight.toString()) : BigInt(0); message.completionTime = object.completionTime ?? undefined; - message.initialBalance = object.initialBalance ?? ""; - message.sharesDst = object.sharesDst ?? ""; + message.initialBalance = object.initialBalance ?? ''; + message.sharesDst = object.sharesDst ?? ''; message.unbondingId = object.unbondingId !== undefined && object.unbondingId !== null ? BigInt(object.unbondingId.toString()) : BigInt(0); message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount !== undefined && object.unbondingOnHoldRefCount !== null ? BigInt(object.unbondingOnHoldRefCount.toString()) : BigInt(0); return message; @@ -2277,8 +2278,8 @@ export const RedelegationEntry = { const obj: any = {}; obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight.toString() : undefined; obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : new Date(); - obj.initial_balance = message.initialBalance === "" ? undefined : message.initialBalance; - obj.shares_dst = message.sharesDst === "" ? undefined : message.sharesDst; + obj.initial_balance = message.initialBalance === '' ? undefined : message.initialBalance; + obj.shares_dst = message.sharesDst === '' ? undefined : message.sharesDst; obj.unbonding_id = message.unbondingId !== BigInt(0) ? message.unbondingId.toString() : undefined; obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount.toString() : undefined; return obj; @@ -2288,7 +2289,7 @@ export const RedelegationEntry = { }, toAminoMsg(message: RedelegationEntry): RedelegationEntryAminoMsg { return { - type: "cosmos-sdk/RedelegationEntry", + type: 'cosmos-sdk/RedelegationEntry', value: RedelegationEntry.toAmino(message) }; }, @@ -2300,7 +2301,7 @@ export const RedelegationEntry = { }, toProtoMsg(message: RedelegationEntry): RedelegationEntryProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", + typeUrl: '/cosmos.staking.v1beta1.RedelegationEntry', value: RedelegationEntry.encode(message).finish() }; } @@ -2309,29 +2310,29 @@ GlobalDecoderRegistry.register(RedelegationEntry.typeUrl, RedelegationEntry); GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntry.aminoType, RedelegationEntry.typeUrl); function createBaseRedelegation(): Redelegation { return { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", + delegatorAddress: '', + validatorSrcAddress: '', + validatorDstAddress: '', entries: [] }; } export const Redelegation = { - typeUrl: "/cosmos.staking.v1beta1.Redelegation", - aminoType: "cosmos-sdk/Redelegation", + typeUrl: '/cosmos.staking.v1beta1.Redelegation', + aminoType: 'cosmos-sdk/Redelegation', is(o: any): o is Redelegation { - return o && (o.$typeUrl === Redelegation.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorSrcAddress === "string" && typeof o.validatorDstAddress === "string" && Array.isArray(o.entries) && (!o.entries.length || RedelegationEntry.is(o.entries[0]))); + return o && (o.$typeUrl === Redelegation.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorSrcAddress === 'string' && typeof o.validatorDstAddress === 'string' && Array.isArray(o.entries) && (!o.entries.length || RedelegationEntry.is(o.entries[0]))); }, isAmino(o: any): o is RedelegationAmino { - return o && (o.$typeUrl === Redelegation.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_src_address === "string" && typeof o.validator_dst_address === "string" && Array.isArray(o.entries) && (!o.entries.length || RedelegationEntry.isAmino(o.entries[0]))); + return o && (o.$typeUrl === Redelegation.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_src_address === 'string' && typeof o.validator_dst_address === 'string' && Array.isArray(o.entries) && (!o.entries.length || RedelegationEntry.isAmino(o.entries[0]))); }, encode(message: Redelegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorSrcAddress !== "") { + if (message.validatorSrcAddress !== '') { writer.uint32(18).string(message.validatorSrcAddress); } - if (message.validatorDstAddress !== "") { + if (message.validatorDstAddress !== '') { writer.uint32(26).string(message.validatorDstAddress); } for (const v of message.entries) { @@ -2346,30 +2347,30 @@ export const Redelegation = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.entries.push(RedelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + message.entries.push(RedelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Redelegation { const message = createBaseRedelegation(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorSrcAddress = object.validatorSrcAddress ?? ""; - message.validatorDstAddress = object.validatorDstAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorSrcAddress = object.validatorSrcAddress ?? ''; + message.validatorDstAddress = object.validatorDstAddress ?? ''; message.entries = object.entries?.map(e => RedelegationEntry.fromPartial(e)) || []; return message; }, @@ -2389,9 +2390,9 @@ export const Redelegation = { }, toAmino(message: Redelegation): RedelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_src_address = message.validatorSrcAddress === '' ? undefined : message.validatorSrcAddress; + obj.validator_dst_address = message.validatorDstAddress === '' ? undefined : message.validatorDstAddress; if (message.entries) { obj.entries = message.entries.map(e => e ? RedelegationEntry.toAmino(e) : undefined); } else { @@ -2404,7 +2405,7 @@ export const Redelegation = { }, toAminoMsg(message: Redelegation): RedelegationAminoMsg { return { - type: "cosmos-sdk/Redelegation", + type: 'cosmos-sdk/Redelegation', value: Redelegation.toAmino(message) }; }, @@ -2416,7 +2417,7 @@ export const Redelegation = { }, toProtoMsg(message: Redelegation): RedelegationProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.Redelegation", + typeUrl: '/cosmos.staking.v1beta1.Redelegation', value: Redelegation.encode(message).finish() }; } @@ -2429,18 +2430,18 @@ function createBaseParams(): Params { maxValidators: 0, maxEntries: 0, historicalEntries: 0, - bondDenom: "", - minCommissionRate: "" + bondDenom: '', + minCommissionRate: '' }; } export const Params = { - typeUrl: "/cosmos.staking.v1beta1.Params", - aminoType: "cosmos-sdk/x/staking/Params", + typeUrl: '/cosmos.staking.v1beta1.Params', + aminoType: 'cosmos-sdk/x/staking/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || Duration.is(o.unbondingTime) && typeof o.maxValidators === "number" && typeof o.maxEntries === "number" && typeof o.historicalEntries === "number" && typeof o.bondDenom === "string" && typeof o.minCommissionRate === "string"); + return o && (o.$typeUrl === Params.typeUrl || Duration.is(o.unbondingTime) && typeof o.maxValidators === 'number' && typeof o.maxEntries === 'number' && typeof o.historicalEntries === 'number' && typeof o.bondDenom === 'string' && typeof o.minCommissionRate === 'string'); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || Duration.isAmino(o.unbonding_time) && typeof o.max_validators === "number" && typeof o.max_entries === "number" && typeof o.historical_entries === "number" && typeof o.bond_denom === "string" && typeof o.min_commission_rate === "string"); + return o && (o.$typeUrl === Params.typeUrl || Duration.isAmino(o.unbonding_time) && typeof o.max_validators === 'number' && typeof o.max_entries === 'number' && typeof o.historical_entries === 'number' && typeof o.bond_denom === 'string' && typeof o.min_commission_rate === 'string'); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.unbondingTime !== undefined) { @@ -2455,10 +2456,10 @@ export const Params = { if (message.historicalEntries !== 0) { writer.uint32(32).uint32(message.historicalEntries); } - if (message.bondDenom !== "") { + if (message.bondDenom !== '') { writer.uint32(42).string(message.bondDenom); } - if (message.minCommissionRate !== "") { + if (message.minCommissionRate !== '') { writer.uint32(50).string(message.minCommissionRate); } return writer; @@ -2470,27 +2471,27 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.unbondingTime = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.maxValidators = reader.uint32(); - break; - case 3: - message.maxEntries = reader.uint32(); - break; - case 4: - message.historicalEntries = reader.uint32(); - break; - case 5: - message.bondDenom = reader.string(); - break; - case 6: - message.minCommissionRate = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.unbondingTime = Duration.decode(reader, reader.uint32()); + break; + case 2: + message.maxValidators = reader.uint32(); + break; + case 3: + message.maxEntries = reader.uint32(); + break; + case 4: + message.historicalEntries = reader.uint32(); + break; + case 5: + message.bondDenom = reader.string(); + break; + case 6: + message.minCommissionRate = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2501,8 +2502,8 @@ export const Params = { message.maxValidators = object.maxValidators ?? 0; message.maxEntries = object.maxEntries ?? 0; message.historicalEntries = object.historicalEntries ?? 0; - message.bondDenom = object.bondDenom ?? ""; - message.minCommissionRate = object.minCommissionRate ?? ""; + message.bondDenom = object.bondDenom ?? ''; + message.minCommissionRate = object.minCommissionRate ?? ''; return message; }, fromAmino(object: ParamsAmino): Params { @@ -2533,8 +2534,8 @@ export const Params = { obj.max_validators = message.maxValidators === 0 ? undefined : message.maxValidators; obj.max_entries = message.maxEntries === 0 ? undefined : message.maxEntries; obj.historical_entries = message.historicalEntries === 0 ? undefined : message.historicalEntries; - obj.bond_denom = message.bondDenom === "" ? undefined : message.bondDenom; - obj.min_commission_rate = message.minCommissionRate ?? ""; + obj.bond_denom = message.bondDenom === '' ? undefined : message.bondDenom; + obj.min_commission_rate = message.minCommissionRate ?? ''; return obj; }, fromAminoMsg(object: ParamsAminoMsg): Params { @@ -2542,7 +2543,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/x/staking/Params", + type: 'cosmos-sdk/x/staking/Params', value: Params.toAmino(message) }; }, @@ -2554,7 +2555,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.Params", + typeUrl: '/cosmos.staking.v1beta1.Params', value: Params.encode(message).finish() }; } @@ -2568,8 +2569,8 @@ function createBaseDelegationResponse(): DelegationResponse { }; } export const DelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", - aminoType: "cosmos-sdk/DelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.DelegationResponse', + aminoType: 'cosmos-sdk/DelegationResponse', is(o: any): o is DelegationResponse { return o && (o.$typeUrl === DelegationResponse.typeUrl || Delegation.is(o.delegation) && Coin.is(o.balance)); }, @@ -2592,15 +2593,15 @@ export const DelegationResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegation = Delegation.decode(reader, reader.uint32()); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegation = Delegation.decode(reader, reader.uint32()); + break; + case 2: + message.balance = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2632,7 +2633,7 @@ export const DelegationResponse = { }, toAminoMsg(message: DelegationResponse): DelegationResponseAminoMsg { return { - type: "cosmos-sdk/DelegationResponse", + type: 'cosmos-sdk/DelegationResponse', value: DelegationResponse.toAmino(message) }; }, @@ -2644,7 +2645,7 @@ export const DelegationResponse = { }, toProtoMsg(message: DelegationResponse): DelegationResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.DelegationResponse', value: DelegationResponse.encode(message).finish() }; } @@ -2654,23 +2655,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(DelegationResponse.aminoType, De function createBaseRedelegationEntryResponse(): RedelegationEntryResponse { return { redelegationEntry: RedelegationEntry.fromPartial({}), - balance: "" + balance: '' }; } export const RedelegationEntryResponse = { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", - aminoType: "cosmos-sdk/RedelegationEntryResponse", + typeUrl: '/cosmos.staking.v1beta1.RedelegationEntryResponse', + aminoType: 'cosmos-sdk/RedelegationEntryResponse', is(o: any): o is RedelegationEntryResponse { - return o && (o.$typeUrl === RedelegationEntryResponse.typeUrl || RedelegationEntry.is(o.redelegationEntry) && typeof o.balance === "string"); + return o && (o.$typeUrl === RedelegationEntryResponse.typeUrl || RedelegationEntry.is(o.redelegationEntry) && typeof o.balance === 'string'); }, isAmino(o: any): o is RedelegationEntryResponseAmino { - return o && (o.$typeUrl === RedelegationEntryResponse.typeUrl || RedelegationEntry.isAmino(o.redelegation_entry) && typeof o.balance === "string"); + return o && (o.$typeUrl === RedelegationEntryResponse.typeUrl || RedelegationEntry.isAmino(o.redelegation_entry) && typeof o.balance === 'string'); }, encode(message: RedelegationEntryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.redelegationEntry !== undefined) { RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim(); } - if (message.balance !== "") { + if (message.balance !== '') { writer.uint32(34).string(message.balance); } return writer; @@ -2682,15 +2683,15 @@ export const RedelegationEntryResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32()); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32()); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2698,7 +2699,7 @@ export const RedelegationEntryResponse = { fromPartial(object: DeepPartial): RedelegationEntryResponse { const message = createBaseRedelegationEntryResponse(); message.redelegationEntry = object.redelegationEntry !== undefined && object.redelegationEntry !== null ? RedelegationEntry.fromPartial(object.redelegationEntry) : undefined; - message.balance = object.balance ?? ""; + message.balance = object.balance ?? ''; return message; }, fromAmino(object: RedelegationEntryResponseAmino): RedelegationEntryResponse { @@ -2714,7 +2715,7 @@ export const RedelegationEntryResponse = { toAmino(message: RedelegationEntryResponse): RedelegationEntryResponseAmino { const obj: any = {}; obj.redelegation_entry = message.redelegationEntry ? RedelegationEntry.toAmino(message.redelegationEntry) : RedelegationEntry.toAmino(RedelegationEntry.fromPartial({})); - obj.balance = message.balance === "" ? undefined : message.balance; + obj.balance = message.balance === '' ? undefined : message.balance; return obj; }, fromAminoMsg(object: RedelegationEntryResponseAminoMsg): RedelegationEntryResponse { @@ -2722,7 +2723,7 @@ export const RedelegationEntryResponse = { }, toAminoMsg(message: RedelegationEntryResponse): RedelegationEntryResponseAminoMsg { return { - type: "cosmos-sdk/RedelegationEntryResponse", + type: 'cosmos-sdk/RedelegationEntryResponse', value: RedelegationEntryResponse.toAmino(message) }; }, @@ -2734,7 +2735,7 @@ export const RedelegationEntryResponse = { }, toProtoMsg(message: RedelegationEntryResponse): RedelegationEntryResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", + typeUrl: '/cosmos.staking.v1beta1.RedelegationEntryResponse', value: RedelegationEntryResponse.encode(message).finish() }; } @@ -2748,8 +2749,8 @@ function createBaseRedelegationResponse(): RedelegationResponse { }; } export const RedelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", - aminoType: "cosmos-sdk/RedelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.RedelegationResponse', + aminoType: 'cosmos-sdk/RedelegationResponse', is(o: any): o is RedelegationResponse { return o && (o.$typeUrl === RedelegationResponse.typeUrl || Redelegation.is(o.redelegation) && Array.isArray(o.entries) && (!o.entries.length || RedelegationEntryResponse.is(o.entries[0]))); }, @@ -2772,15 +2773,15 @@ export const RedelegationResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.redelegation = Redelegation.decode(reader, reader.uint32()); - break; - case 2: - message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.redelegation = Redelegation.decode(reader, reader.uint32()); + break; + case 2: + message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2814,7 +2815,7 @@ export const RedelegationResponse = { }, toAminoMsg(message: RedelegationResponse): RedelegationResponseAminoMsg { return { - type: "cosmos-sdk/RedelegationResponse", + type: 'cosmos-sdk/RedelegationResponse', value: RedelegationResponse.toAmino(message) }; }, @@ -2826,7 +2827,7 @@ export const RedelegationResponse = { }, toProtoMsg(message: RedelegationResponse): RedelegationResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.RedelegationResponse', value: RedelegationResponse.encode(message).finish() }; } @@ -2835,24 +2836,24 @@ GlobalDecoderRegistry.register(RedelegationResponse.typeUrl, RedelegationRespons GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationResponse.aminoType, RedelegationResponse.typeUrl); function createBasePool(): Pool { return { - notBondedTokens: "", - bondedTokens: "" + notBondedTokens: '', + bondedTokens: '' }; } export const Pool = { - typeUrl: "/cosmos.staking.v1beta1.Pool", - aminoType: "cosmos-sdk/Pool", + typeUrl: '/cosmos.staking.v1beta1.Pool', + aminoType: 'cosmos-sdk/Pool', is(o: any): o is Pool { - return o && (o.$typeUrl === Pool.typeUrl || typeof o.notBondedTokens === "string" && typeof o.bondedTokens === "string"); + return o && (o.$typeUrl === Pool.typeUrl || typeof o.notBondedTokens === 'string' && typeof o.bondedTokens === 'string'); }, isAmino(o: any): o is PoolAmino { - return o && (o.$typeUrl === Pool.typeUrl || typeof o.not_bonded_tokens === "string" && typeof o.bonded_tokens === "string"); + return o && (o.$typeUrl === Pool.typeUrl || typeof o.not_bonded_tokens === 'string' && typeof o.bonded_tokens === 'string'); }, encode(message: Pool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.notBondedTokens !== "") { + if (message.notBondedTokens !== '') { writer.uint32(10).string(message.notBondedTokens); } - if (message.bondedTokens !== "") { + if (message.bondedTokens !== '') { writer.uint32(18).string(message.bondedTokens); } return writer; @@ -2864,23 +2865,23 @@ export const Pool = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.notBondedTokens = reader.string(); - break; - case 2: - message.bondedTokens = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.notBondedTokens = reader.string(); + break; + case 2: + message.bondedTokens = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Pool { const message = createBasePool(); - message.notBondedTokens = object.notBondedTokens ?? ""; - message.bondedTokens = object.bondedTokens ?? ""; + message.notBondedTokens = object.notBondedTokens ?? ''; + message.bondedTokens = object.bondedTokens ?? ''; return message; }, fromAmino(object: PoolAmino): Pool { @@ -2895,8 +2896,8 @@ export const Pool = { }, toAmino(message: Pool): PoolAmino { const obj: any = {}; - obj.not_bonded_tokens = message.notBondedTokens ?? ""; - obj.bonded_tokens = message.bondedTokens ?? ""; + obj.not_bonded_tokens = message.notBondedTokens ?? ''; + obj.bonded_tokens = message.bondedTokens ?? ''; return obj; }, fromAminoMsg(object: PoolAminoMsg): Pool { @@ -2904,7 +2905,7 @@ export const Pool = { }, toAminoMsg(message: Pool): PoolAminoMsg { return { - type: "cosmos-sdk/Pool", + type: 'cosmos-sdk/Pool', value: Pool.toAmino(message) }; }, @@ -2916,7 +2917,7 @@ export const Pool = { }, toProtoMsg(message: Pool): PoolProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.Pool", + typeUrl: '/cosmos.staking.v1beta1.Pool', value: Pool.encode(message).finish() }; } @@ -2929,8 +2930,8 @@ function createBaseValidatorUpdates(): ValidatorUpdates { }; } export const ValidatorUpdates = { - typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates", - aminoType: "cosmos-sdk/ValidatorUpdates", + typeUrl: '/cosmos.staking.v1beta1.ValidatorUpdates', + aminoType: 'cosmos-sdk/ValidatorUpdates', is(o: any): o is ValidatorUpdates { return o && (o.$typeUrl === ValidatorUpdates.typeUrl || Array.isArray(o.updates) && (!o.updates.length || ValidatorUpdate.is(o.updates[0]))); }, @@ -2950,12 +2951,12 @@ export const ValidatorUpdates = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updates.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.updates.push(ValidatorUpdate.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2984,7 +2985,7 @@ export const ValidatorUpdates = { }, toAminoMsg(message: ValidatorUpdates): ValidatorUpdatesAminoMsg { return { - type: "cosmos-sdk/ValidatorUpdates", + type: 'cosmos-sdk/ValidatorUpdates', value: ValidatorUpdates.toAmino(message) }; }, @@ -2996,7 +2997,7 @@ export const ValidatorUpdates = { }, toProtoMsg(message: ValidatorUpdates): ValidatorUpdatesProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates", + typeUrl: '/cosmos.staking.v1beta1.ValidatorUpdates', value: ValidatorUpdates.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/staking/v1beta1/tx.amino.ts b/libs/cosmos-types/cosmos/staking/v1beta1/tx.amino.ts index ab2985b9..95763858 100644 --- a/libs/cosmos-types/cosmos/staking/v1beta1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/staking/v1beta1/tx.amino.ts @@ -1,37 +1,37 @@ -import { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation, MsgUpdateParams } from "./tx"; +import { MsgBeginRedelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgDelegate, MsgEditValidator, MsgUndelegate, MsgUpdateParams } from './tx'; export const AminoConverter = { - "/cosmos.staking.v1beta1.MsgCreateValidator": { - aminoType: "cosmos-sdk/MsgCreateValidator", + '/cosmos.staking.v1beta1.MsgCreateValidator': { + aminoType: 'cosmos-sdk/MsgCreateValidator', toAmino: MsgCreateValidator.toAmino, fromAmino: MsgCreateValidator.fromAmino }, - "/cosmos.staking.v1beta1.MsgEditValidator": { - aminoType: "cosmos-sdk/MsgEditValidator", + '/cosmos.staking.v1beta1.MsgEditValidator': { + aminoType: 'cosmos-sdk/MsgEditValidator', toAmino: MsgEditValidator.toAmino, fromAmino: MsgEditValidator.fromAmino }, - "/cosmos.staking.v1beta1.MsgDelegate": { - aminoType: "cosmos-sdk/MsgDelegate", + '/cosmos.staking.v1beta1.MsgDelegate': { + aminoType: 'cosmos-sdk/MsgDelegate', toAmino: MsgDelegate.toAmino, fromAmino: MsgDelegate.fromAmino }, - "/cosmos.staking.v1beta1.MsgBeginRedelegate": { - aminoType: "cosmos-sdk/MsgBeginRedelegate", + '/cosmos.staking.v1beta1.MsgBeginRedelegate': { + aminoType: 'cosmos-sdk/MsgBeginRedelegate', toAmino: MsgBeginRedelegate.toAmino, fromAmino: MsgBeginRedelegate.fromAmino }, - "/cosmos.staking.v1beta1.MsgUndelegate": { - aminoType: "cosmos-sdk/MsgUndelegate", + '/cosmos.staking.v1beta1.MsgUndelegate': { + aminoType: 'cosmos-sdk/MsgUndelegate', toAmino: MsgUndelegate.toAmino, fromAmino: MsgUndelegate.fromAmino }, - "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation": { - aminoType: "cosmos-sdk/MsgCancelUnbondingDelegation", + '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation': { + aminoType: 'cosmos-sdk/MsgCancelUnbondingDelegation', toAmino: MsgCancelUnbondingDelegation.toAmino, fromAmino: MsgCancelUnbondingDelegation.fromAmino }, - "/cosmos.staking.v1beta1.MsgUpdateParams": { - aminoType: "cosmos-sdk/x/staking/MsgUpdateParams", + '/cosmos.staking.v1beta1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/x/staking/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino } diff --git a/libs/cosmos-types/cosmos/staking/v1beta1/tx.registry.ts b/libs/cosmos-types/cosmos/staking/v1beta1/tx.registry.ts index a71efe20..f23340da 100644 --- a/libs/cosmos-types/cosmos/staking/v1beta1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/staking/v1beta1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation, MsgUpdateParams } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], ["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation], ["/cosmos.staking.v1beta1.MsgUpdateParams", MsgUpdateParams]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgBeginRedelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgDelegate, MsgEditValidator, MsgUndelegate, MsgUpdateParams } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.staking.v1beta1.MsgCreateValidator', MsgCreateValidator], ['/cosmos.staking.v1beta1.MsgEditValidator', MsgEditValidator], ['/cosmos.staking.v1beta1.MsgDelegate', MsgDelegate], ['/cosmos.staking.v1beta1.MsgBeginRedelegate', MsgBeginRedelegate], ['/cosmos.staking.v1beta1.MsgUndelegate', MsgUndelegate], ['/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation', MsgCancelUnbondingDelegation], ['/cosmos.staking.v1beta1.MsgUpdateParams', MsgUpdateParams]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/staking/v1beta1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/staking/v1beta1/tx.rpc.msg.ts index 761f1c5c..82c4f57b 100644 --- a/libs/cosmos-types/cosmos/staking/v1beta1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/staking/v1beta1/tx.rpc.msg.ts @@ -1,109 +1,109 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation, MsgUpdateParams } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgBeginRedelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgDelegate, MsgEditValidator, MsgUndelegate, MsgUpdateParams } from './tx'; /** Msg defines the staking Msg service. */ export interface Msg { /** CreateValidator defines a method for creating a new validator. */ - createValidator(signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | "auto", memo?: string): Promise; + createValidator(signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | 'auto', memo?: string): Promise; /** EditValidator defines a method for editing an existing validator. */ - editValidator(signerAddress: string, message: MsgEditValidator, fee: number | StdFee | "auto", memo?: string): Promise; + editValidator(signerAddress: string, message: MsgEditValidator, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Delegate defines a method for performing a delegation of coins * from a delegator to a validator. */ - delegate(signerAddress: string, message: MsgDelegate, fee: number | StdFee | "auto", memo?: string): Promise; + delegate(signerAddress: string, message: MsgDelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * BeginRedelegate defines a method for performing a redelegation * of coins from a delegator and source validator to a destination validator. */ - beginRedelegate(signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | "auto", memo?: string): Promise; + beginRedelegate(signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Undelegate defines a method for performing an undelegation from a * delegate and a validator. */ - undelegate(signerAddress: string, message: MsgUndelegate, fee: number | StdFee | "auto", memo?: string): Promise; + undelegate(signerAddress: string, message: MsgUndelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation * and delegate back to previous validator. * * Since: cosmos-sdk 0.46 */ - cancelUnbondingDelegation(signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | "auto", memo?: string): Promise; + cancelUnbondingDelegation(signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines an operation for updating the x/staking module * parameters. * Since: cosmos-sdk 0.47 */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the staking Msg service. */ export interface StargateImpl { /** CreateValidator defines a method for creating a new validator. */ - createValidator(signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | "auto", memo?: string): Promise; + createValidator(signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | 'auto', memo?: string): Promise; /** EditValidator defines a method for editing an existing validator. */ - editValidator(signerAddress: string, message: MsgEditValidator, fee: number | StdFee | "auto", memo?: string): Promise; + editValidator(signerAddress: string, message: MsgEditValidator, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Delegate defines a method for performing a delegation of coins * from a delegator to a validator. */ - delegate(signerAddress: string, message: MsgDelegate, fee: number | StdFee | "auto", memo?: string): Promise; + delegate(signerAddress: string, message: MsgDelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * BeginRedelegate defines a method for performing a redelegation * of coins from a delegator and source validator to a destination validator. */ - beginRedelegate(signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | "auto", memo?: string): Promise; + beginRedelegate(signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Undelegate defines a method for performing an undelegation from a * delegate and a validator. */ - undelegate(signerAddress: string, message: MsgUndelegate, fee: number | StdFee | "auto", memo?: string): Promise; + undelegate(signerAddress: string, message: MsgUndelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation * and delegate back to previous validator. * * Since: cosmos-sdk 0.46 */ - cancelUnbondingDelegation(signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | "auto", memo?: string): Promise; + cancelUnbondingDelegation(signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines an operation for updating the x/staking module * parameters. * Since: cosmos-sdk 0.47 */ - updateStakingParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateStakingParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the staking Msg service. */ export interface CosmWasmStargateImpl { /** CreateValidator defines a method for creating a new validator. */ - createValidator(signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | "auto", memo?: string): Promise; + createValidator(signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | 'auto', memo?: string): Promise; /** EditValidator defines a method for editing an existing validator. */ - editValidator(signerAddress: string, message: MsgEditValidator, fee: number | StdFee | "auto", memo?: string): Promise; + editValidator(signerAddress: string, message: MsgEditValidator, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Delegate defines a method for performing a delegation of coins * from a delegator to a validator. */ - delegate(signerAddress: string, message: MsgDelegate, fee: number | StdFee | "auto", memo?: string): Promise; + delegate(signerAddress: string, message: MsgDelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * BeginRedelegate defines a method for performing a redelegation * of coins from a delegator and source validator to a destination validator. */ - beginRedelegate(signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | "auto", memo?: string): Promise; + beginRedelegate(signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * Undelegate defines a method for performing an undelegation from a * delegate and a validator. */ - undelegate(signerAddress: string, message: MsgUndelegate, fee: number | StdFee | "auto", memo?: string): Promise; + undelegate(signerAddress: string, message: MsgUndelegate, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation * and delegate back to previous validator. * * Since: cosmos-sdk 0.46 */ - cancelUnbondingDelegation(signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | "auto", memo?: string): Promise; + cancelUnbondingDelegation(signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines an operation for updating the x/staking module * parameters. * Since: cosmos-sdk 0.47 */ - updateStakingParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateStakingParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -111,7 +111,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* CreateValidator defines a method for creating a new validator. */ - createValidator = async (signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createValidator = async (signerAddress: string, message: MsgCreateValidator, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreateValidator.typeUrl, value: message @@ -119,7 +119,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* EditValidator defines a method for editing an existing validator. */ - editValidator = async (signerAddress: string, message: MsgEditValidator, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + editValidator = async (signerAddress: string, message: MsgEditValidator, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgEditValidator.typeUrl, value: message @@ -128,7 +128,7 @@ export class MsgClientImpl implements Msg { }; /* Delegate defines a method for performing a delegation of coins from a delegator to a validator. */ - delegate = async (signerAddress: string, message: MsgDelegate, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + delegate = async (signerAddress: string, message: MsgDelegate, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgDelegate.typeUrl, value: message @@ -137,7 +137,7 @@ export class MsgClientImpl implements Msg { }; /* BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator. */ - beginRedelegate = async (signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + beginRedelegate = async (signerAddress: string, message: MsgBeginRedelegate, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgBeginRedelegate.typeUrl, value: message @@ -146,7 +146,7 @@ export class MsgClientImpl implements Msg { }; /* Undelegate defines a method for performing an undelegation from a delegate and a validator. */ - undelegate = async (signerAddress: string, message: MsgUndelegate, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + undelegate = async (signerAddress: string, message: MsgUndelegate, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUndelegate.typeUrl, value: message @@ -157,7 +157,7 @@ export class MsgClientImpl implements Msg { and delegate back to previous validator. Since: cosmos-sdk 0.46 */ - cancelUnbondingDelegation = async (signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + cancelUnbondingDelegation = async (signerAddress: string, message: MsgCancelUnbondingDelegation, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCancelUnbondingDelegation.typeUrl, value: message @@ -167,7 +167,7 @@ export class MsgClientImpl implements Msg { /* UpdateParams defines an operation for updating the x/staking module parameters. Since: cosmos-sdk 0.47 */ - updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/staking/v1beta1/tx.ts b/libs/cosmos-types/cosmos/staking/v1beta1/tx.ts index 6002ace4..ff65d04e 100644 --- a/libs/cosmos-types/cosmos/staking/v1beta1/tx.ts +++ b/libs/cosmos-types/cosmos/staking/v1beta1/tx.ts @@ -1,11 +1,12 @@ -import { Description, DescriptionAmino, CommissionRates, CommissionRatesAmino, Params, ParamsAmino } from "./staking"; -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; -import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { decodePubkey,encodePubkey } from '@cosmjs/proto-signing'; + +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { DeepPartial, fromTimestamp,toTimestamp } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { CommissionRates, CommissionRatesAmino, Description, DescriptionAmino, Params, ParamsAmino } from './staking'; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { description: Description; @@ -23,10 +24,10 @@ export interface MsgCreateValidator { value: Coin; } export interface MsgCreateValidatorProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator"; + typeUrl: '/cosmos.staking.v1beta1.MsgCreateValidator'; value: Uint8Array; } -export type MsgCreateValidatorEncoded = Omit & { +export type MsgCreateValidatorEncoded = Omit & { pubkey?: AnyProtoMsg | undefined; }; /** MsgCreateValidator defines a SDK message for creating a new validator. */ @@ -46,19 +47,19 @@ export interface MsgCreateValidatorAmino { value: CoinAmino; } export interface MsgCreateValidatorAminoMsg { - type: "cosmos-sdk/MsgCreateValidator"; + type: 'cosmos-sdk/MsgCreateValidator'; value: MsgCreateValidatorAmino; } /** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ export interface MsgCreateValidatorResponse {} export interface MsgCreateValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse"; + typeUrl: '/cosmos.staking.v1beta1.MsgCreateValidatorResponse'; value: Uint8Array; } /** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ export interface MsgCreateValidatorResponseAmino {} export interface MsgCreateValidatorResponseAminoMsg { - type: "cosmos-sdk/MsgCreateValidatorResponse"; + type: 'cosmos-sdk/MsgCreateValidatorResponse'; value: MsgCreateValidatorResponseAmino; } /** MsgEditValidator defines a SDK message for editing an existing validator. */ @@ -75,7 +76,7 @@ export interface MsgEditValidator { minSelfDelegation: string; } export interface MsgEditValidatorProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator"; + typeUrl: '/cosmos.staking.v1beta1.MsgEditValidator'; value: Uint8Array; } /** MsgEditValidator defines a SDK message for editing an existing validator. */ @@ -92,19 +93,19 @@ export interface MsgEditValidatorAmino { min_self_delegation: string; } export interface MsgEditValidatorAminoMsg { - type: "cosmos-sdk/MsgEditValidator"; + type: 'cosmos-sdk/MsgEditValidator'; value: MsgEditValidatorAmino; } /** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ export interface MsgEditValidatorResponse {} export interface MsgEditValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse"; + typeUrl: '/cosmos.staking.v1beta1.MsgEditValidatorResponse'; value: Uint8Array; } /** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ export interface MsgEditValidatorResponseAmino {} export interface MsgEditValidatorResponseAminoMsg { - type: "cosmos-sdk/MsgEditValidatorResponse"; + type: 'cosmos-sdk/MsgEditValidatorResponse'; value: MsgEditValidatorResponseAmino; } /** @@ -117,7 +118,7 @@ export interface MsgDelegate { amount: Coin; } export interface MsgDelegateProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate"; + typeUrl: '/cosmos.staking.v1beta1.MsgDelegate'; value: Uint8Array; } /** @@ -130,19 +131,19 @@ export interface MsgDelegateAmino { amount: CoinAmino; } export interface MsgDelegateAminoMsg { - type: "cosmos-sdk/MsgDelegate"; + type: 'cosmos-sdk/MsgDelegate'; value: MsgDelegateAmino; } /** MsgDelegateResponse defines the Msg/Delegate response type. */ export interface MsgDelegateResponse {} export interface MsgDelegateResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse"; + typeUrl: '/cosmos.staking.v1beta1.MsgDelegateResponse'; value: Uint8Array; } /** MsgDelegateResponse defines the Msg/Delegate response type. */ export interface MsgDelegateResponseAmino {} export interface MsgDelegateResponseAminoMsg { - type: "cosmos-sdk/MsgDelegateResponse"; + type: 'cosmos-sdk/MsgDelegateResponse'; value: MsgDelegateResponseAmino; } /** @@ -156,7 +157,7 @@ export interface MsgBeginRedelegate { amount: Coin; } export interface MsgBeginRedelegateProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate"; + typeUrl: '/cosmos.staking.v1beta1.MsgBeginRedelegate'; value: Uint8Array; } /** @@ -170,7 +171,7 @@ export interface MsgBeginRedelegateAmino { amount: CoinAmino; } export interface MsgBeginRedelegateAminoMsg { - type: "cosmos-sdk/MsgBeginRedelegate"; + type: 'cosmos-sdk/MsgBeginRedelegate'; value: MsgBeginRedelegateAmino; } /** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ @@ -178,7 +179,7 @@ export interface MsgBeginRedelegateResponse { completionTime: Date; } export interface MsgBeginRedelegateResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse"; + typeUrl: '/cosmos.staking.v1beta1.MsgBeginRedelegateResponse'; value: Uint8Array; } /** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ @@ -186,7 +187,7 @@ export interface MsgBeginRedelegateResponseAmino { completion_time: string; } export interface MsgBeginRedelegateResponseAminoMsg { - type: "cosmos-sdk/MsgBeginRedelegateResponse"; + type: 'cosmos-sdk/MsgBeginRedelegateResponse'; value: MsgBeginRedelegateResponseAmino; } /** @@ -199,7 +200,7 @@ export interface MsgUndelegate { amount: Coin; } export interface MsgUndelegateProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate"; + typeUrl: '/cosmos.staking.v1beta1.MsgUndelegate'; value: Uint8Array; } /** @@ -212,7 +213,7 @@ export interface MsgUndelegateAmino { amount: CoinAmino; } export interface MsgUndelegateAminoMsg { - type: "cosmos-sdk/MsgUndelegate"; + type: 'cosmos-sdk/MsgUndelegate'; value: MsgUndelegateAmino; } /** MsgUndelegateResponse defines the Msg/Undelegate response type. */ @@ -226,7 +227,7 @@ export interface MsgUndelegateResponse { amount: Coin; } export interface MsgUndelegateResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse"; + typeUrl: '/cosmos.staking.v1beta1.MsgUndelegateResponse'; value: Uint8Array; } /** MsgUndelegateResponse defines the Msg/Undelegate response type. */ @@ -240,7 +241,7 @@ export interface MsgUndelegateResponseAmino { amount: CoinAmino; } export interface MsgUndelegateResponseAminoMsg { - type: "cosmos-sdk/MsgUndelegateResponse"; + type: 'cosmos-sdk/MsgUndelegateResponse'; value: MsgUndelegateResponseAmino; } /** @@ -257,7 +258,7 @@ export interface MsgCancelUnbondingDelegation { creationHeight: bigint; } export interface MsgCancelUnbondingDelegationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation"; + typeUrl: '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation'; value: Uint8Array; } /** @@ -274,7 +275,7 @@ export interface MsgCancelUnbondingDelegationAmino { creation_height: string; } export interface MsgCancelUnbondingDelegationAminoMsg { - type: "cosmos-sdk/MsgCancelUnbondingDelegation"; + type: 'cosmos-sdk/MsgCancelUnbondingDelegation'; value: MsgCancelUnbondingDelegationAmino; } /** @@ -284,7 +285,7 @@ export interface MsgCancelUnbondingDelegationAminoMsg { */ export interface MsgCancelUnbondingDelegationResponse {} export interface MsgCancelUnbondingDelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse"; + typeUrl: '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse'; value: Uint8Array; } /** @@ -294,7 +295,7 @@ export interface MsgCancelUnbondingDelegationResponseProtoMsg { */ export interface MsgCancelUnbondingDelegationResponseAmino {} export interface MsgCancelUnbondingDelegationResponseAminoMsg { - type: "cosmos-sdk/MsgCancelUnbondingDelegationResponse"; + type: 'cosmos-sdk/MsgCancelUnbondingDelegationResponse'; value: MsgCancelUnbondingDelegationResponseAmino; } /** @@ -313,7 +314,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParams"; + typeUrl: '/cosmos.staking.v1beta1.MsgUpdateParams'; value: Uint8Array; } /** @@ -332,7 +333,7 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/x/staking/MsgUpdateParams"; + type: 'cosmos-sdk/x/staking/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** @@ -343,7 +344,7 @@ export interface MsgUpdateParamsAminoMsg { */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParamsResponse"; + typeUrl: '/cosmos.staking.v1beta1.MsgUpdateParamsResponse'; value: Uint8Array; } /** @@ -354,28 +355,28 @@ export interface MsgUpdateParamsResponseProtoMsg { */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } function createBaseMsgCreateValidator(): MsgCreateValidator { return { description: Description.fromPartial({}), commission: CommissionRates.fromPartial({}), - minSelfDelegation: "", - delegatorAddress: "", - validatorAddress: "", + minSelfDelegation: '', + delegatorAddress: '', + validatorAddress: '', pubkey: undefined, value: Coin.fromPartial({}) }; } export const MsgCreateValidator = { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - aminoType: "cosmos-sdk/MsgCreateValidator", + typeUrl: '/cosmos.staking.v1beta1.MsgCreateValidator', + aminoType: 'cosmos-sdk/MsgCreateValidator', is(o: any): o is MsgCreateValidator { - return o && (o.$typeUrl === MsgCreateValidator.typeUrl || Description.is(o.description) && CommissionRates.is(o.commission) && typeof o.minSelfDelegation === "string" && typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string" && Coin.is(o.value)); + return o && (o.$typeUrl === MsgCreateValidator.typeUrl || Description.is(o.description) && CommissionRates.is(o.commission) && typeof o.minSelfDelegation === 'string' && typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string' && Coin.is(o.value)); }, isAmino(o: any): o is MsgCreateValidatorAmino { - return o && (o.$typeUrl === MsgCreateValidator.typeUrl || Description.isAmino(o.description) && CommissionRates.isAmino(o.commission) && typeof o.min_self_delegation === "string" && typeof o.delegator_address === "string" && typeof o.validator_address === "string" && Coin.isAmino(o.value)); + return o && (o.$typeUrl === MsgCreateValidator.typeUrl || Description.isAmino(o.description) && CommissionRates.isAmino(o.commission) && typeof o.min_self_delegation === 'string' && typeof o.delegator_address === 'string' && typeof o.validator_address === 'string' && Coin.isAmino(o.value)); }, encode(message: MsgCreateValidator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.description !== undefined) { @@ -384,13 +385,13 @@ export const MsgCreateValidator = { if (message.commission !== undefined) { CommissionRates.encode(message.commission, writer.uint32(18).fork()).ldelim(); } - if (message.minSelfDelegation !== "") { + if (message.minSelfDelegation !== '') { writer.uint32(26).string(message.minSelfDelegation); } - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(34).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(42).string(message.validatorAddress); } if (message.pubkey !== undefined) { @@ -408,30 +409,30 @@ export const MsgCreateValidator = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.commission = CommissionRates.decode(reader, reader.uint32()); - break; - case 3: - message.minSelfDelegation = reader.string(); - break; - case 4: - message.delegatorAddress = reader.string(); - break; - case 5: - message.validatorAddress = reader.string(); - break; - case 6: - message.pubkey = GlobalDecoderRegistry.unwrapAny(reader); - break; - case 7: - message.value = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.description = Description.decode(reader, reader.uint32()); + break; + case 2: + message.commission = CommissionRates.decode(reader, reader.uint32()); + break; + case 3: + message.minSelfDelegation = reader.string(); + break; + case 4: + message.delegatorAddress = reader.string(); + break; + case 5: + message.validatorAddress = reader.string(); + break; + case 6: + message.pubkey = GlobalDecoderRegistry.unwrapAny(reader); + break; + case 7: + message.value = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -440,9 +441,9 @@ export const MsgCreateValidator = { const message = createBaseMsgCreateValidator(); message.description = object.description !== undefined && object.description !== null ? Description.fromPartial(object.description) : undefined; message.commission = object.commission !== undefined && object.commission !== null ? CommissionRates.fromPartial(object.commission) : undefined; - message.minSelfDelegation = object.minSelfDelegation ?? ""; - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.minSelfDelegation = object.minSelfDelegation ?? ''; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; message.pubkey = object.pubkey !== undefined && object.pubkey !== null ? GlobalDecoderRegistry.fromPartial(object.pubkey) : undefined; message.value = object.value !== undefined && object.value !== null ? Coin.fromPartial(object.value) : undefined; return message; @@ -476,9 +477,9 @@ export const MsgCreateValidator = { const obj: any = {}; obj.description = message.description ? Description.toAmino(message.description) : Description.toAmino(Description.fromPartial({})); obj.commission = message.commission ? CommissionRates.toAmino(message.commission) : CommissionRates.toAmino(CommissionRates.fromPartial({})); - obj.min_self_delegation = message.minSelfDelegation ?? ""; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.min_self_delegation = message.minSelfDelegation ?? ''; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; obj.pubkey = message.pubkey ? decodePubkey(message.pubkey) : undefined; obj.value = message.value ? Coin.toAmino(message.value) : Coin.toAmino(Coin.fromPartial({})); return obj; @@ -488,7 +489,7 @@ export const MsgCreateValidator = { }, toAminoMsg(message: MsgCreateValidator): MsgCreateValidatorAminoMsg { return { - type: "cosmos-sdk/MsgCreateValidator", + type: 'cosmos-sdk/MsgCreateValidator', value: MsgCreateValidator.toAmino(message) }; }, @@ -500,7 +501,7 @@ export const MsgCreateValidator = { }, toProtoMsg(message: MsgCreateValidator): MsgCreateValidatorProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", + typeUrl: '/cosmos.staking.v1beta1.MsgCreateValidator', value: MsgCreateValidator.encode(message).finish() }; } @@ -511,8 +512,8 @@ function createBaseMsgCreateValidatorResponse(): MsgCreateValidatorResponse { return {}; } export const MsgCreateValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", - aminoType: "cosmos-sdk/MsgCreateValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgCreateValidatorResponse', + aminoType: 'cosmos-sdk/MsgCreateValidatorResponse', is(o: any): o is MsgCreateValidatorResponse { return o && o.$typeUrl === MsgCreateValidatorResponse.typeUrl; }, @@ -529,9 +530,9 @@ export const MsgCreateValidatorResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -553,7 +554,7 @@ export const MsgCreateValidatorResponse = { }, toAminoMsg(message: MsgCreateValidatorResponse): MsgCreateValidatorResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreateValidatorResponse", + type: 'cosmos-sdk/MsgCreateValidatorResponse', value: MsgCreateValidatorResponse.toAmino(message) }; }, @@ -565,7 +566,7 @@ export const MsgCreateValidatorResponse = { }, toProtoMsg(message: MsgCreateValidatorResponse): MsgCreateValidatorResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgCreateValidatorResponse', value: MsgCreateValidatorResponse.encode(message).finish() }; } @@ -575,31 +576,31 @@ GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidatorResponse.amino function createBaseMsgEditValidator(): MsgEditValidator { return { description: Description.fromPartial({}), - validatorAddress: "", - commissionRate: "", - minSelfDelegation: "" + validatorAddress: '', + commissionRate: '', + minSelfDelegation: '' }; } export const MsgEditValidator = { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - aminoType: "cosmos-sdk/MsgEditValidator", + typeUrl: '/cosmos.staking.v1beta1.MsgEditValidator', + aminoType: 'cosmos-sdk/MsgEditValidator', is(o: any): o is MsgEditValidator { - return o && (o.$typeUrl === MsgEditValidator.typeUrl || Description.is(o.description) && typeof o.validatorAddress === "string" && typeof o.commissionRate === "string" && typeof o.minSelfDelegation === "string"); + return o && (o.$typeUrl === MsgEditValidator.typeUrl || Description.is(o.description) && typeof o.validatorAddress === 'string' && typeof o.commissionRate === 'string' && typeof o.minSelfDelegation === 'string'); }, isAmino(o: any): o is MsgEditValidatorAmino { - return o && (o.$typeUrl === MsgEditValidator.typeUrl || Description.isAmino(o.description) && typeof o.validator_address === "string" && typeof o.commission_rate === "string" && typeof o.min_self_delegation === "string"); + return o && (o.$typeUrl === MsgEditValidator.typeUrl || Description.isAmino(o.description) && typeof o.validator_address === 'string' && typeof o.commission_rate === 'string' && typeof o.min_self_delegation === 'string'); }, encode(message: MsgEditValidator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.description !== undefined) { Description.encode(message.description, writer.uint32(10).fork()).ldelim(); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } - if (message.commissionRate !== "") { + if (message.commissionRate !== '') { writer.uint32(26).string(message.commissionRate); } - if (message.minSelfDelegation !== "") { + if (message.minSelfDelegation !== '') { writer.uint32(34).string(message.minSelfDelegation); } return writer; @@ -611,21 +612,21 @@ export const MsgEditValidator = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.commissionRate = reader.string(); - break; - case 4: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.description = Description.decode(reader, reader.uint32()); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.commissionRate = reader.string(); + break; + case 4: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -633,9 +634,9 @@ export const MsgEditValidator = { fromPartial(object: DeepPartial): MsgEditValidator { const message = createBaseMsgEditValidator(); message.description = object.description !== undefined && object.description !== null ? Description.fromPartial(object.description) : undefined; - message.validatorAddress = object.validatorAddress ?? ""; - message.commissionRate = object.commissionRate ?? ""; - message.minSelfDelegation = object.minSelfDelegation ?? ""; + message.validatorAddress = object.validatorAddress ?? ''; + message.commissionRate = object.commissionRate ?? ''; + message.minSelfDelegation = object.minSelfDelegation ?? ''; return message; }, fromAmino(object: MsgEditValidatorAmino): MsgEditValidator { @@ -657,9 +658,9 @@ export const MsgEditValidator = { toAmino(message: MsgEditValidator): MsgEditValidatorAmino { const obj: any = {}; obj.description = message.description ? Description.toAmino(message.description) : Description.toAmino(Description.fromPartial({})); - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; - obj.commission_rate = message.commissionRate === "" ? undefined : message.commissionRate; - obj.min_self_delegation = message.minSelfDelegation === "" ? undefined : message.minSelfDelegation; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; + obj.commission_rate = message.commissionRate === '' ? undefined : message.commissionRate; + obj.min_self_delegation = message.minSelfDelegation === '' ? undefined : message.minSelfDelegation; return obj; }, fromAminoMsg(object: MsgEditValidatorAminoMsg): MsgEditValidator { @@ -667,7 +668,7 @@ export const MsgEditValidator = { }, toAminoMsg(message: MsgEditValidator): MsgEditValidatorAminoMsg { return { - type: "cosmos-sdk/MsgEditValidator", + type: 'cosmos-sdk/MsgEditValidator', value: MsgEditValidator.toAmino(message) }; }, @@ -679,7 +680,7 @@ export const MsgEditValidator = { }, toProtoMsg(message: MsgEditValidator): MsgEditValidatorProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", + typeUrl: '/cosmos.staking.v1beta1.MsgEditValidator', value: MsgEditValidator.encode(message).finish() }; } @@ -690,8 +691,8 @@ function createBaseMsgEditValidatorResponse(): MsgEditValidatorResponse { return {}; } export const MsgEditValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", - aminoType: "cosmos-sdk/MsgEditValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgEditValidatorResponse', + aminoType: 'cosmos-sdk/MsgEditValidatorResponse', is(o: any): o is MsgEditValidatorResponse { return o && o.$typeUrl === MsgEditValidatorResponse.typeUrl; }, @@ -708,9 +709,9 @@ export const MsgEditValidatorResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -732,7 +733,7 @@ export const MsgEditValidatorResponse = { }, toAminoMsg(message: MsgEditValidatorResponse): MsgEditValidatorResponseAminoMsg { return { - type: "cosmos-sdk/MsgEditValidatorResponse", + type: 'cosmos-sdk/MsgEditValidatorResponse', value: MsgEditValidatorResponse.toAmino(message) }; }, @@ -744,7 +745,7 @@ export const MsgEditValidatorResponse = { }, toProtoMsg(message: MsgEditValidatorResponse): MsgEditValidatorResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgEditValidatorResponse', value: MsgEditValidatorResponse.encode(message).finish() }; } @@ -753,25 +754,25 @@ GlobalDecoderRegistry.register(MsgEditValidatorResponse.typeUrl, MsgEditValidato GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidatorResponse.aminoType, MsgEditValidatorResponse.typeUrl); function createBaseMsgDelegate(): MsgDelegate { return { - delegatorAddress: "", - validatorAddress: "", + delegatorAddress: '', + validatorAddress: '', amount: Coin.fromPartial({}) }; } export const MsgDelegate = { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - aminoType: "cosmos-sdk/MsgDelegate", + typeUrl: '/cosmos.staking.v1beta1.MsgDelegate', + aminoType: 'cosmos-sdk/MsgDelegate', is(o: any): o is MsgDelegate { - return o && (o.$typeUrl === MsgDelegate.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string" && Coin.is(o.amount)); + return o && (o.$typeUrl === MsgDelegate.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string' && Coin.is(o.amount)); }, isAmino(o: any): o is MsgDelegateAmino { - return o && (o.$typeUrl === MsgDelegate.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string" && Coin.isAmino(o.amount)); + return o && (o.$typeUrl === MsgDelegate.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_address === 'string' && Coin.isAmino(o.amount)); }, encode(message: MsgDelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } if (message.amount !== undefined) { @@ -786,26 +787,26 @@ export const MsgDelegate = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgDelegate { const message = createBaseMsgDelegate(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; return message; }, @@ -824,8 +825,8 @@ export const MsgDelegate = { }, toAmino(message: MsgDelegate): MsgDelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount) : Coin.toAmino(Coin.fromPartial({})); return obj; }, @@ -834,7 +835,7 @@ export const MsgDelegate = { }, toAminoMsg(message: MsgDelegate): MsgDelegateAminoMsg { return { - type: "cosmos-sdk/MsgDelegate", + type: 'cosmos-sdk/MsgDelegate', value: MsgDelegate.toAmino(message) }; }, @@ -846,7 +847,7 @@ export const MsgDelegate = { }, toProtoMsg(message: MsgDelegate): MsgDelegateProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", + typeUrl: '/cosmos.staking.v1beta1.MsgDelegate', value: MsgDelegate.encode(message).finish() }; } @@ -857,8 +858,8 @@ function createBaseMsgDelegateResponse(): MsgDelegateResponse { return {}; } export const MsgDelegateResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", - aminoType: "cosmos-sdk/MsgDelegateResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgDelegateResponse', + aminoType: 'cosmos-sdk/MsgDelegateResponse', is(o: any): o is MsgDelegateResponse { return o && o.$typeUrl === MsgDelegateResponse.typeUrl; }, @@ -875,9 +876,9 @@ export const MsgDelegateResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -899,7 +900,7 @@ export const MsgDelegateResponse = { }, toAminoMsg(message: MsgDelegateResponse): MsgDelegateResponseAminoMsg { return { - type: "cosmos-sdk/MsgDelegateResponse", + type: 'cosmos-sdk/MsgDelegateResponse', value: MsgDelegateResponse.toAmino(message) }; }, @@ -911,7 +912,7 @@ export const MsgDelegateResponse = { }, toProtoMsg(message: MsgDelegateResponse): MsgDelegateResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgDelegateResponse', value: MsgDelegateResponse.encode(message).finish() }; } @@ -920,29 +921,29 @@ GlobalDecoderRegistry.register(MsgDelegateResponse.typeUrl, MsgDelegateResponse) GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegateResponse.aminoType, MsgDelegateResponse.typeUrl); function createBaseMsgBeginRedelegate(): MsgBeginRedelegate { return { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", + delegatorAddress: '', + validatorSrcAddress: '', + validatorDstAddress: '', amount: Coin.fromPartial({}) }; } export const MsgBeginRedelegate = { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - aminoType: "cosmos-sdk/MsgBeginRedelegate", + typeUrl: '/cosmos.staking.v1beta1.MsgBeginRedelegate', + aminoType: 'cosmos-sdk/MsgBeginRedelegate', is(o: any): o is MsgBeginRedelegate { - return o && (o.$typeUrl === MsgBeginRedelegate.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorSrcAddress === "string" && typeof o.validatorDstAddress === "string" && Coin.is(o.amount)); + return o && (o.$typeUrl === MsgBeginRedelegate.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorSrcAddress === 'string' && typeof o.validatorDstAddress === 'string' && Coin.is(o.amount)); }, isAmino(o: any): o is MsgBeginRedelegateAmino { - return o && (o.$typeUrl === MsgBeginRedelegate.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_src_address === "string" && typeof o.validator_dst_address === "string" && Coin.isAmino(o.amount)); + return o && (o.$typeUrl === MsgBeginRedelegate.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_src_address === 'string' && typeof o.validator_dst_address === 'string' && Coin.isAmino(o.amount)); }, encode(message: MsgBeginRedelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorSrcAddress !== "") { + if (message.validatorSrcAddress !== '') { writer.uint32(18).string(message.validatorSrcAddress); } - if (message.validatorDstAddress !== "") { + if (message.validatorDstAddress !== '') { writer.uint32(26).string(message.validatorDstAddress); } if (message.amount !== undefined) { @@ -957,30 +958,30 @@ export const MsgBeginRedelegate = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + message.amount = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgBeginRedelegate { const message = createBaseMsgBeginRedelegate(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorSrcAddress = object.validatorSrcAddress ?? ""; - message.validatorDstAddress = object.validatorDstAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorSrcAddress = object.validatorSrcAddress ?? ''; + message.validatorDstAddress = object.validatorDstAddress ?? ''; message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; return message; }, @@ -1002,9 +1003,9 @@ export const MsgBeginRedelegate = { }, toAmino(message: MsgBeginRedelegate): MsgBeginRedelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_src_address = message.validatorSrcAddress === '' ? undefined : message.validatorSrcAddress; + obj.validator_dst_address = message.validatorDstAddress === '' ? undefined : message.validatorDstAddress; obj.amount = message.amount ? Coin.toAmino(message.amount) : Coin.toAmino(Coin.fromPartial({})); return obj; }, @@ -1013,7 +1014,7 @@ export const MsgBeginRedelegate = { }, toAminoMsg(message: MsgBeginRedelegate): MsgBeginRedelegateAminoMsg { return { - type: "cosmos-sdk/MsgBeginRedelegate", + type: 'cosmos-sdk/MsgBeginRedelegate', value: MsgBeginRedelegate.toAmino(message) }; }, @@ -1025,7 +1026,7 @@ export const MsgBeginRedelegate = { }, toProtoMsg(message: MsgBeginRedelegate): MsgBeginRedelegateProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", + typeUrl: '/cosmos.staking.v1beta1.MsgBeginRedelegate', value: MsgBeginRedelegate.encode(message).finish() }; } @@ -1038,8 +1039,8 @@ function createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse { }; } export const MsgBeginRedelegateResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", - aminoType: "cosmos-sdk/MsgBeginRedelegateResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgBeginRedelegateResponse', + aminoType: 'cosmos-sdk/MsgBeginRedelegateResponse', is(o: any): o is MsgBeginRedelegateResponse { return o && (o.$typeUrl === MsgBeginRedelegateResponse.typeUrl || Timestamp.is(o.completionTime)); }, @@ -1059,12 +1060,12 @@ export const MsgBeginRedelegateResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1091,7 +1092,7 @@ export const MsgBeginRedelegateResponse = { }, toAminoMsg(message: MsgBeginRedelegateResponse): MsgBeginRedelegateResponseAminoMsg { return { - type: "cosmos-sdk/MsgBeginRedelegateResponse", + type: 'cosmos-sdk/MsgBeginRedelegateResponse', value: MsgBeginRedelegateResponse.toAmino(message) }; }, @@ -1103,7 +1104,7 @@ export const MsgBeginRedelegateResponse = { }, toProtoMsg(message: MsgBeginRedelegateResponse): MsgBeginRedelegateResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgBeginRedelegateResponse', value: MsgBeginRedelegateResponse.encode(message).finish() }; } @@ -1112,25 +1113,25 @@ GlobalDecoderRegistry.register(MsgBeginRedelegateResponse.typeUrl, MsgBeginRedel GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegateResponse.aminoType, MsgBeginRedelegateResponse.typeUrl); function createBaseMsgUndelegate(): MsgUndelegate { return { - delegatorAddress: "", - validatorAddress: "", + delegatorAddress: '', + validatorAddress: '', amount: Coin.fromPartial({}) }; } export const MsgUndelegate = { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - aminoType: "cosmos-sdk/MsgUndelegate", + typeUrl: '/cosmos.staking.v1beta1.MsgUndelegate', + aminoType: 'cosmos-sdk/MsgUndelegate', is(o: any): o is MsgUndelegate { - return o && (o.$typeUrl === MsgUndelegate.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string" && Coin.is(o.amount)); + return o && (o.$typeUrl === MsgUndelegate.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string' && Coin.is(o.amount)); }, isAmino(o: any): o is MsgUndelegateAmino { - return o && (o.$typeUrl === MsgUndelegate.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string" && Coin.isAmino(o.amount)); + return o && (o.$typeUrl === MsgUndelegate.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_address === 'string' && Coin.isAmino(o.amount)); }, encode(message: MsgUndelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } if (message.amount !== undefined) { @@ -1145,26 +1146,26 @@ export const MsgUndelegate = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUndelegate { const message = createBaseMsgUndelegate(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; return message; }, @@ -1183,8 +1184,8 @@ export const MsgUndelegate = { }, toAmino(message: MsgUndelegate): MsgUndelegateAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount) : Coin.toAmino(Coin.fromPartial({})); return obj; }, @@ -1193,7 +1194,7 @@ export const MsgUndelegate = { }, toAminoMsg(message: MsgUndelegate): MsgUndelegateAminoMsg { return { - type: "cosmos-sdk/MsgUndelegate", + type: 'cosmos-sdk/MsgUndelegate', value: MsgUndelegate.toAmino(message) }; }, @@ -1205,7 +1206,7 @@ export const MsgUndelegate = { }, toProtoMsg(message: MsgUndelegate): MsgUndelegateProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", + typeUrl: '/cosmos.staking.v1beta1.MsgUndelegate', value: MsgUndelegate.encode(message).finish() }; } @@ -1219,8 +1220,8 @@ function createBaseMsgUndelegateResponse(): MsgUndelegateResponse { }; } export const MsgUndelegateResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", - aminoType: "cosmos-sdk/MsgUndelegateResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgUndelegateResponse', + aminoType: 'cosmos-sdk/MsgUndelegateResponse', is(o: any): o is MsgUndelegateResponse { return o && (o.$typeUrl === MsgUndelegateResponse.typeUrl || Timestamp.is(o.completionTime) && Coin.is(o.amount)); }, @@ -1243,15 +1244,15 @@ export const MsgUndelegateResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 2: + message.amount = Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1283,7 +1284,7 @@ export const MsgUndelegateResponse = { }, toAminoMsg(message: MsgUndelegateResponse): MsgUndelegateResponseAminoMsg { return { - type: "cosmos-sdk/MsgUndelegateResponse", + type: 'cosmos-sdk/MsgUndelegateResponse', value: MsgUndelegateResponse.toAmino(message) }; }, @@ -1295,7 +1296,7 @@ export const MsgUndelegateResponse = { }, toProtoMsg(message: MsgUndelegateResponse): MsgUndelegateResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgUndelegateResponse', value: MsgUndelegateResponse.encode(message).finish() }; } @@ -1304,26 +1305,26 @@ GlobalDecoderRegistry.register(MsgUndelegateResponse.typeUrl, MsgUndelegateRespo GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegateResponse.aminoType, MsgUndelegateResponse.typeUrl); function createBaseMsgCancelUnbondingDelegation(): MsgCancelUnbondingDelegation { return { - delegatorAddress: "", - validatorAddress: "", + delegatorAddress: '', + validatorAddress: '', amount: Coin.fromPartial({}), creationHeight: BigInt(0) }; } export const MsgCancelUnbondingDelegation = { - typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", - aminoType: "cosmos-sdk/MsgCancelUnbondingDelegation", + typeUrl: '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation', + aminoType: 'cosmos-sdk/MsgCancelUnbondingDelegation', is(o: any): o is MsgCancelUnbondingDelegation { - return o && (o.$typeUrl === MsgCancelUnbondingDelegation.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string" && Coin.is(o.amount) && typeof o.creationHeight === "bigint"); + return o && (o.$typeUrl === MsgCancelUnbondingDelegation.typeUrl || typeof o.delegatorAddress === 'string' && typeof o.validatorAddress === 'string' && Coin.is(o.amount) && typeof o.creationHeight === 'bigint'); }, isAmino(o: any): o is MsgCancelUnbondingDelegationAmino { - return o && (o.$typeUrl === MsgCancelUnbondingDelegation.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string" && Coin.isAmino(o.amount) && typeof o.creation_height === "bigint"); + return o && (o.$typeUrl === MsgCancelUnbondingDelegation.typeUrl || typeof o.delegator_address === 'string' && typeof o.validator_address === 'string' && Coin.isAmino(o.amount) && typeof o.creation_height === 'bigint'); }, encode(message: MsgCancelUnbondingDelegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { + if (message.delegatorAddress !== '') { writer.uint32(10).string(message.delegatorAddress); } - if (message.validatorAddress !== "") { + if (message.validatorAddress !== '') { writer.uint32(18).string(message.validatorAddress); } if (message.amount !== undefined) { @@ -1341,29 +1342,29 @@ export const MsgCancelUnbondingDelegation = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.creationHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = Coin.decode(reader, reader.uint32()); + break; + case 4: + message.creationHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCancelUnbondingDelegation { const message = createBaseMsgCancelUnbondingDelegation(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; + message.delegatorAddress = object.delegatorAddress ?? ''; + message.validatorAddress = object.validatorAddress ?? ''; message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null ? BigInt(object.creationHeight.toString()) : BigInt(0); return message; @@ -1386,8 +1387,8 @@ export const MsgCancelUnbondingDelegation = { }, toAmino(message: MsgCancelUnbondingDelegation): MsgCancelUnbondingDelegationAmino { const obj: any = {}; - obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; - obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; + obj.delegator_address = message.delegatorAddress === '' ? undefined : message.delegatorAddress; + obj.validator_address = message.validatorAddress === '' ? undefined : message.validatorAddress; obj.amount = message.amount ? Coin.toAmino(message.amount) : Coin.toAmino(Coin.fromPartial({})); obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight.toString() : undefined; return obj; @@ -1397,7 +1398,7 @@ export const MsgCancelUnbondingDelegation = { }, toAminoMsg(message: MsgCancelUnbondingDelegation): MsgCancelUnbondingDelegationAminoMsg { return { - type: "cosmos-sdk/MsgCancelUnbondingDelegation", + type: 'cosmos-sdk/MsgCancelUnbondingDelegation', value: MsgCancelUnbondingDelegation.toAmino(message) }; }, @@ -1409,7 +1410,7 @@ export const MsgCancelUnbondingDelegation = { }, toProtoMsg(message: MsgCancelUnbondingDelegation): MsgCancelUnbondingDelegationProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", + typeUrl: '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation', value: MsgCancelUnbondingDelegation.encode(message).finish() }; } @@ -1420,8 +1421,8 @@ function createBaseMsgCancelUnbondingDelegationResponse(): MsgCancelUnbondingDel return {}; } export const MsgCancelUnbondingDelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", - aminoType: "cosmos-sdk/MsgCancelUnbondingDelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse', + aminoType: 'cosmos-sdk/MsgCancelUnbondingDelegationResponse', is(o: any): o is MsgCancelUnbondingDelegationResponse { return o && o.$typeUrl === MsgCancelUnbondingDelegationResponse.typeUrl; }, @@ -1438,9 +1439,9 @@ export const MsgCancelUnbondingDelegationResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1462,7 +1463,7 @@ export const MsgCancelUnbondingDelegationResponse = { }, toAminoMsg(message: MsgCancelUnbondingDelegationResponse): MsgCancelUnbondingDelegationResponseAminoMsg { return { - type: "cosmos-sdk/MsgCancelUnbondingDelegationResponse", + type: 'cosmos-sdk/MsgCancelUnbondingDelegationResponse', value: MsgCancelUnbondingDelegationResponse.toAmino(message) }; }, @@ -1474,7 +1475,7 @@ export const MsgCancelUnbondingDelegationResponse = { }, toProtoMsg(message: MsgCancelUnbondingDelegationResponse): MsgCancelUnbondingDelegationResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse', value: MsgCancelUnbondingDelegationResponse.encode(message).finish() }; } @@ -1483,21 +1484,21 @@ GlobalDecoderRegistry.register(MsgCancelUnbondingDelegationResponse.typeUrl, Msg GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegationResponse.aminoType, MsgCancelUnbondingDelegationResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - authority: "", + authority: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParams", - aminoType: "cosmos-sdk/x/staking/MsgUpdateParams", + typeUrl: '/cosmos.staking.v1beta1.MsgUpdateParams', + aminoType: 'cosmos-sdk/x/staking/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.params !== undefined) { @@ -1512,22 +1513,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -1543,7 +1544,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({})); return obj; }, @@ -1552,7 +1553,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/x/staking/MsgUpdateParams", + type: 'cosmos-sdk/x/staking/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -1564,7 +1565,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParams", + typeUrl: '/cosmos.staking.v1beta1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -1575,8 +1576,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/MsgUpdateParamsResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -1593,9 +1594,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1617,7 +1618,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParamsResponse", + type: 'cosmos-sdk/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -1629,7 +1630,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParamsResponse", + typeUrl: '/cosmos.staking.v1beta1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/tx/signing/v1beta1/signing.ts b/libs/cosmos-types/cosmos/tx/signing/v1beta1/signing.ts new file mode 100644 index 00000000..2fd66583 --- /dev/null +++ b/libs/cosmos-types/cosmos/tx/signing/v1beta1/signing.ts @@ -0,0 +1,688 @@ +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { Any, AnyAmino } from '../../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial, isSet } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { CompactBitArray, CompactBitArrayAmino } from '../../../crypto/multisig/v1beta1/multisig'; +/** + * SignMode represents a signing mode with its own security guarantees. + * + * This enum should be considered a registry of all known sign modes + * in the Cosmos ecosystem. Apps are not expected to support all known + * sign modes. Apps that would like to support custom sign modes are + * encouraged to open a small PR against this file to add a new case + * to this SignMode enum describing their sign mode so that different + * apps have a consistent version of this enum. + */ +export enum SignMode { + /** + * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + * rejected. + */ + SIGN_MODE_UNSPECIFIED = 0, + /** + * SIGN_MODE_DIRECT - 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 - 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. + * + * Since: cosmos-sdk 0.50 + */ + SIGN_MODE_TEXTUAL = 2, + /** + * SIGN_MODE_DIRECT_AUX - SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + * SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + * require signers signing over other signers' `signer_info`. + * + * Since: cosmos-sdk 0.46 + */ + SIGN_MODE_DIRECT_AUX = 3, + /** + * SIGN_MODE_LEGACY_AMINO_JSON - 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 - 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, + UNRECOGNIZED = -1, +} +export const SignModeAmino = SignMode; +export function signModeFromJSON(object: any): SignMode { + switch (object) { + case 0: + case 'SIGN_MODE_UNSPECIFIED': + return SignMode.SIGN_MODE_UNSPECIFIED; + case 1: + case 'SIGN_MODE_DIRECT': + return SignMode.SIGN_MODE_DIRECT; + case 2: + case 'SIGN_MODE_TEXTUAL': + return SignMode.SIGN_MODE_TEXTUAL; + case 3: + case 'SIGN_MODE_DIRECT_AUX': + return SignMode.SIGN_MODE_DIRECT_AUX; + case 127: + case 'SIGN_MODE_LEGACY_AMINO_JSON': + return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; + case 191: + case 'SIGN_MODE_EIP_191': + return SignMode.SIGN_MODE_EIP_191; + case -1: + case 'UNRECOGNIZED': + default: + return SignMode.UNRECOGNIZED; + } +} +export function signModeToJSON(object: SignMode): string { + switch (object) { + case SignMode.SIGN_MODE_UNSPECIFIED: + return 'SIGN_MODE_UNSPECIFIED'; + case SignMode.SIGN_MODE_DIRECT: + return 'SIGN_MODE_DIRECT'; + case SignMode.SIGN_MODE_TEXTUAL: + return 'SIGN_MODE_TEXTUAL'; + case SignMode.SIGN_MODE_DIRECT_AUX: + return 'SIGN_MODE_DIRECT_AUX'; + case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: + return 'SIGN_MODE_LEGACY_AMINO_JSON'; + case SignMode.SIGN_MODE_EIP_191: + return 'SIGN_MODE_EIP_191'; + case SignMode.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} +/** SignatureDescriptors wraps multiple SignatureDescriptor's. */ +export interface SignatureDescriptors { + /** signatures are the signature descriptors */ + signatures: SignatureDescriptor[]; +} +export interface SignatureDescriptorsProtoMsg { + typeUrl: '/cosmos.tx.signing.v1beta1.SignatureDescriptors'; + value: Uint8Array; +} +/** SignatureDescriptors wraps multiple SignatureDescriptor's. */ +export interface SignatureDescriptorsAmino { + /** signatures are the signature descriptors */ + signatures: SignatureDescriptorAmino[]; +} +export interface SignatureDescriptorsAminoMsg { + type: 'cosmos-sdk/SignatureDescriptors'; + value: SignatureDescriptorsAmino; +} +/** + * 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. + */ +export interface SignatureDescriptor { + /** public_key is the public key of the signer */ + publicKey?: Any; + data?: SignatureDescriptor_Data; + /** + * 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. + */ + sequence: bigint; +} +export interface SignatureDescriptorProtoMsg { + typeUrl: '/cosmos.tx.signing.v1beta1.SignatureDescriptor'; + value: Uint8Array; +} +/** + * 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. + */ +export interface SignatureDescriptorAmino { + /** public_key is the public key of the signer */ + public_key?: AnyAmino; + data?: SignatureDescriptor_DataAmino; + /** + * 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. + */ + sequence: string; +} +export interface SignatureDescriptorAminoMsg { + type: 'cosmos-sdk/SignatureDescriptor'; + value: SignatureDescriptorAmino; +} +/** Data represents signature data */ +export interface SignatureDescriptor_Data { + /** single represents a single signer */ + single?: SignatureDescriptor_Data_Single; + /** multi represents a multisig signer */ + multi?: SignatureDescriptor_Data_Multi; +} +export interface SignatureDescriptor_DataProtoMsg { + typeUrl: '/cosmos.tx.signing.v1beta1.Data'; + value: Uint8Array; +} +/** Data represents signature data */ +export interface SignatureDescriptor_DataAmino { + /** single represents a single signer */ + single?: SignatureDescriptor_Data_SingleAmino; + /** multi represents a multisig signer */ + multi?: SignatureDescriptor_Data_MultiAmino; +} +export interface SignatureDescriptor_DataAminoMsg { + type: 'cosmos-sdk/Data'; + value: SignatureDescriptor_DataAmino; +} +/** Single is the signature data for a single signer */ +export interface SignatureDescriptor_Data_Single { + /** mode is the signing mode of the single signer */ + mode: SignMode; + /** signature is the raw signature bytes */ + signature: Uint8Array; +} +export interface SignatureDescriptor_Data_SingleProtoMsg { + typeUrl: '/cosmos.tx.signing.v1beta1.Single'; + value: Uint8Array; +} +/** Single is the signature data for a single signer */ +export interface SignatureDescriptor_Data_SingleAmino { + /** mode is the signing mode of the single signer */ + mode: SignMode; + /** signature is the raw signature bytes */ + signature: string; +} +export interface SignatureDescriptor_Data_SingleAminoMsg { + type: 'cosmos-sdk/Single'; + value: SignatureDescriptor_Data_SingleAmino; +} +/** Multi is the signature data for a multisig public key */ +export interface SignatureDescriptor_Data_Multi { + /** bitarray specifies which keys within the multisig are signing */ + bitarray?: CompactBitArray; + /** signatures is the signatures of the multi-signature */ + signatures: SignatureDescriptor_Data[]; +} +export interface SignatureDescriptor_Data_MultiProtoMsg { + typeUrl: '/cosmos.tx.signing.v1beta1.Multi'; + value: Uint8Array; +} +/** Multi is the signature data for a multisig public key */ +export interface SignatureDescriptor_Data_MultiAmino { + /** bitarray specifies which keys within the multisig are signing */ + bitarray?: CompactBitArrayAmino; + /** signatures is the signatures of the multi-signature */ + signatures: SignatureDescriptor_DataAmino[]; +} +export interface SignatureDescriptor_Data_MultiAminoMsg { + type: 'cosmos-sdk/Multi'; + value: SignatureDescriptor_Data_MultiAmino; +} +function createBaseSignatureDescriptors(): SignatureDescriptors { + return { + signatures: [] + }; +} +export const SignatureDescriptors = { + typeUrl: '/cosmos.tx.signing.v1beta1.SignatureDescriptors', + aminoType: 'cosmos-sdk/SignatureDescriptors', + is(o: any): o is SignatureDescriptors { + return o && (o.$typeUrl === SignatureDescriptors.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || SignatureDescriptor.is(o.signatures[0]))); + }, + isAmino(o: any): o is SignatureDescriptorsAmino { + return o && (o.$typeUrl === SignatureDescriptors.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || SignatureDescriptor.isAmino(o.signatures[0]))); + }, + encode(message: SignatureDescriptors, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.signatures) { + SignatureDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptors { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignatureDescriptors(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signatures.push(SignatureDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignatureDescriptors { + const message = createBaseSignatureDescriptors(); + message.signatures = object.signatures?.map(e => SignatureDescriptor.fromPartial(e)) || []; + return message; + }, + fromAmino(object: SignatureDescriptorsAmino): SignatureDescriptors { + const message = createBaseSignatureDescriptors(); + message.signatures = object.signatures?.map(e => SignatureDescriptor.fromAmino(e)) || []; + return message; + }, + toAmino(message: SignatureDescriptors): SignatureDescriptorsAmino { + const obj: any = {}; + if (message.signatures) { + obj.signatures = message.signatures.map(e => e ? SignatureDescriptor.toAmino(e) : undefined); + } else { + obj.signatures = message.signatures; + } + return obj; + }, + fromAminoMsg(object: SignatureDescriptorsAminoMsg): SignatureDescriptors { + return SignatureDescriptors.fromAmino(object.value); + }, + toAminoMsg(message: SignatureDescriptors): SignatureDescriptorsAminoMsg { + return { + type: 'cosmos-sdk/SignatureDescriptors', + value: SignatureDescriptors.toAmino(message) + }; + }, + fromProtoMsg(message: SignatureDescriptorsProtoMsg): SignatureDescriptors { + return SignatureDescriptors.decode(message.value); + }, + toProto(message: SignatureDescriptors): Uint8Array { + return SignatureDescriptors.encode(message).finish(); + }, + toProtoMsg(message: SignatureDescriptors): SignatureDescriptorsProtoMsg { + return { + typeUrl: '/cosmos.tx.signing.v1beta1.SignatureDescriptors', + value: SignatureDescriptors.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignatureDescriptors.typeUrl, SignatureDescriptors); +GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptors.aminoType, SignatureDescriptors.typeUrl); +function createBaseSignatureDescriptor(): SignatureDescriptor { + return { + publicKey: undefined, + data: undefined, + sequence: BigInt(0) + }; +} +export const SignatureDescriptor = { + typeUrl: '/cosmos.tx.signing.v1beta1.SignatureDescriptor', + aminoType: 'cosmos-sdk/SignatureDescriptor', + is(o: any): o is SignatureDescriptor { + return o && (o.$typeUrl === SignatureDescriptor.typeUrl || typeof o.sequence === 'bigint'); + }, + isAmino(o: any): o is SignatureDescriptorAmino { + return o && (o.$typeUrl === SignatureDescriptor.typeUrl || typeof o.sequence === 'bigint'); + }, + encode(message: SignatureDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.publicKey !== undefined) { + Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); + } + if (message.data !== undefined) { + SignatureDescriptor_Data.encode(message.data, writer.uint32(18).fork()).ldelim(); + } + if (message.sequence !== BigInt(0)) { + writer.uint32(24).uint64(message.sequence); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignatureDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = Any.decode(reader, reader.uint32()); + break; + case 2: + message.data = SignatureDescriptor_Data.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignatureDescriptor { + const message = createBaseSignatureDescriptor(); + message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; + message.data = object.data !== undefined && object.data !== null ? SignatureDescriptor_Data.fromPartial(object.data) : undefined; + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); + return message; + }, + fromAmino(object: SignatureDescriptorAmino): SignatureDescriptor { + const message = createBaseSignatureDescriptor(); + if (object.public_key !== undefined && object.public_key !== null) { + message.publicKey = Any.fromAmino(object.public_key); + } + if (object.data !== undefined && object.data !== null) { + message.data = SignatureDescriptor_Data.fromAmino(object.data); + } + if (object.sequence !== undefined && object.sequence !== null) { + message.sequence = BigInt(object.sequence); + } + return message; + }, + toAmino(message: SignatureDescriptor): SignatureDescriptorAmino { + const obj: any = {}; + obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; + obj.data = message.data ? SignatureDescriptor_Data.toAmino(message.data) : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; + return obj; + }, + fromAminoMsg(object: SignatureDescriptorAminoMsg): SignatureDescriptor { + return SignatureDescriptor.fromAmino(object.value); + }, + toAminoMsg(message: SignatureDescriptor): SignatureDescriptorAminoMsg { + return { + type: 'cosmos-sdk/SignatureDescriptor', + value: SignatureDescriptor.toAmino(message) + }; + }, + fromProtoMsg(message: SignatureDescriptorProtoMsg): SignatureDescriptor { + return SignatureDescriptor.decode(message.value); + }, + toProto(message: SignatureDescriptor): Uint8Array { + return SignatureDescriptor.encode(message).finish(); + }, + toProtoMsg(message: SignatureDescriptor): SignatureDescriptorProtoMsg { + return { + typeUrl: '/cosmos.tx.signing.v1beta1.SignatureDescriptor', + value: SignatureDescriptor.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignatureDescriptor.typeUrl, SignatureDescriptor); +GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor.aminoType, SignatureDescriptor.typeUrl); +function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { + return { + single: undefined, + multi: undefined + }; +} +export const SignatureDescriptor_Data = { + typeUrl: '/cosmos.tx.signing.v1beta1.Data', + aminoType: 'cosmos-sdk/Data', + is(o: any): o is SignatureDescriptor_Data { + return o && o.$typeUrl === SignatureDescriptor_Data.typeUrl; + }, + isAmino(o: any): o is SignatureDescriptor_DataAmino { + return o && o.$typeUrl === SignatureDescriptor_Data.typeUrl; + }, + encode(message: SignatureDescriptor_Data, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.single !== undefined) { + SignatureDescriptor_Data_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); + } + if (message.multi !== undefined) { + SignatureDescriptor_Data_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor_Data { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignatureDescriptor_Data(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = SignatureDescriptor_Data_Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = SignatureDescriptor_Data_Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignatureDescriptor_Data { + const message = createBaseSignatureDescriptor_Data(); + message.single = object.single !== undefined && object.single !== null ? SignatureDescriptor_Data_Single.fromPartial(object.single) : undefined; + message.multi = object.multi !== undefined && object.multi !== null ? SignatureDescriptor_Data_Multi.fromPartial(object.multi) : undefined; + return message; + }, + fromAmino(object: SignatureDescriptor_DataAmino): SignatureDescriptor_Data { + const message = createBaseSignatureDescriptor_Data(); + if (object.single !== undefined && object.single !== null) { + message.single = SignatureDescriptor_Data_Single.fromAmino(object.single); + } + if (object.multi !== undefined && object.multi !== null) { + message.multi = SignatureDescriptor_Data_Multi.fromAmino(object.multi); + } + return message; + }, + toAmino(message: SignatureDescriptor_Data): SignatureDescriptor_DataAmino { + const obj: any = {}; + obj.single = message.single ? SignatureDescriptor_Data_Single.toAmino(message.single) : undefined; + obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toAmino(message.multi) : undefined; + return obj; + }, + fromAminoMsg(object: SignatureDescriptor_DataAminoMsg): SignatureDescriptor_Data { + return SignatureDescriptor_Data.fromAmino(object.value); + }, + toAminoMsg(message: SignatureDescriptor_Data): SignatureDescriptor_DataAminoMsg { + return { + type: 'cosmos-sdk/Data', + value: SignatureDescriptor_Data.toAmino(message) + }; + }, + fromProtoMsg(message: SignatureDescriptor_DataProtoMsg): SignatureDescriptor_Data { + return SignatureDescriptor_Data.decode(message.value); + }, + toProto(message: SignatureDescriptor_Data): Uint8Array { + return SignatureDescriptor_Data.encode(message).finish(); + }, + toProtoMsg(message: SignatureDescriptor_Data): SignatureDescriptor_DataProtoMsg { + return { + typeUrl: '/cosmos.tx.signing.v1beta1.Data', + value: SignatureDescriptor_Data.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignatureDescriptor_Data.typeUrl, SignatureDescriptor_Data); +GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data.aminoType, SignatureDescriptor_Data.typeUrl); +function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { + return { + mode: 0, + signature: new Uint8Array() + }; +} +export const SignatureDescriptor_Data_Single = { + typeUrl: '/cosmos.tx.signing.v1beta1.Single', + aminoType: 'cosmos-sdk/Single', + is(o: any): o is SignatureDescriptor_Data_Single { + return o && (o.$typeUrl === SignatureDescriptor_Data_Single.typeUrl || isSet(o.mode) && (o.signature instanceof Uint8Array || typeof o.signature === 'string')); + }, + isAmino(o: any): o is SignatureDescriptor_Data_SingleAmino { + return o && (o.$typeUrl === SignatureDescriptor_Data_Single.typeUrl || isSet(o.mode) && (o.signature instanceof Uint8Array || typeof o.signature === 'string')); + }, + encode(message: SignatureDescriptor_Data_Single, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.mode !== 0) { + writer.uint32(8).int32(message.mode); + } + if (message.signature.length !== 0) { + writer.uint32(18).bytes(message.signature); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor_Data_Single { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignatureDescriptor_Data_Single(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = (reader.int32() as any); + break; + case 2: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignatureDescriptor_Data_Single { + const message = createBaseSignatureDescriptor_Data_Single(); + message.mode = object.mode ?? 0; + message.signature = object.signature ?? new Uint8Array(); + return message; + }, + fromAmino(object: SignatureDescriptor_Data_SingleAmino): SignatureDescriptor_Data_Single { + const message = createBaseSignatureDescriptor_Data_Single(); + if (object.mode !== undefined && object.mode !== null) { + message.mode = object.mode; + } + if (object.signature !== undefined && object.signature !== null) { + message.signature = bytesFromBase64(object.signature); + } + return message; + }, + toAmino(message: SignatureDescriptor_Data_Single): SignatureDescriptor_Data_SingleAmino { + const obj: any = {}; + obj.mode = message.mode === 0 ? undefined : message.mode; + obj.signature = message.signature ? base64FromBytes(message.signature) : undefined; + return obj; + }, + fromAminoMsg(object: SignatureDescriptor_Data_SingleAminoMsg): SignatureDescriptor_Data_Single { + return SignatureDescriptor_Data_Single.fromAmino(object.value); + }, + toAminoMsg(message: SignatureDescriptor_Data_Single): SignatureDescriptor_Data_SingleAminoMsg { + return { + type: 'cosmos-sdk/Single', + value: SignatureDescriptor_Data_Single.toAmino(message) + }; + }, + fromProtoMsg(message: SignatureDescriptor_Data_SingleProtoMsg): SignatureDescriptor_Data_Single { + return SignatureDescriptor_Data_Single.decode(message.value); + }, + toProto(message: SignatureDescriptor_Data_Single): Uint8Array { + return SignatureDescriptor_Data_Single.encode(message).finish(); + }, + toProtoMsg(message: SignatureDescriptor_Data_Single): SignatureDescriptor_Data_SingleProtoMsg { + return { + typeUrl: '/cosmos.tx.signing.v1beta1.Single', + value: SignatureDescriptor_Data_Single.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignatureDescriptor_Data_Single.typeUrl, SignatureDescriptor_Data_Single); +GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Single.aminoType, SignatureDescriptor_Data_Single.typeUrl); +function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { + return { + bitarray: undefined, + signatures: [] + }; +} +export const SignatureDescriptor_Data_Multi = { + typeUrl: '/cosmos.tx.signing.v1beta1.Multi', + aminoType: 'cosmos-sdk/Multi', + is(o: any): o is SignatureDescriptor_Data_Multi { + return o && (o.$typeUrl === SignatureDescriptor_Data_Multi.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || SignatureDescriptor_Data.is(o.signatures[0]))); + }, + isAmino(o: any): o is SignatureDescriptor_Data_MultiAmino { + return o && (o.$typeUrl === SignatureDescriptor_Data_Multi.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || SignatureDescriptor_Data.isAmino(o.signatures[0]))); + }, + encode(message: SignatureDescriptor_Data_Multi, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.bitarray !== undefined) { + CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.signatures) { + SignatureDescriptor_Data.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor_Data_Multi { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignatureDescriptor_Data_Multi(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + message.signatures.push(SignatureDescriptor_Data.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignatureDescriptor_Data_Multi { + const message = createBaseSignatureDescriptor_Data_Multi(); + message.bitarray = object.bitarray !== undefined && object.bitarray !== null ? CompactBitArray.fromPartial(object.bitarray) : undefined; + message.signatures = object.signatures?.map(e => SignatureDescriptor_Data.fromPartial(e)) || []; + return message; + }, + fromAmino(object: SignatureDescriptor_Data_MultiAmino): SignatureDescriptor_Data_Multi { + const message = createBaseSignatureDescriptor_Data_Multi(); + if (object.bitarray !== undefined && object.bitarray !== null) { + message.bitarray = CompactBitArray.fromAmino(object.bitarray); + } + message.signatures = object.signatures?.map(e => SignatureDescriptor_Data.fromAmino(e)) || []; + return message; + }, + toAmino(message: SignatureDescriptor_Data_Multi): SignatureDescriptor_Data_MultiAmino { + const obj: any = {}; + obj.bitarray = message.bitarray ? CompactBitArray.toAmino(message.bitarray) : undefined; + if (message.signatures) { + obj.signatures = message.signatures.map(e => e ? SignatureDescriptor_Data.toAmino(e) : undefined); + } else { + obj.signatures = message.signatures; + } + return obj; + }, + fromAminoMsg(object: SignatureDescriptor_Data_MultiAminoMsg): SignatureDescriptor_Data_Multi { + return SignatureDescriptor_Data_Multi.fromAmino(object.value); + }, + toAminoMsg(message: SignatureDescriptor_Data_Multi): SignatureDescriptor_Data_MultiAminoMsg { + return { + type: 'cosmos-sdk/Multi', + value: SignatureDescriptor_Data_Multi.toAmino(message) + }; + }, + fromProtoMsg(message: SignatureDescriptor_Data_MultiProtoMsg): SignatureDescriptor_Data_Multi { + return SignatureDescriptor_Data_Multi.decode(message.value); + }, + toProto(message: SignatureDescriptor_Data_Multi): Uint8Array { + return SignatureDescriptor_Data_Multi.encode(message).finish(); + }, + toProtoMsg(message: SignatureDescriptor_Data_Multi): SignatureDescriptor_Data_MultiProtoMsg { + return { + typeUrl: '/cosmos.tx.signing.v1beta1.Multi', + value: SignatureDescriptor_Data_Multi.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignatureDescriptor_Data_Multi.typeUrl, SignatureDescriptor_Data_Multi); +GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Multi.aminoType, SignatureDescriptor_Data_Multi.typeUrl); \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/tx/v1beta1/service.rpc.Service.ts b/libs/cosmos-types/cosmos/tx/v1beta1/service.rpc.Service.ts new file mode 100644 index 00000000..673f0eac --- /dev/null +++ b/libs/cosmos-types/cosmos/tx/v1beta1/service.rpc.Service.ts @@ -0,0 +1,117 @@ +import { BinaryReader } from '../../../binary'; +import { TxRpc } from '../../../types'; +import { BroadcastTxRequest, BroadcastTxResponse, GetBlockWithTxsRequest, GetBlockWithTxsResponse, GetTxRequest, GetTxResponse, GetTxsEventRequest, GetTxsEventResponse, SimulateRequest, SimulateResponse, TxDecodeAminoRequest, TxDecodeAminoResponse,TxDecodeRequest, TxDecodeResponse, TxEncodeAminoRequest, TxEncodeAminoResponse, TxEncodeRequest, TxEncodeResponse } from './service'; +/** Service defines a gRPC service for interacting with transactions. */ +export interface Service { + /** Simulate simulates executing a transaction for estimating gas usage. */ + simulate(request: SimulateRequest): Promise; + /** GetTx fetches a tx by hash. */ + getTx(request: GetTxRequest): Promise; + /** BroadcastTx broadcast transaction. */ + broadcastTx(request: BroadcastTxRequest): Promise; + /** GetTxsEvent fetches txs by event. */ + getTxsEvent(request: GetTxsEventRequest): Promise; + /** + * GetBlockWithTxs fetches a block with decoded txs. + * + * Since: cosmos-sdk 0.45.2 + */ + getBlockWithTxs(request: GetBlockWithTxsRequest): Promise; + /** + * TxDecode decodes the transaction. + * + * Since: cosmos-sdk 0.47 + */ + txDecode(request: TxDecodeRequest): Promise; + /** + * TxEncode encodes the transaction. + * + * Since: cosmos-sdk 0.47 + */ + txEncode(request: TxEncodeRequest): Promise; + /** + * TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + * + * Since: cosmos-sdk 0.47 + */ + txEncodeAmino(request: TxEncodeAminoRequest): Promise; + /** + * TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + * + * Since: cosmos-sdk 0.47 + */ + txDecodeAmino(request: TxDecodeAminoRequest): Promise; +} +export class ServiceClientImpl implements Service { + private readonly rpc: TxRpc; + constructor(rpc: TxRpc) { + this.rpc = rpc; + } + /* Simulate simulates executing a transaction for estimating gas usage. */ + simulate = async (request: SimulateRequest): Promise => { + const data = SimulateRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'Simulate', data); + return promise.then(data => SimulateResponse.decode(new BinaryReader(data))); + }; + /* GetTx fetches a tx by hash. */ + getTx = async (request: GetTxRequest): Promise => { + const data = GetTxRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'GetTx', data); + return promise.then(data => GetTxResponse.decode(new BinaryReader(data))); + }; + /* BroadcastTx broadcast transaction. */ + broadcastTx = async (request: BroadcastTxRequest): Promise => { + const data = BroadcastTxRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'BroadcastTx', data); + return promise.then(data => BroadcastTxResponse.decode(new BinaryReader(data))); + }; + /* GetTxsEvent fetches txs by event. */ + getTxsEvent = async (request: GetTxsEventRequest): Promise => { + const data = GetTxsEventRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'GetTxsEvent', data); + return promise.then(data => GetTxsEventResponse.decode(new BinaryReader(data))); + }; + /* GetBlockWithTxs fetches a block with decoded txs. + + Since: cosmos-sdk 0.45.2 */ + getBlockWithTxs = async (request: GetBlockWithTxsRequest): Promise => { + const data = GetBlockWithTxsRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'GetBlockWithTxs', data); + return promise.then(data => GetBlockWithTxsResponse.decode(new BinaryReader(data))); + }; + /* TxDecode decodes the transaction. + + Since: cosmos-sdk 0.47 */ + txDecode = async (request: TxDecodeRequest): Promise => { + const data = TxDecodeRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'TxDecode', data); + return promise.then(data => TxDecodeResponse.decode(new BinaryReader(data))); + }; + /* TxEncode encodes the transaction. + + Since: cosmos-sdk 0.47 */ + txEncode = async (request: TxEncodeRequest): Promise => { + const data = TxEncodeRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'TxEncode', data); + return promise.then(data => TxEncodeResponse.decode(new BinaryReader(data))); + }; + /* TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + + Since: cosmos-sdk 0.47 */ + txEncodeAmino = async (request: TxEncodeAminoRequest): Promise => { + const data = TxEncodeAminoRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'TxEncodeAmino', data); + return promise.then(data => TxEncodeAminoResponse.decode(new BinaryReader(data))); + }; + /* TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + + Since: cosmos-sdk 0.47 */ + txDecodeAmino = async (request: TxDecodeAminoRequest): Promise => { + const data = TxDecodeAminoRequest.encode(request).finish(); + const promise = this.rpc.request('cosmos.tx.v1beta1.Service', 'TxDecodeAmino', data); + return promise.then(data => TxDecodeAminoResponse.decode(new BinaryReader(data))); + }; +} +export const createClientImpl = (rpc: TxRpc) => { + return new ServiceClientImpl(rpc); +}; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/tx/v1beta1/service.ts b/libs/cosmos-types/cosmos/tx/v1beta1/service.ts new file mode 100644 index 00000000..45a4a118 --- /dev/null +++ b/libs/cosmos-types/cosmos/tx/v1beta1/service.ts @@ -0,0 +1,2294 @@ +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial, isSet } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Block, BlockAmino } from '../../../tendermint/types/block'; +import { BlockID, BlockIDAmino } from '../../../tendermint/types/types'; +import { GasInfo, GasInfoAmino, Result, ResultAmino,TxResponse, TxResponseAmino } from '../../base/abci/v1beta1/abci'; +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from '../../base/query/v1beta1/pagination'; +import { Tx, TxAmino } from './tx'; +/** OrderBy defines the sorting order */ +export enum OrderBy { + /** + * ORDER_BY_UNSPECIFIED - ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults + * to ASC in this case. + */ + ORDER_BY_UNSPECIFIED = 0, + /** ORDER_BY_ASC - ORDER_BY_ASC defines ascending order */ + ORDER_BY_ASC = 1, + /** ORDER_BY_DESC - ORDER_BY_DESC defines descending order */ + ORDER_BY_DESC = 2, + UNRECOGNIZED = -1, +} +export const OrderByAmino = OrderBy; +export function orderByFromJSON(object: any): OrderBy { + switch (object) { + case 0: + case 'ORDER_BY_UNSPECIFIED': + return OrderBy.ORDER_BY_UNSPECIFIED; + case 1: + case 'ORDER_BY_ASC': + return OrderBy.ORDER_BY_ASC; + case 2: + case 'ORDER_BY_DESC': + return OrderBy.ORDER_BY_DESC; + case -1: + case 'UNRECOGNIZED': + default: + return OrderBy.UNRECOGNIZED; + } +} +export function orderByToJSON(object: OrderBy): string { + switch (object) { + case OrderBy.ORDER_BY_UNSPECIFIED: + return 'ORDER_BY_UNSPECIFIED'; + case OrderBy.ORDER_BY_ASC: + return 'ORDER_BY_ASC'; + case OrderBy.ORDER_BY_DESC: + return 'ORDER_BY_DESC'; + case OrderBy.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} +/** + * BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + * method. + */ +export enum BroadcastMode { + /** BROADCAST_MODE_UNSPECIFIED - zero-value for mode ordering */ + BROADCAST_MODE_UNSPECIFIED = 0, + /** + * BROADCAST_MODE_BLOCK - DEPRECATED: use BROADCAST_MODE_SYNC instead, + * BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + */ + BROADCAST_MODE_BLOCK = 1, + /** + * BROADCAST_MODE_SYNC - 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 - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + * returns immediately. + */ + BROADCAST_MODE_ASYNC = 3, + UNRECOGNIZED = -1, +} +export const BroadcastModeAmino = BroadcastMode; +export function broadcastModeFromJSON(object: any): BroadcastMode { + switch (object) { + case 0: + case 'BROADCAST_MODE_UNSPECIFIED': + return BroadcastMode.BROADCAST_MODE_UNSPECIFIED; + case 1: + case 'BROADCAST_MODE_BLOCK': + return BroadcastMode.BROADCAST_MODE_BLOCK; + case 2: + case 'BROADCAST_MODE_SYNC': + return BroadcastMode.BROADCAST_MODE_SYNC; + case 3: + case 'BROADCAST_MODE_ASYNC': + return BroadcastMode.BROADCAST_MODE_ASYNC; + case -1: + case 'UNRECOGNIZED': + default: + return BroadcastMode.UNRECOGNIZED; + } +} +export function broadcastModeToJSON(object: BroadcastMode): string { + switch (object) { + case BroadcastMode.BROADCAST_MODE_UNSPECIFIED: + return 'BROADCAST_MODE_UNSPECIFIED'; + case BroadcastMode.BROADCAST_MODE_BLOCK: + return 'BROADCAST_MODE_BLOCK'; + case BroadcastMode.BROADCAST_MODE_SYNC: + return 'BROADCAST_MODE_SYNC'; + case BroadcastMode.BROADCAST_MODE_ASYNC: + return 'BROADCAST_MODE_ASYNC'; + case BroadcastMode.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} +/** + * GetTxsEventRequest is the request type for the Service.TxsByEvents + * RPC method. + */ +export interface GetTxsEventRequest { + /** + * events is the list of transaction event type. + * Deprecated post v0.47.x: use query instead, which should contain a valid + * events query. + */ + /** @deprecated */ + events: string[]; + /** + * pagination defines a pagination for the request. + * Deprecated post v0.46.x: use page and limit instead. + */ + /** @deprecated */ + pagination?: PageRequest; + orderBy: OrderBy; + /** + * page is the page number to query, starts at 1. If not provided, will + * default to first page. + */ + page: bigint; + /** + * 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. + */ + limit: bigint; + /** + * query defines the transaction event query that is proxied to Tendermint's + * TxSearch RPC method. The query must be valid. + * + * Since cosmos-sdk 0.50 + */ + query: string; +} +export interface GetTxsEventRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.GetTxsEventRequest'; + value: Uint8Array; +} +/** + * GetTxsEventRequest is the request type for the Service.TxsByEvents + * RPC method. + */ +export interface GetTxsEventRequestAmino { + /** + * events is the list of transaction event type. + * Deprecated post v0.47.x: use query instead, which should contain a valid + * events query. + */ + /** @deprecated */ + events: string[]; + /** + * pagination defines a pagination for the request. + * Deprecated post v0.46.x: use page and limit instead. + */ + /** @deprecated */ + pagination?: PageRequestAmino; + order_by: OrderBy; + /** + * page is the page number to query, starts at 1. If not provided, will + * default to first page. + */ + page: string; + /** + * 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. + */ + limit: string; + /** + * query defines the transaction event query that is proxied to Tendermint's + * TxSearch RPC method. The query must be valid. + * + * Since cosmos-sdk 0.50 + */ + query: string; +} +export interface GetTxsEventRequestAminoMsg { + type: 'cosmos-sdk/GetTxsEventRequest'; + value: GetTxsEventRequestAmino; +} +/** + * GetTxsEventResponse is the response type for the Service.TxsByEvents + * RPC method. + */ +export interface GetTxsEventResponse { + /** txs is the list of queried transactions. */ + txs: Tx[]; + /** tx_responses is the list of queried TxResponses. */ + txResponses: TxResponse[]; + /** + * pagination defines a pagination for the response. + * Deprecated post v0.46.x: use total instead. + */ + /** @deprecated */ + pagination?: PageResponse; + /** total is total number of results available */ + total: bigint; +} +export interface GetTxsEventResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.GetTxsEventResponse'; + value: Uint8Array; +} +/** + * GetTxsEventResponse is the response type for the Service.TxsByEvents + * RPC method. + */ +export interface GetTxsEventResponseAmino { + /** txs is the list of queried transactions. */ + txs: TxAmino[]; + /** tx_responses is the list of queried TxResponses. */ + tx_responses: TxResponseAmino[]; + /** + * pagination defines a pagination for the response. + * Deprecated post v0.46.x: use total instead. + */ + /** @deprecated */ + pagination?: PageResponseAmino; + /** total is total number of results available */ + total: string; +} +export interface GetTxsEventResponseAminoMsg { + type: 'cosmos-sdk/GetTxsEventResponse'; + value: GetTxsEventResponseAmino; +} +/** + * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + * RPC method. + */ +export interface BroadcastTxRequest { + /** tx_bytes is the raw transaction. */ + txBytes: Uint8Array; + mode: BroadcastMode; +} +export interface BroadcastTxRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.BroadcastTxRequest'; + value: Uint8Array; +} +/** + * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + * RPC method. + */ +export interface BroadcastTxRequestAmino { + /** tx_bytes is the raw transaction. */ + tx_bytes: string; + mode: BroadcastMode; +} +export interface BroadcastTxRequestAminoMsg { + type: 'cosmos-sdk/BroadcastTxRequest'; + value: BroadcastTxRequestAmino; +} +/** + * BroadcastTxResponse is the response type for the + * Service.BroadcastTx method. + */ +export interface BroadcastTxResponse { + /** tx_response is the queried TxResponses. */ + txResponse?: TxResponse; +} +export interface BroadcastTxResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.BroadcastTxResponse'; + value: Uint8Array; +} +/** + * BroadcastTxResponse is the response type for the + * Service.BroadcastTx method. + */ +export interface BroadcastTxResponseAmino { + /** tx_response is the queried TxResponses. */ + tx_response?: TxResponseAmino; +} +export interface BroadcastTxResponseAminoMsg { + type: 'cosmos-sdk/BroadcastTxResponse'; + value: BroadcastTxResponseAmino; +} +/** + * SimulateRequest is the request type for the Service.Simulate + * RPC method. + */ +export interface SimulateRequest { + /** + * tx is the transaction to simulate. + * Deprecated. Send raw tx bytes instead. + */ + /** @deprecated */ + tx?: Tx; + /** + * tx_bytes is the raw transaction. + * + * Since: cosmos-sdk 0.43 + */ + txBytes: Uint8Array; +} +export interface SimulateRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.SimulateRequest'; + value: Uint8Array; +} +/** + * SimulateRequest is the request type for the Service.Simulate + * RPC method. + */ +export interface SimulateRequestAmino { + /** + * tx is the transaction to simulate. + * Deprecated. Send raw tx bytes instead. + */ + /** @deprecated */ + tx?: TxAmino; + /** + * tx_bytes is the raw transaction. + * + * Since: cosmos-sdk 0.43 + */ + tx_bytes: string; +} +export interface SimulateRequestAminoMsg { + type: 'cosmos-sdk/SimulateRequest'; + value: SimulateRequestAmino; +} +/** + * SimulateResponse is the response type for the + * Service.SimulateRPC method. + */ +export interface SimulateResponse { + /** gas_info is the information about gas used in the simulation. */ + gasInfo?: GasInfo; + /** result is the result of the simulation. */ + result?: Result; +} +export interface SimulateResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.SimulateResponse'; + value: Uint8Array; +} +/** + * SimulateResponse is the response type for the + * Service.SimulateRPC method. + */ +export interface SimulateResponseAmino { + /** gas_info is the information about gas used in the simulation. */ + gas_info?: GasInfoAmino; + /** result is the result of the simulation. */ + result?: ResultAmino; +} +export interface SimulateResponseAminoMsg { + type: 'cosmos-sdk/SimulateResponse'; + value: SimulateResponseAmino; +} +/** + * GetTxRequest is the request type for the Service.GetTx + * RPC method. + */ +export interface GetTxRequest { + /** hash is the tx hash to query, encoded as a hex string. */ + hash: string; +} +export interface GetTxRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.GetTxRequest'; + value: Uint8Array; +} +/** + * GetTxRequest is the request type for the Service.GetTx + * RPC method. + */ +export interface GetTxRequestAmino { + /** hash is the tx hash to query, encoded as a hex string. */ + hash: string; +} +export interface GetTxRequestAminoMsg { + type: 'cosmos-sdk/GetTxRequest'; + value: GetTxRequestAmino; +} +/** GetTxResponse is the response type for the Service.GetTx method. */ +export interface GetTxResponse { + /** tx is the queried transaction. */ + tx?: Tx; + /** tx_response is the queried TxResponses. */ + txResponse?: TxResponse; +} +export interface GetTxResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.GetTxResponse'; + value: Uint8Array; +} +/** GetTxResponse is the response type for the Service.GetTx method. */ +export interface GetTxResponseAmino { + /** tx is the queried transaction. */ + tx?: TxAmino; + /** tx_response is the queried TxResponses. */ + tx_response?: TxResponseAmino; +} +export interface GetTxResponseAminoMsg { + type: 'cosmos-sdk/GetTxResponse'; + value: GetTxResponseAmino; +} +/** + * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs + * RPC method. + * + * Since: cosmos-sdk 0.45.2 + */ +export interface GetBlockWithTxsRequest { + /** height is the height of the block to query. */ + height: bigint; + /** pagination defines a pagination for the request. */ + pagination?: PageRequest; +} +export interface GetBlockWithTxsRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.GetBlockWithTxsRequest'; + value: Uint8Array; +} +/** + * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs + * RPC method. + * + * Since: cosmos-sdk 0.45.2 + */ +export interface GetBlockWithTxsRequestAmino { + /** height is the height of the block to query. */ + height: string; + /** pagination defines a pagination for the request. */ + pagination?: PageRequestAmino; +} +export interface GetBlockWithTxsRequestAminoMsg { + type: 'cosmos-sdk/GetBlockWithTxsRequest'; + value: GetBlockWithTxsRequestAmino; +} +/** + * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs + * method. + * + * Since: cosmos-sdk 0.45.2 + */ +export interface GetBlockWithTxsResponse { + /** txs are the transactions in the block. */ + txs: Tx[]; + blockId?: BlockID; + block?: Block; + /** pagination defines a pagination for the response. */ + pagination?: PageResponse; +} +export interface GetBlockWithTxsResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.GetBlockWithTxsResponse'; + value: Uint8Array; +} +/** + * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs + * method. + * + * Since: cosmos-sdk 0.45.2 + */ +export interface GetBlockWithTxsResponseAmino { + /** txs are the transactions in the block. */ + txs: TxAmino[]; + block_id?: BlockIDAmino; + block?: BlockAmino; + /** pagination defines a pagination for the response. */ + pagination?: PageResponseAmino; +} +export interface GetBlockWithTxsResponseAminoMsg { + type: 'cosmos-sdk/GetBlockWithTxsResponse'; + value: GetBlockWithTxsResponseAmino; +} +/** + * TxDecodeRequest is the request type for the Service.TxDecode + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeRequest { + /** tx_bytes is the raw transaction. */ + txBytes: Uint8Array; +} +export interface TxDecodeRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeRequest'; + value: Uint8Array; +} +/** + * TxDecodeRequest is the request type for the Service.TxDecode + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeRequestAmino { + /** tx_bytes is the raw transaction. */ + tx_bytes: string; +} +export interface TxDecodeRequestAminoMsg { + type: 'cosmos-sdk/TxDecodeRequest'; + value: TxDecodeRequestAmino; +} +/** + * TxDecodeResponse is the response type for the + * Service.TxDecode method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeResponse { + /** tx is the decoded transaction. */ + tx?: Tx; +} +export interface TxDecodeResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeResponse'; + value: Uint8Array; +} +/** + * TxDecodeResponse is the response type for the + * Service.TxDecode method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeResponseAmino { + /** tx is the decoded transaction. */ + tx?: TxAmino; +} +export interface TxDecodeResponseAminoMsg { + type: 'cosmos-sdk/TxDecodeResponse'; + value: TxDecodeResponseAmino; +} +/** + * TxEncodeRequest is the request type for the Service.TxEncode + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeRequest { + /** tx is the transaction to encode. */ + tx?: Tx; +} +export interface TxEncodeRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeRequest'; + value: Uint8Array; +} +/** + * TxEncodeRequest is the request type for the Service.TxEncode + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeRequestAmino { + /** tx is the transaction to encode. */ + tx?: TxAmino; +} +export interface TxEncodeRequestAminoMsg { + type: 'cosmos-sdk/TxEncodeRequest'; + value: TxEncodeRequestAmino; +} +/** + * TxEncodeResponse is the response type for the + * Service.TxEncode method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeResponse { + /** tx_bytes is the encoded transaction bytes. */ + txBytes: Uint8Array; +} +export interface TxEncodeResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeResponse'; + value: Uint8Array; +} +/** + * TxEncodeResponse is the response type for the + * Service.TxEncode method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeResponseAmino { + /** tx_bytes is the encoded transaction bytes. */ + tx_bytes: string; +} +export interface TxEncodeResponseAminoMsg { + type: 'cosmos-sdk/TxEncodeResponse'; + value: TxEncodeResponseAmino; +} +/** + * TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeAminoRequest { + aminoJson: string; +} +export interface TxEncodeAminoRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeAminoRequest'; + value: Uint8Array; +} +/** + * TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeAminoRequestAmino { + amino_json: string; +} +export interface TxEncodeAminoRequestAminoMsg { + type: 'cosmos-sdk/TxEncodeAminoRequest'; + value: TxEncodeAminoRequestAmino; +} +/** + * TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeAminoResponse { + aminoBinary: Uint8Array; +} +export interface TxEncodeAminoResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeAminoResponse'; + value: Uint8Array; +} +/** + * TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxEncodeAminoResponseAmino { + amino_binary: string; +} +export interface TxEncodeAminoResponseAminoMsg { + type: 'cosmos-sdk/TxEncodeAminoResponse'; + value: TxEncodeAminoResponseAmino; +} +/** + * TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeAminoRequest { + aminoBinary: Uint8Array; +} +export interface TxDecodeAminoRequestProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeAminoRequest'; + value: Uint8Array; +} +/** + * TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeAminoRequestAmino { + amino_binary: string; +} +export interface TxDecodeAminoRequestAminoMsg { + type: 'cosmos-sdk/TxDecodeAminoRequest'; + value: TxDecodeAminoRequestAmino; +} +/** + * TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeAminoResponse { + aminoJson: string; +} +export interface TxDecodeAminoResponseProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeAminoResponse'; + value: Uint8Array; +} +/** + * TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + * RPC method. + * + * Since: cosmos-sdk 0.47 + */ +export interface TxDecodeAminoResponseAmino { + amino_json: string; +} +export interface TxDecodeAminoResponseAminoMsg { + type: 'cosmos-sdk/TxDecodeAminoResponse'; + value: TxDecodeAminoResponseAmino; +} +function createBaseGetTxsEventRequest(): GetTxsEventRequest { + return { + events: [], + pagination: undefined, + orderBy: 0, + page: BigInt(0), + limit: BigInt(0), + query: '' + }; +} +export const GetTxsEventRequest = { + typeUrl: '/cosmos.tx.v1beta1.GetTxsEventRequest', + aminoType: 'cosmos-sdk/GetTxsEventRequest', + is(o: any): o is GetTxsEventRequest { + return o && (o.$typeUrl === GetTxsEventRequest.typeUrl || Array.isArray(o.events) && (!o.events.length || typeof o.events[0] === 'string') && isSet(o.orderBy) && typeof o.page === 'bigint' && typeof o.limit === 'bigint' && typeof o.query === 'string'); + }, + isAmino(o: any): o is GetTxsEventRequestAmino { + return o && (o.$typeUrl === GetTxsEventRequest.typeUrl || Array.isArray(o.events) && (!o.events.length || typeof o.events[0] === 'string') && isSet(o.order_by) && typeof o.page === 'bigint' && typeof o.limit === 'bigint' && typeof o.query === 'string'); + }, + encode(message: GetTxsEventRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.events) { + writer.uint32(10).string(v!); + } + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + if (message.orderBy !== 0) { + writer.uint32(24).int32(message.orderBy); + } + if (message.page !== BigInt(0)) { + writer.uint32(32).uint64(message.page); + } + if (message.limit !== BigInt(0)) { + writer.uint32(40).uint64(message.limit); + } + if (message.query !== '') { + writer.uint32(50).string(message.query); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetTxsEventRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.events.push(reader.string()); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + case 3: + message.orderBy = (reader.int32() as any); + break; + case 4: + message.page = reader.uint64(); + break; + case 5: + message.limit = reader.uint64(); + break; + case 6: + message.query = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): GetTxsEventRequest { + const message = createBaseGetTxsEventRequest(); + message.events = object.events?.map(e => e) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + message.orderBy = object.orderBy ?? 0; + message.page = object.page !== undefined && object.page !== null ? BigInt(object.page.toString()) : BigInt(0); + message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); + message.query = object.query ?? ''; + return message; + }, + fromAmino(object: GetTxsEventRequestAmino): GetTxsEventRequest { + const message = createBaseGetTxsEventRequest(); + message.events = object.events?.map(e => e) || []; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromAmino(object.pagination); + } + if (object.order_by !== undefined && object.order_by !== null) { + message.orderBy = object.order_by; + } + if (object.page !== undefined && object.page !== null) { + message.page = BigInt(object.page); + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = BigInt(object.limit); + } + if (object.query !== undefined && object.query !== null) { + message.query = object.query; + } + return message; + }, + toAmino(message: GetTxsEventRequest): GetTxsEventRequestAmino { + const obj: any = {}; + if (message.events) { + obj.events = message.events.map(e => e); + } else { + obj.events = message.events; + } + obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; + obj.order_by = message.orderBy === 0 ? undefined : message.orderBy; + obj.page = message.page !== BigInt(0) ? message.page.toString() : undefined; + obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; + obj.query = message.query === '' ? undefined : message.query; + return obj; + }, + fromAminoMsg(object: GetTxsEventRequestAminoMsg): GetTxsEventRequest { + return GetTxsEventRequest.fromAmino(object.value); + }, + toAminoMsg(message: GetTxsEventRequest): GetTxsEventRequestAminoMsg { + return { + type: 'cosmos-sdk/GetTxsEventRequest', + value: GetTxsEventRequest.toAmino(message) + }; + }, + fromProtoMsg(message: GetTxsEventRequestProtoMsg): GetTxsEventRequest { + return GetTxsEventRequest.decode(message.value); + }, + toProto(message: GetTxsEventRequest): Uint8Array { + return GetTxsEventRequest.encode(message).finish(); + }, + toProtoMsg(message: GetTxsEventRequest): GetTxsEventRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.GetTxsEventRequest', + value: GetTxsEventRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(GetTxsEventRequest.typeUrl, GetTxsEventRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventRequest.aminoType, GetTxsEventRequest.typeUrl); +function createBaseGetTxsEventResponse(): GetTxsEventResponse { + return { + txs: [], + txResponses: [], + pagination: undefined, + total: BigInt(0) + }; +} +export const GetTxsEventResponse = { + typeUrl: '/cosmos.tx.v1beta1.GetTxsEventResponse', + aminoType: 'cosmos-sdk/GetTxsEventResponse', + is(o: any): o is GetTxsEventResponse { + return o && (o.$typeUrl === GetTxsEventResponse.typeUrl || Array.isArray(o.txs) && (!o.txs.length || Tx.is(o.txs[0])) && Array.isArray(o.txResponses) && (!o.txResponses.length || TxResponse.is(o.txResponses[0])) && typeof o.total === 'bigint'); + }, + isAmino(o: any): o is GetTxsEventResponseAmino { + return o && (o.$typeUrl === GetTxsEventResponse.typeUrl || Array.isArray(o.txs) && (!o.txs.length || Tx.isAmino(o.txs[0])) && Array.isArray(o.tx_responses) && (!o.tx_responses.length || TxResponse.isAmino(o.tx_responses[0])) && typeof o.total === 'bigint'); + }, + encode(message: GetTxsEventResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.txs) { + Tx.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.txResponses) { + TxResponse.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); + } + if (message.total !== BigInt(0)) { + writer.uint32(32).uint64(message.total); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetTxsEventResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txs.push(Tx.decode(reader, reader.uint32())); + break; + case 2: + message.txResponses.push(TxResponse.decode(reader, reader.uint32())); + break; + case 3: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + case 4: + message.total = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): GetTxsEventResponse { + const message = createBaseGetTxsEventResponse(); + message.txs = object.txs?.map(e => Tx.fromPartial(e)) || []; + message.txResponses = object.txResponses?.map(e => TxResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; + message.total = object.total !== undefined && object.total !== null ? BigInt(object.total.toString()) : BigInt(0); + return message; + }, + fromAmino(object: GetTxsEventResponseAmino): GetTxsEventResponse { + const message = createBaseGetTxsEventResponse(); + message.txs = object.txs?.map(e => Tx.fromAmino(e)) || []; + message.txResponses = object.tx_responses?.map(e => TxResponse.fromAmino(e)) || []; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromAmino(object.pagination); + } + if (object.total !== undefined && object.total !== null) { + message.total = BigInt(object.total); + } + return message; + }, + toAmino(message: GetTxsEventResponse): GetTxsEventResponseAmino { + const obj: any = {}; + if (message.txs) { + obj.txs = message.txs.map(e => e ? Tx.toAmino(e) : undefined); + } else { + obj.txs = message.txs; + } + if (message.txResponses) { + obj.tx_responses = message.txResponses.map(e => e ? TxResponse.toAmino(e) : undefined); + } else { + obj.tx_responses = message.txResponses; + } + obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; + obj.total = message.total !== BigInt(0) ? message.total.toString() : undefined; + return obj; + }, + fromAminoMsg(object: GetTxsEventResponseAminoMsg): GetTxsEventResponse { + return GetTxsEventResponse.fromAmino(object.value); + }, + toAminoMsg(message: GetTxsEventResponse): GetTxsEventResponseAminoMsg { + return { + type: 'cosmos-sdk/GetTxsEventResponse', + value: GetTxsEventResponse.toAmino(message) + }; + }, + fromProtoMsg(message: GetTxsEventResponseProtoMsg): GetTxsEventResponse { + return GetTxsEventResponse.decode(message.value); + }, + toProto(message: GetTxsEventResponse): Uint8Array { + return GetTxsEventResponse.encode(message).finish(); + }, + toProtoMsg(message: GetTxsEventResponse): GetTxsEventResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.GetTxsEventResponse', + value: GetTxsEventResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(GetTxsEventResponse.typeUrl, GetTxsEventResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventResponse.aminoType, GetTxsEventResponse.typeUrl); +function createBaseBroadcastTxRequest(): BroadcastTxRequest { + return { + txBytes: new Uint8Array(), + mode: 0 + }; +} +export const BroadcastTxRequest = { + typeUrl: '/cosmos.tx.v1beta1.BroadcastTxRequest', + aminoType: 'cosmos-sdk/BroadcastTxRequest', + is(o: any): o is BroadcastTxRequest { + return o && (o.$typeUrl === BroadcastTxRequest.typeUrl || (o.txBytes instanceof Uint8Array || typeof o.txBytes === 'string') && isSet(o.mode)); + }, + isAmino(o: any): o is BroadcastTxRequestAmino { + return o && (o.$typeUrl === BroadcastTxRequest.typeUrl || (o.tx_bytes instanceof Uint8Array || typeof o.tx_bytes === 'string') && isSet(o.mode)); + }, + encode(message: BroadcastTxRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.txBytes.length !== 0) { + writer.uint32(10).bytes(message.txBytes); + } + if (message.mode !== 0) { + writer.uint32(16).int32(message.mode); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBroadcastTxRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txBytes = reader.bytes(); + break; + case 2: + message.mode = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): BroadcastTxRequest { + const message = createBaseBroadcastTxRequest(); + message.txBytes = object.txBytes ?? new Uint8Array(); + message.mode = object.mode ?? 0; + return message; + }, + fromAmino(object: BroadcastTxRequestAmino): BroadcastTxRequest { + const message = createBaseBroadcastTxRequest(); + if (object.tx_bytes !== undefined && object.tx_bytes !== null) { + message.txBytes = bytesFromBase64(object.tx_bytes); + } + if (object.mode !== undefined && object.mode !== null) { + message.mode = object.mode; + } + return message; + }, + toAmino(message: BroadcastTxRequest): BroadcastTxRequestAmino { + const obj: any = {}; + obj.tx_bytes = message.txBytes ? base64FromBytes(message.txBytes) : undefined; + obj.mode = message.mode === 0 ? undefined : message.mode; + return obj; + }, + fromAminoMsg(object: BroadcastTxRequestAminoMsg): BroadcastTxRequest { + return BroadcastTxRequest.fromAmino(object.value); + }, + toAminoMsg(message: BroadcastTxRequest): BroadcastTxRequestAminoMsg { + return { + type: 'cosmos-sdk/BroadcastTxRequest', + value: BroadcastTxRequest.toAmino(message) + }; + }, + fromProtoMsg(message: BroadcastTxRequestProtoMsg): BroadcastTxRequest { + return BroadcastTxRequest.decode(message.value); + }, + toProto(message: BroadcastTxRequest): Uint8Array { + return BroadcastTxRequest.encode(message).finish(); + }, + toProtoMsg(message: BroadcastTxRequest): BroadcastTxRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.BroadcastTxRequest', + value: BroadcastTxRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(BroadcastTxRequest.typeUrl, BroadcastTxRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxRequest.aminoType, BroadcastTxRequest.typeUrl); +function createBaseBroadcastTxResponse(): BroadcastTxResponse { + return { + txResponse: undefined + }; +} +export const BroadcastTxResponse = { + typeUrl: '/cosmos.tx.v1beta1.BroadcastTxResponse', + aminoType: 'cosmos-sdk/BroadcastTxResponse', + is(o: any): o is BroadcastTxResponse { + return o && o.$typeUrl === BroadcastTxResponse.typeUrl; + }, + isAmino(o: any): o is BroadcastTxResponseAmino { + return o && o.$typeUrl === BroadcastTxResponse.typeUrl; + }, + encode(message: BroadcastTxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.txResponse !== undefined) { + TxResponse.encode(message.txResponse, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBroadcastTxResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txResponse = TxResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): BroadcastTxResponse { + const message = createBaseBroadcastTxResponse(); + message.txResponse = object.txResponse !== undefined && object.txResponse !== null ? TxResponse.fromPartial(object.txResponse) : undefined; + return message; + }, + fromAmino(object: BroadcastTxResponseAmino): BroadcastTxResponse { + const message = createBaseBroadcastTxResponse(); + if (object.tx_response !== undefined && object.tx_response !== null) { + message.txResponse = TxResponse.fromAmino(object.tx_response); + } + return message; + }, + toAmino(message: BroadcastTxResponse): BroadcastTxResponseAmino { + const obj: any = {}; + obj.tx_response = message.txResponse ? TxResponse.toAmino(message.txResponse) : undefined; + return obj; + }, + fromAminoMsg(object: BroadcastTxResponseAminoMsg): BroadcastTxResponse { + return BroadcastTxResponse.fromAmino(object.value); + }, + toAminoMsg(message: BroadcastTxResponse): BroadcastTxResponseAminoMsg { + return { + type: 'cosmos-sdk/BroadcastTxResponse', + value: BroadcastTxResponse.toAmino(message) + }; + }, + fromProtoMsg(message: BroadcastTxResponseProtoMsg): BroadcastTxResponse { + return BroadcastTxResponse.decode(message.value); + }, + toProto(message: BroadcastTxResponse): Uint8Array { + return BroadcastTxResponse.encode(message).finish(); + }, + toProtoMsg(message: BroadcastTxResponse): BroadcastTxResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.BroadcastTxResponse', + value: BroadcastTxResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(BroadcastTxResponse.typeUrl, BroadcastTxResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxResponse.aminoType, BroadcastTxResponse.typeUrl); +function createBaseSimulateRequest(): SimulateRequest { + return { + tx: undefined, + txBytes: new Uint8Array() + }; +} +export const SimulateRequest = { + typeUrl: '/cosmos.tx.v1beta1.SimulateRequest', + aminoType: 'cosmos-sdk/SimulateRequest', + is(o: any): o is SimulateRequest { + return o && (o.$typeUrl === SimulateRequest.typeUrl || o.txBytes instanceof Uint8Array || typeof o.txBytes === 'string'); + }, + isAmino(o: any): o is SimulateRequestAmino { + return o && (o.$typeUrl === SimulateRequest.typeUrl || o.tx_bytes instanceof Uint8Array || typeof o.tx_bytes === 'string'); + }, + encode(message: SimulateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.tx !== undefined) { + Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); + } + if (message.txBytes.length !== 0) { + writer.uint32(18).bytes(message.txBytes); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SimulateRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSimulateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = Tx.decode(reader, reader.uint32()); + break; + case 2: + message.txBytes = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SimulateRequest { + const message = createBaseSimulateRequest(); + message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; + message.txBytes = object.txBytes ?? new Uint8Array(); + return message; + }, + fromAmino(object: SimulateRequestAmino): SimulateRequest { + const message = createBaseSimulateRequest(); + if (object.tx !== undefined && object.tx !== null) { + message.tx = Tx.fromAmino(object.tx); + } + if (object.tx_bytes !== undefined && object.tx_bytes !== null) { + message.txBytes = bytesFromBase64(object.tx_bytes); + } + return message; + }, + toAmino(message: SimulateRequest): SimulateRequestAmino { + const obj: any = {}; + obj.tx = message.tx ? Tx.toAmino(message.tx) : undefined; + obj.tx_bytes = message.txBytes ? base64FromBytes(message.txBytes) : undefined; + return obj; + }, + fromAminoMsg(object: SimulateRequestAminoMsg): SimulateRequest { + return SimulateRequest.fromAmino(object.value); + }, + toAminoMsg(message: SimulateRequest): SimulateRequestAminoMsg { + return { + type: 'cosmos-sdk/SimulateRequest', + value: SimulateRequest.toAmino(message) + }; + }, + fromProtoMsg(message: SimulateRequestProtoMsg): SimulateRequest { + return SimulateRequest.decode(message.value); + }, + toProto(message: SimulateRequest): Uint8Array { + return SimulateRequest.encode(message).finish(); + }, + toProtoMsg(message: SimulateRequest): SimulateRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.SimulateRequest', + value: SimulateRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SimulateRequest.typeUrl, SimulateRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(SimulateRequest.aminoType, SimulateRequest.typeUrl); +function createBaseSimulateResponse(): SimulateResponse { + return { + gasInfo: undefined, + result: undefined + }; +} +export const SimulateResponse = { + typeUrl: '/cosmos.tx.v1beta1.SimulateResponse', + aminoType: 'cosmos-sdk/SimulateResponse', + is(o: any): o is SimulateResponse { + return o && o.$typeUrl === SimulateResponse.typeUrl; + }, + isAmino(o: any): o is SimulateResponseAmino { + return o && o.$typeUrl === SimulateResponse.typeUrl; + }, + encode(message: SimulateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.gasInfo !== undefined) { + GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); + } + if (message.result !== undefined) { + Result.encode(message.result, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SimulateResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSimulateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasInfo = GasInfo.decode(reader, reader.uint32()); + break; + case 2: + message.result = Result.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SimulateResponse { + const message = createBaseSimulateResponse(); + message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null ? GasInfo.fromPartial(object.gasInfo) : undefined; + message.result = object.result !== undefined && object.result !== null ? Result.fromPartial(object.result) : undefined; + return message; + }, + fromAmino(object: SimulateResponseAmino): SimulateResponse { + const message = createBaseSimulateResponse(); + if (object.gas_info !== undefined && object.gas_info !== null) { + message.gasInfo = GasInfo.fromAmino(object.gas_info); + } + if (object.result !== undefined && object.result !== null) { + message.result = Result.fromAmino(object.result); + } + return message; + }, + toAmino(message: SimulateResponse): SimulateResponseAmino { + const obj: any = {}; + obj.gas_info = message.gasInfo ? GasInfo.toAmino(message.gasInfo) : undefined; + obj.result = message.result ? Result.toAmino(message.result) : undefined; + return obj; + }, + fromAminoMsg(object: SimulateResponseAminoMsg): SimulateResponse { + return SimulateResponse.fromAmino(object.value); + }, + toAminoMsg(message: SimulateResponse): SimulateResponseAminoMsg { + return { + type: 'cosmos-sdk/SimulateResponse', + value: SimulateResponse.toAmino(message) + }; + }, + fromProtoMsg(message: SimulateResponseProtoMsg): SimulateResponse { + return SimulateResponse.decode(message.value); + }, + toProto(message: SimulateResponse): Uint8Array { + return SimulateResponse.encode(message).finish(); + }, + toProtoMsg(message: SimulateResponse): SimulateResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.SimulateResponse', + value: SimulateResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SimulateResponse.typeUrl, SimulateResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(SimulateResponse.aminoType, SimulateResponse.typeUrl); +function createBaseGetTxRequest(): GetTxRequest { + return { + hash: '' + }; +} +export const GetTxRequest = { + typeUrl: '/cosmos.tx.v1beta1.GetTxRequest', + aminoType: 'cosmos-sdk/GetTxRequest', + is(o: any): o is GetTxRequest { + return o && (o.$typeUrl === GetTxRequest.typeUrl || typeof o.hash === 'string'); + }, + isAmino(o: any): o is GetTxRequestAmino { + return o && (o.$typeUrl === GetTxRequest.typeUrl || typeof o.hash === 'string'); + }, + encode(message: GetTxRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.hash !== '') { + writer.uint32(10).string(message.hash); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): GetTxRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetTxRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): GetTxRequest { + const message = createBaseGetTxRequest(); + message.hash = object.hash ?? ''; + return message; + }, + fromAmino(object: GetTxRequestAmino): GetTxRequest { + const message = createBaseGetTxRequest(); + if (object.hash !== undefined && object.hash !== null) { + message.hash = object.hash; + } + return message; + }, + toAmino(message: GetTxRequest): GetTxRequestAmino { + const obj: any = {}; + obj.hash = message.hash === '' ? undefined : message.hash; + return obj; + }, + fromAminoMsg(object: GetTxRequestAminoMsg): GetTxRequest { + return GetTxRequest.fromAmino(object.value); + }, + toAminoMsg(message: GetTxRequest): GetTxRequestAminoMsg { + return { + type: 'cosmos-sdk/GetTxRequest', + value: GetTxRequest.toAmino(message) + }; + }, + fromProtoMsg(message: GetTxRequestProtoMsg): GetTxRequest { + return GetTxRequest.decode(message.value); + }, + toProto(message: GetTxRequest): Uint8Array { + return GetTxRequest.encode(message).finish(); + }, + toProtoMsg(message: GetTxRequest): GetTxRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.GetTxRequest', + value: GetTxRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(GetTxRequest.typeUrl, GetTxRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(GetTxRequest.aminoType, GetTxRequest.typeUrl); +function createBaseGetTxResponse(): GetTxResponse { + return { + tx: undefined, + txResponse: undefined + }; +} +export const GetTxResponse = { + typeUrl: '/cosmos.tx.v1beta1.GetTxResponse', + aminoType: 'cosmos-sdk/GetTxResponse', + is(o: any): o is GetTxResponse { + return o && o.$typeUrl === GetTxResponse.typeUrl; + }, + isAmino(o: any): o is GetTxResponseAmino { + return o && o.$typeUrl === GetTxResponse.typeUrl; + }, + encode(message: GetTxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.tx !== undefined) { + Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); + } + if (message.txResponse !== undefined) { + TxResponse.encode(message.txResponse, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): GetTxResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetTxResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = Tx.decode(reader, reader.uint32()); + break; + case 2: + message.txResponse = TxResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): GetTxResponse { + const message = createBaseGetTxResponse(); + message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; + message.txResponse = object.txResponse !== undefined && object.txResponse !== null ? TxResponse.fromPartial(object.txResponse) : undefined; + return message; + }, + fromAmino(object: GetTxResponseAmino): GetTxResponse { + const message = createBaseGetTxResponse(); + if (object.tx !== undefined && object.tx !== null) { + message.tx = Tx.fromAmino(object.tx); + } + if (object.tx_response !== undefined && object.tx_response !== null) { + message.txResponse = TxResponse.fromAmino(object.tx_response); + } + return message; + }, + toAmino(message: GetTxResponse): GetTxResponseAmino { + const obj: any = {}; + obj.tx = message.tx ? Tx.toAmino(message.tx) : undefined; + obj.tx_response = message.txResponse ? TxResponse.toAmino(message.txResponse) : undefined; + return obj; + }, + fromAminoMsg(object: GetTxResponseAminoMsg): GetTxResponse { + return GetTxResponse.fromAmino(object.value); + }, + toAminoMsg(message: GetTxResponse): GetTxResponseAminoMsg { + return { + type: 'cosmos-sdk/GetTxResponse', + value: GetTxResponse.toAmino(message) + }; + }, + fromProtoMsg(message: GetTxResponseProtoMsg): GetTxResponse { + return GetTxResponse.decode(message.value); + }, + toProto(message: GetTxResponse): Uint8Array { + return GetTxResponse.encode(message).finish(); + }, + toProtoMsg(message: GetTxResponse): GetTxResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.GetTxResponse', + value: GetTxResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(GetTxResponse.typeUrl, GetTxResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(GetTxResponse.aminoType, GetTxResponse.typeUrl); +function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { + return { + height: BigInt(0), + pagination: undefined + }; +} +export const GetBlockWithTxsRequest = { + typeUrl: '/cosmos.tx.v1beta1.GetBlockWithTxsRequest', + aminoType: 'cosmos-sdk/GetBlockWithTxsRequest', + is(o: any): o is GetBlockWithTxsRequest { + return o && (o.$typeUrl === GetBlockWithTxsRequest.typeUrl || typeof o.height === 'bigint'); + }, + isAmino(o: any): o is GetBlockWithTxsRequestAmino { + return o && (o.$typeUrl === GetBlockWithTxsRequest.typeUrl || typeof o.height === 'bigint'); + }, + encode(message: GetBlockWithTxsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.height !== BigInt(0)) { + writer.uint32(8).int64(message.height); + } + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetBlockWithTxsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): GetBlockWithTxsRequest { + const message = createBaseGetBlockWithTxsRequest(); + message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + }, + fromAmino(object: GetBlockWithTxsRequestAmino): GetBlockWithTxsRequest { + const message = createBaseGetBlockWithTxsRequest(); + if (object.height !== undefined && object.height !== null) { + message.height = BigInt(object.height); + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromAmino(object.pagination); + } + return message; + }, + toAmino(message: GetBlockWithTxsRequest): GetBlockWithTxsRequestAmino { + const obj: any = {}; + obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; + obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; + return obj; + }, + fromAminoMsg(object: GetBlockWithTxsRequestAminoMsg): GetBlockWithTxsRequest { + return GetBlockWithTxsRequest.fromAmino(object.value); + }, + toAminoMsg(message: GetBlockWithTxsRequest): GetBlockWithTxsRequestAminoMsg { + return { + type: 'cosmos-sdk/GetBlockWithTxsRequest', + value: GetBlockWithTxsRequest.toAmino(message) + }; + }, + fromProtoMsg(message: GetBlockWithTxsRequestProtoMsg): GetBlockWithTxsRequest { + return GetBlockWithTxsRequest.decode(message.value); + }, + toProto(message: GetBlockWithTxsRequest): Uint8Array { + return GetBlockWithTxsRequest.encode(message).finish(); + }, + toProtoMsg(message: GetBlockWithTxsRequest): GetBlockWithTxsRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.GetBlockWithTxsRequest', + value: GetBlockWithTxsRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(GetBlockWithTxsRequest.typeUrl, GetBlockWithTxsRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsRequest.aminoType, GetBlockWithTxsRequest.typeUrl); +function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { + return { + txs: [], + blockId: undefined, + block: undefined, + pagination: undefined + }; +} +export const GetBlockWithTxsResponse = { + typeUrl: '/cosmos.tx.v1beta1.GetBlockWithTxsResponse', + aminoType: 'cosmos-sdk/GetBlockWithTxsResponse', + is(o: any): o is GetBlockWithTxsResponse { + return o && (o.$typeUrl === GetBlockWithTxsResponse.typeUrl || Array.isArray(o.txs) && (!o.txs.length || Tx.is(o.txs[0]))); + }, + isAmino(o: any): o is GetBlockWithTxsResponseAmino { + return o && (o.$typeUrl === GetBlockWithTxsResponse.typeUrl || Array.isArray(o.txs) && (!o.txs.length || Tx.isAmino(o.txs[0]))); + }, + encode(message: GetBlockWithTxsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.txs) { + Tx.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.blockId !== undefined) { + BlockID.encode(message.blockId, writer.uint32(18).fork()).ldelim(); + } + if (message.block !== undefined) { + Block.encode(message.block, writer.uint32(26).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetBlockWithTxsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txs.push(Tx.decode(reader, reader.uint32())); + break; + case 2: + message.blockId = BlockID.decode(reader, reader.uint32()); + break; + case 3: + message.block = Block.decode(reader, reader.uint32()); + break; + case 4: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): GetBlockWithTxsResponse { + const message = createBaseGetBlockWithTxsResponse(); + message.txs = object.txs?.map(e => Tx.fromPartial(e)) || []; + message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; + message.block = object.block !== undefined && object.block !== null ? Block.fromPartial(object.block) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; + return message; + }, + fromAmino(object: GetBlockWithTxsResponseAmino): GetBlockWithTxsResponse { + const message = createBaseGetBlockWithTxsResponse(); + message.txs = object.txs?.map(e => Tx.fromAmino(e)) || []; + if (object.block_id !== undefined && object.block_id !== null) { + message.blockId = BlockID.fromAmino(object.block_id); + } + if (object.block !== undefined && object.block !== null) { + message.block = Block.fromAmino(object.block); + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromAmino(object.pagination); + } + return message; + }, + toAmino(message: GetBlockWithTxsResponse): GetBlockWithTxsResponseAmino { + const obj: any = {}; + if (message.txs) { + obj.txs = message.txs.map(e => e ? Tx.toAmino(e) : undefined); + } else { + obj.txs = message.txs; + } + obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; + obj.block = message.block ? Block.toAmino(message.block) : undefined; + obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; + return obj; + }, + fromAminoMsg(object: GetBlockWithTxsResponseAminoMsg): GetBlockWithTxsResponse { + return GetBlockWithTxsResponse.fromAmino(object.value); + }, + toAminoMsg(message: GetBlockWithTxsResponse): GetBlockWithTxsResponseAminoMsg { + return { + type: 'cosmos-sdk/GetBlockWithTxsResponse', + value: GetBlockWithTxsResponse.toAmino(message) + }; + }, + fromProtoMsg(message: GetBlockWithTxsResponseProtoMsg): GetBlockWithTxsResponse { + return GetBlockWithTxsResponse.decode(message.value); + }, + toProto(message: GetBlockWithTxsResponse): Uint8Array { + return GetBlockWithTxsResponse.encode(message).finish(); + }, + toProtoMsg(message: GetBlockWithTxsResponse): GetBlockWithTxsResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.GetBlockWithTxsResponse', + value: GetBlockWithTxsResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(GetBlockWithTxsResponse.typeUrl, GetBlockWithTxsResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsResponse.aminoType, GetBlockWithTxsResponse.typeUrl); +function createBaseTxDecodeRequest(): TxDecodeRequest { + return { + txBytes: new Uint8Array() + }; +} +export const TxDecodeRequest = { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeRequest', + aminoType: 'cosmos-sdk/TxDecodeRequest', + is(o: any): o is TxDecodeRequest { + return o && (o.$typeUrl === TxDecodeRequest.typeUrl || o.txBytes instanceof Uint8Array || typeof o.txBytes === 'string'); + }, + isAmino(o: any): o is TxDecodeRequestAmino { + return o && (o.$typeUrl === TxDecodeRequest.typeUrl || o.tx_bytes instanceof Uint8Array || typeof o.tx_bytes === 'string'); + }, + encode(message: TxDecodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.txBytes.length !== 0) { + writer.uint32(10).bytes(message.txBytes); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxDecodeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txBytes = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxDecodeRequest { + const message = createBaseTxDecodeRequest(); + message.txBytes = object.txBytes ?? new Uint8Array(); + return message; + }, + fromAmino(object: TxDecodeRequestAmino): TxDecodeRequest { + const message = createBaseTxDecodeRequest(); + if (object.tx_bytes !== undefined && object.tx_bytes !== null) { + message.txBytes = bytesFromBase64(object.tx_bytes); + } + return message; + }, + toAmino(message: TxDecodeRequest): TxDecodeRequestAmino { + const obj: any = {}; + obj.tx_bytes = message.txBytes ? base64FromBytes(message.txBytes) : undefined; + return obj; + }, + fromAminoMsg(object: TxDecodeRequestAminoMsg): TxDecodeRequest { + return TxDecodeRequest.fromAmino(object.value); + }, + toAminoMsg(message: TxDecodeRequest): TxDecodeRequestAminoMsg { + return { + type: 'cosmos-sdk/TxDecodeRequest', + value: TxDecodeRequest.toAmino(message) + }; + }, + fromProtoMsg(message: TxDecodeRequestProtoMsg): TxDecodeRequest { + return TxDecodeRequest.decode(message.value); + }, + toProto(message: TxDecodeRequest): Uint8Array { + return TxDecodeRequest.encode(message).finish(); + }, + toProtoMsg(message: TxDecodeRequest): TxDecodeRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeRequest', + value: TxDecodeRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxDecodeRequest.typeUrl, TxDecodeRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeRequest.aminoType, TxDecodeRequest.typeUrl); +function createBaseTxDecodeResponse(): TxDecodeResponse { + return { + tx: undefined + }; +} +export const TxDecodeResponse = { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeResponse', + aminoType: 'cosmos-sdk/TxDecodeResponse', + is(o: any): o is TxDecodeResponse { + return o && o.$typeUrl === TxDecodeResponse.typeUrl; + }, + isAmino(o: any): o is TxDecodeResponseAmino { + return o && o.$typeUrl === TxDecodeResponse.typeUrl; + }, + encode(message: TxDecodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.tx !== undefined) { + Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxDecodeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = Tx.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxDecodeResponse { + const message = createBaseTxDecodeResponse(); + message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; + return message; + }, + fromAmino(object: TxDecodeResponseAmino): TxDecodeResponse { + const message = createBaseTxDecodeResponse(); + if (object.tx !== undefined && object.tx !== null) { + message.tx = Tx.fromAmino(object.tx); + } + return message; + }, + toAmino(message: TxDecodeResponse): TxDecodeResponseAmino { + const obj: any = {}; + obj.tx = message.tx ? Tx.toAmino(message.tx) : undefined; + return obj; + }, + fromAminoMsg(object: TxDecodeResponseAminoMsg): TxDecodeResponse { + return TxDecodeResponse.fromAmino(object.value); + }, + toAminoMsg(message: TxDecodeResponse): TxDecodeResponseAminoMsg { + return { + type: 'cosmos-sdk/TxDecodeResponse', + value: TxDecodeResponse.toAmino(message) + }; + }, + fromProtoMsg(message: TxDecodeResponseProtoMsg): TxDecodeResponse { + return TxDecodeResponse.decode(message.value); + }, + toProto(message: TxDecodeResponse): Uint8Array { + return TxDecodeResponse.encode(message).finish(); + }, + toProtoMsg(message: TxDecodeResponse): TxDecodeResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeResponse', + value: TxDecodeResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxDecodeResponse.typeUrl, TxDecodeResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeResponse.aminoType, TxDecodeResponse.typeUrl); +function createBaseTxEncodeRequest(): TxEncodeRequest { + return { + tx: undefined + }; +} +export const TxEncodeRequest = { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeRequest', + aminoType: 'cosmos-sdk/TxEncodeRequest', + is(o: any): o is TxEncodeRequest { + return o && o.$typeUrl === TxEncodeRequest.typeUrl; + }, + isAmino(o: any): o is TxEncodeRequestAmino { + return o && o.$typeUrl === TxEncodeRequest.typeUrl; + }, + encode(message: TxEncodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.tx !== undefined) { + Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxEncodeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = Tx.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxEncodeRequest { + const message = createBaseTxEncodeRequest(); + message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; + return message; + }, + fromAmino(object: TxEncodeRequestAmino): TxEncodeRequest { + const message = createBaseTxEncodeRequest(); + if (object.tx !== undefined && object.tx !== null) { + message.tx = Tx.fromAmino(object.tx); + } + return message; + }, + toAmino(message: TxEncodeRequest): TxEncodeRequestAmino { + const obj: any = {}; + obj.tx = message.tx ? Tx.toAmino(message.tx) : undefined; + return obj; + }, + fromAminoMsg(object: TxEncodeRequestAminoMsg): TxEncodeRequest { + return TxEncodeRequest.fromAmino(object.value); + }, + toAminoMsg(message: TxEncodeRequest): TxEncodeRequestAminoMsg { + return { + type: 'cosmos-sdk/TxEncodeRequest', + value: TxEncodeRequest.toAmino(message) + }; + }, + fromProtoMsg(message: TxEncodeRequestProtoMsg): TxEncodeRequest { + return TxEncodeRequest.decode(message.value); + }, + toProto(message: TxEncodeRequest): Uint8Array { + return TxEncodeRequest.encode(message).finish(); + }, + toProtoMsg(message: TxEncodeRequest): TxEncodeRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeRequest', + value: TxEncodeRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxEncodeRequest.typeUrl, TxEncodeRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeRequest.aminoType, TxEncodeRequest.typeUrl); +function createBaseTxEncodeResponse(): TxEncodeResponse { + return { + txBytes: new Uint8Array() + }; +} +export const TxEncodeResponse = { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeResponse', + aminoType: 'cosmos-sdk/TxEncodeResponse', + is(o: any): o is TxEncodeResponse { + return o && (o.$typeUrl === TxEncodeResponse.typeUrl || o.txBytes instanceof Uint8Array || typeof o.txBytes === 'string'); + }, + isAmino(o: any): o is TxEncodeResponseAmino { + return o && (o.$typeUrl === TxEncodeResponse.typeUrl || o.tx_bytes instanceof Uint8Array || typeof o.tx_bytes === 'string'); + }, + encode(message: TxEncodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.txBytes.length !== 0) { + writer.uint32(10).bytes(message.txBytes); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxEncodeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txBytes = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxEncodeResponse { + const message = createBaseTxEncodeResponse(); + message.txBytes = object.txBytes ?? new Uint8Array(); + return message; + }, + fromAmino(object: TxEncodeResponseAmino): TxEncodeResponse { + const message = createBaseTxEncodeResponse(); + if (object.tx_bytes !== undefined && object.tx_bytes !== null) { + message.txBytes = bytesFromBase64(object.tx_bytes); + } + return message; + }, + toAmino(message: TxEncodeResponse): TxEncodeResponseAmino { + const obj: any = {}; + obj.tx_bytes = message.txBytes ? base64FromBytes(message.txBytes) : undefined; + return obj; + }, + fromAminoMsg(object: TxEncodeResponseAminoMsg): TxEncodeResponse { + return TxEncodeResponse.fromAmino(object.value); + }, + toAminoMsg(message: TxEncodeResponse): TxEncodeResponseAminoMsg { + return { + type: 'cosmos-sdk/TxEncodeResponse', + value: TxEncodeResponse.toAmino(message) + }; + }, + fromProtoMsg(message: TxEncodeResponseProtoMsg): TxEncodeResponse { + return TxEncodeResponse.decode(message.value); + }, + toProto(message: TxEncodeResponse): Uint8Array { + return TxEncodeResponse.encode(message).finish(); + }, + toProtoMsg(message: TxEncodeResponse): TxEncodeResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeResponse', + value: TxEncodeResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxEncodeResponse.typeUrl, TxEncodeResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeResponse.aminoType, TxEncodeResponse.typeUrl); +function createBaseTxEncodeAminoRequest(): TxEncodeAminoRequest { + return { + aminoJson: '' + }; +} +export const TxEncodeAminoRequest = { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeAminoRequest', + aminoType: 'cosmos-sdk/TxEncodeAminoRequest', + is(o: any): o is TxEncodeAminoRequest { + return o && (o.$typeUrl === TxEncodeAminoRequest.typeUrl || typeof o.aminoJson === 'string'); + }, + isAmino(o: any): o is TxEncodeAminoRequestAmino { + return o && (o.$typeUrl === TxEncodeAminoRequest.typeUrl || typeof o.amino_json === 'string'); + }, + encode(message: TxEncodeAminoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.aminoJson !== '') { + writer.uint32(10).string(message.aminoJson); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeAminoRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxEncodeAminoRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.aminoJson = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxEncodeAminoRequest { + const message = createBaseTxEncodeAminoRequest(); + message.aminoJson = object.aminoJson ?? ''; + return message; + }, + fromAmino(object: TxEncodeAminoRequestAmino): TxEncodeAminoRequest { + const message = createBaseTxEncodeAminoRequest(); + if (object.amino_json !== undefined && object.amino_json !== null) { + message.aminoJson = object.amino_json; + } + return message; + }, + toAmino(message: TxEncodeAminoRequest): TxEncodeAminoRequestAmino { + const obj: any = {}; + obj.amino_json = message.aminoJson === '' ? undefined : message.aminoJson; + return obj; + }, + fromAminoMsg(object: TxEncodeAminoRequestAminoMsg): TxEncodeAminoRequest { + return TxEncodeAminoRequest.fromAmino(object.value); + }, + toAminoMsg(message: TxEncodeAminoRequest): TxEncodeAminoRequestAminoMsg { + return { + type: 'cosmos-sdk/TxEncodeAminoRequest', + value: TxEncodeAminoRequest.toAmino(message) + }; + }, + fromProtoMsg(message: TxEncodeAminoRequestProtoMsg): TxEncodeAminoRequest { + return TxEncodeAminoRequest.decode(message.value); + }, + toProto(message: TxEncodeAminoRequest): Uint8Array { + return TxEncodeAminoRequest.encode(message).finish(); + }, + toProtoMsg(message: TxEncodeAminoRequest): TxEncodeAminoRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeAminoRequest', + value: TxEncodeAminoRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxEncodeAminoRequest.typeUrl, TxEncodeAminoRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoRequest.aminoType, TxEncodeAminoRequest.typeUrl); +function createBaseTxEncodeAminoResponse(): TxEncodeAminoResponse { + return { + aminoBinary: new Uint8Array() + }; +} +export const TxEncodeAminoResponse = { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeAminoResponse', + aminoType: 'cosmos-sdk/TxEncodeAminoResponse', + is(o: any): o is TxEncodeAminoResponse { + return o && (o.$typeUrl === TxEncodeAminoResponse.typeUrl || o.aminoBinary instanceof Uint8Array || typeof o.aminoBinary === 'string'); + }, + isAmino(o: any): o is TxEncodeAminoResponseAmino { + return o && (o.$typeUrl === TxEncodeAminoResponse.typeUrl || o.amino_binary instanceof Uint8Array || typeof o.amino_binary === 'string'); + }, + encode(message: TxEncodeAminoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.aminoBinary.length !== 0) { + writer.uint32(10).bytes(message.aminoBinary); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeAminoResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxEncodeAminoResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.aminoBinary = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxEncodeAminoResponse { + const message = createBaseTxEncodeAminoResponse(); + message.aminoBinary = object.aminoBinary ?? new Uint8Array(); + return message; + }, + fromAmino(object: TxEncodeAminoResponseAmino): TxEncodeAminoResponse { + const message = createBaseTxEncodeAminoResponse(); + if (object.amino_binary !== undefined && object.amino_binary !== null) { + message.aminoBinary = bytesFromBase64(object.amino_binary); + } + return message; + }, + toAmino(message: TxEncodeAminoResponse): TxEncodeAminoResponseAmino { + const obj: any = {}; + obj.amino_binary = message.aminoBinary ? base64FromBytes(message.aminoBinary) : undefined; + return obj; + }, + fromAminoMsg(object: TxEncodeAminoResponseAminoMsg): TxEncodeAminoResponse { + return TxEncodeAminoResponse.fromAmino(object.value); + }, + toAminoMsg(message: TxEncodeAminoResponse): TxEncodeAminoResponseAminoMsg { + return { + type: 'cosmos-sdk/TxEncodeAminoResponse', + value: TxEncodeAminoResponse.toAmino(message) + }; + }, + fromProtoMsg(message: TxEncodeAminoResponseProtoMsg): TxEncodeAminoResponse { + return TxEncodeAminoResponse.decode(message.value); + }, + toProto(message: TxEncodeAminoResponse): Uint8Array { + return TxEncodeAminoResponse.encode(message).finish(); + }, + toProtoMsg(message: TxEncodeAminoResponse): TxEncodeAminoResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxEncodeAminoResponse', + value: TxEncodeAminoResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxEncodeAminoResponse.typeUrl, TxEncodeAminoResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoResponse.aminoType, TxEncodeAminoResponse.typeUrl); +function createBaseTxDecodeAminoRequest(): TxDecodeAminoRequest { + return { + aminoBinary: new Uint8Array() + }; +} +export const TxDecodeAminoRequest = { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeAminoRequest', + aminoType: 'cosmos-sdk/TxDecodeAminoRequest', + is(o: any): o is TxDecodeAminoRequest { + return o && (o.$typeUrl === TxDecodeAminoRequest.typeUrl || o.aminoBinary instanceof Uint8Array || typeof o.aminoBinary === 'string'); + }, + isAmino(o: any): o is TxDecodeAminoRequestAmino { + return o && (o.$typeUrl === TxDecodeAminoRequest.typeUrl || o.amino_binary instanceof Uint8Array || typeof o.amino_binary === 'string'); + }, + encode(message: TxDecodeAminoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.aminoBinary.length !== 0) { + writer.uint32(10).bytes(message.aminoBinary); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeAminoRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxDecodeAminoRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.aminoBinary = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxDecodeAminoRequest { + const message = createBaseTxDecodeAminoRequest(); + message.aminoBinary = object.aminoBinary ?? new Uint8Array(); + return message; + }, + fromAmino(object: TxDecodeAminoRequestAmino): TxDecodeAminoRequest { + const message = createBaseTxDecodeAminoRequest(); + if (object.amino_binary !== undefined && object.amino_binary !== null) { + message.aminoBinary = bytesFromBase64(object.amino_binary); + } + return message; + }, + toAmino(message: TxDecodeAminoRequest): TxDecodeAminoRequestAmino { + const obj: any = {}; + obj.amino_binary = message.aminoBinary ? base64FromBytes(message.aminoBinary) : undefined; + return obj; + }, + fromAminoMsg(object: TxDecodeAminoRequestAminoMsg): TxDecodeAminoRequest { + return TxDecodeAminoRequest.fromAmino(object.value); + }, + toAminoMsg(message: TxDecodeAminoRequest): TxDecodeAminoRequestAminoMsg { + return { + type: 'cosmos-sdk/TxDecodeAminoRequest', + value: TxDecodeAminoRequest.toAmino(message) + }; + }, + fromProtoMsg(message: TxDecodeAminoRequestProtoMsg): TxDecodeAminoRequest { + return TxDecodeAminoRequest.decode(message.value); + }, + toProto(message: TxDecodeAminoRequest): Uint8Array { + return TxDecodeAminoRequest.encode(message).finish(); + }, + toProtoMsg(message: TxDecodeAminoRequest): TxDecodeAminoRequestProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeAminoRequest', + value: TxDecodeAminoRequest.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxDecodeAminoRequest.typeUrl, TxDecodeAminoRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoRequest.aminoType, TxDecodeAminoRequest.typeUrl); +function createBaseTxDecodeAminoResponse(): TxDecodeAminoResponse { + return { + aminoJson: '' + }; +} +export const TxDecodeAminoResponse = { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeAminoResponse', + aminoType: 'cosmos-sdk/TxDecodeAminoResponse', + is(o: any): o is TxDecodeAminoResponse { + return o && (o.$typeUrl === TxDecodeAminoResponse.typeUrl || typeof o.aminoJson === 'string'); + }, + isAmino(o: any): o is TxDecodeAminoResponseAmino { + return o && (o.$typeUrl === TxDecodeAminoResponse.typeUrl || typeof o.amino_json === 'string'); + }, + encode(message: TxDecodeAminoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.aminoJson !== '') { + writer.uint32(10).string(message.aminoJson); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeAminoResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxDecodeAminoResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.aminoJson = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxDecodeAminoResponse { + const message = createBaseTxDecodeAminoResponse(); + message.aminoJson = object.aminoJson ?? ''; + return message; + }, + fromAmino(object: TxDecodeAminoResponseAmino): TxDecodeAminoResponse { + const message = createBaseTxDecodeAminoResponse(); + if (object.amino_json !== undefined && object.amino_json !== null) { + message.aminoJson = object.amino_json; + } + return message; + }, + toAmino(message: TxDecodeAminoResponse): TxDecodeAminoResponseAmino { + const obj: any = {}; + obj.amino_json = message.aminoJson === '' ? undefined : message.aminoJson; + return obj; + }, + fromAminoMsg(object: TxDecodeAminoResponseAminoMsg): TxDecodeAminoResponse { + return TxDecodeAminoResponse.fromAmino(object.value); + }, + toAminoMsg(message: TxDecodeAminoResponse): TxDecodeAminoResponseAminoMsg { + return { + type: 'cosmos-sdk/TxDecodeAminoResponse', + value: TxDecodeAminoResponse.toAmino(message) + }; + }, + fromProtoMsg(message: TxDecodeAminoResponseProtoMsg): TxDecodeAminoResponse { + return TxDecodeAminoResponse.decode(message.value); + }, + toProto(message: TxDecodeAminoResponse): Uint8Array { + return TxDecodeAminoResponse.encode(message).finish(); + }, + toProtoMsg(message: TxDecodeAminoResponse): TxDecodeAminoResponseProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxDecodeAminoResponse', + value: TxDecodeAminoResponse.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxDecodeAminoResponse.typeUrl, TxDecodeAminoResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoResponse.aminoType, TxDecodeAminoResponse.typeUrl); \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/tx/v1beta1/tx.ts b/libs/cosmos-types/cosmos/tx/v1beta1/tx.ts new file mode 100644 index 00000000..59915ddc --- /dev/null +++ b/libs/cosmos-types/cosmos/tx/v1beta1/tx.ts @@ -0,0 +1,2029 @@ +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino } from '../../../google/protobuf/any'; +import { base64FromBytes, bytesFromBase64, DeepPartial, isSet } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { CompactBitArray, CompactBitArrayAmino } from '../../crypto/multisig/v1beta1/multisig'; +import { SignMode } from '../signing/v1beta1/signing'; +/** Tx is the standard type used for broadcasting transactions. */ +export interface Tx { + /** body is the processable content of the transaction */ + body?: TxBody; + /** + * auth_info is the authorization related content of the transaction, + * specifically signers, signer modes and fee + */ + authInfo?: AuthInfo; + /** + * 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. + */ + signatures: Uint8Array[]; +} +export interface TxProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.Tx'; + value: Uint8Array; +} +/** Tx is the standard type used for broadcasting transactions. */ +export interface TxAmino { + /** body is the processable content of the transaction */ + body?: TxBodyAmino; + /** + * auth_info is the authorization related content of the transaction, + * specifically signers, signer modes and fee + */ + auth_info?: AuthInfoAmino; + /** + * 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. + */ + signatures: string[]; +} +export interface TxAminoMsg { + type: 'cosmos-sdk/Tx'; + value: TxAmino; +} +/** + * 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. + */ +export interface TxRaw { + /** + * body_bytes is a protobuf serialization of a TxBody that matches the + * representation in SignDoc. + */ + bodyBytes: Uint8Array; + /** + * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + * representation in SignDoc. + */ + authInfoBytes: Uint8Array; + /** + * 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. + */ + signatures: Uint8Array[]; +} +export interface TxRawProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxRaw'; + value: Uint8Array; +} +/** + * 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. + */ +export interface TxRawAmino { + /** + * body_bytes is a protobuf serialization of a TxBody that matches the + * representation in SignDoc. + */ + body_bytes: string; + /** + * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + * representation in SignDoc. + */ + auth_info_bytes: string; + /** + * 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. + */ + signatures: string[]; +} +export interface TxRawAminoMsg { + type: 'cosmos-sdk/TxRaw'; + value: TxRawAmino; +} +/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ +export interface SignDoc { + /** + * body_bytes is protobuf serialization of a TxBody that matches the + * representation in TxRaw. + */ + bodyBytes: Uint8Array; + /** + * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + * representation in TxRaw. + */ + authInfoBytes: Uint8Array; + /** + * 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 + */ + chainId: string; + /** account_number is the account number of the account in state */ + accountNumber: bigint; +} +export interface SignDocProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.SignDoc'; + value: Uint8Array; +} +/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ +export interface SignDocAmino { + /** + * body_bytes is protobuf serialization of a TxBody that matches the + * representation in TxRaw. + */ + body_bytes: string; + /** + * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + * representation in TxRaw. + */ + auth_info_bytes: string; + /** + * 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 + */ + chain_id: string; + /** account_number is the account number of the account in state */ + account_number: string; +} +export interface SignDocAminoMsg { + type: 'cosmos-sdk/SignDoc'; + value: SignDocAmino; +} +/** + * SignDocDirectAux is the type used for generating sign bytes for + * SIGN_MODE_DIRECT_AUX. + * + * Since: cosmos-sdk 0.46 + */ +export interface SignDocDirectAux { + /** + * body_bytes is protobuf serialization of a TxBody that matches the + * representation in TxRaw. + */ + bodyBytes: Uint8Array; + /** public_key is the public key of the signing account. */ + publicKey?: Any; + /** + * chain_id is the identifier of the chain this transaction targets. + * It prevents signed transactions from being used on another chain by an + * attacker. + */ + chainId: string; + /** account_number is the account number of the account in state. */ + accountNumber: bigint; + /** sequence is the sequence number of the signing account. */ + sequence: bigint; + /** tips have been depreacted and should not be used */ + /** @deprecated */ + tip?: Tip; +} +export interface SignDocDirectAuxProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.SignDocDirectAux'; + value: Uint8Array; +} +/** + * SignDocDirectAux is the type used for generating sign bytes for + * SIGN_MODE_DIRECT_AUX. + * + * Since: cosmos-sdk 0.46 + */ +export interface SignDocDirectAuxAmino { + /** + * body_bytes is protobuf serialization of a TxBody that matches the + * representation in TxRaw. + */ + body_bytes: string; + /** public_key is the public key of the signing account. */ + public_key?: AnyAmino; + /** + * chain_id is the identifier of the chain this transaction targets. + * It prevents signed transactions from being used on another chain by an + * attacker. + */ + chain_id: string; + /** account_number is the account number of the account in state. */ + account_number: string; + /** sequence is the sequence number of the signing account. */ + sequence: string; + /** tips have been depreacted and should not be used */ + /** @deprecated */ + tip?: TipAmino; +} +export interface SignDocDirectAuxAminoMsg { + type: 'cosmos-sdk/SignDocDirectAux'; + value: SignDocDirectAuxAmino; +} +/** TxBody is the body of a transaction that all signers sign over. */ +export interface 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. + */ + messages: Any[]; + /** + * 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). + */ + memo: string; + /** + * timeout is the block height after which this transaction will not + * be processed by the chain + */ + timeoutHeight: bigint; + /** + * 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 + */ + extensionOptions: Any[]; + /** + * 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 + */ + nonCriticalExtensionOptions: Any[]; +} +export interface TxBodyProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.TxBody'; + value: Uint8Array; +} +/** TxBody is the body of a transaction that all signers sign over. */ +export interface TxBodyAmino { + /** + * 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. + */ + messages: AnyAmino[]; + /** + * 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). + */ + memo: string; + /** + * timeout is the block height after which this transaction will not + * be processed by the chain + */ + timeout_height: string; + /** + * 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 + */ + extension_options: AnyAmino[]; + /** + * 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 + */ + non_critical_extension_options: AnyAmino[]; +} +export interface TxBodyAminoMsg { + type: 'cosmos-sdk/TxBody'; + value: TxBodyAmino; +} +/** + * AuthInfo describes the fee and signer modes that are used to sign a + * transaction. + */ +export interface 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. + */ + signerInfos: SignerInfo[]; + /** + * 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; + /** + * Tip is the optional tip used for transactions fees paid in another denom. + * + * This field is ignored if the chain didn't enable tips, i.e. didn't add the + * `TipDecorator` in its posthandler. + * + * Since: cosmos-sdk 0.46 + */ + /** @deprecated */ + tip?: Tip; +} +export interface AuthInfoProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.AuthInfo'; + value: Uint8Array; +} +/** + * AuthInfo describes the fee and signer modes that are used to sign a + * transaction. + */ +export interface AuthInfoAmino { + /** + * 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. + */ + signer_infos: SignerInfoAmino[]; + /** + * 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?: FeeAmino; + /** + * Tip is the optional tip used for transactions fees paid in another denom. + * + * This field is ignored if the chain didn't enable tips, i.e. didn't add the + * `TipDecorator` in its posthandler. + * + * Since: cosmos-sdk 0.46 + */ + /** @deprecated */ + tip?: TipAmino; +} +export interface AuthInfoAminoMsg { + type: 'cosmos-sdk/AuthInfo'; + value: AuthInfoAmino; +} +/** + * SignerInfo describes the public key and signing mode of a single top-level + * signer. + */ +export interface 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. + */ + publicKey?: Any; + /** + * mode_info describes the signing mode of the signer and is a nested + * structure to support nested multisig pubkey's + */ + modeInfo?: ModeInfo; + /** + * 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. + */ + sequence: bigint; +} +export interface SignerInfoProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.SignerInfo'; + value: Uint8Array; +} +/** + * SignerInfo describes the public key and signing mode of a single top-level + * signer. + */ +export interface SignerInfoAmino { + /** + * 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. + */ + public_key?: AnyAmino; + /** + * mode_info describes the signing mode of the signer and is a nested + * structure to support nested multisig pubkey's + */ + mode_info?: ModeInfoAmino; + /** + * 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. + */ + sequence: string; +} +export interface SignerInfoAminoMsg { + type: 'cosmos-sdk/SignerInfo'; + value: SignerInfoAmino; +} +/** ModeInfo describes the signing mode of a single or nested multisig signer. */ +export interface ModeInfo { + /** single represents a single signer */ + single?: ModeInfo_Single; + /** multi represents a nested multisig signer */ + multi?: ModeInfo_Multi; +} +export interface ModeInfoProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.ModeInfo'; + value: Uint8Array; +} +/** ModeInfo describes the signing mode of a single or nested multisig signer. */ +export interface ModeInfoAmino { + /** single represents a single signer */ + single?: ModeInfo_SingleAmino; + /** multi represents a nested multisig signer */ + multi?: ModeInfo_MultiAmino; +} +export interface ModeInfoAminoMsg { + type: 'cosmos-sdk/ModeInfo'; + value: ModeInfoAmino; +} +/** + * 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 + */ +export interface ModeInfo_Single { + /** mode is the signing mode of the single signer */ + mode: SignMode; +} +export interface ModeInfo_SingleProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.Single'; + value: Uint8Array; +} +/** + * 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 + */ +export interface ModeInfo_SingleAmino { + /** mode is the signing mode of the single signer */ + mode: SignMode; +} +export interface ModeInfo_SingleAminoMsg { + type: 'cosmos-sdk/Single'; + value: ModeInfo_SingleAmino; +} +/** Multi is the mode info for a multisig public key */ +export interface ModeInfo_Multi { + /** bitarray specifies which keys within the multisig are signing */ + bitarray?: CompactBitArray; + /** + * mode_infos is the corresponding modes of the signers of the multisig + * which could include nested multisig public keys + */ + modeInfos: ModeInfo[]; +} +export interface ModeInfo_MultiProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.Multi'; + value: Uint8Array; +} +/** Multi is the mode info for a multisig public key */ +export interface ModeInfo_MultiAmino { + /** bitarray specifies which keys within the multisig are signing */ + bitarray?: CompactBitArrayAmino; + /** + * mode_infos is the corresponding modes of the signers of the multisig + * which could include nested multisig public keys + */ + mode_infos: ModeInfoAmino[]; +} +export interface ModeInfo_MultiAminoMsg { + type: 'cosmos-sdk/Multi'; + value: ModeInfo_MultiAmino; +} +/** + * 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. + */ +export interface Fee { + /** amount is the amount of coins to be paid as a fee */ + amount: Coin[]; + /** + * gas_limit is the maximum gas that can be used in transaction processing + * before an out of gas error occurs + */ + gasLimit: bigint; + /** + * 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. + */ + payer: string; + /** + * 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 + */ + granter: string; +} +export interface FeeProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.Fee'; + value: Uint8Array; +} +/** + * 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. + */ +export interface FeeAmino { + /** amount is the amount of coins to be paid as a fee */ + amount: CoinAmino[]; + /** + * gas_limit is the maximum gas that can be used in transaction processing + * before an out of gas error occurs + */ + gas_limit: string; + /** + * 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. + */ + payer: string; + /** + * 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 + */ + granter: string; +} +export interface FeeAminoMsg { + type: 'cosmos-sdk/Fee'; + value: FeeAmino; +} +/** + * Tip is the tip used for meta-transactions. + * + * Since: cosmos-sdk 0.46 + */ +/** @deprecated */ +export interface Tip { + /** amount is the amount of the tip */ + amount: Coin[]; + /** tipper is the address of the account paying for the tip */ + tipper: string; +} +export interface TipProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.Tip'; + value: Uint8Array; +} +/** + * Tip is the tip used for meta-transactions. + * + * Since: cosmos-sdk 0.46 + */ +/** @deprecated */ +export interface TipAmino { + /** amount is the amount of the tip */ + amount: CoinAmino[]; + /** tipper is the address of the account paying for the tip */ + tipper: string; +} +export interface TipAminoMsg { + type: 'cosmos-sdk/Tip'; + value: TipAmino; +} +/** + * AuxSignerData is the intermediary format that an auxiliary signer (e.g. a + * tipper) builds and sends to the fee payer (who will build and broadcast the + * actual tx). AuxSignerData is not a valid tx in itself, and will be rejected + * by the node if sent directly as-is. + * + * Since: cosmos-sdk 0.46 + */ +export interface AuxSignerData { + /** + * address is the bech32-encoded address of the auxiliary signer. If using + * AuxSignerData across different chains, the bech32 prefix of the target + * chain (where the final transaction is broadcasted) should be used. + */ + address: string; + /** + * sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer + * signs. Note: we use the same sign doc even if we're signing with + * LEGACY_AMINO_JSON. + */ + signDoc?: SignDocDirectAux; + /** mode is the signing mode of the single signer. */ + mode: SignMode; + /** sig is the signature of the sign doc. */ + sig: Uint8Array; +} +export interface AuxSignerDataProtoMsg { + typeUrl: '/cosmos.tx.v1beta1.AuxSignerData'; + value: Uint8Array; +} +/** + * AuxSignerData is the intermediary format that an auxiliary signer (e.g. a + * tipper) builds and sends to the fee payer (who will build and broadcast the + * actual tx). AuxSignerData is not a valid tx in itself, and will be rejected + * by the node if sent directly as-is. + * + * Since: cosmos-sdk 0.46 + */ +export interface AuxSignerDataAmino { + /** + * address is the bech32-encoded address of the auxiliary signer. If using + * AuxSignerData across different chains, the bech32 prefix of the target + * chain (where the final transaction is broadcasted) should be used. + */ + address: string; + /** + * sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer + * signs. Note: we use the same sign doc even if we're signing with + * LEGACY_AMINO_JSON. + */ + sign_doc?: SignDocDirectAuxAmino; + /** mode is the signing mode of the single signer. */ + mode: SignMode; + /** sig is the signature of the sign doc. */ + sig: string; +} +export interface AuxSignerDataAminoMsg { + type: 'cosmos-sdk/AuxSignerData'; + value: AuxSignerDataAmino; +} +function createBaseTx(): Tx { + return { + body: undefined, + authInfo: undefined, + signatures: [] + }; +} +export const Tx = { + typeUrl: '/cosmos.tx.v1beta1.Tx', + aminoType: 'cosmos-sdk/Tx', + is(o: any): o is Tx { + return o && (o.$typeUrl === Tx.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === 'string')); + }, + isAmino(o: any): o is TxAmino { + return o && (o.$typeUrl === Tx.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === 'string')); + }, + encode(message: Tx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.body !== undefined) { + TxBody.encode(message.body, writer.uint32(10).fork()).ldelim(); + } + if (message.authInfo !== undefined) { + AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.signatures) { + writer.uint32(26).bytes(v!); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): Tx { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTx(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = TxBody.decode(reader, reader.uint32()); + break; + case 2: + message.authInfo = AuthInfo.decode(reader, reader.uint32()); + break; + case 3: + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): Tx { + const message = createBaseTx(); + message.body = object.body !== undefined && object.body !== null ? TxBody.fromPartial(object.body) : undefined; + message.authInfo = object.authInfo !== undefined && object.authInfo !== null ? AuthInfo.fromPartial(object.authInfo) : undefined; + message.signatures = object.signatures?.map(e => e) || []; + return message; + }, + fromAmino(object: TxAmino): Tx { + const message = createBaseTx(); + if (object.body !== undefined && object.body !== null) { + message.body = TxBody.fromAmino(object.body); + } + if (object.auth_info !== undefined && object.auth_info !== null) { + message.authInfo = AuthInfo.fromAmino(object.auth_info); + } + message.signatures = object.signatures?.map(e => bytesFromBase64(e)) || []; + return message; + }, + toAmino(message: Tx): TxAmino { + const obj: any = {}; + obj.body = message.body ? TxBody.toAmino(message.body) : undefined; + obj.auth_info = message.authInfo ? AuthInfo.toAmino(message.authInfo) : undefined; + if (message.signatures) { + obj.signatures = message.signatures.map(e => base64FromBytes(e)); + } else { + obj.signatures = message.signatures; + } + return obj; + }, + fromAminoMsg(object: TxAminoMsg): Tx { + return Tx.fromAmino(object.value); + }, + toAminoMsg(message: Tx): TxAminoMsg { + return { + type: 'cosmos-sdk/Tx', + value: Tx.toAmino(message) + }; + }, + fromProtoMsg(message: TxProtoMsg): Tx { + return Tx.decode(message.value); + }, + toProto(message: Tx): Uint8Array { + return Tx.encode(message).finish(); + }, + toProtoMsg(message: Tx): TxProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.Tx', + value: Tx.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(Tx.typeUrl, Tx); +GlobalDecoderRegistry.registerAminoProtoMapping(Tx.aminoType, Tx.typeUrl); +function createBaseTxRaw(): TxRaw { + return { + bodyBytes: new Uint8Array(), + authInfoBytes: new Uint8Array(), + signatures: [] + }; +} +export const TxRaw = { + typeUrl: '/cosmos.tx.v1beta1.TxRaw', + aminoType: 'cosmos-sdk/TxRaw', + is(o: any): o is TxRaw { + return o && (o.$typeUrl === TxRaw.typeUrl || (o.bodyBytes instanceof Uint8Array || typeof o.bodyBytes === 'string') && (o.authInfoBytes instanceof Uint8Array || typeof o.authInfoBytes === 'string') && Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === 'string')); + }, + isAmino(o: any): o is TxRawAmino { + return o && (o.$typeUrl === TxRaw.typeUrl || (o.body_bytes instanceof Uint8Array || typeof o.body_bytes === 'string') && (o.auth_info_bytes instanceof Uint8Array || typeof o.auth_info_bytes === 'string') && Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === 'string')); + }, + encode(message: TxRaw, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.bodyBytes.length !== 0) { + writer.uint32(10).bytes(message.bodyBytes); + } + if (message.authInfoBytes.length !== 0) { + writer.uint32(18).bytes(message.authInfoBytes); + } + for (const v of message.signatures) { + writer.uint32(26).bytes(v!); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxRaw { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxRaw(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxRaw { + const message = createBaseTxRaw(); + message.bodyBytes = object.bodyBytes ?? new Uint8Array(); + message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); + message.signatures = object.signatures?.map(e => e) || []; + return message; + }, + fromAmino(object: TxRawAmino): TxRaw { + const message = createBaseTxRaw(); + if (object.body_bytes !== undefined && object.body_bytes !== null) { + message.bodyBytes = bytesFromBase64(object.body_bytes); + } + if (object.auth_info_bytes !== undefined && object.auth_info_bytes !== null) { + message.authInfoBytes = bytesFromBase64(object.auth_info_bytes); + } + message.signatures = object.signatures?.map(e => bytesFromBase64(e)) || []; + return message; + }, + toAmino(message: TxRaw): TxRawAmino { + const obj: any = {}; + obj.body_bytes = message.bodyBytes ? base64FromBytes(message.bodyBytes) : undefined; + obj.auth_info_bytes = message.authInfoBytes ? base64FromBytes(message.authInfoBytes) : undefined; + if (message.signatures) { + obj.signatures = message.signatures.map(e => base64FromBytes(e)); + } else { + obj.signatures = message.signatures; + } + return obj; + }, + fromAminoMsg(object: TxRawAminoMsg): TxRaw { + return TxRaw.fromAmino(object.value); + }, + toAminoMsg(message: TxRaw): TxRawAminoMsg { + return { + type: 'cosmos-sdk/TxRaw', + value: TxRaw.toAmino(message) + }; + }, + fromProtoMsg(message: TxRawProtoMsg): TxRaw { + return TxRaw.decode(message.value); + }, + toProto(message: TxRaw): Uint8Array { + return TxRaw.encode(message).finish(); + }, + toProtoMsg(message: TxRaw): TxRawProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxRaw', + value: TxRaw.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxRaw.typeUrl, TxRaw); +GlobalDecoderRegistry.registerAminoProtoMapping(TxRaw.aminoType, TxRaw.typeUrl); +function createBaseSignDoc(): SignDoc { + return { + bodyBytes: new Uint8Array(), + authInfoBytes: new Uint8Array(), + chainId: '', + accountNumber: BigInt(0) + }; +} +export const SignDoc = { + typeUrl: '/cosmos.tx.v1beta1.SignDoc', + aminoType: 'cosmos-sdk/SignDoc', + is(o: any): o is SignDoc { + return o && (o.$typeUrl === SignDoc.typeUrl || (o.bodyBytes instanceof Uint8Array || typeof o.bodyBytes === 'string') && (o.authInfoBytes instanceof Uint8Array || typeof o.authInfoBytes === 'string') && typeof o.chainId === 'string' && typeof o.accountNumber === 'bigint'); + }, + isAmino(o: any): o is SignDocAmino { + return o && (o.$typeUrl === SignDoc.typeUrl || (o.body_bytes instanceof Uint8Array || typeof o.body_bytes === 'string') && (o.auth_info_bytes instanceof Uint8Array || typeof o.auth_info_bytes === 'string') && typeof o.chain_id === 'string' && typeof o.account_number === 'bigint'); + }, + encode(message: SignDoc, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.bodyBytes.length !== 0) { + writer.uint32(10).bytes(message.bodyBytes); + } + if (message.authInfoBytes.length !== 0) { + writer.uint32(18).bytes(message.authInfoBytes); + } + if (message.chainId !== '') { + writer.uint32(26).string(message.chainId); + } + if (message.accountNumber !== BigInt(0)) { + writer.uint32(32).uint64(message.accountNumber); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignDoc { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignDoc(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + message.chainId = reader.string(); + break; + case 4: + message.accountNumber = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignDoc { + const message = createBaseSignDoc(); + message.bodyBytes = object.bodyBytes ?? new Uint8Array(); + message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); + message.chainId = object.chainId ?? ''; + message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); + return message; + }, + fromAmino(object: SignDocAmino): SignDoc { + const message = createBaseSignDoc(); + if (object.body_bytes !== undefined && object.body_bytes !== null) { + message.bodyBytes = bytesFromBase64(object.body_bytes); + } + if (object.auth_info_bytes !== undefined && object.auth_info_bytes !== null) { + message.authInfoBytes = bytesFromBase64(object.auth_info_bytes); + } + if (object.chain_id !== undefined && object.chain_id !== null) { + message.chainId = object.chain_id; + } + if (object.account_number !== undefined && object.account_number !== null) { + message.accountNumber = BigInt(object.account_number); + } + return message; + }, + toAmino(message: SignDoc): SignDocAmino { + const obj: any = {}; + obj.body_bytes = message.bodyBytes ? base64FromBytes(message.bodyBytes) : undefined; + obj.auth_info_bytes = message.authInfoBytes ? base64FromBytes(message.authInfoBytes) : undefined; + obj.chain_id = message.chainId === '' ? undefined : message.chainId; + obj.account_number = message.accountNumber !== BigInt(0) ? message.accountNumber.toString() : undefined; + return obj; + }, + fromAminoMsg(object: SignDocAminoMsg): SignDoc { + return SignDoc.fromAmino(object.value); + }, + toAminoMsg(message: SignDoc): SignDocAminoMsg { + return { + type: 'cosmos-sdk/SignDoc', + value: SignDoc.toAmino(message) + }; + }, + fromProtoMsg(message: SignDocProtoMsg): SignDoc { + return SignDoc.decode(message.value); + }, + toProto(message: SignDoc): Uint8Array { + return SignDoc.encode(message).finish(); + }, + toProtoMsg(message: SignDoc): SignDocProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.SignDoc', + value: SignDoc.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignDoc.typeUrl, SignDoc); +GlobalDecoderRegistry.registerAminoProtoMapping(SignDoc.aminoType, SignDoc.typeUrl); +function createBaseSignDocDirectAux(): SignDocDirectAux { + return { + bodyBytes: new Uint8Array(), + publicKey: undefined, + chainId: '', + accountNumber: BigInt(0), + sequence: BigInt(0), + tip: undefined + }; +} +export const SignDocDirectAux = { + typeUrl: '/cosmos.tx.v1beta1.SignDocDirectAux', + aminoType: 'cosmos-sdk/SignDocDirectAux', + is(o: any): o is SignDocDirectAux { + return o && (o.$typeUrl === SignDocDirectAux.typeUrl || (o.bodyBytes instanceof Uint8Array || typeof o.bodyBytes === 'string') && typeof o.chainId === 'string' && typeof o.accountNumber === 'bigint' && typeof o.sequence === 'bigint'); + }, + isAmino(o: any): o is SignDocDirectAuxAmino { + return o && (o.$typeUrl === SignDocDirectAux.typeUrl || (o.body_bytes instanceof Uint8Array || typeof o.body_bytes === 'string') && typeof o.chain_id === 'string' && typeof o.account_number === 'bigint' && typeof o.sequence === 'bigint'); + }, + encode(message: SignDocDirectAux, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.bodyBytes.length !== 0) { + writer.uint32(10).bytes(message.bodyBytes); + } + if (message.publicKey !== undefined) { + Any.encode(message.publicKey, writer.uint32(18).fork()).ldelim(); + } + if (message.chainId !== '') { + writer.uint32(26).string(message.chainId); + } + if (message.accountNumber !== BigInt(0)) { + writer.uint32(32).uint64(message.accountNumber); + } + if (message.sequence !== BigInt(0)) { + writer.uint32(40).uint64(message.sequence); + } + if (message.tip !== undefined) { + Tip.encode(message.tip, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignDocDirectAux { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignDocDirectAux(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.publicKey = Any.decode(reader, reader.uint32()); + break; + case 3: + message.chainId = reader.string(); + break; + case 4: + message.accountNumber = reader.uint64(); + break; + case 5: + message.sequence = reader.uint64(); + break; + case 6: + message.tip = Tip.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignDocDirectAux { + const message = createBaseSignDocDirectAux(); + message.bodyBytes = object.bodyBytes ?? new Uint8Array(); + message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; + message.chainId = object.chainId ?? ''; + message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); + message.tip = object.tip !== undefined && object.tip !== null ? Tip.fromPartial(object.tip) : undefined; + return message; + }, + fromAmino(object: SignDocDirectAuxAmino): SignDocDirectAux { + const message = createBaseSignDocDirectAux(); + if (object.body_bytes !== undefined && object.body_bytes !== null) { + message.bodyBytes = bytesFromBase64(object.body_bytes); + } + if (object.public_key !== undefined && object.public_key !== null) { + message.publicKey = Any.fromAmino(object.public_key); + } + if (object.chain_id !== undefined && object.chain_id !== null) { + message.chainId = object.chain_id; + } + if (object.account_number !== undefined && object.account_number !== null) { + message.accountNumber = BigInt(object.account_number); + } + if (object.sequence !== undefined && object.sequence !== null) { + message.sequence = BigInt(object.sequence); + } + if (object.tip !== undefined && object.tip !== null) { + message.tip = Tip.fromAmino(object.tip); + } + return message; + }, + toAmino(message: SignDocDirectAux): SignDocDirectAuxAmino { + const obj: any = {}; + obj.body_bytes = message.bodyBytes ? base64FromBytes(message.bodyBytes) : undefined; + obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; + obj.chain_id = message.chainId === '' ? undefined : message.chainId; + obj.account_number = message.accountNumber !== BigInt(0) ? message.accountNumber.toString() : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; + obj.tip = message.tip ? Tip.toAmino(message.tip) : undefined; + return obj; + }, + fromAminoMsg(object: SignDocDirectAuxAminoMsg): SignDocDirectAux { + return SignDocDirectAux.fromAmino(object.value); + }, + toAminoMsg(message: SignDocDirectAux): SignDocDirectAuxAminoMsg { + return { + type: 'cosmos-sdk/SignDocDirectAux', + value: SignDocDirectAux.toAmino(message) + }; + }, + fromProtoMsg(message: SignDocDirectAuxProtoMsg): SignDocDirectAux { + return SignDocDirectAux.decode(message.value); + }, + toProto(message: SignDocDirectAux): Uint8Array { + return SignDocDirectAux.encode(message).finish(); + }, + toProtoMsg(message: SignDocDirectAux): SignDocDirectAuxProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.SignDocDirectAux', + value: SignDocDirectAux.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignDocDirectAux.typeUrl, SignDocDirectAux); +GlobalDecoderRegistry.registerAminoProtoMapping(SignDocDirectAux.aminoType, SignDocDirectAux.typeUrl); +function createBaseTxBody(): TxBody { + return { + messages: [], + memo: '', + timeoutHeight: BigInt(0), + extensionOptions: [], + nonCriticalExtensionOptions: [] + }; +} +export const TxBody = { + typeUrl: '/cosmos.tx.v1beta1.TxBody', + aminoType: 'cosmos-sdk/TxBody', + is(o: any): o is TxBody { + return o && (o.$typeUrl === TxBody.typeUrl || Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && typeof o.memo === 'string' && typeof o.timeoutHeight === 'bigint' && Array.isArray(o.extensionOptions) && (!o.extensionOptions.length || Any.is(o.extensionOptions[0])) && Array.isArray(o.nonCriticalExtensionOptions) && (!o.nonCriticalExtensionOptions.length || Any.is(o.nonCriticalExtensionOptions[0]))); + }, + isAmino(o: any): o is TxBodyAmino { + return o && (o.$typeUrl === TxBody.typeUrl || Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && typeof o.memo === 'string' && typeof o.timeout_height === 'bigint' && Array.isArray(o.extension_options) && (!o.extension_options.length || Any.isAmino(o.extension_options[0])) && Array.isArray(o.non_critical_extension_options) && (!o.non_critical_extension_options.length || Any.isAmino(o.non_critical_extension_options[0]))); + }, + encode(message: TxBody, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.messages) { + Any.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.memo !== '') { + writer.uint32(18).string(message.memo); + } + if (message.timeoutHeight !== BigInt(0)) { + writer.uint32(24).uint64(message.timeoutHeight); + } + for (const v of message.extensionOptions) { + Any.encode(v!, writer.uint32(8186).fork()).ldelim(); + } + for (const v of message.nonCriticalExtensionOptions) { + Any.encode(v!, writer.uint32(16378).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): TxBody { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTxBody(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messages.push(Any.decode(reader, reader.uint32())); + break; + case 2: + message.memo = reader.string(); + break; + case 3: + message.timeoutHeight = reader.uint64(); + break; + case 1023: + message.extensionOptions.push(Any.decode(reader, reader.uint32())); + break; + case 2047: + message.nonCriticalExtensionOptions.push(Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): TxBody { + const message = createBaseTxBody(); + message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; + message.memo = object.memo ?? ''; + message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? BigInt(object.timeoutHeight.toString()) : BigInt(0); + message.extensionOptions = object.extensionOptions?.map(e => Any.fromPartial(e)) || []; + message.nonCriticalExtensionOptions = object.nonCriticalExtensionOptions?.map(e => Any.fromPartial(e)) || []; + return message; + }, + fromAmino(object: TxBodyAmino): TxBody { + const message = createBaseTxBody(); + message.messages = object.messages?.map(e => Any.fromAmino(e)) || []; + if (object.memo !== undefined && object.memo !== null) { + message.memo = object.memo; + } + if (object.timeout_height !== undefined && object.timeout_height !== null) { + message.timeoutHeight = BigInt(object.timeout_height); + } + message.extensionOptions = object.extension_options?.map(e => Any.fromAmino(e)) || []; + message.nonCriticalExtensionOptions = object.non_critical_extension_options?.map(e => Any.fromAmino(e)) || []; + return message; + }, + toAmino(message: TxBody): TxBodyAmino { + const obj: any = {}; + if (message.messages) { + obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined); + } else { + obj.messages = message.messages; + } + obj.memo = message.memo === '' ? undefined : message.memo; + obj.timeout_height = message.timeoutHeight !== BigInt(0) ? message.timeoutHeight.toString() : undefined; + if (message.extensionOptions) { + obj.extension_options = message.extensionOptions.map(e => e ? Any.toAmino(e) : undefined); + } else { + obj.extension_options = message.extensionOptions; + } + if (message.nonCriticalExtensionOptions) { + obj.non_critical_extension_options = message.nonCriticalExtensionOptions.map(e => e ? Any.toAmino(e) : undefined); + } else { + obj.non_critical_extension_options = message.nonCriticalExtensionOptions; + } + return obj; + }, + fromAminoMsg(object: TxBodyAminoMsg): TxBody { + return TxBody.fromAmino(object.value); + }, + toAminoMsg(message: TxBody): TxBodyAminoMsg { + return { + type: 'cosmos-sdk/TxBody', + value: TxBody.toAmino(message) + }; + }, + fromProtoMsg(message: TxBodyProtoMsg): TxBody { + return TxBody.decode(message.value); + }, + toProto(message: TxBody): Uint8Array { + return TxBody.encode(message).finish(); + }, + toProtoMsg(message: TxBody): TxBodyProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.TxBody', + value: TxBody.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(TxBody.typeUrl, TxBody); +GlobalDecoderRegistry.registerAminoProtoMapping(TxBody.aminoType, TxBody.typeUrl); +function createBaseAuthInfo(): AuthInfo { + return { + signerInfos: [], + fee: undefined, + tip: undefined + }; +} +export const AuthInfo = { + typeUrl: '/cosmos.tx.v1beta1.AuthInfo', + aminoType: 'cosmos-sdk/AuthInfo', + is(o: any): o is AuthInfo { + return o && (o.$typeUrl === AuthInfo.typeUrl || Array.isArray(o.signerInfos) && (!o.signerInfos.length || SignerInfo.is(o.signerInfos[0]))); + }, + isAmino(o: any): o is AuthInfoAmino { + return o && (o.$typeUrl === AuthInfo.typeUrl || Array.isArray(o.signer_infos) && (!o.signer_infos.length || SignerInfo.isAmino(o.signer_infos[0]))); + }, + encode(message: AuthInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.signerInfos) { + SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.fee !== undefined) { + Fee.encode(message.fee, writer.uint32(18).fork()).ldelim(); + } + if (message.tip !== undefined) { + Tip.encode(message.tip, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): AuthInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signerInfos.push(SignerInfo.decode(reader, reader.uint32())); + break; + case 2: + message.fee = Fee.decode(reader, reader.uint32()); + break; + case 3: + message.tip = Tip.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): AuthInfo { + const message = createBaseAuthInfo(); + message.signerInfos = object.signerInfos?.map(e => SignerInfo.fromPartial(e)) || []; + message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; + message.tip = object.tip !== undefined && object.tip !== null ? Tip.fromPartial(object.tip) : undefined; + return message; + }, + fromAmino(object: AuthInfoAmino): AuthInfo { + const message = createBaseAuthInfo(); + message.signerInfos = object.signer_infos?.map(e => SignerInfo.fromAmino(e)) || []; + if (object.fee !== undefined && object.fee !== null) { + message.fee = Fee.fromAmino(object.fee); + } + if (object.tip !== undefined && object.tip !== null) { + message.tip = Tip.fromAmino(object.tip); + } + return message; + }, + toAmino(message: AuthInfo): AuthInfoAmino { + const obj: any = {}; + if (message.signerInfos) { + obj.signer_infos = message.signerInfos.map(e => e ? SignerInfo.toAmino(e) : undefined); + } else { + obj.signer_infos = message.signerInfos; + } + obj.fee = message.fee ? Fee.toAmino(message.fee) : undefined; + obj.tip = message.tip ? Tip.toAmino(message.tip) : undefined; + return obj; + }, + fromAminoMsg(object: AuthInfoAminoMsg): AuthInfo { + return AuthInfo.fromAmino(object.value); + }, + toAminoMsg(message: AuthInfo): AuthInfoAminoMsg { + return { + type: 'cosmos-sdk/AuthInfo', + value: AuthInfo.toAmino(message) + }; + }, + fromProtoMsg(message: AuthInfoProtoMsg): AuthInfo { + return AuthInfo.decode(message.value); + }, + toProto(message: AuthInfo): Uint8Array { + return AuthInfo.encode(message).finish(); + }, + toProtoMsg(message: AuthInfo): AuthInfoProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.AuthInfo', + value: AuthInfo.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(AuthInfo.typeUrl, AuthInfo); +GlobalDecoderRegistry.registerAminoProtoMapping(AuthInfo.aminoType, AuthInfo.typeUrl); +function createBaseSignerInfo(): SignerInfo { + return { + publicKey: undefined, + modeInfo: undefined, + sequence: BigInt(0) + }; +} +export const SignerInfo = { + typeUrl: '/cosmos.tx.v1beta1.SignerInfo', + aminoType: 'cosmos-sdk/SignerInfo', + is(o: any): o is SignerInfo { + return o && (o.$typeUrl === SignerInfo.typeUrl || typeof o.sequence === 'bigint'); + }, + isAmino(o: any): o is SignerInfoAmino { + return o && (o.$typeUrl === SignerInfo.typeUrl || typeof o.sequence === 'bigint'); + }, + encode(message: SignerInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.publicKey !== undefined) { + Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); + } + if (message.modeInfo !== undefined) { + ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim(); + } + if (message.sequence !== BigInt(0)) { + writer.uint32(24).uint64(message.sequence); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SignerInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSignerInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = Any.decode(reader, reader.uint32()); + break; + case 2: + message.modeInfo = ModeInfo.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SignerInfo { + const message = createBaseSignerInfo(); + message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; + message.modeInfo = object.modeInfo !== undefined && object.modeInfo !== null ? ModeInfo.fromPartial(object.modeInfo) : undefined; + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); + return message; + }, + fromAmino(object: SignerInfoAmino): SignerInfo { + const message = createBaseSignerInfo(); + if (object.public_key !== undefined && object.public_key !== null) { + message.publicKey = Any.fromAmino(object.public_key); + } + if (object.mode_info !== undefined && object.mode_info !== null) { + message.modeInfo = ModeInfo.fromAmino(object.mode_info); + } + if (object.sequence !== undefined && object.sequence !== null) { + message.sequence = BigInt(object.sequence); + } + return message; + }, + toAmino(message: SignerInfo): SignerInfoAmino { + const obj: any = {}; + obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; + obj.mode_info = message.modeInfo ? ModeInfo.toAmino(message.modeInfo) : undefined; + obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; + return obj; + }, + fromAminoMsg(object: SignerInfoAminoMsg): SignerInfo { + return SignerInfo.fromAmino(object.value); + }, + toAminoMsg(message: SignerInfo): SignerInfoAminoMsg { + return { + type: 'cosmos-sdk/SignerInfo', + value: SignerInfo.toAmino(message) + }; + }, + fromProtoMsg(message: SignerInfoProtoMsg): SignerInfo { + return SignerInfo.decode(message.value); + }, + toProto(message: SignerInfo): Uint8Array { + return SignerInfo.encode(message).finish(); + }, + toProtoMsg(message: SignerInfo): SignerInfoProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.SignerInfo', + value: SignerInfo.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SignerInfo.typeUrl, SignerInfo); +GlobalDecoderRegistry.registerAminoProtoMapping(SignerInfo.aminoType, SignerInfo.typeUrl); +function createBaseModeInfo(): ModeInfo { + return { + single: undefined, + multi: undefined + }; +} +export const ModeInfo = { + typeUrl: '/cosmos.tx.v1beta1.ModeInfo', + aminoType: 'cosmos-sdk/ModeInfo', + is(o: any): o is ModeInfo { + return o && o.$typeUrl === ModeInfo.typeUrl; + }, + isAmino(o: any): o is ModeInfoAmino { + return o && o.$typeUrl === ModeInfo.typeUrl; + }, + encode(message: ModeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.single !== undefined) { + ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); + } + if (message.multi !== undefined) { + ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModeInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = ModeInfo_Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = ModeInfo_Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): ModeInfo { + const message = createBaseModeInfo(); + message.single = object.single !== undefined && object.single !== null ? ModeInfo_Single.fromPartial(object.single) : undefined; + message.multi = object.multi !== undefined && object.multi !== null ? ModeInfo_Multi.fromPartial(object.multi) : undefined; + return message; + }, + fromAmino(object: ModeInfoAmino): ModeInfo { + const message = createBaseModeInfo(); + if (object.single !== undefined && object.single !== null) { + message.single = ModeInfo_Single.fromAmino(object.single); + } + if (object.multi !== undefined && object.multi !== null) { + message.multi = ModeInfo_Multi.fromAmino(object.multi); + } + return message; + }, + toAmino(message: ModeInfo): ModeInfoAmino { + const obj: any = {}; + obj.single = message.single ? ModeInfo_Single.toAmino(message.single) : undefined; + obj.multi = message.multi ? ModeInfo_Multi.toAmino(message.multi) : undefined; + return obj; + }, + fromAminoMsg(object: ModeInfoAminoMsg): ModeInfo { + return ModeInfo.fromAmino(object.value); + }, + toAminoMsg(message: ModeInfo): ModeInfoAminoMsg { + return { + type: 'cosmos-sdk/ModeInfo', + value: ModeInfo.toAmino(message) + }; + }, + fromProtoMsg(message: ModeInfoProtoMsg): ModeInfo { + return ModeInfo.decode(message.value); + }, + toProto(message: ModeInfo): Uint8Array { + return ModeInfo.encode(message).finish(); + }, + toProtoMsg(message: ModeInfo): ModeInfoProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.ModeInfo', + value: ModeInfo.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(ModeInfo.typeUrl, ModeInfo); +GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo.aminoType, ModeInfo.typeUrl); +function createBaseModeInfo_Single(): ModeInfo_Single { + return { + mode: 0 + }; +} +export const ModeInfo_Single = { + typeUrl: '/cosmos.tx.v1beta1.Single', + aminoType: 'cosmos-sdk/Single', + is(o: any): o is ModeInfo_Single { + return o && (o.$typeUrl === ModeInfo_Single.typeUrl || isSet(o.mode)); + }, + isAmino(o: any): o is ModeInfo_SingleAmino { + return o && (o.$typeUrl === ModeInfo_Single.typeUrl || isSet(o.mode)); + }, + encode(message: ModeInfo_Single, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.mode !== 0) { + writer.uint32(8).int32(message.mode); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo_Single { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModeInfo_Single(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): ModeInfo_Single { + const message = createBaseModeInfo_Single(); + message.mode = object.mode ?? 0; + return message; + }, + fromAmino(object: ModeInfo_SingleAmino): ModeInfo_Single { + const message = createBaseModeInfo_Single(); + if (object.mode !== undefined && object.mode !== null) { + message.mode = object.mode; + } + return message; + }, + toAmino(message: ModeInfo_Single): ModeInfo_SingleAmino { + const obj: any = {}; + obj.mode = message.mode === 0 ? undefined : message.mode; + return obj; + }, + fromAminoMsg(object: ModeInfo_SingleAminoMsg): ModeInfo_Single { + return ModeInfo_Single.fromAmino(object.value); + }, + toAminoMsg(message: ModeInfo_Single): ModeInfo_SingleAminoMsg { + return { + type: 'cosmos-sdk/Single', + value: ModeInfo_Single.toAmino(message) + }; + }, + fromProtoMsg(message: ModeInfo_SingleProtoMsg): ModeInfo_Single { + return ModeInfo_Single.decode(message.value); + }, + toProto(message: ModeInfo_Single): Uint8Array { + return ModeInfo_Single.encode(message).finish(); + }, + toProtoMsg(message: ModeInfo_Single): ModeInfo_SingleProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.Single', + value: ModeInfo_Single.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(ModeInfo_Single.typeUrl, ModeInfo_Single); +GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Single.aminoType, ModeInfo_Single.typeUrl); +function createBaseModeInfo_Multi(): ModeInfo_Multi { + return { + bitarray: undefined, + modeInfos: [] + }; +} +export const ModeInfo_Multi = { + typeUrl: '/cosmos.tx.v1beta1.Multi', + aminoType: 'cosmos-sdk/Multi', + is(o: any): o is ModeInfo_Multi { + return o && (o.$typeUrl === ModeInfo_Multi.typeUrl || Array.isArray(o.modeInfos) && (!o.modeInfos.length || ModeInfo.is(o.modeInfos[0]))); + }, + isAmino(o: any): o is ModeInfo_MultiAmino { + return o && (o.$typeUrl === ModeInfo_Multi.typeUrl || Array.isArray(o.mode_infos) && (!o.mode_infos.length || ModeInfo.isAmino(o.mode_infos[0]))); + }, + encode(message: ModeInfo_Multi, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.bitarray !== undefined) { + CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.modeInfos) { + ModeInfo.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo_Multi { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModeInfo_Multi(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + message.modeInfos.push(ModeInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): ModeInfo_Multi { + const message = createBaseModeInfo_Multi(); + message.bitarray = object.bitarray !== undefined && object.bitarray !== null ? CompactBitArray.fromPartial(object.bitarray) : undefined; + message.modeInfos = object.modeInfos?.map(e => ModeInfo.fromPartial(e)) || []; + return message; + }, + fromAmino(object: ModeInfo_MultiAmino): ModeInfo_Multi { + const message = createBaseModeInfo_Multi(); + if (object.bitarray !== undefined && object.bitarray !== null) { + message.bitarray = CompactBitArray.fromAmino(object.bitarray); + } + message.modeInfos = object.mode_infos?.map(e => ModeInfo.fromAmino(e)) || []; + return message; + }, + toAmino(message: ModeInfo_Multi): ModeInfo_MultiAmino { + const obj: any = {}; + obj.bitarray = message.bitarray ? CompactBitArray.toAmino(message.bitarray) : undefined; + if (message.modeInfos) { + obj.mode_infos = message.modeInfos.map(e => e ? ModeInfo.toAmino(e) : undefined); + } else { + obj.mode_infos = message.modeInfos; + } + return obj; + }, + fromAminoMsg(object: ModeInfo_MultiAminoMsg): ModeInfo_Multi { + return ModeInfo_Multi.fromAmino(object.value); + }, + toAminoMsg(message: ModeInfo_Multi): ModeInfo_MultiAminoMsg { + return { + type: 'cosmos-sdk/Multi', + value: ModeInfo_Multi.toAmino(message) + }; + }, + fromProtoMsg(message: ModeInfo_MultiProtoMsg): ModeInfo_Multi { + return ModeInfo_Multi.decode(message.value); + }, + toProto(message: ModeInfo_Multi): Uint8Array { + return ModeInfo_Multi.encode(message).finish(); + }, + toProtoMsg(message: ModeInfo_Multi): ModeInfo_MultiProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.Multi', + value: ModeInfo_Multi.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(ModeInfo_Multi.typeUrl, ModeInfo_Multi); +GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Multi.aminoType, ModeInfo_Multi.typeUrl); +function createBaseFee(): Fee { + return { + amount: [], + gasLimit: BigInt(0), + payer: '', + granter: '' + }; +} +export const Fee = { + typeUrl: '/cosmos.tx.v1beta1.Fee', + aminoType: 'cosmos-sdk/Fee', + is(o: any): o is Fee { + return o && (o.$typeUrl === Fee.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])) && typeof o.gasLimit === 'bigint' && typeof o.payer === 'string' && typeof o.granter === 'string'); + }, + isAmino(o: any): o is FeeAmino { + return o && (o.$typeUrl === Fee.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])) && typeof o.gas_limit === 'bigint' && typeof o.payer === 'string' && typeof o.granter === 'string'); + }, + encode(message: Fee, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.amount) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.gasLimit !== BigInt(0)) { + writer.uint32(16).uint64(message.gasLimit); + } + if (message.payer !== '') { + writer.uint32(26).string(message.payer); + } + if (message.granter !== '') { + writer.uint32(34).string(message.granter); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): Fee { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFee(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.gasLimit = reader.uint64(); + break; + case 3: + message.payer = reader.string(); + break; + case 4: + message.granter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): Fee { + const message = createBaseFee(); + message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; + message.gasLimit = object.gasLimit !== undefined && object.gasLimit !== null ? BigInt(object.gasLimit.toString()) : BigInt(0); + message.payer = object.payer ?? ''; + message.granter = object.granter ?? ''; + return message; + }, + fromAmino(object: FeeAmino): Fee { + const message = createBaseFee(); + message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; + if (object.gas_limit !== undefined && object.gas_limit !== null) { + message.gasLimit = BigInt(object.gas_limit); + } + if (object.payer !== undefined && object.payer !== null) { + message.payer = object.payer; + } + if (object.granter !== undefined && object.granter !== null) { + message.granter = object.granter; + } + return message; + }, + toAmino(message: Fee): FeeAmino { + const obj: any = {}; + if (message.amount) { + obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.amount = message.amount; + } + obj.gas_limit = message.gasLimit !== BigInt(0) ? message.gasLimit.toString() : undefined; + obj.payer = message.payer === '' ? undefined : message.payer; + obj.granter = message.granter === '' ? undefined : message.granter; + return obj; + }, + fromAminoMsg(object: FeeAminoMsg): Fee { + return Fee.fromAmino(object.value); + }, + toAminoMsg(message: Fee): FeeAminoMsg { + return { + type: 'cosmos-sdk/Fee', + value: Fee.toAmino(message) + }; + }, + fromProtoMsg(message: FeeProtoMsg): Fee { + return Fee.decode(message.value); + }, + toProto(message: Fee): Uint8Array { + return Fee.encode(message).finish(); + }, + toProtoMsg(message: Fee): FeeProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.Fee', + value: Fee.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(Fee.typeUrl, Fee); +GlobalDecoderRegistry.registerAminoProtoMapping(Fee.aminoType, Fee.typeUrl); +function createBaseTip(): Tip { + return { + amount: [], + tipper: '' + }; +} +export const Tip = { + typeUrl: '/cosmos.tx.v1beta1.Tip', + aminoType: 'cosmos-sdk/Tip', + is(o: any): o is Tip { + return o && (o.$typeUrl === Tip.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])) && typeof o.tipper === 'string'); + }, + isAmino(o: any): o is TipAmino { + return o && (o.$typeUrl === Tip.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])) && typeof o.tipper === 'string'); + }, + encode(message: Tip, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.amount) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.tipper !== '') { + writer.uint32(18).string(message.tipper); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): Tip { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTip(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.tipper = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): Tip { + const message = createBaseTip(); + message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; + message.tipper = object.tipper ?? ''; + return message; + }, + fromAmino(object: TipAmino): Tip { + const message = createBaseTip(); + message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; + if (object.tipper !== undefined && object.tipper !== null) { + message.tipper = object.tipper; + } + return message; + }, + toAmino(message: Tip): TipAmino { + const obj: any = {}; + if (message.amount) { + obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.amount = message.amount; + } + obj.tipper = message.tipper === '' ? undefined : message.tipper; + return obj; + }, + fromAminoMsg(object: TipAminoMsg): Tip { + return Tip.fromAmino(object.value); + }, + toAminoMsg(message: Tip): TipAminoMsg { + return { + type: 'cosmos-sdk/Tip', + value: Tip.toAmino(message) + }; + }, + fromProtoMsg(message: TipProtoMsg): Tip { + return Tip.decode(message.value); + }, + toProto(message: Tip): Uint8Array { + return Tip.encode(message).finish(); + }, + toProtoMsg(message: Tip): TipProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.Tip', + value: Tip.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(Tip.typeUrl, Tip); +GlobalDecoderRegistry.registerAminoProtoMapping(Tip.aminoType, Tip.typeUrl); +function createBaseAuxSignerData(): AuxSignerData { + return { + address: '', + signDoc: undefined, + mode: 0, + sig: new Uint8Array() + }; +} +export const AuxSignerData = { + typeUrl: '/cosmos.tx.v1beta1.AuxSignerData', + aminoType: 'cosmos-sdk/AuxSignerData', + is(o: any): o is AuxSignerData { + return o && (o.$typeUrl === AuxSignerData.typeUrl || typeof o.address === 'string' && isSet(o.mode) && (o.sig instanceof Uint8Array || typeof o.sig === 'string')); + }, + isAmino(o: any): o is AuxSignerDataAmino { + return o && (o.$typeUrl === AuxSignerData.typeUrl || typeof o.address === 'string' && isSet(o.mode) && (o.sig instanceof Uint8Array || typeof o.sig === 'string')); + }, + encode(message: AuxSignerData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.address !== '') { + writer.uint32(10).string(message.address); + } + if (message.signDoc !== undefined) { + SignDocDirectAux.encode(message.signDoc, writer.uint32(18).fork()).ldelim(); + } + if (message.mode !== 0) { + writer.uint32(24).int32(message.mode); + } + if (message.sig.length !== 0) { + writer.uint32(34).bytes(message.sig); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): AuxSignerData { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuxSignerData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.signDoc = SignDocDirectAux.decode(reader, reader.uint32()); + break; + case 3: + message.mode = (reader.int32() as any); + break; + case 4: + message.sig = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): AuxSignerData { + const message = createBaseAuxSignerData(); + message.address = object.address ?? ''; + message.signDoc = object.signDoc !== undefined && object.signDoc !== null ? SignDocDirectAux.fromPartial(object.signDoc) : undefined; + message.mode = object.mode ?? 0; + message.sig = object.sig ?? new Uint8Array(); + return message; + }, + fromAmino(object: AuxSignerDataAmino): AuxSignerData { + const message = createBaseAuxSignerData(); + if (object.address !== undefined && object.address !== null) { + message.address = object.address; + } + if (object.sign_doc !== undefined && object.sign_doc !== null) { + message.signDoc = SignDocDirectAux.fromAmino(object.sign_doc); + } + if (object.mode !== undefined && object.mode !== null) { + message.mode = object.mode; + } + if (object.sig !== undefined && object.sig !== null) { + message.sig = bytesFromBase64(object.sig); + } + return message; + }, + toAmino(message: AuxSignerData): AuxSignerDataAmino { + const obj: any = {}; + obj.address = message.address === '' ? undefined : message.address; + obj.sign_doc = message.signDoc ? SignDocDirectAux.toAmino(message.signDoc) : undefined; + obj.mode = message.mode === 0 ? undefined : message.mode; + obj.sig = message.sig ? base64FromBytes(message.sig) : undefined; + return obj; + }, + fromAminoMsg(object: AuxSignerDataAminoMsg): AuxSignerData { + return AuxSignerData.fromAmino(object.value); + }, + toAminoMsg(message: AuxSignerData): AuxSignerDataAminoMsg { + return { + type: 'cosmos-sdk/AuxSignerData', + value: AuxSignerData.toAmino(message) + }; + }, + fromProtoMsg(message: AuxSignerDataProtoMsg): AuxSignerData { + return AuxSignerData.decode(message.value); + }, + toProto(message: AuxSignerData): Uint8Array { + return AuxSignerData.encode(message).finish(); + }, + toProtoMsg(message: AuxSignerData): AuxSignerDataProtoMsg { + return { + typeUrl: '/cosmos.tx.v1beta1.AuxSignerData', + value: AuxSignerData.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(AuxSignerData.typeUrl, AuxSignerData); +GlobalDecoderRegistry.registerAminoProtoMapping(AuxSignerData.aminoType, AuxSignerData.typeUrl); \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/upgrade/v1beta1/upgrade.ts b/libs/cosmos-types/cosmos/upgrade/v1beta1/upgrade.ts index 7fcda41a..016e973a 100644 --- a/libs/cosmos-types/cosmos/upgrade/v1beta1/upgrade.ts +++ b/libs/cosmos-types/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,8 +1,8 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Any, AnyAmino } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino } from '../../../google/protobuf/any'; +import { Timestamp } from '../../../google/protobuf/timestamp'; +import { DeepPartial,fromTimestamp, toTimestamp } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** Plan specifies information about a planned upgrade and when it should occur. */ export interface Plan { /** @@ -38,7 +38,7 @@ export interface Plan { upgradedClientState?: Any; } export interface PlanProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.Plan"; + typeUrl: '/cosmos.upgrade.v1beta1.Plan'; value: Uint8Array; } /** Plan specifies information about a planned upgrade and when it should occur. */ @@ -76,7 +76,7 @@ export interface PlanAmino { upgraded_client_state?: AnyAmino; } export interface PlanAminoMsg { - type: "cosmos-sdk/Plan"; + type: 'cosmos-sdk/Plan'; value: PlanAmino; } /** @@ -95,7 +95,7 @@ export interface SoftwareUpgradeProposal { plan: Plan; } export interface SoftwareUpgradeProposalProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal"; + typeUrl: '/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal'; value: Uint8Array; } /** @@ -114,7 +114,7 @@ export interface SoftwareUpgradeProposalAmino { plan: PlanAmino; } export interface SoftwareUpgradeProposalAminoMsg { - type: "cosmos-sdk/SoftwareUpgradeProposal"; + type: 'cosmos-sdk/SoftwareUpgradeProposal'; value: SoftwareUpgradeProposalAmino; } /** @@ -131,7 +131,7 @@ export interface CancelSoftwareUpgradeProposal { description: string; } export interface CancelSoftwareUpgradeProposalProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal"; + typeUrl: '/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal'; value: Uint8Array; } /** @@ -148,7 +148,7 @@ export interface CancelSoftwareUpgradeProposalAmino { description: string; } export interface CancelSoftwareUpgradeProposalAminoMsg { - type: "cosmos-sdk/CancelSoftwareUpgradeProposal"; + type: 'cosmos-sdk/CancelSoftwareUpgradeProposal'; value: CancelSoftwareUpgradeProposalAmino; } /** @@ -163,7 +163,7 @@ export interface ModuleVersion { version: bigint; } export interface ModuleVersionProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion"; + typeUrl: '/cosmos.upgrade.v1beta1.ModuleVersion'; value: Uint8Array; } /** @@ -178,29 +178,29 @@ export interface ModuleVersionAmino { version: string; } export interface ModuleVersionAminoMsg { - type: "cosmos-sdk/ModuleVersion"; + type: 'cosmos-sdk/ModuleVersion'; value: ModuleVersionAmino; } function createBasePlan(): Plan { return { - name: "", + name: '', time: new Date(), height: BigInt(0), - info: "", + info: '', upgradedClientState: undefined }; } export const Plan = { - typeUrl: "/cosmos.upgrade.v1beta1.Plan", - aminoType: "cosmos-sdk/Plan", + typeUrl: '/cosmos.upgrade.v1beta1.Plan', + aminoType: 'cosmos-sdk/Plan', is(o: any): o is Plan { - return o && (o.$typeUrl === Plan.typeUrl || typeof o.name === "string" && Timestamp.is(o.time) && typeof o.height === "bigint" && typeof o.info === "string"); + return o && (o.$typeUrl === Plan.typeUrl || typeof o.name === 'string' && Timestamp.is(o.time) && typeof o.height === 'bigint' && typeof o.info === 'string'); }, isAmino(o: any): o is PlanAmino { - return o && (o.$typeUrl === Plan.typeUrl || typeof o.name === "string" && Timestamp.isAmino(o.time) && typeof o.height === "bigint" && typeof o.info === "string"); + return o && (o.$typeUrl === Plan.typeUrl || typeof o.name === 'string' && Timestamp.isAmino(o.time) && typeof o.height === 'bigint' && typeof o.info === 'string'); }, encode(message: Plan, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } if (message.time !== undefined) { @@ -209,7 +209,7 @@ export const Plan = { if (message.height !== BigInt(0)) { writer.uint32(24).int64(message.height); } - if (message.info !== "") { + if (message.info !== '') { writer.uint32(34).string(message.info); } if (message.upgradedClientState !== undefined) { @@ -224,34 +224,34 @@ export const Plan = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.upgradedClientState = Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Plan { const message = createBasePlan(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.time = object.time ?? undefined; message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.info = object.info ?? ""; + message.info = object.info ?? ''; message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined; return message; }, @@ -276,10 +276,10 @@ export const Plan = { }, toAmino(message: Plan): PlanAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : new Date(); obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; - obj.info = message.info === "" ? undefined : message.info; + obj.info = message.info === '' ? undefined : message.info; obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState) : undefined; return obj; }, @@ -288,7 +288,7 @@ export const Plan = { }, toAminoMsg(message: Plan): PlanAminoMsg { return { - type: "cosmos-sdk/Plan", + type: 'cosmos-sdk/Plan', value: Plan.toAmino(message) }; }, @@ -300,7 +300,7 @@ export const Plan = { }, toProtoMsg(message: Plan): PlanProtoMsg { return { - typeUrl: "/cosmos.upgrade.v1beta1.Plan", + typeUrl: '/cosmos.upgrade.v1beta1.Plan', value: Plan.encode(message).finish() }; } @@ -309,25 +309,25 @@ GlobalDecoderRegistry.register(Plan.typeUrl, Plan); GlobalDecoderRegistry.registerAminoProtoMapping(Plan.aminoType, Plan.typeUrl); function createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal { return { - title: "", - description: "", + title: '', + description: '', plan: Plan.fromPartial({}) }; } export const SoftwareUpgradeProposal = { - typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", - aminoType: "cosmos-sdk/SoftwareUpgradeProposal", + typeUrl: '/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', + aminoType: 'cosmos-sdk/SoftwareUpgradeProposal', is(o: any): o is SoftwareUpgradeProposal { - return o && (o.$typeUrl === SoftwareUpgradeProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && Plan.is(o.plan)); + return o && (o.$typeUrl === SoftwareUpgradeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Plan.is(o.plan)); }, isAmino(o: any): o is SoftwareUpgradeProposalAmino { - return o && (o.$typeUrl === SoftwareUpgradeProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && Plan.isAmino(o.plan)); + return o && (o.$typeUrl === SoftwareUpgradeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Plan.isAmino(o.plan)); }, encode(message: SoftwareUpgradeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { + if (message.title !== '') { writer.uint32(10).string(message.title); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } if (message.plan !== undefined) { @@ -342,26 +342,26 @@ export const SoftwareUpgradeProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.plan = Plan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): SoftwareUpgradeProposal { const message = createBaseSoftwareUpgradeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; + message.title = object.title ?? ''; + message.description = object.description ?? ''; message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; return message; }, @@ -380,8 +380,8 @@ export const SoftwareUpgradeProposal = { }, toAmino(message: SoftwareUpgradeProposal): SoftwareUpgradeProposalAmino { const obj: any = {}; - obj.title = message.title === "" ? undefined : message.title; - obj.description = message.description === "" ? undefined : message.description; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; obj.plan = message.plan ? Plan.toAmino(message.plan) : Plan.toAmino(Plan.fromPartial({})); return obj; }, @@ -390,7 +390,7 @@ export const SoftwareUpgradeProposal = { }, toAminoMsg(message: SoftwareUpgradeProposal): SoftwareUpgradeProposalAminoMsg { return { - type: "cosmos-sdk/SoftwareUpgradeProposal", + type: 'cosmos-sdk/SoftwareUpgradeProposal', value: SoftwareUpgradeProposal.toAmino(message) }; }, @@ -402,7 +402,7 @@ export const SoftwareUpgradeProposal = { }, toProtoMsg(message: SoftwareUpgradeProposal): SoftwareUpgradeProposalProtoMsg { return { - typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", + typeUrl: '/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', value: SoftwareUpgradeProposal.encode(message).finish() }; } @@ -411,24 +411,24 @@ GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeP GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); function createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal { return { - title: "", - description: "" + title: '', + description: '' }; } export const CancelSoftwareUpgradeProposal = { - typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", - aminoType: "cosmos-sdk/CancelSoftwareUpgradeProposal", + typeUrl: '/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', + aminoType: 'cosmos-sdk/CancelSoftwareUpgradeProposal', is(o: any): o is CancelSoftwareUpgradeProposal { - return o && (o.$typeUrl === CancelSoftwareUpgradeProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string"); + return o && (o.$typeUrl === CancelSoftwareUpgradeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string'); }, isAmino(o: any): o is CancelSoftwareUpgradeProposalAmino { - return o && (o.$typeUrl === CancelSoftwareUpgradeProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string"); + return o && (o.$typeUrl === CancelSoftwareUpgradeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string'); }, encode(message: CancelSoftwareUpgradeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { + if (message.title !== '') { writer.uint32(10).string(message.title); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } return writer; @@ -440,23 +440,23 @@ export const CancelSoftwareUpgradeProposal = { while (reader.pos < end) { const 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; + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): CancelSoftwareUpgradeProposal { const message = createBaseCancelSoftwareUpgradeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; + message.title = object.title ?? ''; + message.description = object.description ?? ''; return message; }, fromAmino(object: CancelSoftwareUpgradeProposalAmino): CancelSoftwareUpgradeProposal { @@ -471,8 +471,8 @@ export const CancelSoftwareUpgradeProposal = { }, toAmino(message: CancelSoftwareUpgradeProposal): CancelSoftwareUpgradeProposalAmino { const obj: any = {}; - obj.title = message.title === "" ? undefined : message.title; - obj.description = message.description === "" ? undefined : message.description; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; return obj; }, fromAminoMsg(object: CancelSoftwareUpgradeProposalAminoMsg): CancelSoftwareUpgradeProposal { @@ -480,7 +480,7 @@ export const CancelSoftwareUpgradeProposal = { }, toAminoMsg(message: CancelSoftwareUpgradeProposal): CancelSoftwareUpgradeProposalAminoMsg { return { - type: "cosmos-sdk/CancelSoftwareUpgradeProposal", + type: 'cosmos-sdk/CancelSoftwareUpgradeProposal', value: CancelSoftwareUpgradeProposal.toAmino(message) }; }, @@ -492,7 +492,7 @@ export const CancelSoftwareUpgradeProposal = { }, toProtoMsg(message: CancelSoftwareUpgradeProposal): CancelSoftwareUpgradeProposalProtoMsg { return { - typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", + typeUrl: '/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', value: CancelSoftwareUpgradeProposal.encode(message).finish() }; } @@ -501,21 +501,21 @@ GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoft GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); function createBaseModuleVersion(): ModuleVersion { return { - name: "", + name: '', version: BigInt(0) }; } export const ModuleVersion = { - typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", - aminoType: "cosmos-sdk/ModuleVersion", + typeUrl: '/cosmos.upgrade.v1beta1.ModuleVersion', + aminoType: 'cosmos-sdk/ModuleVersion', is(o: any): o is ModuleVersion { - return o && (o.$typeUrl === ModuleVersion.typeUrl || typeof o.name === "string" && typeof o.version === "bigint"); + return o && (o.$typeUrl === ModuleVersion.typeUrl || typeof o.name === 'string' && typeof o.version === 'bigint'); }, isAmino(o: any): o is ModuleVersionAmino { - return o && (o.$typeUrl === ModuleVersion.typeUrl || typeof o.name === "string" && typeof o.version === "bigint"); + return o && (o.$typeUrl === ModuleVersion.typeUrl || typeof o.name === 'string' && typeof o.version === 'bigint'); }, encode(message: ModuleVersion, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } if (message.version !== BigInt(0)) { @@ -530,22 +530,22 @@ export const ModuleVersion = { while (reader.pos < end) { const 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; + case 1: + message.name = reader.string(); + break; + case 2: + message.version = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ModuleVersion { const message = createBaseModuleVersion(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); return message; }, @@ -561,7 +561,7 @@ export const ModuleVersion = { }, toAmino(message: ModuleVersion): ModuleVersionAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; obj.version = message.version !== BigInt(0) ? message.version.toString() : undefined; return obj; }, @@ -570,7 +570,7 @@ export const ModuleVersion = { }, toAminoMsg(message: ModuleVersion): ModuleVersionAminoMsg { return { - type: "cosmos-sdk/ModuleVersion", + type: 'cosmos-sdk/ModuleVersion', value: ModuleVersion.toAmino(message) }; }, @@ -582,7 +582,7 @@ export const ModuleVersion = { }, toProtoMsg(message: ModuleVersion): ModuleVersionProtoMsg { return { - typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", + typeUrl: '/cosmos.upgrade.v1beta1.ModuleVersion', value: ModuleVersion.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.amino.ts b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.amino.ts index 3085e0b1..c0ac8fba 100644 --- a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.amino.ts +++ b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.amino.ts @@ -1,17 +1,17 @@ -import { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount } from "./tx"; +import { MsgCreatePeriodicVestingAccount,MsgCreatePermanentLockedAccount, MsgCreateVestingAccount } from './tx'; export const AminoConverter = { - "/cosmos.vesting.v1beta1.MsgCreateVestingAccount": { - aminoType: "cosmos-sdk/MsgCreateVestingAccount", + '/cosmos.vesting.v1beta1.MsgCreateVestingAccount': { + aminoType: 'cosmos-sdk/MsgCreateVestingAccount', toAmino: MsgCreateVestingAccount.toAmino, fromAmino: MsgCreateVestingAccount.fromAmino }, - "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount": { - aminoType: "cosmos-sdk/MsgCreatePermLockedAccount", + '/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount': { + aminoType: 'cosmos-sdk/MsgCreatePermLockedAccount', toAmino: MsgCreatePermanentLockedAccount.toAmino, fromAmino: MsgCreatePermanentLockedAccount.fromAmino }, - "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount": { - aminoType: "cosmos-sdk/MsgCreatePeriodVestAccount", + '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount': { + aminoType: 'cosmos-sdk/MsgCreatePeriodVestAccount', toAmino: MsgCreatePeriodicVestingAccount.toAmino, fromAmino: MsgCreatePeriodicVestingAccount.fromAmino } diff --git a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.registry.ts b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.registry.ts index c5259cf2..ce406d3c 100644 --- a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.registry.ts +++ b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], ["/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", MsgCreatePermanentLockedAccount], ["/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", MsgCreatePeriodicVestingAccount]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgCreatePeriodicVestingAccount,MsgCreatePermanentLockedAccount, MsgCreateVestingAccount } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmos.vesting.v1beta1.MsgCreateVestingAccount', MsgCreateVestingAccount], ['/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount', MsgCreatePermanentLockedAccount], ['/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount', MsgCreatePeriodicVestingAccount]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.rpc.msg.ts b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.rpc.msg.ts index 7cd04c87..0f16609e 100644 --- a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.rpc.msg.ts @@ -1,26 +1,26 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgCreatePeriodicVestingAccount,MsgCreatePermanentLockedAccount, MsgCreateVestingAccount } from './tx'; /** Msg defines the bank Msg service. */ export interface Msg { /** * CreateVestingAccount defines a method that enables creating a vesting * account. */ - createVestingAccount(signerAddress: string, message: MsgCreateVestingAccount, fee: number | StdFee | "auto", memo?: string): Promise; + createVestingAccount(signerAddress: string, message: MsgCreateVestingAccount, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CreatePermanentLockedAccount defines a method that enables creating a permanent * locked account. * * Since: cosmos-sdk 0.46 */ - createPermanentLockedAccount(signerAddress: string, message: MsgCreatePermanentLockedAccount, fee: number | StdFee | "auto", memo?: string): Promise; + createPermanentLockedAccount(signerAddress: string, message: MsgCreatePermanentLockedAccount, fee: number | StdFee | 'auto', memo?: string): Promise; /** * CreatePeriodicVestingAccount defines a method that enables creating a * periodic vesting account. * * Since: cosmos-sdk 0.46 */ - createPeriodicVestingAccount(signerAddress: string, message: MsgCreatePeriodicVestingAccount, fee: number | StdFee | "auto", memo?: string): Promise; + createPeriodicVestingAccount(signerAddress: string, message: MsgCreatePeriodicVestingAccount, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -29,7 +29,7 @@ export class MsgClientImpl implements Msg { } /* CreateVestingAccount defines a method that enables creating a vesting account. */ - createVestingAccount = async (signerAddress: string, message: MsgCreateVestingAccount, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createVestingAccount = async (signerAddress: string, message: MsgCreateVestingAccount, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreateVestingAccount.typeUrl, value: message @@ -40,7 +40,7 @@ export class MsgClientImpl implements Msg { locked account. Since: cosmos-sdk 0.46 */ - createPermanentLockedAccount = async (signerAddress: string, message: MsgCreatePermanentLockedAccount, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createPermanentLockedAccount = async (signerAddress: string, message: MsgCreatePermanentLockedAccount, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreatePermanentLockedAccount.typeUrl, value: message @@ -51,7 +51,7 @@ export class MsgClientImpl implements Msg { periodic vesting account. Since: cosmos-sdk 0.46 */ - createPeriodicVestingAccount = async (signerAddress: string, message: MsgCreatePeriodicVestingAccount, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createPeriodicVestingAccount = async (signerAddress: string, message: MsgCreatePeriodicVestingAccount, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreatePeriodicVestingAccount.typeUrl, value: message diff --git a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.ts b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.ts index e7f9f031..58b0d81e 100644 --- a/libs/cosmos-types/cosmos/vesting/v1beta1/tx.ts +++ b/libs/cosmos-types/cosmos/vesting/v1beta1/tx.ts @@ -1,8 +1,8 @@ -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { Period, PeriodAmino } from "./vesting"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; +import { Period, PeriodAmino } from './vesting'; /** * MsgCreateVestingAccount defines a message that enables creating a vesting * account. @@ -16,7 +16,7 @@ export interface MsgCreateVestingAccount { delayed: boolean; } export interface MsgCreateVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount"; + typeUrl: '/cosmos.vesting.v1beta1.MsgCreateVestingAccount'; value: Uint8Array; } /** @@ -32,19 +32,19 @@ export interface MsgCreateVestingAccountAmino { delayed: boolean; } export interface MsgCreateVestingAccountAminoMsg { - type: "cosmos-sdk/MsgCreateVestingAccount"; + type: 'cosmos-sdk/MsgCreateVestingAccount'; value: MsgCreateVestingAccountAmino; } /** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ export interface MsgCreateVestingAccountResponse {} export interface MsgCreateVestingAccountResponseProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse"; + typeUrl: '/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse'; value: Uint8Array; } /** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ export interface MsgCreateVestingAccountResponseAmino {} export interface MsgCreateVestingAccountResponseAminoMsg { - type: "cosmos-sdk/MsgCreateVestingAccountResponse"; + type: 'cosmos-sdk/MsgCreateVestingAccountResponse'; value: MsgCreateVestingAccountResponseAmino; } /** @@ -59,7 +59,7 @@ export interface MsgCreatePermanentLockedAccount { amount: Coin[]; } export interface MsgCreatePermanentLockedAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount"; + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount'; value: Uint8Array; } /** @@ -74,7 +74,7 @@ export interface MsgCreatePermanentLockedAccountAmino { amount: CoinAmino[]; } export interface MsgCreatePermanentLockedAccountAminoMsg { - type: "cosmos-sdk/MsgCreatePermLockedAccount"; + type: 'cosmos-sdk/MsgCreatePermLockedAccount'; value: MsgCreatePermanentLockedAccountAmino; } /** @@ -84,7 +84,7 @@ export interface MsgCreatePermanentLockedAccountAminoMsg { */ export interface MsgCreatePermanentLockedAccountResponse {} export interface MsgCreatePermanentLockedAccountResponseProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse"; + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse'; value: Uint8Array; } /** @@ -94,7 +94,7 @@ export interface MsgCreatePermanentLockedAccountResponseProtoMsg { */ export interface MsgCreatePermanentLockedAccountResponseAmino {} export interface MsgCreatePermanentLockedAccountResponseAminoMsg { - type: "cosmos-sdk/MsgCreatePermanentLockedAccountResponse"; + type: 'cosmos-sdk/MsgCreatePermanentLockedAccountResponse'; value: MsgCreatePermanentLockedAccountResponseAmino; } /** @@ -111,7 +111,7 @@ export interface MsgCreatePeriodicVestingAccount { vestingPeriods: Period[]; } export interface MsgCreatePeriodicVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount"; + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount'; value: Uint8Array; } /** @@ -128,7 +128,7 @@ export interface MsgCreatePeriodicVestingAccountAmino { vesting_periods: PeriodAmino[]; } export interface MsgCreatePeriodicVestingAccountAminoMsg { - type: "cosmos-sdk/MsgCreatePeriodVestAccount"; + type: 'cosmos-sdk/MsgCreatePeriodVestAccount'; value: MsgCreatePeriodicVestingAccountAmino; } /** @@ -139,7 +139,7 @@ export interface MsgCreatePeriodicVestingAccountAminoMsg { */ export interface MsgCreatePeriodicVestingAccountResponse {} export interface MsgCreatePeriodicVestingAccountResponseProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse"; + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse'; value: Uint8Array; } /** @@ -150,32 +150,32 @@ export interface MsgCreatePeriodicVestingAccountResponseProtoMsg { */ export interface MsgCreatePeriodicVestingAccountResponseAmino {} export interface MsgCreatePeriodicVestingAccountResponseAminoMsg { - type: "cosmos-sdk/MsgCreatePeriodicVestingAccountResponse"; + type: 'cosmos-sdk/MsgCreatePeriodicVestingAccountResponse'; value: MsgCreatePeriodicVestingAccountResponseAmino; } function createBaseMsgCreateVestingAccount(): MsgCreateVestingAccount { return { - fromAddress: "", - toAddress: "", + fromAddress: '', + toAddress: '', amount: [], endTime: BigInt(0), delayed: false }; } export const MsgCreateVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - aminoType: "cosmos-sdk/MsgCreateVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreateVestingAccount', + aminoType: 'cosmos-sdk/MsgCreateVestingAccount', is(o: any): o is MsgCreateVestingAccount { - return o && (o.$typeUrl === MsgCreateVestingAccount.typeUrl || typeof o.fromAddress === "string" && typeof o.toAddress === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])) && typeof o.endTime === "bigint" && typeof o.delayed === "boolean"); + return o && (o.$typeUrl === MsgCreateVestingAccount.typeUrl || typeof o.fromAddress === 'string' && typeof o.toAddress === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])) && typeof o.endTime === 'bigint' && typeof o.delayed === 'boolean'); }, isAmino(o: any): o is MsgCreateVestingAccountAmino { - return o && (o.$typeUrl === MsgCreateVestingAccount.typeUrl || typeof o.from_address === "string" && typeof o.to_address === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])) && typeof o.end_time === "bigint" && typeof o.delayed === "boolean"); + return o && (o.$typeUrl === MsgCreateVestingAccount.typeUrl || typeof o.from_address === 'string' && typeof o.to_address === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])) && typeof o.end_time === 'bigint' && typeof o.delayed === 'boolean'); }, encode(message: MsgCreateVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { + if (message.fromAddress !== '') { writer.uint32(10).string(message.fromAddress); } - if (message.toAddress !== "") { + if (message.toAddress !== '') { writer.uint32(18).string(message.toAddress); } for (const v of message.amount) { @@ -196,32 +196,32 @@ export const MsgCreateVestingAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.endTime = reader.int64(); - break; - case 5: - message.delayed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + case 4: + message.endTime = reader.int64(); + break; + case 5: + message.delayed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCreateVestingAccount { const message = createBaseMsgCreateVestingAccount(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; + message.fromAddress = object.fromAddress ?? ''; + message.toAddress = object.toAddress ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; message.endTime = object.endTime !== undefined && object.endTime !== null ? BigInt(object.endTime.toString()) : BigInt(0); message.delayed = object.delayed ?? false; @@ -246,8 +246,8 @@ export const MsgCreateVestingAccount = { }, toAmino(message: MsgCreateVestingAccount): MsgCreateVestingAccountAmino { const obj: any = {}; - obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; - obj.to_address = message.toAddress === "" ? undefined : message.toAddress; + obj.from_address = message.fromAddress === '' ? undefined : message.fromAddress; + obj.to_address = message.toAddress === '' ? undefined : message.toAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -262,7 +262,7 @@ export const MsgCreateVestingAccount = { }, toAminoMsg(message: MsgCreateVestingAccount): MsgCreateVestingAccountAminoMsg { return { - type: "cosmos-sdk/MsgCreateVestingAccount", + type: 'cosmos-sdk/MsgCreateVestingAccount', value: MsgCreateVestingAccount.toAmino(message) }; }, @@ -274,7 +274,7 @@ export const MsgCreateVestingAccount = { }, toProtoMsg(message: MsgCreateVestingAccount): MsgCreateVestingAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreateVestingAccount', value: MsgCreateVestingAccount.encode(message).finish() }; } @@ -285,8 +285,8 @@ function createBaseMsgCreateVestingAccountResponse(): MsgCreateVestingAccountRes return {}; } export const MsgCreateVestingAccountResponse = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", - aminoType: "cosmos-sdk/MsgCreateVestingAccountResponse", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse', + aminoType: 'cosmos-sdk/MsgCreateVestingAccountResponse', is(o: any): o is MsgCreateVestingAccountResponse { return o && o.$typeUrl === MsgCreateVestingAccountResponse.typeUrl; }, @@ -303,9 +303,9 @@ export const MsgCreateVestingAccountResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -327,7 +327,7 @@ export const MsgCreateVestingAccountResponse = { }, toAminoMsg(message: MsgCreateVestingAccountResponse): MsgCreateVestingAccountResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreateVestingAccountResponse", + type: 'cosmos-sdk/MsgCreateVestingAccountResponse', value: MsgCreateVestingAccountResponse.toAmino(message) }; }, @@ -339,7 +339,7 @@ export const MsgCreateVestingAccountResponse = { }, toProtoMsg(message: MsgCreateVestingAccountResponse): MsgCreateVestingAccountResponseProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse', value: MsgCreateVestingAccountResponse.encode(message).finish() }; } @@ -348,25 +348,25 @@ GlobalDecoderRegistry.register(MsgCreateVestingAccountResponse.typeUrl, MsgCreat GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccountResponse.aminoType, MsgCreateVestingAccountResponse.typeUrl); function createBaseMsgCreatePermanentLockedAccount(): MsgCreatePermanentLockedAccount { return { - fromAddress: "", - toAddress: "", + fromAddress: '', + toAddress: '', amount: [] }; } export const MsgCreatePermanentLockedAccount = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - aminoType: "cosmos-sdk/MsgCreatePermLockedAccount", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount', + aminoType: 'cosmos-sdk/MsgCreatePermLockedAccount', is(o: any): o is MsgCreatePermanentLockedAccount { - return o && (o.$typeUrl === MsgCreatePermanentLockedAccount.typeUrl || typeof o.fromAddress === "string" && typeof o.toAddress === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === MsgCreatePermanentLockedAccount.typeUrl || typeof o.fromAddress === 'string' && typeof o.toAddress === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is MsgCreatePermanentLockedAccountAmino { - return o && (o.$typeUrl === MsgCreatePermanentLockedAccount.typeUrl || typeof o.from_address === "string" && typeof o.to_address === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === MsgCreatePermanentLockedAccount.typeUrl || typeof o.from_address === 'string' && typeof o.to_address === 'string' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: MsgCreatePermanentLockedAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { + if (message.fromAddress !== '') { writer.uint32(10).string(message.fromAddress); } - if (message.toAddress !== "") { + if (message.toAddress !== '') { writer.uint32(18).string(message.toAddress); } for (const v of message.amount) { @@ -381,26 +381,26 @@ export const MsgCreatePermanentLockedAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCreatePermanentLockedAccount { const message = createBaseMsgCreatePermanentLockedAccount(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; + message.fromAddress = object.fromAddress ?? ''; + message.toAddress = object.toAddress ?? ''; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, @@ -417,8 +417,8 @@ export const MsgCreatePermanentLockedAccount = { }, toAmino(message: MsgCreatePermanentLockedAccount): MsgCreatePermanentLockedAccountAmino { const obj: any = {}; - obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; - obj.to_address = message.toAddress === "" ? undefined : message.toAddress; + obj.from_address = message.fromAddress === '' ? undefined : message.fromAddress; + obj.to_address = message.toAddress === '' ? undefined : message.toAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { @@ -431,7 +431,7 @@ export const MsgCreatePermanentLockedAccount = { }, toAminoMsg(message: MsgCreatePermanentLockedAccount): MsgCreatePermanentLockedAccountAminoMsg { return { - type: "cosmos-sdk/MsgCreatePermLockedAccount", + type: 'cosmos-sdk/MsgCreatePermLockedAccount', value: MsgCreatePermanentLockedAccount.toAmino(message) }; }, @@ -443,7 +443,7 @@ export const MsgCreatePermanentLockedAccount = { }, toProtoMsg(message: MsgCreatePermanentLockedAccount): MsgCreatePermanentLockedAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount', value: MsgCreatePermanentLockedAccount.encode(message).finish() }; } @@ -454,8 +454,8 @@ function createBaseMsgCreatePermanentLockedAccountResponse(): MsgCreatePermanent return {}; } export const MsgCreatePermanentLockedAccountResponse = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", - aminoType: "cosmos-sdk/MsgCreatePermanentLockedAccountResponse", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse', + aminoType: 'cosmos-sdk/MsgCreatePermanentLockedAccountResponse', is(o: any): o is MsgCreatePermanentLockedAccountResponse { return o && o.$typeUrl === MsgCreatePermanentLockedAccountResponse.typeUrl; }, @@ -472,9 +472,9 @@ export const MsgCreatePermanentLockedAccountResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -496,7 +496,7 @@ export const MsgCreatePermanentLockedAccountResponse = { }, toAminoMsg(message: MsgCreatePermanentLockedAccountResponse): MsgCreatePermanentLockedAccountResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreatePermanentLockedAccountResponse", + type: 'cosmos-sdk/MsgCreatePermanentLockedAccountResponse', value: MsgCreatePermanentLockedAccountResponse.toAmino(message) }; }, @@ -508,7 +508,7 @@ export const MsgCreatePermanentLockedAccountResponse = { }, toProtoMsg(message: MsgCreatePermanentLockedAccountResponse): MsgCreatePermanentLockedAccountResponseProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse', value: MsgCreatePermanentLockedAccountResponse.encode(message).finish() }; } @@ -517,26 +517,26 @@ GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccountResponse.typeUrl, GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccountResponse.aminoType, MsgCreatePermanentLockedAccountResponse.typeUrl); function createBaseMsgCreatePeriodicVestingAccount(): MsgCreatePeriodicVestingAccount { return { - fromAddress: "", - toAddress: "", + fromAddress: '', + toAddress: '', startTime: BigInt(0), vestingPeriods: [] }; } export const MsgCreatePeriodicVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - aminoType: "cosmos-sdk/MsgCreatePeriodVestAccount", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount', + aminoType: 'cosmos-sdk/MsgCreatePeriodVestAccount', is(o: any): o is MsgCreatePeriodicVestingAccount { - return o && (o.$typeUrl === MsgCreatePeriodicVestingAccount.typeUrl || typeof o.fromAddress === "string" && typeof o.toAddress === "string" && typeof o.startTime === "bigint" && Array.isArray(o.vestingPeriods) && (!o.vestingPeriods.length || Period.is(o.vestingPeriods[0]))); + return o && (o.$typeUrl === MsgCreatePeriodicVestingAccount.typeUrl || typeof o.fromAddress === 'string' && typeof o.toAddress === 'string' && typeof o.startTime === 'bigint' && Array.isArray(o.vestingPeriods) && (!o.vestingPeriods.length || Period.is(o.vestingPeriods[0]))); }, isAmino(o: any): o is MsgCreatePeriodicVestingAccountAmino { - return o && (o.$typeUrl === MsgCreatePeriodicVestingAccount.typeUrl || typeof o.from_address === "string" && typeof o.to_address === "string" && typeof o.start_time === "bigint" && Array.isArray(o.vesting_periods) && (!o.vesting_periods.length || Period.isAmino(o.vesting_periods[0]))); + return o && (o.$typeUrl === MsgCreatePeriodicVestingAccount.typeUrl || typeof o.from_address === 'string' && typeof o.to_address === 'string' && typeof o.start_time === 'bigint' && Array.isArray(o.vesting_periods) && (!o.vesting_periods.length || Period.isAmino(o.vesting_periods[0]))); }, encode(message: MsgCreatePeriodicVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { + if (message.fromAddress !== '') { writer.uint32(10).string(message.fromAddress); } - if (message.toAddress !== "") { + if (message.toAddress !== '') { writer.uint32(18).string(message.toAddress); } if (message.startTime !== BigInt(0)) { @@ -554,29 +554,29 @@ export const MsgCreatePeriodicVestingAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.startTime = reader.int64(); - break; - case 4: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + message.startTime = reader.int64(); + break; + case 4: + message.vestingPeriods.push(Period.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgCreatePeriodicVestingAccount { const message = createBaseMsgCreatePeriodicVestingAccount(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; + message.fromAddress = object.fromAddress ?? ''; + message.toAddress = object.toAddress ?? ''; message.startTime = object.startTime !== undefined && object.startTime !== null ? BigInt(object.startTime.toString()) : BigInt(0); message.vestingPeriods = object.vestingPeriods?.map(e => Period.fromPartial(e)) || []; return message; @@ -597,8 +597,8 @@ export const MsgCreatePeriodicVestingAccount = { }, toAmino(message: MsgCreatePeriodicVestingAccount): MsgCreatePeriodicVestingAccountAmino { const obj: any = {}; - obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; - obj.to_address = message.toAddress === "" ? undefined : message.toAddress; + obj.from_address = message.fromAddress === '' ? undefined : message.fromAddress; + obj.to_address = message.toAddress === '' ? undefined : message.toAddress; obj.start_time = message.startTime !== BigInt(0) ? message.startTime.toString() : undefined; if (message.vestingPeriods) { obj.vesting_periods = message.vestingPeriods.map(e => e ? Period.toAmino(e) : undefined); @@ -612,7 +612,7 @@ export const MsgCreatePeriodicVestingAccount = { }, toAminoMsg(message: MsgCreatePeriodicVestingAccount): MsgCreatePeriodicVestingAccountAminoMsg { return { - type: "cosmos-sdk/MsgCreatePeriodVestAccount", + type: 'cosmos-sdk/MsgCreatePeriodVestAccount', value: MsgCreatePeriodicVestingAccount.toAmino(message) }; }, @@ -624,7 +624,7 @@ export const MsgCreatePeriodicVestingAccount = { }, toProtoMsg(message: MsgCreatePeriodicVestingAccount): MsgCreatePeriodicVestingAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount', value: MsgCreatePeriodicVestingAccount.encode(message).finish() }; } @@ -635,8 +635,8 @@ function createBaseMsgCreatePeriodicVestingAccountResponse(): MsgCreatePeriodicV return {}; } export const MsgCreatePeriodicVestingAccountResponse = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", - aminoType: "cosmos-sdk/MsgCreatePeriodicVestingAccountResponse", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse', + aminoType: 'cosmos-sdk/MsgCreatePeriodicVestingAccountResponse', is(o: any): o is MsgCreatePeriodicVestingAccountResponse { return o && o.$typeUrl === MsgCreatePeriodicVestingAccountResponse.typeUrl; }, @@ -653,9 +653,9 @@ export const MsgCreatePeriodicVestingAccountResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -677,7 +677,7 @@ export const MsgCreatePeriodicVestingAccountResponse = { }, toAminoMsg(message: MsgCreatePeriodicVestingAccountResponse): MsgCreatePeriodicVestingAccountResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreatePeriodicVestingAccountResponse", + type: 'cosmos-sdk/MsgCreatePeriodicVestingAccountResponse', value: MsgCreatePeriodicVestingAccountResponse.toAmino(message) }; }, @@ -689,7 +689,7 @@ export const MsgCreatePeriodicVestingAccountResponse = { }, toProtoMsg(message: MsgCreatePeriodicVestingAccountResponse): MsgCreatePeriodicVestingAccountResponseProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", + typeUrl: '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse', value: MsgCreatePeriodicVestingAccountResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos/vesting/v1beta1/vesting.ts b/libs/cosmos-types/cosmos/vesting/v1beta1/vesting.ts index 289c9ce3..e03bd55e 100644 --- a/libs/cosmos-types/cosmos/vesting/v1beta1/vesting.ts +++ b/libs/cosmos-types/cosmos/vesting/v1beta1/vesting.ts @@ -1,8 +1,8 @@ -import { BaseAccount, BaseAccountAmino } from "../../auth/v1beta1/auth"; -import { Coin, CoinAmino } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { BaseAccount, BaseAccountAmino } from '../../auth/v1beta1/auth'; +import { Coin, CoinAmino } from '../../base/v1beta1/coin'; /** * BaseVestingAccount implements the VestingAccount interface. It contains all * the necessary fields needed for any vesting account implementation. @@ -16,7 +16,7 @@ export interface BaseVestingAccount { endTime: bigint; } export interface BaseVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount"; + typeUrl: '/cosmos.vesting.v1beta1.BaseVestingAccount'; value: Uint8Array; } /** @@ -32,7 +32,7 @@ export interface BaseVestingAccountAmino { end_time: string; } export interface BaseVestingAccountAminoMsg { - type: "cosmos-sdk/BaseVestingAccount"; + type: 'cosmos-sdk/BaseVestingAccount'; value: BaseVestingAccountAmino; } /** @@ -45,7 +45,7 @@ export interface ContinuousVestingAccount { startTime: bigint; } export interface ContinuousVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount"; + typeUrl: '/cosmos.vesting.v1beta1.ContinuousVestingAccount'; value: Uint8Array; } /** @@ -58,7 +58,7 @@ export interface ContinuousVestingAccountAmino { start_time: string; } export interface ContinuousVestingAccountAminoMsg { - type: "cosmos-sdk/ContinuousVestingAccount"; + type: 'cosmos-sdk/ContinuousVestingAccount'; value: ContinuousVestingAccountAmino; } /** @@ -70,7 +70,7 @@ export interface DelayedVestingAccount { baseVestingAccount?: BaseVestingAccount; } export interface DelayedVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount"; + typeUrl: '/cosmos.vesting.v1beta1.DelayedVestingAccount'; value: Uint8Array; } /** @@ -82,7 +82,7 @@ export interface DelayedVestingAccountAmino { base_vesting_account?: BaseVestingAccountAmino; } export interface DelayedVestingAccountAminoMsg { - type: "cosmos-sdk/DelayedVestingAccount"; + type: 'cosmos-sdk/DelayedVestingAccount'; value: DelayedVestingAccountAmino; } /** Period defines a length of time and amount of coins that will vest. */ @@ -92,7 +92,7 @@ export interface Period { amount: Coin[]; } export interface PeriodProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.Period"; + typeUrl: '/cosmos.vesting.v1beta1.Period'; value: Uint8Array; } /** Period defines a length of time and amount of coins that will vest. */ @@ -102,7 +102,7 @@ export interface PeriodAmino { amount: CoinAmino[]; } export interface PeriodAminoMsg { - type: "cosmos-sdk/Period"; + type: 'cosmos-sdk/Period'; value: PeriodAmino; } /** @@ -115,7 +115,7 @@ export interface PeriodicVestingAccount { vestingPeriods: Period[]; } export interface PeriodicVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount"; + typeUrl: '/cosmos.vesting.v1beta1.PeriodicVestingAccount'; value: Uint8Array; } /** @@ -128,7 +128,7 @@ export interface PeriodicVestingAccountAmino { vesting_periods: PeriodAmino[]; } export interface PeriodicVestingAccountAminoMsg { - type: "cosmos-sdk/PeriodicVestingAccount"; + type: 'cosmos-sdk/PeriodicVestingAccount'; value: PeriodicVestingAccountAmino; } /** @@ -142,7 +142,7 @@ export interface PermanentLockedAccount { baseVestingAccount?: BaseVestingAccount; } export interface PermanentLockedAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount"; + typeUrl: '/cosmos.vesting.v1beta1.PermanentLockedAccount'; value: Uint8Array; } /** @@ -156,7 +156,7 @@ export interface PermanentLockedAccountAmino { base_vesting_account?: BaseVestingAccountAmino; } export interface PermanentLockedAccountAminoMsg { - type: "cosmos-sdk/PermanentLockedAccount"; + type: 'cosmos-sdk/PermanentLockedAccount'; value: PermanentLockedAccountAmino; } function createBaseBaseVestingAccount(): BaseVestingAccount { @@ -169,13 +169,13 @@ function createBaseBaseVestingAccount(): BaseVestingAccount { }; } export const BaseVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", - aminoType: "cosmos-sdk/BaseVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.BaseVestingAccount', + aminoType: 'cosmos-sdk/BaseVestingAccount', is(o: any): o is BaseVestingAccount { - return o && (o.$typeUrl === BaseVestingAccount.typeUrl || Array.isArray(o.originalVesting) && (!o.originalVesting.length || Coin.is(o.originalVesting[0])) && Array.isArray(o.delegatedFree) && (!o.delegatedFree.length || Coin.is(o.delegatedFree[0])) && Array.isArray(o.delegatedVesting) && (!o.delegatedVesting.length || Coin.is(o.delegatedVesting[0])) && typeof o.endTime === "bigint"); + return o && (o.$typeUrl === BaseVestingAccount.typeUrl || Array.isArray(o.originalVesting) && (!o.originalVesting.length || Coin.is(o.originalVesting[0])) && Array.isArray(o.delegatedFree) && (!o.delegatedFree.length || Coin.is(o.delegatedFree[0])) && Array.isArray(o.delegatedVesting) && (!o.delegatedVesting.length || Coin.is(o.delegatedVesting[0])) && typeof o.endTime === 'bigint'); }, isAmino(o: any): o is BaseVestingAccountAmino { - return o && (o.$typeUrl === BaseVestingAccount.typeUrl || Array.isArray(o.original_vesting) && (!o.original_vesting.length || Coin.isAmino(o.original_vesting[0])) && Array.isArray(o.delegated_free) && (!o.delegated_free.length || Coin.isAmino(o.delegated_free[0])) && Array.isArray(o.delegated_vesting) && (!o.delegated_vesting.length || Coin.isAmino(o.delegated_vesting[0])) && typeof o.end_time === "bigint"); + return o && (o.$typeUrl === BaseVestingAccount.typeUrl || Array.isArray(o.original_vesting) && (!o.original_vesting.length || Coin.isAmino(o.original_vesting[0])) && Array.isArray(o.delegated_free) && (!o.delegated_free.length || Coin.isAmino(o.delegated_free[0])) && Array.isArray(o.delegated_vesting) && (!o.delegated_vesting.length || Coin.isAmino(o.delegated_vesting[0])) && typeof o.end_time === 'bigint'); }, encode(message: BaseVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.baseAccount !== undefined) { @@ -202,24 +202,24 @@ export const BaseVestingAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.originalVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.delegatedFree.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.delegatedVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.endTime = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.baseAccount = BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + message.originalVesting.push(Coin.decode(reader, reader.uint32())); + break; + case 3: + message.delegatedFree.push(Coin.decode(reader, reader.uint32())); + break; + case 4: + message.delegatedVesting.push(Coin.decode(reader, reader.uint32())); + break; + case 5: + message.endTime = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -272,7 +272,7 @@ export const BaseVestingAccount = { }, toAminoMsg(message: BaseVestingAccount): BaseVestingAccountAminoMsg { return { - type: "cosmos-sdk/BaseVestingAccount", + type: 'cosmos-sdk/BaseVestingAccount', value: BaseVestingAccount.toAmino(message) }; }, @@ -284,7 +284,7 @@ export const BaseVestingAccount = { }, toProtoMsg(message: BaseVestingAccount): BaseVestingAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.BaseVestingAccount', value: BaseVestingAccount.encode(message).finish() }; } @@ -298,13 +298,13 @@ function createBaseContinuousVestingAccount(): ContinuousVestingAccount { }; } export const ContinuousVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", - aminoType: "cosmos-sdk/ContinuousVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.ContinuousVestingAccount', + aminoType: 'cosmos-sdk/ContinuousVestingAccount', is(o: any): o is ContinuousVestingAccount { - return o && (o.$typeUrl === ContinuousVestingAccount.typeUrl || typeof o.startTime === "bigint"); + return o && (o.$typeUrl === ContinuousVestingAccount.typeUrl || typeof o.startTime === 'bigint'); }, isAmino(o: any): o is ContinuousVestingAccountAmino { - return o && (o.$typeUrl === ContinuousVestingAccount.typeUrl || typeof o.start_time === "bigint"); + return o && (o.$typeUrl === ContinuousVestingAccount.typeUrl || typeof o.start_time === 'bigint'); }, encode(message: ContinuousVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.baseVestingAccount !== undefined) { @@ -322,15 +322,15 @@ export const ContinuousVestingAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -362,7 +362,7 @@ export const ContinuousVestingAccount = { }, toAminoMsg(message: ContinuousVestingAccount): ContinuousVestingAccountAminoMsg { return { - type: "cosmos-sdk/ContinuousVestingAccount", + type: 'cosmos-sdk/ContinuousVestingAccount', value: ContinuousVestingAccount.toAmino(message) }; }, @@ -374,7 +374,7 @@ export const ContinuousVestingAccount = { }, toProtoMsg(message: ContinuousVestingAccount): ContinuousVestingAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.ContinuousVestingAccount', value: ContinuousVestingAccount.encode(message).finish() }; } @@ -387,8 +387,8 @@ function createBaseDelayedVestingAccount(): DelayedVestingAccount { }; } export const DelayedVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", - aminoType: "cosmos-sdk/DelayedVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.DelayedVestingAccount', + aminoType: 'cosmos-sdk/DelayedVestingAccount', is(o: any): o is DelayedVestingAccount { return o && o.$typeUrl === DelayedVestingAccount.typeUrl; }, @@ -408,12 +408,12 @@ export const DelayedVestingAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -440,7 +440,7 @@ export const DelayedVestingAccount = { }, toAminoMsg(message: DelayedVestingAccount): DelayedVestingAccountAminoMsg { return { - type: "cosmos-sdk/DelayedVestingAccount", + type: 'cosmos-sdk/DelayedVestingAccount', value: DelayedVestingAccount.toAmino(message) }; }, @@ -452,7 +452,7 @@ export const DelayedVestingAccount = { }, toProtoMsg(message: DelayedVestingAccount): DelayedVestingAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.DelayedVestingAccount', value: DelayedVestingAccount.encode(message).finish() }; } @@ -466,13 +466,13 @@ function createBasePeriod(): Period { }; } export const Period = { - typeUrl: "/cosmos.vesting.v1beta1.Period", - aminoType: "cosmos-sdk/Period", + typeUrl: '/cosmos.vesting.v1beta1.Period', + aminoType: 'cosmos-sdk/Period', is(o: any): o is Period { - return o && (o.$typeUrl === Period.typeUrl || typeof o.length === "bigint" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); + return o && (o.$typeUrl === Period.typeUrl || typeof o.length === 'bigint' && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0]))); }, isAmino(o: any): o is PeriodAmino { - return o && (o.$typeUrl === Period.typeUrl || typeof o.length === "bigint" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); + return o && (o.$typeUrl === Period.typeUrl || typeof o.length === 'bigint' && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0]))); }, encode(message: Period, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.length !== BigInt(0)) { @@ -490,15 +490,15 @@ export const Period = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.length = reader.int64(); - break; - case 2: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.length = reader.int64(); + break; + case 2: + message.amount.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -532,7 +532,7 @@ export const Period = { }, toAminoMsg(message: Period): PeriodAminoMsg { return { - type: "cosmos-sdk/Period", + type: 'cosmos-sdk/Period', value: Period.toAmino(message) }; }, @@ -544,7 +544,7 @@ export const Period = { }, toProtoMsg(message: Period): PeriodProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.Period", + typeUrl: '/cosmos.vesting.v1beta1.Period', value: Period.encode(message).finish() }; } @@ -559,13 +559,13 @@ function createBasePeriodicVestingAccount(): PeriodicVestingAccount { }; } export const PeriodicVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", - aminoType: "cosmos-sdk/PeriodicVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.PeriodicVestingAccount', + aminoType: 'cosmos-sdk/PeriodicVestingAccount', is(o: any): o is PeriodicVestingAccount { - return o && (o.$typeUrl === PeriodicVestingAccount.typeUrl || typeof o.startTime === "bigint" && Array.isArray(o.vestingPeriods) && (!o.vestingPeriods.length || Period.is(o.vestingPeriods[0]))); + return o && (o.$typeUrl === PeriodicVestingAccount.typeUrl || typeof o.startTime === 'bigint' && Array.isArray(o.vestingPeriods) && (!o.vestingPeriods.length || Period.is(o.vestingPeriods[0]))); }, isAmino(o: any): o is PeriodicVestingAccountAmino { - return o && (o.$typeUrl === PeriodicVestingAccount.typeUrl || typeof o.start_time === "bigint" && Array.isArray(o.vesting_periods) && (!o.vesting_periods.length || Period.isAmino(o.vesting_periods[0]))); + return o && (o.$typeUrl === PeriodicVestingAccount.typeUrl || typeof o.start_time === 'bigint' && Array.isArray(o.vesting_periods) && (!o.vesting_periods.length || Period.isAmino(o.vesting_periods[0]))); }, encode(message: PeriodicVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.baseVestingAccount !== undefined) { @@ -586,18 +586,18 @@ export const PeriodicVestingAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = reader.int64(); - break; - case 3: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = reader.int64(); + break; + case 3: + message.vestingPeriods.push(Period.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -636,7 +636,7 @@ export const PeriodicVestingAccount = { }, toAminoMsg(message: PeriodicVestingAccount): PeriodicVestingAccountAminoMsg { return { - type: "cosmos-sdk/PeriodicVestingAccount", + type: 'cosmos-sdk/PeriodicVestingAccount', value: PeriodicVestingAccount.toAmino(message) }; }, @@ -648,7 +648,7 @@ export const PeriodicVestingAccount = { }, toProtoMsg(message: PeriodicVestingAccount): PeriodicVestingAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", + typeUrl: '/cosmos.vesting.v1beta1.PeriodicVestingAccount', value: PeriodicVestingAccount.encode(message).finish() }; } @@ -661,8 +661,8 @@ function createBasePermanentLockedAccount(): PermanentLockedAccount { }; } export const PermanentLockedAccount = { - typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", - aminoType: "cosmos-sdk/PermanentLockedAccount", + typeUrl: '/cosmos.vesting.v1beta1.PermanentLockedAccount', + aminoType: 'cosmos-sdk/PermanentLockedAccount', is(o: any): o is PermanentLockedAccount { return o && o.$typeUrl === PermanentLockedAccount.typeUrl; }, @@ -682,12 +682,12 @@ export const PermanentLockedAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -714,7 +714,7 @@ export const PermanentLockedAccount = { }, toAminoMsg(message: PermanentLockedAccount): PermanentLockedAccountAminoMsg { return { - type: "cosmos-sdk/PermanentLockedAccount", + type: 'cosmos-sdk/PermanentLockedAccount', value: PermanentLockedAccount.toAmino(message) }; }, @@ -726,7 +726,7 @@ export const PermanentLockedAccount = { }, toProtoMsg(message: PermanentLockedAccount): PermanentLockedAccountProtoMsg { return { - typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", + typeUrl: '/cosmos.vesting.v1beta1.PermanentLockedAccount', value: PermanentLockedAccount.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmos_proto/cosmos.ts b/libs/cosmos-types/cosmos_proto/cosmos.ts index 0a97877f..8c200df9 100644 --- a/libs/cosmos-types/cosmos_proto/cosmos.ts +++ b/libs/cosmos-types/cosmos_proto/cosmos.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../binary"; -import { DeepPartial } from "../helpers"; -import { GlobalDecoderRegistry } from "../registry"; +import { BinaryReader, BinaryWriter } from '../binary'; +import { DeepPartial } from '../helpers'; +import { GlobalDecoderRegistry } from '../registry'; export enum ScalarType { SCALAR_TYPE_UNSPECIFIED = 0, SCALAR_TYPE_STRING = 1, @@ -10,32 +10,32 @@ export enum ScalarType { export const ScalarTypeAmino = ScalarType; export function scalarTypeFromJSON(object: any): ScalarType { switch (object) { - case 0: - case "SCALAR_TYPE_UNSPECIFIED": - return ScalarType.SCALAR_TYPE_UNSPECIFIED; - case 1: - case "SCALAR_TYPE_STRING": - return ScalarType.SCALAR_TYPE_STRING; - case 2: - case "SCALAR_TYPE_BYTES": - return ScalarType.SCALAR_TYPE_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return ScalarType.UNRECOGNIZED; + case 0: + case 'SCALAR_TYPE_UNSPECIFIED': + return ScalarType.SCALAR_TYPE_UNSPECIFIED; + case 1: + case 'SCALAR_TYPE_STRING': + return ScalarType.SCALAR_TYPE_STRING; + case 2: + case 'SCALAR_TYPE_BYTES': + return ScalarType.SCALAR_TYPE_BYTES; + case -1: + case 'UNRECOGNIZED': + default: + return ScalarType.UNRECOGNIZED; } } export function scalarTypeToJSON(object: ScalarType): string { switch (object) { - case ScalarType.SCALAR_TYPE_UNSPECIFIED: - return "SCALAR_TYPE_UNSPECIFIED"; - case ScalarType.SCALAR_TYPE_STRING: - return "SCALAR_TYPE_STRING"; - case ScalarType.SCALAR_TYPE_BYTES: - return "SCALAR_TYPE_BYTES"; - case ScalarType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ScalarType.SCALAR_TYPE_UNSPECIFIED: + return 'SCALAR_TYPE_UNSPECIFIED'; + case ScalarType.SCALAR_TYPE_STRING: + return 'SCALAR_TYPE_STRING'; + case ScalarType.SCALAR_TYPE_BYTES: + return 'SCALAR_TYPE_BYTES'; + case ScalarType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -57,7 +57,7 @@ export interface InterfaceDescriptor { description: string; } export interface InterfaceDescriptorProtoMsg { - typeUrl: "/cosmos_proto.InterfaceDescriptor"; + typeUrl: '/cosmos_proto.InterfaceDescriptor'; value: Uint8Array; } /** @@ -79,7 +79,7 @@ export interface InterfaceDescriptorAmino { description: string; } export interface InterfaceDescriptorAminoMsg { - type: "/cosmos_proto.InterfaceDescriptor"; + type: '/cosmos_proto.InterfaceDescriptor'; value: InterfaceDescriptorAmino; } /** @@ -114,7 +114,7 @@ export interface ScalarDescriptor { fieldType: ScalarType[]; } export interface ScalarDescriptorProtoMsg { - typeUrl: "/cosmos_proto.ScalarDescriptor"; + typeUrl: '/cosmos_proto.ScalarDescriptor'; value: Uint8Array; } /** @@ -149,28 +149,28 @@ export interface ScalarDescriptorAmino { field_type: ScalarType[]; } export interface ScalarDescriptorAminoMsg { - type: "/cosmos_proto.ScalarDescriptor"; + type: '/cosmos_proto.ScalarDescriptor'; value: ScalarDescriptorAmino; } function createBaseInterfaceDescriptor(): InterfaceDescriptor { return { - name: "", - description: "" + name: '', + description: '' }; } export const InterfaceDescriptor = { - typeUrl: "/cosmos_proto.InterfaceDescriptor", + typeUrl: '/cosmos_proto.InterfaceDescriptor', is(o: any): o is InterfaceDescriptor { - return o && (o.$typeUrl === InterfaceDescriptor.typeUrl || typeof o.name === "string" && typeof o.description === "string"); + return o && (o.$typeUrl === InterfaceDescriptor.typeUrl || typeof o.name === 'string' && typeof o.description === 'string'); }, isAmino(o: any): o is InterfaceDescriptorAmino { - return o && (o.$typeUrl === InterfaceDescriptor.typeUrl || typeof o.name === "string" && typeof o.description === "string"); + return o && (o.$typeUrl === InterfaceDescriptor.typeUrl || typeof o.name === 'string' && typeof o.description === 'string'); }, encode(message: InterfaceDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } return writer; @@ -182,23 +182,23 @@ export const InterfaceDescriptor = { while (reader.pos < end) { const 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; + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): InterfaceDescriptor { const message = createBaseInterfaceDescriptor(); - message.name = object.name ?? ""; - message.description = object.description ?? ""; + message.name = object.name ?? ''; + message.description = object.description ?? ''; return message; }, fromAmino(object: InterfaceDescriptorAmino): InterfaceDescriptor { @@ -213,8 +213,8 @@ export const InterfaceDescriptor = { }, toAmino(message: InterfaceDescriptor): InterfaceDescriptorAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; - obj.description = message.description === "" ? undefined : message.description; + obj.name = message.name === '' ? undefined : message.name; + obj.description = message.description === '' ? undefined : message.description; return obj; }, fromAminoMsg(object: InterfaceDescriptorAminoMsg): InterfaceDescriptor { @@ -228,7 +228,7 @@ export const InterfaceDescriptor = { }, toProtoMsg(message: InterfaceDescriptor): InterfaceDescriptorProtoMsg { return { - typeUrl: "/cosmos_proto.InterfaceDescriptor", + typeUrl: '/cosmos_proto.InterfaceDescriptor', value: InterfaceDescriptor.encode(message).finish() }; } @@ -236,24 +236,24 @@ export const InterfaceDescriptor = { GlobalDecoderRegistry.register(InterfaceDescriptor.typeUrl, InterfaceDescriptor); function createBaseScalarDescriptor(): ScalarDescriptor { return { - name: "", - description: "", + name: '', + description: '', fieldType: [] }; } export const ScalarDescriptor = { - typeUrl: "/cosmos_proto.ScalarDescriptor", + typeUrl: '/cosmos_proto.ScalarDescriptor', is(o: any): o is ScalarDescriptor { - return o && (o.$typeUrl === ScalarDescriptor.typeUrl || typeof o.name === "string" && typeof o.description === "string" && Array.isArray(o.fieldType)); + return o && (o.$typeUrl === ScalarDescriptor.typeUrl || typeof o.name === 'string' && typeof o.description === 'string' && Array.isArray(o.fieldType)); }, isAmino(o: any): o is ScalarDescriptorAmino { - return o && (o.$typeUrl === ScalarDescriptor.typeUrl || typeof o.name === "string" && typeof o.description === "string" && Array.isArray(o.field_type)); + return o && (o.$typeUrl === ScalarDescriptor.typeUrl || typeof o.name === 'string' && typeof o.description === 'string' && Array.isArray(o.field_type)); }, encode(message: ScalarDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } writer.uint32(26).fork(); @@ -270,33 +270,33 @@ export const ScalarDescriptor = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.fieldType.push((reader.int32() as any)); - } - } else { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.fieldType.push((reader.int32() as any)); } - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.fieldType.push((reader.int32() as any)); + } + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ScalarDescriptor { const message = createBaseScalarDescriptor(); - message.name = object.name ?? ""; - message.description = object.description ?? ""; + message.name = object.name ?? ''; + message.description = object.description ?? ''; message.fieldType = object.fieldType?.map(e => e) || []; return message; }, @@ -313,8 +313,8 @@ export const ScalarDescriptor = { }, toAmino(message: ScalarDescriptor): ScalarDescriptorAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; - obj.description = message.description === "" ? undefined : message.description; + obj.name = message.name === '' ? undefined : message.name; + obj.description = message.description === '' ? undefined : message.description; if (message.fieldType) { obj.field_type = message.fieldType.map(e => e); } else { @@ -333,7 +333,7 @@ export const ScalarDescriptor = { }, toProtoMsg(message: ScalarDescriptor): ScalarDescriptorProtoMsg { return { - typeUrl: "/cosmos_proto.ScalarDescriptor", + typeUrl: '/cosmos_proto.ScalarDescriptor', value: ScalarDescriptor.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmwasm.ts b/libs/cosmos-types/cosmwasm.ts index 425b676b..ac7e11d1 100644 --- a/libs/cosmos-types/cosmwasm.ts +++ b/libs/cosmos-types/cosmwasm.ts @@ -6,7 +6,7 @@ import { MsgMigrateContract, MsgStoreCode, MsgUpdateAdmin, -} from "./cosmwasm/wasm/v1/tx"; +} from './cosmwasm/wasm/v1/tx'; export const CosmWasmMsgs = [ MsgClearAdmin, diff --git a/libs/cosmos-types/cosmwasm/client.ts b/libs/cosmos-types/cosmwasm/client.ts index 1b6196fc..6d6eef3d 100644 --- a/libs/cosmos-types/cosmwasm/client.ts +++ b/libs/cosmos-types/cosmwasm/client.ts @@ -1,8 +1,9 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as cosmwasmWasmV1TxRegistry from "./wasm/v1/tx.registry"; -import * as cosmwasmWasmV1TxAmino from "./wasm/v1/tx.amino"; +import { GeneratedType, OfflineSigner,Registry } from '@cosmjs/proto-signing'; +import { AminoTypes, defaultRegistryTypes, SigningStargateClient } from '@cosmjs/stargate'; +import { HttpEndpoint } from '@cosmjs/tendermint-rpc'; + +import * as cosmwasmWasmV1TxAmino from './wasm/v1/tx.amino'; +import * as cosmwasmWasmV1TxRegistry from './wasm/v1/tx.registry'; export const cosmwasmAminoConverters = { ...cosmwasmWasmV1TxAmino.AminoConverter }; diff --git a/libs/cosmos-types/cosmwasm/rpc.query.ts b/libs/cosmos-types/cosmwasm/rpc.query.ts index d8c4d04b..e7861ba4 100644 --- a/libs/cosmos-types/cosmwasm/rpc.query.ts +++ b/libs/cosmos-types/cosmwasm/rpc.query.ts @@ -1,4 +1,4 @@ -import { Rpc } from "../helpers"; +import { Rpc } from '../helpers'; export const createRPCQueryClient = async ({ rpc }: { @@ -7,21 +7,24 @@ export const createRPCQueryClient = async ({ return { cosmos: { auth: { - v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('../cosmos/auth/v1beta1/query.rpc.Query')).createClientImpl(rpc) }, bank: { - v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('../cosmos/bank/v1beta1/query.rpc.Query')).createClientImpl(rpc) }, gov: { - v1beta1: (await import("../cosmos/gov/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('../cosmos/gov/v1beta1/query.rpc.Query')).createClientImpl(rpc) }, staking: { - v1beta1: (await import("../cosmos/staking/v1beta1/query.rpc.Query")).createClientImpl(rpc) + v1beta1: (await import('../cosmos/staking/v1beta1/query.rpc.Query')).createClientImpl(rpc) + }, + tx: { + v1beta1: (await import('../cosmos/tx/v1beta1/service.rpc.Service')).createClientImpl(rpc) } }, cosmwasm: { wasm: { - v1: (await import("./wasm/v1/query.rpc.Query")).createClientImpl(rpc) + v1: (await import('./wasm/v1/query.rpc.Query')).createClientImpl(rpc) } } }; diff --git a/libs/cosmos-types/cosmwasm/rpc.tx.ts b/libs/cosmos-types/cosmwasm/rpc.tx.ts index 26661193..5f071b75 100644 --- a/libs/cosmos-types/cosmwasm/rpc.tx.ts +++ b/libs/cosmos-types/cosmwasm/rpc.tx.ts @@ -1,4 +1,4 @@ -import { Rpc } from "../helpers"; +import { Rpc } from '../helpers'; export const createRPCMsgClient = async ({ rpc }: { @@ -6,34 +6,34 @@ export const createRPCMsgClient = async ({ }) => ({ cosmos: { authz: { - v1beta1: new (await import("../cosmos/authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/authz/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, bank: { - v1beta1: new (await import("../cosmos/bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/bank/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, distribution: { - v1beta1: new (await import("../cosmos/distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/distribution/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, feegrant: { - v1beta1: new (await import("../cosmos/feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/feegrant/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, gov: { - v1: new (await import("../cosmos/gov/v1/tx.rpc.msg")).MsgClientImpl(rpc), - v1beta1: new (await import("../cosmos/gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('../cosmos/gov/v1/tx.rpc.msg')).MsgClientImpl(rpc), + v1beta1: new (await import('../cosmos/gov/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, group: { - v1: new (await import("../cosmos/group/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('../cosmos/group/v1/tx.rpc.msg')).MsgClientImpl(rpc) }, staking: { - v1beta1: new (await import("../cosmos/staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/staking/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, vesting: { - v1beta1: new (await import("../cosmos/vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/vesting/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) } }, cosmwasm: { wasm: { - v1: new (await import("./wasm/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('./wasm/v1/tx.rpc.msg')).MsgClientImpl(rpc) } } }); \ No newline at end of file diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/proposal_legacy.ts b/libs/cosmos-types/cosmwasm/wasm/v1/proposal_legacy.ts new file mode 100644 index 00000000..5fdd3553 --- /dev/null +++ b/libs/cosmos-types/cosmwasm/wasm/v1/proposal_legacy.ts @@ -0,0 +1,2433 @@ +import { fromBase64, fromUtf8,toBase64, toUtf8 } from '@cosmjs/encoding'; + +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Coin, CoinAmino } from '../../../cosmos/base/v1beta1/coin'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { AccessConfig, AccessConfigAmino } from './types'; +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreCodeProposal. To submit WASM code to the system, + * a simple MsgStoreCode can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface StoreCodeProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + runAs: string; + /** WASMByteCode can be raw or gzip compressed */ + wasmByteCode: Uint8Array; + /** InstantiatePermission to apply on contract creation, optional */ + instantiatePermission?: AccessConfig; + /** UnpinCode code on upload, optional */ + unpinCode: boolean; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + codeHash: Uint8Array; +} +export interface StoreCodeProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.StoreCodeProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreCodeProposal. To submit WASM code to the system, + * a simple MsgStoreCode can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface StoreCodeProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + run_as: string; + /** WASMByteCode can be raw or gzip compressed */ + wasm_byte_code: string; + /** InstantiatePermission to apply on contract creation, optional */ + instantiate_permission?: AccessConfigAmino; + /** UnpinCode code on upload, optional */ + unpin_code: boolean; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + code_hash: string; +} +export interface StoreCodeProposalAminoMsg { + type: 'wasm/StoreCodeProposal'; + value: StoreCodeProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContractProposal. To instantiate a contract, + * a simple MsgInstantiateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface InstantiateContractProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + runAs: string; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** CodeID is the reference to the stored WASM code */ + codeId: bigint; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encoded message to be passed to the contract on instantiation */ + msg: Uint8Array; + /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; +} +export interface InstantiateContractProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.InstantiateContractProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContractProposal. To instantiate a contract, + * a simple MsgInstantiateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface InstantiateContractProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + run_as: string; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** CodeID is the reference to the stored WASM code */ + code_id: string; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encoded message to be passed to the contract on instantiation */ + msg: any; + /** Funds coins that are transferred to the contract on instantiation */ + funds: CoinAmino[]; +} +export interface InstantiateContractProposalAminoMsg { + type: 'wasm/InstantiateContractProposal'; + value: InstantiateContractProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContract2Proposal. To instantiate contract 2, + * a simple MsgInstantiateContract2 can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface InstantiateContract2Proposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's enviroment as sender */ + runAs: string; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** CodeID is the reference to the stored WASM code */ + codeId: bigint; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encode message to be passed to the contract on instantiation */ + msg: Uint8Array; + /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; + /** Salt is an arbitrary value provided by the sender. Size can be 1 to 64. */ + salt: Uint8Array; + /** + * FixMsg include the msg value into the hash for the predictable address. + * Default is false + */ + fixMsg: boolean; +} +export interface InstantiateContract2ProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.InstantiateContract2Proposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContract2Proposal. To instantiate contract 2, + * a simple MsgInstantiateContract2 can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface InstantiateContract2ProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's enviroment as sender */ + run_as: string; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** CodeID is the reference to the stored WASM code */ + code_id: string; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encode message to be passed to the contract on instantiation */ + msg: any; + /** Funds coins that are transferred to the contract on instantiation */ + funds: CoinAmino[]; + /** Salt is an arbitrary value provided by the sender. Size can be 1 to 64. */ + salt: string; + /** + * FixMsg include the msg value into the hash for the predictable address. + * Default is false + */ + fix_msg: boolean; +} +export interface InstantiateContract2ProposalAminoMsg { + type: 'wasm/InstantiateContract2Proposal'; + value: InstantiateContract2ProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit MigrateContractProposal. To migrate a contract, + * a simple MsgMigrateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface MigrateContractProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** Contract is the address of the smart contract */ + contract: string; + /** CodeID references the new WASM code */ + codeId: bigint; + /** Msg json encoded message to be passed to the contract on migration */ + msg: Uint8Array; +} +export interface MigrateContractProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.MigrateContractProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit MigrateContractProposal. To migrate a contract, + * a simple MsgMigrateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface MigrateContractProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** Contract is the address of the smart contract */ + contract: string; + /** CodeID references the new WASM code */ + code_id: string; + /** Msg json encoded message to be passed to the contract on migration */ + msg: any; +} +export interface MigrateContractProposalAminoMsg { + type: 'wasm/MigrateContractProposal'; + value: MigrateContractProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit SudoContractProposal. To call sudo on a contract, + * a simple MsgSudoContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface SudoContractProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract as sudo */ + msg: Uint8Array; +} +export interface SudoContractProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.SudoContractProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit SudoContractProposal. To call sudo on a contract, + * a simple MsgSudoContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface SudoContractProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract as sudo */ + msg: any; +} +export interface SudoContractProposalAminoMsg { + type: 'wasm/SudoContractProposal'; + value: SudoContractProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ExecuteContractProposal. To call execute on a contract, + * a simple MsgExecuteContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface ExecuteContractProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + runAs: string; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract as execute */ + msg: Uint8Array; + /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; +} +export interface ExecuteContractProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.ExecuteContractProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ExecuteContractProposal. To call execute on a contract, + * a simple MsgExecuteContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface ExecuteContractProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + run_as: string; + /** Contract is the address of the smart contract */ + contract: string; + /** Msg json encoded message to be passed to the contract as execute */ + msg: any; + /** Funds coins that are transferred to the contract on instantiation */ + funds: CoinAmino[]; +} +export interface ExecuteContractProposalAminoMsg { + type: 'wasm/ExecuteContractProposal'; + value: ExecuteContractProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateAdminProposal. To set an admin for a contract, + * a simple MsgUpdateAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface UpdateAdminProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** NewAdmin address to be set */ + newAdmin: string; + /** Contract is the address of the smart contract */ + contract: string; +} +export interface UpdateAdminProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.UpdateAdminProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateAdminProposal. To set an admin for a contract, + * a simple MsgUpdateAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface UpdateAdminProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** NewAdmin address to be set */ + new_admin: string; + /** Contract is the address of the smart contract */ + contract: string; +} +export interface UpdateAdminProposalAminoMsg { + type: 'wasm/UpdateAdminProposal'; + value: UpdateAdminProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ClearAdminProposal. To clear the admin of a contract, + * a simple MsgClearAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface ClearAdminProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** Contract is the address of the smart contract */ + contract: string; +} +export interface ClearAdminProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.ClearAdminProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ClearAdminProposal. To clear the admin of a contract, + * a simple MsgClearAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface ClearAdminProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** Contract is the address of the smart contract */ + contract: string; +} +export interface ClearAdminProposalAminoMsg { + type: 'wasm/ClearAdminProposal'; + value: ClearAdminProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit PinCodesProposal. To pin a set of code ids in the wasmvm + * cache, a simple MsgPinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface PinCodesProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** CodeIDs references the new WASM codes */ + codeIds: bigint[]; +} +export interface PinCodesProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.PinCodesProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit PinCodesProposal. To pin a set of code ids in the wasmvm + * cache, a simple MsgPinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface PinCodesProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** CodeIDs references the new WASM codes */ + code_ids: string[]; +} +export interface PinCodesProposalAminoMsg { + type: 'wasm/PinCodesProposal'; + value: PinCodesProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm + * cache, a simple MsgUnpinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface UnpinCodesProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** CodeIDs references the WASM codes */ + codeIds: bigint[]; +} +export interface UnpinCodesProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.UnpinCodesProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm + * cache, a simple MsgUnpinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface UnpinCodesProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** CodeIDs references the WASM codes */ + code_ids: string[]; +} +export interface UnpinCodesProposalAminoMsg { + type: 'wasm/UnpinCodesProposal'; + value: UnpinCodesProposalAmino; +} +/** + * AccessConfigUpdate contains the code id and the access config to be + * applied. + */ +export interface AccessConfigUpdate { + /** CodeID is the reference to the stored WASM code to be updated */ + codeId: bigint; + /** InstantiatePermission to apply to the set of code ids */ + instantiatePermission: AccessConfig; +} +export interface AccessConfigUpdateProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.AccessConfigUpdate'; + value: Uint8Array; +} +/** + * AccessConfigUpdate contains the code id and the access config to be + * applied. + */ +export interface AccessConfigUpdateAmino { + /** CodeID is the reference to the stored WASM code to be updated */ + code_id: string; + /** InstantiatePermission to apply to the set of code ids */ + instantiate_permission: AccessConfigAmino; +} +export interface AccessConfigUpdateAminoMsg { + type: 'wasm/AccessConfigUpdate'; + value: AccessConfigUpdateAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateInstantiateConfigProposal. To update instantiate config + * to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface UpdateInstantiateConfigProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** + * AccessConfigUpdate contains the list of code ids and the access config + * to be applied. + */ + accessConfigUpdates: AccessConfigUpdate[]; +} +export interface UpdateInstantiateConfigProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateInstantiateConfigProposal. To update instantiate config + * to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface UpdateInstantiateConfigProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** + * AccessConfigUpdate contains the list of code ids and the access config + * to be applied. + */ + access_config_updates: AccessConfigUpdateAmino[]; +} +export interface UpdateInstantiateConfigProposalAminoMsg { + type: 'wasm/UpdateInstantiateConfigProposal'; + value: UpdateInstantiateConfigProposalAmino; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreAndInstantiateContractProposal. To store and instantiate + * the contract, a simple MsgStoreAndInstantiateContract can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface StoreAndInstantiateContractProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + runAs: string; + /** WASMByteCode can be raw or gzip compressed */ + wasmByteCode: Uint8Array; + /** InstantiatePermission to apply on contract creation, optional */ + instantiatePermission?: AccessConfig; + /** UnpinCode code on upload, optional */ + unpinCode: boolean; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encoded message to be passed to the contract on instantiation */ + msg: Uint8Array; + /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + codeHash: Uint8Array; +} +export interface StoreAndInstantiateContractProposalProtoMsg { + typeUrl: '/cosmwasm.wasm.v1.StoreAndInstantiateContractProposal'; + value: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreAndInstantiateContractProposal. To store and instantiate + * the contract, a simple MsgStoreAndInstantiateContract can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface StoreAndInstantiateContractProposalAmino { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** RunAs is the address that is passed to the contract's environment as sender */ + run_as: string; + /** WASMByteCode can be raw or gzip compressed */ + wasm_byte_code: string; + /** InstantiatePermission to apply on contract creation, optional */ + instantiate_permission?: AccessConfigAmino; + /** UnpinCode code on upload, optional */ + unpin_code: boolean; + /** Admin is an optional address that can execute migrations */ + admin: string; + /** Label is optional metadata to be stored with a constract instance. */ + label: string; + /** Msg json encoded message to be passed to the contract on instantiation */ + msg: any; + /** Funds coins that are transferred to the contract on instantiation */ + funds: CoinAmino[]; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + code_hash: string; +} +export interface StoreAndInstantiateContractProposalAminoMsg { + type: 'wasm/StoreAndInstantiateContractProposal'; + value: StoreAndInstantiateContractProposalAmino; +} +function createBaseStoreCodeProposal(): StoreCodeProposal { + return { + title: '', + description: '', + runAs: '', + wasmByteCode: new Uint8Array(), + instantiatePermission: undefined, + unpinCode: false, + source: '', + builder: '', + codeHash: new Uint8Array() + }; +} +export const StoreCodeProposal = { + typeUrl: '/cosmwasm.wasm.v1.StoreCodeProposal', + aminoType: 'wasm/StoreCodeProposal', + is(o: any): o is StoreCodeProposal { + return o && (o.$typeUrl === StoreCodeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.runAs === 'string' && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === 'string') && typeof o.unpinCode === 'boolean' && typeof o.source === 'string' && typeof o.builder === 'string' && (o.codeHash instanceof Uint8Array || typeof o.codeHash === 'string')); + }, + isAmino(o: any): o is StoreCodeProposalAmino { + return o && (o.$typeUrl === StoreCodeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.run_as === 'string' && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === 'string') && typeof o.unpin_code === 'boolean' && typeof o.source === 'string' && typeof o.builder === 'string' && (o.code_hash instanceof Uint8Array || typeof o.code_hash === 'string')); + }, + encode(message: StoreCodeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.runAs !== '') { + writer.uint32(26).string(message.runAs); + } + if (message.wasmByteCode.length !== 0) { + writer.uint32(34).bytes(message.wasmByteCode); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(58).fork()).ldelim(); + } + if (message.unpinCode === true) { + writer.uint32(64).bool(message.unpinCode); + } + if (message.source !== '') { + writer.uint32(74).string(message.source); + } + if (message.builder !== '') { + writer.uint32(82).string(message.builder); + } + if (message.codeHash.length !== 0) { + writer.uint32(90).bytes(message.codeHash); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StoreCodeProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStoreCodeProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.runAs = reader.string(); + break; + case 4: + message.wasmByteCode = reader.bytes(); + break; + case 7: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 8: + message.unpinCode = reader.bool(); + break; + case 9: + message.source = reader.string(); + break; + case 10: + message.builder = reader.string(); + break; + case 11: + message.codeHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StoreCodeProposal { + const message = createBaseStoreCodeProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.runAs = object.runAs ?? ''; + message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + message.unpinCode = object.unpinCode ?? false; + message.source = object.source ?? ''; + message.builder = object.builder ?? ''; + message.codeHash = object.codeHash ?? new Uint8Array(); + return message; + }, + fromAmino(object: StoreCodeProposalAmino): StoreCodeProposal { + const message = createBaseStoreCodeProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.run_as !== undefined && object.run_as !== null) { + message.runAs = object.run_as; + } + if (object.wasm_byte_code !== undefined && object.wasm_byte_code !== null) { + message.wasmByteCode = fromBase64(object.wasm_byte_code); + } + if (object.instantiate_permission !== undefined && object.instantiate_permission !== null) { + message.instantiatePermission = AccessConfig.fromAmino(object.instantiate_permission); + } + if (object.unpin_code !== undefined && object.unpin_code !== null) { + message.unpinCode = object.unpin_code; + } + if (object.source !== undefined && object.source !== null) { + message.source = object.source; + } + if (object.builder !== undefined && object.builder !== null) { + message.builder = object.builder; + } + if (object.code_hash !== undefined && object.code_hash !== null) { + message.codeHash = bytesFromBase64(object.code_hash); + } + return message; + }, + toAmino(message: StoreCodeProposal): StoreCodeProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.run_as = message.runAs === '' ? undefined : message.runAs; + obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; + obj.unpin_code = message.unpinCode === false ? undefined : message.unpinCode; + obj.source = message.source === '' ? undefined : message.source; + obj.builder = message.builder === '' ? undefined : message.builder; + obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; + return obj; + }, + fromAminoMsg(object: StoreCodeProposalAminoMsg): StoreCodeProposal { + return StoreCodeProposal.fromAmino(object.value); + }, + toAminoMsg(message: StoreCodeProposal): StoreCodeProposalAminoMsg { + return { + type: 'wasm/StoreCodeProposal', + value: StoreCodeProposal.toAmino(message) + }; + }, + fromProtoMsg(message: StoreCodeProposalProtoMsg): StoreCodeProposal { + return StoreCodeProposal.decode(message.value); + }, + toProto(message: StoreCodeProposal): Uint8Array { + return StoreCodeProposal.encode(message).finish(); + }, + toProtoMsg(message: StoreCodeProposal): StoreCodeProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.StoreCodeProposal', + value: StoreCodeProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(StoreCodeProposal.typeUrl, StoreCodeProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(StoreCodeProposal.aminoType, StoreCodeProposal.typeUrl); +function createBaseInstantiateContractProposal(): InstantiateContractProposal { + return { + title: '', + description: '', + runAs: '', + admin: '', + codeId: BigInt(0), + label: '', + msg: new Uint8Array(), + funds: [] + }; +} +export const InstantiateContractProposal = { + typeUrl: '/cosmwasm.wasm.v1.InstantiateContractProposal', + aminoType: 'wasm/InstantiateContractProposal', + is(o: any): o is InstantiateContractProposal { + return o && (o.$typeUrl === InstantiateContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.runAs === 'string' && typeof o.admin === 'string' && typeof o.codeId === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0]))); + }, + isAmino(o: any): o is InstantiateContractProposalAmino { + return o && (o.$typeUrl === InstantiateContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.run_as === 'string' && typeof o.admin === 'string' && typeof o.code_id === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0]))); + }, + encode(message: InstantiateContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.runAs !== '') { + writer.uint32(26).string(message.runAs); + } + if (message.admin !== '') { + writer.uint32(34).string(message.admin); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(40).uint64(message.codeId); + } + if (message.label !== '') { + writer.uint32(50).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(58).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(66).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): InstantiateContractProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInstantiateContractProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.runAs = reader.string(); + break; + case 4: + message.admin = reader.string(); + break; + case 5: + message.codeId = reader.uint64(); + break; + case 6: + message.label = reader.string(); + break; + case 7: + message.msg = reader.bytes(); + break; + case 8: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): InstantiateContractProposal { + const message = createBaseInstantiateContractProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.runAs = object.runAs ?? ''; + message.admin = object.admin ?? ''; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.label = object.label ?? ''; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + return message; + }, + fromAmino(object: InstantiateContractProposalAmino): InstantiateContractProposal { + const message = createBaseInstantiateContractProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.run_as !== undefined && object.run_as !== null) { + message.runAs = object.run_as; + } + if (object.admin !== undefined && object.admin !== null) { + message.admin = object.admin; + } + if (object.code_id !== undefined && object.code_id !== null) { + message.codeId = BigInt(object.code_id); + } + if (object.label !== undefined && object.label !== null) { + message.label = object.label; + } + if (object.msg !== undefined && object.msg !== null) { + message.msg = toUtf8(JSON.stringify(object.msg)); + } + message.funds = object.funds?.map(e => Coin.fromAmino(e)) || []; + return message; + }, + toAmino(message: InstantiateContractProposal): InstantiateContractProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.run_as = message.runAs === '' ? undefined : message.runAs; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.label = message.label === '' ? undefined : message.label; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = message.funds; + } + return obj; + }, + fromAminoMsg(object: InstantiateContractProposalAminoMsg): InstantiateContractProposal { + return InstantiateContractProposal.fromAmino(object.value); + }, + toAminoMsg(message: InstantiateContractProposal): InstantiateContractProposalAminoMsg { + return { + type: 'wasm/InstantiateContractProposal', + value: InstantiateContractProposal.toAmino(message) + }; + }, + fromProtoMsg(message: InstantiateContractProposalProtoMsg): InstantiateContractProposal { + return InstantiateContractProposal.decode(message.value); + }, + toProto(message: InstantiateContractProposal): Uint8Array { + return InstantiateContractProposal.encode(message).finish(); + }, + toProtoMsg(message: InstantiateContractProposal): InstantiateContractProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.InstantiateContractProposal', + value: InstantiateContractProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(InstantiateContractProposal.typeUrl, InstantiateContractProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContractProposal.aminoType, InstantiateContractProposal.typeUrl); +function createBaseInstantiateContract2Proposal(): InstantiateContract2Proposal { + return { + title: '', + description: '', + runAs: '', + admin: '', + codeId: BigInt(0), + label: '', + msg: new Uint8Array(), + funds: [], + salt: new Uint8Array(), + fixMsg: false + }; +} +export const InstantiateContract2Proposal = { + typeUrl: '/cosmwasm.wasm.v1.InstantiateContract2Proposal', + aminoType: 'wasm/InstantiateContract2Proposal', + is(o: any): o is InstantiateContract2Proposal { + return o && (o.$typeUrl === InstantiateContract2Proposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.runAs === 'string' && typeof o.admin === 'string' && typeof o.codeId === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0])) && (o.salt instanceof Uint8Array || typeof o.salt === 'string') && typeof o.fixMsg === 'boolean'); + }, + isAmino(o: any): o is InstantiateContract2ProposalAmino { + return o && (o.$typeUrl === InstantiateContract2Proposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.run_as === 'string' && typeof o.admin === 'string' && typeof o.code_id === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0])) && (o.salt instanceof Uint8Array || typeof o.salt === 'string') && typeof o.fix_msg === 'boolean'); + }, + encode(message: InstantiateContract2Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.runAs !== '') { + writer.uint32(26).string(message.runAs); + } + if (message.admin !== '') { + writer.uint32(34).string(message.admin); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(40).uint64(message.codeId); + } + if (message.label !== '') { + writer.uint32(50).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(58).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(66).fork()).ldelim(); + } + if (message.salt.length !== 0) { + writer.uint32(74).bytes(message.salt); + } + if (message.fixMsg === true) { + writer.uint32(80).bool(message.fixMsg); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): InstantiateContract2Proposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInstantiateContract2Proposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.runAs = reader.string(); + break; + case 4: + message.admin = reader.string(); + break; + case 5: + message.codeId = reader.uint64(); + break; + case 6: + message.label = reader.string(); + break; + case 7: + message.msg = reader.bytes(); + break; + case 8: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 9: + message.salt = reader.bytes(); + break; + case 10: + message.fixMsg = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): InstantiateContract2Proposal { + const message = createBaseInstantiateContract2Proposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.runAs = object.runAs ?? ''; + message.admin = object.admin ?? ''; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.label = object.label ?? ''; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + message.salt = object.salt ?? new Uint8Array(); + message.fixMsg = object.fixMsg ?? false; + return message; + }, + fromAmino(object: InstantiateContract2ProposalAmino): InstantiateContract2Proposal { + const message = createBaseInstantiateContract2Proposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.run_as !== undefined && object.run_as !== null) { + message.runAs = object.run_as; + } + if (object.admin !== undefined && object.admin !== null) { + message.admin = object.admin; + } + if (object.code_id !== undefined && object.code_id !== null) { + message.codeId = BigInt(object.code_id); + } + if (object.label !== undefined && object.label !== null) { + message.label = object.label; + } + if (object.msg !== undefined && object.msg !== null) { + message.msg = toUtf8(JSON.stringify(object.msg)); + } + message.funds = object.funds?.map(e => Coin.fromAmino(e)) || []; + if (object.salt !== undefined && object.salt !== null) { + message.salt = bytesFromBase64(object.salt); + } + if (object.fix_msg !== undefined && object.fix_msg !== null) { + message.fixMsg = object.fix_msg; + } + return message; + }, + toAmino(message: InstantiateContract2Proposal): InstantiateContract2ProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.run_as = message.runAs === '' ? undefined : message.runAs; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.label = message.label === '' ? undefined : message.label; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = message.funds; + } + obj.salt = message.salt ? base64FromBytes(message.salt) : undefined; + obj.fix_msg = message.fixMsg === false ? undefined : message.fixMsg; + return obj; + }, + fromAminoMsg(object: InstantiateContract2ProposalAminoMsg): InstantiateContract2Proposal { + return InstantiateContract2Proposal.fromAmino(object.value); + }, + toAminoMsg(message: InstantiateContract2Proposal): InstantiateContract2ProposalAminoMsg { + return { + type: 'wasm/InstantiateContract2Proposal', + value: InstantiateContract2Proposal.toAmino(message) + }; + }, + fromProtoMsg(message: InstantiateContract2ProposalProtoMsg): InstantiateContract2Proposal { + return InstantiateContract2Proposal.decode(message.value); + }, + toProto(message: InstantiateContract2Proposal): Uint8Array { + return InstantiateContract2Proposal.encode(message).finish(); + }, + toProtoMsg(message: InstantiateContract2Proposal): InstantiateContract2ProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.InstantiateContract2Proposal', + value: InstantiateContract2Proposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(InstantiateContract2Proposal.typeUrl, InstantiateContract2Proposal); +GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContract2Proposal.aminoType, InstantiateContract2Proposal.typeUrl); +function createBaseMigrateContractProposal(): MigrateContractProposal { + return { + title: '', + description: '', + contract: '', + codeId: BigInt(0), + msg: new Uint8Array() + }; +} +export const MigrateContractProposal = { + typeUrl: '/cosmwasm.wasm.v1.MigrateContractProposal', + aminoType: 'wasm/MigrateContractProposal', + is(o: any): o is MigrateContractProposal { + return o && (o.$typeUrl === MigrateContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.contract === 'string' && typeof o.codeId === 'bigint' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); + }, + isAmino(o: any): o is MigrateContractProposalAmino { + return o && (o.$typeUrl === MigrateContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.contract === 'string' && typeof o.code_id === 'bigint' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); + }, + encode(message: MigrateContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.contract !== '') { + writer.uint32(34).string(message.contract); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(40).uint64(message.codeId); + } + if (message.msg.length !== 0) { + writer.uint32(50).bytes(message.msg); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): MigrateContractProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMigrateContractProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 4: + message.contract = reader.string(); + break; + case 5: + message.codeId = reader.uint64(); + break; + case 6: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): MigrateContractProposal { + const message = createBaseMigrateContractProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.contract = object.contract ?? ''; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.msg = object.msg ?? new Uint8Array(); + return message; + }, + fromAmino(object: MigrateContractProposalAmino): MigrateContractProposal { + const message = createBaseMigrateContractProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.contract !== undefined && object.contract !== null) { + message.contract = object.contract; + } + if (object.code_id !== undefined && object.code_id !== null) { + message.codeId = BigInt(object.code_id); + } + if (object.msg !== undefined && object.msg !== null) { + message.msg = toUtf8(JSON.stringify(object.msg)); + } + return message; + }, + toAmino(message: MigrateContractProposal): MigrateContractProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.contract = message.contract === '' ? undefined : message.contract; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + return obj; + }, + fromAminoMsg(object: MigrateContractProposalAminoMsg): MigrateContractProposal { + return MigrateContractProposal.fromAmino(object.value); + }, + toAminoMsg(message: MigrateContractProposal): MigrateContractProposalAminoMsg { + return { + type: 'wasm/MigrateContractProposal', + value: MigrateContractProposal.toAmino(message) + }; + }, + fromProtoMsg(message: MigrateContractProposalProtoMsg): MigrateContractProposal { + return MigrateContractProposal.decode(message.value); + }, + toProto(message: MigrateContractProposal): Uint8Array { + return MigrateContractProposal.encode(message).finish(); + }, + toProtoMsg(message: MigrateContractProposal): MigrateContractProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.MigrateContractProposal', + value: MigrateContractProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(MigrateContractProposal.typeUrl, MigrateContractProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(MigrateContractProposal.aminoType, MigrateContractProposal.typeUrl); +function createBaseSudoContractProposal(): SudoContractProposal { + return { + title: '', + description: '', + contract: '', + msg: new Uint8Array() + }; +} +export const SudoContractProposal = { + typeUrl: '/cosmwasm.wasm.v1.SudoContractProposal', + aminoType: 'wasm/SudoContractProposal', + is(o: any): o is SudoContractProposal { + return o && (o.$typeUrl === SudoContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); + }, + isAmino(o: any): o is SudoContractProposalAmino { + return o && (o.$typeUrl === SudoContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); + }, + encode(message: SudoContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.contract !== '') { + writer.uint32(26).string(message.contract); + } + if (message.msg.length !== 0) { + writer.uint32(34).bytes(message.msg); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): SudoContractProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSudoContractProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.contract = reader.string(); + break; + case 4: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): SudoContractProposal { + const message = createBaseSudoContractProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.contract = object.contract ?? ''; + message.msg = object.msg ?? new Uint8Array(); + return message; + }, + fromAmino(object: SudoContractProposalAmino): SudoContractProposal { + const message = createBaseSudoContractProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.contract !== undefined && object.contract !== null) { + message.contract = object.contract; + } + if (object.msg !== undefined && object.msg !== null) { + message.msg = toUtf8(JSON.stringify(object.msg)); + } + return message; + }, + toAmino(message: SudoContractProposal): SudoContractProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.contract = message.contract === '' ? undefined : message.contract; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + return obj; + }, + fromAminoMsg(object: SudoContractProposalAminoMsg): SudoContractProposal { + return SudoContractProposal.fromAmino(object.value); + }, + toAminoMsg(message: SudoContractProposal): SudoContractProposalAminoMsg { + return { + type: 'wasm/SudoContractProposal', + value: SudoContractProposal.toAmino(message) + }; + }, + fromProtoMsg(message: SudoContractProposalProtoMsg): SudoContractProposal { + return SudoContractProposal.decode(message.value); + }, + toProto(message: SudoContractProposal): Uint8Array { + return SudoContractProposal.encode(message).finish(); + }, + toProtoMsg(message: SudoContractProposal): SudoContractProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.SudoContractProposal', + value: SudoContractProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(SudoContractProposal.typeUrl, SudoContractProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(SudoContractProposal.aminoType, SudoContractProposal.typeUrl); +function createBaseExecuteContractProposal(): ExecuteContractProposal { + return { + title: '', + description: '', + runAs: '', + contract: '', + msg: new Uint8Array(), + funds: [] + }; +} +export const ExecuteContractProposal = { + typeUrl: '/cosmwasm.wasm.v1.ExecuteContractProposal', + aminoType: 'wasm/ExecuteContractProposal', + is(o: any): o is ExecuteContractProposal { + return o && (o.$typeUrl === ExecuteContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.runAs === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0]))); + }, + isAmino(o: any): o is ExecuteContractProposalAmino { + return o && (o.$typeUrl === ExecuteContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.run_as === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0]))); + }, + encode(message: ExecuteContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.runAs !== '') { + writer.uint32(26).string(message.runAs); + } + if (message.contract !== '') { + writer.uint32(34).string(message.contract); + } + if (message.msg.length !== 0) { + writer.uint32(42).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): ExecuteContractProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseExecuteContractProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.runAs = reader.string(); + break; + case 4: + message.contract = reader.string(); + break; + case 5: + message.msg = reader.bytes(); + break; + case 6: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): ExecuteContractProposal { + const message = createBaseExecuteContractProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.runAs = object.runAs ?? ''; + message.contract = object.contract ?? ''; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + return message; + }, + fromAmino(object: ExecuteContractProposalAmino): ExecuteContractProposal { + const message = createBaseExecuteContractProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.run_as !== undefined && object.run_as !== null) { + message.runAs = object.run_as; + } + if (object.contract !== undefined && object.contract !== null) { + message.contract = object.contract; + } + if (object.msg !== undefined && object.msg !== null) { + message.msg = toUtf8(JSON.stringify(object.msg)); + } + message.funds = object.funds?.map(e => Coin.fromAmino(e)) || []; + return message; + }, + toAmino(message: ExecuteContractProposal): ExecuteContractProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.run_as = message.runAs === '' ? undefined : message.runAs; + obj.contract = message.contract === '' ? undefined : message.contract; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = message.funds; + } + return obj; + }, + fromAminoMsg(object: ExecuteContractProposalAminoMsg): ExecuteContractProposal { + return ExecuteContractProposal.fromAmino(object.value); + }, + toAminoMsg(message: ExecuteContractProposal): ExecuteContractProposalAminoMsg { + return { + type: 'wasm/ExecuteContractProposal', + value: ExecuteContractProposal.toAmino(message) + }; + }, + fromProtoMsg(message: ExecuteContractProposalProtoMsg): ExecuteContractProposal { + return ExecuteContractProposal.decode(message.value); + }, + toProto(message: ExecuteContractProposal): Uint8Array { + return ExecuteContractProposal.encode(message).finish(); + }, + toProtoMsg(message: ExecuteContractProposal): ExecuteContractProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.ExecuteContractProposal', + value: ExecuteContractProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(ExecuteContractProposal.typeUrl, ExecuteContractProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(ExecuteContractProposal.aminoType, ExecuteContractProposal.typeUrl); +function createBaseUpdateAdminProposal(): UpdateAdminProposal { + return { + title: '', + description: '', + newAdmin: '', + contract: '' + }; +} +export const UpdateAdminProposal = { + typeUrl: '/cosmwasm.wasm.v1.UpdateAdminProposal', + aminoType: 'wasm/UpdateAdminProposal', + is(o: any): o is UpdateAdminProposal { + return o && (o.$typeUrl === UpdateAdminProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.newAdmin === 'string' && typeof o.contract === 'string'); + }, + isAmino(o: any): o is UpdateAdminProposalAmino { + return o && (o.$typeUrl === UpdateAdminProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.new_admin === 'string' && typeof o.contract === 'string'); + }, + encode(message: UpdateAdminProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.newAdmin !== '') { + writer.uint32(26).string(message.newAdmin); + } + if (message.contract !== '') { + writer.uint32(34).string(message.contract); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): UpdateAdminProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateAdminProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.newAdmin = reader.string(); + break; + case 4: + message.contract = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): UpdateAdminProposal { + const message = createBaseUpdateAdminProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.newAdmin = object.newAdmin ?? ''; + message.contract = object.contract ?? ''; + return message; + }, + fromAmino(object: UpdateAdminProposalAmino): UpdateAdminProposal { + const message = createBaseUpdateAdminProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.new_admin !== undefined && object.new_admin !== null) { + message.newAdmin = object.new_admin; + } + if (object.contract !== undefined && object.contract !== null) { + message.contract = object.contract; + } + return message; + }, + toAmino(message: UpdateAdminProposal): UpdateAdminProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.new_admin = message.newAdmin === '' ? undefined : message.newAdmin; + obj.contract = message.contract === '' ? undefined : message.contract; + return obj; + }, + fromAminoMsg(object: UpdateAdminProposalAminoMsg): UpdateAdminProposal { + return UpdateAdminProposal.fromAmino(object.value); + }, + toAminoMsg(message: UpdateAdminProposal): UpdateAdminProposalAminoMsg { + return { + type: 'wasm/UpdateAdminProposal', + value: UpdateAdminProposal.toAmino(message) + }; + }, + fromProtoMsg(message: UpdateAdminProposalProtoMsg): UpdateAdminProposal { + return UpdateAdminProposal.decode(message.value); + }, + toProto(message: UpdateAdminProposal): Uint8Array { + return UpdateAdminProposal.encode(message).finish(); + }, + toProtoMsg(message: UpdateAdminProposal): UpdateAdminProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.UpdateAdminProposal', + value: UpdateAdminProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(UpdateAdminProposal.typeUrl, UpdateAdminProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(UpdateAdminProposal.aminoType, UpdateAdminProposal.typeUrl); +function createBaseClearAdminProposal(): ClearAdminProposal { + return { + title: '', + description: '', + contract: '' + }; +} +export const ClearAdminProposal = { + typeUrl: '/cosmwasm.wasm.v1.ClearAdminProposal', + aminoType: 'wasm/ClearAdminProposal', + is(o: any): o is ClearAdminProposal { + return o && (o.$typeUrl === ClearAdminProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.contract === 'string'); + }, + isAmino(o: any): o is ClearAdminProposalAmino { + return o && (o.$typeUrl === ClearAdminProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.contract === 'string'); + }, + encode(message: ClearAdminProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.contract !== '') { + writer.uint32(26).string(message.contract); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): ClearAdminProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseClearAdminProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.contract = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): ClearAdminProposal { + const message = createBaseClearAdminProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.contract = object.contract ?? ''; + return message; + }, + fromAmino(object: ClearAdminProposalAmino): ClearAdminProposal { + const message = createBaseClearAdminProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.contract !== undefined && object.contract !== null) { + message.contract = object.contract; + } + return message; + }, + toAmino(message: ClearAdminProposal): ClearAdminProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.contract = message.contract === '' ? undefined : message.contract; + return obj; + }, + fromAminoMsg(object: ClearAdminProposalAminoMsg): ClearAdminProposal { + return ClearAdminProposal.fromAmino(object.value); + }, + toAminoMsg(message: ClearAdminProposal): ClearAdminProposalAminoMsg { + return { + type: 'wasm/ClearAdminProposal', + value: ClearAdminProposal.toAmino(message) + }; + }, + fromProtoMsg(message: ClearAdminProposalProtoMsg): ClearAdminProposal { + return ClearAdminProposal.decode(message.value); + }, + toProto(message: ClearAdminProposal): Uint8Array { + return ClearAdminProposal.encode(message).finish(); + }, + toProtoMsg(message: ClearAdminProposal): ClearAdminProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.ClearAdminProposal', + value: ClearAdminProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(ClearAdminProposal.typeUrl, ClearAdminProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(ClearAdminProposal.aminoType, ClearAdminProposal.typeUrl); +function createBasePinCodesProposal(): PinCodesProposal { + return { + title: '', + description: '', + codeIds: [] + }; +} +export const PinCodesProposal = { + typeUrl: '/cosmwasm.wasm.v1.PinCodesProposal', + aminoType: 'wasm/PinCodesProposal', + is(o: any): o is PinCodesProposal { + return o && (o.$typeUrl === PinCodesProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === 'bigint')); + }, + isAmino(o: any): o is PinCodesProposalAmino { + return o && (o.$typeUrl === PinCodesProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === 'bigint')); + }, + encode(message: PinCodesProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + writer.uint32(26).fork(); + for (const v of message.codeIds) { + writer.uint64(v); + } + writer.ldelim(); + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): PinCodesProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePinCodesProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.codeIds.push(reader.uint64()); + } + } else { + message.codeIds.push(reader.uint64()); + } + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): PinCodesProposal { + const message = createBasePinCodesProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; + return message; + }, + fromAmino(object: PinCodesProposalAmino): PinCodesProposal { + const message = createBasePinCodesProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + message.codeIds = object.code_ids?.map(e => BigInt(e)) || []; + return message; + }, + toAmino(message: PinCodesProposal): PinCodesProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + if (message.codeIds) { + obj.code_ids = message.codeIds.map(e => e.toString()); + } else { + obj.code_ids = message.codeIds; + } + return obj; + }, + fromAminoMsg(object: PinCodesProposalAminoMsg): PinCodesProposal { + return PinCodesProposal.fromAmino(object.value); + }, + toAminoMsg(message: PinCodesProposal): PinCodesProposalAminoMsg { + return { + type: 'wasm/PinCodesProposal', + value: PinCodesProposal.toAmino(message) + }; + }, + fromProtoMsg(message: PinCodesProposalProtoMsg): PinCodesProposal { + return PinCodesProposal.decode(message.value); + }, + toProto(message: PinCodesProposal): Uint8Array { + return PinCodesProposal.encode(message).finish(); + }, + toProtoMsg(message: PinCodesProposal): PinCodesProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.PinCodesProposal', + value: PinCodesProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(PinCodesProposal.typeUrl, PinCodesProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(PinCodesProposal.aminoType, PinCodesProposal.typeUrl); +function createBaseUnpinCodesProposal(): UnpinCodesProposal { + return { + title: '', + description: '', + codeIds: [] + }; +} +export const UnpinCodesProposal = { + typeUrl: '/cosmwasm.wasm.v1.UnpinCodesProposal', + aminoType: 'wasm/UnpinCodesProposal', + is(o: any): o is UnpinCodesProposal { + return o && (o.$typeUrl === UnpinCodesProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === 'bigint')); + }, + isAmino(o: any): o is UnpinCodesProposalAmino { + return o && (o.$typeUrl === UnpinCodesProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === 'bigint')); + }, + encode(message: UnpinCodesProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + writer.uint32(26).fork(); + for (const v of message.codeIds) { + writer.uint64(v); + } + writer.ldelim(); + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): UnpinCodesProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnpinCodesProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.codeIds.push(reader.uint64()); + } + } else { + message.codeIds.push(reader.uint64()); + } + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): UnpinCodesProposal { + const message = createBaseUnpinCodesProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; + return message; + }, + fromAmino(object: UnpinCodesProposalAmino): UnpinCodesProposal { + const message = createBaseUnpinCodesProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + message.codeIds = object.code_ids?.map(e => BigInt(e)) || []; + return message; + }, + toAmino(message: UnpinCodesProposal): UnpinCodesProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + if (message.codeIds) { + obj.code_ids = message.codeIds.map(e => e.toString()); + } else { + obj.code_ids = message.codeIds; + } + return obj; + }, + fromAminoMsg(object: UnpinCodesProposalAminoMsg): UnpinCodesProposal { + return UnpinCodesProposal.fromAmino(object.value); + }, + toAminoMsg(message: UnpinCodesProposal): UnpinCodesProposalAminoMsg { + return { + type: 'wasm/UnpinCodesProposal', + value: UnpinCodesProposal.toAmino(message) + }; + }, + fromProtoMsg(message: UnpinCodesProposalProtoMsg): UnpinCodesProposal { + return UnpinCodesProposal.decode(message.value); + }, + toProto(message: UnpinCodesProposal): Uint8Array { + return UnpinCodesProposal.encode(message).finish(); + }, + toProtoMsg(message: UnpinCodesProposal): UnpinCodesProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.UnpinCodesProposal', + value: UnpinCodesProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(UnpinCodesProposal.typeUrl, UnpinCodesProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(UnpinCodesProposal.aminoType, UnpinCodesProposal.typeUrl); +function createBaseAccessConfigUpdate(): AccessConfigUpdate { + return { + codeId: BigInt(0), + instantiatePermission: AccessConfig.fromPartial({}) + }; +} +export const AccessConfigUpdate = { + typeUrl: '/cosmwasm.wasm.v1.AccessConfigUpdate', + aminoType: 'wasm/AccessConfigUpdate', + is(o: any): o is AccessConfigUpdate { + return o && (o.$typeUrl === AccessConfigUpdate.typeUrl || typeof o.codeId === 'bigint' && AccessConfig.is(o.instantiatePermission)); + }, + isAmino(o: any): o is AccessConfigUpdateAmino { + return o && (o.$typeUrl === AccessConfigUpdate.typeUrl || typeof o.code_id === 'bigint' && AccessConfig.isAmino(o.instantiate_permission)); + }, + encode(message: AccessConfigUpdate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(message.codeId); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): AccessConfigUpdate { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAccessConfigUpdate(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): AccessConfigUpdate { + const message = createBaseAccessConfigUpdate(); + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + return message; + }, + fromAmino(object: AccessConfigUpdateAmino): AccessConfigUpdate { + const message = createBaseAccessConfigUpdate(); + if (object.code_id !== undefined && object.code_id !== null) { + message.codeId = BigInt(object.code_id); + } + if (object.instantiate_permission !== undefined && object.instantiate_permission !== null) { + message.instantiatePermission = AccessConfig.fromAmino(object.instantiate_permission); + } + return message; + }, + toAmino(message: AccessConfigUpdate): AccessConfigUpdateAmino { + const obj: any = {}; + obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : AccessConfig.toAmino(AccessConfig.fromPartial({})); + return obj; + }, + fromAminoMsg(object: AccessConfigUpdateAminoMsg): AccessConfigUpdate { + return AccessConfigUpdate.fromAmino(object.value); + }, + toAminoMsg(message: AccessConfigUpdate): AccessConfigUpdateAminoMsg { + return { + type: 'wasm/AccessConfigUpdate', + value: AccessConfigUpdate.toAmino(message) + }; + }, + fromProtoMsg(message: AccessConfigUpdateProtoMsg): AccessConfigUpdate { + return AccessConfigUpdate.decode(message.value); + }, + toProto(message: AccessConfigUpdate): Uint8Array { + return AccessConfigUpdate.encode(message).finish(); + }, + toProtoMsg(message: AccessConfigUpdate): AccessConfigUpdateProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.AccessConfigUpdate', + value: AccessConfigUpdate.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(AccessConfigUpdate.typeUrl, AccessConfigUpdate); +GlobalDecoderRegistry.registerAminoProtoMapping(AccessConfigUpdate.aminoType, AccessConfigUpdate.typeUrl); +function createBaseUpdateInstantiateConfigProposal(): UpdateInstantiateConfigProposal { + return { + title: '', + description: '', + accessConfigUpdates: [] + }; +} +export const UpdateInstantiateConfigProposal = { + typeUrl: '/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal', + aminoType: 'wasm/UpdateInstantiateConfigProposal', + is(o: any): o is UpdateInstantiateConfigProposal { + return o && (o.$typeUrl === UpdateInstantiateConfigProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Array.isArray(o.accessConfigUpdates) && (!o.accessConfigUpdates.length || AccessConfigUpdate.is(o.accessConfigUpdates[0]))); + }, + isAmino(o: any): o is UpdateInstantiateConfigProposalAmino { + return o && (o.$typeUrl === UpdateInstantiateConfigProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Array.isArray(o.access_config_updates) && (!o.access_config_updates.length || AccessConfigUpdate.isAmino(o.access_config_updates[0]))); + }, + encode(message: UpdateInstantiateConfigProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + for (const v of message.accessConfigUpdates) { + AccessConfigUpdate.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): UpdateInstantiateConfigProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateInstantiateConfigProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.accessConfigUpdates.push(AccessConfigUpdate.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): UpdateInstantiateConfigProposal { + const message = createBaseUpdateInstantiateConfigProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.accessConfigUpdates = object.accessConfigUpdates?.map(e => AccessConfigUpdate.fromPartial(e)) || []; + return message; + }, + fromAmino(object: UpdateInstantiateConfigProposalAmino): UpdateInstantiateConfigProposal { + const message = createBaseUpdateInstantiateConfigProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + message.accessConfigUpdates = object.access_config_updates?.map(e => AccessConfigUpdate.fromAmino(e)) || []; + return message; + }, + toAmino(message: UpdateInstantiateConfigProposal): UpdateInstantiateConfigProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + if (message.accessConfigUpdates) { + obj.access_config_updates = message.accessConfigUpdates.map(e => e ? AccessConfigUpdate.toAmino(e) : undefined); + } else { + obj.access_config_updates = message.accessConfigUpdates; + } + return obj; + }, + fromAminoMsg(object: UpdateInstantiateConfigProposalAminoMsg): UpdateInstantiateConfigProposal { + return UpdateInstantiateConfigProposal.fromAmino(object.value); + }, + toAminoMsg(message: UpdateInstantiateConfigProposal): UpdateInstantiateConfigProposalAminoMsg { + return { + type: 'wasm/UpdateInstantiateConfigProposal', + value: UpdateInstantiateConfigProposal.toAmino(message) + }; + }, + fromProtoMsg(message: UpdateInstantiateConfigProposalProtoMsg): UpdateInstantiateConfigProposal { + return UpdateInstantiateConfigProposal.decode(message.value); + }, + toProto(message: UpdateInstantiateConfigProposal): Uint8Array { + return UpdateInstantiateConfigProposal.encode(message).finish(); + }, + toProtoMsg(message: UpdateInstantiateConfigProposal): UpdateInstantiateConfigProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal', + value: UpdateInstantiateConfigProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(UpdateInstantiateConfigProposal.typeUrl, UpdateInstantiateConfigProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(UpdateInstantiateConfigProposal.aminoType, UpdateInstantiateConfigProposal.typeUrl); +function createBaseStoreAndInstantiateContractProposal(): StoreAndInstantiateContractProposal { + return { + title: '', + description: '', + runAs: '', + wasmByteCode: new Uint8Array(), + instantiatePermission: undefined, + unpinCode: false, + admin: '', + label: '', + msg: new Uint8Array(), + funds: [], + source: '', + builder: '', + codeHash: new Uint8Array() + }; +} +export const StoreAndInstantiateContractProposal = { + typeUrl: '/cosmwasm.wasm.v1.StoreAndInstantiateContractProposal', + aminoType: 'wasm/StoreAndInstantiateContractProposal', + is(o: any): o is StoreAndInstantiateContractProposal { + return o && (o.$typeUrl === StoreAndInstantiateContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.runAs === 'string' && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === 'string') && typeof o.unpinCode === 'boolean' && typeof o.admin === 'string' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0])) && typeof o.source === 'string' && typeof o.builder === 'string' && (o.codeHash instanceof Uint8Array || typeof o.codeHash === 'string')); + }, + isAmino(o: any): o is StoreAndInstantiateContractProposalAmino { + return o && (o.$typeUrl === StoreAndInstantiateContractProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.run_as === 'string' && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === 'string') && typeof o.unpin_code === 'boolean' && typeof o.admin === 'string' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0])) && typeof o.source === 'string' && typeof o.builder === 'string' && (o.code_hash instanceof Uint8Array || typeof o.code_hash === 'string')); + }, + encode(message: StoreAndInstantiateContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.title !== '') { + writer.uint32(10).string(message.title); + } + if (message.description !== '') { + writer.uint32(18).string(message.description); + } + if (message.runAs !== '') { + writer.uint32(26).string(message.runAs); + } + if (message.wasmByteCode.length !== 0) { + writer.uint32(34).bytes(message.wasmByteCode); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim(); + } + if (message.unpinCode === true) { + writer.uint32(48).bool(message.unpinCode); + } + if (message.admin !== '') { + writer.uint32(58).string(message.admin); + } + if (message.label !== '') { + writer.uint32(66).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(74).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(82).fork()).ldelim(); + } + if (message.source !== '') { + writer.uint32(90).string(message.source); + } + if (message.builder !== '') { + writer.uint32(98).string(message.builder); + } + if (message.codeHash.length !== 0) { + writer.uint32(106).bytes(message.codeHash); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StoreAndInstantiateContractProposal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStoreAndInstantiateContractProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.runAs = reader.string(); + break; + case 4: + message.wasmByteCode = reader.bytes(); + break; + case 5: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 6: + message.unpinCode = reader.bool(); + break; + case 7: + message.admin = reader.string(); + break; + case 8: + message.label = reader.string(); + break; + case 9: + message.msg = reader.bytes(); + break; + case 10: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 11: + message.source = reader.string(); + break; + case 12: + message.builder = reader.string(); + break; + case 13: + message.codeHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StoreAndInstantiateContractProposal { + const message = createBaseStoreAndInstantiateContractProposal(); + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.runAs = object.runAs ?? ''; + message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + message.unpinCode = object.unpinCode ?? false; + message.admin = object.admin ?? ''; + message.label = object.label ?? ''; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + message.source = object.source ?? ''; + message.builder = object.builder ?? ''; + message.codeHash = object.codeHash ?? new Uint8Array(); + return message; + }, + fromAmino(object: StoreAndInstantiateContractProposalAmino): StoreAndInstantiateContractProposal { + const message = createBaseStoreAndInstantiateContractProposal(); + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } + if (object.run_as !== undefined && object.run_as !== null) { + message.runAs = object.run_as; + } + if (object.wasm_byte_code !== undefined && object.wasm_byte_code !== null) { + message.wasmByteCode = fromBase64(object.wasm_byte_code); + } + if (object.instantiate_permission !== undefined && object.instantiate_permission !== null) { + message.instantiatePermission = AccessConfig.fromAmino(object.instantiate_permission); + } + if (object.unpin_code !== undefined && object.unpin_code !== null) { + message.unpinCode = object.unpin_code; + } + if (object.admin !== undefined && object.admin !== null) { + message.admin = object.admin; + } + if (object.label !== undefined && object.label !== null) { + message.label = object.label; + } + if (object.msg !== undefined && object.msg !== null) { + message.msg = toUtf8(JSON.stringify(object.msg)); + } + message.funds = object.funds?.map(e => Coin.fromAmino(e)) || []; + if (object.source !== undefined && object.source !== null) { + message.source = object.source; + } + if (object.builder !== undefined && object.builder !== null) { + message.builder = object.builder; + } + if (object.code_hash !== undefined && object.code_hash !== null) { + message.codeHash = bytesFromBase64(object.code_hash); + } + return message; + }, + toAmino(message: StoreAndInstantiateContractProposal): StoreAndInstantiateContractProposalAmino { + const obj: any = {}; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.run_as = message.runAs === '' ? undefined : message.runAs; + obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; + obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; + obj.unpin_code = message.unpinCode === false ? undefined : message.unpinCode; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.label = message.label === '' ? undefined : message.label; + obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; + if (message.funds) { + obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.funds = message.funds; + } + obj.source = message.source === '' ? undefined : message.source; + obj.builder = message.builder === '' ? undefined : message.builder; + obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; + return obj; + }, + fromAminoMsg(object: StoreAndInstantiateContractProposalAminoMsg): StoreAndInstantiateContractProposal { + return StoreAndInstantiateContractProposal.fromAmino(object.value); + }, + toAminoMsg(message: StoreAndInstantiateContractProposal): StoreAndInstantiateContractProposalAminoMsg { + return { + type: 'wasm/StoreAndInstantiateContractProposal', + value: StoreAndInstantiateContractProposal.toAmino(message) + }; + }, + fromProtoMsg(message: StoreAndInstantiateContractProposalProtoMsg): StoreAndInstantiateContractProposal { + return StoreAndInstantiateContractProposal.decode(message.value); + }, + toProto(message: StoreAndInstantiateContractProposal): Uint8Array { + return StoreAndInstantiateContractProposal.encode(message).finish(); + }, + toProtoMsg(message: StoreAndInstantiateContractProposal): StoreAndInstantiateContractProposalProtoMsg { + return { + typeUrl: '/cosmwasm.wasm.v1.StoreAndInstantiateContractProposal', + value: StoreAndInstantiateContractProposal.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(StoreAndInstantiateContractProposal.typeUrl, StoreAndInstantiateContractProposal); +GlobalDecoderRegistry.registerAminoProtoMapping(StoreAndInstantiateContractProposal.aminoType, StoreAndInstantiateContractProposal.typeUrl); \ No newline at end of file diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/query.rpc.Query.ts b/libs/cosmos-types/cosmwasm/wasm/v1/query.rpc.Query.ts index 9902f056..bac2bf39 100644 --- a/libs/cosmos-types/cosmwasm/wasm/v1/query.rpc.Query.ts +++ b/libs/cosmos-types/cosmwasm/wasm/v1/query.rpc.Query.ts @@ -1,6 +1,6 @@ -import { TxRpc } from "../../../types"; -import { BinaryReader } from "../../../binary"; -import { QueryContractInfoRequest, QueryContractInfoResponse, QueryContractHistoryRequest, QueryContractHistoryResponse, QueryContractsByCodeRequest, QueryContractsByCodeResponse, QueryAllContractStateRequest, QueryAllContractStateResponse, QueryRawContractStateRequest, QueryRawContractStateResponse, QuerySmartContractStateRequest, QuerySmartContractStateResponse, QueryCodeRequest, QueryCodeResponse, QueryCodesRequest, QueryCodesResponse, QueryPinnedCodesRequest, QueryPinnedCodesResponse, QueryParamsRequest, QueryParamsResponse, QueryContractsByCreatorRequest, QueryContractsByCreatorResponse, QueryBuildAddressRequest, QueryBuildAddressResponse } from "./query"; +import { BinaryReader } from '../../../binary'; +import { TxRpc } from '../../../types'; +import { QueryAllContractStateRequest, QueryAllContractStateResponse, QueryBuildAddressRequest, QueryBuildAddressResponse,QueryCodeRequest, QueryCodeResponse, QueryCodesRequest, QueryCodesResponse, QueryContractHistoryRequest, QueryContractHistoryResponse, QueryContractInfoRequest, QueryContractInfoResponse, QueryContractsByCodeRequest, QueryContractsByCodeResponse, QueryContractsByCreatorRequest, QueryContractsByCreatorResponse, QueryParamsRequest, QueryParamsResponse, QueryPinnedCodesRequest, QueryPinnedCodesResponse, QueryRawContractStateRequest, QueryRawContractStateResponse, QuerySmartContractStateRequest, QuerySmartContractStateResponse } from './query'; /** Query provides defines the gRPC querier service */ export interface Query { /** ContractInfo gets the contract meta data */ @@ -63,43 +63,43 @@ export class QueryClientImpl implements Query { /* ContractInfo gets the contract meta data */ contractInfo = async (request: QueryContractInfoRequest): Promise => { const data = QueryContractInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractInfo", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'ContractInfo', data); return promise.then(data => QueryContractInfoResponse.decode(new BinaryReader(data))); }; /* ContractHistory gets the contract code history */ contractHistory = async (request: QueryContractHistoryRequest): Promise => { const data = QueryContractHistoryRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractHistory", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'ContractHistory', data); return promise.then(data => QueryContractHistoryResponse.decode(new BinaryReader(data))); }; /* ContractsByCode lists all smart contracts for a code id */ contractsByCode = async (request: QueryContractsByCodeRequest): Promise => { const data = QueryContractsByCodeRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractsByCode", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'ContractsByCode', data); return promise.then(data => QueryContractsByCodeResponse.decode(new BinaryReader(data))); }; /* AllContractState gets all raw store data for a single contract */ allContractState = async (request: QueryAllContractStateRequest): Promise => { const data = QueryAllContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "AllContractState", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'AllContractState', data); return promise.then(data => QueryAllContractStateResponse.decode(new BinaryReader(data))); }; /* RawContractState gets single key from the raw store data of a contract */ rawContractState = async (request: QueryRawContractStateRequest): Promise => { const data = QueryRawContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "RawContractState", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'RawContractState', data); return promise.then(data => QueryRawContractStateResponse.decode(new BinaryReader(data))); }; /* SmartContractState get smart query result from the contract */ smartContractState = async (request: QuerySmartContractStateRequest): Promise => { const data = QuerySmartContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "SmartContractState", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'SmartContractState', data); return promise.then(data => QuerySmartContractStateResponse.decode(new BinaryReader(data))); }; /* Code gets the binary code and metadata for a singe wasm code */ code = async (request: QueryCodeRequest): Promise => { const data = QueryCodeRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Code", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'Code', data); return promise.then(data => QueryCodeResponse.decode(new BinaryReader(data))); }; /* Codes gets the metadata for all stored wasm codes */ @@ -107,7 +107,7 @@ export class QueryClientImpl implements Query { pagination: undefined }): Promise => { const data = QueryCodesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Codes", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'Codes', data); return promise.then(data => QueryCodesResponse.decode(new BinaryReader(data))); }; /* PinnedCodes gets the pinned code ids */ @@ -115,25 +115,25 @@ export class QueryClientImpl implements Query { pagination: undefined }): Promise => { const data = QueryPinnedCodesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "PinnedCodes", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'PinnedCodes', data); return promise.then(data => QueryPinnedCodesResponse.decode(new BinaryReader(data))); }; /* Params gets the module params */ params = async (request: QueryParamsRequest = {}): Promise => { const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Params", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'Params', data); return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); }; /* ContractsByCreator gets the contracts by creator */ contractsByCreator = async (request: QueryContractsByCreatorRequest): Promise => { const data = QueryContractsByCreatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractsByCreator", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'ContractsByCreator', data); return promise.then(data => QueryContractsByCreatorResponse.decode(new BinaryReader(data))); }; /* BuildAddress builds a contract address */ buildAddress = async (request: QueryBuildAddressRequest): Promise => { const data = QueryBuildAddressRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "BuildAddress", data); + const promise = this.rpc.request('cosmwasm.wasm.v1.Query', 'BuildAddress', data); return promise.then(data => QueryBuildAddressResponse.decode(new BinaryReader(data))); }; } diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/query.ts b/libs/cosmos-types/cosmwasm/wasm/v1/query.ts index 18b9154b..5d1b42ee 100644 --- a/libs/cosmos-types/cosmwasm/wasm/v1/query.ts +++ b/libs/cosmos-types/cosmwasm/wasm/v1/query.ts @@ -1,9 +1,10 @@ -import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../../cosmos/base/query/v1beta1/pagination"; -import { ContractInfo, ContractInfoAmino, ContractCodeHistoryEntry, ContractCodeHistoryEntryAmino, Model, ModelAmino, AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; -import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; +import { fromUtf8,toUtf8 } from '@cosmjs/encoding'; + +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from '../../../cosmos/base/query/v1beta1/pagination'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { AccessConfig, AccessConfigAmino, ContractCodeHistoryEntry, ContractCodeHistoryEntryAmino, ContractInfo, ContractInfoAmino, Model, ModelAmino, Params, ParamsAmino } from './types'; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC * method @@ -13,7 +14,7 @@ export interface QueryContractInfoRequest { address: string; } export interface QueryContractInfoRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractInfoRequest'; value: Uint8Array; } /** @@ -25,7 +26,7 @@ export interface QueryContractInfoRequestAmino { address: string; } export interface QueryContractInfoRequestAminoMsg { - type: "wasm/QueryContractInfoRequest"; + type: 'wasm/QueryContractInfoRequest'; value: QueryContractInfoRequestAmino; } /** @@ -38,7 +39,7 @@ export interface QueryContractInfoResponse { contractInfo: ContractInfo; } export interface QueryContractInfoResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractInfoResponse'; value: Uint8Array; } /** @@ -51,7 +52,7 @@ export interface QueryContractInfoResponseAmino { contract_info: ContractInfoAmino; } export interface QueryContractInfoResponseAminoMsg { - type: "wasm/QueryContractInfoResponse"; + type: 'wasm/QueryContractInfoResponse'; value: QueryContractInfoResponseAmino; } /** @@ -65,7 +66,7 @@ export interface QueryContractHistoryRequest { pagination?: PageRequest; } export interface QueryContractHistoryRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractHistoryRequest'; value: Uint8Array; } /** @@ -79,7 +80,7 @@ export interface QueryContractHistoryRequestAmino { pagination?: PageRequestAmino; } export interface QueryContractHistoryRequestAminoMsg { - type: "wasm/QueryContractHistoryRequest"; + type: 'wasm/QueryContractHistoryRequest'; value: QueryContractHistoryRequestAmino; } /** @@ -92,7 +93,7 @@ export interface QueryContractHistoryResponse { pagination?: PageResponse; } export interface QueryContractHistoryResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractHistoryResponse'; value: Uint8Array; } /** @@ -105,7 +106,7 @@ export interface QueryContractHistoryResponseAmino { pagination?: PageResponseAmino; } export interface QueryContractHistoryResponseAminoMsg { - type: "wasm/QueryContractHistoryResponse"; + type: 'wasm/QueryContractHistoryResponse'; value: QueryContractHistoryResponseAmino; } /** @@ -121,7 +122,7 @@ export interface QueryContractsByCodeRequest { pagination?: PageRequest; } export interface QueryContractsByCodeRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCodeRequest'; value: Uint8Array; } /** @@ -137,7 +138,7 @@ export interface QueryContractsByCodeRequestAmino { pagination?: PageRequestAmino; } export interface QueryContractsByCodeRequestAminoMsg { - type: "wasm/QueryContractsByCodeRequest"; + type: 'wasm/QueryContractsByCodeRequest'; value: QueryContractsByCodeRequestAmino; } /** @@ -151,7 +152,7 @@ export interface QueryContractsByCodeResponse { pagination?: PageResponse; } export interface QueryContractsByCodeResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCodeResponse'; value: Uint8Array; } /** @@ -165,7 +166,7 @@ export interface QueryContractsByCodeResponseAmino { pagination?: PageResponseAmino; } export interface QueryContractsByCodeResponseAminoMsg { - type: "wasm/QueryContractsByCodeResponse"; + type: 'wasm/QueryContractsByCodeResponse'; value: QueryContractsByCodeResponseAmino; } /** @@ -179,7 +180,7 @@ export interface QueryAllContractStateRequest { pagination?: PageRequest; } export interface QueryAllContractStateRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryAllContractStateRequest'; value: Uint8Array; } /** @@ -193,7 +194,7 @@ export interface QueryAllContractStateRequestAmino { pagination?: PageRequestAmino; } export interface QueryAllContractStateRequestAminoMsg { - type: "wasm/QueryAllContractStateRequest"; + type: 'wasm/QueryAllContractStateRequest'; value: QueryAllContractStateRequestAmino; } /** @@ -206,7 +207,7 @@ export interface QueryAllContractStateResponse { pagination?: PageResponse; } export interface QueryAllContractStateResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryAllContractStateResponse'; value: Uint8Array; } /** @@ -219,7 +220,7 @@ export interface QueryAllContractStateResponseAmino { pagination?: PageResponseAmino; } export interface QueryAllContractStateResponseAminoMsg { - type: "wasm/QueryAllContractStateResponse"; + type: 'wasm/QueryAllContractStateResponse'; value: QueryAllContractStateResponseAmino; } /** @@ -232,7 +233,7 @@ export interface QueryRawContractStateRequest { queryData: Uint8Array; } export interface QueryRawContractStateRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryRawContractStateRequest'; value: Uint8Array; } /** @@ -245,7 +246,7 @@ export interface QueryRawContractStateRequestAmino { query_data: string; } export interface QueryRawContractStateRequestAminoMsg { - type: "wasm/QueryRawContractStateRequest"; + type: 'wasm/QueryRawContractStateRequest'; value: QueryRawContractStateRequestAmino; } /** @@ -257,7 +258,7 @@ export interface QueryRawContractStateResponse { data: Uint8Array; } export interface QueryRawContractStateResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryRawContractStateResponse'; value: Uint8Array; } /** @@ -269,7 +270,7 @@ export interface QueryRawContractStateResponseAmino { data: string; } export interface QueryRawContractStateResponseAminoMsg { - type: "wasm/QueryRawContractStateResponse"; + type: 'wasm/QueryRawContractStateResponse'; value: QueryRawContractStateResponseAmino; } /** @@ -283,7 +284,7 @@ export interface QuerySmartContractStateRequest { queryData: Uint8Array; } export interface QuerySmartContractStateRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest"; + typeUrl: '/cosmwasm.wasm.v1.QuerySmartContractStateRequest'; value: Uint8Array; } /** @@ -297,7 +298,7 @@ export interface QuerySmartContractStateRequestAmino { query_data: any; } export interface QuerySmartContractStateRequestAminoMsg { - type: "wasm/QuerySmartContractStateRequest"; + type: 'wasm/QuerySmartContractStateRequest'; value: QuerySmartContractStateRequestAmino; } /** @@ -309,7 +310,7 @@ export interface QuerySmartContractStateResponse { data: Uint8Array; } export interface QuerySmartContractStateResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse"; + typeUrl: '/cosmwasm.wasm.v1.QuerySmartContractStateResponse'; value: Uint8Array; } /** @@ -321,7 +322,7 @@ export interface QuerySmartContractStateResponseAmino { data: any; } export interface QuerySmartContractStateResponseAminoMsg { - type: "wasm/QuerySmartContractStateResponse"; + type: 'wasm/QuerySmartContractStateResponse'; value: QuerySmartContractStateResponseAmino; } /** QueryCodeRequest is the request type for the Query/Code RPC method */ @@ -330,7 +331,7 @@ export interface QueryCodeRequest { codeId: bigint; } export interface QueryCodeRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryCodeRequest'; value: Uint8Array; } /** QueryCodeRequest is the request type for the Query/Code RPC method */ @@ -339,7 +340,7 @@ export interface QueryCodeRequestAmino { code_id: string; } export interface QueryCodeRequestAminoMsg { - type: "wasm/QueryCodeRequest"; + type: 'wasm/QueryCodeRequest'; value: QueryCodeRequestAmino; } /** CodeInfoResponse contains code meta data from CodeInfo */ @@ -350,7 +351,7 @@ export interface CodeInfoResponse { instantiatePermission: AccessConfig; } export interface CodeInfoResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse"; + typeUrl: '/cosmwasm.wasm.v1.CodeInfoResponse'; value: Uint8Array; } /** CodeInfoResponse contains code meta data from CodeInfo */ @@ -361,7 +362,7 @@ export interface CodeInfoResponseAmino { instantiate_permission: AccessConfigAmino; } export interface CodeInfoResponseAminoMsg { - type: "wasm/CodeInfoResponse"; + type: 'wasm/CodeInfoResponse'; value: CodeInfoResponseAmino; } /** QueryCodeResponse is the response type for the Query/Code RPC method */ @@ -370,7 +371,7 @@ export interface QueryCodeResponse { data: Uint8Array; } export interface QueryCodeResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryCodeResponse'; value: Uint8Array; } /** QueryCodeResponse is the response type for the Query/Code RPC method */ @@ -379,7 +380,7 @@ export interface QueryCodeResponseAmino { data: string; } export interface QueryCodeResponseAminoMsg { - type: "wasm/QueryCodeResponse"; + type: 'wasm/QueryCodeResponse'; value: QueryCodeResponseAmino; } /** QueryCodesRequest is the request type for the Query/Codes RPC method */ @@ -388,7 +389,7 @@ export interface QueryCodesRequest { pagination?: PageRequest; } export interface QueryCodesRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryCodesRequest'; value: Uint8Array; } /** QueryCodesRequest is the request type for the Query/Codes RPC method */ @@ -397,7 +398,7 @@ export interface QueryCodesRequestAmino { pagination?: PageRequestAmino; } export interface QueryCodesRequestAminoMsg { - type: "wasm/QueryCodesRequest"; + type: 'wasm/QueryCodesRequest'; value: QueryCodesRequestAmino; } /** QueryCodesResponse is the response type for the Query/Codes RPC method */ @@ -407,7 +408,7 @@ export interface QueryCodesResponse { pagination?: PageResponse; } export interface QueryCodesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryCodesResponse'; value: Uint8Array; } /** QueryCodesResponse is the response type for the Query/Codes RPC method */ @@ -417,7 +418,7 @@ export interface QueryCodesResponseAmino { pagination?: PageResponseAmino; } export interface QueryCodesResponseAminoMsg { - type: "wasm/QueryCodesResponse"; + type: 'wasm/QueryCodesResponse'; value: QueryCodesResponseAmino; } /** @@ -429,7 +430,7 @@ export interface QueryPinnedCodesRequest { pagination?: PageRequest; } export interface QueryPinnedCodesRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryPinnedCodesRequest'; value: Uint8Array; } /** @@ -441,7 +442,7 @@ export interface QueryPinnedCodesRequestAmino { pagination?: PageRequestAmino; } export interface QueryPinnedCodesRequestAminoMsg { - type: "wasm/QueryPinnedCodesRequest"; + type: 'wasm/QueryPinnedCodesRequest'; value: QueryPinnedCodesRequestAmino; } /** @@ -454,7 +455,7 @@ export interface QueryPinnedCodesResponse { pagination?: PageResponse; } export interface QueryPinnedCodesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryPinnedCodesResponse'; value: Uint8Array; } /** @@ -467,19 +468,19 @@ export interface QueryPinnedCodesResponseAmino { pagination?: PageResponseAmino; } export interface QueryPinnedCodesResponseAminoMsg { - type: "wasm/QueryPinnedCodesResponse"; + type: 'wasm/QueryPinnedCodesResponse'; value: QueryPinnedCodesResponseAmino; } /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryParamsRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryParamsRequest'; value: Uint8Array; } /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequestAmino {} export interface QueryParamsRequestAminoMsg { - type: "wasm/QueryParamsRequest"; + type: 'wasm/QueryParamsRequest'; value: QueryParamsRequestAmino; } /** QueryParamsResponse is the response type for the Query/Params RPC method. */ @@ -488,7 +489,7 @@ export interface QueryParamsResponse { params: Params; } export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryParamsResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryParamsResponse'; value: Uint8Array; } /** QueryParamsResponse is the response type for the Query/Params RPC method. */ @@ -497,7 +498,7 @@ export interface QueryParamsResponseAmino { params: ParamsAmino; } export interface QueryParamsResponseAminoMsg { - type: "wasm/QueryParamsResponse"; + type: 'wasm/QueryParamsResponse'; value: QueryParamsResponseAmino; } /** @@ -511,7 +512,7 @@ export interface QueryContractsByCreatorRequest { pagination?: PageRequest; } export interface QueryContractsByCreatorRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCreatorRequest'; value: Uint8Array; } /** @@ -525,7 +526,7 @@ export interface QueryContractsByCreatorRequestAmino { pagination?: PageRequestAmino; } export interface QueryContractsByCreatorRequestAminoMsg { - type: "wasm/QueryContractsByCreatorRequest"; + type: 'wasm/QueryContractsByCreatorRequest'; value: QueryContractsByCreatorRequestAmino; } /** @@ -539,7 +540,7 @@ export interface QueryContractsByCreatorResponse { pagination?: PageResponse; } export interface QueryContractsByCreatorResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCreatorResponse'; value: Uint8Array; } /** @@ -553,7 +554,7 @@ export interface QueryContractsByCreatorResponseAmino { pagination?: PageResponseAmino; } export interface QueryContractsByCreatorResponseAminoMsg { - type: "wasm/QueryContractsByCreatorResponse"; + type: 'wasm/QueryContractsByCreatorResponse'; value: QueryContractsByCreatorResponseAmino; } /** @@ -574,7 +575,7 @@ export interface QueryBuildAddressRequest { initArgs: Uint8Array; } export interface QueryBuildAddressRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressRequest"; + typeUrl: '/cosmwasm.wasm.v1.QueryBuildAddressRequest'; value: Uint8Array; } /** @@ -595,7 +596,7 @@ export interface QueryBuildAddressRequestAmino { init_args: string; } export interface QueryBuildAddressRequestAminoMsg { - type: "wasm/QueryBuildAddressRequest"; + type: 'wasm/QueryBuildAddressRequest'; value: QueryBuildAddressRequestAmino; } /** @@ -607,7 +608,7 @@ export interface QueryBuildAddressResponse { address: string; } export interface QueryBuildAddressResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressResponse"; + typeUrl: '/cosmwasm.wasm.v1.QueryBuildAddressResponse'; value: Uint8Array; } /** @@ -619,25 +620,25 @@ export interface QueryBuildAddressResponseAmino { address: string; } export interface QueryBuildAddressResponseAminoMsg { - type: "wasm/QueryBuildAddressResponse"; + type: 'wasm/QueryBuildAddressResponse'; value: QueryBuildAddressResponseAmino; } function createBaseQueryContractInfoRequest(): QueryContractInfoRequest { return { - address: "" + address: '' }; } export const QueryContractInfoRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", - aminoType: "wasm/QueryContractInfoRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractInfoRequest', + aminoType: 'wasm/QueryContractInfoRequest', is(o: any): o is QueryContractInfoRequest { - return o && (o.$typeUrl === QueryContractInfoRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryContractInfoRequest.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is QueryContractInfoRequestAmino { - return o && (o.$typeUrl === QueryContractInfoRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryContractInfoRequest.typeUrl || typeof o.address === 'string'); }, encode(message: QueryContractInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } return writer; @@ -649,19 +650,19 @@ export const QueryContractInfoRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryContractInfoRequest { const message = createBaseQueryContractInfoRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; return message; }, fromAmino(object: QueryContractInfoRequestAmino): QueryContractInfoRequest { @@ -673,7 +674,7 @@ export const QueryContractInfoRequest = { }, toAmino(message: QueryContractInfoRequest): QueryContractInfoRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryContractInfoRequestAminoMsg): QueryContractInfoRequest { @@ -681,7 +682,7 @@ export const QueryContractInfoRequest = { }, toAminoMsg(message: QueryContractInfoRequest): QueryContractInfoRequestAminoMsg { return { - type: "wasm/QueryContractInfoRequest", + type: 'wasm/QueryContractInfoRequest', value: QueryContractInfoRequest.toAmino(message) }; }, @@ -693,7 +694,7 @@ export const QueryContractInfoRequest = { }, toProtoMsg(message: QueryContractInfoRequest): QueryContractInfoRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractInfoRequest', value: QueryContractInfoRequest.encode(message).finish() }; } @@ -702,21 +703,21 @@ GlobalDecoderRegistry.register(QueryContractInfoRequest.typeUrl, QueryContractIn GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoRequest.aminoType, QueryContractInfoRequest.typeUrl); function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { return { - address: "", + address: '', contractInfo: ContractInfo.fromPartial({}) }; } export const QueryContractInfoResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", - aminoType: "wasm/QueryContractInfoResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractInfoResponse', + aminoType: 'wasm/QueryContractInfoResponse', is(o: any): o is QueryContractInfoResponse { - return o && (o.$typeUrl === QueryContractInfoResponse.typeUrl || typeof o.address === "string" && ContractInfo.is(o.contractInfo)); + return o && (o.$typeUrl === QueryContractInfoResponse.typeUrl || typeof o.address === 'string' && ContractInfo.is(o.contractInfo)); }, isAmino(o: any): o is QueryContractInfoResponseAmino { - return o && (o.$typeUrl === QueryContractInfoResponse.typeUrl || typeof o.address === "string" && ContractInfo.isAmino(o.contract_info)); + return o && (o.$typeUrl === QueryContractInfoResponse.typeUrl || typeof o.address === 'string' && ContractInfo.isAmino(o.contract_info)); }, encode(message: QueryContractInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.contractInfo !== undefined) { @@ -731,22 +732,22 @@ export const QueryContractInfoResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.contractInfo = ContractInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.contractInfo = ContractInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryContractInfoResponse { const message = createBaseQueryContractInfoResponse(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.contractInfo = object.contractInfo !== undefined && object.contractInfo !== null ? ContractInfo.fromPartial(object.contractInfo) : undefined; return message; }, @@ -762,7 +763,7 @@ export const QueryContractInfoResponse = { }, toAmino(message: QueryContractInfoResponse): QueryContractInfoResponseAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo) : ContractInfo.toAmino(ContractInfo.fromPartial({})); return obj; }, @@ -771,7 +772,7 @@ export const QueryContractInfoResponse = { }, toAminoMsg(message: QueryContractInfoResponse): QueryContractInfoResponseAminoMsg { return { - type: "wasm/QueryContractInfoResponse", + type: 'wasm/QueryContractInfoResponse', value: QueryContractInfoResponse.toAmino(message) }; }, @@ -783,7 +784,7 @@ export const QueryContractInfoResponse = { }, toProtoMsg(message: QueryContractInfoResponse): QueryContractInfoResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractInfoResponse', value: QueryContractInfoResponse.encode(message).finish() }; } @@ -792,21 +793,21 @@ GlobalDecoderRegistry.register(QueryContractInfoResponse.typeUrl, QueryContractI GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoResponse.aminoType, QueryContractInfoResponse.typeUrl); function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { return { - address: "", + address: '', pagination: undefined }; } export const QueryContractHistoryRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", - aminoType: "wasm/QueryContractHistoryRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractHistoryRequest', + aminoType: 'wasm/QueryContractHistoryRequest', is(o: any): o is QueryContractHistoryRequest { - return o && (o.$typeUrl === QueryContractHistoryRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryContractHistoryRequest.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is QueryContractHistoryRequestAmino { - return o && (o.$typeUrl === QueryContractHistoryRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryContractHistoryRequest.typeUrl || typeof o.address === 'string'); }, encode(message: QueryContractHistoryRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.pagination !== undefined) { @@ -821,22 +822,22 @@ export const QueryContractHistoryRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryContractHistoryRequest { const message = createBaseQueryContractHistoryRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -852,7 +853,7 @@ export const QueryContractHistoryRequest = { }, toAmino(message: QueryContractHistoryRequest): QueryContractHistoryRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -861,7 +862,7 @@ export const QueryContractHistoryRequest = { }, toAminoMsg(message: QueryContractHistoryRequest): QueryContractHistoryRequestAminoMsg { return { - type: "wasm/QueryContractHistoryRequest", + type: 'wasm/QueryContractHistoryRequest', value: QueryContractHistoryRequest.toAmino(message) }; }, @@ -873,7 +874,7 @@ export const QueryContractHistoryRequest = { }, toProtoMsg(message: QueryContractHistoryRequest): QueryContractHistoryRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractHistoryRequest', value: QueryContractHistoryRequest.encode(message).finish() }; } @@ -887,8 +888,8 @@ function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse }; } export const QueryContractHistoryResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", - aminoType: "wasm/QueryContractHistoryResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractHistoryResponse', + aminoType: 'wasm/QueryContractHistoryResponse', is(o: any): o is QueryContractHistoryResponse { return o && (o.$typeUrl === QueryContractHistoryResponse.typeUrl || Array.isArray(o.entries) && (!o.entries.length || ContractCodeHistoryEntry.is(o.entries[0]))); }, @@ -911,15 +912,15 @@ export const QueryContractHistoryResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.entries.push(ContractCodeHistoryEntry.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.entries.push(ContractCodeHistoryEntry.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -953,7 +954,7 @@ export const QueryContractHistoryResponse = { }, toAminoMsg(message: QueryContractHistoryResponse): QueryContractHistoryResponseAminoMsg { return { - type: "wasm/QueryContractHistoryResponse", + type: 'wasm/QueryContractHistoryResponse', value: QueryContractHistoryResponse.toAmino(message) }; }, @@ -965,7 +966,7 @@ export const QueryContractHistoryResponse = { }, toProtoMsg(message: QueryContractHistoryResponse): QueryContractHistoryResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractHistoryResponse', value: QueryContractHistoryResponse.encode(message).finish() }; } @@ -979,13 +980,13 @@ function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { }; } export const QueryContractsByCodeRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", - aminoType: "wasm/QueryContractsByCodeRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCodeRequest', + aminoType: 'wasm/QueryContractsByCodeRequest', is(o: any): o is QueryContractsByCodeRequest { - return o && (o.$typeUrl === QueryContractsByCodeRequest.typeUrl || typeof o.codeId === "bigint"); + return o && (o.$typeUrl === QueryContractsByCodeRequest.typeUrl || typeof o.codeId === 'bigint'); }, isAmino(o: any): o is QueryContractsByCodeRequestAmino { - return o && (o.$typeUrl === QueryContractsByCodeRequest.typeUrl || typeof o.code_id === "bigint"); + return o && (o.$typeUrl === QueryContractsByCodeRequest.typeUrl || typeof o.code_id === 'bigint'); }, encode(message: QueryContractsByCodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeId !== BigInt(0)) { @@ -1003,15 +1004,15 @@ export const QueryContractsByCodeRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1043,7 +1044,7 @@ export const QueryContractsByCodeRequest = { }, toAminoMsg(message: QueryContractsByCodeRequest): QueryContractsByCodeRequestAminoMsg { return { - type: "wasm/QueryContractsByCodeRequest", + type: 'wasm/QueryContractsByCodeRequest', value: QueryContractsByCodeRequest.toAmino(message) }; }, @@ -1055,7 +1056,7 @@ export const QueryContractsByCodeRequest = { }, toProtoMsg(message: QueryContractsByCodeRequest): QueryContractsByCodeRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCodeRequest', value: QueryContractsByCodeRequest.encode(message).finish() }; } @@ -1069,13 +1070,13 @@ function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse }; } export const QueryContractsByCodeResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", - aminoType: "wasm/QueryContractsByCodeResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCodeResponse', + aminoType: 'wasm/QueryContractsByCodeResponse', is(o: any): o is QueryContractsByCodeResponse { - return o && (o.$typeUrl === QueryContractsByCodeResponse.typeUrl || Array.isArray(o.contracts) && (!o.contracts.length || typeof o.contracts[0] === "string")); + return o && (o.$typeUrl === QueryContractsByCodeResponse.typeUrl || Array.isArray(o.contracts) && (!o.contracts.length || typeof o.contracts[0] === 'string')); }, isAmino(o: any): o is QueryContractsByCodeResponseAmino { - return o && (o.$typeUrl === QueryContractsByCodeResponse.typeUrl || Array.isArray(o.contracts) && (!o.contracts.length || typeof o.contracts[0] === "string")); + return o && (o.$typeUrl === QueryContractsByCodeResponse.typeUrl || Array.isArray(o.contracts) && (!o.contracts.length || typeof o.contracts[0] === 'string')); }, encode(message: QueryContractsByCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.contracts) { @@ -1093,15 +1094,15 @@ export const QueryContractsByCodeResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.contracts.push(reader.string()); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.contracts.push(reader.string()); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1135,7 +1136,7 @@ export const QueryContractsByCodeResponse = { }, toAminoMsg(message: QueryContractsByCodeResponse): QueryContractsByCodeResponseAminoMsg { return { - type: "wasm/QueryContractsByCodeResponse", + type: 'wasm/QueryContractsByCodeResponse', value: QueryContractsByCodeResponse.toAmino(message) }; }, @@ -1147,7 +1148,7 @@ export const QueryContractsByCodeResponse = { }, toProtoMsg(message: QueryContractsByCodeResponse): QueryContractsByCodeResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCodeResponse', value: QueryContractsByCodeResponse.encode(message).finish() }; } @@ -1156,21 +1157,21 @@ GlobalDecoderRegistry.register(QueryContractsByCodeResponse.typeUrl, QueryContra GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeResponse.aminoType, QueryContractsByCodeResponse.typeUrl); function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { return { - address: "", + address: '', pagination: undefined }; } export const QueryAllContractStateRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", - aminoType: "wasm/QueryAllContractStateRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryAllContractStateRequest', + aminoType: 'wasm/QueryAllContractStateRequest', is(o: any): o is QueryAllContractStateRequest { - return o && (o.$typeUrl === QueryAllContractStateRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryAllContractStateRequest.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is QueryAllContractStateRequestAmino { - return o && (o.$typeUrl === QueryAllContractStateRequest.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryAllContractStateRequest.typeUrl || typeof o.address === 'string'); }, encode(message: QueryAllContractStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.pagination !== undefined) { @@ -1185,22 +1186,22 @@ export const QueryAllContractStateRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryAllContractStateRequest { const message = createBaseQueryAllContractStateRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -1216,7 +1217,7 @@ export const QueryAllContractStateRequest = { }, toAmino(message: QueryAllContractStateRequest): QueryAllContractStateRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -1225,7 +1226,7 @@ export const QueryAllContractStateRequest = { }, toAminoMsg(message: QueryAllContractStateRequest): QueryAllContractStateRequestAminoMsg { return { - type: "wasm/QueryAllContractStateRequest", + type: 'wasm/QueryAllContractStateRequest', value: QueryAllContractStateRequest.toAmino(message) }; }, @@ -1237,7 +1238,7 @@ export const QueryAllContractStateRequest = { }, toProtoMsg(message: QueryAllContractStateRequest): QueryAllContractStateRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryAllContractStateRequest', value: QueryAllContractStateRequest.encode(message).finish() }; } @@ -1251,8 +1252,8 @@ function createBaseQueryAllContractStateResponse(): QueryAllContractStateRespons }; } export const QueryAllContractStateResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", - aminoType: "wasm/QueryAllContractStateResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryAllContractStateResponse', + aminoType: 'wasm/QueryAllContractStateResponse', is(o: any): o is QueryAllContractStateResponse { return o && (o.$typeUrl === QueryAllContractStateResponse.typeUrl || Array.isArray(o.models) && (!o.models.length || Model.is(o.models[0]))); }, @@ -1275,15 +1276,15 @@ export const QueryAllContractStateResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.models.push(Model.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.models.push(Model.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1317,7 +1318,7 @@ export const QueryAllContractStateResponse = { }, toAminoMsg(message: QueryAllContractStateResponse): QueryAllContractStateResponseAminoMsg { return { - type: "wasm/QueryAllContractStateResponse", + type: 'wasm/QueryAllContractStateResponse', value: QueryAllContractStateResponse.toAmino(message) }; }, @@ -1329,7 +1330,7 @@ export const QueryAllContractStateResponse = { }, toProtoMsg(message: QueryAllContractStateResponse): QueryAllContractStateResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryAllContractStateResponse', value: QueryAllContractStateResponse.encode(message).finish() }; } @@ -1338,21 +1339,21 @@ GlobalDecoderRegistry.register(QueryAllContractStateResponse.typeUrl, QueryAllCo GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateResponse.aminoType, QueryAllContractStateResponse.typeUrl); function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { return { - address: "", + address: '', queryData: new Uint8Array() }; } export const QueryRawContractStateRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", - aminoType: "wasm/QueryRawContractStateRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryRawContractStateRequest', + aminoType: 'wasm/QueryRawContractStateRequest', is(o: any): o is QueryRawContractStateRequest { - return o && (o.$typeUrl === QueryRawContractStateRequest.typeUrl || typeof o.address === "string" && (o.queryData instanceof Uint8Array || typeof o.queryData === "string")); + return o && (o.$typeUrl === QueryRawContractStateRequest.typeUrl || typeof o.address === 'string' && (o.queryData instanceof Uint8Array || typeof o.queryData === 'string')); }, isAmino(o: any): o is QueryRawContractStateRequestAmino { - return o && (o.$typeUrl === QueryRawContractStateRequest.typeUrl || typeof o.address === "string" && (o.query_data instanceof Uint8Array || typeof o.query_data === "string")); + return o && (o.$typeUrl === QueryRawContractStateRequest.typeUrl || typeof o.address === 'string' && (o.query_data instanceof Uint8Array || typeof o.query_data === 'string')); }, encode(message: QueryRawContractStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.queryData.length !== 0) { @@ -1367,22 +1368,22 @@ export const QueryRawContractStateRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.queryData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryRawContractStateRequest { const message = createBaseQueryRawContractStateRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.queryData = object.queryData ?? new Uint8Array(); return message; }, @@ -1398,7 +1399,7 @@ export const QueryRawContractStateRequest = { }, toAmino(message: QueryRawContractStateRequest): QueryRawContractStateRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.query_data = message.queryData ? base64FromBytes(message.queryData) : undefined; return obj; }, @@ -1407,7 +1408,7 @@ export const QueryRawContractStateRequest = { }, toAminoMsg(message: QueryRawContractStateRequest): QueryRawContractStateRequestAminoMsg { return { - type: "wasm/QueryRawContractStateRequest", + type: 'wasm/QueryRawContractStateRequest', value: QueryRawContractStateRequest.toAmino(message) }; }, @@ -1419,7 +1420,7 @@ export const QueryRawContractStateRequest = { }, toProtoMsg(message: QueryRawContractStateRequest): QueryRawContractStateRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryRawContractStateRequest', value: QueryRawContractStateRequest.encode(message).finish() }; } @@ -1432,13 +1433,13 @@ function createBaseQueryRawContractStateResponse(): QueryRawContractStateRespons }; } export const QueryRawContractStateResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", - aminoType: "wasm/QueryRawContractStateResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryRawContractStateResponse', + aminoType: 'wasm/QueryRawContractStateResponse', is(o: any): o is QueryRawContractStateResponse { - return o && (o.$typeUrl === QueryRawContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === QueryRawContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, isAmino(o: any): o is QueryRawContractStateResponseAmino { - return o && (o.$typeUrl === QueryRawContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === QueryRawContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, encode(message: QueryRawContractStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.data.length !== 0) { @@ -1453,12 +1454,12 @@ export const QueryRawContractStateResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1485,7 +1486,7 @@ export const QueryRawContractStateResponse = { }, toAminoMsg(message: QueryRawContractStateResponse): QueryRawContractStateResponseAminoMsg { return { - type: "wasm/QueryRawContractStateResponse", + type: 'wasm/QueryRawContractStateResponse', value: QueryRawContractStateResponse.toAmino(message) }; }, @@ -1497,7 +1498,7 @@ export const QueryRawContractStateResponse = { }, toProtoMsg(message: QueryRawContractStateResponse): QueryRawContractStateResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryRawContractStateResponse', value: QueryRawContractStateResponse.encode(message).finish() }; } @@ -1506,21 +1507,21 @@ GlobalDecoderRegistry.register(QueryRawContractStateResponse.typeUrl, QueryRawCo GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateResponse.aminoType, QueryRawContractStateResponse.typeUrl); function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { return { - address: "", + address: '', queryData: new Uint8Array() }; } export const QuerySmartContractStateRequest = { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", - aminoType: "wasm/QuerySmartContractStateRequest", + typeUrl: '/cosmwasm.wasm.v1.QuerySmartContractStateRequest', + aminoType: 'wasm/QuerySmartContractStateRequest', is(o: any): o is QuerySmartContractStateRequest { - return o && (o.$typeUrl === QuerySmartContractStateRequest.typeUrl || typeof o.address === "string" && (o.queryData instanceof Uint8Array || typeof o.queryData === "string")); + return o && (o.$typeUrl === QuerySmartContractStateRequest.typeUrl || typeof o.address === 'string' && (o.queryData instanceof Uint8Array || typeof o.queryData === 'string')); }, isAmino(o: any): o is QuerySmartContractStateRequestAmino { - return o && (o.$typeUrl === QuerySmartContractStateRequest.typeUrl || typeof o.address === "string" && (o.query_data instanceof Uint8Array || typeof o.query_data === "string")); + return o && (o.$typeUrl === QuerySmartContractStateRequest.typeUrl || typeof o.address === 'string' && (o.query_data instanceof Uint8Array || typeof o.query_data === 'string')); }, encode(message: QuerySmartContractStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.queryData.length !== 0) { @@ -1535,22 +1536,22 @@ export const QuerySmartContractStateRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.queryData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QuerySmartContractStateRequest { const message = createBaseQuerySmartContractStateRequest(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.queryData = object.queryData ?? new Uint8Array(); return message; }, @@ -1566,7 +1567,7 @@ export const QuerySmartContractStateRequest = { }, toAmino(message: QuerySmartContractStateRequest): QuerySmartContractStateRequestAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.query_data = message.queryData ? JSON.parse(fromUtf8(message.queryData)) : undefined; return obj; }, @@ -1575,7 +1576,7 @@ export const QuerySmartContractStateRequest = { }, toAminoMsg(message: QuerySmartContractStateRequest): QuerySmartContractStateRequestAminoMsg { return { - type: "wasm/QuerySmartContractStateRequest", + type: 'wasm/QuerySmartContractStateRequest', value: QuerySmartContractStateRequest.toAmino(message) }; }, @@ -1587,7 +1588,7 @@ export const QuerySmartContractStateRequest = { }, toProtoMsg(message: QuerySmartContractStateRequest): QuerySmartContractStateRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", + typeUrl: '/cosmwasm.wasm.v1.QuerySmartContractStateRequest', value: QuerySmartContractStateRequest.encode(message).finish() }; } @@ -1600,13 +1601,13 @@ function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateRes }; } export const QuerySmartContractStateResponse = { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", - aminoType: "wasm/QuerySmartContractStateResponse", + typeUrl: '/cosmwasm.wasm.v1.QuerySmartContractStateResponse', + aminoType: 'wasm/QuerySmartContractStateResponse', is(o: any): o is QuerySmartContractStateResponse { - return o && (o.$typeUrl === QuerySmartContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === QuerySmartContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, isAmino(o: any): o is QuerySmartContractStateResponseAmino { - return o && (o.$typeUrl === QuerySmartContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === QuerySmartContractStateResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, encode(message: QuerySmartContractStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.data.length !== 0) { @@ -1621,12 +1622,12 @@ export const QuerySmartContractStateResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1653,7 +1654,7 @@ export const QuerySmartContractStateResponse = { }, toAminoMsg(message: QuerySmartContractStateResponse): QuerySmartContractStateResponseAminoMsg { return { - type: "wasm/QuerySmartContractStateResponse", + type: 'wasm/QuerySmartContractStateResponse', value: QuerySmartContractStateResponse.toAmino(message) }; }, @@ -1665,7 +1666,7 @@ export const QuerySmartContractStateResponse = { }, toProtoMsg(message: QuerySmartContractStateResponse): QuerySmartContractStateResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", + typeUrl: '/cosmwasm.wasm.v1.QuerySmartContractStateResponse', value: QuerySmartContractStateResponse.encode(message).finish() }; } @@ -1678,13 +1679,13 @@ function createBaseQueryCodeRequest(): QueryCodeRequest { }; } export const QueryCodeRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", - aminoType: "wasm/QueryCodeRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryCodeRequest', + aminoType: 'wasm/QueryCodeRequest', is(o: any): o is QueryCodeRequest { - return o && (o.$typeUrl === QueryCodeRequest.typeUrl || typeof o.codeId === "bigint"); + return o && (o.$typeUrl === QueryCodeRequest.typeUrl || typeof o.codeId === 'bigint'); }, isAmino(o: any): o is QueryCodeRequestAmino { - return o && (o.$typeUrl === QueryCodeRequest.typeUrl || typeof o.code_id === "bigint"); + return o && (o.$typeUrl === QueryCodeRequest.typeUrl || typeof o.code_id === 'bigint'); }, encode(message: QueryCodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeId !== BigInt(0)) { @@ -1699,12 +1700,12 @@ export const QueryCodeRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1731,7 +1732,7 @@ export const QueryCodeRequest = { }, toAminoMsg(message: QueryCodeRequest): QueryCodeRequestAminoMsg { return { - type: "wasm/QueryCodeRequest", + type: 'wasm/QueryCodeRequest', value: QueryCodeRequest.toAmino(message) }; }, @@ -1743,7 +1744,7 @@ export const QueryCodeRequest = { }, toProtoMsg(message: QueryCodeRequest): QueryCodeRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryCodeRequest', value: QueryCodeRequest.encode(message).finish() }; } @@ -1753,25 +1754,25 @@ GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeRequest.aminoType, Quer function createBaseCodeInfoResponse(): CodeInfoResponse { return { codeId: BigInt(0), - creator: "", + creator: '', dataHash: new Uint8Array(), instantiatePermission: AccessConfig.fromPartial({}) }; } export const CodeInfoResponse = { - typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", - aminoType: "wasm/CodeInfoResponse", + typeUrl: '/cosmwasm.wasm.v1.CodeInfoResponse', + aminoType: 'wasm/CodeInfoResponse', is(o: any): o is CodeInfoResponse { - return o && (o.$typeUrl === CodeInfoResponse.typeUrl || typeof o.codeId === "bigint" && typeof o.creator === "string" && (o.dataHash instanceof Uint8Array || typeof o.dataHash === "string") && AccessConfig.is(o.instantiatePermission)); + return o && (o.$typeUrl === CodeInfoResponse.typeUrl || typeof o.codeId === 'bigint' && typeof o.creator === 'string' && (o.dataHash instanceof Uint8Array || typeof o.dataHash === 'string') && AccessConfig.is(o.instantiatePermission)); }, isAmino(o: any): o is CodeInfoResponseAmino { - return o && (o.$typeUrl === CodeInfoResponse.typeUrl || typeof o.code_id === "bigint" && typeof o.creator === "string" && (o.data_hash instanceof Uint8Array || typeof o.data_hash === "string") && AccessConfig.isAmino(o.instantiate_permission)); + return o && (o.$typeUrl === CodeInfoResponse.typeUrl || typeof o.code_id === 'bigint' && typeof o.creator === 'string' && (o.data_hash instanceof Uint8Array || typeof o.data_hash === 'string') && AccessConfig.isAmino(o.instantiate_permission)); }, encode(message: CodeInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeId !== BigInt(0)) { writer.uint32(8).uint64(message.codeId); } - if (message.creator !== "") { + if (message.creator !== '') { writer.uint32(18).string(message.creator); } if (message.dataHash.length !== 0) { @@ -1789,21 +1790,21 @@ export const CodeInfoResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.dataHash = reader.bytes(); - break; - case 6: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.creator = reader.string(); + break; + case 3: + message.dataHash = reader.bytes(); + break; + case 6: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1811,7 +1812,7 @@ export const CodeInfoResponse = { fromPartial(object: DeepPartial): CodeInfoResponse { const message = createBaseCodeInfoResponse(); message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.creator = object.creator ?? ""; + message.creator = object.creator ?? ''; message.dataHash = object.dataHash ?? new Uint8Array(); message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; return message; @@ -1834,8 +1835,8 @@ export const CodeInfoResponse = { }, toAmino(message: CodeInfoResponse): CodeInfoResponseAmino { const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : "0"; - obj.creator = message.creator === "" ? undefined : message.creator; + obj.code_id = message.codeId ? message.codeId.toString() : '0'; + obj.creator = message.creator === '' ? undefined : message.creator; obj.data_hash = message.dataHash ? base64FromBytes(message.dataHash) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : AccessConfig.toAmino(AccessConfig.fromPartial({})); return obj; @@ -1845,7 +1846,7 @@ export const CodeInfoResponse = { }, toAminoMsg(message: CodeInfoResponse): CodeInfoResponseAminoMsg { return { - type: "wasm/CodeInfoResponse", + type: 'wasm/CodeInfoResponse', value: CodeInfoResponse.toAmino(message) }; }, @@ -1857,7 +1858,7 @@ export const CodeInfoResponse = { }, toProtoMsg(message: CodeInfoResponse): CodeInfoResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", + typeUrl: '/cosmwasm.wasm.v1.CodeInfoResponse', value: CodeInfoResponse.encode(message).finish() }; } @@ -1871,13 +1872,13 @@ function createBaseQueryCodeResponse(): QueryCodeResponse { }; } export const QueryCodeResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", - aminoType: "wasm/QueryCodeResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryCodeResponse', + aminoType: 'wasm/QueryCodeResponse', is(o: any): o is QueryCodeResponse { - return o && (o.$typeUrl === QueryCodeResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === QueryCodeResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, isAmino(o: any): o is QueryCodeResponseAmino { - return o && (o.$typeUrl === QueryCodeResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === QueryCodeResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, encode(message: QueryCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeInfo !== undefined) { @@ -1895,15 +1896,15 @@ export const QueryCodeResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeInfo = CodeInfoResponse.decode(reader, reader.uint32()); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeInfo = CodeInfoResponse.decode(reader, reader.uint32()); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1927,7 +1928,7 @@ export const QueryCodeResponse = { toAmino(message: QueryCodeResponse): QueryCodeResponseAmino { const obj: any = {}; obj.code_info = message.codeInfo ? CodeInfoResponse.toAmino(message.codeInfo) : undefined; - obj.data = message.data ? base64FromBytes(message.data) : ""; + obj.data = message.data ? base64FromBytes(message.data) : ''; return obj; }, fromAminoMsg(object: QueryCodeResponseAminoMsg): QueryCodeResponse { @@ -1935,7 +1936,7 @@ export const QueryCodeResponse = { }, toAminoMsg(message: QueryCodeResponse): QueryCodeResponseAminoMsg { return { - type: "wasm/QueryCodeResponse", + type: 'wasm/QueryCodeResponse', value: QueryCodeResponse.toAmino(message) }; }, @@ -1947,7 +1948,7 @@ export const QueryCodeResponse = { }, toProtoMsg(message: QueryCodeResponse): QueryCodeResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryCodeResponse', value: QueryCodeResponse.encode(message).finish() }; } @@ -1960,8 +1961,8 @@ function createBaseQueryCodesRequest(): QueryCodesRequest { }; } export const QueryCodesRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", - aminoType: "wasm/QueryCodesRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryCodesRequest', + aminoType: 'wasm/QueryCodesRequest', is(o: any): o is QueryCodesRequest { return o && o.$typeUrl === QueryCodesRequest.typeUrl; }, @@ -1981,12 +1982,12 @@ export const QueryCodesRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2013,7 +2014,7 @@ export const QueryCodesRequest = { }, toAminoMsg(message: QueryCodesRequest): QueryCodesRequestAminoMsg { return { - type: "wasm/QueryCodesRequest", + type: 'wasm/QueryCodesRequest', value: QueryCodesRequest.toAmino(message) }; }, @@ -2025,7 +2026,7 @@ export const QueryCodesRequest = { }, toProtoMsg(message: QueryCodesRequest): QueryCodesRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryCodesRequest', value: QueryCodesRequest.encode(message).finish() }; } @@ -2039,8 +2040,8 @@ function createBaseQueryCodesResponse(): QueryCodesResponse { }; } export const QueryCodesResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", - aminoType: "wasm/QueryCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryCodesResponse', + aminoType: 'wasm/QueryCodesResponse', is(o: any): o is QueryCodesResponse { return o && (o.$typeUrl === QueryCodesResponse.typeUrl || Array.isArray(o.codeInfos) && (!o.codeInfos.length || CodeInfoResponse.is(o.codeInfos[0]))); }, @@ -2063,15 +2064,15 @@ export const QueryCodesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeInfos.push(CodeInfoResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeInfos.push(CodeInfoResponse.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2105,7 +2106,7 @@ export const QueryCodesResponse = { }, toAminoMsg(message: QueryCodesResponse): QueryCodesResponseAminoMsg { return { - type: "wasm/QueryCodesResponse", + type: 'wasm/QueryCodesResponse', value: QueryCodesResponse.toAmino(message) }; }, @@ -2117,7 +2118,7 @@ export const QueryCodesResponse = { }, toProtoMsg(message: QueryCodesResponse): QueryCodesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryCodesResponse', value: QueryCodesResponse.encode(message).finish() }; } @@ -2130,8 +2131,8 @@ function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { }; } export const QueryPinnedCodesRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", - aminoType: "wasm/QueryPinnedCodesRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryPinnedCodesRequest', + aminoType: 'wasm/QueryPinnedCodesRequest', is(o: any): o is QueryPinnedCodesRequest { return o && o.$typeUrl === QueryPinnedCodesRequest.typeUrl; }, @@ -2151,12 +2152,12 @@ export const QueryPinnedCodesRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2183,7 +2184,7 @@ export const QueryPinnedCodesRequest = { }, toAminoMsg(message: QueryPinnedCodesRequest): QueryPinnedCodesRequestAminoMsg { return { - type: "wasm/QueryPinnedCodesRequest", + type: 'wasm/QueryPinnedCodesRequest', value: QueryPinnedCodesRequest.toAmino(message) }; }, @@ -2195,7 +2196,7 @@ export const QueryPinnedCodesRequest = { }, toProtoMsg(message: QueryPinnedCodesRequest): QueryPinnedCodesRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryPinnedCodesRequest', value: QueryPinnedCodesRequest.encode(message).finish() }; } @@ -2209,13 +2210,13 @@ function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { }; } export const QueryPinnedCodesResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", - aminoType: "wasm/QueryPinnedCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryPinnedCodesResponse', + aminoType: 'wasm/QueryPinnedCodesResponse', is(o: any): o is QueryPinnedCodesResponse { - return o && (o.$typeUrl === QueryPinnedCodesResponse.typeUrl || Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === "bigint")); + return o && (o.$typeUrl === QueryPinnedCodesResponse.typeUrl || Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === 'bigint')); }, isAmino(o: any): o is QueryPinnedCodesResponseAmino { - return o && (o.$typeUrl === QueryPinnedCodesResponse.typeUrl || Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === "bigint")); + return o && (o.$typeUrl === QueryPinnedCodesResponse.typeUrl || Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === 'bigint')); }, encode(message: QueryPinnedCodesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { writer.uint32(10).fork(); @@ -2235,22 +2236,22 @@ export const QueryPinnedCodesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } else { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.codeIds.push(reader.uint64()); } - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.codeIds.push(reader.uint64()); + } + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2284,7 +2285,7 @@ export const QueryPinnedCodesResponse = { }, toAminoMsg(message: QueryPinnedCodesResponse): QueryPinnedCodesResponseAminoMsg { return { - type: "wasm/QueryPinnedCodesResponse", + type: 'wasm/QueryPinnedCodesResponse', value: QueryPinnedCodesResponse.toAmino(message) }; }, @@ -2296,7 +2297,7 @@ export const QueryPinnedCodesResponse = { }, toProtoMsg(message: QueryPinnedCodesResponse): QueryPinnedCodesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryPinnedCodesResponse', value: QueryPinnedCodesResponse.encode(message).finish() }; } @@ -2307,8 +2308,8 @@ function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } export const QueryParamsRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryParamsRequest", - aminoType: "wasm/QueryParamsRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryParamsRequest', + aminoType: 'wasm/QueryParamsRequest', is(o: any): o is QueryParamsRequest { return o && o.$typeUrl === QueryParamsRequest.typeUrl; }, @@ -2325,9 +2326,9 @@ export const QueryParamsRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2349,7 +2350,7 @@ export const QueryParamsRequest = { }, toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { return { - type: "wasm/QueryParamsRequest", + type: 'wasm/QueryParamsRequest', value: QueryParamsRequest.toAmino(message) }; }, @@ -2361,7 +2362,7 @@ export const QueryParamsRequest = { }, toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryParamsRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryParamsRequest', value: QueryParamsRequest.encode(message).finish() }; } @@ -2374,8 +2375,8 @@ function createBaseQueryParamsResponse(): QueryParamsResponse { }; } export const QueryParamsResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryParamsResponse", - aminoType: "wasm/QueryParamsResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryParamsResponse', + aminoType: 'wasm/QueryParamsResponse', is(o: any): o is QueryParamsResponse { return o && (o.$typeUrl === QueryParamsResponse.typeUrl || Params.is(o.params)); }, @@ -2395,12 +2396,12 @@ export const QueryParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2427,7 +2428,7 @@ export const QueryParamsResponse = { }, toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { return { - type: "wasm/QueryParamsResponse", + type: 'wasm/QueryParamsResponse', value: QueryParamsResponse.toAmino(message) }; }, @@ -2439,7 +2440,7 @@ export const QueryParamsResponse = { }, toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryParamsResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryParamsResponse', value: QueryParamsResponse.encode(message).finish() }; } @@ -2448,21 +2449,21 @@ GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse) GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest { return { - creatorAddress: "", + creatorAddress: '', pagination: undefined }; } export const QueryContractsByCreatorRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest", - aminoType: "wasm/QueryContractsByCreatorRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCreatorRequest', + aminoType: 'wasm/QueryContractsByCreatorRequest', is(o: any): o is QueryContractsByCreatorRequest { - return o && (o.$typeUrl === QueryContractsByCreatorRequest.typeUrl || typeof o.creatorAddress === "string"); + return o && (o.$typeUrl === QueryContractsByCreatorRequest.typeUrl || typeof o.creatorAddress === 'string'); }, isAmino(o: any): o is QueryContractsByCreatorRequestAmino { - return o && (o.$typeUrl === QueryContractsByCreatorRequest.typeUrl || typeof o.creator_address === "string"); + return o && (o.$typeUrl === QueryContractsByCreatorRequest.typeUrl || typeof o.creator_address === 'string'); }, encode(message: QueryContractsByCreatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.creatorAddress !== "") { + if (message.creatorAddress !== '') { writer.uint32(10).string(message.creatorAddress); } if (message.pagination !== undefined) { @@ -2477,22 +2478,22 @@ export const QueryContractsByCreatorRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.creatorAddress = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.creatorAddress = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryContractsByCreatorRequest { const message = createBaseQueryContractsByCreatorRequest(); - message.creatorAddress = object.creatorAddress ?? ""; + message.creatorAddress = object.creatorAddress ?? ''; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, @@ -2508,7 +2509,7 @@ export const QueryContractsByCreatorRequest = { }, toAmino(message: QueryContractsByCreatorRequest): QueryContractsByCreatorRequestAmino { const obj: any = {}; - obj.creator_address = message.creatorAddress === "" ? undefined : message.creatorAddress; + obj.creator_address = message.creatorAddress === '' ? undefined : message.creatorAddress; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, @@ -2517,7 +2518,7 @@ export const QueryContractsByCreatorRequest = { }, toAminoMsg(message: QueryContractsByCreatorRequest): QueryContractsByCreatorRequestAminoMsg { return { - type: "wasm/QueryContractsByCreatorRequest", + type: 'wasm/QueryContractsByCreatorRequest', value: QueryContractsByCreatorRequest.toAmino(message) }; }, @@ -2529,7 +2530,7 @@ export const QueryContractsByCreatorRequest = { }, toProtoMsg(message: QueryContractsByCreatorRequest): QueryContractsByCreatorRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCreatorRequest', value: QueryContractsByCreatorRequest.encode(message).finish() }; } @@ -2543,13 +2544,13 @@ function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorRes }; } export const QueryContractsByCreatorResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse", - aminoType: "wasm/QueryContractsByCreatorResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCreatorResponse', + aminoType: 'wasm/QueryContractsByCreatorResponse', is(o: any): o is QueryContractsByCreatorResponse { - return o && (o.$typeUrl === QueryContractsByCreatorResponse.typeUrl || Array.isArray(o.contractAddresses) && (!o.contractAddresses.length || typeof o.contractAddresses[0] === "string")); + return o && (o.$typeUrl === QueryContractsByCreatorResponse.typeUrl || Array.isArray(o.contractAddresses) && (!o.contractAddresses.length || typeof o.contractAddresses[0] === 'string')); }, isAmino(o: any): o is QueryContractsByCreatorResponseAmino { - return o && (o.$typeUrl === QueryContractsByCreatorResponse.typeUrl || Array.isArray(o.contract_addresses) && (!o.contract_addresses.length || typeof o.contract_addresses[0] === "string")); + return o && (o.$typeUrl === QueryContractsByCreatorResponse.typeUrl || Array.isArray(o.contract_addresses) && (!o.contract_addresses.length || typeof o.contract_addresses[0] === 'string')); }, encode(message: QueryContractsByCreatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.contractAddresses) { @@ -2567,15 +2568,15 @@ export const QueryContractsByCreatorResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.contractAddresses.push(reader.string()); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.contractAddresses.push(reader.string()); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2609,7 +2610,7 @@ export const QueryContractsByCreatorResponse = { }, toAminoMsg(message: QueryContractsByCreatorResponse): QueryContractsByCreatorResponseAminoMsg { return { - type: "wasm/QueryContractsByCreatorResponse", + type: 'wasm/QueryContractsByCreatorResponse', value: QueryContractsByCreatorResponse.toAmino(message) }; }, @@ -2621,7 +2622,7 @@ export const QueryContractsByCreatorResponse = { }, toProtoMsg(message: QueryContractsByCreatorResponse): QueryContractsByCreatorResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryContractsByCreatorResponse', value: QueryContractsByCreatorResponse.encode(message).finish() }; } @@ -2630,29 +2631,29 @@ GlobalDecoderRegistry.register(QueryContractsByCreatorResponse.typeUrl, QueryCon GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorResponse.aminoType, QueryContractsByCreatorResponse.typeUrl); function createBaseQueryBuildAddressRequest(): QueryBuildAddressRequest { return { - codeHash: "", - creatorAddress: "", - salt: "", + codeHash: '', + creatorAddress: '', + salt: '', initArgs: new Uint8Array() }; } export const QueryBuildAddressRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressRequest", - aminoType: "wasm/QueryBuildAddressRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryBuildAddressRequest', + aminoType: 'wasm/QueryBuildAddressRequest', is(o: any): o is QueryBuildAddressRequest { - return o && (o.$typeUrl === QueryBuildAddressRequest.typeUrl || typeof o.codeHash === "string" && typeof o.creatorAddress === "string" && typeof o.salt === "string" && (o.initArgs instanceof Uint8Array || typeof o.initArgs === "string")); + return o && (o.$typeUrl === QueryBuildAddressRequest.typeUrl || typeof o.codeHash === 'string' && typeof o.creatorAddress === 'string' && typeof o.salt === 'string' && (o.initArgs instanceof Uint8Array || typeof o.initArgs === 'string')); }, isAmino(o: any): o is QueryBuildAddressRequestAmino { - return o && (o.$typeUrl === QueryBuildAddressRequest.typeUrl || typeof o.code_hash === "string" && typeof o.creator_address === "string" && typeof o.salt === "string" && (o.init_args instanceof Uint8Array || typeof o.init_args === "string")); + return o && (o.$typeUrl === QueryBuildAddressRequest.typeUrl || typeof o.code_hash === 'string' && typeof o.creator_address === 'string' && typeof o.salt === 'string' && (o.init_args instanceof Uint8Array || typeof o.init_args === 'string')); }, encode(message: QueryBuildAddressRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeHash !== "") { + if (message.codeHash !== '') { writer.uint32(10).string(message.codeHash); } - if (message.creatorAddress !== "") { + if (message.creatorAddress !== '') { writer.uint32(18).string(message.creatorAddress); } - if (message.salt !== "") { + if (message.salt !== '') { writer.uint32(26).string(message.salt); } if (message.initArgs.length !== 0) { @@ -2667,30 +2668,30 @@ export const QueryBuildAddressRequest = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeHash = reader.string(); - break; - case 2: - message.creatorAddress = reader.string(); - break; - case 3: - message.salt = reader.string(); - break; - case 4: - message.initArgs = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeHash = reader.string(); + break; + case 2: + message.creatorAddress = reader.string(); + break; + case 3: + message.salt = reader.string(); + break; + case 4: + message.initArgs = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryBuildAddressRequest { const message = createBaseQueryBuildAddressRequest(); - message.codeHash = object.codeHash ?? ""; - message.creatorAddress = object.creatorAddress ?? ""; - message.salt = object.salt ?? ""; + message.codeHash = object.codeHash ?? ''; + message.creatorAddress = object.creatorAddress ?? ''; + message.salt = object.salt ?? ''; message.initArgs = object.initArgs ?? new Uint8Array(); return message; }, @@ -2712,9 +2713,9 @@ export const QueryBuildAddressRequest = { }, toAmino(message: QueryBuildAddressRequest): QueryBuildAddressRequestAmino { const obj: any = {}; - obj.code_hash = message.codeHash === "" ? undefined : message.codeHash; - obj.creator_address = message.creatorAddress === "" ? undefined : message.creatorAddress; - obj.salt = message.salt === "" ? undefined : message.salt; + obj.code_hash = message.codeHash === '' ? undefined : message.codeHash; + obj.creator_address = message.creatorAddress === '' ? undefined : message.creatorAddress; + obj.salt = message.salt === '' ? undefined : message.salt; obj.init_args = message.initArgs ? base64FromBytes(message.initArgs) : undefined; return obj; }, @@ -2723,7 +2724,7 @@ export const QueryBuildAddressRequest = { }, toAminoMsg(message: QueryBuildAddressRequest): QueryBuildAddressRequestAminoMsg { return { - type: "wasm/QueryBuildAddressRequest", + type: 'wasm/QueryBuildAddressRequest', value: QueryBuildAddressRequest.toAmino(message) }; }, @@ -2735,7 +2736,7 @@ export const QueryBuildAddressRequest = { }, toProtoMsg(message: QueryBuildAddressRequest): QueryBuildAddressRequestProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressRequest", + typeUrl: '/cosmwasm.wasm.v1.QueryBuildAddressRequest', value: QueryBuildAddressRequest.encode(message).finish() }; } @@ -2744,20 +2745,20 @@ GlobalDecoderRegistry.register(QueryBuildAddressRequest.typeUrl, QueryBuildAddre GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressRequest.aminoType, QueryBuildAddressRequest.typeUrl); function createBaseQueryBuildAddressResponse(): QueryBuildAddressResponse { return { - address: "" + address: '' }; } export const QueryBuildAddressResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressResponse", - aminoType: "wasm/QueryBuildAddressResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryBuildAddressResponse', + aminoType: 'wasm/QueryBuildAddressResponse', is(o: any): o is QueryBuildAddressResponse { - return o && (o.$typeUrl === QueryBuildAddressResponse.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryBuildAddressResponse.typeUrl || typeof o.address === 'string'); }, isAmino(o: any): o is QueryBuildAddressResponseAmino { - return o && (o.$typeUrl === QueryBuildAddressResponse.typeUrl || typeof o.address === "string"); + return o && (o.$typeUrl === QueryBuildAddressResponse.typeUrl || typeof o.address === 'string'); }, encode(message: QueryBuildAddressResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } return writer; @@ -2769,19 +2770,19 @@ export const QueryBuildAddressResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): QueryBuildAddressResponse { const message = createBaseQueryBuildAddressResponse(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; return message; }, fromAmino(object: QueryBuildAddressResponseAmino): QueryBuildAddressResponse { @@ -2793,7 +2794,7 @@ export const QueryBuildAddressResponse = { }, toAmino(message: QueryBuildAddressResponse): QueryBuildAddressResponseAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; return obj; }, fromAminoMsg(object: QueryBuildAddressResponseAminoMsg): QueryBuildAddressResponse { @@ -2801,7 +2802,7 @@ export const QueryBuildAddressResponse = { }, toAminoMsg(message: QueryBuildAddressResponse): QueryBuildAddressResponseAminoMsg { return { - type: "wasm/QueryBuildAddressResponse", + type: 'wasm/QueryBuildAddressResponse', value: QueryBuildAddressResponse.toAmino(message) }; }, @@ -2813,7 +2814,7 @@ export const QueryBuildAddressResponse = { }, toProtoMsg(message: QueryBuildAddressResponse): QueryBuildAddressResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressResponse", + typeUrl: '/cosmwasm.wasm.v1.QueryBuildAddressResponse', value: QueryBuildAddressResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/tx.amino.ts b/libs/cosmos-types/cosmwasm/wasm/v1/tx.amino.ts index bdd72ab7..87b9f87e 100644 --- a/libs/cosmos-types/cosmwasm/wasm/v1/tx.amino.ts +++ b/libs/cosmos-types/cosmwasm/wasm/v1/tx.amino.ts @@ -1,87 +1,87 @@ -import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract, MsgRemoveCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddresses, MsgStoreAndMigrateContract, MsgUpdateContractLabel } from "./tx"; +import { MsgAddCodeUploadParamsAddresses, MsgClearAdmin, MsgExecuteContract, MsgInstantiateContract, MsgInstantiateContract2, MsgMigrateContract, MsgPinCodes, MsgRemoveCodeUploadParamsAddresses, MsgStoreAndInstantiateContract, MsgStoreAndMigrateContract, MsgStoreCode, MsgSudoContract, MsgUnpinCodes, MsgUpdateAdmin, MsgUpdateContractLabel,MsgUpdateInstantiateConfig, MsgUpdateParams } from './tx'; export const AminoConverter = { - "/cosmwasm.wasm.v1.MsgStoreCode": { - aminoType: "wasm/MsgStoreCode", + '/cosmwasm.wasm.v1.MsgStoreCode': { + aminoType: 'wasm/MsgStoreCode', toAmino: MsgStoreCode.toAmino, fromAmino: MsgStoreCode.fromAmino }, - "/cosmwasm.wasm.v1.MsgInstantiateContract": { - aminoType: "wasm/MsgInstantiateContract", + '/cosmwasm.wasm.v1.MsgInstantiateContract': { + aminoType: 'wasm/MsgInstantiateContract', toAmino: MsgInstantiateContract.toAmino, fromAmino: MsgInstantiateContract.fromAmino }, - "/cosmwasm.wasm.v1.MsgInstantiateContract2": { - aminoType: "wasm/MsgInstantiateContract2", + '/cosmwasm.wasm.v1.MsgInstantiateContract2': { + aminoType: 'wasm/MsgInstantiateContract2', toAmino: MsgInstantiateContract2.toAmino, fromAmino: MsgInstantiateContract2.fromAmino }, - "/cosmwasm.wasm.v1.MsgExecuteContract": { - aminoType: "wasm/MsgExecuteContract", + '/cosmwasm.wasm.v1.MsgExecuteContract': { + aminoType: 'wasm/MsgExecuteContract', toAmino: MsgExecuteContract.toAmino, fromAmino: MsgExecuteContract.fromAmino }, - "/cosmwasm.wasm.v1.MsgMigrateContract": { - aminoType: "wasm/MsgMigrateContract", + '/cosmwasm.wasm.v1.MsgMigrateContract': { + aminoType: 'wasm/MsgMigrateContract', toAmino: MsgMigrateContract.toAmino, fromAmino: MsgMigrateContract.fromAmino }, - "/cosmwasm.wasm.v1.MsgUpdateAdmin": { - aminoType: "wasm/MsgUpdateAdmin", + '/cosmwasm.wasm.v1.MsgUpdateAdmin': { + aminoType: 'wasm/MsgUpdateAdmin', toAmino: MsgUpdateAdmin.toAmino, fromAmino: MsgUpdateAdmin.fromAmino }, - "/cosmwasm.wasm.v1.MsgClearAdmin": { - aminoType: "wasm/MsgClearAdmin", + '/cosmwasm.wasm.v1.MsgClearAdmin': { + aminoType: 'wasm/MsgClearAdmin', toAmino: MsgClearAdmin.toAmino, fromAmino: MsgClearAdmin.fromAmino }, - "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig": { - aminoType: "wasm/MsgUpdateInstantiateConfig", + '/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig': { + aminoType: 'wasm/MsgUpdateInstantiateConfig', toAmino: MsgUpdateInstantiateConfig.toAmino, fromAmino: MsgUpdateInstantiateConfig.fromAmino }, - "/cosmwasm.wasm.v1.MsgUpdateParams": { - aminoType: "wasm/MsgUpdateParams", + '/cosmwasm.wasm.v1.MsgUpdateParams': { + aminoType: 'wasm/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino }, - "/cosmwasm.wasm.v1.MsgSudoContract": { - aminoType: "wasm/MsgSudoContract", + '/cosmwasm.wasm.v1.MsgSudoContract': { + aminoType: 'wasm/MsgSudoContract', toAmino: MsgSudoContract.toAmino, fromAmino: MsgSudoContract.fromAmino }, - "/cosmwasm.wasm.v1.MsgPinCodes": { - aminoType: "wasm/MsgPinCodes", + '/cosmwasm.wasm.v1.MsgPinCodes': { + aminoType: 'wasm/MsgPinCodes', toAmino: MsgPinCodes.toAmino, fromAmino: MsgPinCodes.fromAmino }, - "/cosmwasm.wasm.v1.MsgUnpinCodes": { - aminoType: "wasm/MsgUnpinCodes", + '/cosmwasm.wasm.v1.MsgUnpinCodes': { + aminoType: 'wasm/MsgUnpinCodes', toAmino: MsgUnpinCodes.toAmino, fromAmino: MsgUnpinCodes.fromAmino }, - "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract": { - aminoType: "wasm/MsgStoreAndInstantiateContract", + '/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract': { + aminoType: 'wasm/MsgStoreAndInstantiateContract', toAmino: MsgStoreAndInstantiateContract.toAmino, fromAmino: MsgStoreAndInstantiateContract.fromAmino }, - "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses": { - aminoType: "wasm/MsgRemoveCodeUploadParamsAddresses", + '/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses': { + aminoType: 'wasm/MsgRemoveCodeUploadParamsAddresses', toAmino: MsgRemoveCodeUploadParamsAddresses.toAmino, fromAmino: MsgRemoveCodeUploadParamsAddresses.fromAmino }, - "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses": { - aminoType: "wasm/MsgAddCodeUploadParamsAddresses", + '/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses': { + aminoType: 'wasm/MsgAddCodeUploadParamsAddresses', toAmino: MsgAddCodeUploadParamsAddresses.toAmino, fromAmino: MsgAddCodeUploadParamsAddresses.fromAmino }, - "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract": { - aminoType: "wasm/MsgStoreAndMigrateContract", + '/cosmwasm.wasm.v1.MsgStoreAndMigrateContract': { + aminoType: 'wasm/MsgStoreAndMigrateContract', toAmino: MsgStoreAndMigrateContract.toAmino, fromAmino: MsgStoreAndMigrateContract.fromAmino }, - "/cosmwasm.wasm.v1.MsgUpdateContractLabel": { - aminoType: "wasm/MsgUpdateContractLabel", + '/cosmwasm.wasm.v1.MsgUpdateContractLabel': { + aminoType: 'wasm/MsgUpdateContractLabel', toAmino: MsgUpdateContractLabel.toAmino, fromAmino: MsgUpdateContractLabel.fromAmino } diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/tx.registry.ts b/libs/cosmos-types/cosmwasm/wasm/v1/tx.registry.ts index 3dfb3b96..1017eb09 100644 --- a/libs/cosmos-types/cosmwasm/wasm/v1/tx.registry.ts +++ b/libs/cosmos-types/cosmwasm/wasm/v1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../types"; -import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract, MsgRemoveCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddresses, MsgStoreAndMigrateContract, MsgUpdateContractLabel } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], ["/cosmwasm.wasm.v1.MsgInstantiateContract2", MsgInstantiateContract2], ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin], ["/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", MsgUpdateInstantiateConfig], ["/cosmwasm.wasm.v1.MsgUpdateParams", MsgUpdateParams], ["/cosmwasm.wasm.v1.MsgSudoContract", MsgSudoContract], ["/cosmwasm.wasm.v1.MsgPinCodes", MsgPinCodes], ["/cosmwasm.wasm.v1.MsgUnpinCodes", MsgUnpinCodes], ["/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", MsgStoreAndInstantiateContract], ["/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", MsgRemoveCodeUploadParamsAddresses], ["/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", MsgAddCodeUploadParamsAddresses], ["/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", MsgStoreAndMigrateContract], ["/cosmwasm.wasm.v1.MsgUpdateContractLabel", MsgUpdateContractLabel]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../types'; +import { MsgAddCodeUploadParamsAddresses, MsgClearAdmin, MsgExecuteContract, MsgInstantiateContract, MsgInstantiateContract2, MsgMigrateContract, MsgPinCodes, MsgRemoveCodeUploadParamsAddresses, MsgStoreAndInstantiateContract, MsgStoreAndMigrateContract, MsgStoreCode, MsgSudoContract, MsgUnpinCodes, MsgUpdateAdmin, MsgUpdateContractLabel,MsgUpdateInstantiateConfig, MsgUpdateParams } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/cosmwasm.wasm.v1.MsgStoreCode', MsgStoreCode], ['/cosmwasm.wasm.v1.MsgInstantiateContract', MsgInstantiateContract], ['/cosmwasm.wasm.v1.MsgInstantiateContract2', MsgInstantiateContract2], ['/cosmwasm.wasm.v1.MsgExecuteContract', MsgExecuteContract], ['/cosmwasm.wasm.v1.MsgMigrateContract', MsgMigrateContract], ['/cosmwasm.wasm.v1.MsgUpdateAdmin', MsgUpdateAdmin], ['/cosmwasm.wasm.v1.MsgClearAdmin', MsgClearAdmin], ['/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig', MsgUpdateInstantiateConfig], ['/cosmwasm.wasm.v1.MsgUpdateParams', MsgUpdateParams], ['/cosmwasm.wasm.v1.MsgSudoContract', MsgSudoContract], ['/cosmwasm.wasm.v1.MsgPinCodes', MsgPinCodes], ['/cosmwasm.wasm.v1.MsgUnpinCodes', MsgUnpinCodes], ['/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract', MsgStoreAndInstantiateContract], ['/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses', MsgRemoveCodeUploadParamsAddresses], ['/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses', MsgAddCodeUploadParamsAddresses], ['/cosmwasm.wasm.v1.MsgStoreAndMigrateContract', MsgStoreAndMigrateContract], ['/cosmwasm.wasm.v1.MsgUpdateContractLabel', MsgUpdateContractLabel]]; \ No newline at end of file diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/tx.rpc.msg.ts b/libs/cosmos-types/cosmwasm/wasm/v1/tx.rpc.msg.ts index 9313d53e..9207404b 100644 --- a/libs/cosmos-types/cosmwasm/wasm/v1/tx.rpc.msg.ts +++ b/libs/cosmos-types/cosmwasm/wasm/v1/tx.rpc.msg.ts @@ -1,174 +1,174 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../types"; -import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract, MsgRemoveCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddresses, MsgStoreAndMigrateContract, MsgUpdateContractLabel } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../types'; +import { MsgAddCodeUploadParamsAddresses, MsgClearAdmin, MsgExecuteContract, MsgInstantiateContract, MsgInstantiateContract2, MsgMigrateContract, MsgPinCodes, MsgRemoveCodeUploadParamsAddresses, MsgStoreAndInstantiateContract, MsgStoreAndMigrateContract, MsgStoreCode, MsgSudoContract, MsgUnpinCodes, MsgUpdateAdmin, MsgUpdateContractLabel,MsgUpdateInstantiateConfig, MsgUpdateParams } from './tx'; /** Msg defines the wasm Msg service. */ export interface Msg { /** StoreCode to submit Wasm code to the system */ - storeCode(signerAddress: string, message: MsgStoreCode, fee: number | StdFee | "auto", memo?: string): Promise; + storeCode(signerAddress: string, message: MsgStoreCode, fee: number | StdFee | 'auto', memo?: string): Promise; /** * InstantiateContract creates a new smart contract instance for the given * code id. */ - instantiateContract(signerAddress: string, message: MsgInstantiateContract, fee: number | StdFee | "auto", memo?: string): Promise; + instantiateContract(signerAddress: string, message: MsgInstantiateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * InstantiateContract2 creates a new smart contract instance for the given * code id with a predictable address */ - instantiateContract2(signerAddress: string, message: MsgInstantiateContract2, fee: number | StdFee | "auto", memo?: string): Promise; + instantiateContract2(signerAddress: string, message: MsgInstantiateContract2, fee: number | StdFee | 'auto', memo?: string): Promise; /** Execute submits the given message data to a smart contract */ - executeContract(signerAddress: string, message: MsgExecuteContract, fee: number | StdFee | "auto", memo?: string): Promise; + executeContract(signerAddress: string, message: MsgExecuteContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** Migrate runs a code upgrade/ downgrade for a smart contract */ - migrateContract(signerAddress: string, message: MsgMigrateContract, fee: number | StdFee | "auto", memo?: string): Promise; + migrateContract(signerAddress: string, message: MsgMigrateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateAdmin sets a new admin for a smart contract */ - updateAdmin(signerAddress: string, message: MsgUpdateAdmin, fee: number | StdFee | "auto", memo?: string): Promise; + updateAdmin(signerAddress: string, message: MsgUpdateAdmin, fee: number | StdFee | 'auto', memo?: string): Promise; /** ClearAdmin removes any admin stored for a smart contract */ - clearAdmin(signerAddress: string, message: MsgClearAdmin, fee: number | StdFee | "auto", memo?: string): Promise; + clearAdmin(signerAddress: string, message: MsgClearAdmin, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateInstantiateConfig updates instantiate config for a smart contract */ - updateInstantiateConfig(signerAddress: string, message: MsgUpdateInstantiateConfig, fee: number | StdFee | "auto", memo?: string): Promise; + updateInstantiateConfig(signerAddress: string, message: MsgUpdateInstantiateConfig, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/wasm * module parameters. The authority is defined in the keeper. * * Since: 0.40 */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * SudoContract defines a governance operation for calling sudo * on a contract. The authority is defined in the keeper. * * Since: 0.40 */ - sudoContract(signerAddress: string, message: MsgSudoContract, fee: number | StdFee | "auto", memo?: string): Promise; + sudoContract(signerAddress: string, message: MsgSudoContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * PinCodes defines a governance operation for pinning a set of * code ids in the wasmvm cache. The authority is defined in the keeper. * * Since: 0.40 */ - pinCodes(signerAddress: string, message: MsgPinCodes, fee: number | StdFee | "auto", memo?: string): Promise; + pinCodes(signerAddress: string, message: MsgPinCodes, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UnpinCodes defines a governance operation for unpinning a set of * code ids in the wasmvm cache. The authority is defined in the keeper. * * Since: 0.40 */ - unpinCodes(signerAddress: string, message: MsgUnpinCodes, fee: number | StdFee | "auto", memo?: string): Promise; + unpinCodes(signerAddress: string, message: MsgUnpinCodes, fee: number | StdFee | 'auto', memo?: string): Promise; /** * StoreAndInstantiateContract defines a governance operation for storing * and instantiating the contract. The authority is defined in the keeper. * * Since: 0.40 */ - storeAndInstantiateContract(signerAddress: string, message: MsgStoreAndInstantiateContract, fee: number | StdFee | "auto", memo?: string): Promise; + storeAndInstantiateContract(signerAddress: string, message: MsgStoreAndInstantiateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * RemoveCodeUploadParamsAddresses defines a governance operation for * removing addresses from code upload params. * The authority is defined in the keeper. */ - removeCodeUploadParamsAddresses(signerAddress: string, message: MsgRemoveCodeUploadParamsAddresses, fee: number | StdFee | "auto", memo?: string): Promise; + removeCodeUploadParamsAddresses(signerAddress: string, message: MsgRemoveCodeUploadParamsAddresses, fee: number | StdFee | 'auto', memo?: string): Promise; /** * AddCodeUploadParamsAddresses defines a governance operation for * adding addresses to code upload params. * The authority is defined in the keeper. */ - addCodeUploadParamsAddresses(signerAddress: string, message: MsgAddCodeUploadParamsAddresses, fee: number | StdFee | "auto", memo?: string): Promise; + addCodeUploadParamsAddresses(signerAddress: string, message: MsgAddCodeUploadParamsAddresses, fee: number | StdFee | 'auto', memo?: string): Promise; /** * StoreAndMigrateContract defines a governance operation for storing * and migrating the contract. The authority is defined in the keeper. * * Since: 0.42 */ - storeAndMigrateContract(signerAddress: string, message: MsgStoreAndMigrateContract, fee: number | StdFee | "auto", memo?: string): Promise; + storeAndMigrateContract(signerAddress: string, message: MsgStoreAndMigrateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateContractLabel sets a new label for a smart contract * * Since: 0.43 */ - updateContractLabel(signerAddress: string, message: MsgUpdateContractLabel, fee: number | StdFee | "auto", memo?: string): Promise; + updateContractLabel(signerAddress: string, message: MsgUpdateContractLabel, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the wasm Msg service. */ export interface CosmWasmStargateImpl { /** StoreCode to submit Wasm code to the system */ - storeCode(signerAddress: string, message: MsgStoreCode, fee: number | StdFee | "auto", memo?: string): Promise; + storeCode(signerAddress: string, message: MsgStoreCode, fee: number | StdFee | 'auto', memo?: string): Promise; /** * InstantiateContract creates a new smart contract instance for the given * code id. */ - instantiateContract(signerAddress: string, message: MsgInstantiateContract, fee: number | StdFee | "auto", memo?: string): Promise; + instantiateContract(signerAddress: string, message: MsgInstantiateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * InstantiateContract2 creates a new smart contract instance for the given * code id with a predictable address */ - instantiateContract2(signerAddress: string, message: MsgInstantiateContract2, fee: number | StdFee | "auto", memo?: string): Promise; + instantiateContract2(signerAddress: string, message: MsgInstantiateContract2, fee: number | StdFee | 'auto', memo?: string): Promise; /** Execute submits the given message data to a smart contract */ - executeContract(signerAddress: string, message: MsgExecuteContract, fee: number | StdFee | "auto", memo?: string): Promise; + executeContract(signerAddress: string, message: MsgExecuteContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** Migrate runs a code upgrade/ downgrade for a smart contract */ - migrateContract(signerAddress: string, message: MsgMigrateContract, fee: number | StdFee | "auto", memo?: string): Promise; + migrateContract(signerAddress: string, message: MsgMigrateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateAdmin sets a new admin for a smart contract */ - updateAdmin(signerAddress: string, message: MsgUpdateAdmin, fee: number | StdFee | "auto", memo?: string): Promise; + updateAdmin(signerAddress: string, message: MsgUpdateAdmin, fee: number | StdFee | 'auto', memo?: string): Promise; /** ClearAdmin removes any admin stored for a smart contract */ - clearAdmin(signerAddress: string, message: MsgClearAdmin, fee: number | StdFee | "auto", memo?: string): Promise; + clearAdmin(signerAddress: string, message: MsgClearAdmin, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateInstantiateConfig updates instantiate config for a smart contract */ - updateInstantiateConfig(signerAddress: string, message: MsgUpdateInstantiateConfig, fee: number | StdFee | "auto", memo?: string): Promise; + updateInstantiateConfig(signerAddress: string, message: MsgUpdateInstantiateConfig, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateParams defines a governance operation for updating the x/wasm * module parameters. The authority is defined in the keeper. * * Since: 0.40 */ - updateWasmParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateWasmParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** * SudoContract defines a governance operation for calling sudo * on a contract. The authority is defined in the keeper. * * Since: 0.40 */ - sudoContract(signerAddress: string, message: MsgSudoContract, fee: number | StdFee | "auto", memo?: string): Promise; + sudoContract(signerAddress: string, message: MsgSudoContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * PinCodes defines a governance operation for pinning a set of * code ids in the wasmvm cache. The authority is defined in the keeper. * * Since: 0.40 */ - pinCodes(signerAddress: string, message: MsgPinCodes, fee: number | StdFee | "auto", memo?: string): Promise; + pinCodes(signerAddress: string, message: MsgPinCodes, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UnpinCodes defines a governance operation for unpinning a set of * code ids in the wasmvm cache. The authority is defined in the keeper. * * Since: 0.40 */ - unpinCodes(signerAddress: string, message: MsgUnpinCodes, fee: number | StdFee | "auto", memo?: string): Promise; + unpinCodes(signerAddress: string, message: MsgUnpinCodes, fee: number | StdFee | 'auto', memo?: string): Promise; /** * StoreAndInstantiateContract defines a governance operation for storing * and instantiating the contract. The authority is defined in the keeper. * * Since: 0.40 */ - storeAndInstantiateContract(signerAddress: string, message: MsgStoreAndInstantiateContract, fee: number | StdFee | "auto", memo?: string): Promise; + storeAndInstantiateContract(signerAddress: string, message: MsgStoreAndInstantiateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * RemoveCodeUploadParamsAddresses defines a governance operation for * removing addresses from code upload params. * The authority is defined in the keeper. */ - removeCodeUploadParamsAddresses(signerAddress: string, message: MsgRemoveCodeUploadParamsAddresses, fee: number | StdFee | "auto", memo?: string): Promise; + removeCodeUploadParamsAddresses(signerAddress: string, message: MsgRemoveCodeUploadParamsAddresses, fee: number | StdFee | 'auto', memo?: string): Promise; /** * AddCodeUploadParamsAddresses defines a governance operation for * adding addresses to code upload params. * The authority is defined in the keeper. */ - addCodeUploadParamsAddresses(signerAddress: string, message: MsgAddCodeUploadParamsAddresses, fee: number | StdFee | "auto", memo?: string): Promise; + addCodeUploadParamsAddresses(signerAddress: string, message: MsgAddCodeUploadParamsAddresses, fee: number | StdFee | 'auto', memo?: string): Promise; /** * StoreAndMigrateContract defines a governance operation for storing * and migrating the contract. The authority is defined in the keeper. * * Since: 0.42 */ - storeAndMigrateContract(signerAddress: string, message: MsgStoreAndMigrateContract, fee: number | StdFee | "auto", memo?: string): Promise; + storeAndMigrateContract(signerAddress: string, message: MsgStoreAndMigrateContract, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateContractLabel sets a new label for a smart contract * * Since: 0.43 */ - updateContractLabel(signerAddress: string, message: MsgUpdateContractLabel, fee: number | StdFee | "auto", memo?: string): Promise; + updateContractLabel(signerAddress: string, message: MsgUpdateContractLabel, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -176,7 +176,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* StoreCode to submit Wasm code to the system */ - storeCode = async (signerAddress: string, message: MsgStoreCode, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + storeCode = async (signerAddress: string, message: MsgStoreCode, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgStoreCode.typeUrl, value: message @@ -185,7 +185,7 @@ export class MsgClientImpl implements Msg { }; /* InstantiateContract creates a new smart contract instance for the given code id. */ - instantiateContract = async (signerAddress: string, message: MsgInstantiateContract, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + instantiateContract = async (signerAddress: string, message: MsgInstantiateContract, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgInstantiateContract.typeUrl, value: message @@ -194,7 +194,7 @@ export class MsgClientImpl implements Msg { }; /* InstantiateContract2 creates a new smart contract instance for the given code id with a predictable address */ - instantiateContract2 = async (signerAddress: string, message: MsgInstantiateContract2, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + instantiateContract2 = async (signerAddress: string, message: MsgInstantiateContract2, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgInstantiateContract2.typeUrl, value: message @@ -202,7 +202,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Execute submits the given message data to a smart contract */ - executeContract = async (signerAddress: string, message: MsgExecuteContract, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + executeContract = async (signerAddress: string, message: MsgExecuteContract, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgExecuteContract.typeUrl, value: message @@ -210,7 +210,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Migrate runs a code upgrade/ downgrade for a smart contract */ - migrateContract = async (signerAddress: string, message: MsgMigrateContract, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + migrateContract = async (signerAddress: string, message: MsgMigrateContract, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgMigrateContract.typeUrl, value: message @@ -218,7 +218,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateAdmin sets a new admin for a smart contract */ - updateAdmin = async (signerAddress: string, message: MsgUpdateAdmin, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateAdmin = async (signerAddress: string, message: MsgUpdateAdmin, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateAdmin.typeUrl, value: message @@ -226,7 +226,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ClearAdmin removes any admin stored for a smart contract */ - clearAdmin = async (signerAddress: string, message: MsgClearAdmin, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + clearAdmin = async (signerAddress: string, message: MsgClearAdmin, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgClearAdmin.typeUrl, value: message @@ -234,7 +234,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateInstantiateConfig updates instantiate config for a smart contract */ - updateInstantiateConfig = async (signerAddress: string, message: MsgUpdateInstantiateConfig, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateInstantiateConfig = async (signerAddress: string, message: MsgUpdateInstantiateConfig, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateInstantiateConfig.typeUrl, value: message @@ -245,7 +245,7 @@ export class MsgClientImpl implements Msg { module parameters. The authority is defined in the keeper. Since: 0.40 */ - updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message @@ -256,7 +256,7 @@ export class MsgClientImpl implements Msg { on a contract. The authority is defined in the keeper. Since: 0.40 */ - sudoContract = async (signerAddress: string, message: MsgSudoContract, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + sudoContract = async (signerAddress: string, message: MsgSudoContract, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSudoContract.typeUrl, value: message @@ -267,7 +267,7 @@ export class MsgClientImpl implements Msg { code ids in the wasmvm cache. The authority is defined in the keeper. Since: 0.40 */ - pinCodes = async (signerAddress: string, message: MsgPinCodes, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + pinCodes = async (signerAddress: string, message: MsgPinCodes, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgPinCodes.typeUrl, value: message @@ -278,7 +278,7 @@ export class MsgClientImpl implements Msg { code ids in the wasmvm cache. The authority is defined in the keeper. Since: 0.40 */ - unpinCodes = async (signerAddress: string, message: MsgUnpinCodes, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + unpinCodes = async (signerAddress: string, message: MsgUnpinCodes, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUnpinCodes.typeUrl, value: message @@ -289,7 +289,7 @@ export class MsgClientImpl implements Msg { and instantiating the contract. The authority is defined in the keeper. Since: 0.40 */ - storeAndInstantiateContract = async (signerAddress: string, message: MsgStoreAndInstantiateContract, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + storeAndInstantiateContract = async (signerAddress: string, message: MsgStoreAndInstantiateContract, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgStoreAndInstantiateContract.typeUrl, value: message @@ -299,7 +299,7 @@ export class MsgClientImpl implements Msg { /* RemoveCodeUploadParamsAddresses defines a governance operation for removing addresses from code upload params. The authority is defined in the keeper. */ - removeCodeUploadParamsAddresses = async (signerAddress: string, message: MsgRemoveCodeUploadParamsAddresses, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + removeCodeUploadParamsAddresses = async (signerAddress: string, message: MsgRemoveCodeUploadParamsAddresses, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgRemoveCodeUploadParamsAddresses.typeUrl, value: message @@ -309,7 +309,7 @@ export class MsgClientImpl implements Msg { /* AddCodeUploadParamsAddresses defines a governance operation for adding addresses to code upload params. The authority is defined in the keeper. */ - addCodeUploadParamsAddresses = async (signerAddress: string, message: MsgAddCodeUploadParamsAddresses, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + addCodeUploadParamsAddresses = async (signerAddress: string, message: MsgAddCodeUploadParamsAddresses, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgAddCodeUploadParamsAddresses.typeUrl, value: message @@ -320,7 +320,7 @@ export class MsgClientImpl implements Msg { and migrating the contract. The authority is defined in the keeper. Since: 0.42 */ - storeAndMigrateContract = async (signerAddress: string, message: MsgStoreAndMigrateContract, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + storeAndMigrateContract = async (signerAddress: string, message: MsgStoreAndMigrateContract, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgStoreAndMigrateContract.typeUrl, value: message @@ -330,7 +330,7 @@ export class MsgClientImpl implements Msg { /* UpdateContractLabel sets a new label for a smart contract Since: 0.43 */ - updateContractLabel = async (signerAddress: string, message: MsgUpdateContractLabel, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateContractLabel = async (signerAddress: string, message: MsgUpdateContractLabel, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateContractLabel.typeUrl, value: message diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/tx.ts b/libs/cosmos-types/cosmwasm/wasm/v1/tx.ts index 9743b6c2..1722eeec 100644 --- a/libs/cosmos-types/cosmwasm/wasm/v1/tx.ts +++ b/libs/cosmos-types/cosmwasm/wasm/v1/tx.ts @@ -1,9 +1,10 @@ -import { AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; -import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { fromBase64, fromUtf8,toBase64, toUtf8 } from '@cosmjs/encoding'; + +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Coin, CoinAmino } from '../../../cosmos/base/v1beta1/coin'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; +import { AccessConfig, AccessConfigAmino, Params, ParamsAmino } from './types'; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { /** Sender is the actor that signed the messages */ @@ -17,7 +18,7 @@ export interface MsgStoreCode { instantiatePermission?: AccessConfig; } export interface MsgStoreCodeProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode"; + typeUrl: '/cosmwasm.wasm.v1.MsgStoreCode'; value: Uint8Array; } /** MsgStoreCode submit Wasm code to the system */ @@ -33,7 +34,7 @@ export interface MsgStoreCodeAmino { instantiate_permission?: AccessConfigAmino; } export interface MsgStoreCodeAminoMsg { - type: "wasm/MsgStoreCode"; + type: 'wasm/MsgStoreCode'; value: MsgStoreCodeAmino; } /** MsgStoreCodeResponse returns store result data. */ @@ -44,7 +45,7 @@ export interface MsgStoreCodeResponse { checksum: Uint8Array; } export interface MsgStoreCodeResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgStoreCodeResponse'; value: Uint8Array; } /** MsgStoreCodeResponse returns store result data. */ @@ -55,7 +56,7 @@ export interface MsgStoreCodeResponseAmino { checksum: string; } export interface MsgStoreCodeResponseAminoMsg { - type: "wasm/MsgStoreCodeResponse"; + type: 'wasm/MsgStoreCodeResponse'; value: MsgStoreCodeResponseAmino; } /** @@ -77,7 +78,7 @@ export interface MsgInstantiateContract { funds: Coin[]; } export interface MsgInstantiateContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract"; + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract'; value: Uint8Array; } /** @@ -99,7 +100,7 @@ export interface MsgInstantiateContractAmino { funds: CoinAmino[]; } export interface MsgInstantiateContractAminoMsg { - type: "wasm/MsgInstantiateContract"; + type: 'wasm/MsgInstantiateContract'; value: MsgInstantiateContractAmino; } /** MsgInstantiateContractResponse return instantiation result data */ @@ -110,7 +111,7 @@ export interface MsgInstantiateContractResponse { data: Uint8Array; } export interface MsgInstantiateContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContractResponse'; value: Uint8Array; } /** MsgInstantiateContractResponse return instantiation result data */ @@ -121,7 +122,7 @@ export interface MsgInstantiateContractResponseAmino { data: string; } export interface MsgInstantiateContractResponseAminoMsg { - type: "wasm/MsgInstantiateContractResponse"; + type: 'wasm/MsgInstantiateContractResponse'; value: MsgInstantiateContractResponseAmino; } /** @@ -150,7 +151,7 @@ export interface MsgInstantiateContract2 { fixMsg: boolean; } export interface MsgInstantiateContract2ProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2"; + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract2'; value: Uint8Array; } /** @@ -179,7 +180,7 @@ export interface MsgInstantiateContract2Amino { fix_msg: boolean; } export interface MsgInstantiateContract2AminoMsg { - type: "wasm/MsgInstantiateContract2"; + type: 'wasm/MsgInstantiateContract2'; value: MsgInstantiateContract2Amino; } /** MsgInstantiateContract2Response return instantiation result data */ @@ -190,7 +191,7 @@ export interface MsgInstantiateContract2Response { data: Uint8Array; } export interface MsgInstantiateContract2ResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response"; + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract2Response'; value: Uint8Array; } /** MsgInstantiateContract2Response return instantiation result data */ @@ -201,7 +202,7 @@ export interface MsgInstantiateContract2ResponseAmino { data: string; } export interface MsgInstantiateContract2ResponseAminoMsg { - type: "wasm/MsgInstantiateContract2Response"; + type: 'wasm/MsgInstantiateContract2Response'; value: MsgInstantiateContract2ResponseAmino; } /** MsgExecuteContract submits the given message data to a smart contract */ @@ -216,7 +217,7 @@ export interface MsgExecuteContract { funds: Coin[]; } export interface MsgExecuteContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract"; + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract'; value: Uint8Array; } /** MsgExecuteContract submits the given message data to a smart contract */ @@ -231,7 +232,7 @@ export interface MsgExecuteContractAmino { funds: CoinAmino[]; } export interface MsgExecuteContractAminoMsg { - type: "wasm/MsgExecuteContract"; + type: 'wasm/MsgExecuteContract'; value: MsgExecuteContractAmino; } /** MsgExecuteContractResponse returns execution result data. */ @@ -240,7 +241,7 @@ export interface MsgExecuteContractResponse { data: Uint8Array; } export interface MsgExecuteContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContractResponse'; value: Uint8Array; } /** MsgExecuteContractResponse returns execution result data. */ @@ -249,7 +250,7 @@ export interface MsgExecuteContractResponseAmino { data: string; } export interface MsgExecuteContractResponseAminoMsg { - type: "wasm/MsgExecuteContractResponse"; + type: 'wasm/MsgExecuteContractResponse'; value: MsgExecuteContractResponseAmino; } /** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ @@ -264,7 +265,7 @@ export interface MsgMigrateContract { msg: Uint8Array; } export interface MsgMigrateContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract"; + typeUrl: '/cosmwasm.wasm.v1.MsgMigrateContract'; value: Uint8Array; } /** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ @@ -279,7 +280,7 @@ export interface MsgMigrateContractAmino { msg: any; } export interface MsgMigrateContractAminoMsg { - type: "wasm/MsgMigrateContract"; + type: 'wasm/MsgMigrateContract'; value: MsgMigrateContractAmino; } /** MsgMigrateContractResponse returns contract migration result data. */ @@ -291,7 +292,7 @@ export interface MsgMigrateContractResponse { data: Uint8Array; } export interface MsgMigrateContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgMigrateContractResponse'; value: Uint8Array; } /** MsgMigrateContractResponse returns contract migration result data. */ @@ -303,7 +304,7 @@ export interface MsgMigrateContractResponseAmino { data: string; } export interface MsgMigrateContractResponseAminoMsg { - type: "wasm/MsgMigrateContractResponse"; + type: 'wasm/MsgMigrateContractResponse'; value: MsgMigrateContractResponseAmino; } /** MsgUpdateAdmin sets a new admin for a smart contract */ @@ -316,7 +317,7 @@ export interface MsgUpdateAdmin { contract: string; } export interface MsgUpdateAdminProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateAdmin'; value: Uint8Array; } /** MsgUpdateAdmin sets a new admin for a smart contract */ @@ -329,19 +330,19 @@ export interface MsgUpdateAdminAmino { contract: string; } export interface MsgUpdateAdminAminoMsg { - type: "wasm/MsgUpdateAdmin"; + type: 'wasm/MsgUpdateAdmin'; value: MsgUpdateAdminAmino; } /** MsgUpdateAdminResponse returns empty data */ export interface MsgUpdateAdminResponse {} export interface MsgUpdateAdminResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateAdminResponse'; value: Uint8Array; } /** MsgUpdateAdminResponse returns empty data */ export interface MsgUpdateAdminResponseAmino {} export interface MsgUpdateAdminResponseAminoMsg { - type: "wasm/MsgUpdateAdminResponse"; + type: 'wasm/MsgUpdateAdminResponse'; value: MsgUpdateAdminResponseAmino; } /** MsgClearAdmin removes any admin stored for a smart contract */ @@ -352,7 +353,7 @@ export interface MsgClearAdmin { contract: string; } export interface MsgClearAdminProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin"; + typeUrl: '/cosmwasm.wasm.v1.MsgClearAdmin'; value: Uint8Array; } /** MsgClearAdmin removes any admin stored for a smart contract */ @@ -363,19 +364,19 @@ export interface MsgClearAdminAmino { contract: string; } export interface MsgClearAdminAminoMsg { - type: "wasm/MsgClearAdmin"; + type: 'wasm/MsgClearAdmin'; value: MsgClearAdminAmino; } /** MsgClearAdminResponse returns empty data */ export interface MsgClearAdminResponse {} export interface MsgClearAdminResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgClearAdminResponse'; value: Uint8Array; } /** MsgClearAdminResponse returns empty data */ export interface MsgClearAdminResponseAmino {} export interface MsgClearAdminResponseAminoMsg { - type: "wasm/MsgClearAdminResponse"; + type: 'wasm/MsgClearAdminResponse'; value: MsgClearAdminResponseAmino; } /** MsgUpdateInstantiateConfig updates instantiate config for a smart contract */ @@ -388,7 +389,7 @@ export interface MsgUpdateInstantiateConfig { newInstantiatePermission?: AccessConfig; } export interface MsgUpdateInstantiateConfigProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig'; value: Uint8Array; } /** MsgUpdateInstantiateConfig updates instantiate config for a smart contract */ @@ -401,19 +402,19 @@ export interface MsgUpdateInstantiateConfigAmino { new_instantiate_permission?: AccessConfigAmino; } export interface MsgUpdateInstantiateConfigAminoMsg { - type: "wasm/MsgUpdateInstantiateConfig"; + type: 'wasm/MsgUpdateInstantiateConfig'; value: MsgUpdateInstantiateConfigAmino; } /** MsgUpdateInstantiateConfigResponse returns empty data */ export interface MsgUpdateInstantiateConfigResponse {} export interface MsgUpdateInstantiateConfigResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse'; value: Uint8Array; } /** MsgUpdateInstantiateConfigResponse returns empty data */ export interface MsgUpdateInstantiateConfigResponseAmino {} export interface MsgUpdateInstantiateConfigResponseAminoMsg { - type: "wasm/MsgUpdateInstantiateConfigResponse"; + type: 'wasm/MsgUpdateInstantiateConfigResponse'; value: MsgUpdateInstantiateConfigResponseAmino; } /** @@ -432,7 +433,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateParams'; value: Uint8Array; } /** @@ -451,7 +452,7 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "wasm/MsgUpdateParams"; + type: 'wasm/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** @@ -462,7 +463,7 @@ export interface MsgUpdateParamsAminoMsg { */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateParamsResponse'; value: Uint8Array; } /** @@ -473,7 +474,7 @@ export interface MsgUpdateParamsResponseProtoMsg { */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "wasm/MsgUpdateParamsResponse"; + type: 'wasm/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } /** @@ -490,7 +491,7 @@ export interface MsgSudoContract { msg: Uint8Array; } export interface MsgSudoContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract"; + typeUrl: '/cosmwasm.wasm.v1.MsgSudoContract'; value: Uint8Array; } /** @@ -507,7 +508,7 @@ export interface MsgSudoContractAmino { msg: any; } export interface MsgSudoContractAminoMsg { - type: "wasm/MsgSudoContract"; + type: 'wasm/MsgSudoContract'; value: MsgSudoContractAmino; } /** @@ -521,7 +522,7 @@ export interface MsgSudoContractResponse { data: Uint8Array; } export interface MsgSudoContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgSudoContractResponse'; value: Uint8Array; } /** @@ -535,7 +536,7 @@ export interface MsgSudoContractResponseAmino { data: string; } export interface MsgSudoContractResponseAminoMsg { - type: "wasm/MsgSudoContractResponse"; + type: 'wasm/MsgSudoContractResponse'; value: MsgSudoContractResponseAmino; } /** @@ -550,7 +551,7 @@ export interface MsgPinCodes { codeIds: bigint[]; } export interface MsgPinCodesProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes"; + typeUrl: '/cosmwasm.wasm.v1.MsgPinCodes'; value: Uint8Array; } /** @@ -565,7 +566,7 @@ export interface MsgPinCodesAmino { code_ids: string[]; } export interface MsgPinCodesAminoMsg { - type: "wasm/MsgPinCodes"; + type: 'wasm/MsgPinCodes'; value: MsgPinCodesAmino; } /** @@ -576,7 +577,7 @@ export interface MsgPinCodesAminoMsg { */ export interface MsgPinCodesResponse {} export interface MsgPinCodesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgPinCodesResponse'; value: Uint8Array; } /** @@ -587,7 +588,7 @@ export interface MsgPinCodesResponseProtoMsg { */ export interface MsgPinCodesResponseAmino {} export interface MsgPinCodesResponseAminoMsg { - type: "wasm/MsgPinCodesResponse"; + type: 'wasm/MsgPinCodesResponse'; value: MsgPinCodesResponseAmino; } /** @@ -602,7 +603,7 @@ export interface MsgUnpinCodes { codeIds: bigint[]; } export interface MsgUnpinCodesProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes"; + typeUrl: '/cosmwasm.wasm.v1.MsgUnpinCodes'; value: Uint8Array; } /** @@ -617,7 +618,7 @@ export interface MsgUnpinCodesAmino { code_ids: string[]; } export interface MsgUnpinCodesAminoMsg { - type: "wasm/MsgUnpinCodes"; + type: 'wasm/MsgUnpinCodes'; value: MsgUnpinCodesAmino; } /** @@ -628,7 +629,7 @@ export interface MsgUnpinCodesAminoMsg { */ export interface MsgUnpinCodesResponse {} export interface MsgUnpinCodesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgUnpinCodesResponse'; value: Uint8Array; } /** @@ -639,7 +640,7 @@ export interface MsgUnpinCodesResponseProtoMsg { */ export interface MsgUnpinCodesResponseAmino {} export interface MsgUnpinCodesResponseAminoMsg { - type: "wasm/MsgUnpinCodesResponse"; + type: 'wasm/MsgUnpinCodesResponse'; value: MsgUnpinCodesResponseAmino; } /** @@ -685,7 +686,7 @@ export interface MsgStoreAndInstantiateContract { codeHash: Uint8Array; } export interface MsgStoreAndInstantiateContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract"; + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract'; value: Uint8Array; } /** @@ -731,7 +732,7 @@ export interface MsgStoreAndInstantiateContractAmino { code_hash: string; } export interface MsgStoreAndInstantiateContractAminoMsg { - type: "wasm/MsgStoreAndInstantiateContract"; + type: 'wasm/MsgStoreAndInstantiateContract'; value: MsgStoreAndInstantiateContractAmino; } /** @@ -747,7 +748,7 @@ export interface MsgStoreAndInstantiateContractResponse { data: Uint8Array; } export interface MsgStoreAndInstantiateContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse'; value: Uint8Array; } /** @@ -763,7 +764,7 @@ export interface MsgStoreAndInstantiateContractResponseAmino { data: string; } export interface MsgStoreAndInstantiateContractResponseAminoMsg { - type: "wasm/MsgStoreAndInstantiateContractResponse"; + type: 'wasm/MsgStoreAndInstantiateContractResponse'; value: MsgStoreAndInstantiateContractResponseAmino; } /** @@ -776,7 +777,7 @@ export interface MsgAddCodeUploadParamsAddresses { addresses: string[]; } export interface MsgAddCodeUploadParamsAddressesProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses"; + typeUrl: '/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses'; value: Uint8Array; } /** @@ -789,7 +790,7 @@ export interface MsgAddCodeUploadParamsAddressesAmino { addresses: string[]; } export interface MsgAddCodeUploadParamsAddressesAminoMsg { - type: "wasm/MsgAddCodeUploadParamsAddresses"; + type: 'wasm/MsgAddCodeUploadParamsAddresses'; value: MsgAddCodeUploadParamsAddressesAmino; } /** @@ -798,7 +799,7 @@ export interface MsgAddCodeUploadParamsAddressesAminoMsg { */ export interface MsgAddCodeUploadParamsAddressesResponse {} export interface MsgAddCodeUploadParamsAddressesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse'; value: Uint8Array; } /** @@ -807,7 +808,7 @@ export interface MsgAddCodeUploadParamsAddressesResponseProtoMsg { */ export interface MsgAddCodeUploadParamsAddressesResponseAmino {} export interface MsgAddCodeUploadParamsAddressesResponseAminoMsg { - type: "wasm/MsgAddCodeUploadParamsAddressesResponse"; + type: 'wasm/MsgAddCodeUploadParamsAddressesResponse'; value: MsgAddCodeUploadParamsAddressesResponseAmino; } /** @@ -820,7 +821,7 @@ export interface MsgRemoveCodeUploadParamsAddresses { addresses: string[]; } export interface MsgRemoveCodeUploadParamsAddressesProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses"; + typeUrl: '/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses'; value: Uint8Array; } /** @@ -833,7 +834,7 @@ export interface MsgRemoveCodeUploadParamsAddressesAmino { addresses: string[]; } export interface MsgRemoveCodeUploadParamsAddressesAminoMsg { - type: "wasm/MsgRemoveCodeUploadParamsAddresses"; + type: 'wasm/MsgRemoveCodeUploadParamsAddresses'; value: MsgRemoveCodeUploadParamsAddressesAmino; } /** @@ -842,7 +843,7 @@ export interface MsgRemoveCodeUploadParamsAddressesAminoMsg { */ export interface MsgRemoveCodeUploadParamsAddressesResponse {} export interface MsgRemoveCodeUploadParamsAddressesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse'; value: Uint8Array; } /** @@ -851,7 +852,7 @@ export interface MsgRemoveCodeUploadParamsAddressesResponseProtoMsg { */ export interface MsgRemoveCodeUploadParamsAddressesResponseAmino {} export interface MsgRemoveCodeUploadParamsAddressesResponseAminoMsg { - type: "wasm/MsgRemoveCodeUploadParamsAddressesResponse"; + type: 'wasm/MsgRemoveCodeUploadParamsAddressesResponse'; value: MsgRemoveCodeUploadParamsAddressesResponseAmino; } /** @@ -873,7 +874,7 @@ export interface MsgStoreAndMigrateContract { msg: Uint8Array; } export interface MsgStoreAndMigrateContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract"; + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndMigrateContract'; value: Uint8Array; } /** @@ -895,7 +896,7 @@ export interface MsgStoreAndMigrateContractAmino { msg: any; } export interface MsgStoreAndMigrateContractAminoMsg { - type: "wasm/MsgStoreAndMigrateContract"; + type: 'wasm/MsgStoreAndMigrateContract'; value: MsgStoreAndMigrateContractAmino; } /** @@ -913,7 +914,7 @@ export interface MsgStoreAndMigrateContractResponse { data: Uint8Array; } export interface MsgStoreAndMigrateContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse'; value: Uint8Array; } /** @@ -931,7 +932,7 @@ export interface MsgStoreAndMigrateContractResponseAmino { data: string; } export interface MsgStoreAndMigrateContractResponseAminoMsg { - type: "wasm/MsgStoreAndMigrateContractResponse"; + type: 'wasm/MsgStoreAndMigrateContractResponse'; value: MsgStoreAndMigrateContractResponseAmino; } /** MsgUpdateContractLabel sets a new label for a smart contract */ @@ -944,7 +945,7 @@ export interface MsgUpdateContractLabel { contract: string; } export interface MsgUpdateContractLabelProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateContractLabel'; value: Uint8Array; } /** MsgUpdateContractLabel sets a new label for a smart contract */ @@ -957,39 +958,39 @@ export interface MsgUpdateContractLabelAmino { contract: string; } export interface MsgUpdateContractLabelAminoMsg { - type: "wasm/MsgUpdateContractLabel"; + type: 'wasm/MsgUpdateContractLabel'; value: MsgUpdateContractLabelAmino; } /** MsgUpdateContractLabelResponse returns empty data */ export interface MsgUpdateContractLabelResponse {} export interface MsgUpdateContractLabelResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse"; + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse'; value: Uint8Array; } /** MsgUpdateContractLabelResponse returns empty data */ export interface MsgUpdateContractLabelResponseAmino {} export interface MsgUpdateContractLabelResponseAminoMsg { - type: "wasm/MsgUpdateContractLabelResponse"; + type: 'wasm/MsgUpdateContractLabelResponse'; value: MsgUpdateContractLabelResponseAmino; } function createBaseMsgStoreCode(): MsgStoreCode { return { - sender: "", + sender: '', wasmByteCode: new Uint8Array(), instantiatePermission: undefined }; } export const MsgStoreCode = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - aminoType: "wasm/MsgStoreCode", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreCode', + aminoType: 'wasm/MsgStoreCode', is(o: any): o is MsgStoreCode { - return o && (o.$typeUrl === MsgStoreCode.typeUrl || typeof o.sender === "string" && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === "string")); + return o && (o.$typeUrl === MsgStoreCode.typeUrl || typeof o.sender === 'string' && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === 'string')); }, isAmino(o: any): o is MsgStoreCodeAmino { - return o && (o.$typeUrl === MsgStoreCode.typeUrl || typeof o.sender === "string" && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === "string")); + return o && (o.$typeUrl === MsgStoreCode.typeUrl || typeof o.sender === 'string' && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === 'string')); }, encode(message: MsgStoreCode, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } if (message.wasmByteCode.length !== 0) { @@ -1007,25 +1008,25 @@ export const MsgStoreCode = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.wasmByteCode = reader.bytes(); - break; - case 5: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.wasmByteCode = reader.bytes(); + break; + case 5: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgStoreCode { const message = createBaseMsgStoreCode(); - message.sender = object.sender ?? ""; + message.sender = object.sender ?? ''; message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; return message; @@ -1045,7 +1046,7 @@ export const MsgStoreCode = { }, toAmino(message: MsgStoreCode): MsgStoreCodeAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; + obj.sender = message.sender === '' ? undefined : message.sender; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; return obj; @@ -1055,7 +1056,7 @@ export const MsgStoreCode = { }, toAminoMsg(message: MsgStoreCode): MsgStoreCodeAminoMsg { return { - type: "wasm/MsgStoreCode", + type: 'wasm/MsgStoreCode', value: MsgStoreCode.toAmino(message) }; }, @@ -1067,7 +1068,7 @@ export const MsgStoreCode = { }, toProtoMsg(message: MsgStoreCode): MsgStoreCodeProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreCode', value: MsgStoreCode.encode(message).finish() }; } @@ -1081,13 +1082,13 @@ function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { }; } export const MsgStoreCodeResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", - aminoType: "wasm/MsgStoreCodeResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreCodeResponse', + aminoType: 'wasm/MsgStoreCodeResponse', is(o: any): o is MsgStoreCodeResponse { - return o && (o.$typeUrl === MsgStoreCodeResponse.typeUrl || typeof o.codeId === "bigint" && (o.checksum instanceof Uint8Array || typeof o.checksum === "string")); + return o && (o.$typeUrl === MsgStoreCodeResponse.typeUrl || typeof o.codeId === 'bigint' && (o.checksum instanceof Uint8Array || typeof o.checksum === 'string')); }, isAmino(o: any): o is MsgStoreCodeResponseAmino { - return o && (o.$typeUrl === MsgStoreCodeResponse.typeUrl || typeof o.code_id === "bigint" && (o.checksum instanceof Uint8Array || typeof o.checksum === "string")); + return o && (o.$typeUrl === MsgStoreCodeResponse.typeUrl || typeof o.code_id === 'bigint' && (o.checksum instanceof Uint8Array || typeof o.checksum === 'string')); }, encode(message: MsgStoreCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeId !== BigInt(0)) { @@ -1105,15 +1106,15 @@ export const MsgStoreCodeResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.checksum = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.checksum = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1145,7 +1146,7 @@ export const MsgStoreCodeResponse = { }, toAminoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseAminoMsg { return { - type: "wasm/MsgStoreCodeResponse", + type: 'wasm/MsgStoreCodeResponse', value: MsgStoreCodeResponse.toAmino(message) }; }, @@ -1157,7 +1158,7 @@ export const MsgStoreCodeResponse = { }, toProtoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreCodeResponse', value: MsgStoreCodeResponse.encode(message).finish() }; } @@ -1166,34 +1167,34 @@ GlobalDecoderRegistry.register(MsgStoreCodeResponse.typeUrl, MsgStoreCodeRespons GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCodeResponse.aminoType, MsgStoreCodeResponse.typeUrl); function createBaseMsgInstantiateContract(): MsgInstantiateContract { return { - sender: "", - admin: "", + sender: '', + admin: '', codeId: BigInt(0), - label: "", + label: '', msg: new Uint8Array(), funds: [] }; } export const MsgInstantiateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - aminoType: "wasm/MsgInstantiateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract', + aminoType: 'wasm/MsgInstantiateContract', is(o: any): o is MsgInstantiateContract { - return o && (o.$typeUrl === MsgInstantiateContract.typeUrl || typeof o.sender === "string" && typeof o.admin === "string" && typeof o.codeId === "bigint" && typeof o.label === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0]))); + return o && (o.$typeUrl === MsgInstantiateContract.typeUrl || typeof o.sender === 'string' && typeof o.admin === 'string' && typeof o.codeId === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0]))); }, isAmino(o: any): o is MsgInstantiateContractAmino { - return o && (o.$typeUrl === MsgInstantiateContract.typeUrl || typeof o.sender === "string" && typeof o.admin === "string" && typeof o.code_id === "bigint" && typeof o.label === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0]))); + return o && (o.$typeUrl === MsgInstantiateContract.typeUrl || typeof o.sender === 'string' && typeof o.admin === 'string' && typeof o.code_id === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0]))); }, encode(message: MsgInstantiateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(18).string(message.admin); } if (message.codeId !== BigInt(0)) { writer.uint32(24).uint64(message.codeId); } - if (message.label !== "") { + if (message.label !== '') { writer.uint32(34).string(message.label); } if (message.msg.length !== 0) { @@ -1211,37 +1212,37 @@ export const MsgInstantiateContract = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.admin = reader.string(); + break; + case 3: + message.codeId = reader.uint64(); + break; + case 4: + message.label = reader.string(); + break; + case 5: + message.msg = reader.bytes(); + break; + case 6: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgInstantiateContract { const message = createBaseMsgInstantiateContract(); - message.sender = object.sender ?? ""; - message.admin = object.admin ?? ""; + message.sender = object.sender ?? ''; + message.admin = object.admin ?? ''; message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.label = object.label ?? ""; + message.label = object.label ?? ''; message.msg = object.msg ?? new Uint8Array(); message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; return message; @@ -1268,10 +1269,10 @@ export const MsgInstantiateContract = { }, toAmino(message: MsgInstantiateContract): MsgInstantiateContractAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.admin = message.admin === '' ? undefined : message.admin; obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; - obj.label = message.label === "" ? undefined : message.label; + obj.label = message.label === '' ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); @@ -1285,7 +1286,7 @@ export const MsgInstantiateContract = { }, toAminoMsg(message: MsgInstantiateContract): MsgInstantiateContractAminoMsg { return { - type: "wasm/MsgInstantiateContract", + type: 'wasm/MsgInstantiateContract', value: MsgInstantiateContract.toAmino(message) }; }, @@ -1297,7 +1298,7 @@ export const MsgInstantiateContract = { }, toProtoMsg(message: MsgInstantiateContract): MsgInstantiateContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract', value: MsgInstantiateContract.encode(message).finish() }; } @@ -1306,21 +1307,21 @@ GlobalDecoderRegistry.register(MsgInstantiateContract.typeUrl, MsgInstantiateCon GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract.aminoType, MsgInstantiateContract.typeUrl); function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { return { - address: "", + address: '', data: new Uint8Array() }; } export const MsgInstantiateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", - aminoType: "wasm/MsgInstantiateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContractResponse', + aminoType: 'wasm/MsgInstantiateContractResponse', is(o: any): o is MsgInstantiateContractResponse { - return o && (o.$typeUrl === MsgInstantiateContractResponse.typeUrl || typeof o.address === "string" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgInstantiateContractResponse.typeUrl || typeof o.address === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, isAmino(o: any): o is MsgInstantiateContractResponseAmino { - return o && (o.$typeUrl === MsgInstantiateContractResponse.typeUrl || typeof o.address === "string" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgInstantiateContractResponse.typeUrl || typeof o.address === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, encode(message: MsgInstantiateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.data.length !== 0) { @@ -1335,22 +1336,22 @@ export const MsgInstantiateContractResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgInstantiateContractResponse { const message = createBaseMsgInstantiateContractResponse(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.data = object.data ?? new Uint8Array(); return message; }, @@ -1366,7 +1367,7 @@ export const MsgInstantiateContractResponse = { }, toAmino(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -1375,7 +1376,7 @@ export const MsgInstantiateContractResponse = { }, toAminoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAminoMsg { return { - type: "wasm/MsgInstantiateContractResponse", + type: 'wasm/MsgInstantiateContractResponse', value: MsgInstantiateContractResponse.toAmino(message) }; }, @@ -1387,7 +1388,7 @@ export const MsgInstantiateContractResponse = { }, toProtoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContractResponse', value: MsgInstantiateContractResponse.encode(message).finish() }; } @@ -1396,10 +1397,10 @@ GlobalDecoderRegistry.register(MsgInstantiateContractResponse.typeUrl, MsgInstan GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContractResponse.aminoType, MsgInstantiateContractResponse.typeUrl); function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { return { - sender: "", - admin: "", + sender: '', + admin: '', codeId: BigInt(0), - label: "", + label: '', msg: new Uint8Array(), funds: [], salt: new Uint8Array(), @@ -1407,25 +1408,25 @@ function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { }; } export const MsgInstantiateContract2 = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", - aminoType: "wasm/MsgInstantiateContract2", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract2', + aminoType: 'wasm/MsgInstantiateContract2', is(o: any): o is MsgInstantiateContract2 { - return o && (o.$typeUrl === MsgInstantiateContract2.typeUrl || typeof o.sender === "string" && typeof o.admin === "string" && typeof o.codeId === "bigint" && typeof o.label === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0])) && (o.salt instanceof Uint8Array || typeof o.salt === "string") && typeof o.fixMsg === "boolean"); + return o && (o.$typeUrl === MsgInstantiateContract2.typeUrl || typeof o.sender === 'string' && typeof o.admin === 'string' && typeof o.codeId === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0])) && (o.salt instanceof Uint8Array || typeof o.salt === 'string') && typeof o.fixMsg === 'boolean'); }, isAmino(o: any): o is MsgInstantiateContract2Amino { - return o && (o.$typeUrl === MsgInstantiateContract2.typeUrl || typeof o.sender === "string" && typeof o.admin === "string" && typeof o.code_id === "bigint" && typeof o.label === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0])) && (o.salt instanceof Uint8Array || typeof o.salt === "string") && typeof o.fix_msg === "boolean"); + return o && (o.$typeUrl === MsgInstantiateContract2.typeUrl || typeof o.sender === 'string' && typeof o.admin === 'string' && typeof o.code_id === 'bigint' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0])) && (o.salt instanceof Uint8Array || typeof o.salt === 'string') && typeof o.fix_msg === 'boolean'); }, encode(message: MsgInstantiateContract2, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(18).string(message.admin); } if (message.codeId !== BigInt(0)) { writer.uint32(24).uint64(message.codeId); } - if (message.label !== "") { + if (message.label !== '') { writer.uint32(34).string(message.label); } if (message.msg.length !== 0) { @@ -1449,43 +1450,43 @@ export const MsgInstantiateContract2 = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - case 7: - message.salt = reader.bytes(); - break; - case 8: - message.fixMsg = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.admin = reader.string(); + break; + case 3: + message.codeId = reader.uint64(); + break; + case 4: + message.label = reader.string(); + break; + case 5: + message.msg = reader.bytes(); + break; + case 6: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 7: + message.salt = reader.bytes(); + break; + case 8: + message.fixMsg = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgInstantiateContract2 { const message = createBaseMsgInstantiateContract2(); - message.sender = object.sender ?? ""; - message.admin = object.admin ?? ""; + message.sender = object.sender ?? ''; + message.admin = object.admin ?? ''; message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.label = object.label ?? ""; + message.label = object.label ?? ''; message.msg = object.msg ?? new Uint8Array(); message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; message.salt = object.salt ?? new Uint8Array(); @@ -1520,10 +1521,10 @@ export const MsgInstantiateContract2 = { }, toAmino(message: MsgInstantiateContract2): MsgInstantiateContract2Amino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; - obj.admin = message.admin === "" ? undefined : message.admin; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.admin = message.admin === '' ? undefined : message.admin; obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; - obj.label = message.label === "" ? undefined : message.label; + obj.label = message.label === '' ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); @@ -1539,7 +1540,7 @@ export const MsgInstantiateContract2 = { }, toAminoMsg(message: MsgInstantiateContract2): MsgInstantiateContract2AminoMsg { return { - type: "wasm/MsgInstantiateContract2", + type: 'wasm/MsgInstantiateContract2', value: MsgInstantiateContract2.toAmino(message) }; }, @@ -1551,7 +1552,7 @@ export const MsgInstantiateContract2 = { }, toProtoMsg(message: MsgInstantiateContract2): MsgInstantiateContract2ProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract2', value: MsgInstantiateContract2.encode(message).finish() }; } @@ -1560,21 +1561,21 @@ GlobalDecoderRegistry.register(MsgInstantiateContract2.typeUrl, MsgInstantiateCo GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2.aminoType, MsgInstantiateContract2.typeUrl); function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { return { - address: "", + address: '', data: new Uint8Array() }; } export const MsgInstantiateContract2Response = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", - aminoType: "wasm/MsgInstantiateContract2Response", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract2Response', + aminoType: 'wasm/MsgInstantiateContract2Response', is(o: any): o is MsgInstantiateContract2Response { - return o && (o.$typeUrl === MsgInstantiateContract2Response.typeUrl || typeof o.address === "string" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgInstantiateContract2Response.typeUrl || typeof o.address === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, isAmino(o: any): o is MsgInstantiateContract2ResponseAmino { - return o && (o.$typeUrl === MsgInstantiateContract2Response.typeUrl || typeof o.address === "string" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgInstantiateContract2Response.typeUrl || typeof o.address === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, encode(message: MsgInstantiateContract2Response, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.data.length !== 0) { @@ -1589,22 +1590,22 @@ export const MsgInstantiateContract2Response = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgInstantiateContract2Response { const message = createBaseMsgInstantiateContract2Response(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.data = object.data ?? new Uint8Array(); return message; }, @@ -1620,7 +1621,7 @@ export const MsgInstantiateContract2Response = { }, toAmino(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -1629,7 +1630,7 @@ export const MsgInstantiateContract2Response = { }, toAminoMsg(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseAminoMsg { return { - type: "wasm/MsgInstantiateContract2Response", + type: 'wasm/MsgInstantiateContract2Response', value: MsgInstantiateContract2Response.toAmino(message) }; }, @@ -1641,7 +1642,7 @@ export const MsgInstantiateContract2Response = { }, toProtoMsg(message: MsgInstantiateContract2Response): MsgInstantiateContract2ResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", + typeUrl: '/cosmwasm.wasm.v1.MsgInstantiateContract2Response', value: MsgInstantiateContract2Response.encode(message).finish() }; } @@ -1650,26 +1651,26 @@ GlobalDecoderRegistry.register(MsgInstantiateContract2Response.typeUrl, MsgInsta GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2Response.aminoType, MsgInstantiateContract2Response.typeUrl); function createBaseMsgExecuteContract(): MsgExecuteContract { return { - sender: "", - contract: "", + sender: '', + contract: '', msg: new Uint8Array(), funds: [] }; } export const MsgExecuteContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - aminoType: "wasm/MsgExecuteContract", + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + aminoType: 'wasm/MsgExecuteContract', is(o: any): o is MsgExecuteContract { - return o && (o.$typeUrl === MsgExecuteContract.typeUrl || typeof o.sender === "string" && typeof o.contract === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0]))); + return o && (o.$typeUrl === MsgExecuteContract.typeUrl || typeof o.sender === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0]))); }, isAmino(o: any): o is MsgExecuteContractAmino { - return o && (o.$typeUrl === MsgExecuteContract.typeUrl || typeof o.sender === "string" && typeof o.contract === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0]))); + return o && (o.$typeUrl === MsgExecuteContract.typeUrl || typeof o.sender === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0]))); }, encode(message: MsgExecuteContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } - if (message.contract !== "") { + if (message.contract !== '') { writer.uint32(18).string(message.contract); } if (message.msg.length !== 0) { @@ -1687,29 +1688,29 @@ export const MsgExecuteContract = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.msg = reader.bytes(); - break; - case 5: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.contract = reader.string(); + break; + case 3: + message.msg = reader.bytes(); + break; + case 5: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgExecuteContract { const message = createBaseMsgExecuteContract(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; + message.sender = object.sender ?? ''; + message.contract = object.contract ?? ''; message.msg = object.msg ?? new Uint8Array(); message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; return message; @@ -1730,8 +1731,8 @@ export const MsgExecuteContract = { }, toAmino(message: MsgExecuteContract): MsgExecuteContractAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; - obj.contract = message.contract === "" ? undefined : message.contract; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.contract = message.contract === '' ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); @@ -1745,7 +1746,7 @@ export const MsgExecuteContract = { }, toAminoMsg(message: MsgExecuteContract): MsgExecuteContractAminoMsg { return { - type: "wasm/MsgExecuteContract", + type: 'wasm/MsgExecuteContract', value: MsgExecuteContract.toAmino(message) }; }, @@ -1757,7 +1758,7 @@ export const MsgExecuteContract = { }, toProtoMsg(message: MsgExecuteContract): MsgExecuteContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', value: MsgExecuteContract.encode(message).finish() }; } @@ -1770,13 +1771,13 @@ function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { }; } export const MsgExecuteContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", - aminoType: "wasm/MsgExecuteContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContractResponse', + aminoType: 'wasm/MsgExecuteContractResponse', is(o: any): o is MsgExecuteContractResponse { - return o && (o.$typeUrl === MsgExecuteContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === MsgExecuteContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, isAmino(o: any): o is MsgExecuteContractResponseAmino { - return o && (o.$typeUrl === MsgExecuteContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === MsgExecuteContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, encode(message: MsgExecuteContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.data.length !== 0) { @@ -1791,12 +1792,12 @@ export const MsgExecuteContractResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1823,7 +1824,7 @@ export const MsgExecuteContractResponse = { }, toAminoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseAminoMsg { return { - type: "wasm/MsgExecuteContractResponse", + type: 'wasm/MsgExecuteContractResponse', value: MsgExecuteContractResponse.toAmino(message) }; }, @@ -1835,7 +1836,7 @@ export const MsgExecuteContractResponse = { }, toProtoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContractResponse', value: MsgExecuteContractResponse.encode(message).finish() }; } @@ -1844,26 +1845,26 @@ GlobalDecoderRegistry.register(MsgExecuteContractResponse.typeUrl, MsgExecuteCon GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContractResponse.aminoType, MsgExecuteContractResponse.typeUrl); function createBaseMsgMigrateContract(): MsgMigrateContract { return { - sender: "", - contract: "", + sender: '', + contract: '', codeId: BigInt(0), msg: new Uint8Array() }; } export const MsgMigrateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - aminoType: "wasm/MsgMigrateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgMigrateContract', + aminoType: 'wasm/MsgMigrateContract', is(o: any): o is MsgMigrateContract { - return o && (o.$typeUrl === MsgMigrateContract.typeUrl || typeof o.sender === "string" && typeof o.contract === "string" && typeof o.codeId === "bigint" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === MsgMigrateContract.typeUrl || typeof o.sender === 'string' && typeof o.contract === 'string' && typeof o.codeId === 'bigint' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, isAmino(o: any): o is MsgMigrateContractAmino { - return o && (o.$typeUrl === MsgMigrateContract.typeUrl || typeof o.sender === "string" && typeof o.contract === "string" && typeof o.code_id === "bigint" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === MsgMigrateContract.typeUrl || typeof o.sender === 'string' && typeof o.contract === 'string' && typeof o.code_id === 'bigint' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, encode(message: MsgMigrateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } - if (message.contract !== "") { + if (message.contract !== '') { writer.uint32(18).string(message.contract); } if (message.codeId !== BigInt(0)) { @@ -1881,29 +1882,29 @@ export const MsgMigrateContract = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.contract = reader.string(); + break; + case 3: + message.codeId = reader.uint64(); + break; + case 4: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgMigrateContract { const message = createBaseMsgMigrateContract(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; + message.sender = object.sender ?? ''; + message.contract = object.contract ?? ''; message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); message.msg = object.msg ?? new Uint8Array(); return message; @@ -1926,8 +1927,8 @@ export const MsgMigrateContract = { }, toAmino(message: MsgMigrateContract): MsgMigrateContractAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; - obj.contract = message.contract === "" ? undefined : message.contract; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.contract = message.contract === '' ? undefined : message.contract; obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; @@ -1937,7 +1938,7 @@ export const MsgMigrateContract = { }, toAminoMsg(message: MsgMigrateContract): MsgMigrateContractAminoMsg { return { - type: "wasm/MsgMigrateContract", + type: 'wasm/MsgMigrateContract', value: MsgMigrateContract.toAmino(message) }; }, @@ -1949,7 +1950,7 @@ export const MsgMigrateContract = { }, toProtoMsg(message: MsgMigrateContract): MsgMigrateContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgMigrateContract', value: MsgMigrateContract.encode(message).finish() }; } @@ -1962,13 +1963,13 @@ function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { }; } export const MsgMigrateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", - aminoType: "wasm/MsgMigrateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgMigrateContractResponse', + aminoType: 'wasm/MsgMigrateContractResponse', is(o: any): o is MsgMigrateContractResponse { - return o && (o.$typeUrl === MsgMigrateContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === MsgMigrateContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, isAmino(o: any): o is MsgMigrateContractResponseAmino { - return o && (o.$typeUrl === MsgMigrateContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === MsgMigrateContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, encode(message: MsgMigrateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.data.length !== 0) { @@ -1983,12 +1984,12 @@ export const MsgMigrateContractResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2015,7 +2016,7 @@ export const MsgMigrateContractResponse = { }, toAminoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseAminoMsg { return { - type: "wasm/MsgMigrateContractResponse", + type: 'wasm/MsgMigrateContractResponse', value: MsgMigrateContractResponse.toAmino(message) }; }, @@ -2027,7 +2028,7 @@ export const MsgMigrateContractResponse = { }, toProtoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgMigrateContractResponse', value: MsgMigrateContractResponse.encode(message).finish() }; } @@ -2036,28 +2037,28 @@ GlobalDecoderRegistry.register(MsgMigrateContractResponse.typeUrl, MsgMigrateCon GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContractResponse.aminoType, MsgMigrateContractResponse.typeUrl); function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { return { - sender: "", - newAdmin: "", - contract: "" + sender: '', + newAdmin: '', + contract: '' }; } export const MsgUpdateAdmin = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - aminoType: "wasm/MsgUpdateAdmin", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateAdmin', + aminoType: 'wasm/MsgUpdateAdmin', is(o: any): o is MsgUpdateAdmin { - return o && (o.$typeUrl === MsgUpdateAdmin.typeUrl || typeof o.sender === "string" && typeof o.newAdmin === "string" && typeof o.contract === "string"); + return o && (o.$typeUrl === MsgUpdateAdmin.typeUrl || typeof o.sender === 'string' && typeof o.newAdmin === 'string' && typeof o.contract === 'string'); }, isAmino(o: any): o is MsgUpdateAdminAmino { - return o && (o.$typeUrl === MsgUpdateAdmin.typeUrl || typeof o.sender === "string" && typeof o.new_admin === "string" && typeof o.contract === "string"); + return o && (o.$typeUrl === MsgUpdateAdmin.typeUrl || typeof o.sender === 'string' && typeof o.new_admin === 'string' && typeof o.contract === 'string'); }, encode(message: MsgUpdateAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } - if (message.newAdmin !== "") { + if (message.newAdmin !== '') { writer.uint32(18).string(message.newAdmin); } - if (message.contract !== "") { + if (message.contract !== '') { writer.uint32(26).string(message.contract); } return writer; @@ -2069,27 +2070,27 @@ export const MsgUpdateAdmin = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.newAdmin = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.newAdmin = reader.string(); + break; + case 3: + message.contract = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateAdmin { const message = createBaseMsgUpdateAdmin(); - message.sender = object.sender ?? ""; - message.newAdmin = object.newAdmin ?? ""; - message.contract = object.contract ?? ""; + message.sender = object.sender ?? ''; + message.newAdmin = object.newAdmin ?? ''; + message.contract = object.contract ?? ''; return message; }, fromAmino(object: MsgUpdateAdminAmino): MsgUpdateAdmin { @@ -2107,9 +2108,9 @@ export const MsgUpdateAdmin = { }, toAmino(message: MsgUpdateAdmin): MsgUpdateAdminAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; - obj.new_admin = message.newAdmin === "" ? undefined : message.newAdmin; - obj.contract = message.contract === "" ? undefined : message.contract; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.new_admin = message.newAdmin === '' ? undefined : message.newAdmin; + obj.contract = message.contract === '' ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgUpdateAdminAminoMsg): MsgUpdateAdmin { @@ -2117,7 +2118,7 @@ export const MsgUpdateAdmin = { }, toAminoMsg(message: MsgUpdateAdmin): MsgUpdateAdminAminoMsg { return { - type: "wasm/MsgUpdateAdmin", + type: 'wasm/MsgUpdateAdmin', value: MsgUpdateAdmin.toAmino(message) }; }, @@ -2129,7 +2130,7 @@ export const MsgUpdateAdmin = { }, toProtoMsg(message: MsgUpdateAdmin): MsgUpdateAdminProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateAdmin', value: MsgUpdateAdmin.encode(message).finish() }; } @@ -2140,8 +2141,8 @@ function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { return {}; } export const MsgUpdateAdminResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", - aminoType: "wasm/MsgUpdateAdminResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateAdminResponse', + aminoType: 'wasm/MsgUpdateAdminResponse', is(o: any): o is MsgUpdateAdminResponse { return o && o.$typeUrl === MsgUpdateAdminResponse.typeUrl; }, @@ -2158,9 +2159,9 @@ export const MsgUpdateAdminResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2182,7 +2183,7 @@ export const MsgUpdateAdminResponse = { }, toAminoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseAminoMsg { return { - type: "wasm/MsgUpdateAdminResponse", + type: 'wasm/MsgUpdateAdminResponse', value: MsgUpdateAdminResponse.toAmino(message) }; }, @@ -2194,7 +2195,7 @@ export const MsgUpdateAdminResponse = { }, toProtoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateAdminResponse', value: MsgUpdateAdminResponse.encode(message).finish() }; } @@ -2203,24 +2204,24 @@ GlobalDecoderRegistry.register(MsgUpdateAdminResponse.typeUrl, MsgUpdateAdminRes GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdminResponse.aminoType, MsgUpdateAdminResponse.typeUrl); function createBaseMsgClearAdmin(): MsgClearAdmin { return { - sender: "", - contract: "" + sender: '', + contract: '' }; } export const MsgClearAdmin = { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - aminoType: "wasm/MsgClearAdmin", + typeUrl: '/cosmwasm.wasm.v1.MsgClearAdmin', + aminoType: 'wasm/MsgClearAdmin', is(o: any): o is MsgClearAdmin { - return o && (o.$typeUrl === MsgClearAdmin.typeUrl || typeof o.sender === "string" && typeof o.contract === "string"); + return o && (o.$typeUrl === MsgClearAdmin.typeUrl || typeof o.sender === 'string' && typeof o.contract === 'string'); }, isAmino(o: any): o is MsgClearAdminAmino { - return o && (o.$typeUrl === MsgClearAdmin.typeUrl || typeof o.sender === "string" && typeof o.contract === "string"); + return o && (o.$typeUrl === MsgClearAdmin.typeUrl || typeof o.sender === 'string' && typeof o.contract === 'string'); }, encode(message: MsgClearAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } - if (message.contract !== "") { + if (message.contract !== '') { writer.uint32(26).string(message.contract); } return writer; @@ -2232,23 +2233,23 @@ export const MsgClearAdmin = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 3: + message.contract = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgClearAdmin { const message = createBaseMsgClearAdmin(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; + message.sender = object.sender ?? ''; + message.contract = object.contract ?? ''; return message; }, fromAmino(object: MsgClearAdminAmino): MsgClearAdmin { @@ -2263,8 +2264,8 @@ export const MsgClearAdmin = { }, toAmino(message: MsgClearAdmin): MsgClearAdminAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; - obj.contract = message.contract === "" ? undefined : message.contract; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.contract = message.contract === '' ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgClearAdminAminoMsg): MsgClearAdmin { @@ -2272,7 +2273,7 @@ export const MsgClearAdmin = { }, toAminoMsg(message: MsgClearAdmin): MsgClearAdminAminoMsg { return { - type: "wasm/MsgClearAdmin", + type: 'wasm/MsgClearAdmin', value: MsgClearAdmin.toAmino(message) }; }, @@ -2284,7 +2285,7 @@ export const MsgClearAdmin = { }, toProtoMsg(message: MsgClearAdmin): MsgClearAdminProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", + typeUrl: '/cosmwasm.wasm.v1.MsgClearAdmin', value: MsgClearAdmin.encode(message).finish() }; } @@ -2295,8 +2296,8 @@ function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { return {}; } export const MsgClearAdminResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", - aminoType: "wasm/MsgClearAdminResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgClearAdminResponse', + aminoType: 'wasm/MsgClearAdminResponse', is(o: any): o is MsgClearAdminResponse { return o && o.$typeUrl === MsgClearAdminResponse.typeUrl; }, @@ -2313,9 +2314,9 @@ export const MsgClearAdminResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2337,7 +2338,7 @@ export const MsgClearAdminResponse = { }, toAminoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseAminoMsg { return { - type: "wasm/MsgClearAdminResponse", + type: 'wasm/MsgClearAdminResponse', value: MsgClearAdminResponse.toAmino(message) }; }, @@ -2349,7 +2350,7 @@ export const MsgClearAdminResponse = { }, toProtoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgClearAdminResponse', value: MsgClearAdminResponse.encode(message).finish() }; } @@ -2358,22 +2359,22 @@ GlobalDecoderRegistry.register(MsgClearAdminResponse.typeUrl, MsgClearAdminRespo GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdminResponse.aminoType, MsgClearAdminResponse.typeUrl); function createBaseMsgUpdateInstantiateConfig(): MsgUpdateInstantiateConfig { return { - sender: "", + sender: '', codeId: BigInt(0), newInstantiatePermission: undefined }; } export const MsgUpdateInstantiateConfig = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", - aminoType: "wasm/MsgUpdateInstantiateConfig", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig', + aminoType: 'wasm/MsgUpdateInstantiateConfig', is(o: any): o is MsgUpdateInstantiateConfig { - return o && (o.$typeUrl === MsgUpdateInstantiateConfig.typeUrl || typeof o.sender === "string" && typeof o.codeId === "bigint"); + return o && (o.$typeUrl === MsgUpdateInstantiateConfig.typeUrl || typeof o.sender === 'string' && typeof o.codeId === 'bigint'); }, isAmino(o: any): o is MsgUpdateInstantiateConfigAmino { - return o && (o.$typeUrl === MsgUpdateInstantiateConfig.typeUrl || typeof o.sender === "string" && typeof o.code_id === "bigint"); + return o && (o.$typeUrl === MsgUpdateInstantiateConfig.typeUrl || typeof o.sender === 'string' && typeof o.code_id === 'bigint'); }, encode(message: MsgUpdateInstantiateConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } if (message.codeId !== BigInt(0)) { @@ -2391,25 +2392,25 @@ export const MsgUpdateInstantiateConfig = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.codeId = reader.uint64(); - break; - case 3: - message.newInstantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.codeId = reader.uint64(); + break; + case 3: + message.newInstantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateInstantiateConfig { const message = createBaseMsgUpdateInstantiateConfig(); - message.sender = object.sender ?? ""; + message.sender = object.sender ?? ''; message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); message.newInstantiatePermission = object.newInstantiatePermission !== undefined && object.newInstantiatePermission !== null ? AccessConfig.fromPartial(object.newInstantiatePermission) : undefined; return message; @@ -2429,7 +2430,7 @@ export const MsgUpdateInstantiateConfig = { }, toAmino(message: MsgUpdateInstantiateConfig): MsgUpdateInstantiateConfigAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; + obj.sender = message.sender === '' ? undefined : message.sender; obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; obj.new_instantiate_permission = message.newInstantiatePermission ? AccessConfig.toAmino(message.newInstantiatePermission) : undefined; return obj; @@ -2439,7 +2440,7 @@ export const MsgUpdateInstantiateConfig = { }, toAminoMsg(message: MsgUpdateInstantiateConfig): MsgUpdateInstantiateConfigAminoMsg { return { - type: "wasm/MsgUpdateInstantiateConfig", + type: 'wasm/MsgUpdateInstantiateConfig', value: MsgUpdateInstantiateConfig.toAmino(message) }; }, @@ -2451,7 +2452,7 @@ export const MsgUpdateInstantiateConfig = { }, toProtoMsg(message: MsgUpdateInstantiateConfig): MsgUpdateInstantiateConfigProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig', value: MsgUpdateInstantiateConfig.encode(message).finish() }; } @@ -2462,8 +2463,8 @@ function createBaseMsgUpdateInstantiateConfigResponse(): MsgUpdateInstantiateCon return {}; } export const MsgUpdateInstantiateConfigResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", - aminoType: "wasm/MsgUpdateInstantiateConfigResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse', + aminoType: 'wasm/MsgUpdateInstantiateConfigResponse', is(o: any): o is MsgUpdateInstantiateConfigResponse { return o && o.$typeUrl === MsgUpdateInstantiateConfigResponse.typeUrl; }, @@ -2480,9 +2481,9 @@ export const MsgUpdateInstantiateConfigResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2504,7 +2505,7 @@ export const MsgUpdateInstantiateConfigResponse = { }, toAminoMsg(message: MsgUpdateInstantiateConfigResponse): MsgUpdateInstantiateConfigResponseAminoMsg { return { - type: "wasm/MsgUpdateInstantiateConfigResponse", + type: 'wasm/MsgUpdateInstantiateConfigResponse', value: MsgUpdateInstantiateConfigResponse.toAmino(message) }; }, @@ -2516,7 +2517,7 @@ export const MsgUpdateInstantiateConfigResponse = { }, toProtoMsg(message: MsgUpdateInstantiateConfigResponse): MsgUpdateInstantiateConfigResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse', value: MsgUpdateInstantiateConfigResponse.encode(message).finish() }; } @@ -2525,21 +2526,21 @@ GlobalDecoderRegistry.register(MsgUpdateInstantiateConfigResponse.typeUrl, MsgUp GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfigResponse.aminoType, MsgUpdateInstantiateConfigResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - authority: "", + authority: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", - aminoType: "wasm/MsgUpdateParams", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateParams', + aminoType: 'wasm/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.params !== undefined) { @@ -2554,22 +2555,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -2585,7 +2586,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({})); return obj; }, @@ -2594,7 +2595,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "wasm/MsgUpdateParams", + type: 'wasm/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -2606,7 +2607,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -2617,8 +2618,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", - aminoType: "wasm/MsgUpdateParamsResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateParamsResponse', + aminoType: 'wasm/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -2635,9 +2636,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2659,7 +2660,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "wasm/MsgUpdateParamsResponse", + type: 'wasm/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -2671,7 +2672,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } @@ -2680,25 +2681,25 @@ GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsR GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSudoContract(): MsgSudoContract { return { - authority: "", - contract: "", + authority: '', + contract: '', msg: new Uint8Array() }; } export const MsgSudoContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", - aminoType: "wasm/MsgSudoContract", + typeUrl: '/cosmwasm.wasm.v1.MsgSudoContract', + aminoType: 'wasm/MsgSudoContract', is(o: any): o is MsgSudoContract { - return o && (o.$typeUrl === MsgSudoContract.typeUrl || typeof o.authority === "string" && typeof o.contract === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === MsgSudoContract.typeUrl || typeof o.authority === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, isAmino(o: any): o is MsgSudoContractAmino { - return o && (o.$typeUrl === MsgSudoContract.typeUrl || typeof o.authority === "string" && typeof o.contract === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === MsgSudoContract.typeUrl || typeof o.authority === 'string' && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, encode(message: MsgSudoContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } - if (message.contract !== "") { + if (message.contract !== '') { writer.uint32(18).string(message.contract); } if (message.msg.length !== 0) { @@ -2713,26 +2714,26 @@ export const MsgSudoContract = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.contract = reader.string(); + break; + case 3: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgSudoContract { const message = createBaseMsgSudoContract(); - message.authority = object.authority ?? ""; - message.contract = object.contract ?? ""; + message.authority = object.authority ?? ''; + message.contract = object.contract ?? ''; message.msg = object.msg ?? new Uint8Array(); return message; }, @@ -2751,8 +2752,8 @@ export const MsgSudoContract = { }, toAmino(message: MsgSudoContract): MsgSudoContractAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; - obj.contract = message.contract === "" ? undefined : message.contract; + obj.authority = message.authority === '' ? undefined : message.authority; + obj.contract = message.contract === '' ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, @@ -2761,7 +2762,7 @@ export const MsgSudoContract = { }, toAminoMsg(message: MsgSudoContract): MsgSudoContractAminoMsg { return { - type: "wasm/MsgSudoContract", + type: 'wasm/MsgSudoContract', value: MsgSudoContract.toAmino(message) }; }, @@ -2773,7 +2774,7 @@ export const MsgSudoContract = { }, toProtoMsg(message: MsgSudoContract): MsgSudoContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + typeUrl: '/cosmwasm.wasm.v1.MsgSudoContract', value: MsgSudoContract.encode(message).finish() }; } @@ -2786,13 +2787,13 @@ function createBaseMsgSudoContractResponse(): MsgSudoContractResponse { }; } export const MsgSudoContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", - aminoType: "wasm/MsgSudoContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgSudoContractResponse', + aminoType: 'wasm/MsgSudoContractResponse', is(o: any): o is MsgSudoContractResponse { - return o && (o.$typeUrl === MsgSudoContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === MsgSudoContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, isAmino(o: any): o is MsgSudoContractResponseAmino { - return o && (o.$typeUrl === MsgSudoContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === "string"); + return o && (o.$typeUrl === MsgSudoContractResponse.typeUrl || o.data instanceof Uint8Array || typeof o.data === 'string'); }, encode(message: MsgSudoContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.data.length !== 0) { @@ -2807,12 +2808,12 @@ export const MsgSudoContractResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2839,7 +2840,7 @@ export const MsgSudoContractResponse = { }, toAminoMsg(message: MsgSudoContractResponse): MsgSudoContractResponseAminoMsg { return { - type: "wasm/MsgSudoContractResponse", + type: 'wasm/MsgSudoContractResponse', value: MsgSudoContractResponse.toAmino(message) }; }, @@ -2851,7 +2852,7 @@ export const MsgSudoContractResponse = { }, toProtoMsg(message: MsgSudoContractResponse): MsgSudoContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgSudoContractResponse', value: MsgSudoContractResponse.encode(message).finish() }; } @@ -2860,21 +2861,21 @@ GlobalDecoderRegistry.register(MsgSudoContractResponse.typeUrl, MsgSudoContractR GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContractResponse.aminoType, MsgSudoContractResponse.typeUrl); function createBaseMsgPinCodes(): MsgPinCodes { return { - authority: "", + authority: '', codeIds: [] }; } export const MsgPinCodes = { - typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", - aminoType: "wasm/MsgPinCodes", + typeUrl: '/cosmwasm.wasm.v1.MsgPinCodes', + aminoType: 'wasm/MsgPinCodes', is(o: any): o is MsgPinCodes { - return o && (o.$typeUrl === MsgPinCodes.typeUrl || typeof o.authority === "string" && Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === "bigint")); + return o && (o.$typeUrl === MsgPinCodes.typeUrl || typeof o.authority === 'string' && Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === 'bigint')); }, isAmino(o: any): o is MsgPinCodesAmino { - return o && (o.$typeUrl === MsgPinCodes.typeUrl || typeof o.authority === "string" && Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === "bigint")); + return o && (o.$typeUrl === MsgPinCodes.typeUrl || typeof o.authority === 'string' && Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === 'bigint')); }, encode(message: MsgPinCodes, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } writer.uint32(18).fork(); @@ -2891,29 +2892,29 @@ export const MsgPinCodes = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } else { + case 1: + message.authority = reader.string(); + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.codeIds.push(reader.uint64()); } - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.codeIds.push(reader.uint64()); + } + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgPinCodes { const message = createBaseMsgPinCodes(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; return message; }, @@ -2927,7 +2928,7 @@ export const MsgPinCodes = { }, toAmino(message: MsgPinCodes): MsgPinCodesAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; if (message.codeIds) { obj.code_ids = message.codeIds.map(e => e.toString()); } else { @@ -2940,7 +2941,7 @@ export const MsgPinCodes = { }, toAminoMsg(message: MsgPinCodes): MsgPinCodesAminoMsg { return { - type: "wasm/MsgPinCodes", + type: 'wasm/MsgPinCodes', value: MsgPinCodes.toAmino(message) }; }, @@ -2952,7 +2953,7 @@ export const MsgPinCodes = { }, toProtoMsg(message: MsgPinCodes): MsgPinCodesProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + typeUrl: '/cosmwasm.wasm.v1.MsgPinCodes', value: MsgPinCodes.encode(message).finish() }; } @@ -2963,8 +2964,8 @@ function createBaseMsgPinCodesResponse(): MsgPinCodesResponse { return {}; } export const MsgPinCodesResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", - aminoType: "wasm/MsgPinCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgPinCodesResponse', + aminoType: 'wasm/MsgPinCodesResponse', is(o: any): o is MsgPinCodesResponse { return o && o.$typeUrl === MsgPinCodesResponse.typeUrl; }, @@ -2981,9 +2982,9 @@ export const MsgPinCodesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3005,7 +3006,7 @@ export const MsgPinCodesResponse = { }, toAminoMsg(message: MsgPinCodesResponse): MsgPinCodesResponseAminoMsg { return { - type: "wasm/MsgPinCodesResponse", + type: 'wasm/MsgPinCodesResponse', value: MsgPinCodesResponse.toAmino(message) }; }, @@ -3017,7 +3018,7 @@ export const MsgPinCodesResponse = { }, toProtoMsg(message: MsgPinCodesResponse): MsgPinCodesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgPinCodesResponse', value: MsgPinCodesResponse.encode(message).finish() }; } @@ -3026,21 +3027,21 @@ GlobalDecoderRegistry.register(MsgPinCodesResponse.typeUrl, MsgPinCodesResponse) GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodesResponse.aminoType, MsgPinCodesResponse.typeUrl); function createBaseMsgUnpinCodes(): MsgUnpinCodes { return { - authority: "", + authority: '', codeIds: [] }; } export const MsgUnpinCodes = { - typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", - aminoType: "wasm/MsgUnpinCodes", + typeUrl: '/cosmwasm.wasm.v1.MsgUnpinCodes', + aminoType: 'wasm/MsgUnpinCodes', is(o: any): o is MsgUnpinCodes { - return o && (o.$typeUrl === MsgUnpinCodes.typeUrl || typeof o.authority === "string" && Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === "bigint")); + return o && (o.$typeUrl === MsgUnpinCodes.typeUrl || typeof o.authority === 'string' && Array.isArray(o.codeIds) && (!o.codeIds.length || typeof o.codeIds[0] === 'bigint')); }, isAmino(o: any): o is MsgUnpinCodesAmino { - return o && (o.$typeUrl === MsgUnpinCodes.typeUrl || typeof o.authority === "string" && Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === "bigint")); + return o && (o.$typeUrl === MsgUnpinCodes.typeUrl || typeof o.authority === 'string' && Array.isArray(o.code_ids) && (!o.code_ids.length || typeof o.code_ids[0] === 'bigint')); }, encode(message: MsgUnpinCodes, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } writer.uint32(18).fork(); @@ -3057,29 +3058,29 @@ export const MsgUnpinCodes = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } else { + case 1: + message.authority = reader.string(); + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.codeIds.push(reader.uint64()); } - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.codeIds.push(reader.uint64()); + } + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUnpinCodes { const message = createBaseMsgUnpinCodes(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; return message; }, @@ -3093,7 +3094,7 @@ export const MsgUnpinCodes = { }, toAmino(message: MsgUnpinCodes): MsgUnpinCodesAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; if (message.codeIds) { obj.code_ids = message.codeIds.map(e => e.toString()); } else { @@ -3106,7 +3107,7 @@ export const MsgUnpinCodes = { }, toAminoMsg(message: MsgUnpinCodes): MsgUnpinCodesAminoMsg { return { - type: "wasm/MsgUnpinCodes", + type: 'wasm/MsgUnpinCodes', value: MsgUnpinCodes.toAmino(message) }; }, @@ -3118,7 +3119,7 @@ export const MsgUnpinCodes = { }, toProtoMsg(message: MsgUnpinCodes): MsgUnpinCodesProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + typeUrl: '/cosmwasm.wasm.v1.MsgUnpinCodes', value: MsgUnpinCodes.encode(message).finish() }; } @@ -3129,8 +3130,8 @@ function createBaseMsgUnpinCodesResponse(): MsgUnpinCodesResponse { return {}; } export const MsgUnpinCodesResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", - aminoType: "wasm/MsgUnpinCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUnpinCodesResponse', + aminoType: 'wasm/MsgUnpinCodesResponse', is(o: any): o is MsgUnpinCodesResponse { return o && o.$typeUrl === MsgUnpinCodesResponse.typeUrl; }, @@ -3147,9 +3148,9 @@ export const MsgUnpinCodesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3171,7 +3172,7 @@ export const MsgUnpinCodesResponse = { }, toAminoMsg(message: MsgUnpinCodesResponse): MsgUnpinCodesResponseAminoMsg { return { - type: "wasm/MsgUnpinCodesResponse", + type: 'wasm/MsgUnpinCodesResponse', value: MsgUnpinCodesResponse.toAmino(message) }; }, @@ -3183,7 +3184,7 @@ export const MsgUnpinCodesResponse = { }, toProtoMsg(message: MsgUnpinCodesResponse): MsgUnpinCodesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUnpinCodesResponse', value: MsgUnpinCodesResponse.encode(message).finish() }; } @@ -3192,30 +3193,30 @@ GlobalDecoderRegistry.register(MsgUnpinCodesResponse.typeUrl, MsgUnpinCodesRespo GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodesResponse.aminoType, MsgUnpinCodesResponse.typeUrl); function createBaseMsgStoreAndInstantiateContract(): MsgStoreAndInstantiateContract { return { - authority: "", + authority: '', wasmByteCode: new Uint8Array(), instantiatePermission: undefined, unpinCode: false, - admin: "", - label: "", + admin: '', + label: '', msg: new Uint8Array(), funds: [], - source: "", - builder: "", + source: '', + builder: '', codeHash: new Uint8Array() }; } export const MsgStoreAndInstantiateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", - aminoType: "wasm/MsgStoreAndInstantiateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract', + aminoType: 'wasm/MsgStoreAndInstantiateContract', is(o: any): o is MsgStoreAndInstantiateContract { - return o && (o.$typeUrl === MsgStoreAndInstantiateContract.typeUrl || typeof o.authority === "string" && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === "string") && typeof o.unpinCode === "boolean" && typeof o.admin === "string" && typeof o.label === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0])) && typeof o.source === "string" && typeof o.builder === "string" && (o.codeHash instanceof Uint8Array || typeof o.codeHash === "string")); + return o && (o.$typeUrl === MsgStoreAndInstantiateContract.typeUrl || typeof o.authority === 'string' && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === 'string') && typeof o.unpinCode === 'boolean' && typeof o.admin === 'string' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.is(o.funds[0])) && typeof o.source === 'string' && typeof o.builder === 'string' && (o.codeHash instanceof Uint8Array || typeof o.codeHash === 'string')); }, isAmino(o: any): o is MsgStoreAndInstantiateContractAmino { - return o && (o.$typeUrl === MsgStoreAndInstantiateContract.typeUrl || typeof o.authority === "string" && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === "string") && typeof o.unpin_code === "boolean" && typeof o.admin === "string" && typeof o.label === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string") && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0])) && typeof o.source === "string" && typeof o.builder === "string" && (o.code_hash instanceof Uint8Array || typeof o.code_hash === "string")); + return o && (o.$typeUrl === MsgStoreAndInstantiateContract.typeUrl || typeof o.authority === 'string' && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === 'string') && typeof o.unpin_code === 'boolean' && typeof o.admin === 'string' && typeof o.label === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string') && Array.isArray(o.funds) && (!o.funds.length || Coin.isAmino(o.funds[0])) && typeof o.source === 'string' && typeof o.builder === 'string' && (o.code_hash instanceof Uint8Array || typeof o.code_hash === 'string')); }, encode(message: MsgStoreAndInstantiateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.wasmByteCode.length !== 0) { @@ -3227,10 +3228,10 @@ export const MsgStoreAndInstantiateContract = { if (message.unpinCode === true) { writer.uint32(40).bool(message.unpinCode); } - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(50).string(message.admin); } - if (message.label !== "") { + if (message.label !== '') { writer.uint32(58).string(message.label); } if (message.msg.length !== 0) { @@ -3239,10 +3240,10 @@ export const MsgStoreAndInstantiateContract = { for (const v of message.funds) { Coin.encode(v!, writer.uint32(74).fork()).ldelim(); } - if (message.source !== "") { + if (message.source !== '') { writer.uint32(82).string(message.source); } - if (message.builder !== "") { + if (message.builder !== '') { writer.uint32(90).string(message.builder); } if (message.codeHash.length !== 0) { @@ -3257,58 +3258,58 @@ export const MsgStoreAndInstantiateContract = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 3: - message.wasmByteCode = reader.bytes(); - break; - case 4: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - case 5: - message.unpinCode = reader.bool(); - break; - case 6: - message.admin = reader.string(); - break; - case 7: - message.label = reader.string(); - break; - case 8: - message.msg = reader.bytes(); - break; - case 9: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - case 10: - message.source = reader.string(); - break; - case 11: - message.builder = reader.string(); - break; - case 12: - message.codeHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 3: + message.wasmByteCode = reader.bytes(); + break; + case 4: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 5: + message.unpinCode = reader.bool(); + break; + case 6: + message.admin = reader.string(); + break; + case 7: + message.label = reader.string(); + break; + case 8: + message.msg = reader.bytes(); + break; + case 9: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 10: + message.source = reader.string(); + break; + case 11: + message.builder = reader.string(); + break; + case 12: + message.codeHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgStoreAndInstantiateContract { const message = createBaseMsgStoreAndInstantiateContract(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; message.unpinCode = object.unpinCode ?? false; - message.admin = object.admin ?? ""; - message.label = object.label ?? ""; + message.admin = object.admin ?? ''; + message.label = object.label ?? ''; message.msg = object.msg ?? new Uint8Array(); message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; - message.source = object.source ?? ""; - message.builder = object.builder ?? ""; + message.source = object.source ?? ''; + message.builder = object.builder ?? ''; message.codeHash = object.codeHash ?? new Uint8Array(); return message; }, @@ -3349,20 +3350,20 @@ export const MsgStoreAndInstantiateContract = { }, toAmino(message: MsgStoreAndInstantiateContract): MsgStoreAndInstantiateContractAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; obj.unpin_code = message.unpinCode === false ? undefined : message.unpinCode; - obj.admin = message.admin === "" ? undefined : message.admin; - obj.label = message.label === "" ? undefined : message.label; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.label = message.label === '' ? undefined : message.label; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; if (message.funds) { obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); } else { obj.funds = message.funds; } - obj.source = message.source === "" ? undefined : message.source; - obj.builder = message.builder === "" ? undefined : message.builder; + obj.source = message.source === '' ? undefined : message.source; + obj.builder = message.builder === '' ? undefined : message.builder; obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; return obj; }, @@ -3371,7 +3372,7 @@ export const MsgStoreAndInstantiateContract = { }, toAminoMsg(message: MsgStoreAndInstantiateContract): MsgStoreAndInstantiateContractAminoMsg { return { - type: "wasm/MsgStoreAndInstantiateContract", + type: 'wasm/MsgStoreAndInstantiateContract', value: MsgStoreAndInstantiateContract.toAmino(message) }; }, @@ -3383,7 +3384,7 @@ export const MsgStoreAndInstantiateContract = { }, toProtoMsg(message: MsgStoreAndInstantiateContract): MsgStoreAndInstantiateContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract', value: MsgStoreAndInstantiateContract.encode(message).finish() }; } @@ -3392,21 +3393,21 @@ GlobalDecoderRegistry.register(MsgStoreAndInstantiateContract.typeUrl, MsgStoreA GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContract.aminoType, MsgStoreAndInstantiateContract.typeUrl); function createBaseMsgStoreAndInstantiateContractResponse(): MsgStoreAndInstantiateContractResponse { return { - address: "", + address: '', data: new Uint8Array() }; } export const MsgStoreAndInstantiateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", - aminoType: "wasm/MsgStoreAndInstantiateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse', + aminoType: 'wasm/MsgStoreAndInstantiateContractResponse', is(o: any): o is MsgStoreAndInstantiateContractResponse { - return o && (o.$typeUrl === MsgStoreAndInstantiateContractResponse.typeUrl || typeof o.address === "string" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgStoreAndInstantiateContractResponse.typeUrl || typeof o.address === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, isAmino(o: any): o is MsgStoreAndInstantiateContractResponseAmino { - return o && (o.$typeUrl === MsgStoreAndInstantiateContractResponse.typeUrl || typeof o.address === "string" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgStoreAndInstantiateContractResponse.typeUrl || typeof o.address === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, encode(message: MsgStoreAndInstantiateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { + if (message.address !== '') { writer.uint32(10).string(message.address); } if (message.data.length !== 0) { @@ -3421,22 +3422,22 @@ export const MsgStoreAndInstantiateContractResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgStoreAndInstantiateContractResponse { const message = createBaseMsgStoreAndInstantiateContractResponse(); - message.address = object.address ?? ""; + message.address = object.address ?? ''; message.data = object.data ?? new Uint8Array(); return message; }, @@ -3452,7 +3453,7 @@ export const MsgStoreAndInstantiateContractResponse = { }, toAmino(message: MsgStoreAndInstantiateContractResponse): MsgStoreAndInstantiateContractResponseAmino { const obj: any = {}; - obj.address = message.address === "" ? undefined : message.address; + obj.address = message.address === '' ? undefined : message.address; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; }, @@ -3461,7 +3462,7 @@ export const MsgStoreAndInstantiateContractResponse = { }, toAminoMsg(message: MsgStoreAndInstantiateContractResponse): MsgStoreAndInstantiateContractResponseAminoMsg { return { - type: "wasm/MsgStoreAndInstantiateContractResponse", + type: 'wasm/MsgStoreAndInstantiateContractResponse', value: MsgStoreAndInstantiateContractResponse.toAmino(message) }; }, @@ -3473,7 +3474,7 @@ export const MsgStoreAndInstantiateContractResponse = { }, toProtoMsg(message: MsgStoreAndInstantiateContractResponse): MsgStoreAndInstantiateContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse', value: MsgStoreAndInstantiateContractResponse.encode(message).finish() }; } @@ -3482,21 +3483,21 @@ GlobalDecoderRegistry.register(MsgStoreAndInstantiateContractResponse.typeUrl, M GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContractResponse.aminoType, MsgStoreAndInstantiateContractResponse.typeUrl); function createBaseMsgAddCodeUploadParamsAddresses(): MsgAddCodeUploadParamsAddresses { return { - authority: "", + authority: '', addresses: [] }; } export const MsgAddCodeUploadParamsAddresses = { - typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", - aminoType: "wasm/MsgAddCodeUploadParamsAddresses", + typeUrl: '/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses', + aminoType: 'wasm/MsgAddCodeUploadParamsAddresses', is(o: any): o is MsgAddCodeUploadParamsAddresses { - return o && (o.$typeUrl === MsgAddCodeUploadParamsAddresses.typeUrl || typeof o.authority === "string" && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === MsgAddCodeUploadParamsAddresses.typeUrl || typeof o.authority === 'string' && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, isAmino(o: any): o is MsgAddCodeUploadParamsAddressesAmino { - return o && (o.$typeUrl === MsgAddCodeUploadParamsAddresses.typeUrl || typeof o.authority === "string" && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === MsgAddCodeUploadParamsAddresses.typeUrl || typeof o.authority === 'string' && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, encode(message: MsgAddCodeUploadParamsAddresses, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } for (const v of message.addresses) { @@ -3511,22 +3512,22 @@ export const MsgAddCodeUploadParamsAddresses = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgAddCodeUploadParamsAddresses { const message = createBaseMsgAddCodeUploadParamsAddresses(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.addresses = object.addresses?.map(e => e) || []; return message; }, @@ -3540,7 +3541,7 @@ export const MsgAddCodeUploadParamsAddresses = { }, toAmino(message: MsgAddCodeUploadParamsAddresses): MsgAddCodeUploadParamsAddressesAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; if (message.addresses) { obj.addresses = message.addresses.map(e => e); } else { @@ -3553,7 +3554,7 @@ export const MsgAddCodeUploadParamsAddresses = { }, toAminoMsg(message: MsgAddCodeUploadParamsAddresses): MsgAddCodeUploadParamsAddressesAminoMsg { return { - type: "wasm/MsgAddCodeUploadParamsAddresses", + type: 'wasm/MsgAddCodeUploadParamsAddresses', value: MsgAddCodeUploadParamsAddresses.toAmino(message) }; }, @@ -3565,7 +3566,7 @@ export const MsgAddCodeUploadParamsAddresses = { }, toProtoMsg(message: MsgAddCodeUploadParamsAddresses): MsgAddCodeUploadParamsAddressesProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", + typeUrl: '/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses', value: MsgAddCodeUploadParamsAddresses.encode(message).finish() }; } @@ -3576,8 +3577,8 @@ function createBaseMsgAddCodeUploadParamsAddressesResponse(): MsgAddCodeUploadPa return {}; } export const MsgAddCodeUploadParamsAddressesResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", - aminoType: "wasm/MsgAddCodeUploadParamsAddressesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse', + aminoType: 'wasm/MsgAddCodeUploadParamsAddressesResponse', is(o: any): o is MsgAddCodeUploadParamsAddressesResponse { return o && o.$typeUrl === MsgAddCodeUploadParamsAddressesResponse.typeUrl; }, @@ -3594,9 +3595,9 @@ export const MsgAddCodeUploadParamsAddressesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3618,7 +3619,7 @@ export const MsgAddCodeUploadParamsAddressesResponse = { }, toAminoMsg(message: MsgAddCodeUploadParamsAddressesResponse): MsgAddCodeUploadParamsAddressesResponseAminoMsg { return { - type: "wasm/MsgAddCodeUploadParamsAddressesResponse", + type: 'wasm/MsgAddCodeUploadParamsAddressesResponse', value: MsgAddCodeUploadParamsAddressesResponse.toAmino(message) }; }, @@ -3630,7 +3631,7 @@ export const MsgAddCodeUploadParamsAddressesResponse = { }, toProtoMsg(message: MsgAddCodeUploadParamsAddressesResponse): MsgAddCodeUploadParamsAddressesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse', value: MsgAddCodeUploadParamsAddressesResponse.encode(message).finish() }; } @@ -3639,21 +3640,21 @@ GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddressesResponse.typeUrl, GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddressesResponse.aminoType, MsgAddCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddresses(): MsgRemoveCodeUploadParamsAddresses { return { - authority: "", + authority: '', addresses: [] }; } export const MsgRemoveCodeUploadParamsAddresses = { - typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", - aminoType: "wasm/MsgRemoveCodeUploadParamsAddresses", + typeUrl: '/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses', + aminoType: 'wasm/MsgRemoveCodeUploadParamsAddresses', is(o: any): o is MsgRemoveCodeUploadParamsAddresses { - return o && (o.$typeUrl === MsgRemoveCodeUploadParamsAddresses.typeUrl || typeof o.authority === "string" && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === MsgRemoveCodeUploadParamsAddresses.typeUrl || typeof o.authority === 'string' && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, isAmino(o: any): o is MsgRemoveCodeUploadParamsAddressesAmino { - return o && (o.$typeUrl === MsgRemoveCodeUploadParamsAddresses.typeUrl || typeof o.authority === "string" && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === MsgRemoveCodeUploadParamsAddresses.typeUrl || typeof o.authority === 'string' && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, encode(message: MsgRemoveCodeUploadParamsAddresses, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } for (const v of message.addresses) { @@ -3668,22 +3669,22 @@ export const MsgRemoveCodeUploadParamsAddresses = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgRemoveCodeUploadParamsAddresses { const message = createBaseMsgRemoveCodeUploadParamsAddresses(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.addresses = object.addresses?.map(e => e) || []; return message; }, @@ -3697,7 +3698,7 @@ export const MsgRemoveCodeUploadParamsAddresses = { }, toAmino(message: MsgRemoveCodeUploadParamsAddresses): MsgRemoveCodeUploadParamsAddressesAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; if (message.addresses) { obj.addresses = message.addresses.map(e => e); } else { @@ -3710,7 +3711,7 @@ export const MsgRemoveCodeUploadParamsAddresses = { }, toAminoMsg(message: MsgRemoveCodeUploadParamsAddresses): MsgRemoveCodeUploadParamsAddressesAminoMsg { return { - type: "wasm/MsgRemoveCodeUploadParamsAddresses", + type: 'wasm/MsgRemoveCodeUploadParamsAddresses', value: MsgRemoveCodeUploadParamsAddresses.toAmino(message) }; }, @@ -3722,7 +3723,7 @@ export const MsgRemoveCodeUploadParamsAddresses = { }, toProtoMsg(message: MsgRemoveCodeUploadParamsAddresses): MsgRemoveCodeUploadParamsAddressesProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", + typeUrl: '/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses', value: MsgRemoveCodeUploadParamsAddresses.encode(message).finish() }; } @@ -3733,8 +3734,8 @@ function createBaseMsgRemoveCodeUploadParamsAddressesResponse(): MsgRemoveCodeUp return {}; } export const MsgRemoveCodeUploadParamsAddressesResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", - aminoType: "wasm/MsgRemoveCodeUploadParamsAddressesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse', + aminoType: 'wasm/MsgRemoveCodeUploadParamsAddressesResponse', is(o: any): o is MsgRemoveCodeUploadParamsAddressesResponse { return o && o.$typeUrl === MsgRemoveCodeUploadParamsAddressesResponse.typeUrl; }, @@ -3751,9 +3752,9 @@ export const MsgRemoveCodeUploadParamsAddressesResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3775,7 +3776,7 @@ export const MsgRemoveCodeUploadParamsAddressesResponse = { }, toAminoMsg(message: MsgRemoveCodeUploadParamsAddressesResponse): MsgRemoveCodeUploadParamsAddressesResponseAminoMsg { return { - type: "wasm/MsgRemoveCodeUploadParamsAddressesResponse", + type: 'wasm/MsgRemoveCodeUploadParamsAddressesResponse', value: MsgRemoveCodeUploadParamsAddressesResponse.toAmino(message) }; }, @@ -3787,7 +3788,7 @@ export const MsgRemoveCodeUploadParamsAddressesResponse = { }, toProtoMsg(message: MsgRemoveCodeUploadParamsAddressesResponse): MsgRemoveCodeUploadParamsAddressesResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse', value: MsgRemoveCodeUploadParamsAddressesResponse.encode(message).finish() }; } @@ -3796,24 +3797,24 @@ GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddressesResponse.typeUr GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddressesResponse.aminoType, MsgRemoveCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgStoreAndMigrateContract(): MsgStoreAndMigrateContract { return { - authority: "", + authority: '', wasmByteCode: new Uint8Array(), instantiatePermission: undefined, - contract: "", + contract: '', msg: new Uint8Array() }; } export const MsgStoreAndMigrateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", - aminoType: "wasm/MsgStoreAndMigrateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndMigrateContract', + aminoType: 'wasm/MsgStoreAndMigrateContract', is(o: any): o is MsgStoreAndMigrateContract { - return o && (o.$typeUrl === MsgStoreAndMigrateContract.typeUrl || typeof o.authority === "string" && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === "string") && typeof o.contract === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === MsgStoreAndMigrateContract.typeUrl || typeof o.authority === 'string' && (o.wasmByteCode instanceof Uint8Array || typeof o.wasmByteCode === 'string') && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, isAmino(o: any): o is MsgStoreAndMigrateContractAmino { - return o && (o.$typeUrl === MsgStoreAndMigrateContract.typeUrl || typeof o.authority === "string" && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === "string") && typeof o.contract === "string" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === MsgStoreAndMigrateContract.typeUrl || typeof o.authority === 'string' && (o.wasm_byte_code instanceof Uint8Array || typeof o.wasm_byte_code === 'string') && typeof o.contract === 'string' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, encode(message: MsgStoreAndMigrateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.wasmByteCode.length !== 0) { @@ -3822,7 +3823,7 @@ export const MsgStoreAndMigrateContract = { if (message.instantiatePermission !== undefined) { AccessConfig.encode(message.instantiatePermission, writer.uint32(26).fork()).ldelim(); } - if (message.contract !== "") { + if (message.contract !== '') { writer.uint32(34).string(message.contract); } if (message.msg.length !== 0) { @@ -3837,34 +3838,34 @@ export const MsgStoreAndMigrateContract = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.wasmByteCode = reader.bytes(); - break; - case 3: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.wasmByteCode = reader.bytes(); + break; + case 3: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 4: + message.contract = reader.string(); + break; + case 5: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgStoreAndMigrateContract { const message = createBaseMsgStoreAndMigrateContract(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; - message.contract = object.contract ?? ""; + message.contract = object.contract ?? ''; message.msg = object.msg ?? new Uint8Array(); return message; }, @@ -3889,10 +3890,10 @@ export const MsgStoreAndMigrateContract = { }, toAmino(message: MsgStoreAndMigrateContract): MsgStoreAndMigrateContractAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; - obj.contract = message.contract === "" ? undefined : message.contract; + obj.contract = message.contract === '' ? undefined : message.contract; obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; return obj; }, @@ -3901,7 +3902,7 @@ export const MsgStoreAndMigrateContract = { }, toAminoMsg(message: MsgStoreAndMigrateContract): MsgStoreAndMigrateContractAminoMsg { return { - type: "wasm/MsgStoreAndMigrateContract", + type: 'wasm/MsgStoreAndMigrateContract', value: MsgStoreAndMigrateContract.toAmino(message) }; }, @@ -3913,7 +3914,7 @@ export const MsgStoreAndMigrateContract = { }, toProtoMsg(message: MsgStoreAndMigrateContract): MsgStoreAndMigrateContractProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndMigrateContract', value: MsgStoreAndMigrateContract.encode(message).finish() }; } @@ -3928,13 +3929,13 @@ function createBaseMsgStoreAndMigrateContractResponse(): MsgStoreAndMigrateContr }; } export const MsgStoreAndMigrateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", - aminoType: "wasm/MsgStoreAndMigrateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse', + aminoType: 'wasm/MsgStoreAndMigrateContractResponse', is(o: any): o is MsgStoreAndMigrateContractResponse { - return o && (o.$typeUrl === MsgStoreAndMigrateContractResponse.typeUrl || typeof o.codeId === "bigint" && (o.checksum instanceof Uint8Array || typeof o.checksum === "string") && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgStoreAndMigrateContractResponse.typeUrl || typeof o.codeId === 'bigint' && (o.checksum instanceof Uint8Array || typeof o.checksum === 'string') && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, isAmino(o: any): o is MsgStoreAndMigrateContractResponseAmino { - return o && (o.$typeUrl === MsgStoreAndMigrateContractResponse.typeUrl || typeof o.code_id === "bigint" && (o.checksum instanceof Uint8Array || typeof o.checksum === "string") && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === MsgStoreAndMigrateContractResponse.typeUrl || typeof o.code_id === 'bigint' && (o.checksum instanceof Uint8Array || typeof o.checksum === 'string') && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, encode(message: MsgStoreAndMigrateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeId !== BigInt(0)) { @@ -3955,18 +3956,18 @@ export const MsgStoreAndMigrateContractResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.checksum = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.checksum = reader.bytes(); + break; + case 3: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4003,7 +4004,7 @@ export const MsgStoreAndMigrateContractResponse = { }, toAminoMsg(message: MsgStoreAndMigrateContractResponse): MsgStoreAndMigrateContractResponseAminoMsg { return { - type: "wasm/MsgStoreAndMigrateContractResponse", + type: 'wasm/MsgStoreAndMigrateContractResponse', value: MsgStoreAndMigrateContractResponse.toAmino(message) }; }, @@ -4015,7 +4016,7 @@ export const MsgStoreAndMigrateContractResponse = { }, toProtoMsg(message: MsgStoreAndMigrateContractResponse): MsgStoreAndMigrateContractResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse', value: MsgStoreAndMigrateContractResponse.encode(message).finish() }; } @@ -4024,28 +4025,28 @@ GlobalDecoderRegistry.register(MsgStoreAndMigrateContractResponse.typeUrl, MsgSt GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContractResponse.aminoType, MsgStoreAndMigrateContractResponse.typeUrl); function createBaseMsgUpdateContractLabel(): MsgUpdateContractLabel { return { - sender: "", - newLabel: "", - contract: "" + sender: '', + newLabel: '', + contract: '' }; } export const MsgUpdateContractLabel = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", - aminoType: "wasm/MsgUpdateContractLabel", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateContractLabel', + aminoType: 'wasm/MsgUpdateContractLabel', is(o: any): o is MsgUpdateContractLabel { - return o && (o.$typeUrl === MsgUpdateContractLabel.typeUrl || typeof o.sender === "string" && typeof o.newLabel === "string" && typeof o.contract === "string"); + return o && (o.$typeUrl === MsgUpdateContractLabel.typeUrl || typeof o.sender === 'string' && typeof o.newLabel === 'string' && typeof o.contract === 'string'); }, isAmino(o: any): o is MsgUpdateContractLabelAmino { - return o && (o.$typeUrl === MsgUpdateContractLabel.typeUrl || typeof o.sender === "string" && typeof o.new_label === "string" && typeof o.contract === "string"); + return o && (o.$typeUrl === MsgUpdateContractLabel.typeUrl || typeof o.sender === 'string' && typeof o.new_label === 'string' && typeof o.contract === 'string'); }, encode(message: MsgUpdateContractLabel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(10).string(message.sender); } - if (message.newLabel !== "") { + if (message.newLabel !== '') { writer.uint32(18).string(message.newLabel); } - if (message.contract !== "") { + if (message.contract !== '') { writer.uint32(26).string(message.contract); } return writer; @@ -4057,27 +4058,27 @@ export const MsgUpdateContractLabel = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.newLabel = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sender = reader.string(); + break; + case 2: + message.newLabel = reader.string(); + break; + case 3: + message.contract = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateContractLabel { const message = createBaseMsgUpdateContractLabel(); - message.sender = object.sender ?? ""; - message.newLabel = object.newLabel ?? ""; - message.contract = object.contract ?? ""; + message.sender = object.sender ?? ''; + message.newLabel = object.newLabel ?? ''; + message.contract = object.contract ?? ''; return message; }, fromAmino(object: MsgUpdateContractLabelAmino): MsgUpdateContractLabel { @@ -4095,9 +4096,9 @@ export const MsgUpdateContractLabel = { }, toAmino(message: MsgUpdateContractLabel): MsgUpdateContractLabelAmino { const obj: any = {}; - obj.sender = message.sender === "" ? undefined : message.sender; - obj.new_label = message.newLabel === "" ? undefined : message.newLabel; - obj.contract = message.contract === "" ? undefined : message.contract; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.new_label = message.newLabel === '' ? undefined : message.newLabel; + obj.contract = message.contract === '' ? undefined : message.contract; return obj; }, fromAminoMsg(object: MsgUpdateContractLabelAminoMsg): MsgUpdateContractLabel { @@ -4105,7 +4106,7 @@ export const MsgUpdateContractLabel = { }, toAminoMsg(message: MsgUpdateContractLabel): MsgUpdateContractLabelAminoMsg { return { - type: "wasm/MsgUpdateContractLabel", + type: 'wasm/MsgUpdateContractLabel', value: MsgUpdateContractLabel.toAmino(message) }; }, @@ -4117,7 +4118,7 @@ export const MsgUpdateContractLabel = { }, toProtoMsg(message: MsgUpdateContractLabel): MsgUpdateContractLabelProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateContractLabel', value: MsgUpdateContractLabel.encode(message).finish() }; } @@ -4128,8 +4129,8 @@ function createBaseMsgUpdateContractLabelResponse(): MsgUpdateContractLabelRespo return {}; } export const MsgUpdateContractLabelResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", - aminoType: "wasm/MsgUpdateContractLabelResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse', + aminoType: 'wasm/MsgUpdateContractLabelResponse', is(o: any): o is MsgUpdateContractLabelResponse { return o && o.$typeUrl === MsgUpdateContractLabelResponse.typeUrl; }, @@ -4146,9 +4147,9 @@ export const MsgUpdateContractLabelResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4170,7 +4171,7 @@ export const MsgUpdateContractLabelResponse = { }, toAminoMsg(message: MsgUpdateContractLabelResponse): MsgUpdateContractLabelResponseAminoMsg { return { - type: "wasm/MsgUpdateContractLabelResponse", + type: 'wasm/MsgUpdateContractLabelResponse', value: MsgUpdateContractLabelResponse.toAmino(message) }; }, @@ -4182,7 +4183,7 @@ export const MsgUpdateContractLabelResponse = { }, toProtoMsg(message: MsgUpdateContractLabelResponse): MsgUpdateContractLabelResponseProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", + typeUrl: '/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse', value: MsgUpdateContractLabelResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/cosmwasm/wasm/v1/types.ts b/libs/cosmos-types/cosmwasm/wasm/v1/types.ts index ff95b7bd..6d8bad2d 100644 --- a/libs/cosmos-types/cosmwasm/wasm/v1/types.ts +++ b/libs/cosmos-types/cosmwasm/wasm/v1/types.ts @@ -1,8 +1,9 @@ -import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; -import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; +import { fromUtf8,toUtf8 } from '@cosmjs/encoding'; + +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { Any, AnyAmino,AnyProtoMsg } from '../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial, isSet } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** AccessType permission types */ export enum AccessType { /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ @@ -18,37 +19,37 @@ export enum AccessType { export const AccessTypeAmino = AccessType; export function accessTypeFromJSON(object: any): AccessType { switch (object) { - case 0: - case "ACCESS_TYPE_UNSPECIFIED": - return AccessType.ACCESS_TYPE_UNSPECIFIED; - case 1: - case "ACCESS_TYPE_NOBODY": - return AccessType.ACCESS_TYPE_NOBODY; - case 3: - case "ACCESS_TYPE_EVERYBODY": - return AccessType.ACCESS_TYPE_EVERYBODY; - case 4: - case "ACCESS_TYPE_ANY_OF_ADDRESSES": - return AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES; - case -1: - case "UNRECOGNIZED": - default: - return AccessType.UNRECOGNIZED; + case 0: + case 'ACCESS_TYPE_UNSPECIFIED': + return AccessType.ACCESS_TYPE_UNSPECIFIED; + case 1: + case 'ACCESS_TYPE_NOBODY': + return AccessType.ACCESS_TYPE_NOBODY; + case 3: + case 'ACCESS_TYPE_EVERYBODY': + return AccessType.ACCESS_TYPE_EVERYBODY; + case 4: + case 'ACCESS_TYPE_ANY_OF_ADDRESSES': + return AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES; + case -1: + case 'UNRECOGNIZED': + default: + return AccessType.UNRECOGNIZED; } } export function accessTypeToJSON(object: AccessType): string { switch (object) { - case AccessType.ACCESS_TYPE_UNSPECIFIED: - return "ACCESS_TYPE_UNSPECIFIED"; - case AccessType.ACCESS_TYPE_NOBODY: - return "ACCESS_TYPE_NOBODY"; - case AccessType.ACCESS_TYPE_EVERYBODY: - return "ACCESS_TYPE_EVERYBODY"; - case AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES: - return "ACCESS_TYPE_ANY_OF_ADDRESSES"; - case AccessType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case AccessType.ACCESS_TYPE_UNSPECIFIED: + return 'ACCESS_TYPE_UNSPECIFIED'; + case AccessType.ACCESS_TYPE_NOBODY: + return 'ACCESS_TYPE_NOBODY'; + case AccessType.ACCESS_TYPE_EVERYBODY: + return 'ACCESS_TYPE_EVERYBODY'; + case AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES: + return 'ACCESS_TYPE_ANY_OF_ADDRESSES'; + case AccessType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** ContractCodeHistoryOperationType actions that caused a code change */ @@ -66,37 +67,37 @@ export enum ContractCodeHistoryOperationType { export const ContractCodeHistoryOperationTypeAmino = ContractCodeHistoryOperationType; export function contractCodeHistoryOperationTypeFromJSON(object: any): ContractCodeHistoryOperationType { switch (object) { - case 0: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED; - case 1: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT; - case 2: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE; - case 3: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS; - case -1: - case "UNRECOGNIZED": - default: - return ContractCodeHistoryOperationType.UNRECOGNIZED; + case 0: + case 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED': + return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED; + case 1: + case 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT': + return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT; + case 2: + case 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE': + return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE; + case 3: + case 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS': + return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS; + case -1: + case 'UNRECOGNIZED': + default: + return ContractCodeHistoryOperationType.UNRECOGNIZED; } } export function contractCodeHistoryOperationTypeToJSON(object: ContractCodeHistoryOperationType): string { switch (object) { - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - case ContractCodeHistoryOperationType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + return 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED'; + case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: + return 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT'; + case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: + return 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE'; + case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: + return 'CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS'; + case ContractCodeHistoryOperationType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** AccessTypeParam */ @@ -104,7 +105,7 @@ export interface AccessTypeParam { value: AccessType; } export interface AccessTypeParamProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam"; + typeUrl: '/cosmwasm.wasm.v1.AccessTypeParam'; value: Uint8Array; } /** AccessTypeParam */ @@ -112,7 +113,7 @@ export interface AccessTypeParamAmino { value: AccessType; } export interface AccessTypeParamAminoMsg { - type: "wasm/AccessTypeParam"; + type: 'wasm/AccessTypeParam'; value: AccessTypeParamAmino; } /** AccessConfig access control type. */ @@ -121,7 +122,7 @@ export interface AccessConfig { addresses: string[]; } export interface AccessConfigProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.AccessConfig"; + typeUrl: '/cosmwasm.wasm.v1.AccessConfig'; value: Uint8Array; } /** AccessConfig access control type. */ @@ -130,7 +131,7 @@ export interface AccessConfigAmino { addresses: string[]; } export interface AccessConfigAminoMsg { - type: "wasm/AccessConfig"; + type: 'wasm/AccessConfig'; value: AccessConfigAmino; } /** Params defines the set of wasm parameters. */ @@ -139,7 +140,7 @@ export interface Params { instantiateDefaultPermission: AccessType; } export interface ParamsProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.Params"; + typeUrl: '/cosmwasm.wasm.v1.Params'; value: Uint8Array; } /** Params defines the set of wasm parameters. */ @@ -148,7 +149,7 @@ export interface ParamsAmino { instantiate_default_permission: AccessType; } export interface ParamsAminoMsg { - type: "wasm/Params"; + type: 'wasm/Params'; value: ParamsAmino; } /** CodeInfo is data for the uploaded contract WASM code */ @@ -161,7 +162,7 @@ export interface CodeInfo { instantiateConfig: AccessConfig; } export interface CodeInfoProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.CodeInfo"; + typeUrl: '/cosmwasm.wasm.v1.CodeInfo'; value: Uint8Array; } /** CodeInfo is data for the uploaded contract WASM code */ @@ -174,7 +175,7 @@ export interface CodeInfoAmino { instantiate_config: AccessConfigAmino; } export interface CodeInfoAminoMsg { - type: "wasm/CodeInfo"; + type: 'wasm/CodeInfo'; value: CodeInfoAmino; } /** ContractInfo stores a WASM contract instance */ @@ -197,10 +198,10 @@ export interface ContractInfo { extension?: Any | undefined; } export interface ContractInfoProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.ContractInfo"; + typeUrl: '/cosmwasm.wasm.v1.ContractInfo'; value: Uint8Array; } -export type ContractInfoEncoded = Omit & { +export type ContractInfoEncoded = Omit & { /** * Extension is an extension point to store custom metadata within the * persistence model. @@ -227,7 +228,7 @@ export interface ContractInfoAmino { extension?: AnyAmino; } export interface ContractInfoAminoMsg { - type: "wasm/ContractInfo"; + type: 'wasm/ContractInfo'; value: ContractInfoAmino; } /** ContractCodeHistoryEntry metadata to a contract. */ @@ -240,7 +241,7 @@ export interface ContractCodeHistoryEntry { msg: Uint8Array; } export interface ContractCodeHistoryEntryProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry"; + typeUrl: '/cosmwasm.wasm.v1.ContractCodeHistoryEntry'; value: Uint8Array; } /** ContractCodeHistoryEntry metadata to a contract. */ @@ -253,7 +254,7 @@ export interface ContractCodeHistoryEntryAmino { msg: any; } export interface ContractCodeHistoryEntryAminoMsg { - type: "wasm/ContractCodeHistoryEntry"; + type: 'wasm/ContractCodeHistoryEntry'; value: ContractCodeHistoryEntryAmino; } /** @@ -270,7 +271,7 @@ export interface AbsoluteTxPosition { txIndex: bigint; } export interface AbsoluteTxPositionProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition"; + typeUrl: '/cosmwasm.wasm.v1.AbsoluteTxPosition'; value: Uint8Array; } /** @@ -287,7 +288,7 @@ export interface AbsoluteTxPositionAmino { tx_index: string; } export interface AbsoluteTxPositionAminoMsg { - type: "wasm/AbsoluteTxPosition"; + type: 'wasm/AbsoluteTxPosition'; value: AbsoluteTxPositionAmino; } /** Model is a struct that holds a KV pair */ @@ -298,7 +299,7 @@ export interface Model { value: Uint8Array; } export interface ModelProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.Model"; + typeUrl: '/cosmwasm.wasm.v1.Model'; value: Uint8Array; } /** Model is a struct that holds a KV pair */ @@ -309,7 +310,7 @@ export interface ModelAmino { value: string; } export interface ModelAminoMsg { - type: "wasm/Model"; + type: 'wasm/Model'; value: ModelAmino; } function createBaseAccessTypeParam(): AccessTypeParam { @@ -318,8 +319,8 @@ function createBaseAccessTypeParam(): AccessTypeParam { }; } export const AccessTypeParam = { - typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", - aminoType: "wasm/AccessTypeParam", + typeUrl: '/cosmwasm.wasm.v1.AccessTypeParam', + aminoType: 'wasm/AccessTypeParam', is(o: any): o is AccessTypeParam { return o && (o.$typeUrl === AccessTypeParam.typeUrl || isSet(o.value)); }, @@ -339,12 +340,12 @@ export const AccessTypeParam = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.value = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -371,7 +372,7 @@ export const AccessTypeParam = { }, toAminoMsg(message: AccessTypeParam): AccessTypeParamAminoMsg { return { - type: "wasm/AccessTypeParam", + type: 'wasm/AccessTypeParam', value: AccessTypeParam.toAmino(message) }; }, @@ -383,7 +384,7 @@ export const AccessTypeParam = { }, toProtoMsg(message: AccessTypeParam): AccessTypeParamProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", + typeUrl: '/cosmwasm.wasm.v1.AccessTypeParam', value: AccessTypeParam.encode(message).finish() }; } @@ -397,13 +398,13 @@ function createBaseAccessConfig(): AccessConfig { }; } export const AccessConfig = { - typeUrl: "/cosmwasm.wasm.v1.AccessConfig", - aminoType: "wasm/AccessConfig", + typeUrl: '/cosmwasm.wasm.v1.AccessConfig', + aminoType: 'wasm/AccessConfig', is(o: any): o is AccessConfig { - return o && (o.$typeUrl === AccessConfig.typeUrl || isSet(o.permission) && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === AccessConfig.typeUrl || isSet(o.permission) && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, isAmino(o: any): o is AccessConfigAmino { - return o && (o.$typeUrl === AccessConfig.typeUrl || isSet(o.permission) && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === "string")); + return o && (o.$typeUrl === AccessConfig.typeUrl || isSet(o.permission) && Array.isArray(o.addresses) && (!o.addresses.length || typeof o.addresses[0] === 'string')); }, encode(message: AccessConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.permission !== 0) { @@ -421,15 +422,15 @@ export const AccessConfig = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.permission = (reader.int32() as any); - break; - case 3: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.permission = (reader.int32() as any); + break; + case 3: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -463,7 +464,7 @@ export const AccessConfig = { }, toAminoMsg(message: AccessConfig): AccessConfigAminoMsg { return { - type: "wasm/AccessConfig", + type: 'wasm/AccessConfig', value: AccessConfig.toAmino(message) }; }, @@ -475,7 +476,7 @@ export const AccessConfig = { }, toProtoMsg(message: AccessConfig): AccessConfigProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.AccessConfig", + typeUrl: '/cosmwasm.wasm.v1.AccessConfig', value: AccessConfig.encode(message).finish() }; } @@ -489,8 +490,8 @@ function createBaseParams(): Params { }; } export const Params = { - typeUrl: "/cosmwasm.wasm.v1.Params", - aminoType: "wasm/Params", + typeUrl: '/cosmwasm.wasm.v1.Params', + aminoType: 'wasm/Params', is(o: any): o is Params { return o && (o.$typeUrl === Params.typeUrl || AccessConfig.is(o.codeUploadAccess) && isSet(o.instantiateDefaultPermission)); }, @@ -513,15 +514,15 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeUploadAccess = AccessConfig.decode(reader, reader.uint32()); - break; - case 2: - message.instantiateDefaultPermission = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeUploadAccess = AccessConfig.decode(reader, reader.uint32()); + break; + case 2: + message.instantiateDefaultPermission = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -553,7 +554,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "wasm/Params", + type: 'wasm/Params', value: Params.toAmino(message) }; }, @@ -565,7 +566,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.Params", + typeUrl: '/cosmwasm.wasm.v1.Params', value: Params.encode(message).finish() }; } @@ -575,24 +576,24 @@ GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl function createBaseCodeInfo(): CodeInfo { return { codeHash: new Uint8Array(), - creator: "", + creator: '', instantiateConfig: AccessConfig.fromPartial({}) }; } export const CodeInfo = { - typeUrl: "/cosmwasm.wasm.v1.CodeInfo", - aminoType: "wasm/CodeInfo", + typeUrl: '/cosmwasm.wasm.v1.CodeInfo', + aminoType: 'wasm/CodeInfo', is(o: any): o is CodeInfo { - return o && (o.$typeUrl === CodeInfo.typeUrl || (o.codeHash instanceof Uint8Array || typeof o.codeHash === "string") && typeof o.creator === "string" && AccessConfig.is(o.instantiateConfig)); + return o && (o.$typeUrl === CodeInfo.typeUrl || (o.codeHash instanceof Uint8Array || typeof o.codeHash === 'string') && typeof o.creator === 'string' && AccessConfig.is(o.instantiateConfig)); }, isAmino(o: any): o is CodeInfoAmino { - return o && (o.$typeUrl === CodeInfo.typeUrl || (o.code_hash instanceof Uint8Array || typeof o.code_hash === "string") && typeof o.creator === "string" && AccessConfig.isAmino(o.instantiate_config)); + return o && (o.$typeUrl === CodeInfo.typeUrl || (o.code_hash instanceof Uint8Array || typeof o.code_hash === 'string') && typeof o.creator === 'string' && AccessConfig.isAmino(o.instantiate_config)); }, encode(message: CodeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeHash.length !== 0) { writer.uint32(10).bytes(message.codeHash); } - if (message.creator !== "") { + if (message.creator !== '') { writer.uint32(18).string(message.creator); } if (message.instantiateConfig !== undefined) { @@ -607,18 +608,18 @@ export const CodeInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeHash = reader.bytes(); - break; - case 2: - message.creator = reader.string(); - break; - case 5: - message.instantiateConfig = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeHash = reader.bytes(); + break; + case 2: + message.creator = reader.string(); + break; + case 5: + message.instantiateConfig = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -626,7 +627,7 @@ export const CodeInfo = { fromPartial(object: DeepPartial): CodeInfo { const message = createBaseCodeInfo(); message.codeHash = object.codeHash ?? new Uint8Array(); - message.creator = object.creator ?? ""; + message.creator = object.creator ?? ''; message.instantiateConfig = object.instantiateConfig !== undefined && object.instantiateConfig !== null ? AccessConfig.fromPartial(object.instantiateConfig) : undefined; return message; }, @@ -646,7 +647,7 @@ export const CodeInfo = { toAmino(message: CodeInfo): CodeInfoAmino { const obj: any = {}; obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : undefined; - obj.creator = message.creator === "" ? undefined : message.creator; + obj.creator = message.creator === '' ? undefined : message.creator; obj.instantiate_config = message.instantiateConfig ? AccessConfig.toAmino(message.instantiateConfig) : AccessConfig.toAmino(AccessConfig.fromPartial({})); return obj; }, @@ -655,7 +656,7 @@ export const CodeInfo = { }, toAminoMsg(message: CodeInfo): CodeInfoAminoMsg { return { - type: "wasm/CodeInfo", + type: 'wasm/CodeInfo', value: CodeInfo.toAmino(message) }; }, @@ -667,7 +668,7 @@ export const CodeInfo = { }, toProtoMsg(message: CodeInfo): CodeInfoProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.CodeInfo", + typeUrl: '/cosmwasm.wasm.v1.CodeInfo', value: CodeInfo.encode(message).finish() }; } @@ -677,40 +678,40 @@ GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfo.aminoType, CodeInfo.typ function createBaseContractInfo(): ContractInfo { return { codeId: BigInt(0), - creator: "", - admin: "", - label: "", + creator: '', + admin: '', + label: '', created: undefined, - ibcPortId: "", + ibcPortId: '', extension: undefined }; } export const ContractInfo = { - typeUrl: "/cosmwasm.wasm.v1.ContractInfo", - aminoType: "wasm/ContractInfo", + typeUrl: '/cosmwasm.wasm.v1.ContractInfo', + aminoType: 'wasm/ContractInfo', is(o: any): o is ContractInfo { - return o && (o.$typeUrl === ContractInfo.typeUrl || typeof o.codeId === "bigint" && typeof o.creator === "string" && typeof o.admin === "string" && typeof o.label === "string" && typeof o.ibcPortId === "string"); + return o && (o.$typeUrl === ContractInfo.typeUrl || typeof o.codeId === 'bigint' && typeof o.creator === 'string' && typeof o.admin === 'string' && typeof o.label === 'string' && typeof o.ibcPortId === 'string'); }, isAmino(o: any): o is ContractInfoAmino { - return o && (o.$typeUrl === ContractInfo.typeUrl || typeof o.code_id === "bigint" && typeof o.creator === "string" && typeof o.admin === "string" && typeof o.label === "string" && typeof o.ibc_port_id === "string"); + return o && (o.$typeUrl === ContractInfo.typeUrl || typeof o.code_id === 'bigint' && typeof o.creator === 'string' && typeof o.admin === 'string' && typeof o.label === 'string' && typeof o.ibc_port_id === 'string'); }, encode(message: ContractInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.codeId !== BigInt(0)) { writer.uint32(8).uint64(message.codeId); } - if (message.creator !== "") { + if (message.creator !== '') { writer.uint32(18).string(message.creator); } - if (message.admin !== "") { + if (message.admin !== '') { writer.uint32(26).string(message.admin); } - if (message.label !== "") { + if (message.label !== '') { writer.uint32(34).string(message.label); } if (message.created !== undefined) { AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim(); } - if (message.ibcPortId !== "") { + if (message.ibcPortId !== '') { writer.uint32(50).string(message.ibcPortId); } if (message.extension !== undefined) { @@ -725,30 +726,30 @@ export const ContractInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.admin = reader.string(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.created = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 6: - message.ibcPortId = reader.string(); - break; - case 7: - message.extension = GlobalDecoderRegistry.unwrapAny(reader); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.codeId = reader.uint64(); + break; + case 2: + message.creator = reader.string(); + break; + case 3: + message.admin = reader.string(); + break; + case 4: + message.label = reader.string(); + break; + case 5: + message.created = AbsoluteTxPosition.decode(reader, reader.uint32()); + break; + case 6: + message.ibcPortId = reader.string(); + break; + case 7: + message.extension = GlobalDecoderRegistry.unwrapAny(reader); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -756,11 +757,11 @@ export const ContractInfo = { fromPartial(object: DeepPartial): ContractInfo { const message = createBaseContractInfo(); message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.creator = object.creator ?? ""; - message.admin = object.admin ?? ""; - message.label = object.label ?? ""; + message.creator = object.creator ?? ''; + message.admin = object.admin ?? ''; + message.label = object.label ?? ''; message.created = object.created !== undefined && object.created !== null ? AbsoluteTxPosition.fromPartial(object.created) : undefined; - message.ibcPortId = object.ibcPortId ?? ""; + message.ibcPortId = object.ibcPortId ?? ''; message.extension = object.extension !== undefined && object.extension !== null ? GlobalDecoderRegistry.fromPartial(object.extension) : undefined; return message; }, @@ -792,11 +793,11 @@ export const ContractInfo = { toAmino(message: ContractInfo): ContractInfoAmino { const obj: any = {}; obj.code_id = message.codeId !== BigInt(0) ? message.codeId.toString() : undefined; - obj.creator = message.creator === "" ? undefined : message.creator; - obj.admin = message.admin === "" ? undefined : message.admin; - obj.label = message.label === "" ? undefined : message.label; + obj.creator = message.creator === '' ? undefined : message.creator; + obj.admin = message.admin === '' ? undefined : message.admin; + obj.label = message.label === '' ? undefined : message.label; obj.created = message.created ? AbsoluteTxPosition.toAmino(message.created) : undefined; - obj.ibc_port_id = message.ibcPortId === "" ? undefined : message.ibcPortId; + obj.ibc_port_id = message.ibcPortId === '' ? undefined : message.ibcPortId; obj.extension = message.extension ? GlobalDecoderRegistry.toAminoMsg(message.extension) : undefined; return obj; }, @@ -805,7 +806,7 @@ export const ContractInfo = { }, toAminoMsg(message: ContractInfo): ContractInfoAminoMsg { return { - type: "wasm/ContractInfo", + type: 'wasm/ContractInfo', value: ContractInfo.toAmino(message) }; }, @@ -817,7 +818,7 @@ export const ContractInfo = { }, toProtoMsg(message: ContractInfo): ContractInfoProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.ContractInfo", + typeUrl: '/cosmwasm.wasm.v1.ContractInfo', value: ContractInfo.encode(message).finish() }; } @@ -833,13 +834,13 @@ function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { }; } export const ContractCodeHistoryEntry = { - typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", - aminoType: "wasm/ContractCodeHistoryEntry", + typeUrl: '/cosmwasm.wasm.v1.ContractCodeHistoryEntry', + aminoType: 'wasm/ContractCodeHistoryEntry', is(o: any): o is ContractCodeHistoryEntry { - return o && (o.$typeUrl === ContractCodeHistoryEntry.typeUrl || isSet(o.operation) && typeof o.codeId === "bigint" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === ContractCodeHistoryEntry.typeUrl || isSet(o.operation) && typeof o.codeId === 'bigint' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, isAmino(o: any): o is ContractCodeHistoryEntryAmino { - return o && (o.$typeUrl === ContractCodeHistoryEntry.typeUrl || isSet(o.operation) && typeof o.code_id === "bigint" && (o.msg instanceof Uint8Array || typeof o.msg === "string")); + return o && (o.$typeUrl === ContractCodeHistoryEntry.typeUrl || isSet(o.operation) && typeof o.code_id === 'bigint' && (o.msg instanceof Uint8Array || typeof o.msg === 'string')); }, encode(message: ContractCodeHistoryEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.operation !== 0) { @@ -863,21 +864,21 @@ export const ContractCodeHistoryEntry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.operation = (reader.int32() as any); - break; - case 2: - message.codeId = reader.uint64(); - break; - case 3: - message.updated = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.operation = (reader.int32() as any); + break; + case 2: + message.codeId = reader.uint64(); + break; + case 3: + message.updated = AbsoluteTxPosition.decode(reader, reader.uint32()); + break; + case 4: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -919,7 +920,7 @@ export const ContractCodeHistoryEntry = { }, toAminoMsg(message: ContractCodeHistoryEntry): ContractCodeHistoryEntryAminoMsg { return { - type: "wasm/ContractCodeHistoryEntry", + type: 'wasm/ContractCodeHistoryEntry', value: ContractCodeHistoryEntry.toAmino(message) }; }, @@ -931,7 +932,7 @@ export const ContractCodeHistoryEntry = { }, toProtoMsg(message: ContractCodeHistoryEntry): ContractCodeHistoryEntryProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", + typeUrl: '/cosmwasm.wasm.v1.ContractCodeHistoryEntry', value: ContractCodeHistoryEntry.encode(message).finish() }; } @@ -945,13 +946,13 @@ function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { }; } export const AbsoluteTxPosition = { - typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", - aminoType: "wasm/AbsoluteTxPosition", + typeUrl: '/cosmwasm.wasm.v1.AbsoluteTxPosition', + aminoType: 'wasm/AbsoluteTxPosition', is(o: any): o is AbsoluteTxPosition { - return o && (o.$typeUrl === AbsoluteTxPosition.typeUrl || typeof o.blockHeight === "bigint" && typeof o.txIndex === "bigint"); + return o && (o.$typeUrl === AbsoluteTxPosition.typeUrl || typeof o.blockHeight === 'bigint' && typeof o.txIndex === 'bigint'); }, isAmino(o: any): o is AbsoluteTxPositionAmino { - return o && (o.$typeUrl === AbsoluteTxPosition.typeUrl || typeof o.block_height === "bigint" && typeof o.tx_index === "bigint"); + return o && (o.$typeUrl === AbsoluteTxPosition.typeUrl || typeof o.block_height === 'bigint' && typeof o.tx_index === 'bigint'); }, encode(message: AbsoluteTxPosition, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.blockHeight !== BigInt(0)) { @@ -969,15 +970,15 @@ export const AbsoluteTxPosition = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.blockHeight = reader.uint64(); - break; - case 2: - message.txIndex = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.blockHeight = reader.uint64(); + break; + case 2: + message.txIndex = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1009,7 +1010,7 @@ export const AbsoluteTxPosition = { }, toAminoMsg(message: AbsoluteTxPosition): AbsoluteTxPositionAminoMsg { return { - type: "wasm/AbsoluteTxPosition", + type: 'wasm/AbsoluteTxPosition', value: AbsoluteTxPosition.toAmino(message) }; }, @@ -1021,7 +1022,7 @@ export const AbsoluteTxPosition = { }, toProtoMsg(message: AbsoluteTxPosition): AbsoluteTxPositionProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", + typeUrl: '/cosmwasm.wasm.v1.AbsoluteTxPosition', value: AbsoluteTxPosition.encode(message).finish() }; } @@ -1035,13 +1036,13 @@ function createBaseModel(): Model { }; } export const Model = { - typeUrl: "/cosmwasm.wasm.v1.Model", - aminoType: "wasm/Model", + typeUrl: '/cosmwasm.wasm.v1.Model', + aminoType: 'wasm/Model', is(o: any): o is Model { - return o && (o.$typeUrl === Model.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string")); + return o && (o.$typeUrl === Model.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string')); }, isAmino(o: any): o is ModelAmino { - return o && (o.$typeUrl === Model.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string")); + return o && (o.$typeUrl === Model.typeUrl || (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string')); }, encode(message: Model, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -1059,15 +1060,15 @@ export const Model = { while (reader.pos < end) { const 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; + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1099,7 +1100,7 @@ export const Model = { }, toAminoMsg(message: Model): ModelAminoMsg { return { - type: "wasm/Model", + type: 'wasm/Model', value: Model.toAmino(message) }; }, @@ -1111,7 +1112,7 @@ export const Model = { }, toProtoMsg(message: Model): ModelProtoMsg { return { - typeUrl: "/cosmwasm.wasm.v1.Model", + typeUrl: '/cosmwasm.wasm.v1.Model', value: Model.encode(message).finish() }; } diff --git a/libs/cosmos-types/gogoproto/gogo.ts b/libs/cosmos-types/gogoproto/gogo.ts index 693da49f..8cec2e9c 100644 --- a/libs/cosmos-types/gogoproto/gogo.ts +++ b/libs/cosmos-types/gogoproto/gogo.ts @@ -1 +1 @@ -export {} \ No newline at end of file +export {}; \ No newline at end of file diff --git a/libs/cosmos-types/google/api/annotations.ts b/libs/cosmos-types/google/api/annotations.ts index 693da49f..8cec2e9c 100644 --- a/libs/cosmos-types/google/api/annotations.ts +++ b/libs/cosmos-types/google/api/annotations.ts @@ -1 +1 @@ -export {} \ No newline at end of file +export {}; \ No newline at end of file diff --git a/libs/cosmos-types/google/api/http.ts b/libs/cosmos-types/google/api/http.ts index d990263c..6c142f47 100644 --- a/libs/cosmos-types/google/api/http.ts +++ b/libs/cosmos-types/google/api/http.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; /** * 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 @@ -24,7 +24,7 @@ export interface Http { fullyDecodeReservedExpansion: boolean; } export interface HttpProtoMsg { - typeUrl: "/google.api.Http"; + typeUrl: '/google.api.Http'; value: Uint8Array; } /** @@ -50,7 +50,7 @@ export interface HttpAmino { fully_decode_reserved_expansion: boolean; } export interface HttpAminoMsg { - type: "/google.api.Http"; + type: '/google.api.Http'; value: HttpAmino; } /** @@ -381,7 +381,7 @@ export interface HttpRule { additionalBindings: HttpRule[]; } export interface HttpRuleProtoMsg { - typeUrl: "/google.api.HttpRule"; + typeUrl: '/google.api.HttpRule'; value: Uint8Array; } /** @@ -712,7 +712,7 @@ export interface HttpRuleAmino { additional_bindings: HttpRuleAmino[]; } export interface HttpRuleAminoMsg { - type: "/google.api.HttpRule"; + type: '/google.api.HttpRule'; value: HttpRuleAmino; } /** A custom pattern is used for defining custom HTTP verb. */ @@ -723,7 +723,7 @@ export interface CustomHttpPattern { path: string; } export interface CustomHttpPatternProtoMsg { - typeUrl: "/google.api.CustomHttpPattern"; + typeUrl: '/google.api.CustomHttpPattern'; value: Uint8Array; } /** A custom pattern is used for defining custom HTTP verb. */ @@ -734,7 +734,7 @@ export interface CustomHttpPatternAmino { path: string; } export interface CustomHttpPatternAminoMsg { - type: "/google.api.CustomHttpPattern"; + type: '/google.api.CustomHttpPattern'; value: CustomHttpPatternAmino; } function createBaseHttp(): Http { @@ -744,12 +744,12 @@ function createBaseHttp(): Http { }; } export const Http = { - typeUrl: "/google.api.Http", + typeUrl: '/google.api.Http', is(o: any): o is Http { - return o && (o.$typeUrl === Http.typeUrl || Array.isArray(o.rules) && (!o.rules.length || HttpRule.is(o.rules[0])) && typeof o.fullyDecodeReservedExpansion === "boolean"); + return o && (o.$typeUrl === Http.typeUrl || Array.isArray(o.rules) && (!o.rules.length || HttpRule.is(o.rules[0])) && typeof o.fullyDecodeReservedExpansion === 'boolean'); }, isAmino(o: any): o is HttpAmino { - return o && (o.$typeUrl === Http.typeUrl || Array.isArray(o.rules) && (!o.rules.length || HttpRule.isAmino(o.rules[0])) && typeof o.fully_decode_reserved_expansion === "boolean"); + return o && (o.$typeUrl === Http.typeUrl || Array.isArray(o.rules) && (!o.rules.length || HttpRule.isAmino(o.rules[0])) && typeof o.fully_decode_reserved_expansion === 'boolean'); }, encode(message: Http, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.rules) { @@ -767,15 +767,15 @@ export const Http = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.rules.push(HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -815,7 +815,7 @@ export const Http = { }, toProtoMsg(message: Http): HttpProtoMsg { return { - typeUrl: "/google.api.Http", + typeUrl: '/google.api.Http', value: Http.encode(message).finish() }; } @@ -823,28 +823,28 @@ export const Http = { GlobalDecoderRegistry.register(Http.typeUrl, Http); function createBaseHttpRule(): HttpRule { return { - selector: "", + selector: '', get: undefined, put: undefined, post: undefined, delete: undefined, patch: undefined, custom: undefined, - body: "", - responseBody: "", + body: '', + responseBody: '', additionalBindings: [] }; } export const HttpRule = { - typeUrl: "/google.api.HttpRule", + typeUrl: '/google.api.HttpRule', is(o: any): o is HttpRule { - return o && (o.$typeUrl === HttpRule.typeUrl || typeof o.selector === "string" && typeof o.body === "string" && typeof o.responseBody === "string" && Array.isArray(o.additionalBindings) && (!o.additionalBindings.length || HttpRule.is(o.additionalBindings[0]))); + return o && (o.$typeUrl === HttpRule.typeUrl || typeof o.selector === 'string' && typeof o.body === 'string' && typeof o.responseBody === 'string' && Array.isArray(o.additionalBindings) && (!o.additionalBindings.length || HttpRule.is(o.additionalBindings[0]))); }, isAmino(o: any): o is HttpRuleAmino { - return o && (o.$typeUrl === HttpRule.typeUrl || typeof o.selector === "string" && typeof o.body === "string" && typeof o.response_body === "string" && Array.isArray(o.additional_bindings) && (!o.additional_bindings.length || HttpRule.isAmino(o.additional_bindings[0]))); + return o && (o.$typeUrl === HttpRule.typeUrl || typeof o.selector === 'string' && typeof o.body === 'string' && typeof o.response_body === 'string' && Array.isArray(o.additional_bindings) && (!o.additional_bindings.length || HttpRule.isAmino(o.additional_bindings[0]))); }, encode(message: HttpRule, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.selector !== "") { + if (message.selector !== '') { writer.uint32(10).string(message.selector); } if (message.get !== undefined) { @@ -865,10 +865,10 @@ export const HttpRule = { if (message.custom !== undefined) { CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); } - if (message.body !== "") { + if (message.body !== '') { writer.uint32(58).string(message.body); } - if (message.responseBody !== "") { + if (message.responseBody !== '') { writer.uint32(98).string(message.responseBody); } for (const v of message.additionalBindings) { @@ -883,54 +883,54 @@ export const HttpRule = { while (reader.pos < end) { const 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 = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + 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 = CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): HttpRule { const message = createBaseHttpRule(); - message.selector = object.selector ?? ""; + message.selector = object.selector ?? ''; message.get = object.get ?? undefined; message.put = object.put ?? undefined; message.post = object.post ?? undefined; message.delete = object.delete ?? undefined; message.patch = object.patch ?? undefined; message.custom = object.custom !== undefined && object.custom !== null ? CustomHttpPattern.fromPartial(object.custom) : undefined; - message.body = object.body ?? ""; - message.responseBody = object.responseBody ?? ""; + message.body = object.body ?? ''; + message.responseBody = object.responseBody ?? ''; message.additionalBindings = object.additionalBindings?.map(e => HttpRule.fromPartial(e)) || []; return message; }, @@ -968,15 +968,15 @@ export const HttpRule = { }, toAmino(message: HttpRule): HttpRuleAmino { const obj: any = {}; - obj.selector = message.selector === "" ? undefined : message.selector; + obj.selector = message.selector === '' ? undefined : message.selector; obj.get = message.get === null ? undefined : message.get; obj.put = message.put === null ? undefined : message.put; obj.post = message.post === null ? undefined : message.post; obj.delete = message.delete === null ? undefined : message.delete; obj.patch = message.patch === null ? undefined : message.patch; obj.custom = message.custom ? CustomHttpPattern.toAmino(message.custom) : undefined; - obj.body = message.body === "" ? undefined : message.body; - obj.response_body = message.responseBody === "" ? undefined : message.responseBody; + obj.body = message.body === '' ? undefined : message.body; + obj.response_body = message.responseBody === '' ? undefined : message.responseBody; if (message.additionalBindings) { obj.additional_bindings = message.additionalBindings.map(e => e ? HttpRule.toAmino(e) : undefined); } else { @@ -995,7 +995,7 @@ export const HttpRule = { }, toProtoMsg(message: HttpRule): HttpRuleProtoMsg { return { - typeUrl: "/google.api.HttpRule", + typeUrl: '/google.api.HttpRule', value: HttpRule.encode(message).finish() }; } @@ -1003,23 +1003,23 @@ export const HttpRule = { GlobalDecoderRegistry.register(HttpRule.typeUrl, HttpRule); function createBaseCustomHttpPattern(): CustomHttpPattern { return { - kind: "", - path: "" + kind: '', + path: '' }; } export const CustomHttpPattern = { - typeUrl: "/google.api.CustomHttpPattern", + typeUrl: '/google.api.CustomHttpPattern', is(o: any): o is CustomHttpPattern { - return o && (o.$typeUrl === CustomHttpPattern.typeUrl || typeof o.kind === "string" && typeof o.path === "string"); + return o && (o.$typeUrl === CustomHttpPattern.typeUrl || typeof o.kind === 'string' && typeof o.path === 'string'); }, isAmino(o: any): o is CustomHttpPatternAmino { - return o && (o.$typeUrl === CustomHttpPattern.typeUrl || typeof o.kind === "string" && typeof o.path === "string"); + return o && (o.$typeUrl === CustomHttpPattern.typeUrl || typeof o.kind === 'string' && typeof o.path === 'string'); }, encode(message: CustomHttpPattern, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.kind !== "") { + if (message.kind !== '') { writer.uint32(10).string(message.kind); } - if (message.path !== "") { + if (message.path !== '') { writer.uint32(18).string(message.path); } return writer; @@ -1031,23 +1031,23 @@ export const CustomHttpPattern = { while (reader.pos < end) { const 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; + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): CustomHttpPattern { const message = createBaseCustomHttpPattern(); - message.kind = object.kind ?? ""; - message.path = object.path ?? ""; + message.kind = object.kind ?? ''; + message.path = object.path ?? ''; return message; }, fromAmino(object: CustomHttpPatternAmino): CustomHttpPattern { @@ -1062,8 +1062,8 @@ export const CustomHttpPattern = { }, toAmino(message: CustomHttpPattern): CustomHttpPatternAmino { const obj: any = {}; - obj.kind = message.kind === "" ? undefined : message.kind; - obj.path = message.path === "" ? undefined : message.path; + obj.kind = message.kind === '' ? undefined : message.kind; + obj.path = message.path === '' ? undefined : message.path; return obj; }, fromAminoMsg(object: CustomHttpPatternAminoMsg): CustomHttpPattern { @@ -1077,7 +1077,7 @@ export const CustomHttpPattern = { }, toProtoMsg(message: CustomHttpPattern): CustomHttpPatternProtoMsg { return { - typeUrl: "/google.api.CustomHttpPattern", + typeUrl: '/google.api.CustomHttpPattern', value: CustomHttpPattern.encode(message).finish() }; } diff --git a/libs/cosmos-types/google/protobuf/any.ts b/libs/cosmos-types/google/protobuf/any.ts index bbae1be1..58bc1b78 100644 --- a/libs/cosmos-types/google/protobuf/any.ts +++ b/libs/cosmos-types/google/protobuf/any.ts @@ -1,5 +1,5 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { DeepPartial } from '../../helpers'; /** * `Any` contains an arbitrary serialized protocol buffer message along with a * URL that describes the type of the serialized message. @@ -123,7 +123,7 @@ export interface Any { value: Uint8Array; } export interface AnyProtoMsg { - typeUrl: "/google.protobuf.Any"; + typeUrl: '/google.protobuf.Any'; value: Uint8Array; } /** @@ -254,20 +254,20 @@ export interface AnyAminoMsg { } function createBaseAny(): Any { return { - typeUrl: "", + typeUrl: '', value: new Uint8Array() }; } export const Any = { - typeUrl: "/google.protobuf.Any", + typeUrl: '/google.protobuf.Any', is(o: any): o is Any { - return o && (o.$typeUrl === Any.typeUrl || typeof o.typeUrl === "string" && (o.value instanceof Uint8Array || typeof o.value === "string")); + return o && (o.$typeUrl === Any.typeUrl || typeof o.typeUrl === 'string' && (o.value instanceof Uint8Array || typeof o.value === 'string')); }, isAmino(o: any): o is AnyAmino { - return o && (o.$typeUrl === Any.typeUrl || typeof o.type === "string" && (o.value instanceof Uint8Array || typeof o.value === "string")); + return o && (o.$typeUrl === Any.typeUrl || typeof o.type === 'string' && (o.value instanceof Uint8Array || typeof o.value === 'string')); }, encode(message: Any, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.typeUrl !== "") { + if (message.typeUrl !== '') { writer.uint32(10).string(message.typeUrl); } if (message.value.length !== 0) { @@ -282,22 +282,22 @@ export const Any = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.typeUrl = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Any { const message = createBaseAny(); - message.typeUrl = object.typeUrl ?? ""; + message.typeUrl = object.typeUrl ?? ''; message.value = object.value ?? new Uint8Array(); return message; }, @@ -324,7 +324,7 @@ export const Any = { }, toProtoMsg(message: Any): AnyProtoMsg { return { - typeUrl: "/google.protobuf.Any", + typeUrl: '/google.protobuf.Any', value: Any.encode(message).finish() }; } diff --git a/libs/cosmos-types/google/protobuf/descriptor.ts b/libs/cosmos-types/google/protobuf/descriptor.ts index 4fbf75f3..4cfd3d16 100644 --- a/libs/cosmos-types/google/protobuf/descriptor.ts +++ b/libs/cosmos-types/google/protobuf/descriptor.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial, isSet } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; /** The full set of known editions. */ export enum Edition { /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ @@ -45,77 +45,77 @@ export enum Edition { export const EditionAmino = Edition; export function editionFromJSON(object: any): Edition { switch (object) { - case 0: - case "EDITION_UNKNOWN": - return Edition.EDITION_UNKNOWN; - case 900: - case "EDITION_LEGACY": - return Edition.EDITION_LEGACY; - case 998: - case "EDITION_PROTO2": - return Edition.EDITION_PROTO2; - case 999: - case "EDITION_PROTO3": - return Edition.EDITION_PROTO3; - case 1000: - case "EDITION_2023": - return Edition.EDITION_2023; - case 1001: - case "EDITION_2024": - return Edition.EDITION_2024; - case 1: - case "EDITION_1_TEST_ONLY": - return Edition.EDITION_1_TEST_ONLY; - case 2: - case "EDITION_2_TEST_ONLY": - return Edition.EDITION_2_TEST_ONLY; - case 99997: - case "EDITION_99997_TEST_ONLY": - return Edition.EDITION_99997_TEST_ONLY; - case 99998: - case "EDITION_99998_TEST_ONLY": - return Edition.EDITION_99998_TEST_ONLY; - case 99999: - case "EDITION_99999_TEST_ONLY": - return Edition.EDITION_99999_TEST_ONLY; - case 2147483647: - case "EDITION_MAX": - return Edition.EDITION_MAX; - case -1: - case "UNRECOGNIZED": - default: - return Edition.UNRECOGNIZED; + case 0: + case 'EDITION_UNKNOWN': + return Edition.EDITION_UNKNOWN; + case 900: + case 'EDITION_LEGACY': + return Edition.EDITION_LEGACY; + case 998: + case 'EDITION_PROTO2': + return Edition.EDITION_PROTO2; + case 999: + case 'EDITION_PROTO3': + return Edition.EDITION_PROTO3; + case 1000: + case 'EDITION_2023': + return Edition.EDITION_2023; + case 1001: + case 'EDITION_2024': + return Edition.EDITION_2024; + case 1: + case 'EDITION_1_TEST_ONLY': + return Edition.EDITION_1_TEST_ONLY; + case 2: + case 'EDITION_2_TEST_ONLY': + return Edition.EDITION_2_TEST_ONLY; + case 99997: + case 'EDITION_99997_TEST_ONLY': + return Edition.EDITION_99997_TEST_ONLY; + case 99998: + case 'EDITION_99998_TEST_ONLY': + return Edition.EDITION_99998_TEST_ONLY; + case 99999: + case 'EDITION_99999_TEST_ONLY': + return Edition.EDITION_99999_TEST_ONLY; + case 2147483647: + case 'EDITION_MAX': + return Edition.EDITION_MAX; + case -1: + case 'UNRECOGNIZED': + default: + return Edition.UNRECOGNIZED; } } export function editionToJSON(object: Edition): string { switch (object) { - case Edition.EDITION_UNKNOWN: - return "EDITION_UNKNOWN"; - case Edition.EDITION_LEGACY: - return "EDITION_LEGACY"; - case Edition.EDITION_PROTO2: - return "EDITION_PROTO2"; - case Edition.EDITION_PROTO3: - return "EDITION_PROTO3"; - case Edition.EDITION_2023: - return "EDITION_2023"; - case Edition.EDITION_2024: - return "EDITION_2024"; - case Edition.EDITION_1_TEST_ONLY: - return "EDITION_1_TEST_ONLY"; - case Edition.EDITION_2_TEST_ONLY: - return "EDITION_2_TEST_ONLY"; - case Edition.EDITION_99997_TEST_ONLY: - return "EDITION_99997_TEST_ONLY"; - case Edition.EDITION_99998_TEST_ONLY: - return "EDITION_99998_TEST_ONLY"; - case Edition.EDITION_99999_TEST_ONLY: - return "EDITION_99999_TEST_ONLY"; - case Edition.EDITION_MAX: - return "EDITION_MAX"; - case Edition.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case Edition.EDITION_UNKNOWN: + return 'EDITION_UNKNOWN'; + case Edition.EDITION_LEGACY: + return 'EDITION_LEGACY'; + case Edition.EDITION_PROTO2: + return 'EDITION_PROTO2'; + case Edition.EDITION_PROTO3: + return 'EDITION_PROTO3'; + case Edition.EDITION_2023: + return 'EDITION_2023'; + case Edition.EDITION_2024: + return 'EDITION_2024'; + case Edition.EDITION_1_TEST_ONLY: + return 'EDITION_1_TEST_ONLY'; + case Edition.EDITION_2_TEST_ONLY: + return 'EDITION_2_TEST_ONLY'; + case Edition.EDITION_99997_TEST_ONLY: + return 'EDITION_99997_TEST_ONLY'; + case Edition.EDITION_99998_TEST_ONLY: + return 'EDITION_99998_TEST_ONLY'; + case Edition.EDITION_99999_TEST_ONLY: + return 'EDITION_99999_TEST_ONLY'; + case Edition.EDITION_MAX: + return 'EDITION_MAX'; + case Edition.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** The verification state of the extension range. */ @@ -128,27 +128,27 @@ export enum ExtensionRangeOptions_VerificationState { export const ExtensionRangeOptions_VerificationStateAmino = ExtensionRangeOptions_VerificationState; export function extensionRangeOptions_VerificationStateFromJSON(object: any): ExtensionRangeOptions_VerificationState { switch (object) { - case 0: - case "DECLARATION": - return ExtensionRangeOptions_VerificationState.DECLARATION; - case 1: - case "UNVERIFIED": - return ExtensionRangeOptions_VerificationState.UNVERIFIED; - case -1: - case "UNRECOGNIZED": - default: - return ExtensionRangeOptions_VerificationState.UNRECOGNIZED; + case 0: + case 'DECLARATION': + return ExtensionRangeOptions_VerificationState.DECLARATION; + case 1: + case 'UNVERIFIED': + return ExtensionRangeOptions_VerificationState.UNVERIFIED; + case -1: + case 'UNRECOGNIZED': + default: + return ExtensionRangeOptions_VerificationState.UNRECOGNIZED; } } export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionRangeOptions_VerificationState): string { switch (object) { - case ExtensionRangeOptions_VerificationState.DECLARATION: - return "DECLARATION"; - case ExtensionRangeOptions_VerificationState.UNVERIFIED: - return "UNVERIFIED"; - case ExtensionRangeOptions_VerificationState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ExtensionRangeOptions_VerificationState.DECLARATION: + return 'DECLARATION'; + case ExtensionRangeOptions_VerificationState.UNVERIFIED: + return 'UNVERIFIED'; + case ExtensionRangeOptions_VerificationState.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FieldDescriptorProto_Type { @@ -197,107 +197,107 @@ export enum FieldDescriptorProto_Type { export const FieldDescriptorProto_TypeAmino = FieldDescriptorProto_Type; export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type { switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; + case 1: + case 'TYPE_DOUBLE': + return FieldDescriptorProto_Type.TYPE_DOUBLE; + case 2: + case 'TYPE_FLOAT': + return FieldDescriptorProto_Type.TYPE_FLOAT; + case 3: + case 'TYPE_INT64': + return FieldDescriptorProto_Type.TYPE_INT64; + case 4: + case 'TYPE_UINT64': + return FieldDescriptorProto_Type.TYPE_UINT64; + case 5: + case 'TYPE_INT32': + return FieldDescriptorProto_Type.TYPE_INT32; + case 6: + case 'TYPE_FIXED64': + return FieldDescriptorProto_Type.TYPE_FIXED64; + case 7: + case 'TYPE_FIXED32': + return FieldDescriptorProto_Type.TYPE_FIXED32; + case 8: + case 'TYPE_BOOL': + return FieldDescriptorProto_Type.TYPE_BOOL; + case 9: + case 'TYPE_STRING': + return FieldDescriptorProto_Type.TYPE_STRING; + case 10: + case 'TYPE_GROUP': + return FieldDescriptorProto_Type.TYPE_GROUP; + case 11: + case 'TYPE_MESSAGE': + return FieldDescriptorProto_Type.TYPE_MESSAGE; + case 12: + case 'TYPE_BYTES': + return FieldDescriptorProto_Type.TYPE_BYTES; + case 13: + case 'TYPE_UINT32': + return FieldDescriptorProto_Type.TYPE_UINT32; + case 14: + case 'TYPE_ENUM': + return FieldDescriptorProto_Type.TYPE_ENUM; + case 15: + case 'TYPE_SFIXED32': + return FieldDescriptorProto_Type.TYPE_SFIXED32; + case 16: + case 'TYPE_SFIXED64': + return FieldDescriptorProto_Type.TYPE_SFIXED64; + case 17: + case 'TYPE_SINT32': + return FieldDescriptorProto_Type.TYPE_SINT32; + case 18: + case 'TYPE_SINT64': + return FieldDescriptorProto_Type.TYPE_SINT64; + case -1: + case 'UNRECOGNIZED': + default: + return FieldDescriptorProto_Type.UNRECOGNIZED; } } export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string { switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - case FieldDescriptorProto_Type.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FieldDescriptorProto_Type.TYPE_DOUBLE: + return 'TYPE_DOUBLE'; + case FieldDescriptorProto_Type.TYPE_FLOAT: + return 'TYPE_FLOAT'; + case FieldDescriptorProto_Type.TYPE_INT64: + return 'TYPE_INT64'; + case FieldDescriptorProto_Type.TYPE_UINT64: + return 'TYPE_UINT64'; + case FieldDescriptorProto_Type.TYPE_INT32: + return 'TYPE_INT32'; + case FieldDescriptorProto_Type.TYPE_FIXED64: + return 'TYPE_FIXED64'; + case FieldDescriptorProto_Type.TYPE_FIXED32: + return 'TYPE_FIXED32'; + case FieldDescriptorProto_Type.TYPE_BOOL: + return 'TYPE_BOOL'; + case FieldDescriptorProto_Type.TYPE_STRING: + return 'TYPE_STRING'; + case FieldDescriptorProto_Type.TYPE_GROUP: + return 'TYPE_GROUP'; + case FieldDescriptorProto_Type.TYPE_MESSAGE: + return 'TYPE_MESSAGE'; + case FieldDescriptorProto_Type.TYPE_BYTES: + return 'TYPE_BYTES'; + case FieldDescriptorProto_Type.TYPE_UINT32: + return 'TYPE_UINT32'; + case FieldDescriptorProto_Type.TYPE_ENUM: + return 'TYPE_ENUM'; + case FieldDescriptorProto_Type.TYPE_SFIXED32: + return 'TYPE_SFIXED32'; + case FieldDescriptorProto_Type.TYPE_SFIXED64: + return 'TYPE_SFIXED64'; + case FieldDescriptorProto_Type.TYPE_SINT32: + return 'TYPE_SINT32'; + case FieldDescriptorProto_Type.TYPE_SINT64: + return 'TYPE_SINT64'; + case FieldDescriptorProto_Type.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FieldDescriptorProto_Label { @@ -315,32 +315,32 @@ export enum FieldDescriptorProto_Label { export const FieldDescriptorProto_LabelAmino = FieldDescriptorProto_Label; export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label { switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; + case 1: + case 'LABEL_OPTIONAL': + return FieldDescriptorProto_Label.LABEL_OPTIONAL; + case 3: + case 'LABEL_REPEATED': + return FieldDescriptorProto_Label.LABEL_REPEATED; + case 2: + case 'LABEL_REQUIRED': + return FieldDescriptorProto_Label.LABEL_REQUIRED; + case -1: + case 'UNRECOGNIZED': + default: + return FieldDescriptorProto_Label.UNRECOGNIZED; } } export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string { switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FieldDescriptorProto_Label.LABEL_OPTIONAL: + return 'LABEL_OPTIONAL'; + case FieldDescriptorProto_Label.LABEL_REPEATED: + return 'LABEL_REPEATED'; + case FieldDescriptorProto_Label.LABEL_REQUIRED: + return 'LABEL_REQUIRED'; + case FieldDescriptorProto_Label.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** Generated classes can be optimized for speed or code size. */ @@ -359,32 +359,32 @@ export enum FileOptions_OptimizeMode { export const FileOptions_OptimizeModeAmino = FileOptions_OptimizeMode; export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode { switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; + case 1: + case 'SPEED': + return FileOptions_OptimizeMode.SPEED; + case 2: + case 'CODE_SIZE': + return FileOptions_OptimizeMode.CODE_SIZE; + case 3: + case 'LITE_RUNTIME': + return FileOptions_OptimizeMode.LITE_RUNTIME; + case -1: + case 'UNRECOGNIZED': + default: + return FileOptions_OptimizeMode.UNRECOGNIZED; } } export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string { switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - case FileOptions_OptimizeMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FileOptions_OptimizeMode.SPEED: + return 'SPEED'; + case FileOptions_OptimizeMode.CODE_SIZE: + return 'CODE_SIZE'; + case FileOptions_OptimizeMode.LITE_RUNTIME: + return 'LITE_RUNTIME'; + case FileOptions_OptimizeMode.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FieldOptions_CType { @@ -405,32 +405,32 @@ export enum FieldOptions_CType { export const FieldOptions_CTypeAmino = FieldOptions_CType; export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; + case 0: + case 'STRING': + return FieldOptions_CType.STRING; + case 1: + case 'CORD': + return FieldOptions_CType.CORD; + case 2: + case 'STRING_PIECE': + return FieldOptions_CType.STRING_PIECE; + case -1: + case 'UNRECOGNIZED': + default: + return FieldOptions_CType.UNRECOGNIZED; } } export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - case FieldOptions_CType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FieldOptions_CType.STRING: + return 'STRING'; + case FieldOptions_CType.CORD: + return 'CORD'; + case FieldOptions_CType.STRING_PIECE: + return 'STRING_PIECE'; + case FieldOptions_CType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FieldOptions_JSType { @@ -445,32 +445,32 @@ export enum FieldOptions_JSType { export const FieldOptions_JSTypeAmino = FieldOptions_JSType; export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; + case 0: + case 'JS_NORMAL': + return FieldOptions_JSType.JS_NORMAL; + case 1: + case 'JS_STRING': + return FieldOptions_JSType.JS_STRING; + case 2: + case 'JS_NUMBER': + return FieldOptions_JSType.JS_NUMBER; + case -1: + case 'UNRECOGNIZED': + default: + return FieldOptions_JSType.UNRECOGNIZED; } } export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - case FieldOptions_JSType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FieldOptions_JSType.JS_NORMAL: + return 'JS_NORMAL'; + case FieldOptions_JSType.JS_STRING: + return 'JS_STRING'; + case FieldOptions_JSType.JS_NUMBER: + return 'JS_NUMBER'; + case FieldOptions_JSType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -487,32 +487,32 @@ export enum FieldOptions_OptionRetention { export const FieldOptions_OptionRetentionAmino = FieldOptions_OptionRetention; export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention { switch (object) { - case 0: - case "RETENTION_UNKNOWN": - return FieldOptions_OptionRetention.RETENTION_UNKNOWN; - case 1: - case "RETENTION_RUNTIME": - return FieldOptions_OptionRetention.RETENTION_RUNTIME; - case 2: - case "RETENTION_SOURCE": - return FieldOptions_OptionRetention.RETENTION_SOURCE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_OptionRetention.UNRECOGNIZED; + case 0: + case 'RETENTION_UNKNOWN': + return FieldOptions_OptionRetention.RETENTION_UNKNOWN; + case 1: + case 'RETENTION_RUNTIME': + return FieldOptions_OptionRetention.RETENTION_RUNTIME; + case 2: + case 'RETENTION_SOURCE': + return FieldOptions_OptionRetention.RETENTION_SOURCE; + case -1: + case 'UNRECOGNIZED': + default: + return FieldOptions_OptionRetention.UNRECOGNIZED; } } export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string { switch (object) { - case FieldOptions_OptionRetention.RETENTION_UNKNOWN: - return "RETENTION_UNKNOWN"; - case FieldOptions_OptionRetention.RETENTION_RUNTIME: - return "RETENTION_RUNTIME"; - case FieldOptions_OptionRetention.RETENTION_SOURCE: - return "RETENTION_SOURCE"; - case FieldOptions_OptionRetention.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FieldOptions_OptionRetention.RETENTION_UNKNOWN: + return 'RETENTION_UNKNOWN'; + case FieldOptions_OptionRetention.RETENTION_RUNTIME: + return 'RETENTION_RUNTIME'; + case FieldOptions_OptionRetention.RETENTION_SOURCE: + return 'RETENTION_SOURCE'; + case FieldOptions_OptionRetention.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -537,67 +537,67 @@ export enum FieldOptions_OptionTargetType { export const FieldOptions_OptionTargetTypeAmino = FieldOptions_OptionTargetType; export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType { switch (object) { - case 0: - case "TARGET_TYPE_UNKNOWN": - return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN; - case 1: - case "TARGET_TYPE_FILE": - return FieldOptions_OptionTargetType.TARGET_TYPE_FILE; - case 2: - case "TARGET_TYPE_EXTENSION_RANGE": - return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE; - case 3: - case "TARGET_TYPE_MESSAGE": - return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE; - case 4: - case "TARGET_TYPE_FIELD": - return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD; - case 5: - case "TARGET_TYPE_ONEOF": - return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF; - case 6: - case "TARGET_TYPE_ENUM": - return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM; - case 7: - case "TARGET_TYPE_ENUM_ENTRY": - return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY; - case 8: - case "TARGET_TYPE_SERVICE": - return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE; - case 9: - case "TARGET_TYPE_METHOD": - return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_OptionTargetType.UNRECOGNIZED; + case 0: + case 'TARGET_TYPE_UNKNOWN': + return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN; + case 1: + case 'TARGET_TYPE_FILE': + return FieldOptions_OptionTargetType.TARGET_TYPE_FILE; + case 2: + case 'TARGET_TYPE_EXTENSION_RANGE': + return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE; + case 3: + case 'TARGET_TYPE_MESSAGE': + return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE; + case 4: + case 'TARGET_TYPE_FIELD': + return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD; + case 5: + case 'TARGET_TYPE_ONEOF': + return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF; + case 6: + case 'TARGET_TYPE_ENUM': + return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM; + case 7: + case 'TARGET_TYPE_ENUM_ENTRY': + return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY; + case 8: + case 'TARGET_TYPE_SERVICE': + return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE; + case 9: + case 'TARGET_TYPE_METHOD': + return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD; + case -1: + case 'UNRECOGNIZED': + default: + return FieldOptions_OptionTargetType.UNRECOGNIZED; } } export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string { switch (object) { - case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN: - return "TARGET_TYPE_UNKNOWN"; - case FieldOptions_OptionTargetType.TARGET_TYPE_FILE: - return "TARGET_TYPE_FILE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE: - return "TARGET_TYPE_EXTENSION_RANGE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE: - return "TARGET_TYPE_MESSAGE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD: - return "TARGET_TYPE_FIELD"; - case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF: - return "TARGET_TYPE_ONEOF"; - case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM: - return "TARGET_TYPE_ENUM"; - case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY: - return "TARGET_TYPE_ENUM_ENTRY"; - case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE: - return "TARGET_TYPE_SERVICE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD: - return "TARGET_TYPE_METHOD"; - case FieldOptions_OptionTargetType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN: + return 'TARGET_TYPE_UNKNOWN'; + case FieldOptions_OptionTargetType.TARGET_TYPE_FILE: + return 'TARGET_TYPE_FILE'; + case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE: + return 'TARGET_TYPE_EXTENSION_RANGE'; + case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE: + return 'TARGET_TYPE_MESSAGE'; + case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD: + return 'TARGET_TYPE_FIELD'; + case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF: + return 'TARGET_TYPE_ONEOF'; + case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM: + return 'TARGET_TYPE_ENUM'; + case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY: + return 'TARGET_TYPE_ENUM_ENTRY'; + case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE: + return 'TARGET_TYPE_SERVICE'; + case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD: + return 'TARGET_TYPE_METHOD'; + case FieldOptions_OptionTargetType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -616,32 +616,32 @@ export enum MethodOptions_IdempotencyLevel { export const MethodOptions_IdempotencyLevelAmino = MethodOptions_IdempotencyLevel; export function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel { switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; + case 0: + case 'IDEMPOTENCY_UNKNOWN': + return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; + case 1: + case 'NO_SIDE_EFFECTS': + return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; + case 2: + case 'IDEMPOTENT': + return MethodOptions_IdempotencyLevel.IDEMPOTENT; + case -1: + case 'UNRECOGNIZED': + default: + return MethodOptions_IdempotencyLevel.UNRECOGNIZED; } } export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string { switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - case MethodOptions_IdempotencyLevel.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: + return 'IDEMPOTENCY_UNKNOWN'; + case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: + return 'NO_SIDE_EFFECTS'; + case MethodOptions_IdempotencyLevel.IDEMPOTENT: + return 'IDEMPOTENT'; + case MethodOptions_IdempotencyLevel.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FeatureSet_FieldPresence { @@ -654,37 +654,37 @@ export enum FeatureSet_FieldPresence { export const FeatureSet_FieldPresenceAmino = FeatureSet_FieldPresence; export function featureSet_FieldPresenceFromJSON(object: any): FeatureSet_FieldPresence { switch (object) { - case 0: - case "FIELD_PRESENCE_UNKNOWN": - return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN; - case 1: - case "EXPLICIT": - return FeatureSet_FieldPresence.EXPLICIT; - case 2: - case "IMPLICIT": - return FeatureSet_FieldPresence.IMPLICIT; - case 3: - case "LEGACY_REQUIRED": - return FeatureSet_FieldPresence.LEGACY_REQUIRED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_FieldPresence.UNRECOGNIZED; + case 0: + case 'FIELD_PRESENCE_UNKNOWN': + return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN; + case 1: + case 'EXPLICIT': + return FeatureSet_FieldPresence.EXPLICIT; + case 2: + case 'IMPLICIT': + return FeatureSet_FieldPresence.IMPLICIT; + case 3: + case 'LEGACY_REQUIRED': + return FeatureSet_FieldPresence.LEGACY_REQUIRED; + case -1: + case 'UNRECOGNIZED': + default: + return FeatureSet_FieldPresence.UNRECOGNIZED; } } export function featureSet_FieldPresenceToJSON(object: FeatureSet_FieldPresence): string { switch (object) { - case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN: - return "FIELD_PRESENCE_UNKNOWN"; - case FeatureSet_FieldPresence.EXPLICIT: - return "EXPLICIT"; - case FeatureSet_FieldPresence.IMPLICIT: - return "IMPLICIT"; - case FeatureSet_FieldPresence.LEGACY_REQUIRED: - return "LEGACY_REQUIRED"; - case FeatureSet_FieldPresence.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN: + return 'FIELD_PRESENCE_UNKNOWN'; + case FeatureSet_FieldPresence.EXPLICIT: + return 'EXPLICIT'; + case FeatureSet_FieldPresence.IMPLICIT: + return 'IMPLICIT'; + case FeatureSet_FieldPresence.LEGACY_REQUIRED: + return 'LEGACY_REQUIRED'; + case FeatureSet_FieldPresence.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FeatureSet_EnumType { @@ -696,32 +696,32 @@ export enum FeatureSet_EnumType { export const FeatureSet_EnumTypeAmino = FeatureSet_EnumType; export function featureSet_EnumTypeFromJSON(object: any): FeatureSet_EnumType { switch (object) { - case 0: - case "ENUM_TYPE_UNKNOWN": - return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN; - case 1: - case "OPEN": - return FeatureSet_EnumType.OPEN; - case 2: - case "CLOSED": - return FeatureSet_EnumType.CLOSED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_EnumType.UNRECOGNIZED; + case 0: + case 'ENUM_TYPE_UNKNOWN': + return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN; + case 1: + case 'OPEN': + return FeatureSet_EnumType.OPEN; + case 2: + case 'CLOSED': + return FeatureSet_EnumType.CLOSED; + case -1: + case 'UNRECOGNIZED': + default: + return FeatureSet_EnumType.UNRECOGNIZED; } } export function featureSet_EnumTypeToJSON(object: FeatureSet_EnumType): string { switch (object) { - case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN: - return "ENUM_TYPE_UNKNOWN"; - case FeatureSet_EnumType.OPEN: - return "OPEN"; - case FeatureSet_EnumType.CLOSED: - return "CLOSED"; - case FeatureSet_EnumType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN: + return 'ENUM_TYPE_UNKNOWN'; + case FeatureSet_EnumType.OPEN: + return 'OPEN'; + case FeatureSet_EnumType.CLOSED: + return 'CLOSED'; + case FeatureSet_EnumType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FeatureSet_RepeatedFieldEncoding { @@ -733,32 +733,32 @@ export enum FeatureSet_RepeatedFieldEncoding { export const FeatureSet_RepeatedFieldEncodingAmino = FeatureSet_RepeatedFieldEncoding; export function featureSet_RepeatedFieldEncodingFromJSON(object: any): FeatureSet_RepeatedFieldEncoding { switch (object) { - case 0: - case "REPEATED_FIELD_ENCODING_UNKNOWN": - return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN; - case 1: - case "PACKED": - return FeatureSet_RepeatedFieldEncoding.PACKED; - case 2: - case "EXPANDED": - return FeatureSet_RepeatedFieldEncoding.EXPANDED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED; + case 0: + case 'REPEATED_FIELD_ENCODING_UNKNOWN': + return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN; + case 1: + case 'PACKED': + return FeatureSet_RepeatedFieldEncoding.PACKED; + case 2: + case 'EXPANDED': + return FeatureSet_RepeatedFieldEncoding.EXPANDED; + case -1: + case 'UNRECOGNIZED': + default: + return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED; } } export function featureSet_RepeatedFieldEncodingToJSON(object: FeatureSet_RepeatedFieldEncoding): string { switch (object) { - case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN: - return "REPEATED_FIELD_ENCODING_UNKNOWN"; - case FeatureSet_RepeatedFieldEncoding.PACKED: - return "PACKED"; - case FeatureSet_RepeatedFieldEncoding.EXPANDED: - return "EXPANDED"; - case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN: + return 'REPEATED_FIELD_ENCODING_UNKNOWN'; + case FeatureSet_RepeatedFieldEncoding.PACKED: + return 'PACKED'; + case FeatureSet_RepeatedFieldEncoding.EXPANDED: + return 'EXPANDED'; + case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FeatureSet_Utf8Validation { @@ -770,32 +770,32 @@ export enum FeatureSet_Utf8Validation { export const FeatureSet_Utf8ValidationAmino = FeatureSet_Utf8Validation; export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8Validation { switch (object) { - case 0: - case "UTF8_VALIDATION_UNKNOWN": - return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN; - case 2: - case "VERIFY": - return FeatureSet_Utf8Validation.VERIFY; - case 3: - case "NONE": - return FeatureSet_Utf8Validation.NONE; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_Utf8Validation.UNRECOGNIZED; + case 0: + case 'UTF8_VALIDATION_UNKNOWN': + return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN; + case 2: + case 'VERIFY': + return FeatureSet_Utf8Validation.VERIFY; + case 3: + case 'NONE': + return FeatureSet_Utf8Validation.NONE; + case -1: + case 'UNRECOGNIZED': + default: + return FeatureSet_Utf8Validation.UNRECOGNIZED; } } export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validation): string { switch (object) { - case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN: - return "UTF8_VALIDATION_UNKNOWN"; - case FeatureSet_Utf8Validation.VERIFY: - return "VERIFY"; - case FeatureSet_Utf8Validation.NONE: - return "NONE"; - case FeatureSet_Utf8Validation.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN: + return 'UTF8_VALIDATION_UNKNOWN'; + case FeatureSet_Utf8Validation.VERIFY: + return 'VERIFY'; + case FeatureSet_Utf8Validation.NONE: + return 'NONE'; + case FeatureSet_Utf8Validation.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FeatureSet_MessageEncoding { @@ -807,32 +807,32 @@ export enum FeatureSet_MessageEncoding { export const FeatureSet_MessageEncodingAmino = FeatureSet_MessageEncoding; export function featureSet_MessageEncodingFromJSON(object: any): FeatureSet_MessageEncoding { switch (object) { - case 0: - case "MESSAGE_ENCODING_UNKNOWN": - return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN; - case 1: - case "LENGTH_PREFIXED": - return FeatureSet_MessageEncoding.LENGTH_PREFIXED; - case 2: - case "DELIMITED": - return FeatureSet_MessageEncoding.DELIMITED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_MessageEncoding.UNRECOGNIZED; + case 0: + case 'MESSAGE_ENCODING_UNKNOWN': + return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN; + case 1: + case 'LENGTH_PREFIXED': + return FeatureSet_MessageEncoding.LENGTH_PREFIXED; + case 2: + case 'DELIMITED': + return FeatureSet_MessageEncoding.DELIMITED; + case -1: + case 'UNRECOGNIZED': + default: + return FeatureSet_MessageEncoding.UNRECOGNIZED; } } export function featureSet_MessageEncodingToJSON(object: FeatureSet_MessageEncoding): string { switch (object) { - case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN: - return "MESSAGE_ENCODING_UNKNOWN"; - case FeatureSet_MessageEncoding.LENGTH_PREFIXED: - return "LENGTH_PREFIXED"; - case FeatureSet_MessageEncoding.DELIMITED: - return "DELIMITED"; - case FeatureSet_MessageEncoding.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN: + return 'MESSAGE_ENCODING_UNKNOWN'; + case FeatureSet_MessageEncoding.LENGTH_PREFIXED: + return 'LENGTH_PREFIXED'; + case FeatureSet_MessageEncoding.DELIMITED: + return 'DELIMITED'; + case FeatureSet_MessageEncoding.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum FeatureSet_JsonFormat { @@ -844,32 +844,32 @@ export enum FeatureSet_JsonFormat { export const FeatureSet_JsonFormatAmino = FeatureSet_JsonFormat; export function featureSet_JsonFormatFromJSON(object: any): FeatureSet_JsonFormat { switch (object) { - case 0: - case "JSON_FORMAT_UNKNOWN": - return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN; - case 1: - case "ALLOW": - return FeatureSet_JsonFormat.ALLOW; - case 2: - case "LEGACY_BEST_EFFORT": - return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_JsonFormat.UNRECOGNIZED; + case 0: + case 'JSON_FORMAT_UNKNOWN': + return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN; + case 1: + case 'ALLOW': + return FeatureSet_JsonFormat.ALLOW; + case 2: + case 'LEGACY_BEST_EFFORT': + return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT; + case -1: + case 'UNRECOGNIZED': + default: + return FeatureSet_JsonFormat.UNRECOGNIZED; } } export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): string { switch (object) { - case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN: - return "JSON_FORMAT_UNKNOWN"; - case FeatureSet_JsonFormat.ALLOW: - return "ALLOW"; - case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT: - return "LEGACY_BEST_EFFORT"; - case FeatureSet_JsonFormat.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN: + return 'JSON_FORMAT_UNKNOWN'; + case FeatureSet_JsonFormat.ALLOW: + return 'ALLOW'; + case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT: + return 'LEGACY_BEST_EFFORT'; + case FeatureSet_JsonFormat.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -888,32 +888,32 @@ export enum GeneratedCodeInfo_Annotation_Semantic { export const GeneratedCodeInfo_Annotation_SemanticAmino = GeneratedCodeInfo_Annotation_Semantic; export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic { switch (object) { - case 0: - case "NONE": - return GeneratedCodeInfo_Annotation_Semantic.NONE; - case 1: - case "SET": - return GeneratedCodeInfo_Annotation_Semantic.SET; - case 2: - case "ALIAS": - return GeneratedCodeInfo_Annotation_Semantic.ALIAS; - case -1: - case "UNRECOGNIZED": - default: - return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED; + case 0: + case 'NONE': + return GeneratedCodeInfo_Annotation_Semantic.NONE; + case 1: + case 'SET': + return GeneratedCodeInfo_Annotation_Semantic.SET; + case 2: + case 'ALIAS': + return GeneratedCodeInfo_Annotation_Semantic.ALIAS; + case -1: + case 'UNRECOGNIZED': + default: + return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED; } } export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string { switch (object) { - case GeneratedCodeInfo_Annotation_Semantic.NONE: - return "NONE"; - case GeneratedCodeInfo_Annotation_Semantic.SET: - return "SET"; - case GeneratedCodeInfo_Annotation_Semantic.ALIAS: - return "ALIAS"; - case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case GeneratedCodeInfo_Annotation_Semantic.NONE: + return 'NONE'; + case GeneratedCodeInfo_Annotation_Semantic.SET: + return 'SET'; + case GeneratedCodeInfo_Annotation_Semantic.ALIAS: + return 'ALIAS'; + case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -924,7 +924,7 @@ export interface FileDescriptorSet { file: FileDescriptorProto[]; } export interface FileDescriptorSetProtoMsg { - typeUrl: "/google.protobuf.FileDescriptorSet"; + typeUrl: '/google.protobuf.FileDescriptorSet'; value: Uint8Array; } /** @@ -935,7 +935,7 @@ export interface FileDescriptorSetAmino { file: FileDescriptorProtoAmino[]; } export interface FileDescriptorSetAminoMsg { - type: "/google.protobuf.FileDescriptorSet"; + type: '/google.protobuf.FileDescriptorSet'; value: FileDescriptorSetAmino; } /** Describes a complete .proto file. */ @@ -976,7 +976,7 @@ export interface FileDescriptorProto { edition: Edition; } export interface FileDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.FileDescriptorProto"; + typeUrl: '/google.protobuf.FileDescriptorProto'; value: Uint8Array; } /** Describes a complete .proto file. */ @@ -1017,7 +1017,7 @@ export interface FileDescriptorProtoAmino { edition: Edition; } export interface FileDescriptorProtoAminoMsg { - type: "/google.protobuf.FileDescriptorProto"; + type: '/google.protobuf.FileDescriptorProto'; value: FileDescriptorProtoAmino; } /** Describes a message type. */ @@ -1038,7 +1038,7 @@ export interface DescriptorProto { reservedName: string[]; } export interface DescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.DescriptorProto"; + typeUrl: '/google.protobuf.DescriptorProto'; value: Uint8Array; } /** Describes a message type. */ @@ -1059,7 +1059,7 @@ export interface DescriptorProtoAmino { reserved_name: string[]; } export interface DescriptorProtoAminoMsg { - type: "/google.protobuf.DescriptorProto"; + type: '/google.protobuf.DescriptorProto'; value: DescriptorProtoAmino; } export interface DescriptorProto_ExtensionRange { @@ -1070,7 +1070,7 @@ export interface DescriptorProto_ExtensionRange { options?: ExtensionRangeOptions; } export interface DescriptorProto_ExtensionRangeProtoMsg { - typeUrl: "/google.protobuf.ExtensionRange"; + typeUrl: '/google.protobuf.ExtensionRange'; value: Uint8Array; } export interface DescriptorProto_ExtensionRangeAmino { @@ -1081,7 +1081,7 @@ export interface DescriptorProto_ExtensionRangeAmino { options?: ExtensionRangeOptionsAmino; } export interface DescriptorProto_ExtensionRangeAminoMsg { - type: "/google.protobuf.ExtensionRange"; + type: '/google.protobuf.ExtensionRange'; value: DescriptorProto_ExtensionRangeAmino; } /** @@ -1096,7 +1096,7 @@ export interface DescriptorProto_ReservedRange { end: number; } export interface DescriptorProto_ReservedRangeProtoMsg { - typeUrl: "/google.protobuf.ReservedRange"; + typeUrl: '/google.protobuf.ReservedRange'; value: Uint8Array; } /** @@ -1111,7 +1111,7 @@ export interface DescriptorProto_ReservedRangeAmino { end: number; } export interface DescriptorProto_ReservedRangeAminoMsg { - type: "/google.protobuf.ReservedRange"; + type: '/google.protobuf.ReservedRange'; value: DescriptorProto_ReservedRangeAmino; } export interface ExtensionRangeOptions { @@ -1133,7 +1133,7 @@ export interface ExtensionRangeOptions { verification: ExtensionRangeOptions_VerificationState; } export interface ExtensionRangeOptionsProtoMsg { - typeUrl: "/google.protobuf.ExtensionRangeOptions"; + typeUrl: '/google.protobuf.ExtensionRangeOptions'; value: Uint8Array; } export interface ExtensionRangeOptionsAmino { @@ -1155,7 +1155,7 @@ export interface ExtensionRangeOptionsAmino { verification: ExtensionRangeOptions_VerificationState; } export interface ExtensionRangeOptionsAminoMsg { - type: "/google.protobuf.ExtensionRangeOptions"; + type: '/google.protobuf.ExtensionRangeOptions'; value: ExtensionRangeOptionsAmino; } export interface ExtensionRangeOptions_Declaration { @@ -1185,7 +1185,7 @@ export interface ExtensionRangeOptions_Declaration { repeated: boolean; } export interface ExtensionRangeOptions_DeclarationProtoMsg { - typeUrl: "/google.protobuf.Declaration"; + typeUrl: '/google.protobuf.Declaration'; value: Uint8Array; } export interface ExtensionRangeOptions_DeclarationAmino { @@ -1215,7 +1215,7 @@ export interface ExtensionRangeOptions_DeclarationAmino { repeated: boolean; } export interface ExtensionRangeOptions_DeclarationAminoMsg { - type: "/google.protobuf.Declaration"; + type: '/google.protobuf.Declaration'; value: ExtensionRangeOptions_DeclarationAmino; } /** Describes a field within a message. */ @@ -1287,7 +1287,7 @@ export interface FieldDescriptorProto { proto3Optional: boolean; } export interface FieldDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.FieldDescriptorProto"; + typeUrl: '/google.protobuf.FieldDescriptorProto'; value: Uint8Array; } /** Describes a field within a message. */ @@ -1359,7 +1359,7 @@ export interface FieldDescriptorProtoAmino { proto3_optional: boolean; } export interface FieldDescriptorProtoAminoMsg { - type: "/google.protobuf.FieldDescriptorProto"; + type: '/google.protobuf.FieldDescriptorProto'; value: FieldDescriptorProtoAmino; } /** Describes a oneof. */ @@ -1368,7 +1368,7 @@ export interface OneofDescriptorProto { options?: OneofOptions; } export interface OneofDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.OneofDescriptorProto"; + typeUrl: '/google.protobuf.OneofDescriptorProto'; value: Uint8Array; } /** Describes a oneof. */ @@ -1377,7 +1377,7 @@ export interface OneofDescriptorProtoAmino { options?: OneofOptionsAmino; } export interface OneofDescriptorProtoAminoMsg { - type: "/google.protobuf.OneofDescriptorProto"; + type: '/google.protobuf.OneofDescriptorProto'; value: OneofDescriptorProtoAmino; } /** Describes an enum type. */ @@ -1398,7 +1398,7 @@ export interface EnumDescriptorProto { reservedName: string[]; } export interface EnumDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.EnumDescriptorProto"; + typeUrl: '/google.protobuf.EnumDescriptorProto'; value: Uint8Array; } /** Describes an enum type. */ @@ -1419,7 +1419,7 @@ export interface EnumDescriptorProtoAmino { reserved_name: string[]; } export interface EnumDescriptorProtoAminoMsg { - type: "/google.protobuf.EnumDescriptorProto"; + type: '/google.protobuf.EnumDescriptorProto'; value: EnumDescriptorProtoAmino; } /** @@ -1437,7 +1437,7 @@ export interface EnumDescriptorProto_EnumReservedRange { end: number; } export interface EnumDescriptorProto_EnumReservedRangeProtoMsg { - typeUrl: "/google.protobuf.EnumReservedRange"; + typeUrl: '/google.protobuf.EnumReservedRange'; value: Uint8Array; } /** @@ -1455,7 +1455,7 @@ export interface EnumDescriptorProto_EnumReservedRangeAmino { end: number; } export interface EnumDescriptorProto_EnumReservedRangeAminoMsg { - type: "/google.protobuf.EnumReservedRange"; + type: '/google.protobuf.EnumReservedRange'; value: EnumDescriptorProto_EnumReservedRangeAmino; } /** Describes a value within an enum. */ @@ -1465,7 +1465,7 @@ export interface EnumValueDescriptorProto { options?: EnumValueOptions; } export interface EnumValueDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.EnumValueDescriptorProto"; + typeUrl: '/google.protobuf.EnumValueDescriptorProto'; value: Uint8Array; } /** Describes a value within an enum. */ @@ -1475,7 +1475,7 @@ export interface EnumValueDescriptorProtoAmino { options?: EnumValueOptionsAmino; } export interface EnumValueDescriptorProtoAminoMsg { - type: "/google.protobuf.EnumValueDescriptorProto"; + type: '/google.protobuf.EnumValueDescriptorProto'; value: EnumValueDescriptorProtoAmino; } /** Describes a service. */ @@ -1485,7 +1485,7 @@ export interface ServiceDescriptorProto { options?: ServiceOptions; } export interface ServiceDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.ServiceDescriptorProto"; + typeUrl: '/google.protobuf.ServiceDescriptorProto'; value: Uint8Array; } /** Describes a service. */ @@ -1495,7 +1495,7 @@ export interface ServiceDescriptorProtoAmino { options?: ServiceOptionsAmino; } export interface ServiceDescriptorProtoAminoMsg { - type: "/google.protobuf.ServiceDescriptorProto"; + type: '/google.protobuf.ServiceDescriptorProto'; value: ServiceDescriptorProtoAmino; } /** Describes a method of a service. */ @@ -1514,7 +1514,7 @@ export interface MethodDescriptorProto { serverStreaming: boolean; } export interface MethodDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.MethodDescriptorProto"; + typeUrl: '/google.protobuf.MethodDescriptorProto'; value: Uint8Array; } /** Describes a method of a service. */ @@ -1533,7 +1533,7 @@ export interface MethodDescriptorProtoAmino { server_streaming: boolean; } export interface MethodDescriptorProtoAminoMsg { - type: "/google.protobuf.MethodDescriptorProto"; + type: '/google.protobuf.MethodDescriptorProto'; value: MethodDescriptorProtoAmino; } export interface FileOptions { @@ -1659,7 +1659,7 @@ export interface FileOptions { uninterpretedOption: UninterpretedOption[]; } export interface FileOptionsProtoMsg { - typeUrl: "/google.protobuf.FileOptions"; + typeUrl: '/google.protobuf.FileOptions'; value: Uint8Array; } export interface FileOptionsAmino { @@ -1785,7 +1785,7 @@ export interface FileOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface FileOptionsAminoMsg { - type: "/google.protobuf.FileOptions"; + type: '/google.protobuf.FileOptions'; value: FileOptionsAmino; } export interface MessageOptions { @@ -1867,7 +1867,7 @@ export interface MessageOptions { uninterpretedOption: UninterpretedOption[]; } export interface MessageOptionsProtoMsg { - typeUrl: "/google.protobuf.MessageOptions"; + typeUrl: '/google.protobuf.MessageOptions'; value: Uint8Array; } export interface MessageOptionsAmino { @@ -1949,7 +1949,7 @@ export interface MessageOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface MessageOptionsAminoMsg { - type: "/google.protobuf.MessageOptions"; + type: '/google.protobuf.MessageOptions'; value: MessageOptionsAmino; } export interface FieldOptions { @@ -2041,7 +2041,7 @@ export interface FieldOptions { uninterpretedOption: UninterpretedOption[]; } export interface FieldOptionsProtoMsg { - typeUrl: "/google.protobuf.FieldOptions"; + typeUrl: '/google.protobuf.FieldOptions'; value: Uint8Array; } export interface FieldOptionsAmino { @@ -2133,7 +2133,7 @@ export interface FieldOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface FieldOptionsAminoMsg { - type: "/google.protobuf.FieldOptions"; + type: '/google.protobuf.FieldOptions'; value: FieldOptionsAmino; } export interface FieldOptions_EditionDefault { @@ -2142,7 +2142,7 @@ export interface FieldOptions_EditionDefault { value: string; } export interface FieldOptions_EditionDefaultProtoMsg { - typeUrl: "/google.protobuf.EditionDefault"; + typeUrl: '/google.protobuf.EditionDefault'; value: Uint8Array; } export interface FieldOptions_EditionDefaultAmino { @@ -2151,7 +2151,7 @@ export interface FieldOptions_EditionDefaultAmino { value: string; } export interface FieldOptions_EditionDefaultAminoMsg { - type: "/google.protobuf.EditionDefault"; + type: '/google.protobuf.EditionDefault'; value: FieldOptions_EditionDefaultAmino; } /** Information about the support window of a feature. */ @@ -2180,7 +2180,7 @@ export interface FieldOptions_FeatureSupport { editionRemoved: Edition; } export interface FieldOptions_FeatureSupportProtoMsg { - typeUrl: "/google.protobuf.FeatureSupport"; + typeUrl: '/google.protobuf.FeatureSupport'; value: Uint8Array; } /** Information about the support window of a feature. */ @@ -2209,7 +2209,7 @@ export interface FieldOptions_FeatureSupportAmino { edition_removed: Edition; } export interface FieldOptions_FeatureSupportAminoMsg { - type: "/google.protobuf.FeatureSupport"; + type: '/google.protobuf.FeatureSupport'; value: FieldOptions_FeatureSupportAmino; } export interface OneofOptions { @@ -2219,7 +2219,7 @@ export interface OneofOptions { uninterpretedOption: UninterpretedOption[]; } export interface OneofOptionsProtoMsg { - typeUrl: "/google.protobuf.OneofOptions"; + typeUrl: '/google.protobuf.OneofOptions'; value: Uint8Array; } export interface OneofOptionsAmino { @@ -2229,7 +2229,7 @@ export interface OneofOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface OneofOptionsAminoMsg { - type: "/google.protobuf.OneofOptions"; + type: '/google.protobuf.OneofOptions'; value: OneofOptionsAmino; } export interface EnumOptions { @@ -2261,7 +2261,7 @@ export interface EnumOptions { uninterpretedOption: UninterpretedOption[]; } export interface EnumOptionsProtoMsg { - typeUrl: "/google.protobuf.EnumOptions"; + typeUrl: '/google.protobuf.EnumOptions'; value: Uint8Array; } export interface EnumOptionsAmino { @@ -2293,7 +2293,7 @@ export interface EnumOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface EnumOptionsAminoMsg { - type: "/google.protobuf.EnumOptions"; + type: '/google.protobuf.EnumOptions'; value: EnumOptionsAmino; } export interface EnumValueOptions { @@ -2316,7 +2316,7 @@ export interface EnumValueOptions { uninterpretedOption: UninterpretedOption[]; } export interface EnumValueOptionsProtoMsg { - typeUrl: "/google.protobuf.EnumValueOptions"; + typeUrl: '/google.protobuf.EnumValueOptions'; value: Uint8Array; } export interface EnumValueOptionsAmino { @@ -2339,7 +2339,7 @@ export interface EnumValueOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface EnumValueOptionsAminoMsg { - type: "/google.protobuf.EnumValueOptions"; + type: '/google.protobuf.EnumValueOptions'; value: EnumValueOptionsAmino; } export interface ServiceOptions { @@ -2356,7 +2356,7 @@ export interface ServiceOptions { uninterpretedOption: UninterpretedOption[]; } export interface ServiceOptionsProtoMsg { - typeUrl: "/google.protobuf.ServiceOptions"; + typeUrl: '/google.protobuf.ServiceOptions'; value: Uint8Array; } export interface ServiceOptionsAmino { @@ -2373,7 +2373,7 @@ export interface ServiceOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface ServiceOptionsAminoMsg { - type: "/google.protobuf.ServiceOptions"; + type: '/google.protobuf.ServiceOptions'; value: ServiceOptionsAmino; } export interface MethodOptions { @@ -2391,7 +2391,7 @@ export interface MethodOptions { uninterpretedOption: UninterpretedOption[]; } export interface MethodOptionsProtoMsg { - typeUrl: "/google.protobuf.MethodOptions"; + typeUrl: '/google.protobuf.MethodOptions'; value: Uint8Array; } export interface MethodOptionsAmino { @@ -2409,7 +2409,7 @@ export interface MethodOptionsAmino { uninterpreted_option: UninterpretedOptionAmino[]; } export interface MethodOptionsAminoMsg { - type: "/google.protobuf.MethodOptions"; + type: '/google.protobuf.MethodOptions'; value: MethodOptionsAmino; } /** @@ -2434,7 +2434,7 @@ export interface UninterpretedOption { aggregateValue: string; } export interface UninterpretedOptionProtoMsg { - typeUrl: "/google.protobuf.UninterpretedOption"; + typeUrl: '/google.protobuf.UninterpretedOption'; value: Uint8Array; } /** @@ -2459,7 +2459,7 @@ export interface UninterpretedOptionAmino { aggregate_value: string; } export interface UninterpretedOptionAminoMsg { - type: "/google.protobuf.UninterpretedOption"; + type: '/google.protobuf.UninterpretedOption'; value: UninterpretedOptionAmino; } /** @@ -2474,7 +2474,7 @@ export interface UninterpretedOption_NamePart { isExtension: boolean; } export interface UninterpretedOption_NamePartProtoMsg { - typeUrl: "/google.protobuf.NamePart"; + typeUrl: '/google.protobuf.NamePart'; value: Uint8Array; } /** @@ -2489,7 +2489,7 @@ export interface UninterpretedOption_NamePartAmino { is_extension: boolean; } export interface UninterpretedOption_NamePartAminoMsg { - type: "/google.protobuf.NamePart"; + type: '/google.protobuf.NamePart'; value: UninterpretedOption_NamePartAmino; } /** @@ -2509,7 +2509,7 @@ export interface FeatureSet { jsonFormat: FeatureSet_JsonFormat; } export interface FeatureSetProtoMsg { - typeUrl: "/google.protobuf.FeatureSet"; + typeUrl: '/google.protobuf.FeatureSet'; value: Uint8Array; } /** @@ -2529,7 +2529,7 @@ export interface FeatureSetAmino { json_format: FeatureSet_JsonFormat; } export interface FeatureSetAminoMsg { - type: "/google.protobuf.FeatureSet"; + type: '/google.protobuf.FeatureSet'; value: FeatureSetAmino; } /** @@ -2552,7 +2552,7 @@ export interface FeatureSetDefaults { maximumEdition: Edition; } export interface FeatureSetDefaultsProtoMsg { - typeUrl: "/google.protobuf.FeatureSetDefaults"; + typeUrl: '/google.protobuf.FeatureSetDefaults'; value: Uint8Array; } /** @@ -2575,7 +2575,7 @@ export interface FeatureSetDefaultsAmino { maximum_edition: Edition; } export interface FeatureSetDefaultsAminoMsg { - type: "/google.protobuf.FeatureSetDefaults"; + type: '/google.protobuf.FeatureSetDefaults'; value: FeatureSetDefaultsAmino; } /** @@ -2592,7 +2592,7 @@ export interface FeatureSetDefaults_FeatureSetEditionDefault { fixedFeatures?: FeatureSet; } export interface FeatureSetDefaults_FeatureSetEditionDefaultProtoMsg { - typeUrl: "/google.protobuf.FeatureSetEditionDefault"; + typeUrl: '/google.protobuf.FeatureSetEditionDefault'; value: Uint8Array; } /** @@ -2609,7 +2609,7 @@ export interface FeatureSetDefaults_FeatureSetEditionDefaultAmino { fixed_features?: FeatureSetAmino; } export interface FeatureSetDefaults_FeatureSetEditionDefaultAminoMsg { - type: "/google.protobuf.FeatureSetEditionDefault"; + type: '/google.protobuf.FeatureSetEditionDefault'; value: FeatureSetDefaults_FeatureSetEditionDefaultAmino; } /** @@ -2665,7 +2665,7 @@ export interface SourceCodeInfo { location: SourceCodeInfo_Location[]; } export interface SourceCodeInfoProtoMsg { - typeUrl: "/google.protobuf.SourceCodeInfo"; + typeUrl: '/google.protobuf.SourceCodeInfo'; value: Uint8Array; } /** @@ -2721,7 +2721,7 @@ export interface SourceCodeInfoAmino { location: SourceCodeInfo_LocationAmino[]; } export interface SourceCodeInfoAminoMsg { - type: "/google.protobuf.SourceCodeInfo"; + type: '/google.protobuf.SourceCodeInfo'; value: SourceCodeInfoAmino; } export interface SourceCodeInfo_Location { @@ -2813,7 +2813,7 @@ export interface SourceCodeInfo_Location { leadingDetachedComments: string[]; } export interface SourceCodeInfo_LocationProtoMsg { - typeUrl: "/google.protobuf.Location"; + typeUrl: '/google.protobuf.Location'; value: Uint8Array; } export interface SourceCodeInfo_LocationAmino { @@ -2905,7 +2905,7 @@ export interface SourceCodeInfo_LocationAmino { leading_detached_comments: string[]; } export interface SourceCodeInfo_LocationAminoMsg { - type: "/google.protobuf.Location"; + type: '/google.protobuf.Location'; value: SourceCodeInfo_LocationAmino; } /** @@ -2921,7 +2921,7 @@ export interface GeneratedCodeInfo { annotation: GeneratedCodeInfo_Annotation[]; } export interface GeneratedCodeInfoProtoMsg { - typeUrl: "/google.protobuf.GeneratedCodeInfo"; + typeUrl: '/google.protobuf.GeneratedCodeInfo'; value: Uint8Array; } /** @@ -2937,7 +2937,7 @@ export interface GeneratedCodeInfoAmino { annotation: GeneratedCodeInfo_AnnotationAmino[]; } export interface GeneratedCodeInfoAminoMsg { - type: "/google.protobuf.GeneratedCodeInfo"; + type: '/google.protobuf.GeneratedCodeInfo'; value: GeneratedCodeInfoAmino; } export interface GeneratedCodeInfo_Annotation { @@ -2962,7 +2962,7 @@ export interface GeneratedCodeInfo_Annotation { semantic: GeneratedCodeInfo_Annotation_Semantic; } export interface GeneratedCodeInfo_AnnotationProtoMsg { - typeUrl: "/google.protobuf.Annotation"; + typeUrl: '/google.protobuf.Annotation'; value: Uint8Array; } export interface GeneratedCodeInfo_AnnotationAmino { @@ -2987,7 +2987,7 @@ export interface GeneratedCodeInfo_AnnotationAmino { semantic: GeneratedCodeInfo_Annotation_Semantic; } export interface GeneratedCodeInfo_AnnotationAminoMsg { - type: "/google.protobuf.Annotation"; + type: '/google.protobuf.Annotation'; value: GeneratedCodeInfo_AnnotationAmino; } function createBaseFileDescriptorSet(): FileDescriptorSet { @@ -2996,7 +2996,7 @@ function createBaseFileDescriptorSet(): FileDescriptorSet { }; } export const FileDescriptorSet = { - typeUrl: "/google.protobuf.FileDescriptorSet", + typeUrl: '/google.protobuf.FileDescriptorSet', is(o: any): o is FileDescriptorSet { return o && (o.$typeUrl === FileDescriptorSet.typeUrl || Array.isArray(o.file) && (!o.file.length || FileDescriptorProto.is(o.file[0]))); }, @@ -3016,12 +3016,12 @@ export const FileDescriptorSet = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3056,7 +3056,7 @@ export const FileDescriptorSet = { }, toProtoMsg(message: FileDescriptorSet): FileDescriptorSetProtoMsg { return { - typeUrl: "/google.protobuf.FileDescriptorSet", + typeUrl: '/google.protobuf.FileDescriptorSet', value: FileDescriptorSet.encode(message).finish() }; } @@ -3064,8 +3064,8 @@ export const FileDescriptorSet = { GlobalDecoderRegistry.register(FileDescriptorSet.typeUrl, FileDescriptorSet); function createBaseFileDescriptorProto(): FileDescriptorProto { return { - name: "", - package: "", + name: '', + package: '', dependency: [], publicDependency: [], weakDependency: [], @@ -3075,23 +3075,23 @@ function createBaseFileDescriptorProto(): FileDescriptorProto { extension: [], options: undefined, sourceCodeInfo: undefined, - syntax: "", + syntax: '', edition: 1 }; } export const FileDescriptorProto = { - typeUrl: "/google.protobuf.FileDescriptorProto", + typeUrl: '/google.protobuf.FileDescriptorProto', is(o: any): o is FileDescriptorProto { - return o && (o.$typeUrl === FileDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.package === "string" && Array.isArray(o.dependency) && (!o.dependency.length || typeof o.dependency[0] === "string") && Array.isArray(o.publicDependency) && (!o.publicDependency.length || typeof o.publicDependency[0] === "number") && Array.isArray(o.weakDependency) && (!o.weakDependency.length || typeof o.weakDependency[0] === "number") && Array.isArray(o.messageType) && (!o.messageType.length || DescriptorProto.is(o.messageType[0])) && Array.isArray(o.enumType) && (!o.enumType.length || EnumDescriptorProto.is(o.enumType[0])) && Array.isArray(o.service) && (!o.service.length || ServiceDescriptorProto.is(o.service[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.is(o.extension[0])) && typeof o.syntax === "string" && isSet(o.edition)); + return o && (o.$typeUrl === FileDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.package === 'string' && Array.isArray(o.dependency) && (!o.dependency.length || typeof o.dependency[0] === 'string') && Array.isArray(o.publicDependency) && (!o.publicDependency.length || typeof o.publicDependency[0] === 'number') && Array.isArray(o.weakDependency) && (!o.weakDependency.length || typeof o.weakDependency[0] === 'number') && Array.isArray(o.messageType) && (!o.messageType.length || DescriptorProto.is(o.messageType[0])) && Array.isArray(o.enumType) && (!o.enumType.length || EnumDescriptorProto.is(o.enumType[0])) && Array.isArray(o.service) && (!o.service.length || ServiceDescriptorProto.is(o.service[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.is(o.extension[0])) && typeof o.syntax === 'string' && isSet(o.edition)); }, isAmino(o: any): o is FileDescriptorProtoAmino { - return o && (o.$typeUrl === FileDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.package === "string" && Array.isArray(o.dependency) && (!o.dependency.length || typeof o.dependency[0] === "string") && Array.isArray(o.public_dependency) && (!o.public_dependency.length || typeof o.public_dependency[0] === "number") && Array.isArray(o.weak_dependency) && (!o.weak_dependency.length || typeof o.weak_dependency[0] === "number") && Array.isArray(o.message_type) && (!o.message_type.length || DescriptorProto.isAmino(o.message_type[0])) && Array.isArray(o.enum_type) && (!o.enum_type.length || EnumDescriptorProto.isAmino(o.enum_type[0])) && Array.isArray(o.service) && (!o.service.length || ServiceDescriptorProto.isAmino(o.service[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.isAmino(o.extension[0])) && typeof o.syntax === "string" && isSet(o.edition)); + return o && (o.$typeUrl === FileDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.package === 'string' && Array.isArray(o.dependency) && (!o.dependency.length || typeof o.dependency[0] === 'string') && Array.isArray(o.public_dependency) && (!o.public_dependency.length || typeof o.public_dependency[0] === 'number') && Array.isArray(o.weak_dependency) && (!o.weak_dependency.length || typeof o.weak_dependency[0] === 'number') && Array.isArray(o.message_type) && (!o.message_type.length || DescriptorProto.isAmino(o.message_type[0])) && Array.isArray(o.enum_type) && (!o.enum_type.length || EnumDescriptorProto.isAmino(o.enum_type[0])) && Array.isArray(o.service) && (!o.service.length || ServiceDescriptorProto.isAmino(o.service[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.isAmino(o.extension[0])) && typeof o.syntax === 'string' && isSet(o.edition)); }, encode(message: FileDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } - if (message.package !== "") { + if (message.package !== '') { writer.uint32(18).string(message.package); } for (const v of message.dependency) { @@ -3125,7 +3125,7 @@ export const FileDescriptorProto = { if (message.sourceCodeInfo !== undefined) { SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); } - if (message.syntax !== "") { + if (message.syntax !== '') { writer.uint32(98).string(message.syntax); } if (message.edition !== 1) { @@ -3140,70 +3140,70 @@ export const FileDescriptorProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { + case 1: + message.name = reader.string(); + break; + case 2: + message.package = reader.string(); + break; + case 3: + message.dependency.push(reader.string()); + break; + case 10: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.publicDependency.push(reader.int32()); } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { + } else { + message.publicDependency.push(reader.int32()); + } + break; + case 11: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.weakDependency.push(reader.int32()); } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - case 14: - message.edition = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.weakDependency.push(reader.int32()); + } + break; + case 4: + message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + case 14: + message.edition = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): FileDescriptorProto { const message = createBaseFileDescriptorProto(); - message.name = object.name ?? ""; - message.package = object.package ?? ""; + message.name = object.name ?? ''; + message.package = object.package ?? ''; message.dependency = object.dependency?.map(e => e) || []; message.publicDependency = object.publicDependency?.map(e => e) || []; message.weakDependency = object.weakDependency?.map(e => e) || []; @@ -3213,7 +3213,7 @@ export const FileDescriptorProto = { message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; message.options = object.options !== undefined && object.options !== null ? FileOptions.fromPartial(object.options) : undefined; message.sourceCodeInfo = object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) : undefined; - message.syntax = object.syntax ?? ""; + message.syntax = object.syntax ?? ''; message.edition = object.edition ?? 1; return message; }, @@ -3248,8 +3248,8 @@ export const FileDescriptorProto = { }, toAmino(message: FileDescriptorProto): FileDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; - obj.package = message.package === "" ? undefined : message.package; + obj.name = message.name === '' ? undefined : message.name; + obj.package = message.package === '' ? undefined : message.package; if (message.dependency) { obj.dependency = message.dependency.map(e => e); } else { @@ -3287,7 +3287,7 @@ export const FileDescriptorProto = { } obj.options = message.options ? FileOptions.toAmino(message.options) : undefined; obj.source_code_info = message.sourceCodeInfo ? SourceCodeInfo.toAmino(message.sourceCodeInfo) : undefined; - obj.syntax = message.syntax === "" ? undefined : message.syntax; + obj.syntax = message.syntax === '' ? undefined : message.syntax; obj.edition = message.edition === 1 ? undefined : message.edition; return obj; }, @@ -3302,7 +3302,7 @@ export const FileDescriptorProto = { }, toProtoMsg(message: FileDescriptorProto): FileDescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.FileDescriptorProto", + typeUrl: '/google.protobuf.FileDescriptorProto', value: FileDescriptorProto.encode(message).finish() }; } @@ -3310,7 +3310,7 @@ export const FileDescriptorProto = { GlobalDecoderRegistry.register(FileDescriptorProto.typeUrl, FileDescriptorProto); function createBaseDescriptorProto(): DescriptorProto { return { - name: "", + name: '', field: [], extension: [], nestedType: [], @@ -3323,15 +3323,15 @@ function createBaseDescriptorProto(): DescriptorProto { }; } export const DescriptorProto = { - typeUrl: "/google.protobuf.DescriptorProto", + typeUrl: '/google.protobuf.DescriptorProto', is(o: any): o is DescriptorProto { - return o && (o.$typeUrl === DescriptorProto.typeUrl || typeof o.name === "string" && Array.isArray(o.field) && (!o.field.length || FieldDescriptorProto.is(o.field[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.is(o.extension[0])) && Array.isArray(o.nestedType) && (!o.nestedType.length || DescriptorProto.is(o.nestedType[0])) && Array.isArray(o.enumType) && (!o.enumType.length || EnumDescriptorProto.is(o.enumType[0])) && Array.isArray(o.extensionRange) && (!o.extensionRange.length || DescriptorProto_ExtensionRange.is(o.extensionRange[0])) && Array.isArray(o.oneofDecl) && (!o.oneofDecl.length || OneofDescriptorProto.is(o.oneofDecl[0])) && Array.isArray(o.reservedRange) && (!o.reservedRange.length || DescriptorProto_ReservedRange.is(o.reservedRange[0])) && Array.isArray(o.reservedName) && (!o.reservedName.length || typeof o.reservedName[0] === "string")); + return o && (o.$typeUrl === DescriptorProto.typeUrl || typeof o.name === 'string' && Array.isArray(o.field) && (!o.field.length || FieldDescriptorProto.is(o.field[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.is(o.extension[0])) && Array.isArray(o.nestedType) && (!o.nestedType.length || DescriptorProto.is(o.nestedType[0])) && Array.isArray(o.enumType) && (!o.enumType.length || EnumDescriptorProto.is(o.enumType[0])) && Array.isArray(o.extensionRange) && (!o.extensionRange.length || DescriptorProto_ExtensionRange.is(o.extensionRange[0])) && Array.isArray(o.oneofDecl) && (!o.oneofDecl.length || OneofDescriptorProto.is(o.oneofDecl[0])) && Array.isArray(o.reservedRange) && (!o.reservedRange.length || DescriptorProto_ReservedRange.is(o.reservedRange[0])) && Array.isArray(o.reservedName) && (!o.reservedName.length || typeof o.reservedName[0] === 'string')); }, isAmino(o: any): o is DescriptorProtoAmino { - return o && (o.$typeUrl === DescriptorProto.typeUrl || typeof o.name === "string" && Array.isArray(o.field) && (!o.field.length || FieldDescriptorProto.isAmino(o.field[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.isAmino(o.extension[0])) && Array.isArray(o.nested_type) && (!o.nested_type.length || DescriptorProto.isAmino(o.nested_type[0])) && Array.isArray(o.enum_type) && (!o.enum_type.length || EnumDescriptorProto.isAmino(o.enum_type[0])) && Array.isArray(o.extension_range) && (!o.extension_range.length || DescriptorProto_ExtensionRange.isAmino(o.extension_range[0])) && Array.isArray(o.oneof_decl) && (!o.oneof_decl.length || OneofDescriptorProto.isAmino(o.oneof_decl[0])) && Array.isArray(o.reserved_range) && (!o.reserved_range.length || DescriptorProto_ReservedRange.isAmino(o.reserved_range[0])) && Array.isArray(o.reserved_name) && (!o.reserved_name.length || typeof o.reserved_name[0] === "string")); + return o && (o.$typeUrl === DescriptorProto.typeUrl || typeof o.name === 'string' && Array.isArray(o.field) && (!o.field.length || FieldDescriptorProto.isAmino(o.field[0])) && Array.isArray(o.extension) && (!o.extension.length || FieldDescriptorProto.isAmino(o.extension[0])) && Array.isArray(o.nested_type) && (!o.nested_type.length || DescriptorProto.isAmino(o.nested_type[0])) && Array.isArray(o.enum_type) && (!o.enum_type.length || EnumDescriptorProto.isAmino(o.enum_type[0])) && Array.isArray(o.extension_range) && (!o.extension_range.length || DescriptorProto_ExtensionRange.isAmino(o.extension_range[0])) && Array.isArray(o.oneof_decl) && (!o.oneof_decl.length || OneofDescriptorProto.isAmino(o.oneof_decl[0])) && Array.isArray(o.reserved_range) && (!o.reserved_range.length || DescriptorProto_ReservedRange.isAmino(o.reserved_range[0])) && Array.isArray(o.reserved_name) && (!o.reserved_name.length || typeof o.reserved_name[0] === 'string')); }, encode(message: DescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } for (const v of message.field) { @@ -3370,46 +3370,46 @@ export const DescriptorProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): DescriptorProto { const message = createBaseDescriptorProto(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.field = object.field?.map(e => FieldDescriptorProto.fromPartial(e)) || []; message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; message.nestedType = object.nestedType?.map(e => DescriptorProto.fromPartial(e)) || []; @@ -3441,7 +3441,7 @@ export const DescriptorProto = { }, toAmino(message: DescriptorProto): DescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; if (message.field) { obj.field = message.field.map(e => e ? FieldDescriptorProto.toAmino(e) : undefined); } else { @@ -3496,7 +3496,7 @@ export const DescriptorProto = { }, toProtoMsg(message: DescriptorProto): DescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.DescriptorProto", + typeUrl: '/google.protobuf.DescriptorProto', value: DescriptorProto.encode(message).finish() }; } @@ -3510,12 +3510,12 @@ function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRa }; } export const DescriptorProto_ExtensionRange = { - typeUrl: "/google.protobuf.ExtensionRange", + typeUrl: '/google.protobuf.ExtensionRange', is(o: any): o is DescriptorProto_ExtensionRange { - return o && (o.$typeUrl === DescriptorProto_ExtensionRange.typeUrl || typeof o.start === "number" && typeof o.end === "number"); + return o && (o.$typeUrl === DescriptorProto_ExtensionRange.typeUrl || typeof o.start === 'number' && typeof o.end === 'number'); }, isAmino(o: any): o is DescriptorProto_ExtensionRangeAmino { - return o && (o.$typeUrl === DescriptorProto_ExtensionRange.typeUrl || typeof o.start === "number" && typeof o.end === "number"); + return o && (o.$typeUrl === DescriptorProto_ExtensionRange.typeUrl || typeof o.start === 'number' && typeof o.end === 'number'); }, encode(message: DescriptorProto_ExtensionRange, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.start !== 0) { @@ -3536,18 +3536,18 @@ export const DescriptorProto_ExtensionRange = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3590,7 +3590,7 @@ export const DescriptorProto_ExtensionRange = { }, toProtoMsg(message: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRangeProtoMsg { return { - typeUrl: "/google.protobuf.ExtensionRange", + typeUrl: '/google.protobuf.ExtensionRange', value: DescriptorProto_ExtensionRange.encode(message).finish() }; } @@ -3603,12 +3603,12 @@ function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRang }; } export const DescriptorProto_ReservedRange = { - typeUrl: "/google.protobuf.ReservedRange", + typeUrl: '/google.protobuf.ReservedRange', is(o: any): o is DescriptorProto_ReservedRange { - return o && (o.$typeUrl === DescriptorProto_ReservedRange.typeUrl || typeof o.start === "number" && typeof o.end === "number"); + return o && (o.$typeUrl === DescriptorProto_ReservedRange.typeUrl || typeof o.start === 'number' && typeof o.end === 'number'); }, isAmino(o: any): o is DescriptorProto_ReservedRangeAmino { - return o && (o.$typeUrl === DescriptorProto_ReservedRange.typeUrl || typeof o.start === "number" && typeof o.end === "number"); + return o && (o.$typeUrl === DescriptorProto_ReservedRange.typeUrl || typeof o.start === 'number' && typeof o.end === 'number'); }, encode(message: DescriptorProto_ReservedRange, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.start !== 0) { @@ -3626,15 +3626,15 @@ export const DescriptorProto_ReservedRange = { while (reader.pos < end) { const 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; + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3672,7 +3672,7 @@ export const DescriptorProto_ReservedRange = { }, toProtoMsg(message: DescriptorProto_ReservedRange): DescriptorProto_ReservedRangeProtoMsg { return { - typeUrl: "/google.protobuf.ReservedRange", + typeUrl: '/google.protobuf.ReservedRange', value: DescriptorProto_ReservedRange.encode(message).finish() }; } @@ -3687,7 +3687,7 @@ function createBaseExtensionRangeOptions(): ExtensionRangeOptions { }; } export const ExtensionRangeOptions = { - typeUrl: "/google.protobuf.ExtensionRangeOptions", + typeUrl: '/google.protobuf.ExtensionRangeOptions', is(o: any): o is ExtensionRangeOptions { return o && (o.$typeUrl === ExtensionRangeOptions.typeUrl || Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0])) && Array.isArray(o.declaration) && (!o.declaration.length || ExtensionRangeOptions_Declaration.is(o.declaration[0])) && isSet(o.verification)); }, @@ -3716,21 +3716,21 @@ export const ExtensionRangeOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - case 2: - message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32())); - break; - case 50: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 3: - message.verification = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + case 2: + message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32())); + break; + case 50: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 3: + message.verification = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3782,7 +3782,7 @@ export const ExtensionRangeOptions = { }, toProtoMsg(message: ExtensionRangeOptions): ExtensionRangeOptionsProtoMsg { return { - typeUrl: "/google.protobuf.ExtensionRangeOptions", + typeUrl: '/google.protobuf.ExtensionRangeOptions', value: ExtensionRangeOptions.encode(message).finish() }; } @@ -3791,28 +3791,28 @@ GlobalDecoderRegistry.register(ExtensionRangeOptions.typeUrl, ExtensionRangeOpti function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration { return { number: 0, - fullName: "", - type: "", + fullName: '', + type: '', reserved: false, repeated: false }; } export const ExtensionRangeOptions_Declaration = { - typeUrl: "/google.protobuf.Declaration", + typeUrl: '/google.protobuf.Declaration', is(o: any): o is ExtensionRangeOptions_Declaration { - return o && (o.$typeUrl === ExtensionRangeOptions_Declaration.typeUrl || typeof o.number === "number" && typeof o.fullName === "string" && typeof o.type === "string" && typeof o.reserved === "boolean" && typeof o.repeated === "boolean"); + return o && (o.$typeUrl === ExtensionRangeOptions_Declaration.typeUrl || typeof o.number === 'number' && typeof o.fullName === 'string' && typeof o.type === 'string' && typeof o.reserved === 'boolean' && typeof o.repeated === 'boolean'); }, isAmino(o: any): o is ExtensionRangeOptions_DeclarationAmino { - return o && (o.$typeUrl === ExtensionRangeOptions_Declaration.typeUrl || typeof o.number === "number" && typeof o.full_name === "string" && typeof o.type === "string" && typeof o.reserved === "boolean" && typeof o.repeated === "boolean"); + return o && (o.$typeUrl === ExtensionRangeOptions_Declaration.typeUrl || typeof o.number === 'number' && typeof o.full_name === 'string' && typeof o.type === 'string' && typeof o.reserved === 'boolean' && typeof o.repeated === 'boolean'); }, encode(message: ExtensionRangeOptions_Declaration, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.number !== 0) { writer.uint32(8).int32(message.number); } - if (message.fullName !== "") { + if (message.fullName !== '') { writer.uint32(18).string(message.fullName); } - if (message.type !== "") { + if (message.type !== '') { writer.uint32(26).string(message.type); } if (message.reserved === true) { @@ -3830,24 +3830,24 @@ export const ExtensionRangeOptions_Declaration = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.number = reader.int32(); - break; - case 2: - message.fullName = reader.string(); - break; - case 3: - message.type = reader.string(); - break; - case 5: - message.reserved = reader.bool(); - break; - case 6: - message.repeated = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.number = reader.int32(); + break; + case 2: + message.fullName = reader.string(); + break; + case 3: + message.type = reader.string(); + break; + case 5: + message.reserved = reader.bool(); + break; + case 6: + message.repeated = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3855,8 +3855,8 @@ export const ExtensionRangeOptions_Declaration = { fromPartial(object: DeepPartial): ExtensionRangeOptions_Declaration { const message = createBaseExtensionRangeOptions_Declaration(); message.number = object.number ?? 0; - message.fullName = object.fullName ?? ""; - message.type = object.type ?? ""; + message.fullName = object.fullName ?? ''; + message.type = object.type ?? ''; message.reserved = object.reserved ?? false; message.repeated = object.repeated ?? false; return message; @@ -3883,8 +3883,8 @@ export const ExtensionRangeOptions_Declaration = { toAmino(message: ExtensionRangeOptions_Declaration): ExtensionRangeOptions_DeclarationAmino { const obj: any = {}; obj.number = message.number === 0 ? undefined : message.number; - obj.full_name = message.fullName === "" ? undefined : message.fullName; - obj.type = message.type === "" ? undefined : message.type; + obj.full_name = message.fullName === '' ? undefined : message.fullName; + obj.type = message.type === '' ? undefined : message.type; obj.reserved = message.reserved === false ? undefined : message.reserved; obj.repeated = message.repeated === false ? undefined : message.repeated; return obj; @@ -3900,7 +3900,7 @@ export const ExtensionRangeOptions_Declaration = { }, toProtoMsg(message: ExtensionRangeOptions_Declaration): ExtensionRangeOptions_DeclarationProtoMsg { return { - typeUrl: "/google.protobuf.Declaration", + typeUrl: '/google.protobuf.Declaration', value: ExtensionRangeOptions_Declaration.encode(message).finish() }; } @@ -3908,29 +3908,29 @@ export const ExtensionRangeOptions_Declaration = { GlobalDecoderRegistry.register(ExtensionRangeOptions_Declaration.typeUrl, ExtensionRangeOptions_Declaration); function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { - name: "", + name: '', number: 0, label: 1, type: 1, - typeName: "", - extendee: "", - defaultValue: "", + typeName: '', + extendee: '', + defaultValue: '', oneofIndex: 0, - jsonName: "", + jsonName: '', options: undefined, proto3Optional: false }; } export const FieldDescriptorProto = { - typeUrl: "/google.protobuf.FieldDescriptorProto", + typeUrl: '/google.protobuf.FieldDescriptorProto', is(o: any): o is FieldDescriptorProto { - return o && (o.$typeUrl === FieldDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.number === "number" && isSet(o.label) && isSet(o.type) && typeof o.typeName === "string" && typeof o.extendee === "string" && typeof o.defaultValue === "string" && typeof o.oneofIndex === "number" && typeof o.jsonName === "string" && typeof o.proto3Optional === "boolean"); + return o && (o.$typeUrl === FieldDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.number === 'number' && isSet(o.label) && isSet(o.type) && typeof o.typeName === 'string' && typeof o.extendee === 'string' && typeof o.defaultValue === 'string' && typeof o.oneofIndex === 'number' && typeof o.jsonName === 'string' && typeof o.proto3Optional === 'boolean'); }, isAmino(o: any): o is FieldDescriptorProtoAmino { - return o && (o.$typeUrl === FieldDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.number === "number" && isSet(o.label) && isSet(o.type) && typeof o.type_name === "string" && typeof o.extendee === "string" && typeof o.default_value === "string" && typeof o.oneof_index === "number" && typeof o.json_name === "string" && typeof o.proto3_optional === "boolean"); + return o && (o.$typeUrl === FieldDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.number === 'number' && isSet(o.label) && isSet(o.type) && typeof o.type_name === 'string' && typeof o.extendee === 'string' && typeof o.default_value === 'string' && typeof o.oneof_index === 'number' && typeof o.json_name === 'string' && typeof o.proto3_optional === 'boolean'); }, encode(message: FieldDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } if (message.number !== 0) { @@ -3942,19 +3942,19 @@ export const FieldDescriptorProto = { if (message.type !== 1) { writer.uint32(40).int32(message.type); } - if (message.typeName !== "") { + if (message.typeName !== '') { writer.uint32(50).string(message.typeName); } - if (message.extendee !== "") { + if (message.extendee !== '') { writer.uint32(18).string(message.extendee); } - if (message.defaultValue !== "") { + if (message.defaultValue !== '') { writer.uint32(58).string(message.defaultValue); } if (message.oneofIndex !== 0) { writer.uint32(72).int32(message.oneofIndex); } - if (message.jsonName !== "") { + if (message.jsonName !== '') { writer.uint32(82).string(message.jsonName); } if (message.options !== undefined) { @@ -3972,57 +3972,57 @@ export const FieldDescriptorProto = { while (reader.pos < end) { const 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() as any); - break; - case 5: - message.type = (reader.int32() as any); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = (reader.int32() as any); + break; + case 5: + message.type = (reader.int32() as any); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): FieldDescriptorProto { const message = createBaseFieldDescriptorProto(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.number = object.number ?? 0; message.label = object.label ?? 1; message.type = object.type ?? 1; - message.typeName = object.typeName ?? ""; - message.extendee = object.extendee ?? ""; - message.defaultValue = object.defaultValue ?? ""; + message.typeName = object.typeName ?? ''; + message.extendee = object.extendee ?? ''; + message.defaultValue = object.defaultValue ?? ''; message.oneofIndex = object.oneofIndex ?? 0; - message.jsonName = object.jsonName ?? ""; + message.jsonName = object.jsonName ?? ''; message.options = object.options !== undefined && object.options !== null ? FieldOptions.fromPartial(object.options) : undefined; message.proto3Optional = object.proto3Optional ?? false; return message; @@ -4066,15 +4066,15 @@ export const FieldDescriptorProto = { }, toAmino(message: FieldDescriptorProto): FieldDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; obj.number = message.number === 0 ? undefined : message.number; obj.label = message.label === 1 ? undefined : message.label; obj.type = message.type === 1 ? undefined : message.type; - obj.type_name = message.typeName === "" ? undefined : message.typeName; - obj.extendee = message.extendee === "" ? undefined : message.extendee; - obj.default_value = message.defaultValue === "" ? undefined : message.defaultValue; + obj.type_name = message.typeName === '' ? undefined : message.typeName; + obj.extendee = message.extendee === '' ? undefined : message.extendee; + obj.default_value = message.defaultValue === '' ? undefined : message.defaultValue; obj.oneof_index = message.oneofIndex === 0 ? undefined : message.oneofIndex; - obj.json_name = message.jsonName === "" ? undefined : message.jsonName; + obj.json_name = message.jsonName === '' ? undefined : message.jsonName; obj.options = message.options ? FieldOptions.toAmino(message.options) : undefined; obj.proto3_optional = message.proto3Optional === false ? undefined : message.proto3Optional; return obj; @@ -4090,7 +4090,7 @@ export const FieldDescriptorProto = { }, toProtoMsg(message: FieldDescriptorProto): FieldDescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.FieldDescriptorProto", + typeUrl: '/google.protobuf.FieldDescriptorProto', value: FieldDescriptorProto.encode(message).finish() }; } @@ -4098,20 +4098,20 @@ export const FieldDescriptorProto = { GlobalDecoderRegistry.register(FieldDescriptorProto.typeUrl, FieldDescriptorProto); function createBaseOneofDescriptorProto(): OneofDescriptorProto { return { - name: "", + name: '', options: undefined }; } export const OneofDescriptorProto = { - typeUrl: "/google.protobuf.OneofDescriptorProto", + typeUrl: '/google.protobuf.OneofDescriptorProto', is(o: any): o is OneofDescriptorProto { - return o && (o.$typeUrl === OneofDescriptorProto.typeUrl || typeof o.name === "string"); + return o && (o.$typeUrl === OneofDescriptorProto.typeUrl || typeof o.name === 'string'); }, isAmino(o: any): o is OneofDescriptorProtoAmino { - return o && (o.$typeUrl === OneofDescriptorProto.typeUrl || typeof o.name === "string"); + return o && (o.$typeUrl === OneofDescriptorProto.typeUrl || typeof o.name === 'string'); }, encode(message: OneofDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } if (message.options !== undefined) { @@ -4126,22 +4126,22 @@ export const OneofDescriptorProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.options = OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): OneofDescriptorProto { const message = createBaseOneofDescriptorProto(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.options = object.options !== undefined && object.options !== null ? OneofOptions.fromPartial(object.options) : undefined; return message; }, @@ -4157,7 +4157,7 @@ export const OneofDescriptorProto = { }, toAmino(message: OneofDescriptorProto): OneofDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; obj.options = message.options ? OneofOptions.toAmino(message.options) : undefined; return obj; }, @@ -4172,7 +4172,7 @@ export const OneofDescriptorProto = { }, toProtoMsg(message: OneofDescriptorProto): OneofDescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.OneofDescriptorProto", + typeUrl: '/google.protobuf.OneofDescriptorProto', value: OneofDescriptorProto.encode(message).finish() }; } @@ -4180,7 +4180,7 @@ export const OneofDescriptorProto = { GlobalDecoderRegistry.register(OneofDescriptorProto.typeUrl, OneofDescriptorProto); function createBaseEnumDescriptorProto(): EnumDescriptorProto { return { - name: "", + name: '', value: [], options: undefined, reservedRange: [], @@ -4188,15 +4188,15 @@ function createBaseEnumDescriptorProto(): EnumDescriptorProto { }; } export const EnumDescriptorProto = { - typeUrl: "/google.protobuf.EnumDescriptorProto", + typeUrl: '/google.protobuf.EnumDescriptorProto', is(o: any): o is EnumDescriptorProto { - return o && (o.$typeUrl === EnumDescriptorProto.typeUrl || typeof o.name === "string" && Array.isArray(o.value) && (!o.value.length || EnumValueDescriptorProto.is(o.value[0])) && Array.isArray(o.reservedRange) && (!o.reservedRange.length || EnumDescriptorProto_EnumReservedRange.is(o.reservedRange[0])) && Array.isArray(o.reservedName) && (!o.reservedName.length || typeof o.reservedName[0] === "string")); + return o && (o.$typeUrl === EnumDescriptorProto.typeUrl || typeof o.name === 'string' && Array.isArray(o.value) && (!o.value.length || EnumValueDescriptorProto.is(o.value[0])) && Array.isArray(o.reservedRange) && (!o.reservedRange.length || EnumDescriptorProto_EnumReservedRange.is(o.reservedRange[0])) && Array.isArray(o.reservedName) && (!o.reservedName.length || typeof o.reservedName[0] === 'string')); }, isAmino(o: any): o is EnumDescriptorProtoAmino { - return o && (o.$typeUrl === EnumDescriptorProto.typeUrl || typeof o.name === "string" && Array.isArray(o.value) && (!o.value.length || EnumValueDescriptorProto.isAmino(o.value[0])) && Array.isArray(o.reserved_range) && (!o.reserved_range.length || EnumDescriptorProto_EnumReservedRange.isAmino(o.reserved_range[0])) && Array.isArray(o.reserved_name) && (!o.reserved_name.length || typeof o.reserved_name[0] === "string")); + return o && (o.$typeUrl === EnumDescriptorProto.typeUrl || typeof o.name === 'string' && Array.isArray(o.value) && (!o.value.length || EnumValueDescriptorProto.isAmino(o.value[0])) && Array.isArray(o.reserved_range) && (!o.reserved_range.length || EnumDescriptorProto_EnumReservedRange.isAmino(o.reserved_range[0])) && Array.isArray(o.reserved_name) && (!o.reserved_name.length || typeof o.reserved_name[0] === 'string')); }, encode(message: EnumDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } for (const v of message.value) { @@ -4220,31 +4220,31 @@ export const EnumDescriptorProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): EnumDescriptorProto { const message = createBaseEnumDescriptorProto(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.value = object.value?.map(e => EnumValueDescriptorProto.fromPartial(e)) || []; message.options = object.options !== undefined && object.options !== null ? EnumOptions.fromPartial(object.options) : undefined; message.reservedRange = object.reservedRange?.map(e => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || []; @@ -4266,7 +4266,7 @@ export const EnumDescriptorProto = { }, toAmino(message: EnumDescriptorProto): EnumDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; if (message.value) { obj.value = message.value.map(e => e ? EnumValueDescriptorProto.toAmino(e) : undefined); } else { @@ -4296,7 +4296,7 @@ export const EnumDescriptorProto = { }, toProtoMsg(message: EnumDescriptorProto): EnumDescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.EnumDescriptorProto", + typeUrl: '/google.protobuf.EnumDescriptorProto', value: EnumDescriptorProto.encode(message).finish() }; } @@ -4309,12 +4309,12 @@ function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_ }; } export const EnumDescriptorProto_EnumReservedRange = { - typeUrl: "/google.protobuf.EnumReservedRange", + typeUrl: '/google.protobuf.EnumReservedRange', is(o: any): o is EnumDescriptorProto_EnumReservedRange { - return o && (o.$typeUrl === EnumDescriptorProto_EnumReservedRange.typeUrl || typeof o.start === "number" && typeof o.end === "number"); + return o && (o.$typeUrl === EnumDescriptorProto_EnumReservedRange.typeUrl || typeof o.start === 'number' && typeof o.end === 'number'); }, isAmino(o: any): o is EnumDescriptorProto_EnumReservedRangeAmino { - return o && (o.$typeUrl === EnumDescriptorProto_EnumReservedRange.typeUrl || typeof o.start === "number" && typeof o.end === "number"); + return o && (o.$typeUrl === EnumDescriptorProto_EnumReservedRange.typeUrl || typeof o.start === 'number' && typeof o.end === 'number'); }, encode(message: EnumDescriptorProto_EnumReservedRange, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.start !== 0) { @@ -4332,15 +4332,15 @@ export const EnumDescriptorProto_EnumReservedRange = { while (reader.pos < end) { const 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; + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4378,7 +4378,7 @@ export const EnumDescriptorProto_EnumReservedRange = { }, toProtoMsg(message: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRangeProtoMsg { return { - typeUrl: "/google.protobuf.EnumReservedRange", + typeUrl: '/google.protobuf.EnumReservedRange', value: EnumDescriptorProto_EnumReservedRange.encode(message).finish() }; } @@ -4386,21 +4386,21 @@ export const EnumDescriptorProto_EnumReservedRange = { GlobalDecoderRegistry.register(EnumDescriptorProto_EnumReservedRange.typeUrl, EnumDescriptorProto_EnumReservedRange); function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { return { - name: "", + name: '', number: 0, options: undefined }; } export const EnumValueDescriptorProto = { - typeUrl: "/google.protobuf.EnumValueDescriptorProto", + typeUrl: '/google.protobuf.EnumValueDescriptorProto', is(o: any): o is EnumValueDescriptorProto { - return o && (o.$typeUrl === EnumValueDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.number === "number"); + return o && (o.$typeUrl === EnumValueDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.number === 'number'); }, isAmino(o: any): o is EnumValueDescriptorProtoAmino { - return o && (o.$typeUrl === EnumValueDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.number === "number"); + return o && (o.$typeUrl === EnumValueDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.number === 'number'); }, encode(message: EnumValueDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } if (message.number !== 0) { @@ -4418,25 +4418,25 @@ export const EnumValueDescriptorProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): EnumValueDescriptorProto { const message = createBaseEnumValueDescriptorProto(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.number = object.number ?? 0; message.options = object.options !== undefined && object.options !== null ? EnumValueOptions.fromPartial(object.options) : undefined; return message; @@ -4456,7 +4456,7 @@ export const EnumValueDescriptorProto = { }, toAmino(message: EnumValueDescriptorProto): EnumValueDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; obj.number = message.number === 0 ? undefined : message.number; obj.options = message.options ? EnumValueOptions.toAmino(message.options) : undefined; return obj; @@ -4472,7 +4472,7 @@ export const EnumValueDescriptorProto = { }, toProtoMsg(message: EnumValueDescriptorProto): EnumValueDescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.EnumValueDescriptorProto", + typeUrl: '/google.protobuf.EnumValueDescriptorProto', value: EnumValueDescriptorProto.encode(message).finish() }; } @@ -4480,21 +4480,21 @@ export const EnumValueDescriptorProto = { GlobalDecoderRegistry.register(EnumValueDescriptorProto.typeUrl, EnumValueDescriptorProto); function createBaseServiceDescriptorProto(): ServiceDescriptorProto { return { - name: "", + name: '', method: [], options: undefined }; } export const ServiceDescriptorProto = { - typeUrl: "/google.protobuf.ServiceDescriptorProto", + typeUrl: '/google.protobuf.ServiceDescriptorProto', is(o: any): o is ServiceDescriptorProto { - return o && (o.$typeUrl === ServiceDescriptorProto.typeUrl || typeof o.name === "string" && Array.isArray(o.method) && (!o.method.length || MethodDescriptorProto.is(o.method[0]))); + return o && (o.$typeUrl === ServiceDescriptorProto.typeUrl || typeof o.name === 'string' && Array.isArray(o.method) && (!o.method.length || MethodDescriptorProto.is(o.method[0]))); }, isAmino(o: any): o is ServiceDescriptorProtoAmino { - return o && (o.$typeUrl === ServiceDescriptorProto.typeUrl || typeof o.name === "string" && Array.isArray(o.method) && (!o.method.length || MethodDescriptorProto.isAmino(o.method[0]))); + return o && (o.$typeUrl === ServiceDescriptorProto.typeUrl || typeof o.name === 'string' && Array.isArray(o.method) && (!o.method.length || MethodDescriptorProto.isAmino(o.method[0]))); }, encode(message: ServiceDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } for (const v of message.method) { @@ -4512,25 +4512,25 @@ export const ServiceDescriptorProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ServiceDescriptorProto { const message = createBaseServiceDescriptorProto(); - message.name = object.name ?? ""; + message.name = object.name ?? ''; message.method = object.method?.map(e => MethodDescriptorProto.fromPartial(e)) || []; message.options = object.options !== undefined && object.options !== null ? ServiceOptions.fromPartial(object.options) : undefined; return message; @@ -4548,7 +4548,7 @@ export const ServiceDescriptorProto = { }, toAmino(message: ServiceDescriptorProto): ServiceDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; + obj.name = message.name === '' ? undefined : message.name; if (message.method) { obj.method = message.method.map(e => e ? MethodDescriptorProto.toAmino(e) : undefined); } else { @@ -4568,7 +4568,7 @@ export const ServiceDescriptorProto = { }, toProtoMsg(message: ServiceDescriptorProto): ServiceDescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.ServiceDescriptorProto", + typeUrl: '/google.protobuf.ServiceDescriptorProto', value: ServiceDescriptorProto.encode(message).finish() }; } @@ -4576,30 +4576,30 @@ export const ServiceDescriptorProto = { GlobalDecoderRegistry.register(ServiceDescriptorProto.typeUrl, ServiceDescriptorProto); function createBaseMethodDescriptorProto(): MethodDescriptorProto { return { - name: "", - inputType: "", - outputType: "", + name: '', + inputType: '', + outputType: '', options: undefined, clientStreaming: false, serverStreaming: false }; } export const MethodDescriptorProto = { - typeUrl: "/google.protobuf.MethodDescriptorProto", + typeUrl: '/google.protobuf.MethodDescriptorProto', is(o: any): o is MethodDescriptorProto { - return o && (o.$typeUrl === MethodDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.inputType === "string" && typeof o.outputType === "string" && typeof o.clientStreaming === "boolean" && typeof o.serverStreaming === "boolean"); + return o && (o.$typeUrl === MethodDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.inputType === 'string' && typeof o.outputType === 'string' && typeof o.clientStreaming === 'boolean' && typeof o.serverStreaming === 'boolean'); }, isAmino(o: any): o is MethodDescriptorProtoAmino { - return o && (o.$typeUrl === MethodDescriptorProto.typeUrl || typeof o.name === "string" && typeof o.input_type === "string" && typeof o.output_type === "string" && typeof o.client_streaming === "boolean" && typeof o.server_streaming === "boolean"); + return o && (o.$typeUrl === MethodDescriptorProto.typeUrl || typeof o.name === 'string' && typeof o.input_type === 'string' && typeof o.output_type === 'string' && typeof o.client_streaming === 'boolean' && typeof o.server_streaming === 'boolean'); }, encode(message: MethodDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { + if (message.name !== '') { writer.uint32(10).string(message.name); } - if (message.inputType !== "") { + if (message.inputType !== '') { writer.uint32(18).string(message.inputType); } - if (message.outputType !== "") { + if (message.outputType !== '') { writer.uint32(26).string(message.outputType); } if (message.options !== undefined) { @@ -4620,36 +4620,36 @@ export const MethodDescriptorProto = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MethodDescriptorProto { const message = createBaseMethodDescriptorProto(); - message.name = object.name ?? ""; - message.inputType = object.inputType ?? ""; - message.outputType = object.outputType ?? ""; + message.name = object.name ?? ''; + message.inputType = object.inputType ?? ''; + message.outputType = object.outputType ?? ''; message.options = object.options !== undefined && object.options !== null ? MethodOptions.fromPartial(object.options) : undefined; message.clientStreaming = object.clientStreaming ?? false; message.serverStreaming = object.serverStreaming ?? false; @@ -4679,9 +4679,9 @@ export const MethodDescriptorProto = { }, toAmino(message: MethodDescriptorProto): MethodDescriptorProtoAmino { const obj: any = {}; - obj.name = message.name === "" ? undefined : message.name; - obj.input_type = message.inputType === "" ? undefined : message.inputType; - obj.output_type = message.outputType === "" ? undefined : message.outputType; + obj.name = message.name === '' ? undefined : message.name; + obj.input_type = message.inputType === '' ? undefined : message.inputType; + obj.output_type = message.outputType === '' ? undefined : message.outputType; obj.options = message.options ? MethodOptions.toAmino(message.options) : undefined; obj.client_streaming = message.clientStreaming === false ? undefined : message.clientStreaming; obj.server_streaming = message.serverStreaming === false ? undefined : message.serverStreaming; @@ -4698,7 +4698,7 @@ export const MethodDescriptorProto = { }, toProtoMsg(message: MethodDescriptorProto): MethodDescriptorProtoProtoMsg { return { - typeUrl: "/google.protobuf.MethodDescriptorProto", + typeUrl: '/google.protobuf.MethodDescriptorProto', value: MethodDescriptorProto.encode(message).finish() }; } @@ -4706,42 +4706,42 @@ export const MethodDescriptorProto = { GlobalDecoderRegistry.register(MethodDescriptorProto.typeUrl, MethodDescriptorProto); function createBaseFileOptions(): FileOptions { return { - javaPackage: "", - javaOuterClassname: "", + javaPackage: '', + javaOuterClassname: '', javaMultipleFiles: false, javaGenerateEqualsAndHash: false, javaStringCheckUtf8: false, optimizeFor: 1, - goPackage: "", + goPackage: '', ccGenericServices: false, javaGenericServices: false, pyGenericServices: false, deprecated: false, ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", + objcClassPrefix: '', + csharpNamespace: '', + swiftPrefix: '', + phpClassPrefix: '', + phpNamespace: '', + phpMetadataNamespace: '', + rubyPackage: '', features: undefined, uninterpretedOption: [] }; } export const FileOptions = { - typeUrl: "/google.protobuf.FileOptions", + typeUrl: '/google.protobuf.FileOptions', is(o: any): o is FileOptions { - return o && (o.$typeUrl === FileOptions.typeUrl || typeof o.javaPackage === "string" && typeof o.javaOuterClassname === "string" && typeof o.javaMultipleFiles === "boolean" && typeof o.javaGenerateEqualsAndHash === "boolean" && typeof o.javaStringCheckUtf8 === "boolean" && isSet(o.optimizeFor) && typeof o.goPackage === "string" && typeof o.ccGenericServices === "boolean" && typeof o.javaGenericServices === "boolean" && typeof o.pyGenericServices === "boolean" && typeof o.deprecated === "boolean" && typeof o.ccEnableArenas === "boolean" && typeof o.objcClassPrefix === "string" && typeof o.csharpNamespace === "string" && typeof o.swiftPrefix === "string" && typeof o.phpClassPrefix === "string" && typeof o.phpNamespace === "string" && typeof o.phpMetadataNamespace === "string" && typeof o.rubyPackage === "string" && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); + return o && (o.$typeUrl === FileOptions.typeUrl || typeof o.javaPackage === 'string' && typeof o.javaOuterClassname === 'string' && typeof o.javaMultipleFiles === 'boolean' && typeof o.javaGenerateEqualsAndHash === 'boolean' && typeof o.javaStringCheckUtf8 === 'boolean' && isSet(o.optimizeFor) && typeof o.goPackage === 'string' && typeof o.ccGenericServices === 'boolean' && typeof o.javaGenericServices === 'boolean' && typeof o.pyGenericServices === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.ccEnableArenas === 'boolean' && typeof o.objcClassPrefix === 'string' && typeof o.csharpNamespace === 'string' && typeof o.swiftPrefix === 'string' && typeof o.phpClassPrefix === 'string' && typeof o.phpNamespace === 'string' && typeof o.phpMetadataNamespace === 'string' && typeof o.rubyPackage === 'string' && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, isAmino(o: any): o is FileOptionsAmino { - return o && (o.$typeUrl === FileOptions.typeUrl || typeof o.java_package === "string" && typeof o.java_outer_classname === "string" && typeof o.java_multiple_files === "boolean" && typeof o.java_generate_equals_and_hash === "boolean" && typeof o.java_string_check_utf8 === "boolean" && isSet(o.optimize_for) && typeof o.go_package === "string" && typeof o.cc_generic_services === "boolean" && typeof o.java_generic_services === "boolean" && typeof o.py_generic_services === "boolean" && typeof o.deprecated === "boolean" && typeof o.cc_enable_arenas === "boolean" && typeof o.objc_class_prefix === "string" && typeof o.csharp_namespace === "string" && typeof o.swift_prefix === "string" && typeof o.php_class_prefix === "string" && typeof o.php_namespace === "string" && typeof o.php_metadata_namespace === "string" && typeof o.ruby_package === "string" && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); + return o && (o.$typeUrl === FileOptions.typeUrl || typeof o.java_package === 'string' && typeof o.java_outer_classname === 'string' && typeof o.java_multiple_files === 'boolean' && typeof o.java_generate_equals_and_hash === 'boolean' && typeof o.java_string_check_utf8 === 'boolean' && isSet(o.optimize_for) && typeof o.go_package === 'string' && typeof o.cc_generic_services === 'boolean' && typeof o.java_generic_services === 'boolean' && typeof o.py_generic_services === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.cc_enable_arenas === 'boolean' && typeof o.objc_class_prefix === 'string' && typeof o.csharp_namespace === 'string' && typeof o.swift_prefix === 'string' && typeof o.php_class_prefix === 'string' && typeof o.php_namespace === 'string' && typeof o.php_metadata_namespace === 'string' && typeof o.ruby_package === 'string' && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); }, encode(message: FileOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.javaPackage !== "") { + if (message.javaPackage !== '') { writer.uint32(10).string(message.javaPackage); } - if (message.javaOuterClassname !== "") { + if (message.javaOuterClassname !== '') { writer.uint32(66).string(message.javaOuterClassname); } if (message.javaMultipleFiles === true) { @@ -4756,7 +4756,7 @@ export const FileOptions = { if (message.optimizeFor !== 1) { writer.uint32(72).int32(message.optimizeFor); } - if (message.goPackage !== "") { + if (message.goPackage !== '') { writer.uint32(90).string(message.goPackage); } if (message.ccGenericServices === true) { @@ -4774,25 +4774,25 @@ export const FileOptions = { if (message.ccEnableArenas === true) { writer.uint32(248).bool(message.ccEnableArenas); } - if (message.objcClassPrefix !== "") { + if (message.objcClassPrefix !== '') { writer.uint32(290).string(message.objcClassPrefix); } - if (message.csharpNamespace !== "") { + if (message.csharpNamespace !== '') { writer.uint32(298).string(message.csharpNamespace); } - if (message.swiftPrefix !== "") { + if (message.swiftPrefix !== '') { writer.uint32(314).string(message.swiftPrefix); } - if (message.phpClassPrefix !== "") { + if (message.phpClassPrefix !== '') { writer.uint32(322).string(message.phpClassPrefix); } - if (message.phpNamespace !== "") { + if (message.phpNamespace !== '') { writer.uint32(330).string(message.phpNamespace); } - if (message.phpMetadataNamespace !== "") { + if (message.phpMetadataNamespace !== '') { writer.uint32(354).string(message.phpMetadataNamespace); } - if (message.rubyPackage !== "") { + if (message.rubyPackage !== '') { writer.uint32(362).string(message.rubyPackage); } if (message.features !== undefined) { @@ -4810,97 +4810,97 @@ export const FileOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = (reader.int32() as any); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 50: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = (reader.int32() as any); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 50: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): FileOptions { const message = createBaseFileOptions(); - message.javaPackage = object.javaPackage ?? ""; - message.javaOuterClassname = object.javaOuterClassname ?? ""; + message.javaPackage = object.javaPackage ?? ''; + message.javaOuterClassname = object.javaOuterClassname ?? ''; message.javaMultipleFiles = object.javaMultipleFiles ?? false; message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; message.optimizeFor = object.optimizeFor ?? 1; - message.goPackage = object.goPackage ?? ""; + message.goPackage = object.goPackage ?? ''; message.ccGenericServices = object.ccGenericServices ?? false; message.javaGenericServices = object.javaGenericServices ?? false; message.pyGenericServices = object.pyGenericServices ?? false; message.deprecated = object.deprecated ?? false; message.ccEnableArenas = object.ccEnableArenas ?? false; - message.objcClassPrefix = object.objcClassPrefix ?? ""; - message.csharpNamespace = object.csharpNamespace ?? ""; - message.swiftPrefix = object.swiftPrefix ?? ""; - message.phpClassPrefix = object.phpClassPrefix ?? ""; - message.phpNamespace = object.phpNamespace ?? ""; - message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; - message.rubyPackage = object.rubyPackage ?? ""; + message.objcClassPrefix = object.objcClassPrefix ?? ''; + message.csharpNamespace = object.csharpNamespace ?? ''; + message.swiftPrefix = object.swiftPrefix ?? ''; + message.phpClassPrefix = object.phpClassPrefix ?? ''; + message.phpNamespace = object.phpNamespace ?? ''; + message.phpMetadataNamespace = object.phpMetadataNamespace ?? ''; + message.rubyPackage = object.rubyPackage ?? ''; message.features = object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; @@ -4972,25 +4972,25 @@ export const FileOptions = { }, toAmino(message: FileOptions): FileOptionsAmino { const obj: any = {}; - obj.java_package = message.javaPackage === "" ? undefined : message.javaPackage; - obj.java_outer_classname = message.javaOuterClassname === "" ? undefined : message.javaOuterClassname; + obj.java_package = message.javaPackage === '' ? undefined : message.javaPackage; + obj.java_outer_classname = message.javaOuterClassname === '' ? undefined : message.javaOuterClassname; obj.java_multiple_files = message.javaMultipleFiles === false ? undefined : message.javaMultipleFiles; obj.java_generate_equals_and_hash = message.javaGenerateEqualsAndHash === false ? undefined : message.javaGenerateEqualsAndHash; obj.java_string_check_utf8 = message.javaStringCheckUtf8 === false ? undefined : message.javaStringCheckUtf8; obj.optimize_for = message.optimizeFor === 1 ? undefined : message.optimizeFor; - obj.go_package = message.goPackage === "" ? undefined : message.goPackage; + obj.go_package = message.goPackage === '' ? undefined : message.goPackage; obj.cc_generic_services = message.ccGenericServices === false ? undefined : message.ccGenericServices; obj.java_generic_services = message.javaGenericServices === false ? undefined : message.javaGenericServices; obj.py_generic_services = message.pyGenericServices === false ? undefined : message.pyGenericServices; obj.deprecated = message.deprecated === false ? undefined : message.deprecated; obj.cc_enable_arenas = message.ccEnableArenas === false ? undefined : message.ccEnableArenas; - obj.objc_class_prefix = message.objcClassPrefix === "" ? undefined : message.objcClassPrefix; - obj.csharp_namespace = message.csharpNamespace === "" ? undefined : message.csharpNamespace; - obj.swift_prefix = message.swiftPrefix === "" ? undefined : message.swiftPrefix; - obj.php_class_prefix = message.phpClassPrefix === "" ? undefined : message.phpClassPrefix; - obj.php_namespace = message.phpNamespace === "" ? undefined : message.phpNamespace; - obj.php_metadata_namespace = message.phpMetadataNamespace === "" ? undefined : message.phpMetadataNamespace; - obj.ruby_package = message.rubyPackage === "" ? undefined : message.rubyPackage; + obj.objc_class_prefix = message.objcClassPrefix === '' ? undefined : message.objcClassPrefix; + obj.csharp_namespace = message.csharpNamespace === '' ? undefined : message.csharpNamespace; + obj.swift_prefix = message.swiftPrefix === '' ? undefined : message.swiftPrefix; + obj.php_class_prefix = message.phpClassPrefix === '' ? undefined : message.phpClassPrefix; + obj.php_namespace = message.phpNamespace === '' ? undefined : message.phpNamespace; + obj.php_metadata_namespace = message.phpMetadataNamespace === '' ? undefined : message.phpMetadataNamespace; + obj.ruby_package = message.rubyPackage === '' ? undefined : message.rubyPackage; obj.features = message.features ? FeatureSet.toAmino(message.features) : undefined; if (message.uninterpretedOption) { obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); @@ -5010,7 +5010,7 @@ export const FileOptions = { }, toProtoMsg(message: FileOptions): FileOptionsProtoMsg { return { - typeUrl: "/google.protobuf.FileOptions", + typeUrl: '/google.protobuf.FileOptions', value: FileOptions.encode(message).finish() }; } @@ -5028,12 +5028,12 @@ function createBaseMessageOptions(): MessageOptions { }; } export const MessageOptions = { - typeUrl: "/google.protobuf.MessageOptions", + typeUrl: '/google.protobuf.MessageOptions', is(o: any): o is MessageOptions { - return o && (o.$typeUrl === MessageOptions.typeUrl || typeof o.messageSetWireFormat === "boolean" && typeof o.noStandardDescriptorAccessor === "boolean" && typeof o.deprecated === "boolean" && typeof o.mapEntry === "boolean" && typeof o.deprecatedLegacyJsonFieldConflicts === "boolean" && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); + return o && (o.$typeUrl === MessageOptions.typeUrl || typeof o.messageSetWireFormat === 'boolean' && typeof o.noStandardDescriptorAccessor === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.mapEntry === 'boolean' && typeof o.deprecatedLegacyJsonFieldConflicts === 'boolean' && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, isAmino(o: any): o is MessageOptionsAmino { - return o && (o.$typeUrl === MessageOptions.typeUrl || typeof o.message_set_wire_format === "boolean" && typeof o.no_standard_descriptor_accessor === "boolean" && typeof o.deprecated === "boolean" && typeof o.map_entry === "boolean" && typeof o.deprecated_legacy_json_field_conflicts === "boolean" && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); + return o && (o.$typeUrl === MessageOptions.typeUrl || typeof o.message_set_wire_format === 'boolean' && typeof o.no_standard_descriptor_accessor === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.map_entry === 'boolean' && typeof o.deprecated_legacy_json_field_conflicts === 'boolean' && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); }, encode(message: MessageOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.messageSetWireFormat === true) { @@ -5066,30 +5066,30 @@ export const MessageOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 11: - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - case 12: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 11: + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + case 12: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5154,7 +5154,7 @@ export const MessageOptions = { }, toProtoMsg(message: MessageOptions): MessageOptionsProtoMsg { return { - typeUrl: "/google.protobuf.MessageOptions", + typeUrl: '/google.protobuf.MessageOptions', value: MessageOptions.encode(message).finish() }; } @@ -5179,12 +5179,12 @@ function createBaseFieldOptions(): FieldOptions { }; } export const FieldOptions = { - typeUrl: "/google.protobuf.FieldOptions", + typeUrl: '/google.protobuf.FieldOptions', is(o: any): o is FieldOptions { - return o && (o.$typeUrl === FieldOptions.typeUrl || isSet(o.ctype) && typeof o.packed === "boolean" && isSet(o.jstype) && typeof o.lazy === "boolean" && typeof o.unverifiedLazy === "boolean" && typeof o.deprecated === "boolean" && typeof o.weak === "boolean" && typeof o.debugRedact === "boolean" && isSet(o.retention) && Array.isArray(o.targets) && Array.isArray(o.editionDefaults) && (!o.editionDefaults.length || FieldOptions_EditionDefault.is(o.editionDefaults[0])) && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); + return o && (o.$typeUrl === FieldOptions.typeUrl || isSet(o.ctype) && typeof o.packed === 'boolean' && isSet(o.jstype) && typeof o.lazy === 'boolean' && typeof o.unverifiedLazy === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.weak === 'boolean' && typeof o.debugRedact === 'boolean' && isSet(o.retention) && Array.isArray(o.targets) && Array.isArray(o.editionDefaults) && (!o.editionDefaults.length || FieldOptions_EditionDefault.is(o.editionDefaults[0])) && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, isAmino(o: any): o is FieldOptionsAmino { - return o && (o.$typeUrl === FieldOptions.typeUrl || isSet(o.ctype) && typeof o.packed === "boolean" && isSet(o.jstype) && typeof o.lazy === "boolean" && typeof o.unverified_lazy === "boolean" && typeof o.deprecated === "boolean" && typeof o.weak === "boolean" && typeof o.debug_redact === "boolean" && isSet(o.retention) && Array.isArray(o.targets) && Array.isArray(o.edition_defaults) && (!o.edition_defaults.length || FieldOptions_EditionDefault.isAmino(o.edition_defaults[0])) && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); + return o && (o.$typeUrl === FieldOptions.typeUrl || isSet(o.ctype) && typeof o.packed === 'boolean' && isSet(o.jstype) && typeof o.lazy === 'boolean' && typeof o.unverified_lazy === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.weak === 'boolean' && typeof o.debug_redact === 'boolean' && isSet(o.retention) && Array.isArray(o.targets) && Array.isArray(o.edition_defaults) && (!o.edition_defaults.length || FieldOptions_EditionDefault.isAmino(o.edition_defaults[0])) && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); }, encode(message: FieldOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.ctype !== 1) { @@ -5240,58 +5240,58 @@ export const FieldOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = (reader.int32() as any); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = (reader.int32() as any); - break; - case 5: - message.lazy = reader.bool(); - break; - case 15: - message.unverifiedLazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 16: - message.debugRedact = reader.bool(); - break; - case 17: - message.retention = (reader.int32() as any); - break; - case 19: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.targets.push((reader.int32() as any)); - } - } else { + case 1: + message.ctype = (reader.int32() as any); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = (reader.int32() as any); + break; + case 5: + message.lazy = reader.bool(); + break; + case 15: + message.unverifiedLazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 16: + message.debugRedact = reader.bool(); + break; + case 17: + message.retention = (reader.int32() as any); + break; + case 19: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.targets.push((reader.int32() as any)); } - break; - case 20: - message.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32())); - break; - case 21: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 22: - message.featureSupport = FieldOptions_FeatureSupport.decode(reader, reader.uint32()); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.targets.push((reader.int32() as any)); + } + break; + case 20: + message.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32())); + break; + case 21: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 22: + message.featureSupport = FieldOptions_FeatureSupport.decode(reader, reader.uint32()); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5395,7 +5395,7 @@ export const FieldOptions = { }, toProtoMsg(message: FieldOptions): FieldOptionsProtoMsg { return { - typeUrl: "/google.protobuf.FieldOptions", + typeUrl: '/google.protobuf.FieldOptions', value: FieldOptions.encode(message).finish() }; } @@ -5404,22 +5404,22 @@ GlobalDecoderRegistry.register(FieldOptions.typeUrl, FieldOptions); function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault { return { edition: 1, - value: "" + value: '' }; } export const FieldOptions_EditionDefault = { - typeUrl: "/google.protobuf.EditionDefault", + typeUrl: '/google.protobuf.EditionDefault', is(o: any): o is FieldOptions_EditionDefault { - return o && (o.$typeUrl === FieldOptions_EditionDefault.typeUrl || isSet(o.edition) && typeof o.value === "string"); + return o && (o.$typeUrl === FieldOptions_EditionDefault.typeUrl || isSet(o.edition) && typeof o.value === 'string'); }, isAmino(o: any): o is FieldOptions_EditionDefaultAmino { - return o && (o.$typeUrl === FieldOptions_EditionDefault.typeUrl || isSet(o.edition) && typeof o.value === "string"); + return o && (o.$typeUrl === FieldOptions_EditionDefault.typeUrl || isSet(o.edition) && typeof o.value === 'string'); }, encode(message: FieldOptions_EditionDefault, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.edition !== 1) { writer.uint32(24).int32(message.edition); } - if (message.value !== "") { + if (message.value !== '') { writer.uint32(18).string(message.value); } return writer; @@ -5431,15 +5431,15 @@ export const FieldOptions_EditionDefault = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.edition = (reader.int32() as any); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 3: + message.edition = (reader.int32() as any); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5447,7 +5447,7 @@ export const FieldOptions_EditionDefault = { fromPartial(object: DeepPartial): FieldOptions_EditionDefault { const message = createBaseFieldOptions_EditionDefault(); message.edition = object.edition ?? 1; - message.value = object.value ?? ""; + message.value = object.value ?? ''; return message; }, fromAmino(object: FieldOptions_EditionDefaultAmino): FieldOptions_EditionDefault { @@ -5463,7 +5463,7 @@ export const FieldOptions_EditionDefault = { toAmino(message: FieldOptions_EditionDefault): FieldOptions_EditionDefaultAmino { const obj: any = {}; obj.edition = message.edition === 1 ? undefined : message.edition; - obj.value = message.value === "" ? undefined : message.value; + obj.value = message.value === '' ? undefined : message.value; return obj; }, fromAminoMsg(object: FieldOptions_EditionDefaultAminoMsg): FieldOptions_EditionDefault { @@ -5477,7 +5477,7 @@ export const FieldOptions_EditionDefault = { }, toProtoMsg(message: FieldOptions_EditionDefault): FieldOptions_EditionDefaultProtoMsg { return { - typeUrl: "/google.protobuf.EditionDefault", + typeUrl: '/google.protobuf.EditionDefault', value: FieldOptions_EditionDefault.encode(message).finish() }; } @@ -5487,17 +5487,17 @@ function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport { return { editionIntroduced: 1, editionDeprecated: 1, - deprecationWarning: "", + deprecationWarning: '', editionRemoved: 1 }; } export const FieldOptions_FeatureSupport = { - typeUrl: "/google.protobuf.FeatureSupport", + typeUrl: '/google.protobuf.FeatureSupport', is(o: any): o is FieldOptions_FeatureSupport { - return o && (o.$typeUrl === FieldOptions_FeatureSupport.typeUrl || isSet(o.editionIntroduced) && isSet(o.editionDeprecated) && typeof o.deprecationWarning === "string" && isSet(o.editionRemoved)); + return o && (o.$typeUrl === FieldOptions_FeatureSupport.typeUrl || isSet(o.editionIntroduced) && isSet(o.editionDeprecated) && typeof o.deprecationWarning === 'string' && isSet(o.editionRemoved)); }, isAmino(o: any): o is FieldOptions_FeatureSupportAmino { - return o && (o.$typeUrl === FieldOptions_FeatureSupport.typeUrl || isSet(o.edition_introduced) && isSet(o.edition_deprecated) && typeof o.deprecation_warning === "string" && isSet(o.edition_removed)); + return o && (o.$typeUrl === FieldOptions_FeatureSupport.typeUrl || isSet(o.edition_introduced) && isSet(o.edition_deprecated) && typeof o.deprecation_warning === 'string' && isSet(o.edition_removed)); }, encode(message: FieldOptions_FeatureSupport, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.editionIntroduced !== 1) { @@ -5506,7 +5506,7 @@ export const FieldOptions_FeatureSupport = { if (message.editionDeprecated !== 1) { writer.uint32(16).int32(message.editionDeprecated); } - if (message.deprecationWarning !== "") { + if (message.deprecationWarning !== '') { writer.uint32(26).string(message.deprecationWarning); } if (message.editionRemoved !== 1) { @@ -5521,21 +5521,21 @@ export const FieldOptions_FeatureSupport = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.editionIntroduced = (reader.int32() as any); - break; - case 2: - message.editionDeprecated = (reader.int32() as any); - break; - case 3: - message.deprecationWarning = reader.string(); - break; - case 4: - message.editionRemoved = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.editionIntroduced = (reader.int32() as any); + break; + case 2: + message.editionDeprecated = (reader.int32() as any); + break; + case 3: + message.deprecationWarning = reader.string(); + break; + case 4: + message.editionRemoved = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5544,7 +5544,7 @@ export const FieldOptions_FeatureSupport = { const message = createBaseFieldOptions_FeatureSupport(); message.editionIntroduced = object.editionIntroduced ?? 1; message.editionDeprecated = object.editionDeprecated ?? 1; - message.deprecationWarning = object.deprecationWarning ?? ""; + message.deprecationWarning = object.deprecationWarning ?? ''; message.editionRemoved = object.editionRemoved ?? 1; return message; }, @@ -5568,7 +5568,7 @@ export const FieldOptions_FeatureSupport = { const obj: any = {}; obj.edition_introduced = message.editionIntroduced === 1 ? undefined : message.editionIntroduced; obj.edition_deprecated = message.editionDeprecated === 1 ? undefined : message.editionDeprecated; - obj.deprecation_warning = message.deprecationWarning === "" ? undefined : message.deprecationWarning; + obj.deprecation_warning = message.deprecationWarning === '' ? undefined : message.deprecationWarning; obj.edition_removed = message.editionRemoved === 1 ? undefined : message.editionRemoved; return obj; }, @@ -5583,7 +5583,7 @@ export const FieldOptions_FeatureSupport = { }, toProtoMsg(message: FieldOptions_FeatureSupport): FieldOptions_FeatureSupportProtoMsg { return { - typeUrl: "/google.protobuf.FeatureSupport", + typeUrl: '/google.protobuf.FeatureSupport', value: FieldOptions_FeatureSupport.encode(message).finish() }; } @@ -5596,7 +5596,7 @@ function createBaseOneofOptions(): OneofOptions { }; } export const OneofOptions = { - typeUrl: "/google.protobuf.OneofOptions", + typeUrl: '/google.protobuf.OneofOptions', is(o: any): o is OneofOptions { return o && (o.$typeUrl === OneofOptions.typeUrl || Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, @@ -5619,15 +5619,15 @@ export const OneofOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5667,7 +5667,7 @@ export const OneofOptions = { }, toProtoMsg(message: OneofOptions): OneofOptionsProtoMsg { return { - typeUrl: "/google.protobuf.OneofOptions", + typeUrl: '/google.protobuf.OneofOptions', value: OneofOptions.encode(message).finish() }; } @@ -5683,12 +5683,12 @@ function createBaseEnumOptions(): EnumOptions { }; } export const EnumOptions = { - typeUrl: "/google.protobuf.EnumOptions", + typeUrl: '/google.protobuf.EnumOptions', is(o: any): o is EnumOptions { - return o && (o.$typeUrl === EnumOptions.typeUrl || typeof o.allowAlias === "boolean" && typeof o.deprecated === "boolean" && typeof o.deprecatedLegacyJsonFieldConflicts === "boolean" && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); + return o && (o.$typeUrl === EnumOptions.typeUrl || typeof o.allowAlias === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.deprecatedLegacyJsonFieldConflicts === 'boolean' && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, isAmino(o: any): o is EnumOptionsAmino { - return o && (o.$typeUrl === EnumOptions.typeUrl || typeof o.allow_alias === "boolean" && typeof o.deprecated === "boolean" && typeof o.deprecated_legacy_json_field_conflicts === "boolean" && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); + return o && (o.$typeUrl === EnumOptions.typeUrl || typeof o.allow_alias === 'boolean' && typeof o.deprecated === 'boolean' && typeof o.deprecated_legacy_json_field_conflicts === 'boolean' && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); }, encode(message: EnumOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.allowAlias === true) { @@ -5715,24 +5715,24 @@ export const EnumOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 6: - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - case 7: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 6: + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + case 7: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5787,7 +5787,7 @@ export const EnumOptions = { }, toProtoMsg(message: EnumOptions): EnumOptionsProtoMsg { return { - typeUrl: "/google.protobuf.EnumOptions", + typeUrl: '/google.protobuf.EnumOptions', value: EnumOptions.encode(message).finish() }; } @@ -5802,12 +5802,12 @@ function createBaseEnumValueOptions(): EnumValueOptions { }; } export const EnumValueOptions = { - typeUrl: "/google.protobuf.EnumValueOptions", + typeUrl: '/google.protobuf.EnumValueOptions', is(o: any): o is EnumValueOptions { - return o && (o.$typeUrl === EnumValueOptions.typeUrl || typeof o.deprecated === "boolean" && typeof o.debugRedact === "boolean" && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); + return o && (o.$typeUrl === EnumValueOptions.typeUrl || typeof o.deprecated === 'boolean' && typeof o.debugRedact === 'boolean' && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, isAmino(o: any): o is EnumValueOptionsAmino { - return o && (o.$typeUrl === EnumValueOptions.typeUrl || typeof o.deprecated === "boolean" && typeof o.debug_redact === "boolean" && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); + return o && (o.$typeUrl === EnumValueOptions.typeUrl || typeof o.deprecated === 'boolean' && typeof o.debug_redact === 'boolean' && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); }, encode(message: EnumValueOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.deprecated === true) { @@ -5831,21 +5831,21 @@ export const EnumValueOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 2: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 3: - message.debugRedact = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.deprecated = reader.bool(); + break; + case 2: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 3: + message.debugRedact = reader.bool(); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5895,7 +5895,7 @@ export const EnumValueOptions = { }, toProtoMsg(message: EnumValueOptions): EnumValueOptionsProtoMsg { return { - typeUrl: "/google.protobuf.EnumValueOptions", + typeUrl: '/google.protobuf.EnumValueOptions', value: EnumValueOptions.encode(message).finish() }; } @@ -5909,12 +5909,12 @@ function createBaseServiceOptions(): ServiceOptions { }; } export const ServiceOptions = { - typeUrl: "/google.protobuf.ServiceOptions", + typeUrl: '/google.protobuf.ServiceOptions', is(o: any): o is ServiceOptions { - return o && (o.$typeUrl === ServiceOptions.typeUrl || typeof o.deprecated === "boolean" && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); + return o && (o.$typeUrl === ServiceOptions.typeUrl || typeof o.deprecated === 'boolean' && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, isAmino(o: any): o is ServiceOptionsAmino { - return o && (o.$typeUrl === ServiceOptions.typeUrl || typeof o.deprecated === "boolean" && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); + return o && (o.$typeUrl === ServiceOptions.typeUrl || typeof o.deprecated === 'boolean' && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); }, encode(message: ServiceOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.features !== undefined) { @@ -5935,18 +5935,18 @@ export const ServiceOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 34: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 34: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 33: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5991,7 +5991,7 @@ export const ServiceOptions = { }, toProtoMsg(message: ServiceOptions): ServiceOptionsProtoMsg { return { - typeUrl: "/google.protobuf.ServiceOptions", + typeUrl: '/google.protobuf.ServiceOptions', value: ServiceOptions.encode(message).finish() }; } @@ -6006,12 +6006,12 @@ function createBaseMethodOptions(): MethodOptions { }; } export const MethodOptions = { - typeUrl: "/google.protobuf.MethodOptions", + typeUrl: '/google.protobuf.MethodOptions', is(o: any): o is MethodOptions { - return o && (o.$typeUrl === MethodOptions.typeUrl || typeof o.deprecated === "boolean" && isSet(o.idempotencyLevel) && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); + return o && (o.$typeUrl === MethodOptions.typeUrl || typeof o.deprecated === 'boolean' && isSet(o.idempotencyLevel) && Array.isArray(o.uninterpretedOption) && (!o.uninterpretedOption.length || UninterpretedOption.is(o.uninterpretedOption[0]))); }, isAmino(o: any): o is MethodOptionsAmino { - return o && (o.$typeUrl === MethodOptions.typeUrl || typeof o.deprecated === "boolean" && isSet(o.idempotency_level) && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); + return o && (o.$typeUrl === MethodOptions.typeUrl || typeof o.deprecated === 'boolean' && isSet(o.idempotency_level) && Array.isArray(o.uninterpreted_option) && (!o.uninterpreted_option.length || UninterpretedOption.isAmino(o.uninterpreted_option[0]))); }, encode(message: MethodOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.deprecated === true) { @@ -6035,21 +6035,21 @@ export const MethodOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = (reader.int32() as any); - break; - case 35: - message.features = FeatureSet.decode(reader, reader.uint32()); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = (reader.int32() as any); + break; + case 35: + message.features = FeatureSet.decode(reader, reader.uint32()); + break; + case 999: + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6099,7 +6099,7 @@ export const MethodOptions = { }, toProtoMsg(message: MethodOptions): MethodOptionsProtoMsg { return { - typeUrl: "/google.protobuf.MethodOptions", + typeUrl: '/google.protobuf.MethodOptions', value: MethodOptions.encode(message).finish() }; } @@ -6108,27 +6108,27 @@ GlobalDecoderRegistry.register(MethodOptions.typeUrl, MethodOptions); function createBaseUninterpretedOption(): UninterpretedOption { return { name: [], - identifierValue: "", + identifierValue: '', positiveIntValue: BigInt(0), negativeIntValue: BigInt(0), doubleValue: 0, stringValue: new Uint8Array(), - aggregateValue: "" + aggregateValue: '' }; } export const UninterpretedOption = { - typeUrl: "/google.protobuf.UninterpretedOption", + typeUrl: '/google.protobuf.UninterpretedOption', is(o: any): o is UninterpretedOption { - return o && (o.$typeUrl === UninterpretedOption.typeUrl || Array.isArray(o.name) && (!o.name.length || UninterpretedOption_NamePart.is(o.name[0])) && typeof o.identifierValue === "string" && typeof o.positiveIntValue === "bigint" && typeof o.negativeIntValue === "bigint" && typeof o.doubleValue === "number" && (o.stringValue instanceof Uint8Array || typeof o.stringValue === "string") && typeof o.aggregateValue === "string"); + return o && (o.$typeUrl === UninterpretedOption.typeUrl || Array.isArray(o.name) && (!o.name.length || UninterpretedOption_NamePart.is(o.name[0])) && typeof o.identifierValue === 'string' && typeof o.positiveIntValue === 'bigint' && typeof o.negativeIntValue === 'bigint' && typeof o.doubleValue === 'number' && (o.stringValue instanceof Uint8Array || typeof o.stringValue === 'string') && typeof o.aggregateValue === 'string'); }, isAmino(o: any): o is UninterpretedOptionAmino { - return o && (o.$typeUrl === UninterpretedOption.typeUrl || Array.isArray(o.name) && (!o.name.length || UninterpretedOption_NamePart.isAmino(o.name[0])) && typeof o.identifier_value === "string" && typeof o.positive_int_value === "bigint" && typeof o.negative_int_value === "bigint" && typeof o.double_value === "number" && (o.string_value instanceof Uint8Array || typeof o.string_value === "string") && typeof o.aggregate_value === "string"); + return o && (o.$typeUrl === UninterpretedOption.typeUrl || Array.isArray(o.name) && (!o.name.length || UninterpretedOption_NamePart.isAmino(o.name[0])) && typeof o.identifier_value === 'string' && typeof o.positive_int_value === 'bigint' && typeof o.negative_int_value === 'bigint' && typeof o.double_value === 'number' && (o.string_value instanceof Uint8Array || typeof o.string_value === 'string') && typeof o.aggregate_value === 'string'); }, encode(message: UninterpretedOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.name) { UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.identifierValue !== "") { + if (message.identifierValue !== '') { writer.uint32(26).string(message.identifierValue); } if (message.positiveIntValue !== BigInt(0)) { @@ -6143,7 +6143,7 @@ export const UninterpretedOption = { if (message.stringValue.length !== 0) { writer.uint32(58).bytes(message.stringValue); } - if (message.aggregateValue !== "") { + if (message.aggregateValue !== '') { writer.uint32(66).string(message.aggregateValue); } return writer; @@ -6155,30 +6155,30 @@ export const UninterpretedOption = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 2: + message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6186,12 +6186,12 @@ export const UninterpretedOption = { fromPartial(object: DeepPartial): UninterpretedOption { const message = createBaseUninterpretedOption(); message.name = object.name?.map(e => UninterpretedOption_NamePart.fromPartial(e)) || []; - message.identifierValue = object.identifierValue ?? ""; + message.identifierValue = object.identifierValue ?? ''; message.positiveIntValue = object.positiveIntValue !== undefined && object.positiveIntValue !== null ? BigInt(object.positiveIntValue.toString()) : BigInt(0); message.negativeIntValue = object.negativeIntValue !== undefined && object.negativeIntValue !== null ? BigInt(object.negativeIntValue.toString()) : BigInt(0); message.doubleValue = object.doubleValue ?? 0; message.stringValue = object.stringValue ?? new Uint8Array(); - message.aggregateValue = object.aggregateValue ?? ""; + message.aggregateValue = object.aggregateValue ?? ''; return message; }, fromAmino(object: UninterpretedOptionAmino): UninterpretedOption { @@ -6224,12 +6224,12 @@ export const UninterpretedOption = { } else { obj.name = message.name; } - obj.identifier_value = message.identifierValue === "" ? undefined : message.identifierValue; + obj.identifier_value = message.identifierValue === '' ? undefined : message.identifierValue; obj.positive_int_value = message.positiveIntValue !== BigInt(0) ? message.positiveIntValue.toString() : undefined; obj.negative_int_value = message.negativeIntValue !== BigInt(0) ? message.negativeIntValue.toString() : undefined; obj.double_value = message.doubleValue === 0 ? undefined : message.doubleValue; obj.string_value = message.stringValue ? base64FromBytes(message.stringValue) : undefined; - obj.aggregate_value = message.aggregateValue === "" ? undefined : message.aggregateValue; + obj.aggregate_value = message.aggregateValue === '' ? undefined : message.aggregateValue; return obj; }, fromAminoMsg(object: UninterpretedOptionAminoMsg): UninterpretedOption { @@ -6243,7 +6243,7 @@ export const UninterpretedOption = { }, toProtoMsg(message: UninterpretedOption): UninterpretedOptionProtoMsg { return { - typeUrl: "/google.protobuf.UninterpretedOption", + typeUrl: '/google.protobuf.UninterpretedOption', value: UninterpretedOption.encode(message).finish() }; } @@ -6251,20 +6251,20 @@ export const UninterpretedOption = { GlobalDecoderRegistry.register(UninterpretedOption.typeUrl, UninterpretedOption); function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { return { - namePart: "", + namePart: '', isExtension: false }; } export const UninterpretedOption_NamePart = { - typeUrl: "/google.protobuf.NamePart", + typeUrl: '/google.protobuf.NamePart', is(o: any): o is UninterpretedOption_NamePart { - return o && (o.$typeUrl === UninterpretedOption_NamePart.typeUrl || typeof o.namePart === "string" && typeof o.isExtension === "boolean"); + return o && (o.$typeUrl === UninterpretedOption_NamePart.typeUrl || typeof o.namePart === 'string' && typeof o.isExtension === 'boolean'); }, isAmino(o: any): o is UninterpretedOption_NamePartAmino { - return o && (o.$typeUrl === UninterpretedOption_NamePart.typeUrl || typeof o.name_part === "string" && typeof o.is_extension === "boolean"); + return o && (o.$typeUrl === UninterpretedOption_NamePart.typeUrl || typeof o.name_part === 'string' && typeof o.is_extension === 'boolean'); }, encode(message: UninterpretedOption_NamePart, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.namePart !== "") { + if (message.namePart !== '') { writer.uint32(10).string(message.namePart); } if (message.isExtension === true) { @@ -6279,22 +6279,22 @@ export const UninterpretedOption_NamePart = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): UninterpretedOption_NamePart { const message = createBaseUninterpretedOption_NamePart(); - message.namePart = object.namePart ?? ""; + message.namePart = object.namePart ?? ''; message.isExtension = object.isExtension ?? false; return message; }, @@ -6310,7 +6310,7 @@ export const UninterpretedOption_NamePart = { }, toAmino(message: UninterpretedOption_NamePart): UninterpretedOption_NamePartAmino { const obj: any = {}; - obj.name_part = message.namePart === "" ? undefined : message.namePart; + obj.name_part = message.namePart === '' ? undefined : message.namePart; obj.is_extension = message.isExtension === false ? undefined : message.isExtension; return obj; }, @@ -6325,7 +6325,7 @@ export const UninterpretedOption_NamePart = { }, toProtoMsg(message: UninterpretedOption_NamePart): UninterpretedOption_NamePartProtoMsg { return { - typeUrl: "/google.protobuf.NamePart", + typeUrl: '/google.protobuf.NamePart', value: UninterpretedOption_NamePart.encode(message).finish() }; } @@ -6342,7 +6342,7 @@ function createBaseFeatureSet(): FeatureSet { }; } export const FeatureSet = { - typeUrl: "/google.protobuf.FeatureSet", + typeUrl: '/google.protobuf.FeatureSet', is(o: any): o is FeatureSet { return o && (o.$typeUrl === FeatureSet.typeUrl || isSet(o.fieldPresence) && isSet(o.enumType) && isSet(o.repeatedFieldEncoding) && isSet(o.utf8Validation) && isSet(o.messageEncoding) && isSet(o.jsonFormat)); }, @@ -6377,27 +6377,27 @@ export const FeatureSet = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fieldPresence = (reader.int32() as any); - break; - case 2: - message.enumType = (reader.int32() as any); - break; - case 3: - message.repeatedFieldEncoding = (reader.int32() as any); - break; - case 4: - message.utf8Validation = (reader.int32() as any); - break; - case 5: - message.messageEncoding = (reader.int32() as any); - break; - case 6: - message.jsonFormat = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.fieldPresence = (reader.int32() as any); + break; + case 2: + message.enumType = (reader.int32() as any); + break; + case 3: + message.repeatedFieldEncoding = (reader.int32() as any); + break; + case 4: + message.utf8Validation = (reader.int32() as any); + break; + case 5: + message.messageEncoding = (reader.int32() as any); + break; + case 6: + message.jsonFormat = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6455,7 +6455,7 @@ export const FeatureSet = { }, toProtoMsg(message: FeatureSet): FeatureSetProtoMsg { return { - typeUrl: "/google.protobuf.FeatureSet", + typeUrl: '/google.protobuf.FeatureSet', value: FeatureSet.encode(message).finish() }; } @@ -6469,7 +6469,7 @@ function createBaseFeatureSetDefaults(): FeatureSetDefaults { }; } export const FeatureSetDefaults = { - typeUrl: "/google.protobuf.FeatureSetDefaults", + typeUrl: '/google.protobuf.FeatureSetDefaults', is(o: any): o is FeatureSetDefaults { return o && (o.$typeUrl === FeatureSetDefaults.typeUrl || Array.isArray(o.defaults) && (!o.defaults.length || FeatureSetDefaults_FeatureSetEditionDefault.is(o.defaults[0])) && isSet(o.minimumEdition) && isSet(o.maximumEdition)); }, @@ -6495,18 +6495,18 @@ export const FeatureSetDefaults = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - case 4: - message.minimumEdition = (reader.int32() as any); - break; - case 5: - message.maximumEdition = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + case 4: + message.minimumEdition = (reader.int32() as any); + break; + case 5: + message.maximumEdition = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6551,7 +6551,7 @@ export const FeatureSetDefaults = { }, toProtoMsg(message: FeatureSetDefaults): FeatureSetDefaultsProtoMsg { return { - typeUrl: "/google.protobuf.FeatureSetDefaults", + typeUrl: '/google.protobuf.FeatureSetDefaults', value: FeatureSetDefaults.encode(message).finish() }; } @@ -6565,7 +6565,7 @@ function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefa }; } export const FeatureSetDefaults_FeatureSetEditionDefault = { - typeUrl: "/google.protobuf.FeatureSetEditionDefault", + typeUrl: '/google.protobuf.FeatureSetEditionDefault', is(o: any): o is FeatureSetDefaults_FeatureSetEditionDefault { return o && (o.$typeUrl === FeatureSetDefaults_FeatureSetEditionDefault.typeUrl || isSet(o.edition)); }, @@ -6591,18 +6591,18 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.edition = (reader.int32() as any); - break; - case 4: - message.overridableFeatures = FeatureSet.decode(reader, reader.uint32()); - break; - case 5: - message.fixedFeatures = FeatureSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 3: + message.edition = (reader.int32() as any); + break; + case 4: + message.overridableFeatures = FeatureSet.decode(reader, reader.uint32()); + break; + case 5: + message.fixedFeatures = FeatureSet.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6645,7 +6645,7 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = { }, toProtoMsg(message: FeatureSetDefaults_FeatureSetEditionDefault): FeatureSetDefaults_FeatureSetEditionDefaultProtoMsg { return { - typeUrl: "/google.protobuf.FeatureSetEditionDefault", + typeUrl: '/google.protobuf.FeatureSetEditionDefault', value: FeatureSetDefaults_FeatureSetEditionDefault.encode(message).finish() }; } @@ -6657,7 +6657,7 @@ function createBaseSourceCodeInfo(): SourceCodeInfo { }; } export const SourceCodeInfo = { - typeUrl: "/google.protobuf.SourceCodeInfo", + typeUrl: '/google.protobuf.SourceCodeInfo', is(o: any): o is SourceCodeInfo { return o && (o.$typeUrl === SourceCodeInfo.typeUrl || Array.isArray(o.location) && (!o.location.length || SourceCodeInfo_Location.is(o.location[0]))); }, @@ -6677,12 +6677,12 @@ export const SourceCodeInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6717,7 +6717,7 @@ export const SourceCodeInfo = { }, toProtoMsg(message: SourceCodeInfo): SourceCodeInfoProtoMsg { return { - typeUrl: "/google.protobuf.SourceCodeInfo", + typeUrl: '/google.protobuf.SourceCodeInfo', value: SourceCodeInfo.encode(message).finish() }; } @@ -6727,18 +6727,18 @@ function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { return { path: [], span: [], - leadingComments: "", - trailingComments: "", + leadingComments: '', + trailingComments: '', leadingDetachedComments: [] }; } export const SourceCodeInfo_Location = { - typeUrl: "/google.protobuf.Location", + typeUrl: '/google.protobuf.Location', is(o: any): o is SourceCodeInfo_Location { - return o && (o.$typeUrl === SourceCodeInfo_Location.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === "number") && Array.isArray(o.span) && (!o.span.length || typeof o.span[0] === "number") && typeof o.leadingComments === "string" && typeof o.trailingComments === "string" && Array.isArray(o.leadingDetachedComments) && (!o.leadingDetachedComments.length || typeof o.leadingDetachedComments[0] === "string")); + return o && (o.$typeUrl === SourceCodeInfo_Location.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === 'number') && Array.isArray(o.span) && (!o.span.length || typeof o.span[0] === 'number') && typeof o.leadingComments === 'string' && typeof o.trailingComments === 'string' && Array.isArray(o.leadingDetachedComments) && (!o.leadingDetachedComments.length || typeof o.leadingDetachedComments[0] === 'string')); }, isAmino(o: any): o is SourceCodeInfo_LocationAmino { - return o && (o.$typeUrl === SourceCodeInfo_Location.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === "number") && Array.isArray(o.span) && (!o.span.length || typeof o.span[0] === "number") && typeof o.leading_comments === "string" && typeof o.trailing_comments === "string" && Array.isArray(o.leading_detached_comments) && (!o.leading_detached_comments.length || typeof o.leading_detached_comments[0] === "string")); + return o && (o.$typeUrl === SourceCodeInfo_Location.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === 'number') && Array.isArray(o.span) && (!o.span.length || typeof o.span[0] === 'number') && typeof o.leading_comments === 'string' && typeof o.trailing_comments === 'string' && Array.isArray(o.leading_detached_comments) && (!o.leading_detached_comments.length || typeof o.leading_detached_comments[0] === 'string')); }, encode(message: SourceCodeInfo_Location, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { writer.uint32(10).fork(); @@ -6751,10 +6751,10 @@ export const SourceCodeInfo_Location = { writer.int32(v); } writer.ldelim(); - if (message.leadingComments !== "") { + if (message.leadingComments !== '') { writer.uint32(26).string(message.leadingComments); } - if (message.trailingComments !== "") { + if (message.trailingComments !== '') { writer.uint32(34).string(message.trailingComments); } for (const v of message.leadingDetachedComments) { @@ -6769,38 +6769,38 @@ export const SourceCodeInfo_Location = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.path.push(reader.int32()); } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { + } else { + message.path.push(reader.int32()); + } + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.span.push(reader.int32()); } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.span.push(reader.int32()); + } + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6809,8 +6809,8 @@ export const SourceCodeInfo_Location = { const message = createBaseSourceCodeInfo_Location(); message.path = object.path?.map(e => e) || []; message.span = object.span?.map(e => e) || []; - message.leadingComments = object.leadingComments ?? ""; - message.trailingComments = object.trailingComments ?? ""; + message.leadingComments = object.leadingComments ?? ''; + message.trailingComments = object.trailingComments ?? ''; message.leadingDetachedComments = object.leadingDetachedComments?.map(e => e) || []; return message; }, @@ -6839,8 +6839,8 @@ export const SourceCodeInfo_Location = { } else { obj.span = message.span; } - obj.leading_comments = message.leadingComments === "" ? undefined : message.leadingComments; - obj.trailing_comments = message.trailingComments === "" ? undefined : message.trailingComments; + obj.leading_comments = message.leadingComments === '' ? undefined : message.leadingComments; + obj.trailing_comments = message.trailingComments === '' ? undefined : message.trailingComments; if (message.leadingDetachedComments) { obj.leading_detached_comments = message.leadingDetachedComments.map(e => e); } else { @@ -6859,7 +6859,7 @@ export const SourceCodeInfo_Location = { }, toProtoMsg(message: SourceCodeInfo_Location): SourceCodeInfo_LocationProtoMsg { return { - typeUrl: "/google.protobuf.Location", + typeUrl: '/google.protobuf.Location', value: SourceCodeInfo_Location.encode(message).finish() }; } @@ -6871,7 +6871,7 @@ function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { }; } export const GeneratedCodeInfo = { - typeUrl: "/google.protobuf.GeneratedCodeInfo", + typeUrl: '/google.protobuf.GeneratedCodeInfo', is(o: any): o is GeneratedCodeInfo { return o && (o.$typeUrl === GeneratedCodeInfo.typeUrl || Array.isArray(o.annotation) && (!o.annotation.length || GeneratedCodeInfo_Annotation.is(o.annotation[0]))); }, @@ -6891,12 +6891,12 @@ export const GeneratedCodeInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6931,7 +6931,7 @@ export const GeneratedCodeInfo = { }, toProtoMsg(message: GeneratedCodeInfo): GeneratedCodeInfoProtoMsg { return { - typeUrl: "/google.protobuf.GeneratedCodeInfo", + typeUrl: '/google.protobuf.GeneratedCodeInfo', value: GeneratedCodeInfo.encode(message).finish() }; } @@ -6940,19 +6940,19 @@ GlobalDecoderRegistry.register(GeneratedCodeInfo.typeUrl, GeneratedCodeInfo); function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { return { path: [], - sourceFile: "", + sourceFile: '', begin: 0, end: 0, semantic: 1 }; } export const GeneratedCodeInfo_Annotation = { - typeUrl: "/google.protobuf.Annotation", + typeUrl: '/google.protobuf.Annotation', is(o: any): o is GeneratedCodeInfo_Annotation { - return o && (o.$typeUrl === GeneratedCodeInfo_Annotation.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === "number") && typeof o.sourceFile === "string" && typeof o.begin === "number" && typeof o.end === "number" && isSet(o.semantic)); + return o && (o.$typeUrl === GeneratedCodeInfo_Annotation.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === 'number') && typeof o.sourceFile === 'string' && typeof o.begin === 'number' && typeof o.end === 'number' && isSet(o.semantic)); }, isAmino(o: any): o is GeneratedCodeInfo_AnnotationAmino { - return o && (o.$typeUrl === GeneratedCodeInfo_Annotation.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === "number") && typeof o.source_file === "string" && typeof o.begin === "number" && typeof o.end === "number" && isSet(o.semantic)); + return o && (o.$typeUrl === GeneratedCodeInfo_Annotation.typeUrl || Array.isArray(o.path) && (!o.path.length || typeof o.path[0] === 'number') && typeof o.source_file === 'string' && typeof o.begin === 'number' && typeof o.end === 'number' && isSet(o.semantic)); }, encode(message: GeneratedCodeInfo_Annotation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { writer.uint32(10).fork(); @@ -6960,7 +6960,7 @@ export const GeneratedCodeInfo_Annotation = { writer.int32(v); } writer.ldelim(); - if (message.sourceFile !== "") { + if (message.sourceFile !== '') { writer.uint32(18).string(message.sourceFile); } if (message.begin !== 0) { @@ -6981,31 +6981,31 @@ export const GeneratedCodeInfo_Annotation = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.path.push(reader.int32()); } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - case 5: - message.semantic = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.path.push(reader.int32()); + } + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + case 5: + message.semantic = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -7013,7 +7013,7 @@ export const GeneratedCodeInfo_Annotation = { fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation { const message = createBaseGeneratedCodeInfo_Annotation(); message.path = object.path?.map(e => e) || []; - message.sourceFile = object.sourceFile ?? ""; + message.sourceFile = object.sourceFile ?? ''; message.begin = object.begin ?? 0; message.end = object.end ?? 0; message.semantic = object.semantic ?? 1; @@ -7043,7 +7043,7 @@ export const GeneratedCodeInfo_Annotation = { } else { obj.path = message.path; } - obj.source_file = message.sourceFile === "" ? undefined : message.sourceFile; + obj.source_file = message.sourceFile === '' ? undefined : message.sourceFile; obj.begin = message.begin === 0 ? undefined : message.begin; obj.end = message.end === 0 ? undefined : message.end; obj.semantic = message.semantic === 1 ? undefined : message.semantic; @@ -7060,7 +7060,7 @@ export const GeneratedCodeInfo_Annotation = { }, toProtoMsg(message: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_AnnotationProtoMsg { return { - typeUrl: "/google.protobuf.Annotation", + typeUrl: '/google.protobuf.Annotation', value: GeneratedCodeInfo_Annotation.encode(message).finish() }; } diff --git a/libs/cosmos-types/google/protobuf/duration.ts b/libs/cosmos-types/google/protobuf/duration.ts index 6e3e301a..0b4d5a96 100644 --- a/libs/cosmos-types/google/protobuf/duration.ts +++ b/libs/cosmos-types/google/protobuf/duration.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; /** * A Duration represents a signed, fixed-length span of time represented * as a count of seconds and fractions of seconds at nanosecond @@ -79,7 +79,7 @@ export interface Duration { nanos: number; } export interface DurationProtoMsg { - typeUrl: "/google.protobuf.Duration"; + typeUrl: '/google.protobuf.Duration'; value: Uint8Array; } /** @@ -144,7 +144,7 @@ export interface DurationProtoMsg { */ export type DurationAmino = string; export interface DurationAminoMsg { - type: "/google.protobuf.Duration"; + type: '/google.protobuf.Duration'; value: DurationAmino; } function createBaseDuration(): Duration { @@ -154,12 +154,12 @@ function createBaseDuration(): Duration { }; } export const Duration = { - typeUrl: "/google.protobuf.Duration", + typeUrl: '/google.protobuf.Duration', is(o: any): o is Duration { - return o && (o.$typeUrl === Duration.typeUrl || typeof o.seconds === "bigint" && typeof o.nanos === "number"); + return o && (o.$typeUrl === Duration.typeUrl || typeof o.seconds === 'bigint' && typeof o.nanos === 'number'); }, isAmino(o: any): o is DurationAmino { - return o && (o.$typeUrl === Duration.typeUrl || typeof o.seconds === "bigint" && typeof o.nanos === "number"); + return o && (o.$typeUrl === Duration.typeUrl || typeof o.seconds === 'bigint' && typeof o.nanos === 'number'); }, encode(message: Duration, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.seconds !== BigInt(0)) { @@ -177,15 +177,15 @@ export const Duration = { while (reader.pos < end) { const 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; + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -199,12 +199,12 @@ export const Duration = { fromAmino(object: DurationAmino): Duration { const value = BigInt(object); return { - seconds: value / BigInt("1000000000"), - nanos: Number(value % BigInt("1000000000")) + seconds: value / BigInt('1000000000'), + nanos: Number(value % BigInt('1000000000')) }; }, toAmino(message: Duration): DurationAmino { - return (message.seconds * BigInt("1000000000") + BigInt(message.nanos)).toString(); + return (message.seconds * BigInt('1000000000') + BigInt(message.nanos)).toString(); }, fromAminoMsg(object: DurationAminoMsg): Duration { return Duration.fromAmino(object.value); @@ -217,7 +217,7 @@ export const Duration = { }, toProtoMsg(message: Duration): DurationProtoMsg { return { - typeUrl: "/google.protobuf.Duration", + typeUrl: '/google.protobuf.Duration', value: Duration.encode(message).finish() }; } diff --git a/libs/cosmos-types/google/protobuf/timestamp.ts b/libs/cosmos-types/google/protobuf/timestamp.ts index d4d255b3..f9311252 100644 --- a/libs/cosmos-types/google/protobuf/timestamp.ts +++ b/libs/cosmos-types/google/protobuf/timestamp.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { DeepPartial, fromJsonTimestamp, fromTimestamp } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; /** * A Timestamp represents a point in time independent of any time zone or local * calendar, encoded as a count of seconds and fractions of seconds at @@ -108,7 +108,7 @@ export interface Timestamp { nanos: number; } export interface TimestampProtoMsg { - typeUrl: "/google.protobuf.Timestamp"; + typeUrl: '/google.protobuf.Timestamp'; value: Uint8Array; } /** @@ -204,7 +204,7 @@ export interface TimestampProtoMsg { */ export type TimestampAmino = string; export interface TimestampAminoMsg { - type: "/google.protobuf.Timestamp"; + type: '/google.protobuf.Timestamp'; value: TimestampAmino; } function createBaseTimestamp(): Timestamp { @@ -214,12 +214,12 @@ function createBaseTimestamp(): Timestamp { }; } export const Timestamp = { - typeUrl: "/google.protobuf.Timestamp", + typeUrl: '/google.protobuf.Timestamp', is(o: any): o is Timestamp { - return o && (o.$typeUrl === Timestamp.typeUrl || typeof o.seconds === "bigint" && typeof o.nanos === "number"); + return o && (o.$typeUrl === Timestamp.typeUrl || typeof o.seconds === 'bigint' && typeof o.nanos === 'number'); }, isAmino(o: any): o is TimestampAmino { - return o && (o.$typeUrl === Timestamp.typeUrl || typeof o.seconds === "bigint" && typeof o.nanos === "number"); + return o && (o.$typeUrl === Timestamp.typeUrl || typeof o.seconds === 'bigint' && typeof o.nanos === 'number'); }, encode(message: Timestamp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.seconds !== BigInt(0)) { @@ -237,15 +237,15 @@ export const Timestamp = { while (reader.pos < end) { const 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; + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -260,7 +260,7 @@ export const Timestamp = { return fromJsonTimestamp(object); }, toAmino(message: Timestamp): TimestampAmino { - return fromTimestamp(message).toISOString().replace(/\.\d+Z$/, "Z"); + return fromTimestamp(message).toISOString().replace(/\.\d+Z$/, 'Z'); }, fromAminoMsg(object: TimestampAminoMsg): Timestamp { return Timestamp.fromAmino(object.value); @@ -273,7 +273,7 @@ export const Timestamp = { }, toProtoMsg(message: Timestamp): TimestampProtoMsg { return { - typeUrl: "/google.protobuf.Timestamp", + typeUrl: '/google.protobuf.Timestamp', value: Timestamp.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/applications/transfer/v1/transfer.ts b/libs/cosmos-types/ibc/applications/transfer/v1/transfer.ts index 71401dc3..c5ec8613 100644 --- a/libs/cosmos-types/ibc/applications/transfer/v1/transfer.ts +++ b/libs/cosmos-types/ibc/applications/transfer/v1/transfer.ts @@ -1,40 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - baseDenom: string; -} -export interface DenomTraceProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.DenomTrace"; - value: Uint8Array; -} -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTraceAmino { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - base_denom: string; -} -export interface DenomTraceAminoMsg { - type: "cosmos-sdk/DenomTrace"; - value: DenomTraceAmino; -} +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; /** * Params defines the set of IBC transfer parameters. * NOTE: To prevent a single token from being transferred, set the @@ -54,7 +20,7 @@ export interface Params { receiveEnabled: boolean; } export interface ParamsProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.Params"; + typeUrl: '/ibc.applications.transfer.v1.Params'; value: Uint8Array; } /** @@ -76,99 +42,9 @@ export interface ParamsAmino { receive_enabled: boolean; } export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; + type: 'cosmos-sdk/Params'; value: ParamsAmino; } -function createBaseDenomTrace(): DenomTrace { - return { - path: "", - baseDenom: "" - }; -} -export const DenomTrace = { - typeUrl: "/ibc.applications.transfer.v1.DenomTrace", - aminoType: "cosmos-sdk/DenomTrace", - is(o: any): o is DenomTrace { - return o && (o.$typeUrl === DenomTrace.typeUrl || typeof o.path === "string" && typeof o.baseDenom === "string"); - }, - isAmino(o: any): o is DenomTraceAmino { - return o && (o.$typeUrl === DenomTrace.typeUrl || typeof o.path === "string" && typeof o.base_denom === "string"); - }, - encode(message: DenomTrace, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.baseDenom !== "") { - writer.uint32(18).string(message.baseDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DenomTrace { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDenomTrace(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.baseDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): DenomTrace { - const message = createBaseDenomTrace(); - message.path = object.path ?? ""; - message.baseDenom = object.baseDenom ?? ""; - return message; - }, - fromAmino(object: DenomTraceAmino): DenomTrace { - const message = createBaseDenomTrace(); - if (object.path !== undefined && object.path !== null) { - message.path = object.path; - } - if (object.base_denom !== undefined && object.base_denom !== null) { - message.baseDenom = object.base_denom; - } - return message; - }, - toAmino(message: DenomTrace): DenomTraceAmino { - const obj: any = {}; - obj.path = message.path === "" ? undefined : message.path; - obj.base_denom = message.baseDenom === "" ? undefined : message.baseDenom; - return obj; - }, - fromAminoMsg(object: DenomTraceAminoMsg): DenomTrace { - return DenomTrace.fromAmino(object.value); - }, - toAminoMsg(message: DenomTrace): DenomTraceAminoMsg { - return { - type: "cosmos-sdk/DenomTrace", - value: DenomTrace.toAmino(message) - }; - }, - fromProtoMsg(message: DenomTraceProtoMsg): DenomTrace { - return DenomTrace.decode(message.value); - }, - toProto(message: DenomTrace): Uint8Array { - return DenomTrace.encode(message).finish(); - }, - toProtoMsg(message: DenomTrace): DenomTraceProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.DenomTrace", - value: DenomTrace.encode(message).finish() - }; - } -}; -GlobalDecoderRegistry.register(DenomTrace.typeUrl, DenomTrace); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomTrace.aminoType, DenomTrace.typeUrl); function createBaseParams(): Params { return { sendEnabled: false, @@ -176,13 +52,13 @@ function createBaseParams(): Params { }; } export const Params = { - typeUrl: "/ibc.applications.transfer.v1.Params", - aminoType: "cosmos-sdk/Params", + typeUrl: '/ibc.applications.transfer.v1.Params', + aminoType: 'cosmos-sdk/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || typeof o.sendEnabled === "boolean" && typeof o.receiveEnabled === "boolean"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.sendEnabled === 'boolean' && typeof o.receiveEnabled === 'boolean'); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || typeof o.send_enabled === "boolean" && typeof o.receive_enabled === "boolean"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.send_enabled === 'boolean' && typeof o.receive_enabled === 'boolean'); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.sendEnabled === true) { @@ -200,15 +76,15 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sendEnabled = reader.bool(); - break; - case 2: - message.receiveEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sendEnabled = reader.bool(); + break; + case 2: + message.receiveEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -240,7 +116,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/Params", + type: 'cosmos-sdk/Params', value: Params.toAmino(message) }; }, @@ -252,7 +128,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/ibc.applications.transfer.v1.Params", + typeUrl: '/ibc.applications.transfer.v1.Params', value: Params.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/applications/transfer/v1/tx.amino.ts b/libs/cosmos-types/ibc/applications/transfer/v1/tx.amino.ts index 0ebb51c7..2c08ab5f 100644 --- a/libs/cosmos-types/ibc/applications/transfer/v1/tx.amino.ts +++ b/libs/cosmos-types/ibc/applications/transfer/v1/tx.amino.ts @@ -1,12 +1,12 @@ -import { MsgTransfer, MsgUpdateParams } from "./tx"; +import { MsgTransfer, MsgUpdateParams } from './tx'; export const AminoConverter = { - "/ibc.applications.transfer.v1.MsgTransfer": { - aminoType: "cosmos-sdk/MsgTransfer", + '/ibc.applications.transfer.v1.MsgTransfer': { + aminoType: 'cosmos-sdk/MsgTransfer', toAmino: MsgTransfer.toAmino, fromAmino: MsgTransfer.fromAmino }, - "/ibc.applications.transfer.v1.MsgUpdateParams": { - aminoType: "cosmos-sdk/MsgUpdateParams", + '/ibc.applications.transfer.v1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino } diff --git a/libs/cosmos-types/ibc/applications/transfer/v1/tx.registry.ts b/libs/cosmos-types/ibc/applications/transfer/v1/tx.registry.ts index 41724d76..47787c50 100644 --- a/libs/cosmos-types/ibc/applications/transfer/v1/tx.registry.ts +++ b/libs/cosmos-types/ibc/applications/transfer/v1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../../types"; -import { MsgTransfer, MsgUpdateParams } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], ["/ibc.applications.transfer.v1.MsgUpdateParams", MsgUpdateParams]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../../types'; +import { MsgTransfer, MsgUpdateParams } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/ibc.applications.transfer.v1.MsgTransfer', MsgTransfer], ['/ibc.applications.transfer.v1.MsgUpdateParams', MsgUpdateParams]]; \ No newline at end of file diff --git a/libs/cosmos-types/ibc/applications/transfer/v1/tx.rpc.msg.ts b/libs/cosmos-types/ibc/applications/transfer/v1/tx.rpc.msg.ts index d96f566f..9ec9c769 100644 --- a/libs/cosmos-types/ibc/applications/transfer/v1/tx.rpc.msg.ts +++ b/libs/cosmos-types/ibc/applications/transfer/v1/tx.rpc.msg.ts @@ -1,25 +1,25 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../../types"; -import { MsgTransfer, MsgUpdateParams } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../../types'; +import { MsgTransfer, MsgUpdateParams } from './tx'; /** Msg defines the ibc/transfer Msg service. */ export interface Msg { /** Transfer defines a rpc handler method for MsgTransfer. */ - transfer(signerAddress: string, message: MsgTransfer, fee: number | StdFee | "auto", memo?: string): Promise; + transfer(signerAddress: string, message: MsgTransfer, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateParams defines a rpc handler for MsgUpdateParams. */ - updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the ibc/transfer Msg service. */ export interface StargateImpl { /** Transfer defines a rpc handler method for MsgTransfer. */ - transfer(signerAddress: string, message: MsgTransfer, fee: number | StdFee | "auto", memo?: string): Promise; + transfer(signerAddress: string, message: MsgTransfer, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateParams defines a rpc handler for MsgUpdateParams. */ - updateIBCTransferParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateIBCTransferParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } /** Msg defines the ibc/transfer Msg service. */ export interface CosmWasmStargateImpl { /** Transfer defines a rpc handler method for MsgTransfer. */ - transfer(signerAddress: string, message: MsgTransfer, fee: number | StdFee | "auto", memo?: string): Promise; + transfer(signerAddress: string, message: MsgTransfer, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateParams defines a rpc handler for MsgUpdateParams. */ - updateIBCTransferParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateIBCTransferParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -27,7 +27,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* Transfer defines a rpc handler method for MsgTransfer. */ - transfer = async (signerAddress: string, message: MsgTransfer, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + transfer = async (signerAddress: string, message: MsgTransfer, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgTransfer.typeUrl, value: message @@ -35,7 +35,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateParams defines a rpc handler for MsgUpdateParams. */ - updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message diff --git a/libs/cosmos-types/ibc/applications/transfer/v1/tx.ts b/libs/cosmos-types/ibc/applications/transfer/v1/tx.ts index 4b2d7c6c..5ce5c5a0 100644 --- a/libs/cosmos-types/ibc/applications/transfer/v1/tx.ts +++ b/libs/cosmos-types/ibc/applications/transfer/v1/tx.ts @@ -1,8 +1,8 @@ -import { Coin, CoinAmino } from "../../../../cosmos/base/v1beta1/coin"; -import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { Coin, CoinAmino } from '../../../../cosmos/base/v1beta1/coin'; +import { DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { Height, HeightAmino, Params, ParamsAmino } from '../../../core/client/v1/client'; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between * ICS20 enabled chains. See ICS Spec here: @@ -13,7 +13,8 @@ export interface MsgTransfer { sourcePort: string; /** the channel by which the packet will be sent */ sourceChannel: string; - /** the tokens to be transferred */ + /** the token to be transferred. this field has been replaced by the tokens field. */ + /** @deprecated */ token: Coin; /** the sender address */ sender: string; @@ -31,9 +32,11 @@ export interface MsgTransfer { timeoutTimestamp: bigint; /** optional memo */ memo: string; + /** tokens to be transferred */ + tokens: Coin[]; } export interface MsgTransferProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer"; + typeUrl: '/ibc.applications.transfer.v1.MsgTransfer'; value: Uint8Array; } /** @@ -46,7 +49,8 @@ export interface MsgTransferAmino { source_port: string; /** the channel by which the packet will be sent */ source_channel: string; - /** the tokens to be transferred */ + /** the token to be transferred. this field has been replaced by the tokens field. */ + /** @deprecated */ token: CoinAmino; /** the sender address */ sender: string; @@ -64,9 +68,11 @@ export interface MsgTransferAmino { timeout_timestamp: string; /** optional memo */ memo: string; + /** tokens to be transferred */ + tokens: CoinAmino[]; } export interface MsgTransferAminoMsg { - type: "cosmos-sdk/MsgTransfer"; + type: 'cosmos-sdk/MsgTransfer'; value: MsgTransferAmino; } /** MsgTransferResponse defines the Msg/Transfer response type. */ @@ -75,7 +81,7 @@ export interface MsgTransferResponse { sequence: bigint; } export interface MsgTransferResponseProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse"; + typeUrl: '/ibc.applications.transfer.v1.MsgTransferResponse'; value: Uint8Array; } /** MsgTransferResponse defines the Msg/Transfer response type. */ @@ -84,7 +90,7 @@ export interface MsgTransferResponseAmino { sequence: string; } export interface MsgTransferResponseAminoMsg { - type: "cosmos-sdk/MsgTransferResponse"; + type: 'cosmos-sdk/MsgTransferResponse'; value: MsgTransferResponseAmino; } /** MsgUpdateParams is the Msg/UpdateParams request type. */ @@ -99,7 +105,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams"; + typeUrl: '/ibc.applications.transfer.v1.MsgUpdateParams'; value: Uint8Array; } /** MsgUpdateParams is the Msg/UpdateParams request type. */ @@ -114,7 +120,7 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/MsgUpdateParams"; + type: 'cosmos-sdk/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** @@ -123,7 +129,7 @@ export interface MsgUpdateParamsAminoMsg { */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse"; + typeUrl: '/ibc.applications.transfer.v1.MsgUpdateParamsResponse'; value: Uint8Array; } /** @@ -132,44 +138,45 @@ export interface MsgUpdateParamsResponseProtoMsg { */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } function createBaseMsgTransfer(): MsgTransfer { return { - sourcePort: "", - sourceChannel: "", + sourcePort: '', + sourceChannel: '', token: Coin.fromPartial({}), - sender: "", - receiver: "", + sender: '', + receiver: '', timeoutHeight: Height.fromPartial({}), timeoutTimestamp: BigInt(0), - memo: "" + memo: '', + tokens: [] }; } export const MsgTransfer = { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - aminoType: "cosmos-sdk/MsgTransfer", + typeUrl: '/ibc.applications.transfer.v1.MsgTransfer', + aminoType: 'cosmos-sdk/MsgTransfer', is(o: any): o is MsgTransfer { - return o && (o.$typeUrl === MsgTransfer.typeUrl || typeof o.sourcePort === "string" && typeof o.sourceChannel === "string" && Coin.is(o.token) && typeof o.sender === "string" && typeof o.receiver === "string" && Height.is(o.timeoutHeight) && typeof o.timeoutTimestamp === "bigint" && typeof o.memo === "string"); + return o && (o.$typeUrl === MsgTransfer.typeUrl || typeof o.sourcePort === 'string' && typeof o.sourceChannel === 'string' && Coin.is(o.token) && typeof o.sender === 'string' && typeof o.receiver === 'string' && Height.is(o.timeoutHeight) && typeof o.timeoutTimestamp === 'bigint' && typeof o.memo === 'string' && Array.isArray(o.tokens) && (!o.tokens.length || Coin.is(o.tokens[0]))); }, isAmino(o: any): o is MsgTransferAmino { - return o && (o.$typeUrl === MsgTransfer.typeUrl || typeof o.source_port === "string" && typeof o.source_channel === "string" && Coin.isAmino(o.token) && typeof o.sender === "string" && typeof o.receiver === "string" && Height.isAmino(o.timeout_height) && typeof o.timeout_timestamp === "bigint" && typeof o.memo === "string"); + return o && (o.$typeUrl === MsgTransfer.typeUrl || typeof o.source_port === 'string' && typeof o.source_channel === 'string' && Coin.isAmino(o.token) && typeof o.sender === 'string' && typeof o.receiver === 'string' && Height.isAmino(o.timeout_height) && typeof o.timeout_timestamp === 'bigint' && typeof o.memo === 'string' && Array.isArray(o.tokens) && (!o.tokens.length || Coin.isAmino(o.tokens[0]))); }, encode(message: MsgTransfer, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sourcePort !== "") { + if (message.sourcePort !== '') { writer.uint32(10).string(message.sourcePort); } - if (message.sourceChannel !== "") { + if (message.sourceChannel !== '') { writer.uint32(18).string(message.sourceChannel); } if (message.token !== undefined) { Coin.encode(message.token, writer.uint32(26).fork()).ldelim(); } - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(34).string(message.sender); } - if (message.receiver !== "") { + if (message.receiver !== '') { writer.uint32(42).string(message.receiver); } if (message.timeoutHeight !== undefined) { @@ -178,9 +185,12 @@ export const MsgTransfer = { if (message.timeoutTimestamp !== BigInt(0)) { writer.uint32(56).uint64(message.timeoutTimestamp); } - if (message.memo !== "") { + if (message.memo !== '') { writer.uint32(66).string(message.memo); } + for (const v of message.tokens) { + Coin.encode(v!, writer.uint32(74).fork()).ldelim(); + } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgTransfer { @@ -190,47 +200,51 @@ export const MsgTransfer = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sourcePort = reader.string(); - break; - case 2: - message.sourceChannel = reader.string(); - break; - case 3: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeoutTimestamp = reader.uint64(); - break; - case 8: - message.memo = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sourcePort = reader.string(); + break; + case 2: + message.sourceChannel = reader.string(); + break; + case 3: + message.token = Coin.decode(reader, reader.uint32()); + break; + case 4: + message.sender = reader.string(); + break; + case 5: + message.receiver = reader.string(); + break; + case 6: + message.timeoutHeight = Height.decode(reader, reader.uint32()); + break; + case 7: + message.timeoutTimestamp = reader.uint64(); + break; + case 8: + message.memo = reader.string(); + break; + case 9: + message.tokens.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgTransfer { const message = createBaseMsgTransfer(); - message.sourcePort = object.sourcePort ?? ""; - message.sourceChannel = object.sourceChannel ?? ""; + message.sourcePort = object.sourcePort ?? ''; + message.sourceChannel = object.sourceChannel ?? ''; message.token = object.token !== undefined && object.token !== null ? Coin.fromPartial(object.token) : undefined; - message.sender = object.sender ?? ""; - message.receiver = object.receiver ?? ""; + message.sender = object.sender ?? ''; + message.receiver = object.receiver ?? ''; message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? Height.fromPartial(object.timeoutHeight) : undefined; message.timeoutTimestamp = object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0); - message.memo = object.memo ?? ""; + message.memo = object.memo ?? ''; + message.tokens = object.tokens?.map(e => Coin.fromPartial(e)) || []; return message; }, fromAmino(object: MsgTransferAmino): MsgTransfer { @@ -259,18 +273,24 @@ export const MsgTransfer = { if (object.memo !== undefined && object.memo !== null) { message.memo = object.memo; } + message.tokens = object.tokens?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgTransfer): MsgTransferAmino { const obj: any = {}; - obj.source_port = message.sourcePort === "" ? undefined : message.sourcePort; - obj.source_channel = message.sourceChannel === "" ? undefined : message.sourceChannel; + obj.source_port = message.sourcePort === '' ? undefined : message.sourcePort; + obj.source_channel = message.sourceChannel === '' ? undefined : message.sourceChannel; obj.token = message.token ? Coin.toAmino(message.token) : Coin.toAmino(Coin.fromPartial({})); - obj.sender = message.sender === "" ? undefined : message.sender; - obj.receiver = message.receiver === "" ? undefined : message.receiver; + obj.sender = message.sender === '' ? undefined : message.sender; + obj.receiver = message.receiver === '' ? undefined : message.receiver; obj.timeout_height = message.timeoutHeight ? Height.toAmino(message.timeoutHeight) : {}; obj.timeout_timestamp = message.timeoutTimestamp !== BigInt(0) ? message.timeoutTimestamp.toString() : undefined; - obj.memo = message.memo === "" ? undefined : message.memo; + obj.memo = message.memo === '' ? undefined : message.memo; + if (message.tokens) { + obj.tokens = message.tokens.map(e => e ? Coin.toAmino(e) : undefined); + } else { + obj.tokens = message.tokens; + } return obj; }, fromAminoMsg(object: MsgTransferAminoMsg): MsgTransfer { @@ -278,7 +298,7 @@ export const MsgTransfer = { }, toAminoMsg(message: MsgTransfer): MsgTransferAminoMsg { return { - type: "cosmos-sdk/MsgTransfer", + type: 'cosmos-sdk/MsgTransfer', value: MsgTransfer.toAmino(message) }; }, @@ -290,7 +310,7 @@ export const MsgTransfer = { }, toProtoMsg(message: MsgTransfer): MsgTransferProtoMsg { return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", + typeUrl: '/ibc.applications.transfer.v1.MsgTransfer', value: MsgTransfer.encode(message).finish() }; } @@ -303,13 +323,13 @@ function createBaseMsgTransferResponse(): MsgTransferResponse { }; } export const MsgTransferResponse = { - typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", - aminoType: "cosmos-sdk/MsgTransferResponse", + typeUrl: '/ibc.applications.transfer.v1.MsgTransferResponse', + aminoType: 'cosmos-sdk/MsgTransferResponse', is(o: any): o is MsgTransferResponse { - return o && (o.$typeUrl === MsgTransferResponse.typeUrl || typeof o.sequence === "bigint"); + return o && (o.$typeUrl === MsgTransferResponse.typeUrl || typeof o.sequence === 'bigint'); }, isAmino(o: any): o is MsgTransferResponseAmino { - return o && (o.$typeUrl === MsgTransferResponse.typeUrl || typeof o.sequence === "bigint"); + return o && (o.$typeUrl === MsgTransferResponse.typeUrl || typeof o.sequence === 'bigint'); }, encode(message: MsgTransferResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.sequence !== BigInt(0)) { @@ -324,12 +344,12 @@ export const MsgTransferResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -356,7 +376,7 @@ export const MsgTransferResponse = { }, toAminoMsg(message: MsgTransferResponse): MsgTransferResponseAminoMsg { return { - type: "cosmos-sdk/MsgTransferResponse", + type: 'cosmos-sdk/MsgTransferResponse', value: MsgTransferResponse.toAmino(message) }; }, @@ -368,7 +388,7 @@ export const MsgTransferResponse = { }, toProtoMsg(message: MsgTransferResponse): MsgTransferResponseProtoMsg { return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", + typeUrl: '/ibc.applications.transfer.v1.MsgTransferResponse', value: MsgTransferResponse.encode(message).finish() }; } @@ -377,21 +397,21 @@ GlobalDecoderRegistry.register(MsgTransferResponse.typeUrl, MsgTransferResponse) GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransferResponse.aminoType, MsgTransferResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - signer: "", + signer: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams", - aminoType: "cosmos-sdk/MsgUpdateParams", + typeUrl: '/ibc.applications.transfer.v1.MsgUpdateParams', + aminoType: 'cosmos-sdk/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(10).string(message.signer); } if (message.params !== undefined) { @@ -406,22 +426,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.signer = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.signer = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -437,7 +457,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; obj.params = message.params ? Params.toAmino(message.params) : undefined; return obj; }, @@ -446,7 +466,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParams", + type: 'cosmos-sdk/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -458,7 +478,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams", + typeUrl: '/ibc.applications.transfer.v1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -469,8 +489,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/MsgUpdateParamsResponse", + typeUrl: '/ibc.applications.transfer.v1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -487,9 +507,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -511,7 +531,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParamsResponse", + type: 'cosmos-sdk/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -523,7 +543,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse", + typeUrl: '/ibc.applications.transfer.v1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/client.ts b/libs/cosmos-types/ibc/client.ts index 1256ef06..7d358c51 100644 --- a/libs/cosmos-types/ibc/client.ts +++ b/libs/cosmos-types/ibc/client.ts @@ -1,14 +1,15 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as ibcApplicationsTransferV1TxRegistry from "./applications/transfer/v1/tx.registry"; -import * as ibcCoreChannelV1TxRegistry from "./core/channel/v1/tx.registry"; -import * as ibcCoreClientV1TxRegistry from "./core/client/v1/tx.registry"; -import * as ibcCoreConnectionV1TxRegistry from "./core/connection/v1/tx.registry"; -import * as ibcApplicationsTransferV1TxAmino from "./applications/transfer/v1/tx.amino"; -import * as ibcCoreChannelV1TxAmino from "./core/channel/v1/tx.amino"; -import * as ibcCoreClientV1TxAmino from "./core/client/v1/tx.amino"; -import * as ibcCoreConnectionV1TxAmino from "./core/connection/v1/tx.amino"; +import { GeneratedType, OfflineSigner,Registry } from '@cosmjs/proto-signing'; +import { AminoTypes, defaultRegistryTypes, SigningStargateClient } from '@cosmjs/stargate'; +import { HttpEndpoint } from '@cosmjs/tendermint-rpc'; + +import * as ibcApplicationsTransferV1TxAmino from './applications/transfer/v1/tx.amino'; +import * as ibcApplicationsTransferV1TxRegistry from './applications/transfer/v1/tx.registry'; +import * as ibcCoreChannelV1TxAmino from './core/channel/v1/tx.amino'; +import * as ibcCoreChannelV1TxRegistry from './core/channel/v1/tx.registry'; +import * as ibcCoreClientV1TxAmino from './core/client/v1/tx.amino'; +import * as ibcCoreClientV1TxRegistry from './core/client/v1/tx.registry'; +import * as ibcCoreConnectionV1TxAmino from './core/connection/v1/tx.amino'; +import * as ibcCoreConnectionV1TxRegistry from './core/connection/v1/tx.registry'; export const ibcAminoConverters = { ...ibcApplicationsTransferV1TxAmino.AminoConverter, ...ibcCoreChannelV1TxAmino.AminoConverter, diff --git a/libs/cosmos-types/ibc/core/channel/v1/channel.ts b/libs/cosmos-types/ibc/core/channel/v1/channel.ts index 91357096..61418bc3 100644 --- a/libs/cosmos-types/ibc/core/channel/v1/channel.ts +++ b/libs/cosmos-types/ibc/core/channel/v1/channel.ts @@ -1,7 +1,7 @@ -import { Height, HeightAmino } from "../../client/v1/client"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial, isSet } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { Height, HeightAmino } from '../../client/v1/client'; /** * State defines if a channel is in one of the following states: * CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED. @@ -32,52 +32,52 @@ export enum State { export const StateAmino = State; export function stateFromJSON(object: any): State { switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case 4: - case "STATE_CLOSED": - return State.STATE_CLOSED; - case 5: - case "STATE_FLUSHING": - return State.STATE_FLUSHING; - case 6: - case "STATE_FLUSHCOMPLETE": - return State.STATE_FLUSHCOMPLETE; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; + case 0: + case 'STATE_UNINITIALIZED_UNSPECIFIED': + return State.STATE_UNINITIALIZED_UNSPECIFIED; + case 1: + case 'STATE_INIT': + return State.STATE_INIT; + case 2: + case 'STATE_TRYOPEN': + return State.STATE_TRYOPEN; + case 3: + case 'STATE_OPEN': + return State.STATE_OPEN; + case 4: + case 'STATE_CLOSED': + return State.STATE_CLOSED; + case 5: + case 'STATE_FLUSHING': + return State.STATE_FLUSHING; + case 6: + case 'STATE_FLUSHCOMPLETE': + return State.STATE_FLUSHCOMPLETE; + case -1: + case 'UNRECOGNIZED': + default: + return State.UNRECOGNIZED; } } export function stateToJSON(object: State): string { switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - case State.STATE_CLOSED: - return "STATE_CLOSED"; - case State.STATE_FLUSHING: - return "STATE_FLUSHING"; - case State.STATE_FLUSHCOMPLETE: - return "STATE_FLUSHCOMPLETE"; - case State.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case State.STATE_UNINITIALIZED_UNSPECIFIED: + return 'STATE_UNINITIALIZED_UNSPECIFIED'; + case State.STATE_INIT: + return 'STATE_INIT'; + case State.STATE_TRYOPEN: + return 'STATE_TRYOPEN'; + case State.STATE_OPEN: + return 'STATE_OPEN'; + case State.STATE_CLOSED: + return 'STATE_CLOSED'; + case State.STATE_FLUSHING: + return 'STATE_FLUSHING'; + case State.STATE_FLUSHCOMPLETE: + return 'STATE_FLUSHCOMPLETE'; + case State.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** Order defines if a channel is ORDERED or UNORDERED */ @@ -96,32 +96,32 @@ export enum Order { export const OrderAmino = Order; export function orderFromJSON(object: any): Order { switch (object) { - case 0: - case "ORDER_NONE_UNSPECIFIED": - return Order.ORDER_NONE_UNSPECIFIED; - case 1: - case "ORDER_UNORDERED": - return Order.ORDER_UNORDERED; - case 2: - case "ORDER_ORDERED": - return Order.ORDER_ORDERED; - case -1: - case "UNRECOGNIZED": - default: - return Order.UNRECOGNIZED; + case 0: + case 'ORDER_NONE_UNSPECIFIED': + return Order.ORDER_NONE_UNSPECIFIED; + case 1: + case 'ORDER_UNORDERED': + return Order.ORDER_UNORDERED; + case 2: + case 'ORDER_ORDERED': + return Order.ORDER_ORDERED; + case -1: + case 'UNRECOGNIZED': + default: + return Order.UNRECOGNIZED; } } export function orderToJSON(object: Order): string { switch (object) { - case Order.ORDER_NONE_UNSPECIFIED: - return "ORDER_NONE_UNSPECIFIED"; - case Order.ORDER_UNORDERED: - return "ORDER_UNORDERED"; - case Order.ORDER_ORDERED: - return "ORDER_ORDERED"; - case Order.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case Order.ORDER_NONE_UNSPECIFIED: + return 'ORDER_NONE_UNSPECIFIED'; + case Order.ORDER_UNORDERED: + return 'ORDER_UNORDERED'; + case Order.ORDER_ORDERED: + return 'ORDER_ORDERED'; + case Order.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -150,7 +150,7 @@ export interface Channel { upgradeSequence: bigint; } export interface ChannelProtoMsg { - typeUrl: "/ibc.core.channel.v1.Channel"; + typeUrl: '/ibc.core.channel.v1.Channel'; value: Uint8Array; } /** @@ -179,7 +179,7 @@ export interface ChannelAmino { upgrade_sequence: string; } export interface ChannelAminoMsg { - type: "cosmos-sdk/Channel"; + type: 'cosmos-sdk/Channel'; value: ChannelAmino; } /** @@ -211,7 +211,7 @@ export interface IdentifiedChannel { upgradeSequence: bigint; } export interface IdentifiedChannelProtoMsg { - typeUrl: "/ibc.core.channel.v1.IdentifiedChannel"; + typeUrl: '/ibc.core.channel.v1.IdentifiedChannel'; value: Uint8Array; } /** @@ -243,7 +243,7 @@ export interface IdentifiedChannelAmino { upgrade_sequence: string; } export interface IdentifiedChannelAminoMsg { - type: "cosmos-sdk/IdentifiedChannel"; + type: 'cosmos-sdk/IdentifiedChannel'; value: IdentifiedChannelAmino; } /** Counterparty defines a channel end counterparty */ @@ -254,7 +254,7 @@ export interface Counterparty { channelId: string; } export interface CounterpartyProtoMsg { - typeUrl: "/ibc.core.channel.v1.Counterparty"; + typeUrl: '/ibc.core.channel.v1.Counterparty'; value: Uint8Array; } /** Counterparty defines a channel end counterparty */ @@ -265,7 +265,7 @@ export interface CounterpartyAmino { channel_id: string; } export interface CounterpartyAminoMsg { - type: "cosmos-sdk/Counterparty"; + type: 'cosmos-sdk/Counterparty'; value: CounterpartyAmino; } /** Packet defines a type that carries data across different chains through IBC */ @@ -292,7 +292,7 @@ export interface Packet { timeoutTimestamp: bigint; } export interface PacketProtoMsg { - typeUrl: "/ibc.core.channel.v1.Packet"; + typeUrl: '/ibc.core.channel.v1.Packet'; value: Uint8Array; } /** Packet defines a type that carries data across different chains through IBC */ @@ -319,7 +319,7 @@ export interface PacketAmino { timeout_timestamp: string; } export interface PacketAminoMsg { - type: "cosmos-sdk/Packet"; + type: 'cosmos-sdk/Packet'; value: PacketAmino; } /** @@ -339,7 +339,7 @@ export interface PacketState { data: Uint8Array; } export interface PacketStateProtoMsg { - typeUrl: "/ibc.core.channel.v1.PacketState"; + typeUrl: '/ibc.core.channel.v1.PacketState'; value: Uint8Array; } /** @@ -359,7 +359,7 @@ export interface PacketStateAmino { data: string; } export interface PacketStateAminoMsg { - type: "cosmos-sdk/PacketState"; + type: 'cosmos-sdk/PacketState'; value: PacketStateAmino; } /** @@ -376,7 +376,7 @@ export interface PacketId { sequence: bigint; } export interface PacketIdProtoMsg { - typeUrl: "/ibc.core.channel.v1.PacketId"; + typeUrl: '/ibc.core.channel.v1.PacketId'; value: Uint8Array; } /** @@ -393,7 +393,7 @@ export interface PacketIdAmino { sequence: string; } export interface PacketIdAminoMsg { - type: "cosmos-sdk/PacketId"; + type: 'cosmos-sdk/PacketId'; value: PacketIdAmino; } /** @@ -410,7 +410,7 @@ export interface Acknowledgement { error?: string; } export interface AcknowledgementProtoMsg { - typeUrl: "/ibc.core.channel.v1.Acknowledgement"; + typeUrl: '/ibc.core.channel.v1.Acknowledgement'; value: Uint8Array; } /** @@ -427,7 +427,7 @@ export interface AcknowledgementAmino { error?: string; } export interface AcknowledgementAminoMsg { - type: "cosmos-sdk/Acknowledgement"; + type: 'cosmos-sdk/Acknowledgement'; value: AcknowledgementAmino; } /** @@ -442,7 +442,7 @@ export interface Timeout { timestamp: bigint; } export interface TimeoutProtoMsg { - typeUrl: "/ibc.core.channel.v1.Timeout"; + typeUrl: '/ibc.core.channel.v1.Timeout'; value: Uint8Array; } /** @@ -457,7 +457,7 @@ export interface TimeoutAmino { timestamp: string; } export interface TimeoutAminoMsg { - type: "cosmos-sdk/Timeout"; + type: 'cosmos-sdk/Timeout'; value: TimeoutAmino; } /** Params defines the set of IBC channel parameters. */ @@ -466,7 +466,7 @@ export interface Params { upgradeTimeout: Timeout; } export interface ParamsProtoMsg { - typeUrl: "/ibc.core.channel.v1.Params"; + typeUrl: '/ibc.core.channel.v1.Params'; value: Uint8Array; } /** Params defines the set of IBC channel parameters. */ @@ -475,7 +475,7 @@ export interface ParamsAmino { upgrade_timeout: TimeoutAmino; } export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; + type: 'cosmos-sdk/Params'; value: ParamsAmino; } function createBaseChannel(): Channel { @@ -484,18 +484,18 @@ function createBaseChannel(): Channel { ordering: 0, counterparty: Counterparty.fromPartial({}), connectionHops: [], - version: "", + version: '', upgradeSequence: BigInt(0) }; } export const Channel = { - typeUrl: "/ibc.core.channel.v1.Channel", - aminoType: "cosmos-sdk/Channel", + typeUrl: '/ibc.core.channel.v1.Channel', + aminoType: 'cosmos-sdk/Channel', is(o: any): o is Channel { - return o && (o.$typeUrl === Channel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.is(o.counterparty) && Array.isArray(o.connectionHops) && (!o.connectionHops.length || typeof o.connectionHops[0] === "string") && typeof o.version === "string" && typeof o.upgradeSequence === "bigint"); + return o && (o.$typeUrl === Channel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.is(o.counterparty) && Array.isArray(o.connectionHops) && (!o.connectionHops.length || typeof o.connectionHops[0] === 'string') && typeof o.version === 'string' && typeof o.upgradeSequence === 'bigint'); }, isAmino(o: any): o is ChannelAmino { - return o && (o.$typeUrl === Channel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.isAmino(o.counterparty) && Array.isArray(o.connection_hops) && (!o.connection_hops.length || typeof o.connection_hops[0] === "string") && typeof o.version === "string" && typeof o.upgrade_sequence === "bigint"); + return o && (o.$typeUrl === Channel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.isAmino(o.counterparty) && Array.isArray(o.connection_hops) && (!o.connection_hops.length || typeof o.connection_hops[0] === 'string') && typeof o.version === 'string' && typeof o.upgrade_sequence === 'bigint'); }, encode(message: Channel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.state !== 0) { @@ -510,7 +510,7 @@ export const Channel = { for (const v of message.connectionHops) { writer.uint32(34).string(v!); } - if (message.version !== "") { + if (message.version !== '') { writer.uint32(42).string(message.version); } if (message.upgradeSequence !== BigInt(0)) { @@ -525,27 +525,27 @@ export const Channel = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = (reader.int32() as any); - break; - case 2: - message.ordering = (reader.int32() as any); - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.upgradeSequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.state = (reader.int32() as any); + break; + case 2: + message.ordering = (reader.int32() as any); + break; + case 3: + message.counterparty = Counterparty.decode(reader, reader.uint32()); + break; + case 4: + message.connectionHops.push(reader.string()); + break; + case 5: + message.version = reader.string(); + break; + case 6: + message.upgradeSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -556,7 +556,7 @@ export const Channel = { message.ordering = object.ordering ?? 0; message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; message.connectionHops = object.connectionHops?.map(e => e) || []; - message.version = object.version ?? ""; + message.version = object.version ?? ''; message.upgradeSequence = object.upgradeSequence !== undefined && object.upgradeSequence !== null ? BigInt(object.upgradeSequence.toString()) : BigInt(0); return message; }, @@ -590,7 +590,7 @@ export const Channel = { } else { obj.connection_hops = message.connectionHops; } - obj.version = message.version === "" ? undefined : message.version; + obj.version = message.version === '' ? undefined : message.version; obj.upgrade_sequence = message.upgradeSequence !== BigInt(0) ? message.upgradeSequence.toString() : undefined; return obj; }, @@ -599,7 +599,7 @@ export const Channel = { }, toAminoMsg(message: Channel): ChannelAminoMsg { return { - type: "cosmos-sdk/Channel", + type: 'cosmos-sdk/Channel', value: Channel.toAmino(message) }; }, @@ -611,7 +611,7 @@ export const Channel = { }, toProtoMsg(message: Channel): ChannelProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.Channel", + typeUrl: '/ibc.core.channel.v1.Channel', value: Channel.encode(message).finish() }; } @@ -624,20 +624,20 @@ function createBaseIdentifiedChannel(): IdentifiedChannel { ordering: 0, counterparty: Counterparty.fromPartial({}), connectionHops: [], - version: "", - portId: "", - channelId: "", + version: '', + portId: '', + channelId: '', upgradeSequence: BigInt(0) }; } export const IdentifiedChannel = { - typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", - aminoType: "cosmos-sdk/IdentifiedChannel", + typeUrl: '/ibc.core.channel.v1.IdentifiedChannel', + aminoType: 'cosmos-sdk/IdentifiedChannel', is(o: any): o is IdentifiedChannel { - return o && (o.$typeUrl === IdentifiedChannel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.is(o.counterparty) && Array.isArray(o.connectionHops) && (!o.connectionHops.length || typeof o.connectionHops[0] === "string") && typeof o.version === "string" && typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.upgradeSequence === "bigint"); + return o && (o.$typeUrl === IdentifiedChannel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.is(o.counterparty) && Array.isArray(o.connectionHops) && (!o.connectionHops.length || typeof o.connectionHops[0] === 'string') && typeof o.version === 'string' && typeof o.portId === 'string' && typeof o.channelId === 'string' && typeof o.upgradeSequence === 'bigint'); }, isAmino(o: any): o is IdentifiedChannelAmino { - return o && (o.$typeUrl === IdentifiedChannel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.isAmino(o.counterparty) && Array.isArray(o.connection_hops) && (!o.connection_hops.length || typeof o.connection_hops[0] === "string") && typeof o.version === "string" && typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.upgrade_sequence === "bigint"); + return o && (o.$typeUrl === IdentifiedChannel.typeUrl || isSet(o.state) && isSet(o.ordering) && Counterparty.isAmino(o.counterparty) && Array.isArray(o.connection_hops) && (!o.connection_hops.length || typeof o.connection_hops[0] === 'string') && typeof o.version === 'string' && typeof o.port_id === 'string' && typeof o.channel_id === 'string' && typeof o.upgrade_sequence === 'bigint'); }, encode(message: IdentifiedChannel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.state !== 0) { @@ -652,13 +652,13 @@ export const IdentifiedChannel = { for (const v of message.connectionHops) { writer.uint32(34).string(v!); } - if (message.version !== "") { + if (message.version !== '') { writer.uint32(42).string(message.version); } - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(50).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(58).string(message.channelId); } if (message.upgradeSequence !== BigInt(0)) { @@ -673,33 +673,33 @@ export const IdentifiedChannel = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = (reader.int32() as any); - break; - case 2: - message.ordering = (reader.int32() as any); - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.portId = reader.string(); - break; - case 7: - message.channelId = reader.string(); - break; - case 8: - message.upgradeSequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.state = (reader.int32() as any); + break; + case 2: + message.ordering = (reader.int32() as any); + break; + case 3: + message.counterparty = Counterparty.decode(reader, reader.uint32()); + break; + case 4: + message.connectionHops.push(reader.string()); + break; + case 5: + message.version = reader.string(); + break; + case 6: + message.portId = reader.string(); + break; + case 7: + message.channelId = reader.string(); + break; + case 8: + message.upgradeSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -710,9 +710,9 @@ export const IdentifiedChannel = { message.ordering = object.ordering ?? 0; message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; message.connectionHops = object.connectionHops?.map(e => e) || []; - message.version = object.version ?? ""; - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.version = object.version ?? ''; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.upgradeSequence = object.upgradeSequence !== undefined && object.upgradeSequence !== null ? BigInt(object.upgradeSequence.toString()) : BigInt(0); return message; }, @@ -752,9 +752,9 @@ export const IdentifiedChannel = { } else { obj.connection_hops = message.connectionHops; } - obj.version = message.version === "" ? undefined : message.version; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.version = message.version === '' ? undefined : message.version; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.upgrade_sequence = message.upgradeSequence !== BigInt(0) ? message.upgradeSequence.toString() : undefined; return obj; }, @@ -763,7 +763,7 @@ export const IdentifiedChannel = { }, toAminoMsg(message: IdentifiedChannel): IdentifiedChannelAminoMsg { return { - type: "cosmos-sdk/IdentifiedChannel", + type: 'cosmos-sdk/IdentifiedChannel', value: IdentifiedChannel.toAmino(message) }; }, @@ -775,7 +775,7 @@ export const IdentifiedChannel = { }, toProtoMsg(message: IdentifiedChannel): IdentifiedChannelProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", + typeUrl: '/ibc.core.channel.v1.IdentifiedChannel', value: IdentifiedChannel.encode(message).finish() }; } @@ -784,24 +784,24 @@ GlobalDecoderRegistry.register(IdentifiedChannel.typeUrl, IdentifiedChannel); GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedChannel.aminoType, IdentifiedChannel.typeUrl); function createBaseCounterparty(): Counterparty { return { - portId: "", - channelId: "" + portId: '', + channelId: '' }; } export const Counterparty = { - typeUrl: "/ibc.core.channel.v1.Counterparty", - aminoType: "cosmos-sdk/Counterparty", + typeUrl: '/ibc.core.channel.v1.Counterparty', + aminoType: 'cosmos-sdk/Counterparty', is(o: any): o is Counterparty { - return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string"); + return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string'); }, isAmino(o: any): o is CounterpartyAmino { - return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string"); + return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string'); }, encode(message: Counterparty, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } return writer; @@ -813,23 +813,23 @@ export const Counterparty = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Counterparty { const message = createBaseCounterparty(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; return message; }, fromAmino(object: CounterpartyAmino): Counterparty { @@ -844,8 +844,8 @@ export const Counterparty = { }, toAmino(message: Counterparty): CounterpartyAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; return obj; }, fromAminoMsg(object: CounterpartyAminoMsg): Counterparty { @@ -853,7 +853,7 @@ export const Counterparty = { }, toAminoMsg(message: Counterparty): CounterpartyAminoMsg { return { - type: "cosmos-sdk/Counterparty", + type: 'cosmos-sdk/Counterparty', value: Counterparty.toAmino(message) }; }, @@ -865,7 +865,7 @@ export const Counterparty = { }, toProtoMsg(message: Counterparty): CounterpartyProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.Counterparty", + typeUrl: '/ibc.core.channel.v1.Counterparty', value: Counterparty.encode(message).finish() }; } @@ -875,38 +875,38 @@ GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterp function createBasePacket(): Packet { return { sequence: BigInt(0), - sourcePort: "", - sourceChannel: "", - destinationPort: "", - destinationChannel: "", + sourcePort: '', + sourceChannel: '', + destinationPort: '', + destinationChannel: '', data: new Uint8Array(), timeoutHeight: Height.fromPartial({}), timeoutTimestamp: BigInt(0) }; } export const Packet = { - typeUrl: "/ibc.core.channel.v1.Packet", - aminoType: "cosmos-sdk/Packet", + typeUrl: '/ibc.core.channel.v1.Packet', + aminoType: 'cosmos-sdk/Packet', is(o: any): o is Packet { - return o && (o.$typeUrl === Packet.typeUrl || typeof o.sequence === "bigint" && typeof o.sourcePort === "string" && typeof o.sourceChannel === "string" && typeof o.destinationPort === "string" && typeof o.destinationChannel === "string" && (o.data instanceof Uint8Array || typeof o.data === "string") && Height.is(o.timeoutHeight) && typeof o.timeoutTimestamp === "bigint"); + return o && (o.$typeUrl === Packet.typeUrl || typeof o.sequence === 'bigint' && typeof o.sourcePort === 'string' && typeof o.sourceChannel === 'string' && typeof o.destinationPort === 'string' && typeof o.destinationChannel === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string') && Height.is(o.timeoutHeight) && typeof o.timeoutTimestamp === 'bigint'); }, isAmino(o: any): o is PacketAmino { - return o && (o.$typeUrl === Packet.typeUrl || typeof o.sequence === "bigint" && typeof o.source_port === "string" && typeof o.source_channel === "string" && typeof o.destination_port === "string" && typeof o.destination_channel === "string" && (o.data instanceof Uint8Array || typeof o.data === "string") && Height.isAmino(o.timeout_height) && typeof o.timeout_timestamp === "bigint"); + return o && (o.$typeUrl === Packet.typeUrl || typeof o.sequence === 'bigint' && typeof o.source_port === 'string' && typeof o.source_channel === 'string' && typeof o.destination_port === 'string' && typeof o.destination_channel === 'string' && (o.data instanceof Uint8Array || typeof o.data === 'string') && Height.isAmino(o.timeout_height) && typeof o.timeout_timestamp === 'bigint'); }, encode(message: Packet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.sequence !== BigInt(0)) { writer.uint32(8).uint64(message.sequence); } - if (message.sourcePort !== "") { + if (message.sourcePort !== '') { writer.uint32(18).string(message.sourcePort); } - if (message.sourceChannel !== "") { + if (message.sourceChannel !== '') { writer.uint32(26).string(message.sourceChannel); } - if (message.destinationPort !== "") { + if (message.destinationPort !== '') { writer.uint32(34).string(message.destinationPort); } - if (message.destinationChannel !== "") { + if (message.destinationChannel !== '') { writer.uint32(42).string(message.destinationChannel); } if (message.data.length !== 0) { @@ -927,33 +927,33 @@ export const Packet = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.sourcePort = reader.string(); - break; - case 3: - message.sourceChannel = reader.string(); - break; - case 4: - message.destinationPort = reader.string(); - break; - case 5: - message.destinationChannel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeoutTimestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sequence = reader.uint64(); + break; + case 2: + message.sourcePort = reader.string(); + break; + case 3: + message.sourceChannel = reader.string(); + break; + case 4: + message.destinationPort = reader.string(); + break; + case 5: + message.destinationChannel = reader.string(); + break; + case 6: + message.data = reader.bytes(); + break; + case 7: + message.timeoutHeight = Height.decode(reader, reader.uint32()); + break; + case 8: + message.timeoutTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -961,10 +961,10 @@ export const Packet = { fromPartial(object: DeepPartial): Packet { const message = createBasePacket(); message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.sourcePort = object.sourcePort ?? ""; - message.sourceChannel = object.sourceChannel ?? ""; - message.destinationPort = object.destinationPort ?? ""; - message.destinationChannel = object.destinationChannel ?? ""; + message.sourcePort = object.sourcePort ?? ''; + message.sourceChannel = object.sourceChannel ?? ''; + message.destinationPort = object.destinationPort ?? ''; + message.destinationChannel = object.destinationChannel ?? ''; message.data = object.data ?? new Uint8Array(); message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? Height.fromPartial(object.timeoutHeight) : undefined; message.timeoutTimestamp = object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0); @@ -1001,10 +1001,10 @@ export const Packet = { toAmino(message: Packet): PacketAmino { const obj: any = {}; obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; - obj.source_port = message.sourcePort === "" ? undefined : message.sourcePort; - obj.source_channel = message.sourceChannel === "" ? undefined : message.sourceChannel; - obj.destination_port = message.destinationPort === "" ? undefined : message.destinationPort; - obj.destination_channel = message.destinationChannel === "" ? undefined : message.destinationChannel; + obj.source_port = message.sourcePort === '' ? undefined : message.sourcePort; + obj.source_channel = message.sourceChannel === '' ? undefined : message.sourceChannel; + obj.destination_port = message.destinationPort === '' ? undefined : message.destinationPort; + obj.destination_channel = message.destinationChannel === '' ? undefined : message.destinationChannel; obj.data = message.data ? base64FromBytes(message.data) : undefined; obj.timeout_height = message.timeoutHeight ? Height.toAmino(message.timeoutHeight) : {}; obj.timeout_timestamp = message.timeoutTimestamp !== BigInt(0) ? message.timeoutTimestamp.toString() : undefined; @@ -1015,7 +1015,7 @@ export const Packet = { }, toAminoMsg(message: Packet): PacketAminoMsg { return { - type: "cosmos-sdk/Packet", + type: 'cosmos-sdk/Packet', value: Packet.toAmino(message) }; }, @@ -1027,7 +1027,7 @@ export const Packet = { }, toProtoMsg(message: Packet): PacketProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.Packet", + typeUrl: '/ibc.core.channel.v1.Packet', value: Packet.encode(message).finish() }; } @@ -1036,26 +1036,26 @@ GlobalDecoderRegistry.register(Packet.typeUrl, Packet); GlobalDecoderRegistry.registerAminoProtoMapping(Packet.aminoType, Packet.typeUrl); function createBasePacketState(): PacketState { return { - portId: "", - channelId: "", + portId: '', + channelId: '', sequence: BigInt(0), data: new Uint8Array() }; } export const PacketState = { - typeUrl: "/ibc.core.channel.v1.PacketState", - aminoType: "cosmos-sdk/PacketState", + typeUrl: '/ibc.core.channel.v1.PacketState', + aminoType: 'cosmos-sdk/PacketState', is(o: any): o is PacketState { - return o && (o.$typeUrl === PacketState.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.sequence === "bigint" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === PacketState.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && typeof o.sequence === 'bigint' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, isAmino(o: any): o is PacketStateAmino { - return o && (o.$typeUrl === PacketState.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.sequence === "bigint" && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === PacketState.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && typeof o.sequence === 'bigint' && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, encode(message: PacketState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.sequence !== BigInt(0)) { @@ -1073,29 +1073,29 @@ export const PacketState = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = 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; }, fromPartial(object: DeepPartial): PacketState { const message = createBasePacketState(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); message.data = object.data ?? new Uint8Array(); return message; @@ -1118,8 +1118,8 @@ export const PacketState = { }, toAmino(message: PacketState): PacketStateAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; @@ -1129,7 +1129,7 @@ export const PacketState = { }, toAminoMsg(message: PacketState): PacketStateAminoMsg { return { - type: "cosmos-sdk/PacketState", + type: 'cosmos-sdk/PacketState', value: PacketState.toAmino(message) }; }, @@ -1141,7 +1141,7 @@ export const PacketState = { }, toProtoMsg(message: PacketState): PacketStateProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.PacketState", + typeUrl: '/ibc.core.channel.v1.PacketState', value: PacketState.encode(message).finish() }; } @@ -1150,25 +1150,25 @@ GlobalDecoderRegistry.register(PacketState.typeUrl, PacketState); GlobalDecoderRegistry.registerAminoProtoMapping(PacketState.aminoType, PacketState.typeUrl); function createBasePacketId(): PacketId { return { - portId: "", - channelId: "", + portId: '', + channelId: '', sequence: BigInt(0) }; } export const PacketId = { - typeUrl: "/ibc.core.channel.v1.PacketId", - aminoType: "cosmos-sdk/PacketId", + typeUrl: '/ibc.core.channel.v1.PacketId', + aminoType: 'cosmos-sdk/PacketId', is(o: any): o is PacketId { - return o && (o.$typeUrl === PacketId.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.sequence === "bigint"); + return o && (o.$typeUrl === PacketId.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && typeof o.sequence === 'bigint'); }, isAmino(o: any): o is PacketIdAmino { - return o && (o.$typeUrl === PacketId.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.sequence === "bigint"); + return o && (o.$typeUrl === PacketId.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && typeof o.sequence === 'bigint'); }, encode(message: PacketId, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.sequence !== BigInt(0)) { @@ -1183,26 +1183,26 @@ export const PacketId = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): PacketId { const message = createBasePacketId(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); return message; }, @@ -1221,8 +1221,8 @@ export const PacketId = { }, toAmino(message: PacketId): PacketIdAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; return obj; }, @@ -1231,7 +1231,7 @@ export const PacketId = { }, toAminoMsg(message: PacketId): PacketIdAminoMsg { return { - type: "cosmos-sdk/PacketId", + type: 'cosmos-sdk/PacketId', value: PacketId.toAmino(message) }; }, @@ -1243,7 +1243,7 @@ export const PacketId = { }, toProtoMsg(message: PacketId): PacketIdProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.PacketId", + typeUrl: '/ibc.core.channel.v1.PacketId', value: PacketId.encode(message).finish() }; } @@ -1257,8 +1257,8 @@ function createBaseAcknowledgement(): Acknowledgement { }; } export const Acknowledgement = { - typeUrl: "/ibc.core.channel.v1.Acknowledgement", - aminoType: "cosmos-sdk/Acknowledgement", + typeUrl: '/ibc.core.channel.v1.Acknowledgement', + aminoType: 'cosmos-sdk/Acknowledgement', is(o: any): o is Acknowledgement { return o && o.$typeUrl === Acknowledgement.typeUrl; }, @@ -1281,15 +1281,15 @@ export const Acknowledgement = { while (reader.pos < end) { const 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; + case 21: + message.result = reader.bytes(); + break; + case 22: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1321,7 +1321,7 @@ export const Acknowledgement = { }, toAminoMsg(message: Acknowledgement): AcknowledgementAminoMsg { return { - type: "cosmos-sdk/Acknowledgement", + type: 'cosmos-sdk/Acknowledgement', value: Acknowledgement.toAmino(message) }; }, @@ -1333,7 +1333,7 @@ export const Acknowledgement = { }, toProtoMsg(message: Acknowledgement): AcknowledgementProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.Acknowledgement", + typeUrl: '/ibc.core.channel.v1.Acknowledgement', value: Acknowledgement.encode(message).finish() }; } @@ -1347,13 +1347,13 @@ function createBaseTimeout(): Timeout { }; } export const Timeout = { - typeUrl: "/ibc.core.channel.v1.Timeout", - aminoType: "cosmos-sdk/Timeout", + typeUrl: '/ibc.core.channel.v1.Timeout', + aminoType: 'cosmos-sdk/Timeout', is(o: any): o is Timeout { - return o && (o.$typeUrl === Timeout.typeUrl || Height.is(o.height) && typeof o.timestamp === "bigint"); + return o && (o.$typeUrl === Timeout.typeUrl || Height.is(o.height) && typeof o.timestamp === 'bigint'); }, isAmino(o: any): o is TimeoutAmino { - return o && (o.$typeUrl === Timeout.typeUrl || Height.isAmino(o.height) && typeof o.timestamp === "bigint"); + return o && (o.$typeUrl === Timeout.typeUrl || Height.isAmino(o.height) && typeof o.timestamp === 'bigint'); }, encode(message: Timeout, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.height !== undefined) { @@ -1371,15 +1371,15 @@ export const Timeout = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.height = Height.decode(reader, reader.uint32()); + break; + case 2: + message.timestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1411,7 +1411,7 @@ export const Timeout = { }, toAminoMsg(message: Timeout): TimeoutAminoMsg { return { - type: "cosmos-sdk/Timeout", + type: 'cosmos-sdk/Timeout', value: Timeout.toAmino(message) }; }, @@ -1423,7 +1423,7 @@ export const Timeout = { }, toProtoMsg(message: Timeout): TimeoutProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.Timeout", + typeUrl: '/ibc.core.channel.v1.Timeout', value: Timeout.encode(message).finish() }; } @@ -1436,8 +1436,8 @@ function createBaseParams(): Params { }; } export const Params = { - typeUrl: "/ibc.core.channel.v1.Params", - aminoType: "cosmos-sdk/Params", + typeUrl: '/ibc.core.channel.v1.Params', + aminoType: 'cosmos-sdk/Params', is(o: any): o is Params { return o && (o.$typeUrl === Params.typeUrl || Timeout.is(o.upgradeTimeout)); }, @@ -1457,12 +1457,12 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.upgradeTimeout = Timeout.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.upgradeTimeout = Timeout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1489,7 +1489,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/Params", + type: 'cosmos-sdk/Params', value: Params.toAmino(message) }; }, @@ -1501,7 +1501,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.Params", + typeUrl: '/ibc.core.channel.v1.Params', value: Params.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/core/channel/v1/tx.amino.ts b/libs/cosmos-types/ibc/core/channel/v1/tx.amino.ts index fb58cb04..79ccf477 100644 --- a/libs/cosmos-types/ibc/core/channel/v1/tx.amino.ts +++ b/libs/cosmos-types/ibc/core/channel/v1/tx.amino.ts @@ -1,97 +1,97 @@ -import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement, MsgChannelUpgradeInit, MsgChannelUpgradeTry, MsgChannelUpgradeAck, MsgChannelUpgradeConfirm, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeCancel, MsgUpdateParams, MsgPruneAcknowledgements } from "./tx"; +import { MsgAcknowledgement, MsgChannelCloseConfirm, MsgChannelCloseInit, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelUpgradeAck, MsgChannelUpgradeCancel, MsgChannelUpgradeConfirm, MsgChannelUpgradeInit, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeTry, MsgPruneAcknowledgements,MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgUpdateParams } from './tx'; export const AminoConverter = { - "/ibc.core.channel.v1.MsgChannelOpenInit": { - aminoType: "cosmos-sdk/MsgChannelOpenInit", + '/ibc.core.channel.v1.MsgChannelOpenInit': { + aminoType: 'cosmos-sdk/MsgChannelOpenInit', toAmino: MsgChannelOpenInit.toAmino, fromAmino: MsgChannelOpenInit.fromAmino }, - "/ibc.core.channel.v1.MsgChannelOpenTry": { - aminoType: "cosmos-sdk/MsgChannelOpenTry", + '/ibc.core.channel.v1.MsgChannelOpenTry': { + aminoType: 'cosmos-sdk/MsgChannelOpenTry', toAmino: MsgChannelOpenTry.toAmino, fromAmino: MsgChannelOpenTry.fromAmino }, - "/ibc.core.channel.v1.MsgChannelOpenAck": { - aminoType: "cosmos-sdk/MsgChannelOpenAck", + '/ibc.core.channel.v1.MsgChannelOpenAck': { + aminoType: 'cosmos-sdk/MsgChannelOpenAck', toAmino: MsgChannelOpenAck.toAmino, fromAmino: MsgChannelOpenAck.fromAmino }, - "/ibc.core.channel.v1.MsgChannelOpenConfirm": { - aminoType: "cosmos-sdk/MsgChannelOpenConfirm", + '/ibc.core.channel.v1.MsgChannelOpenConfirm': { + aminoType: 'cosmos-sdk/MsgChannelOpenConfirm', toAmino: MsgChannelOpenConfirm.toAmino, fromAmino: MsgChannelOpenConfirm.fromAmino }, - "/ibc.core.channel.v1.MsgChannelCloseInit": { - aminoType: "cosmos-sdk/MsgChannelCloseInit", + '/ibc.core.channel.v1.MsgChannelCloseInit': { + aminoType: 'cosmos-sdk/MsgChannelCloseInit', toAmino: MsgChannelCloseInit.toAmino, fromAmino: MsgChannelCloseInit.fromAmino }, - "/ibc.core.channel.v1.MsgChannelCloseConfirm": { - aminoType: "cosmos-sdk/MsgChannelCloseConfirm", + '/ibc.core.channel.v1.MsgChannelCloseConfirm': { + aminoType: 'cosmos-sdk/MsgChannelCloseConfirm', toAmino: MsgChannelCloseConfirm.toAmino, fromAmino: MsgChannelCloseConfirm.fromAmino }, - "/ibc.core.channel.v1.MsgRecvPacket": { - aminoType: "cosmos-sdk/MsgRecvPacket", + '/ibc.core.channel.v1.MsgRecvPacket': { + aminoType: 'cosmos-sdk/MsgRecvPacket', toAmino: MsgRecvPacket.toAmino, fromAmino: MsgRecvPacket.fromAmino }, - "/ibc.core.channel.v1.MsgTimeout": { - aminoType: "cosmos-sdk/MsgTimeout", + '/ibc.core.channel.v1.MsgTimeout': { + aminoType: 'cosmos-sdk/MsgTimeout', toAmino: MsgTimeout.toAmino, fromAmino: MsgTimeout.fromAmino }, - "/ibc.core.channel.v1.MsgTimeoutOnClose": { - aminoType: "cosmos-sdk/MsgTimeoutOnClose", + '/ibc.core.channel.v1.MsgTimeoutOnClose': { + aminoType: 'cosmos-sdk/MsgTimeoutOnClose', toAmino: MsgTimeoutOnClose.toAmino, fromAmino: MsgTimeoutOnClose.fromAmino }, - "/ibc.core.channel.v1.MsgAcknowledgement": { - aminoType: "cosmos-sdk/MsgAcknowledgement", + '/ibc.core.channel.v1.MsgAcknowledgement': { + aminoType: 'cosmos-sdk/MsgAcknowledgement', toAmino: MsgAcknowledgement.toAmino, fromAmino: MsgAcknowledgement.fromAmino }, - "/ibc.core.channel.v1.MsgChannelUpgradeInit": { - aminoType: "cosmos-sdk/MsgChannelUpgradeInit", + '/ibc.core.channel.v1.MsgChannelUpgradeInit': { + aminoType: 'cosmos-sdk/MsgChannelUpgradeInit', toAmino: MsgChannelUpgradeInit.toAmino, fromAmino: MsgChannelUpgradeInit.fromAmino }, - "/ibc.core.channel.v1.MsgChannelUpgradeTry": { - aminoType: "cosmos-sdk/MsgChannelUpgradeTry", + '/ibc.core.channel.v1.MsgChannelUpgradeTry': { + aminoType: 'cosmos-sdk/MsgChannelUpgradeTry', toAmino: MsgChannelUpgradeTry.toAmino, fromAmino: MsgChannelUpgradeTry.fromAmino }, - "/ibc.core.channel.v1.MsgChannelUpgradeAck": { - aminoType: "cosmos-sdk/MsgChannelUpgradeAck", + '/ibc.core.channel.v1.MsgChannelUpgradeAck': { + aminoType: 'cosmos-sdk/MsgChannelUpgradeAck', toAmino: MsgChannelUpgradeAck.toAmino, fromAmino: MsgChannelUpgradeAck.fromAmino }, - "/ibc.core.channel.v1.MsgChannelUpgradeConfirm": { - aminoType: "cosmos-sdk/MsgChannelUpgradeConfirm", + '/ibc.core.channel.v1.MsgChannelUpgradeConfirm': { + aminoType: 'cosmos-sdk/MsgChannelUpgradeConfirm', toAmino: MsgChannelUpgradeConfirm.toAmino, fromAmino: MsgChannelUpgradeConfirm.fromAmino }, - "/ibc.core.channel.v1.MsgChannelUpgradeOpen": { - aminoType: "cosmos-sdk/MsgChannelUpgradeOpen", + '/ibc.core.channel.v1.MsgChannelUpgradeOpen': { + aminoType: 'cosmos-sdk/MsgChannelUpgradeOpen', toAmino: MsgChannelUpgradeOpen.toAmino, fromAmino: MsgChannelUpgradeOpen.fromAmino }, - "/ibc.core.channel.v1.MsgChannelUpgradeTimeout": { - aminoType: "cosmos-sdk/MsgChannelUpgradeTimeout", + '/ibc.core.channel.v1.MsgChannelUpgradeTimeout': { + aminoType: 'cosmos-sdk/MsgChannelUpgradeTimeout', toAmino: MsgChannelUpgradeTimeout.toAmino, fromAmino: MsgChannelUpgradeTimeout.fromAmino }, - "/ibc.core.channel.v1.MsgChannelUpgradeCancel": { - aminoType: "cosmos-sdk/MsgChannelUpgradeCancel", + '/ibc.core.channel.v1.MsgChannelUpgradeCancel': { + aminoType: 'cosmos-sdk/MsgChannelUpgradeCancel', toAmino: MsgChannelUpgradeCancel.toAmino, fromAmino: MsgChannelUpgradeCancel.fromAmino }, - "/ibc.core.channel.v1.MsgUpdateParams": { - aminoType: "cosmos-sdk/MsgUpdateParams", + '/ibc.core.channel.v1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino }, - "/ibc.core.channel.v1.MsgPruneAcknowledgements": { - aminoType: "cosmos-sdk/MsgPruneAcknowledgements", + '/ibc.core.channel.v1.MsgPruneAcknowledgements': { + aminoType: 'cosmos-sdk/MsgPruneAcknowledgements', toAmino: MsgPruneAcknowledgements.toAmino, fromAmino: MsgPruneAcknowledgements.fromAmino } diff --git a/libs/cosmos-types/ibc/core/channel/v1/tx.registry.ts b/libs/cosmos-types/ibc/core/channel/v1/tx.registry.ts index a317e082..3116559d 100644 --- a/libs/cosmos-types/ibc/core/channel/v1/tx.registry.ts +++ b/libs/cosmos-types/ibc/core/channel/v1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../../types"; -import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement, MsgChannelUpgradeInit, MsgChannelUpgradeTry, MsgChannelUpgradeAck, MsgChannelUpgradeConfirm, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeCancel, MsgUpdateParams, MsgPruneAcknowledgements } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/ibc.core.channel.v1.MsgChannelOpenInit", MsgChannelOpenInit], ["/ibc.core.channel.v1.MsgChannelOpenTry", MsgChannelOpenTry], ["/ibc.core.channel.v1.MsgChannelOpenAck", MsgChannelOpenAck], ["/ibc.core.channel.v1.MsgChannelOpenConfirm", MsgChannelOpenConfirm], ["/ibc.core.channel.v1.MsgChannelCloseInit", MsgChannelCloseInit], ["/ibc.core.channel.v1.MsgChannelCloseConfirm", MsgChannelCloseConfirm], ["/ibc.core.channel.v1.MsgRecvPacket", MsgRecvPacket], ["/ibc.core.channel.v1.MsgTimeout", MsgTimeout], ["/ibc.core.channel.v1.MsgTimeoutOnClose", MsgTimeoutOnClose], ["/ibc.core.channel.v1.MsgAcknowledgement", MsgAcknowledgement], ["/ibc.core.channel.v1.MsgChannelUpgradeInit", MsgChannelUpgradeInit], ["/ibc.core.channel.v1.MsgChannelUpgradeTry", MsgChannelUpgradeTry], ["/ibc.core.channel.v1.MsgChannelUpgradeAck", MsgChannelUpgradeAck], ["/ibc.core.channel.v1.MsgChannelUpgradeConfirm", MsgChannelUpgradeConfirm], ["/ibc.core.channel.v1.MsgChannelUpgradeOpen", MsgChannelUpgradeOpen], ["/ibc.core.channel.v1.MsgChannelUpgradeTimeout", MsgChannelUpgradeTimeout], ["/ibc.core.channel.v1.MsgChannelUpgradeCancel", MsgChannelUpgradeCancel], ["/ibc.core.channel.v1.MsgUpdateParams", MsgUpdateParams], ["/ibc.core.channel.v1.MsgPruneAcknowledgements", MsgPruneAcknowledgements]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../../types'; +import { MsgAcknowledgement, MsgChannelCloseConfirm, MsgChannelCloseInit, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelUpgradeAck, MsgChannelUpgradeCancel, MsgChannelUpgradeConfirm, MsgChannelUpgradeInit, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeTry, MsgPruneAcknowledgements,MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgUpdateParams } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/ibc.core.channel.v1.MsgChannelOpenInit', MsgChannelOpenInit], ['/ibc.core.channel.v1.MsgChannelOpenTry', MsgChannelOpenTry], ['/ibc.core.channel.v1.MsgChannelOpenAck', MsgChannelOpenAck], ['/ibc.core.channel.v1.MsgChannelOpenConfirm', MsgChannelOpenConfirm], ['/ibc.core.channel.v1.MsgChannelCloseInit', MsgChannelCloseInit], ['/ibc.core.channel.v1.MsgChannelCloseConfirm', MsgChannelCloseConfirm], ['/ibc.core.channel.v1.MsgRecvPacket', MsgRecvPacket], ['/ibc.core.channel.v1.MsgTimeout', MsgTimeout], ['/ibc.core.channel.v1.MsgTimeoutOnClose', MsgTimeoutOnClose], ['/ibc.core.channel.v1.MsgAcknowledgement', MsgAcknowledgement], ['/ibc.core.channel.v1.MsgChannelUpgradeInit', MsgChannelUpgradeInit], ['/ibc.core.channel.v1.MsgChannelUpgradeTry', MsgChannelUpgradeTry], ['/ibc.core.channel.v1.MsgChannelUpgradeAck', MsgChannelUpgradeAck], ['/ibc.core.channel.v1.MsgChannelUpgradeConfirm', MsgChannelUpgradeConfirm], ['/ibc.core.channel.v1.MsgChannelUpgradeOpen', MsgChannelUpgradeOpen], ['/ibc.core.channel.v1.MsgChannelUpgradeTimeout', MsgChannelUpgradeTimeout], ['/ibc.core.channel.v1.MsgChannelUpgradeCancel', MsgChannelUpgradeCancel], ['/ibc.core.channel.v1.MsgUpdateParams', MsgUpdateParams], ['/ibc.core.channel.v1.MsgPruneAcknowledgements', MsgPruneAcknowledgements]]; \ No newline at end of file diff --git a/libs/cosmos-types/ibc/core/channel/v1/tx.rpc.msg.ts b/libs/cosmos-types/ibc/core/channel/v1/tx.rpc.msg.ts index 1e968742..5e61bf29 100644 --- a/libs/cosmos-types/ibc/core/channel/v1/tx.rpc.msg.ts +++ b/libs/cosmos-types/ibc/core/channel/v1/tx.rpc.msg.ts @@ -1,48 +1,48 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../../types"; -import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement, MsgChannelUpgradeInit, MsgChannelUpgradeTry, MsgChannelUpgradeAck, MsgChannelUpgradeConfirm, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeCancel, MsgUpdateParams, MsgPruneAcknowledgements } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../../types'; +import { MsgAcknowledgement, MsgChannelCloseConfirm, MsgChannelCloseInit, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelUpgradeAck, MsgChannelUpgradeCancel, MsgChannelUpgradeConfirm, MsgChannelUpgradeInit, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeTry, MsgPruneAcknowledgements,MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgUpdateParams } from './tx'; /** Msg defines the ibc/channel Msg service. */ export interface Msg { /** ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */ - channelOpenInit(signerAddress: string, message: MsgChannelOpenInit, fee: number | StdFee | "auto", memo?: string): Promise; + channelOpenInit(signerAddress: string, message: MsgChannelOpenInit, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */ - channelOpenTry(signerAddress: string, message: MsgChannelOpenTry, fee: number | StdFee | "auto", memo?: string): Promise; + channelOpenTry(signerAddress: string, message: MsgChannelOpenTry, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ - channelOpenAck(signerAddress: string, message: MsgChannelOpenAck, fee: number | StdFee | "auto", memo?: string): Promise; + channelOpenAck(signerAddress: string, message: MsgChannelOpenAck, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ - channelOpenConfirm(signerAddress: string, message: MsgChannelOpenConfirm, fee: number | StdFee | "auto", memo?: string): Promise; + channelOpenConfirm(signerAddress: string, message: MsgChannelOpenConfirm, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ - channelCloseInit(signerAddress: string, message: MsgChannelCloseInit, fee: number | StdFee | "auto", memo?: string): Promise; + channelCloseInit(signerAddress: string, message: MsgChannelCloseInit, fee: number | StdFee | 'auto', memo?: string): Promise; /** * ChannelCloseConfirm defines a rpc handler method for * MsgChannelCloseConfirm. */ - channelCloseConfirm(signerAddress: string, message: MsgChannelCloseConfirm, fee: number | StdFee | "auto", memo?: string): Promise; + channelCloseConfirm(signerAddress: string, message: MsgChannelCloseConfirm, fee: number | StdFee | 'auto', memo?: string): Promise; /** RecvPacket defines a rpc handler method for MsgRecvPacket. */ - recvPacket(signerAddress: string, message: MsgRecvPacket, fee: number | StdFee | "auto", memo?: string): Promise; + recvPacket(signerAddress: string, message: MsgRecvPacket, fee: number | StdFee | 'auto', memo?: string): Promise; /** Timeout defines a rpc handler method for MsgTimeout. */ - timeout(signerAddress: string, message: MsgTimeout, fee: number | StdFee | "auto", memo?: string): Promise; + timeout(signerAddress: string, message: MsgTimeout, fee: number | StdFee | 'auto', memo?: string): Promise; /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ - timeoutOnClose(signerAddress: string, message: MsgTimeoutOnClose, fee: number | StdFee | "auto", memo?: string): Promise; + timeoutOnClose(signerAddress: string, message: MsgTimeoutOnClose, fee: number | StdFee | 'auto', memo?: string): Promise; /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ - acknowledgement(signerAddress: string, message: MsgAcknowledgement, fee: number | StdFee | "auto", memo?: string): Promise; + acknowledgement(signerAddress: string, message: MsgAcknowledgement, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. */ - channelUpgradeInit(signerAddress: string, message: MsgChannelUpgradeInit, fee: number | StdFee | "auto", memo?: string): Promise; + channelUpgradeInit(signerAddress: string, message: MsgChannelUpgradeInit, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. */ - channelUpgradeTry(signerAddress: string, message: MsgChannelUpgradeTry, fee: number | StdFee | "auto", memo?: string): Promise; + channelUpgradeTry(signerAddress: string, message: MsgChannelUpgradeTry, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelUpgradeAck defines a rpc handler method for MsgChannelUpgradeAck. */ - channelUpgradeAck(signerAddress: string, message: MsgChannelUpgradeAck, fee: number | StdFee | "auto", memo?: string): Promise; + channelUpgradeAck(signerAddress: string, message: MsgChannelUpgradeAck, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelUpgradeConfirm defines a rpc handler method for MsgChannelUpgradeConfirm. */ - channelUpgradeConfirm(signerAddress: string, message: MsgChannelUpgradeConfirm, fee: number | StdFee | "auto", memo?: string): Promise; + channelUpgradeConfirm(signerAddress: string, message: MsgChannelUpgradeConfirm, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelUpgradeOpen defines a rpc handler method for MsgChannelUpgradeOpen. */ - channelUpgradeOpen(signerAddress: string, message: MsgChannelUpgradeOpen, fee: number | StdFee | "auto", memo?: string): Promise; + channelUpgradeOpen(signerAddress: string, message: MsgChannelUpgradeOpen, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelUpgradeTimeout defines a rpc handler method for MsgChannelUpgradeTimeout. */ - channelUpgradeTimeout(signerAddress: string, message: MsgChannelUpgradeTimeout, fee: number | StdFee | "auto", memo?: string): Promise; + channelUpgradeTimeout(signerAddress: string, message: MsgChannelUpgradeTimeout, fee: number | StdFee | 'auto', memo?: string): Promise; /** ChannelUpgradeCancel defines a rpc handler method for MsgChannelUpgradeCancel. */ - channelUpgradeCancel(signerAddress: string, message: MsgChannelUpgradeCancel, fee: number | StdFee | "auto", memo?: string): Promise; + channelUpgradeCancel(signerAddress: string, message: MsgChannelUpgradeCancel, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateChannelParams defines a rpc handler method for MsgUpdateParams. */ - updateChannelParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateChannelParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; /** PruneAcknowledgements defines a rpc handler method for MsgPruneAcknowledgements. */ - pruneAcknowledgements(signerAddress: string, message: MsgPruneAcknowledgements, fee: number | StdFee | "auto", memo?: string): Promise; + pruneAcknowledgements(signerAddress: string, message: MsgPruneAcknowledgements, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -50,7 +50,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */ - channelOpenInit = async (signerAddress: string, message: MsgChannelOpenInit, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelOpenInit = async (signerAddress: string, message: MsgChannelOpenInit, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelOpenInit.typeUrl, value: message @@ -58,7 +58,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */ - channelOpenTry = async (signerAddress: string, message: MsgChannelOpenTry, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelOpenTry = async (signerAddress: string, message: MsgChannelOpenTry, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelOpenTry.typeUrl, value: message @@ -66,7 +66,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ - channelOpenAck = async (signerAddress: string, message: MsgChannelOpenAck, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelOpenAck = async (signerAddress: string, message: MsgChannelOpenAck, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelOpenAck.typeUrl, value: message @@ -74,7 +74,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ - channelOpenConfirm = async (signerAddress: string, message: MsgChannelOpenConfirm, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelOpenConfirm = async (signerAddress: string, message: MsgChannelOpenConfirm, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelOpenConfirm.typeUrl, value: message @@ -82,7 +82,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ - channelCloseInit = async (signerAddress: string, message: MsgChannelCloseInit, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelCloseInit = async (signerAddress: string, message: MsgChannelCloseInit, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelCloseInit.typeUrl, value: message @@ -91,7 +91,7 @@ export class MsgClientImpl implements Msg { }; /* ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. */ - channelCloseConfirm = async (signerAddress: string, message: MsgChannelCloseConfirm, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelCloseConfirm = async (signerAddress: string, message: MsgChannelCloseConfirm, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelCloseConfirm.typeUrl, value: message @@ -99,7 +99,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* RecvPacket defines a rpc handler method for MsgRecvPacket. */ - recvPacket = async (signerAddress: string, message: MsgRecvPacket, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + recvPacket = async (signerAddress: string, message: MsgRecvPacket, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgRecvPacket.typeUrl, value: message @@ -107,7 +107,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Timeout defines a rpc handler method for MsgTimeout. */ - timeout = async (signerAddress: string, message: MsgTimeout, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + timeout = async (signerAddress: string, message: MsgTimeout, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgTimeout.typeUrl, value: message @@ -115,7 +115,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ - timeoutOnClose = async (signerAddress: string, message: MsgTimeoutOnClose, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + timeoutOnClose = async (signerAddress: string, message: MsgTimeoutOnClose, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgTimeoutOnClose.typeUrl, value: message @@ -123,7 +123,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ - acknowledgement = async (signerAddress: string, message: MsgAcknowledgement, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + acknowledgement = async (signerAddress: string, message: MsgAcknowledgement, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgAcknowledgement.typeUrl, value: message @@ -131,7 +131,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. */ - channelUpgradeInit = async (signerAddress: string, message: MsgChannelUpgradeInit, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelUpgradeInit = async (signerAddress: string, message: MsgChannelUpgradeInit, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelUpgradeInit.typeUrl, value: message @@ -139,7 +139,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. */ - channelUpgradeTry = async (signerAddress: string, message: MsgChannelUpgradeTry, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelUpgradeTry = async (signerAddress: string, message: MsgChannelUpgradeTry, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelUpgradeTry.typeUrl, value: message @@ -147,7 +147,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelUpgradeAck defines a rpc handler method for MsgChannelUpgradeAck. */ - channelUpgradeAck = async (signerAddress: string, message: MsgChannelUpgradeAck, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelUpgradeAck = async (signerAddress: string, message: MsgChannelUpgradeAck, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelUpgradeAck.typeUrl, value: message @@ -155,7 +155,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelUpgradeConfirm defines a rpc handler method for MsgChannelUpgradeConfirm. */ - channelUpgradeConfirm = async (signerAddress: string, message: MsgChannelUpgradeConfirm, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelUpgradeConfirm = async (signerAddress: string, message: MsgChannelUpgradeConfirm, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelUpgradeConfirm.typeUrl, value: message @@ -163,7 +163,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelUpgradeOpen defines a rpc handler method for MsgChannelUpgradeOpen. */ - channelUpgradeOpen = async (signerAddress: string, message: MsgChannelUpgradeOpen, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelUpgradeOpen = async (signerAddress: string, message: MsgChannelUpgradeOpen, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelUpgradeOpen.typeUrl, value: message @@ -171,7 +171,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelUpgradeTimeout defines a rpc handler method for MsgChannelUpgradeTimeout. */ - channelUpgradeTimeout = async (signerAddress: string, message: MsgChannelUpgradeTimeout, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelUpgradeTimeout = async (signerAddress: string, message: MsgChannelUpgradeTimeout, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelUpgradeTimeout.typeUrl, value: message @@ -179,7 +179,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ChannelUpgradeCancel defines a rpc handler method for MsgChannelUpgradeCancel. */ - channelUpgradeCancel = async (signerAddress: string, message: MsgChannelUpgradeCancel, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + channelUpgradeCancel = async (signerAddress: string, message: MsgChannelUpgradeCancel, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgChannelUpgradeCancel.typeUrl, value: message @@ -187,7 +187,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateChannelParams defines a rpc handler method for MsgUpdateParams. */ - updateChannelParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateChannelParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message @@ -195,7 +195,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* PruneAcknowledgements defines a rpc handler method for MsgPruneAcknowledgements. */ - pruneAcknowledgements = async (signerAddress: string, message: MsgPruneAcknowledgements, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + pruneAcknowledgements = async (signerAddress: string, message: MsgPruneAcknowledgements, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgPruneAcknowledgements.typeUrl, value: message diff --git a/libs/cosmos-types/ibc/core/channel/v1/tx.ts b/libs/cosmos-types/ibc/core/channel/v1/tx.ts index 9a96b4e8..31b1d8b8 100644 --- a/libs/cosmos-types/ibc/core/channel/v1/tx.ts +++ b/libs/cosmos-types/ibc/core/channel/v1/tx.ts @@ -1,9 +1,9 @@ -import { Channel, ChannelAmino, Packet, PacketAmino, State } from "./channel"; -import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; -import { UpgradeFields, UpgradeFieldsAmino, Upgrade, UpgradeAmino, ErrorReceipt, ErrorReceiptAmino } from "./upgrade"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { base64FromBytes, bytesFromBase64, DeepPartial, isSet } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { Height, HeightAmino, Params, ParamsAmino } from '../../client/v1/client'; +import { Channel, ChannelAmino, Packet, PacketAmino, State } from './channel'; +import { ErrorReceipt, ErrorReceiptAmino,Upgrade, UpgradeAmino, UpgradeFields, UpgradeFieldsAmino } from './upgrade'; /** ResponseResultType defines the possible outcomes of the execution of a message */ export enum ResponseResultType { /** RESPONSE_RESULT_TYPE_UNSPECIFIED - Default zero value enumeration */ @@ -19,37 +19,37 @@ export enum ResponseResultType { export const ResponseResultTypeAmino = ResponseResultType; export function responseResultTypeFromJSON(object: any): ResponseResultType { switch (object) { - case 0: - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - return ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED; - case 1: - case "RESPONSE_RESULT_TYPE_NOOP": - return ResponseResultType.RESPONSE_RESULT_TYPE_NOOP; - case 2: - case "RESPONSE_RESULT_TYPE_SUCCESS": - return ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS; - case 3: - case "RESPONSE_RESULT_TYPE_FAILURE": - return ResponseResultType.RESPONSE_RESULT_TYPE_FAILURE; - case -1: - case "UNRECOGNIZED": - default: - return ResponseResultType.UNRECOGNIZED; + case 0: + case 'RESPONSE_RESULT_TYPE_UNSPECIFIED': + return ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED; + case 1: + case 'RESPONSE_RESULT_TYPE_NOOP': + return ResponseResultType.RESPONSE_RESULT_TYPE_NOOP; + case 2: + case 'RESPONSE_RESULT_TYPE_SUCCESS': + return ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS; + case 3: + case 'RESPONSE_RESULT_TYPE_FAILURE': + return ResponseResultType.RESPONSE_RESULT_TYPE_FAILURE; + case -1: + case 'UNRECOGNIZED': + default: + return ResponseResultType.UNRECOGNIZED; } } export function responseResultTypeToJSON(object: ResponseResultType): string { switch (object) { - case ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED: - return "RESPONSE_RESULT_TYPE_UNSPECIFIED"; - case ResponseResultType.RESPONSE_RESULT_TYPE_NOOP: - return "RESPONSE_RESULT_TYPE_NOOP"; - case ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS: - return "RESPONSE_RESULT_TYPE_SUCCESS"; - case ResponseResultType.RESPONSE_RESULT_TYPE_FAILURE: - return "RESPONSE_RESULT_TYPE_FAILURE"; - case ResponseResultType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED: + return 'RESPONSE_RESULT_TYPE_UNSPECIFIED'; + case ResponseResultType.RESPONSE_RESULT_TYPE_NOOP: + return 'RESPONSE_RESULT_TYPE_NOOP'; + case ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS: + return 'RESPONSE_RESULT_TYPE_SUCCESS'; + case ResponseResultType.RESPONSE_RESULT_TYPE_FAILURE: + return 'RESPONSE_RESULT_TYPE_FAILURE'; + case ResponseResultType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -62,7 +62,7 @@ export interface MsgChannelOpenInit { signer: string; } export interface MsgChannelOpenInitProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenInit'; value: Uint8Array; } /** @@ -75,7 +75,7 @@ export interface MsgChannelOpenInitAmino { signer: string; } export interface MsgChannelOpenInitAminoMsg { - type: "cosmos-sdk/MsgChannelOpenInit"; + type: 'cosmos-sdk/MsgChannelOpenInit'; value: MsgChannelOpenInitAmino; } /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ @@ -84,7 +84,7 @@ export interface MsgChannelOpenInitResponse { version: string; } export interface MsgChannelOpenInitResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenInitResponse'; value: Uint8Array; } /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ @@ -93,7 +93,7 @@ export interface MsgChannelOpenInitResponseAmino { version: string; } export interface MsgChannelOpenInitResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenInitResponse"; + type: 'cosmos-sdk/MsgChannelOpenInitResponse'; value: MsgChannelOpenInitResponseAmino; } /** @@ -114,7 +114,7 @@ export interface MsgChannelOpenTry { signer: string; } export interface MsgChannelOpenTryProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenTry'; value: Uint8Array; } /** @@ -135,7 +135,7 @@ export interface MsgChannelOpenTryAmino { signer: string; } export interface MsgChannelOpenTryAminoMsg { - type: "cosmos-sdk/MsgChannelOpenTry"; + type: 'cosmos-sdk/MsgChannelOpenTry'; value: MsgChannelOpenTryAmino; } /** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ @@ -144,7 +144,7 @@ export interface MsgChannelOpenTryResponse { channelId: string; } export interface MsgChannelOpenTryResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenTryResponse'; value: Uint8Array; } /** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ @@ -153,7 +153,7 @@ export interface MsgChannelOpenTryResponseAmino { channel_id: string; } export interface MsgChannelOpenTryResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenTryResponse"; + type: 'cosmos-sdk/MsgChannelOpenTryResponse'; value: MsgChannelOpenTryResponseAmino; } /** @@ -173,7 +173,7 @@ export interface MsgChannelOpenAck { signer: string; } export interface MsgChannelOpenAckProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenAck'; value: Uint8Array; } /** @@ -193,19 +193,19 @@ export interface MsgChannelOpenAckAmino { signer: string; } export interface MsgChannelOpenAckAminoMsg { - type: "cosmos-sdk/MsgChannelOpenAck"; + type: 'cosmos-sdk/MsgChannelOpenAck'; value: MsgChannelOpenAckAmino; } /** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ export interface MsgChannelOpenAckResponse {} export interface MsgChannelOpenAckResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenAckResponse'; value: Uint8Array; } /** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ export interface MsgChannelOpenAckResponseAmino {} export interface MsgChannelOpenAckResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenAckResponse"; + type: 'cosmos-sdk/MsgChannelOpenAckResponse'; value: MsgChannelOpenAckResponseAmino; } /** @@ -220,7 +220,7 @@ export interface MsgChannelOpenConfirm { signer: string; } export interface MsgChannelOpenConfirmProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenConfirm'; value: Uint8Array; } /** @@ -235,7 +235,7 @@ export interface MsgChannelOpenConfirmAmino { signer: string; } export interface MsgChannelOpenConfirmAminoMsg { - type: "cosmos-sdk/MsgChannelOpenConfirm"; + type: 'cosmos-sdk/MsgChannelOpenConfirm'; value: MsgChannelOpenConfirmAmino; } /** @@ -244,7 +244,7 @@ export interface MsgChannelOpenConfirmAminoMsg { */ export interface MsgChannelOpenConfirmResponse {} export interface MsgChannelOpenConfirmResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenConfirmResponse'; value: Uint8Array; } /** @@ -253,7 +253,7 @@ export interface MsgChannelOpenConfirmResponseProtoMsg { */ export interface MsgChannelOpenConfirmResponseAmino {} export interface MsgChannelOpenConfirmResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenConfirmResponse"; + type: 'cosmos-sdk/MsgChannelOpenConfirmResponse'; value: MsgChannelOpenConfirmResponseAmino; } /** @@ -266,7 +266,7 @@ export interface MsgChannelCloseInit { signer: string; } export interface MsgChannelCloseInitProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit"; + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseInit'; value: Uint8Array; } /** @@ -279,19 +279,19 @@ export interface MsgChannelCloseInitAmino { signer: string; } export interface MsgChannelCloseInitAminoMsg { - type: "cosmos-sdk/MsgChannelCloseInit"; + type: 'cosmos-sdk/MsgChannelCloseInit'; value: MsgChannelCloseInitAmino; } /** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ export interface MsgChannelCloseInitResponse {} export interface MsgChannelCloseInitResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseInitResponse'; value: Uint8Array; } /** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ export interface MsgChannelCloseInitResponseAmino {} export interface MsgChannelCloseInitResponseAminoMsg { - type: "cosmos-sdk/MsgChannelCloseInitResponse"; + type: 'cosmos-sdk/MsgChannelCloseInitResponse'; value: MsgChannelCloseInitResponseAmino; } /** @@ -307,7 +307,7 @@ export interface MsgChannelCloseConfirm { counterpartyUpgradeSequence: bigint; } export interface MsgChannelCloseConfirmProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm"; + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseConfirm'; value: Uint8Array; } /** @@ -323,7 +323,7 @@ export interface MsgChannelCloseConfirmAmino { counterparty_upgrade_sequence: string; } export interface MsgChannelCloseConfirmAminoMsg { - type: "cosmos-sdk/MsgChannelCloseConfirm"; + type: 'cosmos-sdk/MsgChannelCloseConfirm'; value: MsgChannelCloseConfirmAmino; } /** @@ -332,7 +332,7 @@ export interface MsgChannelCloseConfirmAminoMsg { */ export interface MsgChannelCloseConfirmResponse {} export interface MsgChannelCloseConfirmResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseConfirmResponse'; value: Uint8Array; } /** @@ -341,7 +341,7 @@ export interface MsgChannelCloseConfirmResponseProtoMsg { */ export interface MsgChannelCloseConfirmResponseAmino {} export interface MsgChannelCloseConfirmResponseAminoMsg { - type: "cosmos-sdk/MsgChannelCloseConfirmResponse"; + type: 'cosmos-sdk/MsgChannelCloseConfirmResponse'; value: MsgChannelCloseConfirmResponseAmino; } /** MsgRecvPacket receives incoming IBC packet */ @@ -352,7 +352,7 @@ export interface MsgRecvPacket { signer: string; } export interface MsgRecvPacketProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket"; + typeUrl: '/ibc.core.channel.v1.MsgRecvPacket'; value: Uint8Array; } /** MsgRecvPacket receives incoming IBC packet */ @@ -363,7 +363,7 @@ export interface MsgRecvPacketAmino { signer: string; } export interface MsgRecvPacketAminoMsg { - type: "cosmos-sdk/MsgRecvPacket"; + type: 'cosmos-sdk/MsgRecvPacket'; value: MsgRecvPacketAmino; } /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ @@ -371,7 +371,7 @@ export interface MsgRecvPacketResponse { result: ResponseResultType; } export interface MsgRecvPacketResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse"; + typeUrl: '/ibc.core.channel.v1.MsgRecvPacketResponse'; value: Uint8Array; } /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ @@ -379,7 +379,7 @@ export interface MsgRecvPacketResponseAmino { result: ResponseResultType; } export interface MsgRecvPacketResponseAminoMsg { - type: "cosmos-sdk/MsgRecvPacketResponse"; + type: 'cosmos-sdk/MsgRecvPacketResponse'; value: MsgRecvPacketResponseAmino; } /** MsgTimeout receives timed-out packet */ @@ -391,7 +391,7 @@ export interface MsgTimeout { signer: string; } export interface MsgTimeoutProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeout"; + typeUrl: '/ibc.core.channel.v1.MsgTimeout'; value: Uint8Array; } /** MsgTimeout receives timed-out packet */ @@ -403,7 +403,7 @@ export interface MsgTimeoutAmino { signer: string; } export interface MsgTimeoutAminoMsg { - type: "cosmos-sdk/MsgTimeout"; + type: 'cosmos-sdk/MsgTimeout'; value: MsgTimeoutAmino; } /** MsgTimeoutResponse defines the Msg/Timeout response type. */ @@ -411,7 +411,7 @@ export interface MsgTimeoutResponse { result: ResponseResultType; } export interface MsgTimeoutResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse"; + typeUrl: '/ibc.core.channel.v1.MsgTimeoutResponse'; value: Uint8Array; } /** MsgTimeoutResponse defines the Msg/Timeout response type. */ @@ -419,7 +419,7 @@ export interface MsgTimeoutResponseAmino { result: ResponseResultType; } export interface MsgTimeoutResponseAminoMsg { - type: "cosmos-sdk/MsgTimeoutResponse"; + type: 'cosmos-sdk/MsgTimeoutResponse'; value: MsgTimeoutResponseAmino; } /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ @@ -433,7 +433,7 @@ export interface MsgTimeoutOnClose { counterpartyUpgradeSequence: bigint; } export interface MsgTimeoutOnCloseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose"; + typeUrl: '/ibc.core.channel.v1.MsgTimeoutOnClose'; value: Uint8Array; } /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ @@ -447,7 +447,7 @@ export interface MsgTimeoutOnCloseAmino { counterparty_upgrade_sequence: string; } export interface MsgTimeoutOnCloseAminoMsg { - type: "cosmos-sdk/MsgTimeoutOnClose"; + type: 'cosmos-sdk/MsgTimeoutOnClose'; value: MsgTimeoutOnCloseAmino; } /** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ @@ -455,7 +455,7 @@ export interface MsgTimeoutOnCloseResponse { result: ResponseResultType; } export interface MsgTimeoutOnCloseResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse"; + typeUrl: '/ibc.core.channel.v1.MsgTimeoutOnCloseResponse'; value: Uint8Array; } /** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ @@ -463,7 +463,7 @@ export interface MsgTimeoutOnCloseResponseAmino { result: ResponseResultType; } export interface MsgTimeoutOnCloseResponseAminoMsg { - type: "cosmos-sdk/MsgTimeoutOnCloseResponse"; + type: 'cosmos-sdk/MsgTimeoutOnCloseResponse'; value: MsgTimeoutOnCloseResponseAmino; } /** MsgAcknowledgement receives incoming IBC acknowledgement */ @@ -475,7 +475,7 @@ export interface MsgAcknowledgement { signer: string; } export interface MsgAcknowledgementProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement"; + typeUrl: '/ibc.core.channel.v1.MsgAcknowledgement'; value: Uint8Array; } /** MsgAcknowledgement receives incoming IBC acknowledgement */ @@ -487,7 +487,7 @@ export interface MsgAcknowledgementAmino { signer: string; } export interface MsgAcknowledgementAminoMsg { - type: "cosmos-sdk/MsgAcknowledgement"; + type: 'cosmos-sdk/MsgAcknowledgement'; value: MsgAcknowledgementAmino; } /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ @@ -495,7 +495,7 @@ export interface MsgAcknowledgementResponse { result: ResponseResultType; } export interface MsgAcknowledgementResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse"; + typeUrl: '/ibc.core.channel.v1.MsgAcknowledgementResponse'; value: Uint8Array; } /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ @@ -503,7 +503,7 @@ export interface MsgAcknowledgementResponseAmino { result: ResponseResultType; } export interface MsgAcknowledgementResponseAminoMsg { - type: "cosmos-sdk/MsgAcknowledgementResponse"; + type: 'cosmos-sdk/MsgAcknowledgementResponse'; value: MsgAcknowledgementResponseAmino; } /** @@ -518,7 +518,7 @@ export interface MsgChannelUpgradeInit { signer: string; } export interface MsgChannelUpgradeInitProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInit"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeInit'; value: Uint8Array; } /** @@ -533,7 +533,7 @@ export interface MsgChannelUpgradeInitAmino { signer: string; } export interface MsgChannelUpgradeInitAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeInit"; + type: 'cosmos-sdk/MsgChannelUpgradeInit'; value: MsgChannelUpgradeInitAmino; } /** MsgChannelUpgradeInitResponse defines the MsgChannelUpgradeInit response type */ @@ -542,7 +542,7 @@ export interface MsgChannelUpgradeInitResponse { upgradeSequence: bigint; } export interface MsgChannelUpgradeInitResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeInitResponse'; value: Uint8Array; } /** MsgChannelUpgradeInitResponse defines the MsgChannelUpgradeInit response type */ @@ -551,7 +551,7 @@ export interface MsgChannelUpgradeInitResponseAmino { upgrade_sequence: string; } export interface MsgChannelUpgradeInitResponseAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeInitResponse"; + type: 'cosmos-sdk/MsgChannelUpgradeInitResponse'; value: MsgChannelUpgradeInitResponseAmino; } /** MsgChannelUpgradeTry defines the request type for the ChannelUpgradeTry rpc */ @@ -567,7 +567,7 @@ export interface MsgChannelUpgradeTry { signer: string; } export interface MsgChannelUpgradeTryProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTry"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTry'; value: Uint8Array; } /** MsgChannelUpgradeTry defines the request type for the ChannelUpgradeTry rpc */ @@ -583,7 +583,7 @@ export interface MsgChannelUpgradeTryAmino { signer: string; } export interface MsgChannelUpgradeTryAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeTry"; + type: 'cosmos-sdk/MsgChannelUpgradeTry'; value: MsgChannelUpgradeTryAmino; } /** MsgChannelUpgradeTryResponse defines the MsgChannelUpgradeTry response type */ @@ -593,7 +593,7 @@ export interface MsgChannelUpgradeTryResponse { result: ResponseResultType; } export interface MsgChannelUpgradeTryResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTryResponse'; value: Uint8Array; } /** MsgChannelUpgradeTryResponse defines the MsgChannelUpgradeTry response type */ @@ -603,7 +603,7 @@ export interface MsgChannelUpgradeTryResponseAmino { result: ResponseResultType; } export interface MsgChannelUpgradeTryResponseAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeTryResponse"; + type: 'cosmos-sdk/MsgChannelUpgradeTryResponse'; value: MsgChannelUpgradeTryResponseAmino; } /** MsgChannelUpgradeAck defines the request type for the ChannelUpgradeAck rpc */ @@ -617,7 +617,7 @@ export interface MsgChannelUpgradeAck { signer: string; } export interface MsgChannelUpgradeAckProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAck"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeAck'; value: Uint8Array; } /** MsgChannelUpgradeAck defines the request type for the ChannelUpgradeAck rpc */ @@ -631,7 +631,7 @@ export interface MsgChannelUpgradeAckAmino { signer: string; } export interface MsgChannelUpgradeAckAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeAck"; + type: 'cosmos-sdk/MsgChannelUpgradeAck'; value: MsgChannelUpgradeAckAmino; } /** MsgChannelUpgradeAckResponse defines MsgChannelUpgradeAck response type */ @@ -639,7 +639,7 @@ export interface MsgChannelUpgradeAckResponse { result: ResponseResultType; } export interface MsgChannelUpgradeAckResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeAckResponse'; value: Uint8Array; } /** MsgChannelUpgradeAckResponse defines MsgChannelUpgradeAck response type */ @@ -647,7 +647,7 @@ export interface MsgChannelUpgradeAckResponseAmino { result: ResponseResultType; } export interface MsgChannelUpgradeAckResponseAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeAckResponse"; + type: 'cosmos-sdk/MsgChannelUpgradeAckResponse'; value: MsgChannelUpgradeAckResponseAmino; } /** MsgChannelUpgradeConfirm defines the request type for the ChannelUpgradeConfirm rpc */ @@ -662,7 +662,7 @@ export interface MsgChannelUpgradeConfirm { signer: string; } export interface MsgChannelUpgradeConfirmProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirm"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeConfirm'; value: Uint8Array; } /** MsgChannelUpgradeConfirm defines the request type for the ChannelUpgradeConfirm rpc */ @@ -677,7 +677,7 @@ export interface MsgChannelUpgradeConfirmAmino { signer: string; } export interface MsgChannelUpgradeConfirmAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeConfirm"; + type: 'cosmos-sdk/MsgChannelUpgradeConfirm'; value: MsgChannelUpgradeConfirmAmino; } /** MsgChannelUpgradeConfirmResponse defines MsgChannelUpgradeConfirm response type */ @@ -685,7 +685,7 @@ export interface MsgChannelUpgradeConfirmResponse { result: ResponseResultType; } export interface MsgChannelUpgradeConfirmResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse'; value: Uint8Array; } /** MsgChannelUpgradeConfirmResponse defines MsgChannelUpgradeConfirm response type */ @@ -693,7 +693,7 @@ export interface MsgChannelUpgradeConfirmResponseAmino { result: ResponseResultType; } export interface MsgChannelUpgradeConfirmResponseAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeConfirmResponse"; + type: 'cosmos-sdk/MsgChannelUpgradeConfirmResponse'; value: MsgChannelUpgradeConfirmResponseAmino; } /** MsgChannelUpgradeOpen defines the request type for the ChannelUpgradeOpen rpc */ @@ -707,7 +707,7 @@ export interface MsgChannelUpgradeOpen { signer: string; } export interface MsgChannelUpgradeOpenProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpen"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeOpen'; value: Uint8Array; } /** MsgChannelUpgradeOpen defines the request type for the ChannelUpgradeOpen rpc */ @@ -721,19 +721,19 @@ export interface MsgChannelUpgradeOpenAmino { signer: string; } export interface MsgChannelUpgradeOpenAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeOpen"; + type: 'cosmos-sdk/MsgChannelUpgradeOpen'; value: MsgChannelUpgradeOpenAmino; } /** MsgChannelUpgradeOpenResponse defines the MsgChannelUpgradeOpen response type */ export interface MsgChannelUpgradeOpenResponse {} export interface MsgChannelUpgradeOpenResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse'; value: Uint8Array; } /** MsgChannelUpgradeOpenResponse defines the MsgChannelUpgradeOpen response type */ export interface MsgChannelUpgradeOpenResponseAmino {} export interface MsgChannelUpgradeOpenResponseAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeOpenResponse"; + type: 'cosmos-sdk/MsgChannelUpgradeOpenResponse'; value: MsgChannelUpgradeOpenResponseAmino; } /** MsgChannelUpgradeTimeout defines the request type for the ChannelUpgradeTimeout rpc */ @@ -746,7 +746,7 @@ export interface MsgChannelUpgradeTimeout { signer: string; } export interface MsgChannelUpgradeTimeoutProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeout"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTimeout'; value: Uint8Array; } /** MsgChannelUpgradeTimeout defines the request type for the ChannelUpgradeTimeout rpc */ @@ -759,19 +759,19 @@ export interface MsgChannelUpgradeTimeoutAmino { signer: string; } export interface MsgChannelUpgradeTimeoutAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeTimeout"; + type: 'cosmos-sdk/MsgChannelUpgradeTimeout'; value: MsgChannelUpgradeTimeoutAmino; } /** MsgChannelUpgradeTimeoutRepsonse defines the MsgChannelUpgradeTimeout response type */ export interface MsgChannelUpgradeTimeoutResponse {} export interface MsgChannelUpgradeTimeoutResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse'; value: Uint8Array; } /** MsgChannelUpgradeTimeoutRepsonse defines the MsgChannelUpgradeTimeout response type */ export interface MsgChannelUpgradeTimeoutResponseAmino {} export interface MsgChannelUpgradeTimeoutResponseAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeTimeoutResponse"; + type: 'cosmos-sdk/MsgChannelUpgradeTimeoutResponse'; value: MsgChannelUpgradeTimeoutResponseAmino; } /** MsgChannelUpgradeCancel defines the request type for the ChannelUpgradeCancel rpc */ @@ -784,7 +784,7 @@ export interface MsgChannelUpgradeCancel { signer: string; } export interface MsgChannelUpgradeCancelProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancel"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeCancel'; value: Uint8Array; } /** MsgChannelUpgradeCancel defines the request type for the ChannelUpgradeCancel rpc */ @@ -797,19 +797,19 @@ export interface MsgChannelUpgradeCancelAmino { signer: string; } export interface MsgChannelUpgradeCancelAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeCancel"; + type: 'cosmos-sdk/MsgChannelUpgradeCancel'; value: MsgChannelUpgradeCancelAmino; } /** MsgChannelUpgradeCancelResponse defines the MsgChannelUpgradeCancel response type */ export interface MsgChannelUpgradeCancelResponse {} export interface MsgChannelUpgradeCancelResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse"; + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse'; value: Uint8Array; } /** MsgChannelUpgradeCancelResponse defines the MsgChannelUpgradeCancel response type */ export interface MsgChannelUpgradeCancelResponseAmino {} export interface MsgChannelUpgradeCancelResponseAminoMsg { - type: "cosmos-sdk/MsgChannelUpgradeCancelResponse"; + type: 'cosmos-sdk/MsgChannelUpgradeCancelResponse'; value: MsgChannelUpgradeCancelResponseAmino; } /** MsgUpdateParams is the MsgUpdateParams request type. */ @@ -824,7 +824,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgUpdateParams"; + typeUrl: '/ibc.core.channel.v1.MsgUpdateParams'; value: Uint8Array; } /** MsgUpdateParams is the MsgUpdateParams request type. */ @@ -839,19 +839,19 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/MsgUpdateParams"; + type: 'cosmos-sdk/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** MsgUpdateParamsResponse defines the MsgUpdateParams response type. */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgUpdateParamsResponse"; + typeUrl: '/ibc.core.channel.v1.MsgUpdateParamsResponse'; value: Uint8Array; } /** MsgUpdateParamsResponse defines the MsgUpdateParams response type. */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } /** MsgPruneAcknowledgements defines the request type for the PruneAcknowledgements rpc. */ @@ -862,7 +862,7 @@ export interface MsgPruneAcknowledgements { signer: string; } export interface MsgPruneAcknowledgementsProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgements"; + typeUrl: '/ibc.core.channel.v1.MsgPruneAcknowledgements'; value: Uint8Array; } /** MsgPruneAcknowledgements defines the request type for the PruneAcknowledgements rpc. */ @@ -873,7 +873,7 @@ export interface MsgPruneAcknowledgementsAmino { signer: string; } export interface MsgPruneAcknowledgementsAminoMsg { - type: "cosmos-sdk/MsgPruneAcknowledgements"; + type: 'cosmos-sdk/MsgPruneAcknowledgements'; value: MsgPruneAcknowledgementsAmino; } /** MsgPruneAcknowledgementsResponse defines the response type for the PruneAcknowledgements rpc. */ @@ -884,7 +884,7 @@ export interface MsgPruneAcknowledgementsResponse { totalRemainingSequences: bigint; } export interface MsgPruneAcknowledgementsResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse"; + typeUrl: '/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse'; value: Uint8Array; } /** MsgPruneAcknowledgementsResponse defines the response type for the PruneAcknowledgements rpc. */ @@ -895,33 +895,33 @@ export interface MsgPruneAcknowledgementsResponseAmino { total_remaining_sequences: string; } export interface MsgPruneAcknowledgementsResponseAminoMsg { - type: "cosmos-sdk/MsgPruneAcknowledgementsResponse"; + type: 'cosmos-sdk/MsgPruneAcknowledgementsResponse'; value: MsgPruneAcknowledgementsResponseAmino; } function createBaseMsgChannelOpenInit(): MsgChannelOpenInit { return { - portId: "", + portId: '', channel: Channel.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelOpenInit = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - aminoType: "cosmos-sdk/MsgChannelOpenInit", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenInit', + aminoType: 'cosmos-sdk/MsgChannelOpenInit', is(o: any): o is MsgChannelOpenInit { - return o && (o.$typeUrl === MsgChannelOpenInit.typeUrl || typeof o.portId === "string" && Channel.is(o.channel) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenInit.typeUrl || typeof o.portId === 'string' && Channel.is(o.channel) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelOpenInitAmino { - return o && (o.$typeUrl === MsgChannelOpenInit.typeUrl || typeof o.port_id === "string" && Channel.isAmino(o.channel) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenInit.typeUrl || typeof o.port_id === 'string' && Channel.isAmino(o.channel) && typeof o.signer === 'string'); }, encode(message: MsgChannelOpenInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } if (message.channel !== undefined) { Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(26).string(message.signer); } return writer; @@ -933,27 +933,27 @@ export const MsgChannelOpenInit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channel = Channel.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelOpenInit { const message = createBaseMsgChannelOpenInit(); - message.portId = object.portId ?? ""; + message.portId = object.portId ?? ''; message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelOpenInitAmino): MsgChannelOpenInit { @@ -971,9 +971,9 @@ export const MsgChannelOpenInit = { }, toAmino(message: MsgChannelOpenInit): MsgChannelOpenInitAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; + obj.port_id = message.portId === '' ? undefined : message.portId; obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenInitAminoMsg): MsgChannelOpenInit { @@ -981,7 +981,7 @@ export const MsgChannelOpenInit = { }, toAminoMsg(message: MsgChannelOpenInit): MsgChannelOpenInitAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenInit", + type: 'cosmos-sdk/MsgChannelOpenInit', value: MsgChannelOpenInit.toAmino(message) }; }, @@ -993,7 +993,7 @@ export const MsgChannelOpenInit = { }, toProtoMsg(message: MsgChannelOpenInit): MsgChannelOpenInitProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenInit', value: MsgChannelOpenInit.encode(message).finish() }; } @@ -1002,24 +1002,24 @@ GlobalDecoderRegistry.register(MsgChannelOpenInit.typeUrl, MsgChannelOpenInit); GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInit.aminoType, MsgChannelOpenInit.typeUrl); function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { return { - channelId: "", - version: "" + channelId: '', + version: '' }; } export const MsgChannelOpenInitResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", - aminoType: "cosmos-sdk/MsgChannelOpenInitResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenInitResponse', + aminoType: 'cosmos-sdk/MsgChannelOpenInitResponse', is(o: any): o is MsgChannelOpenInitResponse { - return o && (o.$typeUrl === MsgChannelOpenInitResponse.typeUrl || typeof o.channelId === "string" && typeof o.version === "string"); + return o && (o.$typeUrl === MsgChannelOpenInitResponse.typeUrl || typeof o.channelId === 'string' && typeof o.version === 'string'); }, isAmino(o: any): o is MsgChannelOpenInitResponseAmino { - return o && (o.$typeUrl === MsgChannelOpenInitResponse.typeUrl || typeof o.channel_id === "string" && typeof o.version === "string"); + return o && (o.$typeUrl === MsgChannelOpenInitResponse.typeUrl || typeof o.channel_id === 'string' && typeof o.version === 'string'); }, encode(message: MsgChannelOpenInitResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(10).string(message.channelId); } - if (message.version !== "") { + if (message.version !== '') { writer.uint32(18).string(message.version); } return writer; @@ -1031,23 +1031,23 @@ export const MsgChannelOpenInitResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.channelId = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.channelId = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelOpenInitResponse { const message = createBaseMsgChannelOpenInitResponse(); - message.channelId = object.channelId ?? ""; - message.version = object.version ?? ""; + message.channelId = object.channelId ?? ''; + message.version = object.version ?? ''; return message; }, fromAmino(object: MsgChannelOpenInitResponseAmino): MsgChannelOpenInitResponse { @@ -1062,8 +1062,8 @@ export const MsgChannelOpenInitResponse = { }, toAmino(message: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseAmino { const obj: any = {}; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; - obj.version = message.version === "" ? undefined : message.version; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; + obj.version = message.version === '' ? undefined : message.version; return obj; }, fromAminoMsg(object: MsgChannelOpenInitResponseAminoMsg): MsgChannelOpenInitResponse { @@ -1071,7 +1071,7 @@ export const MsgChannelOpenInitResponse = { }, toAminoMsg(message: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenInitResponse", + type: 'cosmos-sdk/MsgChannelOpenInitResponse', value: MsgChannelOpenInitResponse.toAmino(message) }; }, @@ -1083,7 +1083,7 @@ export const MsgChannelOpenInitResponse = { }, toProtoMsg(message: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenInitResponse', value: MsgChannelOpenInitResponse.encode(message).finish() }; } @@ -1092,35 +1092,35 @@ GlobalDecoderRegistry.register(MsgChannelOpenInitResponse.typeUrl, MsgChannelOpe GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInitResponse.aminoType, MsgChannelOpenInitResponse.typeUrl); function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { return { - portId: "", - previousChannelId: "", + portId: '', + previousChannelId: '', channel: Channel.fromPartial({}), - counterpartyVersion: "", + counterpartyVersion: '', proofInit: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelOpenTry = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - aminoType: "cosmos-sdk/MsgChannelOpenTry", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenTry', + aminoType: 'cosmos-sdk/MsgChannelOpenTry', is(o: any): o is MsgChannelOpenTry { - return o && (o.$typeUrl === MsgChannelOpenTry.typeUrl || typeof o.portId === "string" && typeof o.previousChannelId === "string" && Channel.is(o.channel) && typeof o.counterpartyVersion === "string" && (o.proofInit instanceof Uint8Array || typeof o.proofInit === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenTry.typeUrl || typeof o.portId === 'string' && typeof o.previousChannelId === 'string' && Channel.is(o.channel) && typeof o.counterpartyVersion === 'string' && (o.proofInit instanceof Uint8Array || typeof o.proofInit === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelOpenTryAmino { - return o && (o.$typeUrl === MsgChannelOpenTry.typeUrl || typeof o.port_id === "string" && typeof o.previous_channel_id === "string" && Channel.isAmino(o.channel) && typeof o.counterparty_version === "string" && (o.proof_init instanceof Uint8Array || typeof o.proof_init === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenTry.typeUrl || typeof o.port_id === 'string' && typeof o.previous_channel_id === 'string' && Channel.isAmino(o.channel) && typeof o.counterparty_version === 'string' && (o.proof_init instanceof Uint8Array || typeof o.proof_init === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelOpenTry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.previousChannelId !== "") { + if (message.previousChannelId !== '') { writer.uint32(18).string(message.previousChannelId); } if (message.channel !== undefined) { Channel.encode(message.channel, writer.uint32(26).fork()).ldelim(); } - if (message.counterpartyVersion !== "") { + if (message.counterpartyVersion !== '') { writer.uint32(34).string(message.counterpartyVersion); } if (message.proofInit.length !== 0) { @@ -1129,7 +1129,7 @@ export const MsgChannelOpenTry = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(58).string(message.signer); } return writer; @@ -1141,43 +1141,43 @@ export const MsgChannelOpenTry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.previousChannelId = reader.string(); - break; - case 3: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofInit = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.previousChannelId = reader.string(); + break; + case 3: + message.channel = Channel.decode(reader, reader.uint32()); + break; + case 4: + message.counterpartyVersion = reader.string(); + break; + case 5: + message.proofInit = reader.bytes(); + break; + case 6: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 7: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelOpenTry { const message = createBaseMsgChannelOpenTry(); - message.portId = object.portId ?? ""; - message.previousChannelId = object.previousChannelId ?? ""; + message.portId = object.portId ?? ''; + message.previousChannelId = object.previousChannelId ?? ''; message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; - message.counterpartyVersion = object.counterpartyVersion ?? ""; + message.counterpartyVersion = object.counterpartyVersion ?? ''; message.proofInit = object.proofInit ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelOpenTryAmino): MsgChannelOpenTry { @@ -1207,13 +1207,13 @@ export const MsgChannelOpenTry = { }, toAmino(message: MsgChannelOpenTry): MsgChannelOpenTryAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.previous_channel_id = message.previousChannelId === "" ? undefined : message.previousChannelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.previous_channel_id = message.previousChannelId === '' ? undefined : message.previousChannelId; obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; - obj.counterparty_version = message.counterpartyVersion === "" ? undefined : message.counterpartyVersion; + obj.counterparty_version = message.counterpartyVersion === '' ? undefined : message.counterpartyVersion; obj.proof_init = message.proofInit ? base64FromBytes(message.proofInit) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenTryAminoMsg): MsgChannelOpenTry { @@ -1221,7 +1221,7 @@ export const MsgChannelOpenTry = { }, toAminoMsg(message: MsgChannelOpenTry): MsgChannelOpenTryAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenTry", + type: 'cosmos-sdk/MsgChannelOpenTry', value: MsgChannelOpenTry.toAmino(message) }; }, @@ -1233,7 +1233,7 @@ export const MsgChannelOpenTry = { }, toProtoMsg(message: MsgChannelOpenTry): MsgChannelOpenTryProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenTry', value: MsgChannelOpenTry.encode(message).finish() }; } @@ -1242,24 +1242,24 @@ GlobalDecoderRegistry.register(MsgChannelOpenTry.typeUrl, MsgChannelOpenTry); GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTry.aminoType, MsgChannelOpenTry.typeUrl); function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { return { - version: "", - channelId: "" + version: '', + channelId: '' }; } export const MsgChannelOpenTryResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", - aminoType: "cosmos-sdk/MsgChannelOpenTryResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenTryResponse', + aminoType: 'cosmos-sdk/MsgChannelOpenTryResponse', is(o: any): o is MsgChannelOpenTryResponse { - return o && (o.$typeUrl === MsgChannelOpenTryResponse.typeUrl || typeof o.version === "string" && typeof o.channelId === "string"); + return o && (o.$typeUrl === MsgChannelOpenTryResponse.typeUrl || typeof o.version === 'string' && typeof o.channelId === 'string'); }, isAmino(o: any): o is MsgChannelOpenTryResponseAmino { - return o && (o.$typeUrl === MsgChannelOpenTryResponse.typeUrl || typeof o.version === "string" && typeof o.channel_id === "string"); + return o && (o.$typeUrl === MsgChannelOpenTryResponse.typeUrl || typeof o.version === 'string' && typeof o.channel_id === 'string'); }, encode(message: MsgChannelOpenTryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== "") { + if (message.version !== '') { writer.uint32(10).string(message.version); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } return writer; @@ -1271,23 +1271,23 @@ export const MsgChannelOpenTryResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.version = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelOpenTryResponse { const message = createBaseMsgChannelOpenTryResponse(); - message.version = object.version ?? ""; - message.channelId = object.channelId ?? ""; + message.version = object.version ?? ''; + message.channelId = object.channelId ?? ''; return message; }, fromAmino(object: MsgChannelOpenTryResponseAmino): MsgChannelOpenTryResponse { @@ -1302,8 +1302,8 @@ export const MsgChannelOpenTryResponse = { }, toAmino(message: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseAmino { const obj: any = {}; - obj.version = message.version === "" ? undefined : message.version; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.version = message.version === '' ? undefined : message.version; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; return obj; }, fromAminoMsg(object: MsgChannelOpenTryResponseAminoMsg): MsgChannelOpenTryResponse { @@ -1311,7 +1311,7 @@ export const MsgChannelOpenTryResponse = { }, toAminoMsg(message: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenTryResponse", + type: 'cosmos-sdk/MsgChannelOpenTryResponse', value: MsgChannelOpenTryResponse.toAmino(message) }; }, @@ -1323,7 +1323,7 @@ export const MsgChannelOpenTryResponse = { }, toProtoMsg(message: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenTryResponse', value: MsgChannelOpenTryResponse.encode(message).finish() }; } @@ -1332,35 +1332,35 @@ GlobalDecoderRegistry.register(MsgChannelOpenTryResponse.typeUrl, MsgChannelOpen GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTryResponse.aminoType, MsgChannelOpenTryResponse.typeUrl); function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { return { - portId: "", - channelId: "", - counterpartyChannelId: "", - counterpartyVersion: "", + portId: '', + channelId: '', + counterpartyChannelId: '', + counterpartyVersion: '', proofTry: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelOpenAck = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - aminoType: "cosmos-sdk/MsgChannelOpenAck", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenAck', + aminoType: 'cosmos-sdk/MsgChannelOpenAck', is(o: any): o is MsgChannelOpenAck { - return o && (o.$typeUrl === MsgChannelOpenAck.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.counterpartyChannelId === "string" && typeof o.counterpartyVersion === "string" && (o.proofTry instanceof Uint8Array || typeof o.proofTry === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenAck.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && typeof o.counterpartyChannelId === 'string' && typeof o.counterpartyVersion === 'string' && (o.proofTry instanceof Uint8Array || typeof o.proofTry === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelOpenAckAmino { - return o && (o.$typeUrl === MsgChannelOpenAck.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.counterparty_channel_id === "string" && typeof o.counterparty_version === "string" && (o.proof_try instanceof Uint8Array || typeof o.proof_try === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenAck.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && typeof o.counterparty_channel_id === 'string' && typeof o.counterparty_version === 'string' && (o.proof_try instanceof Uint8Array || typeof o.proof_try === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelOpenAck, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } - if (message.counterpartyChannelId !== "") { + if (message.counterpartyChannelId !== '') { writer.uint32(26).string(message.counterpartyChannelId); } - if (message.counterpartyVersion !== "") { + if (message.counterpartyVersion !== '') { writer.uint32(34).string(message.counterpartyVersion); } if (message.proofTry.length !== 0) { @@ -1369,7 +1369,7 @@ export const MsgChannelOpenAck = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(58).string(message.signer); } return writer; @@ -1381,43 +1381,43 @@ export const MsgChannelOpenAck = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyChannelId = reader.string(); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofTry = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.counterpartyChannelId = reader.string(); + break; + case 4: + message.counterpartyVersion = reader.string(); + break; + case 5: + message.proofTry = reader.bytes(); + break; + case 6: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 7: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelOpenAck { const message = createBaseMsgChannelOpenAck(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.counterpartyChannelId = object.counterpartyChannelId ?? ""; - message.counterpartyVersion = object.counterpartyVersion ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; + message.counterpartyChannelId = object.counterpartyChannelId ?? ''; + message.counterpartyVersion = object.counterpartyVersion ?? ''; message.proofTry = object.proofTry ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelOpenAckAmino): MsgChannelOpenAck { @@ -1447,13 +1447,13 @@ export const MsgChannelOpenAck = { }, toAmino(message: MsgChannelOpenAck): MsgChannelOpenAckAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; - obj.counterparty_channel_id = message.counterpartyChannelId === "" ? undefined : message.counterpartyChannelId; - obj.counterparty_version = message.counterpartyVersion === "" ? undefined : message.counterpartyVersion; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; + obj.counterparty_channel_id = message.counterpartyChannelId === '' ? undefined : message.counterpartyChannelId; + obj.counterparty_version = message.counterpartyVersion === '' ? undefined : message.counterpartyVersion; obj.proof_try = message.proofTry ? base64FromBytes(message.proofTry) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenAckAminoMsg): MsgChannelOpenAck { @@ -1461,7 +1461,7 @@ export const MsgChannelOpenAck = { }, toAminoMsg(message: MsgChannelOpenAck): MsgChannelOpenAckAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenAck", + type: 'cosmos-sdk/MsgChannelOpenAck', value: MsgChannelOpenAck.toAmino(message) }; }, @@ -1473,7 +1473,7 @@ export const MsgChannelOpenAck = { }, toProtoMsg(message: MsgChannelOpenAck): MsgChannelOpenAckProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenAck', value: MsgChannelOpenAck.encode(message).finish() }; } @@ -1484,8 +1484,8 @@ function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { return {}; } export const MsgChannelOpenAckResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", - aminoType: "cosmos-sdk/MsgChannelOpenAckResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenAckResponse', + aminoType: 'cosmos-sdk/MsgChannelOpenAckResponse', is(o: any): o is MsgChannelOpenAckResponse { return o && o.$typeUrl === MsgChannelOpenAckResponse.typeUrl; }, @@ -1502,9 +1502,9 @@ export const MsgChannelOpenAckResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1526,7 +1526,7 @@ export const MsgChannelOpenAckResponse = { }, toAminoMsg(message: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenAckResponse", + type: 'cosmos-sdk/MsgChannelOpenAckResponse', value: MsgChannelOpenAckResponse.toAmino(message) }; }, @@ -1538,7 +1538,7 @@ export const MsgChannelOpenAckResponse = { }, toProtoMsg(message: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenAckResponse', value: MsgChannelOpenAckResponse.encode(message).finish() }; } @@ -1547,27 +1547,27 @@ GlobalDecoderRegistry.register(MsgChannelOpenAckResponse.typeUrl, MsgChannelOpen GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAckResponse.aminoType, MsgChannelOpenAckResponse.typeUrl); function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { return { - portId: "", - channelId: "", + portId: '', + channelId: '', proofAck: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelOpenConfirm = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - aminoType: "cosmos-sdk/MsgChannelOpenConfirm", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenConfirm', + aminoType: 'cosmos-sdk/MsgChannelOpenConfirm', is(o: any): o is MsgChannelOpenConfirm { - return o && (o.$typeUrl === MsgChannelOpenConfirm.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && (o.proofAck instanceof Uint8Array || typeof o.proofAck === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenConfirm.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && (o.proofAck instanceof Uint8Array || typeof o.proofAck === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelOpenConfirmAmino { - return o && (o.$typeUrl === MsgChannelOpenConfirm.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && (o.proof_ack instanceof Uint8Array || typeof o.proof_ack === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelOpenConfirm.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && (o.proof_ack instanceof Uint8Array || typeof o.proof_ack === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelOpenConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.proofAck.length !== 0) { @@ -1576,7 +1576,7 @@ export const MsgChannelOpenConfirm = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(42).string(message.signer); } return writer; @@ -1588,35 +1588,35 @@ export const MsgChannelOpenConfirm = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofAck = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.proofAck = reader.bytes(); + break; + case 4: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelOpenConfirm { const message = createBaseMsgChannelOpenConfirm(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.proofAck = object.proofAck ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelOpenConfirmAmino): MsgChannelOpenConfirm { @@ -1640,11 +1640,11 @@ export const MsgChannelOpenConfirm = { }, toAmino(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.proof_ack = message.proofAck ? base64FromBytes(message.proofAck) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenConfirmAminoMsg): MsgChannelOpenConfirm { @@ -1652,7 +1652,7 @@ export const MsgChannelOpenConfirm = { }, toAminoMsg(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenConfirm", + type: 'cosmos-sdk/MsgChannelOpenConfirm', value: MsgChannelOpenConfirm.toAmino(message) }; }, @@ -1664,7 +1664,7 @@ export const MsgChannelOpenConfirm = { }, toProtoMsg(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenConfirm', value: MsgChannelOpenConfirm.encode(message).finish() }; } @@ -1675,8 +1675,8 @@ function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmRespons return {}; } export const MsgChannelOpenConfirmResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", - aminoType: "cosmos-sdk/MsgChannelOpenConfirmResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenConfirmResponse', + aminoType: 'cosmos-sdk/MsgChannelOpenConfirmResponse', is(o: any): o is MsgChannelOpenConfirmResponse { return o && o.$typeUrl === MsgChannelOpenConfirmResponse.typeUrl; }, @@ -1693,9 +1693,9 @@ export const MsgChannelOpenConfirmResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1717,7 +1717,7 @@ export const MsgChannelOpenConfirmResponse = { }, toAminoMsg(message: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelOpenConfirmResponse", + type: 'cosmos-sdk/MsgChannelOpenConfirmResponse', value: MsgChannelOpenConfirmResponse.toAmino(message) }; }, @@ -1729,7 +1729,7 @@ export const MsgChannelOpenConfirmResponse = { }, toProtoMsg(message: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelOpenConfirmResponse', value: MsgChannelOpenConfirmResponse.encode(message).finish() }; } @@ -1738,28 +1738,28 @@ GlobalDecoderRegistry.register(MsgChannelOpenConfirmResponse.typeUrl, MsgChannel GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirmResponse.aminoType, MsgChannelOpenConfirmResponse.typeUrl); function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { return { - portId: "", - channelId: "", - signer: "" + portId: '', + channelId: '', + signer: '' }; } export const MsgChannelCloseInit = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - aminoType: "cosmos-sdk/MsgChannelCloseInit", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseInit', + aminoType: 'cosmos-sdk/MsgChannelCloseInit', is(o: any): o is MsgChannelCloseInit { - return o && (o.$typeUrl === MsgChannelCloseInit.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelCloseInit.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelCloseInitAmino { - return o && (o.$typeUrl === MsgChannelCloseInit.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelCloseInit.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && typeof o.signer === 'string'); }, encode(message: MsgChannelCloseInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(26).string(message.signer); } return writer; @@ -1771,27 +1771,27 @@ export const MsgChannelCloseInit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelCloseInit { const message = createBaseMsgChannelCloseInit(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.signer = object.signer ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelCloseInitAmino): MsgChannelCloseInit { @@ -1809,9 +1809,9 @@ export const MsgChannelCloseInit = { }, toAmino(message: MsgChannelCloseInit): MsgChannelCloseInitAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelCloseInitAminoMsg): MsgChannelCloseInit { @@ -1819,7 +1819,7 @@ export const MsgChannelCloseInit = { }, toAminoMsg(message: MsgChannelCloseInit): MsgChannelCloseInitAminoMsg { return { - type: "cosmos-sdk/MsgChannelCloseInit", + type: 'cosmos-sdk/MsgChannelCloseInit', value: MsgChannelCloseInit.toAmino(message) }; }, @@ -1831,7 +1831,7 @@ export const MsgChannelCloseInit = { }, toProtoMsg(message: MsgChannelCloseInit): MsgChannelCloseInitProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseInit', value: MsgChannelCloseInit.encode(message).finish() }; } @@ -1842,8 +1842,8 @@ function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { return {}; } export const MsgChannelCloseInitResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", - aminoType: "cosmos-sdk/MsgChannelCloseInitResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseInitResponse', + aminoType: 'cosmos-sdk/MsgChannelCloseInitResponse', is(o: any): o is MsgChannelCloseInitResponse { return o && o.$typeUrl === MsgChannelCloseInitResponse.typeUrl; }, @@ -1860,9 +1860,9 @@ export const MsgChannelCloseInitResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1884,7 +1884,7 @@ export const MsgChannelCloseInitResponse = { }, toAminoMsg(message: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelCloseInitResponse", + type: 'cosmos-sdk/MsgChannelCloseInitResponse', value: MsgChannelCloseInitResponse.toAmino(message) }; }, @@ -1896,7 +1896,7 @@ export const MsgChannelCloseInitResponse = { }, toProtoMsg(message: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseInitResponse', value: MsgChannelCloseInitResponse.encode(message).finish() }; } @@ -1905,28 +1905,28 @@ GlobalDecoderRegistry.register(MsgChannelCloseInitResponse.typeUrl, MsgChannelCl GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInitResponse.aminoType, MsgChannelCloseInitResponse.typeUrl); function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { return { - portId: "", - channelId: "", + portId: '', + channelId: '', proofInit: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "", + signer: '', counterpartyUpgradeSequence: BigInt(0) }; } export const MsgChannelCloseConfirm = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - aminoType: "cosmos-sdk/MsgChannelCloseConfirm", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseConfirm', + aminoType: 'cosmos-sdk/MsgChannelCloseConfirm', is(o: any): o is MsgChannelCloseConfirm { - return o && (o.$typeUrl === MsgChannelCloseConfirm.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && (o.proofInit instanceof Uint8Array || typeof o.proofInit === "string") && Height.is(o.proofHeight) && typeof o.signer === "string" && typeof o.counterpartyUpgradeSequence === "bigint"); + return o && (o.$typeUrl === MsgChannelCloseConfirm.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && (o.proofInit instanceof Uint8Array || typeof o.proofInit === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string' && typeof o.counterpartyUpgradeSequence === 'bigint'); }, isAmino(o: any): o is MsgChannelCloseConfirmAmino { - return o && (o.$typeUrl === MsgChannelCloseConfirm.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && (o.proof_init instanceof Uint8Array || typeof o.proof_init === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string" && typeof o.counterparty_upgrade_sequence === "bigint"); + return o && (o.$typeUrl === MsgChannelCloseConfirm.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && (o.proof_init instanceof Uint8Array || typeof o.proof_init === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string' && typeof o.counterparty_upgrade_sequence === 'bigint'); }, encode(message: MsgChannelCloseConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.proofInit.length !== 0) { @@ -1935,7 +1935,7 @@ export const MsgChannelCloseConfirm = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(42).string(message.signer); } if (message.counterpartyUpgradeSequence !== BigInt(0)) { @@ -1950,38 +1950,38 @@ export const MsgChannelCloseConfirm = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofInit = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - case 6: - message.counterpartyUpgradeSequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.proofInit = reader.bytes(); + break; + case 4: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 5: + message.signer = reader.string(); + break; + case 6: + message.counterpartyUpgradeSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelCloseConfirm { const message = createBaseMsgChannelCloseConfirm(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.proofInit = object.proofInit ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; message.counterpartyUpgradeSequence = object.counterpartyUpgradeSequence !== undefined && object.counterpartyUpgradeSequence !== null ? BigInt(object.counterpartyUpgradeSequence.toString()) : BigInt(0); return message; }, @@ -2009,11 +2009,11 @@ export const MsgChannelCloseConfirm = { }, toAmino(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.proof_init = message.proofInit ? base64FromBytes(message.proofInit) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; obj.counterparty_upgrade_sequence = message.counterpartyUpgradeSequence !== BigInt(0) ? message.counterpartyUpgradeSequence.toString() : undefined; return obj; }, @@ -2022,7 +2022,7 @@ export const MsgChannelCloseConfirm = { }, toAminoMsg(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmAminoMsg { return { - type: "cosmos-sdk/MsgChannelCloseConfirm", + type: 'cosmos-sdk/MsgChannelCloseConfirm', value: MsgChannelCloseConfirm.toAmino(message) }; }, @@ -2034,7 +2034,7 @@ export const MsgChannelCloseConfirm = { }, toProtoMsg(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseConfirm', value: MsgChannelCloseConfirm.encode(message).finish() }; } @@ -2045,8 +2045,8 @@ function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmRespo return {}; } export const MsgChannelCloseConfirmResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", - aminoType: "cosmos-sdk/MsgChannelCloseConfirmResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseConfirmResponse', + aminoType: 'cosmos-sdk/MsgChannelCloseConfirmResponse', is(o: any): o is MsgChannelCloseConfirmResponse { return o && o.$typeUrl === MsgChannelCloseConfirmResponse.typeUrl; }, @@ -2063,9 +2063,9 @@ export const MsgChannelCloseConfirmResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2087,7 +2087,7 @@ export const MsgChannelCloseConfirmResponse = { }, toAminoMsg(message: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelCloseConfirmResponse", + type: 'cosmos-sdk/MsgChannelCloseConfirmResponse', value: MsgChannelCloseConfirmResponse.toAmino(message) }; }, @@ -2099,7 +2099,7 @@ export const MsgChannelCloseConfirmResponse = { }, toProtoMsg(message: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelCloseConfirmResponse', value: MsgChannelCloseConfirmResponse.encode(message).finish() }; } @@ -2111,17 +2111,17 @@ function createBaseMsgRecvPacket(): MsgRecvPacket { packet: Packet.fromPartial({}), proofCommitment: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgRecvPacket = { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - aminoType: "cosmos-sdk/MsgRecvPacket", + typeUrl: '/ibc.core.channel.v1.MsgRecvPacket', + aminoType: 'cosmos-sdk/MsgRecvPacket', is(o: any): o is MsgRecvPacket { - return o && (o.$typeUrl === MsgRecvPacket.typeUrl || Packet.is(o.packet) && (o.proofCommitment instanceof Uint8Array || typeof o.proofCommitment === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgRecvPacket.typeUrl || Packet.is(o.packet) && (o.proofCommitment instanceof Uint8Array || typeof o.proofCommitment === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgRecvPacketAmino { - return o && (o.$typeUrl === MsgRecvPacket.typeUrl || Packet.isAmino(o.packet) && (o.proof_commitment instanceof Uint8Array || typeof o.proof_commitment === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgRecvPacket.typeUrl || Packet.isAmino(o.packet) && (o.proof_commitment instanceof Uint8Array || typeof o.proof_commitment === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgRecvPacket, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { @@ -2133,7 +2133,7 @@ export const MsgRecvPacket = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(34).string(message.signer); } return writer; @@ -2145,21 +2145,21 @@ export const MsgRecvPacket = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofCommitment = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.packet = Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proofCommitment = reader.bytes(); + break; + case 3: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 4: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2169,7 +2169,7 @@ export const MsgRecvPacket = { message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; message.proofCommitment = object.proofCommitment ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgRecvPacketAmino): MsgRecvPacket { @@ -2193,7 +2193,7 @@ export const MsgRecvPacket = { obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; obj.proof_commitment = message.proofCommitment ? base64FromBytes(message.proofCommitment) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgRecvPacketAminoMsg): MsgRecvPacket { @@ -2201,7 +2201,7 @@ export const MsgRecvPacket = { }, toAminoMsg(message: MsgRecvPacket): MsgRecvPacketAminoMsg { return { - type: "cosmos-sdk/MsgRecvPacket", + type: 'cosmos-sdk/MsgRecvPacket', value: MsgRecvPacket.toAmino(message) }; }, @@ -2213,7 +2213,7 @@ export const MsgRecvPacket = { }, toProtoMsg(message: MsgRecvPacket): MsgRecvPacketProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", + typeUrl: '/ibc.core.channel.v1.MsgRecvPacket', value: MsgRecvPacket.encode(message).finish() }; } @@ -2226,8 +2226,8 @@ function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { }; } export const MsgRecvPacketResponse = { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", - aminoType: "cosmos-sdk/MsgRecvPacketResponse", + typeUrl: '/ibc.core.channel.v1.MsgRecvPacketResponse', + aminoType: 'cosmos-sdk/MsgRecvPacketResponse', is(o: any): o is MsgRecvPacketResponse { return o && (o.$typeUrl === MsgRecvPacketResponse.typeUrl || isSet(o.result)); }, @@ -2247,12 +2247,12 @@ export const MsgRecvPacketResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2279,7 +2279,7 @@ export const MsgRecvPacketResponse = { }, toAminoMsg(message: MsgRecvPacketResponse): MsgRecvPacketResponseAminoMsg { return { - type: "cosmos-sdk/MsgRecvPacketResponse", + type: 'cosmos-sdk/MsgRecvPacketResponse', value: MsgRecvPacketResponse.toAmino(message) }; }, @@ -2291,7 +2291,7 @@ export const MsgRecvPacketResponse = { }, toProtoMsg(message: MsgRecvPacketResponse): MsgRecvPacketResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", + typeUrl: '/ibc.core.channel.v1.MsgRecvPacketResponse', value: MsgRecvPacketResponse.encode(message).finish() }; } @@ -2304,17 +2304,17 @@ function createBaseMsgTimeout(): MsgTimeout { proofUnreceived: new Uint8Array(), proofHeight: Height.fromPartial({}), nextSequenceRecv: BigInt(0), - signer: "" + signer: '' }; } export const MsgTimeout = { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - aminoType: "cosmos-sdk/MsgTimeout", + typeUrl: '/ibc.core.channel.v1.MsgTimeout', + aminoType: 'cosmos-sdk/MsgTimeout', is(o: any): o is MsgTimeout { - return o && (o.$typeUrl === MsgTimeout.typeUrl || Packet.is(o.packet) && (o.proofUnreceived instanceof Uint8Array || typeof o.proofUnreceived === "string") && Height.is(o.proofHeight) && typeof o.nextSequenceRecv === "bigint" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgTimeout.typeUrl || Packet.is(o.packet) && (o.proofUnreceived instanceof Uint8Array || typeof o.proofUnreceived === 'string') && Height.is(o.proofHeight) && typeof o.nextSequenceRecv === 'bigint' && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgTimeoutAmino { - return o && (o.$typeUrl === MsgTimeout.typeUrl || Packet.isAmino(o.packet) && (o.proof_unreceived instanceof Uint8Array || typeof o.proof_unreceived === "string") && Height.isAmino(o.proof_height) && typeof o.next_sequence_recv === "bigint" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgTimeout.typeUrl || Packet.isAmino(o.packet) && (o.proof_unreceived instanceof Uint8Array || typeof o.proof_unreceived === 'string') && Height.isAmino(o.proof_height) && typeof o.next_sequence_recv === 'bigint' && typeof o.signer === 'string'); }, encode(message: MsgTimeout, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { @@ -2329,7 +2329,7 @@ export const MsgTimeout = { if (message.nextSequenceRecv !== BigInt(0)) { writer.uint32(32).uint64(message.nextSequenceRecv); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(42).string(message.signer); } return writer; @@ -2341,24 +2341,24 @@ export const MsgTimeout = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.nextSequenceRecv = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.packet = Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proofUnreceived = reader.bytes(); + break; + case 3: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 4: + message.nextSequenceRecv = reader.uint64(); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2369,7 +2369,7 @@ export const MsgTimeout = { message.proofUnreceived = object.proofUnreceived ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.nextSequenceRecv = object.nextSequenceRecv !== undefined && object.nextSequenceRecv !== null ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgTimeoutAmino): MsgTimeout { @@ -2397,7 +2397,7 @@ export const MsgTimeout = { obj.proof_unreceived = message.proofUnreceived ? base64FromBytes(message.proofUnreceived) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.next_sequence_recv = message.nextSequenceRecv !== BigInt(0) ? message.nextSequenceRecv.toString() : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgTimeoutAminoMsg): MsgTimeout { @@ -2405,7 +2405,7 @@ export const MsgTimeout = { }, toAminoMsg(message: MsgTimeout): MsgTimeoutAminoMsg { return { - type: "cosmos-sdk/MsgTimeout", + type: 'cosmos-sdk/MsgTimeout', value: MsgTimeout.toAmino(message) }; }, @@ -2417,7 +2417,7 @@ export const MsgTimeout = { }, toProtoMsg(message: MsgTimeout): MsgTimeoutProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", + typeUrl: '/ibc.core.channel.v1.MsgTimeout', value: MsgTimeout.encode(message).finish() }; } @@ -2430,8 +2430,8 @@ function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { }; } export const MsgTimeoutResponse = { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", - aminoType: "cosmos-sdk/MsgTimeoutResponse", + typeUrl: '/ibc.core.channel.v1.MsgTimeoutResponse', + aminoType: 'cosmos-sdk/MsgTimeoutResponse', is(o: any): o is MsgTimeoutResponse { return o && (o.$typeUrl === MsgTimeoutResponse.typeUrl || isSet(o.result)); }, @@ -2451,12 +2451,12 @@ export const MsgTimeoutResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2483,7 +2483,7 @@ export const MsgTimeoutResponse = { }, toAminoMsg(message: MsgTimeoutResponse): MsgTimeoutResponseAminoMsg { return { - type: "cosmos-sdk/MsgTimeoutResponse", + type: 'cosmos-sdk/MsgTimeoutResponse', value: MsgTimeoutResponse.toAmino(message) }; }, @@ -2495,7 +2495,7 @@ export const MsgTimeoutResponse = { }, toProtoMsg(message: MsgTimeoutResponse): MsgTimeoutResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", + typeUrl: '/ibc.core.channel.v1.MsgTimeoutResponse', value: MsgTimeoutResponse.encode(message).finish() }; } @@ -2509,18 +2509,18 @@ function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { proofClose: new Uint8Array(), proofHeight: Height.fromPartial({}), nextSequenceRecv: BigInt(0), - signer: "", + signer: '', counterpartyUpgradeSequence: BigInt(0) }; } export const MsgTimeoutOnClose = { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - aminoType: "cosmos-sdk/MsgTimeoutOnClose", + typeUrl: '/ibc.core.channel.v1.MsgTimeoutOnClose', + aminoType: 'cosmos-sdk/MsgTimeoutOnClose', is(o: any): o is MsgTimeoutOnClose { - return o && (o.$typeUrl === MsgTimeoutOnClose.typeUrl || Packet.is(o.packet) && (o.proofUnreceived instanceof Uint8Array || typeof o.proofUnreceived === "string") && (o.proofClose instanceof Uint8Array || typeof o.proofClose === "string") && Height.is(o.proofHeight) && typeof o.nextSequenceRecv === "bigint" && typeof o.signer === "string" && typeof o.counterpartyUpgradeSequence === "bigint"); + return o && (o.$typeUrl === MsgTimeoutOnClose.typeUrl || Packet.is(o.packet) && (o.proofUnreceived instanceof Uint8Array || typeof o.proofUnreceived === 'string') && (o.proofClose instanceof Uint8Array || typeof o.proofClose === 'string') && Height.is(o.proofHeight) && typeof o.nextSequenceRecv === 'bigint' && typeof o.signer === 'string' && typeof o.counterpartyUpgradeSequence === 'bigint'); }, isAmino(o: any): o is MsgTimeoutOnCloseAmino { - return o && (o.$typeUrl === MsgTimeoutOnClose.typeUrl || Packet.isAmino(o.packet) && (o.proof_unreceived instanceof Uint8Array || typeof o.proof_unreceived === "string") && (o.proof_close instanceof Uint8Array || typeof o.proof_close === "string") && Height.isAmino(o.proof_height) && typeof o.next_sequence_recv === "bigint" && typeof o.signer === "string" && typeof o.counterparty_upgrade_sequence === "bigint"); + return o && (o.$typeUrl === MsgTimeoutOnClose.typeUrl || Packet.isAmino(o.packet) && (o.proof_unreceived instanceof Uint8Array || typeof o.proof_unreceived === 'string') && (o.proof_close instanceof Uint8Array || typeof o.proof_close === 'string') && Height.isAmino(o.proof_height) && typeof o.next_sequence_recv === 'bigint' && typeof o.signer === 'string' && typeof o.counterparty_upgrade_sequence === 'bigint'); }, encode(message: MsgTimeoutOnClose, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { @@ -2538,7 +2538,7 @@ export const MsgTimeoutOnClose = { if (message.nextSequenceRecv !== BigInt(0)) { writer.uint32(40).uint64(message.nextSequenceRecv); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(50).string(message.signer); } if (message.counterpartyUpgradeSequence !== BigInt(0)) { @@ -2553,30 +2553,30 @@ export const MsgTimeoutOnClose = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofClose = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.nextSequenceRecv = reader.uint64(); - break; - case 6: - message.signer = reader.string(); - break; - case 7: - message.counterpartyUpgradeSequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.packet = Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proofUnreceived = reader.bytes(); + break; + case 3: + message.proofClose = reader.bytes(); + break; + case 4: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 5: + message.nextSequenceRecv = reader.uint64(); + break; + case 6: + message.signer = reader.string(); + break; + case 7: + message.counterpartyUpgradeSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2588,7 +2588,7 @@ export const MsgTimeoutOnClose = { message.proofClose = object.proofClose ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.nextSequenceRecv = object.nextSequenceRecv !== undefined && object.nextSequenceRecv !== null ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; message.counterpartyUpgradeSequence = object.counterpartyUpgradeSequence !== undefined && object.counterpartyUpgradeSequence !== null ? BigInt(object.counterpartyUpgradeSequence.toString()) : BigInt(0); return message; }, @@ -2624,7 +2624,7 @@ export const MsgTimeoutOnClose = { obj.proof_close = message.proofClose ? base64FromBytes(message.proofClose) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.next_sequence_recv = message.nextSequenceRecv !== BigInt(0) ? message.nextSequenceRecv.toString() : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; obj.counterparty_upgrade_sequence = message.counterpartyUpgradeSequence !== BigInt(0) ? message.counterpartyUpgradeSequence.toString() : undefined; return obj; }, @@ -2633,7 +2633,7 @@ export const MsgTimeoutOnClose = { }, toAminoMsg(message: MsgTimeoutOnClose): MsgTimeoutOnCloseAminoMsg { return { - type: "cosmos-sdk/MsgTimeoutOnClose", + type: 'cosmos-sdk/MsgTimeoutOnClose', value: MsgTimeoutOnClose.toAmino(message) }; }, @@ -2645,7 +2645,7 @@ export const MsgTimeoutOnClose = { }, toProtoMsg(message: MsgTimeoutOnClose): MsgTimeoutOnCloseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", + typeUrl: '/ibc.core.channel.v1.MsgTimeoutOnClose', value: MsgTimeoutOnClose.encode(message).finish() }; } @@ -2658,8 +2658,8 @@ function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { }; } export const MsgTimeoutOnCloseResponse = { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", - aminoType: "cosmos-sdk/MsgTimeoutOnCloseResponse", + typeUrl: '/ibc.core.channel.v1.MsgTimeoutOnCloseResponse', + aminoType: 'cosmos-sdk/MsgTimeoutOnCloseResponse', is(o: any): o is MsgTimeoutOnCloseResponse { return o && (o.$typeUrl === MsgTimeoutOnCloseResponse.typeUrl || isSet(o.result)); }, @@ -2679,12 +2679,12 @@ export const MsgTimeoutOnCloseResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2711,7 +2711,7 @@ export const MsgTimeoutOnCloseResponse = { }, toAminoMsg(message: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseAminoMsg { return { - type: "cosmos-sdk/MsgTimeoutOnCloseResponse", + type: 'cosmos-sdk/MsgTimeoutOnCloseResponse', value: MsgTimeoutOnCloseResponse.toAmino(message) }; }, @@ -2723,7 +2723,7 @@ export const MsgTimeoutOnCloseResponse = { }, toProtoMsg(message: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", + typeUrl: '/ibc.core.channel.v1.MsgTimeoutOnCloseResponse', value: MsgTimeoutOnCloseResponse.encode(message).finish() }; } @@ -2736,17 +2736,17 @@ function createBaseMsgAcknowledgement(): MsgAcknowledgement { acknowledgement: new Uint8Array(), proofAcked: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgAcknowledgement = { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - aminoType: "cosmos-sdk/MsgAcknowledgement", + typeUrl: '/ibc.core.channel.v1.MsgAcknowledgement', + aminoType: 'cosmos-sdk/MsgAcknowledgement', is(o: any): o is MsgAcknowledgement { - return o && (o.$typeUrl === MsgAcknowledgement.typeUrl || Packet.is(o.packet) && (o.acknowledgement instanceof Uint8Array || typeof o.acknowledgement === "string") && (o.proofAcked instanceof Uint8Array || typeof o.proofAcked === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgAcknowledgement.typeUrl || Packet.is(o.packet) && (o.acknowledgement instanceof Uint8Array || typeof o.acknowledgement === 'string') && (o.proofAcked instanceof Uint8Array || typeof o.proofAcked === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgAcknowledgementAmino { - return o && (o.$typeUrl === MsgAcknowledgement.typeUrl || Packet.isAmino(o.packet) && (o.acknowledgement instanceof Uint8Array || typeof o.acknowledgement === "string") && (o.proof_acked instanceof Uint8Array || typeof o.proof_acked === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgAcknowledgement.typeUrl || Packet.isAmino(o.packet) && (o.acknowledgement instanceof Uint8Array || typeof o.acknowledgement === 'string') && (o.proof_acked instanceof Uint8Array || typeof o.proof_acked === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgAcknowledgement, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { @@ -2761,7 +2761,7 @@ export const MsgAcknowledgement = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(42).string(message.signer); } return writer; @@ -2773,24 +2773,24 @@ export const MsgAcknowledgement = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - case 3: - message.proofAcked = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.packet = Packet.decode(reader, reader.uint32()); + break; + case 2: + message.acknowledgement = reader.bytes(); + break; + case 3: + message.proofAcked = reader.bytes(); + break; + case 4: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2801,7 +2801,7 @@ export const MsgAcknowledgement = { message.acknowledgement = object.acknowledgement ?? new Uint8Array(); message.proofAcked = object.proofAcked ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgAcknowledgementAmino): MsgAcknowledgement { @@ -2829,7 +2829,7 @@ export const MsgAcknowledgement = { obj.acknowledgement = message.acknowledgement ? base64FromBytes(message.acknowledgement) : undefined; obj.proof_acked = message.proofAcked ? base64FromBytes(message.proofAcked) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgAcknowledgementAminoMsg): MsgAcknowledgement { @@ -2837,7 +2837,7 @@ export const MsgAcknowledgement = { }, toAminoMsg(message: MsgAcknowledgement): MsgAcknowledgementAminoMsg { return { - type: "cosmos-sdk/MsgAcknowledgement", + type: 'cosmos-sdk/MsgAcknowledgement', value: MsgAcknowledgement.toAmino(message) }; }, @@ -2849,7 +2849,7 @@ export const MsgAcknowledgement = { }, toProtoMsg(message: MsgAcknowledgement): MsgAcknowledgementProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", + typeUrl: '/ibc.core.channel.v1.MsgAcknowledgement', value: MsgAcknowledgement.encode(message).finish() }; } @@ -2862,8 +2862,8 @@ function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { }; } export const MsgAcknowledgementResponse = { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", - aminoType: "cosmos-sdk/MsgAcknowledgementResponse", + typeUrl: '/ibc.core.channel.v1.MsgAcknowledgementResponse', + aminoType: 'cosmos-sdk/MsgAcknowledgementResponse', is(o: any): o is MsgAcknowledgementResponse { return o && (o.$typeUrl === MsgAcknowledgementResponse.typeUrl || isSet(o.result)); }, @@ -2883,12 +2883,12 @@ export const MsgAcknowledgementResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2915,7 +2915,7 @@ export const MsgAcknowledgementResponse = { }, toAminoMsg(message: MsgAcknowledgementResponse): MsgAcknowledgementResponseAminoMsg { return { - type: "cosmos-sdk/MsgAcknowledgementResponse", + type: 'cosmos-sdk/MsgAcknowledgementResponse', value: MsgAcknowledgementResponse.toAmino(message) }; }, @@ -2927,7 +2927,7 @@ export const MsgAcknowledgementResponse = { }, toProtoMsg(message: MsgAcknowledgementResponse): MsgAcknowledgementResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", + typeUrl: '/ibc.core.channel.v1.MsgAcknowledgementResponse', value: MsgAcknowledgementResponse.encode(message).finish() }; } @@ -2936,32 +2936,32 @@ GlobalDecoderRegistry.register(MsgAcknowledgementResponse.typeUrl, MsgAcknowledg GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgementResponse.aminoType, MsgAcknowledgementResponse.typeUrl); function createBaseMsgChannelUpgradeInit(): MsgChannelUpgradeInit { return { - portId: "", - channelId: "", + portId: '', + channelId: '', fields: UpgradeFields.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelUpgradeInit = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInit", - aminoType: "cosmos-sdk/MsgChannelUpgradeInit", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeInit', + aminoType: 'cosmos-sdk/MsgChannelUpgradeInit', is(o: any): o is MsgChannelUpgradeInit { - return o && (o.$typeUrl === MsgChannelUpgradeInit.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && UpgradeFields.is(o.fields) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeInit.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && UpgradeFields.is(o.fields) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelUpgradeInitAmino { - return o && (o.$typeUrl === MsgChannelUpgradeInit.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && UpgradeFields.isAmino(o.fields) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeInit.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && UpgradeFields.isAmino(o.fields) && typeof o.signer === 'string'); }, encode(message: MsgChannelUpgradeInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.fields !== undefined) { UpgradeFields.encode(message.fields, writer.uint32(26).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(34).string(message.signer); } return writer; @@ -2973,31 +2973,31 @@ export const MsgChannelUpgradeInit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.fields = UpgradeFields.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.fields = UpgradeFields.decode(reader, reader.uint32()); + break; + case 4: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelUpgradeInit { const message = createBaseMsgChannelUpgradeInit(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.fields = object.fields !== undefined && object.fields !== null ? UpgradeFields.fromPartial(object.fields) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelUpgradeInitAmino): MsgChannelUpgradeInit { @@ -3018,10 +3018,10 @@ export const MsgChannelUpgradeInit = { }, toAmino(message: MsgChannelUpgradeInit): MsgChannelUpgradeInitAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.fields = message.fields ? UpgradeFields.toAmino(message.fields) : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelUpgradeInitAminoMsg): MsgChannelUpgradeInit { @@ -3029,7 +3029,7 @@ export const MsgChannelUpgradeInit = { }, toAminoMsg(message: MsgChannelUpgradeInit): MsgChannelUpgradeInitAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeInit", + type: 'cosmos-sdk/MsgChannelUpgradeInit', value: MsgChannelUpgradeInit.toAmino(message) }; }, @@ -3041,7 +3041,7 @@ export const MsgChannelUpgradeInit = { }, toProtoMsg(message: MsgChannelUpgradeInit): MsgChannelUpgradeInitProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInit", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeInit', value: MsgChannelUpgradeInit.encode(message).finish() }; } @@ -3055,13 +3055,13 @@ function createBaseMsgChannelUpgradeInitResponse(): MsgChannelUpgradeInitRespons }; } export const MsgChannelUpgradeInitResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse", - aminoType: "cosmos-sdk/MsgChannelUpgradeInitResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeInitResponse', + aminoType: 'cosmos-sdk/MsgChannelUpgradeInitResponse', is(o: any): o is MsgChannelUpgradeInitResponse { - return o && (o.$typeUrl === MsgChannelUpgradeInitResponse.typeUrl || Upgrade.is(o.upgrade) && typeof o.upgradeSequence === "bigint"); + return o && (o.$typeUrl === MsgChannelUpgradeInitResponse.typeUrl || Upgrade.is(o.upgrade) && typeof o.upgradeSequence === 'bigint'); }, isAmino(o: any): o is MsgChannelUpgradeInitResponseAmino { - return o && (o.$typeUrl === MsgChannelUpgradeInitResponse.typeUrl || Upgrade.isAmino(o.upgrade) && typeof o.upgrade_sequence === "bigint"); + return o && (o.$typeUrl === MsgChannelUpgradeInitResponse.typeUrl || Upgrade.isAmino(o.upgrade) && typeof o.upgrade_sequence === 'bigint'); }, encode(message: MsgChannelUpgradeInitResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.upgrade !== undefined) { @@ -3079,15 +3079,15 @@ export const MsgChannelUpgradeInitResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.upgrade = Upgrade.decode(reader, reader.uint32()); - break; - case 2: - message.upgradeSequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.upgrade = Upgrade.decode(reader, reader.uint32()); + break; + case 2: + message.upgradeSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3119,7 +3119,7 @@ export const MsgChannelUpgradeInitResponse = { }, toAminoMsg(message: MsgChannelUpgradeInitResponse): MsgChannelUpgradeInitResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeInitResponse", + type: 'cosmos-sdk/MsgChannelUpgradeInitResponse', value: MsgChannelUpgradeInitResponse.toAmino(message) }; }, @@ -3131,7 +3131,7 @@ export const MsgChannelUpgradeInitResponse = { }, toProtoMsg(message: MsgChannelUpgradeInitResponse): MsgChannelUpgradeInitResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeInitResponse', value: MsgChannelUpgradeInitResponse.encode(message).finish() }; } @@ -3140,31 +3140,31 @@ GlobalDecoderRegistry.register(MsgChannelUpgradeInitResponse.typeUrl, MsgChannel GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInitResponse.aminoType, MsgChannelUpgradeInitResponse.typeUrl); function createBaseMsgChannelUpgradeTry(): MsgChannelUpgradeTry { return { - portId: "", - channelId: "", + portId: '', + channelId: '', proposedUpgradeConnectionHops: [], counterpartyUpgradeFields: UpgradeFields.fromPartial({}), counterpartyUpgradeSequence: BigInt(0), proofChannel: new Uint8Array(), proofUpgrade: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelUpgradeTry = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTry", - aminoType: "cosmos-sdk/MsgChannelUpgradeTry", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTry', + aminoType: 'cosmos-sdk/MsgChannelUpgradeTry', is(o: any): o is MsgChannelUpgradeTry { - return o && (o.$typeUrl === MsgChannelUpgradeTry.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && Array.isArray(o.proposedUpgradeConnectionHops) && (!o.proposedUpgradeConnectionHops.length || typeof o.proposedUpgradeConnectionHops[0] === "string") && UpgradeFields.is(o.counterpartyUpgradeFields) && typeof o.counterpartyUpgradeSequence === "bigint" && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === "string") && (o.proofUpgrade instanceof Uint8Array || typeof o.proofUpgrade === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeTry.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && Array.isArray(o.proposedUpgradeConnectionHops) && (!o.proposedUpgradeConnectionHops.length || typeof o.proposedUpgradeConnectionHops[0] === 'string') && UpgradeFields.is(o.counterpartyUpgradeFields) && typeof o.counterpartyUpgradeSequence === 'bigint' && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === 'string') && (o.proofUpgrade instanceof Uint8Array || typeof o.proofUpgrade === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelUpgradeTryAmino { - return o && (o.$typeUrl === MsgChannelUpgradeTry.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && Array.isArray(o.proposed_upgrade_connection_hops) && (!o.proposed_upgrade_connection_hops.length || typeof o.proposed_upgrade_connection_hops[0] === "string") && UpgradeFields.isAmino(o.counterparty_upgrade_fields) && typeof o.counterparty_upgrade_sequence === "bigint" && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === "string") && (o.proof_upgrade instanceof Uint8Array || typeof o.proof_upgrade === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeTry.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && Array.isArray(o.proposed_upgrade_connection_hops) && (!o.proposed_upgrade_connection_hops.length || typeof o.proposed_upgrade_connection_hops[0] === 'string') && UpgradeFields.isAmino(o.counterparty_upgrade_fields) && typeof o.counterparty_upgrade_sequence === 'bigint' && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === 'string') && (o.proof_upgrade instanceof Uint8Array || typeof o.proof_upgrade === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelUpgradeTry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } for (const v of message.proposedUpgradeConnectionHops) { @@ -3185,7 +3185,7 @@ export const MsgChannelUpgradeTry = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(66).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(74).string(message.signer); } return writer; @@ -3197,51 +3197,51 @@ export const MsgChannelUpgradeTry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proposedUpgradeConnectionHops.push(reader.string()); - break; - case 4: - message.counterpartyUpgradeFields = UpgradeFields.decode(reader, reader.uint32()); - break; - case 5: - message.counterpartyUpgradeSequence = reader.uint64(); - break; - case 6: - message.proofChannel = reader.bytes(); - break; - case 7: - message.proofUpgrade = reader.bytes(); - break; - case 8: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 9: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.proposedUpgradeConnectionHops.push(reader.string()); + break; + case 4: + message.counterpartyUpgradeFields = UpgradeFields.decode(reader, reader.uint32()); + break; + case 5: + message.counterpartyUpgradeSequence = reader.uint64(); + break; + case 6: + message.proofChannel = reader.bytes(); + break; + case 7: + message.proofUpgrade = reader.bytes(); + break; + case 8: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 9: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelUpgradeTry { const message = createBaseMsgChannelUpgradeTry(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.proposedUpgradeConnectionHops = object.proposedUpgradeConnectionHops?.map(e => e) || []; message.counterpartyUpgradeFields = object.counterpartyUpgradeFields !== undefined && object.counterpartyUpgradeFields !== null ? UpgradeFields.fromPartial(object.counterpartyUpgradeFields) : undefined; message.counterpartyUpgradeSequence = object.counterpartyUpgradeSequence !== undefined && object.counterpartyUpgradeSequence !== null ? BigInt(object.counterpartyUpgradeSequence.toString()) : BigInt(0); message.proofChannel = object.proofChannel ?? new Uint8Array(); message.proofUpgrade = object.proofUpgrade ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelUpgradeTryAmino): MsgChannelUpgradeTry { @@ -3275,8 +3275,8 @@ export const MsgChannelUpgradeTry = { }, toAmino(message: MsgChannelUpgradeTry): MsgChannelUpgradeTryAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; if (message.proposedUpgradeConnectionHops) { obj.proposed_upgrade_connection_hops = message.proposedUpgradeConnectionHops.map(e => e); } else { @@ -3287,7 +3287,7 @@ export const MsgChannelUpgradeTry = { obj.proof_channel = message.proofChannel ? base64FromBytes(message.proofChannel) : undefined; obj.proof_upgrade = message.proofUpgrade ? base64FromBytes(message.proofUpgrade) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelUpgradeTryAminoMsg): MsgChannelUpgradeTry { @@ -3295,7 +3295,7 @@ export const MsgChannelUpgradeTry = { }, toAminoMsg(message: MsgChannelUpgradeTry): MsgChannelUpgradeTryAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeTry", + type: 'cosmos-sdk/MsgChannelUpgradeTry', value: MsgChannelUpgradeTry.toAmino(message) }; }, @@ -3307,7 +3307,7 @@ export const MsgChannelUpgradeTry = { }, toProtoMsg(message: MsgChannelUpgradeTry): MsgChannelUpgradeTryProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTry", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTry', value: MsgChannelUpgradeTry.encode(message).finish() }; } @@ -3322,13 +3322,13 @@ function createBaseMsgChannelUpgradeTryResponse(): MsgChannelUpgradeTryResponse }; } export const MsgChannelUpgradeTryResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse", - aminoType: "cosmos-sdk/MsgChannelUpgradeTryResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTryResponse', + aminoType: 'cosmos-sdk/MsgChannelUpgradeTryResponse', is(o: any): o is MsgChannelUpgradeTryResponse { - return o && (o.$typeUrl === MsgChannelUpgradeTryResponse.typeUrl || Upgrade.is(o.upgrade) && typeof o.upgradeSequence === "bigint" && isSet(o.result)); + return o && (o.$typeUrl === MsgChannelUpgradeTryResponse.typeUrl || Upgrade.is(o.upgrade) && typeof o.upgradeSequence === 'bigint' && isSet(o.result)); }, isAmino(o: any): o is MsgChannelUpgradeTryResponseAmino { - return o && (o.$typeUrl === MsgChannelUpgradeTryResponse.typeUrl || Upgrade.isAmino(o.upgrade) && typeof o.upgrade_sequence === "bigint" && isSet(o.result)); + return o && (o.$typeUrl === MsgChannelUpgradeTryResponse.typeUrl || Upgrade.isAmino(o.upgrade) && typeof o.upgrade_sequence === 'bigint' && isSet(o.result)); }, encode(message: MsgChannelUpgradeTryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.upgrade !== undefined) { @@ -3349,18 +3349,18 @@ export const MsgChannelUpgradeTryResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.upgrade = Upgrade.decode(reader, reader.uint32()); - break; - case 2: - message.upgradeSequence = reader.uint64(); - break; - case 3: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.upgrade = Upgrade.decode(reader, reader.uint32()); + break; + case 2: + message.upgradeSequence = reader.uint64(); + break; + case 3: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3397,7 +3397,7 @@ export const MsgChannelUpgradeTryResponse = { }, toAminoMsg(message: MsgChannelUpgradeTryResponse): MsgChannelUpgradeTryResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeTryResponse", + type: 'cosmos-sdk/MsgChannelUpgradeTryResponse', value: MsgChannelUpgradeTryResponse.toAmino(message) }; }, @@ -3409,7 +3409,7 @@ export const MsgChannelUpgradeTryResponse = { }, toProtoMsg(message: MsgChannelUpgradeTryResponse): MsgChannelUpgradeTryResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTryResponse', value: MsgChannelUpgradeTryResponse.encode(message).finish() }; } @@ -3418,29 +3418,29 @@ GlobalDecoderRegistry.register(MsgChannelUpgradeTryResponse.typeUrl, MsgChannelU GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTryResponse.aminoType, MsgChannelUpgradeTryResponse.typeUrl); function createBaseMsgChannelUpgradeAck(): MsgChannelUpgradeAck { return { - portId: "", - channelId: "", + portId: '', + channelId: '', counterpartyUpgrade: Upgrade.fromPartial({}), proofChannel: new Uint8Array(), proofUpgrade: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelUpgradeAck = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAck", - aminoType: "cosmos-sdk/MsgChannelUpgradeAck", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeAck', + aminoType: 'cosmos-sdk/MsgChannelUpgradeAck', is(o: any): o is MsgChannelUpgradeAck { - return o && (o.$typeUrl === MsgChannelUpgradeAck.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && Upgrade.is(o.counterpartyUpgrade) && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === "string") && (o.proofUpgrade instanceof Uint8Array || typeof o.proofUpgrade === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeAck.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && Upgrade.is(o.counterpartyUpgrade) && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === 'string') && (o.proofUpgrade instanceof Uint8Array || typeof o.proofUpgrade === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelUpgradeAckAmino { - return o && (o.$typeUrl === MsgChannelUpgradeAck.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && Upgrade.isAmino(o.counterparty_upgrade) && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === "string") && (o.proof_upgrade instanceof Uint8Array || typeof o.proof_upgrade === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeAck.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && Upgrade.isAmino(o.counterparty_upgrade) && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === 'string') && (o.proof_upgrade instanceof Uint8Array || typeof o.proof_upgrade === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelUpgradeAck, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.counterpartyUpgrade !== undefined) { @@ -3455,7 +3455,7 @@ export const MsgChannelUpgradeAck = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(58).string(message.signer); } return writer; @@ -3467,43 +3467,43 @@ export const MsgChannelUpgradeAck = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyUpgrade = Upgrade.decode(reader, reader.uint32()); - break; - case 4: - message.proofChannel = reader.bytes(); - break; - case 5: - message.proofUpgrade = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.counterpartyUpgrade = Upgrade.decode(reader, reader.uint32()); + break; + case 4: + message.proofChannel = reader.bytes(); + break; + case 5: + message.proofUpgrade = reader.bytes(); + break; + case 6: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 7: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelUpgradeAck { const message = createBaseMsgChannelUpgradeAck(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.counterpartyUpgrade = object.counterpartyUpgrade !== undefined && object.counterpartyUpgrade !== null ? Upgrade.fromPartial(object.counterpartyUpgrade) : undefined; message.proofChannel = object.proofChannel ?? new Uint8Array(); message.proofUpgrade = object.proofUpgrade ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelUpgradeAckAmino): MsgChannelUpgradeAck { @@ -3533,13 +3533,13 @@ export const MsgChannelUpgradeAck = { }, toAmino(message: MsgChannelUpgradeAck): MsgChannelUpgradeAckAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.counterparty_upgrade = message.counterpartyUpgrade ? Upgrade.toAmino(message.counterpartyUpgrade) : undefined; obj.proof_channel = message.proofChannel ? base64FromBytes(message.proofChannel) : undefined; obj.proof_upgrade = message.proofUpgrade ? base64FromBytes(message.proofUpgrade) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelUpgradeAckAminoMsg): MsgChannelUpgradeAck { @@ -3547,7 +3547,7 @@ export const MsgChannelUpgradeAck = { }, toAminoMsg(message: MsgChannelUpgradeAck): MsgChannelUpgradeAckAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeAck", + type: 'cosmos-sdk/MsgChannelUpgradeAck', value: MsgChannelUpgradeAck.toAmino(message) }; }, @@ -3559,7 +3559,7 @@ export const MsgChannelUpgradeAck = { }, toProtoMsg(message: MsgChannelUpgradeAck): MsgChannelUpgradeAckProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAck", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeAck', value: MsgChannelUpgradeAck.encode(message).finish() }; } @@ -3572,8 +3572,8 @@ function createBaseMsgChannelUpgradeAckResponse(): MsgChannelUpgradeAckResponse }; } export const MsgChannelUpgradeAckResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse", - aminoType: "cosmos-sdk/MsgChannelUpgradeAckResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeAckResponse', + aminoType: 'cosmos-sdk/MsgChannelUpgradeAckResponse', is(o: any): o is MsgChannelUpgradeAckResponse { return o && (o.$typeUrl === MsgChannelUpgradeAckResponse.typeUrl || isSet(o.result)); }, @@ -3593,12 +3593,12 @@ export const MsgChannelUpgradeAckResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3625,7 +3625,7 @@ export const MsgChannelUpgradeAckResponse = { }, toAminoMsg(message: MsgChannelUpgradeAckResponse): MsgChannelUpgradeAckResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeAckResponse", + type: 'cosmos-sdk/MsgChannelUpgradeAckResponse', value: MsgChannelUpgradeAckResponse.toAmino(message) }; }, @@ -3637,7 +3637,7 @@ export const MsgChannelUpgradeAckResponse = { }, toProtoMsg(message: MsgChannelUpgradeAckResponse): MsgChannelUpgradeAckResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeAckResponse', value: MsgChannelUpgradeAckResponse.encode(message).finish() }; } @@ -3646,30 +3646,30 @@ GlobalDecoderRegistry.register(MsgChannelUpgradeAckResponse.typeUrl, MsgChannelU GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAckResponse.aminoType, MsgChannelUpgradeAckResponse.typeUrl); function createBaseMsgChannelUpgradeConfirm(): MsgChannelUpgradeConfirm { return { - portId: "", - channelId: "", + portId: '', + channelId: '', counterpartyChannelState: 0, counterpartyUpgrade: Upgrade.fromPartial({}), proofChannel: new Uint8Array(), proofUpgrade: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelUpgradeConfirm = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirm", - aminoType: "cosmos-sdk/MsgChannelUpgradeConfirm", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeConfirm', + aminoType: 'cosmos-sdk/MsgChannelUpgradeConfirm', is(o: any): o is MsgChannelUpgradeConfirm { - return o && (o.$typeUrl === MsgChannelUpgradeConfirm.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && isSet(o.counterpartyChannelState) && Upgrade.is(o.counterpartyUpgrade) && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === "string") && (o.proofUpgrade instanceof Uint8Array || typeof o.proofUpgrade === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeConfirm.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && isSet(o.counterpartyChannelState) && Upgrade.is(o.counterpartyUpgrade) && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === 'string') && (o.proofUpgrade instanceof Uint8Array || typeof o.proofUpgrade === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelUpgradeConfirmAmino { - return o && (o.$typeUrl === MsgChannelUpgradeConfirm.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && isSet(o.counterparty_channel_state) && Upgrade.isAmino(o.counterparty_upgrade) && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === "string") && (o.proof_upgrade instanceof Uint8Array || typeof o.proof_upgrade === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeConfirm.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && isSet(o.counterparty_channel_state) && Upgrade.isAmino(o.counterparty_upgrade) && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === 'string') && (o.proof_upgrade instanceof Uint8Array || typeof o.proof_upgrade === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelUpgradeConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.counterpartyChannelState !== 0) { @@ -3687,7 +3687,7 @@ export const MsgChannelUpgradeConfirm = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(58).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(66).string(message.signer); } return writer; @@ -3699,47 +3699,47 @@ export const MsgChannelUpgradeConfirm = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyChannelState = (reader.int32() as any); - break; - case 4: - message.counterpartyUpgrade = Upgrade.decode(reader, reader.uint32()); - break; - case 5: - message.proofChannel = reader.bytes(); - break; - case 6: - message.proofUpgrade = reader.bytes(); - break; - case 7: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.counterpartyChannelState = (reader.int32() as any); + break; + case 4: + message.counterpartyUpgrade = Upgrade.decode(reader, reader.uint32()); + break; + case 5: + message.proofChannel = reader.bytes(); + break; + case 6: + message.proofUpgrade = reader.bytes(); + break; + case 7: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 8: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelUpgradeConfirm { const message = createBaseMsgChannelUpgradeConfirm(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.counterpartyChannelState = object.counterpartyChannelState ?? 0; message.counterpartyUpgrade = object.counterpartyUpgrade !== undefined && object.counterpartyUpgrade !== null ? Upgrade.fromPartial(object.counterpartyUpgrade) : undefined; message.proofChannel = object.proofChannel ?? new Uint8Array(); message.proofUpgrade = object.proofUpgrade ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelUpgradeConfirmAmino): MsgChannelUpgradeConfirm { @@ -3772,14 +3772,14 @@ export const MsgChannelUpgradeConfirm = { }, toAmino(message: MsgChannelUpgradeConfirm): MsgChannelUpgradeConfirmAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.counterparty_channel_state = message.counterpartyChannelState === 0 ? undefined : message.counterpartyChannelState; obj.counterparty_upgrade = message.counterpartyUpgrade ? Upgrade.toAmino(message.counterpartyUpgrade) : undefined; obj.proof_channel = message.proofChannel ? base64FromBytes(message.proofChannel) : undefined; obj.proof_upgrade = message.proofUpgrade ? base64FromBytes(message.proofUpgrade) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelUpgradeConfirmAminoMsg): MsgChannelUpgradeConfirm { @@ -3787,7 +3787,7 @@ export const MsgChannelUpgradeConfirm = { }, toAminoMsg(message: MsgChannelUpgradeConfirm): MsgChannelUpgradeConfirmAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeConfirm", + type: 'cosmos-sdk/MsgChannelUpgradeConfirm', value: MsgChannelUpgradeConfirm.toAmino(message) }; }, @@ -3799,7 +3799,7 @@ export const MsgChannelUpgradeConfirm = { }, toProtoMsg(message: MsgChannelUpgradeConfirm): MsgChannelUpgradeConfirmProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirm", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeConfirm', value: MsgChannelUpgradeConfirm.encode(message).finish() }; } @@ -3812,8 +3812,8 @@ function createBaseMsgChannelUpgradeConfirmResponse(): MsgChannelUpgradeConfirmR }; } export const MsgChannelUpgradeConfirmResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", - aminoType: "cosmos-sdk/MsgChannelUpgradeConfirmResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse', + aminoType: 'cosmos-sdk/MsgChannelUpgradeConfirmResponse', is(o: any): o is MsgChannelUpgradeConfirmResponse { return o && (o.$typeUrl === MsgChannelUpgradeConfirmResponse.typeUrl || isSet(o.result)); }, @@ -3833,12 +3833,12 @@ export const MsgChannelUpgradeConfirmResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3865,7 +3865,7 @@ export const MsgChannelUpgradeConfirmResponse = { }, toAminoMsg(message: MsgChannelUpgradeConfirmResponse): MsgChannelUpgradeConfirmResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeConfirmResponse", + type: 'cosmos-sdk/MsgChannelUpgradeConfirmResponse', value: MsgChannelUpgradeConfirmResponse.toAmino(message) }; }, @@ -3877,7 +3877,7 @@ export const MsgChannelUpgradeConfirmResponse = { }, toProtoMsg(message: MsgChannelUpgradeConfirmResponse): MsgChannelUpgradeConfirmResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse', value: MsgChannelUpgradeConfirmResponse.encode(message).finish() }; } @@ -3886,29 +3886,29 @@ GlobalDecoderRegistry.register(MsgChannelUpgradeConfirmResponse.typeUrl, MsgChan GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirmResponse.aminoType, MsgChannelUpgradeConfirmResponse.typeUrl); function createBaseMsgChannelUpgradeOpen(): MsgChannelUpgradeOpen { return { - portId: "", - channelId: "", + portId: '', + channelId: '', counterpartyChannelState: 0, counterpartyUpgradeSequence: BigInt(0), proofChannel: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelUpgradeOpen = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpen", - aminoType: "cosmos-sdk/MsgChannelUpgradeOpen", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeOpen', + aminoType: 'cosmos-sdk/MsgChannelUpgradeOpen', is(o: any): o is MsgChannelUpgradeOpen { - return o && (o.$typeUrl === MsgChannelUpgradeOpen.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && isSet(o.counterpartyChannelState) && typeof o.counterpartyUpgradeSequence === "bigint" && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeOpen.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && isSet(o.counterpartyChannelState) && typeof o.counterpartyUpgradeSequence === 'bigint' && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelUpgradeOpenAmino { - return o && (o.$typeUrl === MsgChannelUpgradeOpen.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && isSet(o.counterparty_channel_state) && typeof o.counterparty_upgrade_sequence === "bigint" && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeOpen.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && isSet(o.counterparty_channel_state) && typeof o.counterparty_upgrade_sequence === 'bigint' && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelUpgradeOpen, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.counterpartyChannelState !== 0) { @@ -3923,7 +3923,7 @@ export const MsgChannelUpgradeOpen = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(58).string(message.signer); } return writer; @@ -3935,43 +3935,43 @@ export const MsgChannelUpgradeOpen = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyChannelState = (reader.int32() as any); - break; - case 4: - message.counterpartyUpgradeSequence = reader.uint64(); - break; - case 5: - message.proofChannel = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.counterpartyChannelState = (reader.int32() as any); + break; + case 4: + message.counterpartyUpgradeSequence = reader.uint64(); + break; + case 5: + message.proofChannel = reader.bytes(); + break; + case 6: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 7: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelUpgradeOpen { const message = createBaseMsgChannelUpgradeOpen(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.counterpartyChannelState = object.counterpartyChannelState ?? 0; message.counterpartyUpgradeSequence = object.counterpartyUpgradeSequence !== undefined && object.counterpartyUpgradeSequence !== null ? BigInt(object.counterpartyUpgradeSequence.toString()) : BigInt(0); message.proofChannel = object.proofChannel ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelUpgradeOpenAmino): MsgChannelUpgradeOpen { @@ -4001,13 +4001,13 @@ export const MsgChannelUpgradeOpen = { }, toAmino(message: MsgChannelUpgradeOpen): MsgChannelUpgradeOpenAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.counterparty_channel_state = message.counterpartyChannelState === 0 ? undefined : message.counterpartyChannelState; obj.counterparty_upgrade_sequence = message.counterpartyUpgradeSequence !== BigInt(0) ? message.counterpartyUpgradeSequence.toString() : undefined; obj.proof_channel = message.proofChannel ? base64FromBytes(message.proofChannel) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelUpgradeOpenAminoMsg): MsgChannelUpgradeOpen { @@ -4015,7 +4015,7 @@ export const MsgChannelUpgradeOpen = { }, toAminoMsg(message: MsgChannelUpgradeOpen): MsgChannelUpgradeOpenAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeOpen", + type: 'cosmos-sdk/MsgChannelUpgradeOpen', value: MsgChannelUpgradeOpen.toAmino(message) }; }, @@ -4027,7 +4027,7 @@ export const MsgChannelUpgradeOpen = { }, toProtoMsg(message: MsgChannelUpgradeOpen): MsgChannelUpgradeOpenProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpen", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeOpen', value: MsgChannelUpgradeOpen.encode(message).finish() }; } @@ -4038,8 +4038,8 @@ function createBaseMsgChannelUpgradeOpenResponse(): MsgChannelUpgradeOpenRespons return {}; } export const MsgChannelUpgradeOpenResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", - aminoType: "cosmos-sdk/MsgChannelUpgradeOpenResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse', + aminoType: 'cosmos-sdk/MsgChannelUpgradeOpenResponse', is(o: any): o is MsgChannelUpgradeOpenResponse { return o && o.$typeUrl === MsgChannelUpgradeOpenResponse.typeUrl; }, @@ -4056,9 +4056,9 @@ export const MsgChannelUpgradeOpenResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4080,7 +4080,7 @@ export const MsgChannelUpgradeOpenResponse = { }, toAminoMsg(message: MsgChannelUpgradeOpenResponse): MsgChannelUpgradeOpenResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeOpenResponse", + type: 'cosmos-sdk/MsgChannelUpgradeOpenResponse', value: MsgChannelUpgradeOpenResponse.toAmino(message) }; }, @@ -4092,7 +4092,7 @@ export const MsgChannelUpgradeOpenResponse = { }, toProtoMsg(message: MsgChannelUpgradeOpenResponse): MsgChannelUpgradeOpenResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse', value: MsgChannelUpgradeOpenResponse.encode(message).finish() }; } @@ -4101,28 +4101,28 @@ GlobalDecoderRegistry.register(MsgChannelUpgradeOpenResponse.typeUrl, MsgChannel GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpenResponse.aminoType, MsgChannelUpgradeOpenResponse.typeUrl); function createBaseMsgChannelUpgradeTimeout(): MsgChannelUpgradeTimeout { return { - portId: "", - channelId: "", + portId: '', + channelId: '', counterpartyChannel: Channel.fromPartial({}), proofChannel: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelUpgradeTimeout = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeout", - aminoType: "cosmos-sdk/MsgChannelUpgradeTimeout", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTimeout', + aminoType: 'cosmos-sdk/MsgChannelUpgradeTimeout', is(o: any): o is MsgChannelUpgradeTimeout { - return o && (o.$typeUrl === MsgChannelUpgradeTimeout.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && Channel.is(o.counterpartyChannel) && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeTimeout.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && Channel.is(o.counterpartyChannel) && (o.proofChannel instanceof Uint8Array || typeof o.proofChannel === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelUpgradeTimeoutAmino { - return o && (o.$typeUrl === MsgChannelUpgradeTimeout.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && Channel.isAmino(o.counterparty_channel) && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeTimeout.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && Channel.isAmino(o.counterparty_channel) && (o.proof_channel instanceof Uint8Array || typeof o.proof_channel === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelUpgradeTimeout, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.counterpartyChannel !== undefined) { @@ -4134,7 +4134,7 @@ export const MsgChannelUpgradeTimeout = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(42).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(50).string(message.signer); } return writer; @@ -4146,39 +4146,39 @@ export const MsgChannelUpgradeTimeout = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyChannel = Channel.decode(reader, reader.uint32()); - break; - case 4: - message.proofChannel = reader.bytes(); - break; - case 5: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.counterpartyChannel = Channel.decode(reader, reader.uint32()); + break; + case 4: + message.proofChannel = reader.bytes(); + break; + case 5: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 6: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelUpgradeTimeout { const message = createBaseMsgChannelUpgradeTimeout(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.counterpartyChannel = object.counterpartyChannel !== undefined && object.counterpartyChannel !== null ? Channel.fromPartial(object.counterpartyChannel) : undefined; message.proofChannel = object.proofChannel ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelUpgradeTimeoutAmino): MsgChannelUpgradeTimeout { @@ -4205,12 +4205,12 @@ export const MsgChannelUpgradeTimeout = { }, toAmino(message: MsgChannelUpgradeTimeout): MsgChannelUpgradeTimeoutAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.counterparty_channel = message.counterpartyChannel ? Channel.toAmino(message.counterpartyChannel) : undefined; obj.proof_channel = message.proofChannel ? base64FromBytes(message.proofChannel) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelUpgradeTimeoutAminoMsg): MsgChannelUpgradeTimeout { @@ -4218,7 +4218,7 @@ export const MsgChannelUpgradeTimeout = { }, toAminoMsg(message: MsgChannelUpgradeTimeout): MsgChannelUpgradeTimeoutAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeTimeout", + type: 'cosmos-sdk/MsgChannelUpgradeTimeout', value: MsgChannelUpgradeTimeout.toAmino(message) }; }, @@ -4230,7 +4230,7 @@ export const MsgChannelUpgradeTimeout = { }, toProtoMsg(message: MsgChannelUpgradeTimeout): MsgChannelUpgradeTimeoutProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeout", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTimeout', value: MsgChannelUpgradeTimeout.encode(message).finish() }; } @@ -4241,8 +4241,8 @@ function createBaseMsgChannelUpgradeTimeoutResponse(): MsgChannelUpgradeTimeoutR return {}; } export const MsgChannelUpgradeTimeoutResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", - aminoType: "cosmos-sdk/MsgChannelUpgradeTimeoutResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse', + aminoType: 'cosmos-sdk/MsgChannelUpgradeTimeoutResponse', is(o: any): o is MsgChannelUpgradeTimeoutResponse { return o && o.$typeUrl === MsgChannelUpgradeTimeoutResponse.typeUrl; }, @@ -4259,9 +4259,9 @@ export const MsgChannelUpgradeTimeoutResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4283,7 +4283,7 @@ export const MsgChannelUpgradeTimeoutResponse = { }, toAminoMsg(message: MsgChannelUpgradeTimeoutResponse): MsgChannelUpgradeTimeoutResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeTimeoutResponse", + type: 'cosmos-sdk/MsgChannelUpgradeTimeoutResponse', value: MsgChannelUpgradeTimeoutResponse.toAmino(message) }; }, @@ -4295,7 +4295,7 @@ export const MsgChannelUpgradeTimeoutResponse = { }, toProtoMsg(message: MsgChannelUpgradeTimeoutResponse): MsgChannelUpgradeTimeoutResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse', value: MsgChannelUpgradeTimeoutResponse.encode(message).finish() }; } @@ -4304,28 +4304,28 @@ GlobalDecoderRegistry.register(MsgChannelUpgradeTimeoutResponse.typeUrl, MsgChan GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeoutResponse.aminoType, MsgChannelUpgradeTimeoutResponse.typeUrl); function createBaseMsgChannelUpgradeCancel(): MsgChannelUpgradeCancel { return { - portId: "", - channelId: "", + portId: '', + channelId: '', errorReceipt: ErrorReceipt.fromPartial({}), proofErrorReceipt: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgChannelUpgradeCancel = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancel", - aminoType: "cosmos-sdk/MsgChannelUpgradeCancel", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeCancel', + aminoType: 'cosmos-sdk/MsgChannelUpgradeCancel', is(o: any): o is MsgChannelUpgradeCancel { - return o && (o.$typeUrl === MsgChannelUpgradeCancel.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && ErrorReceipt.is(o.errorReceipt) && (o.proofErrorReceipt instanceof Uint8Array || typeof o.proofErrorReceipt === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeCancel.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && ErrorReceipt.is(o.errorReceipt) && (o.proofErrorReceipt instanceof Uint8Array || typeof o.proofErrorReceipt === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgChannelUpgradeCancelAmino { - return o && (o.$typeUrl === MsgChannelUpgradeCancel.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && ErrorReceipt.isAmino(o.error_receipt) && (o.proof_error_receipt instanceof Uint8Array || typeof o.proof_error_receipt === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgChannelUpgradeCancel.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && ErrorReceipt.isAmino(o.error_receipt) && (o.proof_error_receipt instanceof Uint8Array || typeof o.proof_error_receipt === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgChannelUpgradeCancel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.errorReceipt !== undefined) { @@ -4337,7 +4337,7 @@ export const MsgChannelUpgradeCancel = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(42).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(50).string(message.signer); } return writer; @@ -4349,39 +4349,39 @@ export const MsgChannelUpgradeCancel = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.errorReceipt = ErrorReceipt.decode(reader, reader.uint32()); - break; - case 4: - message.proofErrorReceipt = reader.bytes(); - break; - case 5: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.errorReceipt = ErrorReceipt.decode(reader, reader.uint32()); + break; + case 4: + message.proofErrorReceipt = reader.bytes(); + break; + case 5: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 6: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgChannelUpgradeCancel { const message = createBaseMsgChannelUpgradeCancel(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.errorReceipt = object.errorReceipt !== undefined && object.errorReceipt !== null ? ErrorReceipt.fromPartial(object.errorReceipt) : undefined; message.proofErrorReceipt = object.proofErrorReceipt ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgChannelUpgradeCancelAmino): MsgChannelUpgradeCancel { @@ -4408,12 +4408,12 @@ export const MsgChannelUpgradeCancel = { }, toAmino(message: MsgChannelUpgradeCancel): MsgChannelUpgradeCancelAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.error_receipt = message.errorReceipt ? ErrorReceipt.toAmino(message.errorReceipt) : undefined; obj.proof_error_receipt = message.proofErrorReceipt ? base64FromBytes(message.proofErrorReceipt) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgChannelUpgradeCancelAminoMsg): MsgChannelUpgradeCancel { @@ -4421,7 +4421,7 @@ export const MsgChannelUpgradeCancel = { }, toAminoMsg(message: MsgChannelUpgradeCancel): MsgChannelUpgradeCancelAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeCancel", + type: 'cosmos-sdk/MsgChannelUpgradeCancel', value: MsgChannelUpgradeCancel.toAmino(message) }; }, @@ -4433,7 +4433,7 @@ export const MsgChannelUpgradeCancel = { }, toProtoMsg(message: MsgChannelUpgradeCancel): MsgChannelUpgradeCancelProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancel", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeCancel', value: MsgChannelUpgradeCancel.encode(message).finish() }; } @@ -4444,8 +4444,8 @@ function createBaseMsgChannelUpgradeCancelResponse(): MsgChannelUpgradeCancelRes return {}; } export const MsgChannelUpgradeCancelResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", - aminoType: "cosmos-sdk/MsgChannelUpgradeCancelResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse', + aminoType: 'cosmos-sdk/MsgChannelUpgradeCancelResponse', is(o: any): o is MsgChannelUpgradeCancelResponse { return o && o.$typeUrl === MsgChannelUpgradeCancelResponse.typeUrl; }, @@ -4462,9 +4462,9 @@ export const MsgChannelUpgradeCancelResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4486,7 +4486,7 @@ export const MsgChannelUpgradeCancelResponse = { }, toAminoMsg(message: MsgChannelUpgradeCancelResponse): MsgChannelUpgradeCancelResponseAminoMsg { return { - type: "cosmos-sdk/MsgChannelUpgradeCancelResponse", + type: 'cosmos-sdk/MsgChannelUpgradeCancelResponse', value: MsgChannelUpgradeCancelResponse.toAmino(message) }; }, @@ -4498,7 +4498,7 @@ export const MsgChannelUpgradeCancelResponse = { }, toProtoMsg(message: MsgChannelUpgradeCancelResponse): MsgChannelUpgradeCancelResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", + typeUrl: '/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse', value: MsgChannelUpgradeCancelResponse.encode(message).finish() }; } @@ -4507,21 +4507,21 @@ GlobalDecoderRegistry.register(MsgChannelUpgradeCancelResponse.typeUrl, MsgChann GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancelResponse.aminoType, MsgChannelUpgradeCancelResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - authority: "", + authority: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/ibc.core.channel.v1.MsgUpdateParams", - aminoType: "cosmos-sdk/MsgUpdateParams", + typeUrl: '/ibc.core.channel.v1.MsgUpdateParams', + aminoType: 'cosmos-sdk/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.authority === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { + if (message.authority !== '') { writer.uint32(10).string(message.authority); } if (message.params !== undefined) { @@ -4536,22 +4536,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.authority = object.authority ?? ""; + message.authority = object.authority ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -4567,7 +4567,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.authority = message.authority === "" ? undefined : message.authority; + obj.authority = message.authority === '' ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params) : undefined; return obj; }, @@ -4576,7 +4576,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParams", + type: 'cosmos-sdk/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -4588,7 +4588,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgUpdateParams", + typeUrl: '/ibc.core.channel.v1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -4599,8 +4599,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/ibc.core.channel.v1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/MsgUpdateParamsResponse", + typeUrl: '/ibc.core.channel.v1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -4617,9 +4617,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4641,7 +4641,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParamsResponse", + type: 'cosmos-sdk/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -4653,7 +4653,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgUpdateParamsResponse", + typeUrl: '/ibc.core.channel.v1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } @@ -4662,32 +4662,32 @@ GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsR GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgPruneAcknowledgements(): MsgPruneAcknowledgements { return { - portId: "", - channelId: "", + portId: '', + channelId: '', limit: BigInt(0), - signer: "" + signer: '' }; } export const MsgPruneAcknowledgements = { - typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgements", - aminoType: "cosmos-sdk/MsgPruneAcknowledgements", + typeUrl: '/ibc.core.channel.v1.MsgPruneAcknowledgements', + aminoType: 'cosmos-sdk/MsgPruneAcknowledgements', is(o: any): o is MsgPruneAcknowledgements { - return o && (o.$typeUrl === MsgPruneAcknowledgements.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.limit === "bigint" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgPruneAcknowledgements.typeUrl || typeof o.portId === 'string' && typeof o.channelId === 'string' && typeof o.limit === 'bigint' && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgPruneAcknowledgementsAmino { - return o && (o.$typeUrl === MsgPruneAcknowledgements.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.limit === "bigint" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgPruneAcknowledgements.typeUrl || typeof o.port_id === 'string' && typeof o.channel_id === 'string' && typeof o.limit === 'bigint' && typeof o.signer === 'string'); }, encode(message: MsgPruneAcknowledgements, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { + if (message.portId !== '') { writer.uint32(10).string(message.portId); } - if (message.channelId !== "") { + if (message.channelId !== '') { writer.uint32(18).string(message.channelId); } if (message.limit !== BigInt(0)) { writer.uint32(24).uint64(message.limit); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(34).string(message.signer); } return writer; @@ -4699,31 +4699,31 @@ export const MsgPruneAcknowledgements = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.limit = reader.uint64(); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.limit = reader.uint64(); + break; + case 4: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgPruneAcknowledgements { const message = createBaseMsgPruneAcknowledgements(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; + message.portId = object.portId ?? ''; + message.channelId = object.channelId ?? ''; message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgPruneAcknowledgementsAmino): MsgPruneAcknowledgements { @@ -4744,10 +4744,10 @@ export const MsgPruneAcknowledgements = { }, toAmino(message: MsgPruneAcknowledgements): MsgPruneAcknowledgementsAmino { const obj: any = {}; - obj.port_id = message.portId === "" ? undefined : message.portId; - obj.channel_id = message.channelId === "" ? undefined : message.channelId; + obj.port_id = message.portId === '' ? undefined : message.portId; + obj.channel_id = message.channelId === '' ? undefined : message.channelId; obj.limit = message.limit !== BigInt(0) ? message.limit.toString() : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgPruneAcknowledgementsAminoMsg): MsgPruneAcknowledgements { @@ -4755,7 +4755,7 @@ export const MsgPruneAcknowledgements = { }, toAminoMsg(message: MsgPruneAcknowledgements): MsgPruneAcknowledgementsAminoMsg { return { - type: "cosmos-sdk/MsgPruneAcknowledgements", + type: 'cosmos-sdk/MsgPruneAcknowledgements', value: MsgPruneAcknowledgements.toAmino(message) }; }, @@ -4767,7 +4767,7 @@ export const MsgPruneAcknowledgements = { }, toProtoMsg(message: MsgPruneAcknowledgements): MsgPruneAcknowledgementsProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgements", + typeUrl: '/ibc.core.channel.v1.MsgPruneAcknowledgements', value: MsgPruneAcknowledgements.encode(message).finish() }; } @@ -4781,13 +4781,13 @@ function createBaseMsgPruneAcknowledgementsResponse(): MsgPruneAcknowledgementsR }; } export const MsgPruneAcknowledgementsResponse = { - typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", - aminoType: "cosmos-sdk/MsgPruneAcknowledgementsResponse", + typeUrl: '/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse', + aminoType: 'cosmos-sdk/MsgPruneAcknowledgementsResponse', is(o: any): o is MsgPruneAcknowledgementsResponse { - return o && (o.$typeUrl === MsgPruneAcknowledgementsResponse.typeUrl || typeof o.totalPrunedSequences === "bigint" && typeof o.totalRemainingSequences === "bigint"); + return o && (o.$typeUrl === MsgPruneAcknowledgementsResponse.typeUrl || typeof o.totalPrunedSequences === 'bigint' && typeof o.totalRemainingSequences === 'bigint'); }, isAmino(o: any): o is MsgPruneAcknowledgementsResponseAmino { - return o && (o.$typeUrl === MsgPruneAcknowledgementsResponse.typeUrl || typeof o.total_pruned_sequences === "bigint" && typeof o.total_remaining_sequences === "bigint"); + return o && (o.$typeUrl === MsgPruneAcknowledgementsResponse.typeUrl || typeof o.total_pruned_sequences === 'bigint' && typeof o.total_remaining_sequences === 'bigint'); }, encode(message: MsgPruneAcknowledgementsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.totalPrunedSequences !== BigInt(0)) { @@ -4805,15 +4805,15 @@ export const MsgPruneAcknowledgementsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.totalPrunedSequences = reader.uint64(); - break; - case 2: - message.totalRemainingSequences = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.totalPrunedSequences = reader.uint64(); + break; + case 2: + message.totalRemainingSequences = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4845,7 +4845,7 @@ export const MsgPruneAcknowledgementsResponse = { }, toAminoMsg(message: MsgPruneAcknowledgementsResponse): MsgPruneAcknowledgementsResponseAminoMsg { return { - type: "cosmos-sdk/MsgPruneAcknowledgementsResponse", + type: 'cosmos-sdk/MsgPruneAcknowledgementsResponse', value: MsgPruneAcknowledgementsResponse.toAmino(message) }; }, @@ -4857,7 +4857,7 @@ export const MsgPruneAcknowledgementsResponse = { }, toProtoMsg(message: MsgPruneAcknowledgementsResponse): MsgPruneAcknowledgementsResponseProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", + typeUrl: '/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse', value: MsgPruneAcknowledgementsResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/core/channel/v1/upgrade.ts b/libs/cosmos-types/ibc/core/channel/v1/upgrade.ts index 2bc9d6a8..352822ca 100644 --- a/libs/cosmos-types/ibc/core/channel/v1/upgrade.ts +++ b/libs/cosmos-types/ibc/core/channel/v1/upgrade.ts @@ -1,7 +1,7 @@ -import { Timeout, TimeoutAmino, Order } from "./channel"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { DeepPartial, isSet } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { Order,Timeout, TimeoutAmino } from './channel'; /** * Upgrade is a verifiable type which contains the relevant information * for an attempted upgrade. It provides the proposed changes to the channel @@ -15,7 +15,7 @@ export interface Upgrade { nextSequenceSend: bigint; } export interface UpgradeProtoMsg { - typeUrl: "/ibc.core.channel.v1.Upgrade"; + typeUrl: '/ibc.core.channel.v1.Upgrade'; value: Uint8Array; } /** @@ -31,7 +31,7 @@ export interface UpgradeAmino { next_sequence_send: string; } export interface UpgradeAminoMsg { - type: "cosmos-sdk/Upgrade"; + type: 'cosmos-sdk/Upgrade'; value: UpgradeAmino; } /** @@ -44,7 +44,7 @@ export interface UpgradeFields { version: string; } export interface UpgradeFieldsProtoMsg { - typeUrl: "/ibc.core.channel.v1.UpgradeFields"; + typeUrl: '/ibc.core.channel.v1.UpgradeFields'; value: Uint8Array; } /** @@ -57,7 +57,7 @@ export interface UpgradeFieldsAmino { version: string; } export interface UpgradeFieldsAminoMsg { - type: "cosmos-sdk/UpgradeFields"; + type: 'cosmos-sdk/UpgradeFields'; value: UpgradeFieldsAmino; } /** @@ -72,7 +72,7 @@ export interface ErrorReceipt { message: string; } export interface ErrorReceiptProtoMsg { - typeUrl: "/ibc.core.channel.v1.ErrorReceipt"; + typeUrl: '/ibc.core.channel.v1.ErrorReceipt'; value: Uint8Array; } /** @@ -87,7 +87,7 @@ export interface ErrorReceiptAmino { message: string; } export interface ErrorReceiptAminoMsg { - type: "cosmos-sdk/ErrorReceipt"; + type: 'cosmos-sdk/ErrorReceipt'; value: ErrorReceiptAmino; } function createBaseUpgrade(): Upgrade { @@ -98,13 +98,13 @@ function createBaseUpgrade(): Upgrade { }; } export const Upgrade = { - typeUrl: "/ibc.core.channel.v1.Upgrade", - aminoType: "cosmos-sdk/Upgrade", + typeUrl: '/ibc.core.channel.v1.Upgrade', + aminoType: 'cosmos-sdk/Upgrade', is(o: any): o is Upgrade { - return o && (o.$typeUrl === Upgrade.typeUrl || UpgradeFields.is(o.fields) && Timeout.is(o.timeout) && typeof o.nextSequenceSend === "bigint"); + return o && (o.$typeUrl === Upgrade.typeUrl || UpgradeFields.is(o.fields) && Timeout.is(o.timeout) && typeof o.nextSequenceSend === 'bigint'); }, isAmino(o: any): o is UpgradeAmino { - return o && (o.$typeUrl === Upgrade.typeUrl || UpgradeFields.isAmino(o.fields) && Timeout.isAmino(o.timeout) && typeof o.next_sequence_send === "bigint"); + return o && (o.$typeUrl === Upgrade.typeUrl || UpgradeFields.isAmino(o.fields) && Timeout.isAmino(o.timeout) && typeof o.next_sequence_send === 'bigint'); }, encode(message: Upgrade, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.fields !== undefined) { @@ -125,18 +125,18 @@ export const Upgrade = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fields = UpgradeFields.decode(reader, reader.uint32()); - break; - case 2: - message.timeout = Timeout.decode(reader, reader.uint32()); - break; - case 3: - message.nextSequenceSend = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.fields = UpgradeFields.decode(reader, reader.uint32()); + break; + case 2: + message.timeout = Timeout.decode(reader, reader.uint32()); + break; + case 3: + message.nextSequenceSend = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -173,7 +173,7 @@ export const Upgrade = { }, toAminoMsg(message: Upgrade): UpgradeAminoMsg { return { - type: "cosmos-sdk/Upgrade", + type: 'cosmos-sdk/Upgrade', value: Upgrade.toAmino(message) }; }, @@ -185,7 +185,7 @@ export const Upgrade = { }, toProtoMsg(message: Upgrade): UpgradeProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.Upgrade", + typeUrl: '/ibc.core.channel.v1.Upgrade', value: Upgrade.encode(message).finish() }; } @@ -196,17 +196,17 @@ function createBaseUpgradeFields(): UpgradeFields { return { ordering: 0, connectionHops: [], - version: "" + version: '' }; } export const UpgradeFields = { - typeUrl: "/ibc.core.channel.v1.UpgradeFields", - aminoType: "cosmos-sdk/UpgradeFields", + typeUrl: '/ibc.core.channel.v1.UpgradeFields', + aminoType: 'cosmos-sdk/UpgradeFields', is(o: any): o is UpgradeFields { - return o && (o.$typeUrl === UpgradeFields.typeUrl || isSet(o.ordering) && Array.isArray(o.connectionHops) && (!o.connectionHops.length || typeof o.connectionHops[0] === "string") && typeof o.version === "string"); + return o && (o.$typeUrl === UpgradeFields.typeUrl || isSet(o.ordering) && Array.isArray(o.connectionHops) && (!o.connectionHops.length || typeof o.connectionHops[0] === 'string') && typeof o.version === 'string'); }, isAmino(o: any): o is UpgradeFieldsAmino { - return o && (o.$typeUrl === UpgradeFields.typeUrl || isSet(o.ordering) && Array.isArray(o.connection_hops) && (!o.connection_hops.length || typeof o.connection_hops[0] === "string") && typeof o.version === "string"); + return o && (o.$typeUrl === UpgradeFields.typeUrl || isSet(o.ordering) && Array.isArray(o.connection_hops) && (!o.connection_hops.length || typeof o.connection_hops[0] === 'string') && typeof o.version === 'string'); }, encode(message: UpgradeFields, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.ordering !== 0) { @@ -215,7 +215,7 @@ export const UpgradeFields = { for (const v of message.connectionHops) { writer.uint32(18).string(v!); } - if (message.version !== "") { + if (message.version !== '') { writer.uint32(26).string(message.version); } return writer; @@ -227,18 +227,18 @@ export const UpgradeFields = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ordering = (reader.int32() as any); - break; - case 2: - message.connectionHops.push(reader.string()); - break; - case 3: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.ordering = (reader.int32() as any); + break; + case 2: + message.connectionHops.push(reader.string()); + break; + case 3: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -247,7 +247,7 @@ export const UpgradeFields = { const message = createBaseUpgradeFields(); message.ordering = object.ordering ?? 0; message.connectionHops = object.connectionHops?.map(e => e) || []; - message.version = object.version ?? ""; + message.version = object.version ?? ''; return message; }, fromAmino(object: UpgradeFieldsAmino): UpgradeFields { @@ -269,7 +269,7 @@ export const UpgradeFields = { } else { obj.connection_hops = message.connectionHops; } - obj.version = message.version === "" ? undefined : message.version; + obj.version = message.version === '' ? undefined : message.version; return obj; }, fromAminoMsg(object: UpgradeFieldsAminoMsg): UpgradeFields { @@ -277,7 +277,7 @@ export const UpgradeFields = { }, toAminoMsg(message: UpgradeFields): UpgradeFieldsAminoMsg { return { - type: "cosmos-sdk/UpgradeFields", + type: 'cosmos-sdk/UpgradeFields', value: UpgradeFields.toAmino(message) }; }, @@ -289,7 +289,7 @@ export const UpgradeFields = { }, toProtoMsg(message: UpgradeFields): UpgradeFieldsProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.UpgradeFields", + typeUrl: '/ibc.core.channel.v1.UpgradeFields', value: UpgradeFields.encode(message).finish() }; } @@ -299,23 +299,23 @@ GlobalDecoderRegistry.registerAminoProtoMapping(UpgradeFields.aminoType, Upgrade function createBaseErrorReceipt(): ErrorReceipt { return { sequence: BigInt(0), - message: "" + message: '' }; } export const ErrorReceipt = { - typeUrl: "/ibc.core.channel.v1.ErrorReceipt", - aminoType: "cosmos-sdk/ErrorReceipt", + typeUrl: '/ibc.core.channel.v1.ErrorReceipt', + aminoType: 'cosmos-sdk/ErrorReceipt', is(o: any): o is ErrorReceipt { - return o && (o.$typeUrl === ErrorReceipt.typeUrl || typeof o.sequence === "bigint" && typeof o.message === "string"); + return o && (o.$typeUrl === ErrorReceipt.typeUrl || typeof o.sequence === 'bigint' && typeof o.message === 'string'); }, isAmino(o: any): o is ErrorReceiptAmino { - return o && (o.$typeUrl === ErrorReceipt.typeUrl || typeof o.sequence === "bigint" && typeof o.message === "string"); + return o && (o.$typeUrl === ErrorReceipt.typeUrl || typeof o.sequence === 'bigint' && typeof o.message === 'string'); }, encode(message: ErrorReceipt, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.sequence !== BigInt(0)) { writer.uint32(8).uint64(message.sequence); } - if (message.message !== "") { + if (message.message !== '') { writer.uint32(18).string(message.message); } return writer; @@ -327,15 +327,15 @@ export const ErrorReceipt = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sequence = reader.uint64(); + break; + case 2: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -343,7 +343,7 @@ export const ErrorReceipt = { fromPartial(object: DeepPartial): ErrorReceipt { const message = createBaseErrorReceipt(); message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.message = object.message ?? ""; + message.message = object.message ?? ''; return message; }, fromAmino(object: ErrorReceiptAmino): ErrorReceipt { @@ -359,7 +359,7 @@ export const ErrorReceipt = { toAmino(message: ErrorReceipt): ErrorReceiptAmino { const obj: any = {}; obj.sequence = message.sequence !== BigInt(0) ? message.sequence.toString() : undefined; - obj.message = message.message === "" ? undefined : message.message; + obj.message = message.message === '' ? undefined : message.message; return obj; }, fromAminoMsg(object: ErrorReceiptAminoMsg): ErrorReceipt { @@ -367,7 +367,7 @@ export const ErrorReceipt = { }, toAminoMsg(message: ErrorReceipt): ErrorReceiptAminoMsg { return { - type: "cosmos-sdk/ErrorReceipt", + type: 'cosmos-sdk/ErrorReceipt', value: ErrorReceipt.toAmino(message) }; }, @@ -379,7 +379,7 @@ export const ErrorReceipt = { }, toProtoMsg(message: ErrorReceipt): ErrorReceiptProtoMsg { return { - typeUrl: "/ibc.core.channel.v1.ErrorReceipt", + typeUrl: '/ibc.core.channel.v1.ErrorReceipt', value: ErrorReceipt.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/core/client/v1/client.ts b/libs/cosmos-types/ibc/core/client/v1/client.ts index 86a06608..7a44fb52 100644 --- a/libs/cosmos-types/ibc/core/client/v1/client.ts +++ b/libs/cosmos-types/ibc/core/client/v1/client.ts @@ -1,8 +1,8 @@ -import { Any, AnyAmino } from "../../../../google/protobuf/any"; -import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { Plan, PlanAmino } from '../../../../cosmos/upgrade/v1beta1/upgrade'; +import { Any, AnyAmino } from '../../../../google/protobuf/any'; +import { DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; /** * IdentifiedClientState defines a client state with an additional client * identifier field. @@ -14,7 +14,7 @@ export interface IdentifiedClientState { clientState?: Any; } export interface IdentifiedClientStateProtoMsg { - typeUrl: "/ibc.core.client.v1.IdentifiedClientState"; + typeUrl: '/ibc.core.client.v1.IdentifiedClientState'; value: Uint8Array; } /** @@ -28,7 +28,7 @@ export interface IdentifiedClientStateAmino { client_state?: AnyAmino; } export interface IdentifiedClientStateAminoMsg { - type: "cosmos-sdk/IdentifiedClientState"; + type: 'cosmos-sdk/IdentifiedClientState'; value: IdentifiedClientStateAmino; } /** @@ -42,7 +42,7 @@ export interface ConsensusStateWithHeight { consensusState?: Any; } export interface ConsensusStateWithHeightProtoMsg { - typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight"; + typeUrl: '/ibc.core.client.v1.ConsensusStateWithHeight'; value: Uint8Array; } /** @@ -56,7 +56,7 @@ export interface ConsensusStateWithHeightAmino { consensus_state?: AnyAmino; } export interface ConsensusStateWithHeightAminoMsg { - type: "cosmos-sdk/ConsensusStateWithHeight"; + type: 'cosmos-sdk/ConsensusStateWithHeight'; value: ConsensusStateWithHeightAmino; } /** @@ -70,7 +70,7 @@ export interface ClientConsensusStates { consensusStates: ConsensusStateWithHeight[]; } export interface ClientConsensusStatesProtoMsg { - typeUrl: "/ibc.core.client.v1.ClientConsensusStates"; + typeUrl: '/ibc.core.client.v1.ClientConsensusStates'; value: Uint8Array; } /** @@ -84,7 +84,7 @@ export interface ClientConsensusStatesAmino { consensus_states: ConsensusStateWithHeightAmino[]; } export interface ClientConsensusStatesAminoMsg { - type: "cosmos-sdk/ClientConsensusStates"; + type: 'cosmos-sdk/ClientConsensusStates'; value: ClientConsensusStatesAmino; } /** @@ -106,7 +106,7 @@ export interface Height { revisionHeight: bigint; } export interface HeightProtoMsg { - typeUrl: "/ibc.core.client.v1.Height"; + typeUrl: '/ibc.core.client.v1.Height'; value: Uint8Array; } /** @@ -128,7 +128,7 @@ export interface HeightAmino { revision_height: string; } export interface HeightAminoMsg { - type: "cosmos-sdk/Height"; + type: 'cosmos-sdk/Height'; value: HeightAmino; } /** Params defines the set of IBC light client parameters. */ @@ -141,7 +141,7 @@ export interface Params { allowedClients: string[]; } export interface ParamsProtoMsg { - typeUrl: "/ibc.core.client.v1.Params"; + typeUrl: '/ibc.core.client.v1.Params'; value: Uint8Array; } /** Params defines the set of IBC light client parameters. */ @@ -154,7 +154,7 @@ export interface ParamsAmino { allowed_clients: string[]; } export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; + type: 'cosmos-sdk/Params'; value: ParamsAmino; } /** @@ -180,7 +180,7 @@ export interface ClientUpdateProposal { substituteClientId: string; } export interface ClientUpdateProposalProtoMsg { - typeUrl: "/ibc.core.client.v1.ClientUpdateProposal"; + typeUrl: '/ibc.core.client.v1.ClientUpdateProposal'; value: Uint8Array; } /** @@ -206,7 +206,7 @@ export interface ClientUpdateProposalAmino { substitute_client_id: string; } export interface ClientUpdateProposalAminoMsg { - type: "cosmos-sdk/ClientUpdateProposal"; + type: 'cosmos-sdk/ClientUpdateProposal'; value: ClientUpdateProposalAmino; } /** @@ -231,7 +231,7 @@ export interface UpgradeProposal { upgradedClientState?: Any; } export interface UpgradeProposalProtoMsg { - typeUrl: "/ibc.core.client.v1.UpgradeProposal"; + typeUrl: '/ibc.core.client.v1.UpgradeProposal'; value: Uint8Array; } /** @@ -256,26 +256,26 @@ export interface UpgradeProposalAmino { upgraded_client_state?: AnyAmino; } export interface UpgradeProposalAminoMsg { - type: "cosmos-sdk/UpgradeProposal"; + type: 'cosmos-sdk/UpgradeProposal'; value: UpgradeProposalAmino; } function createBaseIdentifiedClientState(): IdentifiedClientState { return { - clientId: "", + clientId: '', clientState: undefined }; } export const IdentifiedClientState = { - typeUrl: "/ibc.core.client.v1.IdentifiedClientState", - aminoType: "cosmos-sdk/IdentifiedClientState", + typeUrl: '/ibc.core.client.v1.IdentifiedClientState', + aminoType: 'cosmos-sdk/IdentifiedClientState', is(o: any): o is IdentifiedClientState { - return o && (o.$typeUrl === IdentifiedClientState.typeUrl || typeof o.clientId === "string"); + return o && (o.$typeUrl === IdentifiedClientState.typeUrl || typeof o.clientId === 'string'); }, isAmino(o: any): o is IdentifiedClientStateAmino { - return o && (o.$typeUrl === IdentifiedClientState.typeUrl || typeof o.client_id === "string"); + return o && (o.$typeUrl === IdentifiedClientState.typeUrl || typeof o.client_id === 'string'); }, encode(message: IdentifiedClientState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } if (message.clientState !== undefined) { @@ -290,22 +290,22 @@ export const IdentifiedClientState = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): IdentifiedClientState { const message = createBaseIdentifiedClientState(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; return message; }, @@ -321,7 +321,7 @@ export const IdentifiedClientState = { }, toAmino(message: IdentifiedClientState): IdentifiedClientStateAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; return obj; }, @@ -330,7 +330,7 @@ export const IdentifiedClientState = { }, toAminoMsg(message: IdentifiedClientState): IdentifiedClientStateAminoMsg { return { - type: "cosmos-sdk/IdentifiedClientState", + type: 'cosmos-sdk/IdentifiedClientState', value: IdentifiedClientState.toAmino(message) }; }, @@ -342,7 +342,7 @@ export const IdentifiedClientState = { }, toProtoMsg(message: IdentifiedClientState): IdentifiedClientStateProtoMsg { return { - typeUrl: "/ibc.core.client.v1.IdentifiedClientState", + typeUrl: '/ibc.core.client.v1.IdentifiedClientState', value: IdentifiedClientState.encode(message).finish() }; } @@ -356,8 +356,8 @@ function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { }; } export const ConsensusStateWithHeight = { - typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", - aminoType: "cosmos-sdk/ConsensusStateWithHeight", + typeUrl: '/ibc.core.client.v1.ConsensusStateWithHeight', + aminoType: 'cosmos-sdk/ConsensusStateWithHeight', is(o: any): o is ConsensusStateWithHeight { return o && (o.$typeUrl === ConsensusStateWithHeight.typeUrl || Height.is(o.height)); }, @@ -380,15 +380,15 @@ export const ConsensusStateWithHeight = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.height = Height.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -420,7 +420,7 @@ export const ConsensusStateWithHeight = { }, toAminoMsg(message: ConsensusStateWithHeight): ConsensusStateWithHeightAminoMsg { return { - type: "cosmos-sdk/ConsensusStateWithHeight", + type: 'cosmos-sdk/ConsensusStateWithHeight', value: ConsensusStateWithHeight.toAmino(message) }; }, @@ -432,7 +432,7 @@ export const ConsensusStateWithHeight = { }, toProtoMsg(message: ConsensusStateWithHeight): ConsensusStateWithHeightProtoMsg { return { - typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", + typeUrl: '/ibc.core.client.v1.ConsensusStateWithHeight', value: ConsensusStateWithHeight.encode(message).finish() }; } @@ -441,21 +441,21 @@ GlobalDecoderRegistry.register(ConsensusStateWithHeight.typeUrl, ConsensusStateW GlobalDecoderRegistry.registerAminoProtoMapping(ConsensusStateWithHeight.aminoType, ConsensusStateWithHeight.typeUrl); function createBaseClientConsensusStates(): ClientConsensusStates { return { - clientId: "", + clientId: '', consensusStates: [] }; } export const ClientConsensusStates = { - typeUrl: "/ibc.core.client.v1.ClientConsensusStates", - aminoType: "cosmos-sdk/ClientConsensusStates", + typeUrl: '/ibc.core.client.v1.ClientConsensusStates', + aminoType: 'cosmos-sdk/ClientConsensusStates', is(o: any): o is ClientConsensusStates { - return o && (o.$typeUrl === ClientConsensusStates.typeUrl || typeof o.clientId === "string" && Array.isArray(o.consensusStates) && (!o.consensusStates.length || ConsensusStateWithHeight.is(o.consensusStates[0]))); + return o && (o.$typeUrl === ClientConsensusStates.typeUrl || typeof o.clientId === 'string' && Array.isArray(o.consensusStates) && (!o.consensusStates.length || ConsensusStateWithHeight.is(o.consensusStates[0]))); }, isAmino(o: any): o is ClientConsensusStatesAmino { - return o && (o.$typeUrl === ClientConsensusStates.typeUrl || typeof o.client_id === "string" && Array.isArray(o.consensus_states) && (!o.consensus_states.length || ConsensusStateWithHeight.isAmino(o.consensus_states[0]))); + return o && (o.$typeUrl === ClientConsensusStates.typeUrl || typeof o.client_id === 'string' && Array.isArray(o.consensus_states) && (!o.consensus_states.length || ConsensusStateWithHeight.isAmino(o.consensus_states[0]))); }, encode(message: ClientConsensusStates, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } for (const v of message.consensusStates) { @@ -470,22 +470,22 @@ export const ClientConsensusStates = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ClientConsensusStates { const message = createBaseClientConsensusStates(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.consensusStates = object.consensusStates?.map(e => ConsensusStateWithHeight.fromPartial(e)) || []; return message; }, @@ -499,7 +499,7 @@ export const ClientConsensusStates = { }, toAmino(message: ClientConsensusStates): ClientConsensusStatesAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; if (message.consensusStates) { obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toAmino(e) : undefined); } else { @@ -512,7 +512,7 @@ export const ClientConsensusStates = { }, toAminoMsg(message: ClientConsensusStates): ClientConsensusStatesAminoMsg { return { - type: "cosmos-sdk/ClientConsensusStates", + type: 'cosmos-sdk/ClientConsensusStates', value: ClientConsensusStates.toAmino(message) }; }, @@ -524,7 +524,7 @@ export const ClientConsensusStates = { }, toProtoMsg(message: ClientConsensusStates): ClientConsensusStatesProtoMsg { return { - typeUrl: "/ibc.core.client.v1.ClientConsensusStates", + typeUrl: '/ibc.core.client.v1.ClientConsensusStates', value: ClientConsensusStates.encode(message).finish() }; } @@ -538,13 +538,13 @@ function createBaseHeight(): Height { }; } export const Height = { - typeUrl: "/ibc.core.client.v1.Height", - aminoType: "cosmos-sdk/Height", + typeUrl: '/ibc.core.client.v1.Height', + aminoType: 'cosmos-sdk/Height', is(o: any): o is Height { - return o && (o.$typeUrl === Height.typeUrl || typeof o.revisionNumber === "bigint" && typeof o.revisionHeight === "bigint"); + return o && (o.$typeUrl === Height.typeUrl || typeof o.revisionNumber === 'bigint' && typeof o.revisionHeight === 'bigint'); }, isAmino(o: any): o is HeightAmino { - return o && (o.$typeUrl === Height.typeUrl || typeof o.revision_number === "bigint" && typeof o.revision_height === "bigint"); + return o && (o.$typeUrl === Height.typeUrl || typeof o.revision_number === 'bigint' && typeof o.revision_height === 'bigint'); }, encode(message: Height, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.revisionNumber !== BigInt(0)) { @@ -562,15 +562,15 @@ export const Height = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.revisionNumber = reader.uint64(); - break; - case 2: - message.revisionHeight = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.revisionNumber = reader.uint64(); + break; + case 2: + message.revisionHeight = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -583,8 +583,8 @@ export const Height = { }, fromAmino(object: HeightAmino): Height { return { - revisionNumber: BigInt(object.revision_number || "0"), - revisionHeight: BigInt(object.revision_height || "0") + revisionNumber: BigInt(object.revision_number || '0'), + revisionHeight: BigInt(object.revision_height || '0') }; }, toAmino(message: Height): HeightAmino { @@ -598,7 +598,7 @@ export const Height = { }, toAminoMsg(message: Height): HeightAminoMsg { return { - type: "cosmos-sdk/Height", + type: 'cosmos-sdk/Height', value: Height.toAmino(message) }; }, @@ -610,7 +610,7 @@ export const Height = { }, toProtoMsg(message: Height): HeightProtoMsg { return { - typeUrl: "/ibc.core.client.v1.Height", + typeUrl: '/ibc.core.client.v1.Height', value: Height.encode(message).finish() }; } @@ -623,13 +623,13 @@ function createBaseParams(): Params { }; } export const Params = { - typeUrl: "/ibc.core.client.v1.Params", - aminoType: "cosmos-sdk/Params", + typeUrl: '/ibc.core.client.v1.Params', + aminoType: 'cosmos-sdk/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.allowedClients) && (!o.allowedClients.length || typeof o.allowedClients[0] === "string")); + return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.allowedClients) && (!o.allowedClients.length || typeof o.allowedClients[0] === 'string')); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.allowed_clients) && (!o.allowed_clients.length || typeof o.allowed_clients[0] === "string")); + return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.allowed_clients) && (!o.allowed_clients.length || typeof o.allowed_clients[0] === 'string')); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.allowedClients) { @@ -644,12 +644,12 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.allowedClients.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -678,7 +678,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/Params", + type: 'cosmos-sdk/Params', value: Params.toAmino(message) }; }, @@ -690,7 +690,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/ibc.core.client.v1.Params", + typeUrl: '/ibc.core.client.v1.Params', value: Params.encode(message).finish() }; } @@ -699,32 +699,32 @@ GlobalDecoderRegistry.register(Params.typeUrl, Params); GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseClientUpdateProposal(): ClientUpdateProposal { return { - title: "", - description: "", - subjectClientId: "", - substituteClientId: "" + title: '', + description: '', + subjectClientId: '', + substituteClientId: '' }; } export const ClientUpdateProposal = { - typeUrl: "/ibc.core.client.v1.ClientUpdateProposal", - aminoType: "cosmos-sdk/ClientUpdateProposal", + typeUrl: '/ibc.core.client.v1.ClientUpdateProposal', + aminoType: 'cosmos-sdk/ClientUpdateProposal', is(o: any): o is ClientUpdateProposal { - return o && (o.$typeUrl === ClientUpdateProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && typeof o.subjectClientId === "string" && typeof o.substituteClientId === "string"); + return o && (o.$typeUrl === ClientUpdateProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.subjectClientId === 'string' && typeof o.substituteClientId === 'string'); }, isAmino(o: any): o is ClientUpdateProposalAmino { - return o && (o.$typeUrl === ClientUpdateProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && typeof o.subject_client_id === "string" && typeof o.substitute_client_id === "string"); + return o && (o.$typeUrl === ClientUpdateProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && typeof o.subject_client_id === 'string' && typeof o.substitute_client_id === 'string'); }, encode(message: ClientUpdateProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { + if (message.title !== '') { writer.uint32(10).string(message.title); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } - if (message.subjectClientId !== "") { + if (message.subjectClientId !== '') { writer.uint32(26).string(message.subjectClientId); } - if (message.substituteClientId !== "") { + if (message.substituteClientId !== '') { writer.uint32(34).string(message.substituteClientId); } return writer; @@ -736,31 +736,31 @@ export const ClientUpdateProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subjectClientId = reader.string(); - break; - case 4: - message.substituteClientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.subjectClientId = reader.string(); + break; + case 4: + message.substituteClientId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ClientUpdateProposal { const message = createBaseClientUpdateProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.subjectClientId = object.subjectClientId ?? ""; - message.substituteClientId = object.substituteClientId ?? ""; + message.title = object.title ?? ''; + message.description = object.description ?? ''; + message.subjectClientId = object.subjectClientId ?? ''; + message.substituteClientId = object.substituteClientId ?? ''; return message; }, fromAmino(object: ClientUpdateProposalAmino): ClientUpdateProposal { @@ -781,10 +781,10 @@ export const ClientUpdateProposal = { }, toAmino(message: ClientUpdateProposal): ClientUpdateProposalAmino { const obj: any = {}; - obj.title = message.title === "" ? undefined : message.title; - obj.description = message.description === "" ? undefined : message.description; - obj.subject_client_id = message.subjectClientId === "" ? undefined : message.subjectClientId; - obj.substitute_client_id = message.substituteClientId === "" ? undefined : message.substituteClientId; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; + obj.subject_client_id = message.subjectClientId === '' ? undefined : message.subjectClientId; + obj.substitute_client_id = message.substituteClientId === '' ? undefined : message.substituteClientId; return obj; }, fromAminoMsg(object: ClientUpdateProposalAminoMsg): ClientUpdateProposal { @@ -792,7 +792,7 @@ export const ClientUpdateProposal = { }, toAminoMsg(message: ClientUpdateProposal): ClientUpdateProposalAminoMsg { return { - type: "cosmos-sdk/ClientUpdateProposal", + type: 'cosmos-sdk/ClientUpdateProposal', value: ClientUpdateProposal.toAmino(message) }; }, @@ -804,7 +804,7 @@ export const ClientUpdateProposal = { }, toProtoMsg(message: ClientUpdateProposal): ClientUpdateProposalProtoMsg { return { - typeUrl: "/ibc.core.client.v1.ClientUpdateProposal", + typeUrl: '/ibc.core.client.v1.ClientUpdateProposal', value: ClientUpdateProposal.encode(message).finish() }; } @@ -813,26 +813,26 @@ GlobalDecoderRegistry.register(ClientUpdateProposal.typeUrl, ClientUpdateProposa GlobalDecoderRegistry.registerAminoProtoMapping(ClientUpdateProposal.aminoType, ClientUpdateProposal.typeUrl); function createBaseUpgradeProposal(): UpgradeProposal { return { - title: "", - description: "", + title: '', + description: '', plan: Plan.fromPartial({}), upgradedClientState: undefined }; } export const UpgradeProposal = { - typeUrl: "/ibc.core.client.v1.UpgradeProposal", - aminoType: "cosmos-sdk/UpgradeProposal", + typeUrl: '/ibc.core.client.v1.UpgradeProposal', + aminoType: 'cosmos-sdk/UpgradeProposal', is(o: any): o is UpgradeProposal { - return o && (o.$typeUrl === UpgradeProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && Plan.is(o.plan)); + return o && (o.$typeUrl === UpgradeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Plan.is(o.plan)); }, isAmino(o: any): o is UpgradeProposalAmino { - return o && (o.$typeUrl === UpgradeProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string" && Plan.isAmino(o.plan)); + return o && (o.$typeUrl === UpgradeProposal.typeUrl || typeof o.title === 'string' && typeof o.description === 'string' && Plan.isAmino(o.plan)); }, encode(message: UpgradeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { + if (message.title !== '') { writer.uint32(10).string(message.title); } - if (message.description !== "") { + if (message.description !== '') { writer.uint32(18).string(message.description); } if (message.plan !== undefined) { @@ -850,29 +850,29 @@ export const UpgradeProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.plan = Plan.decode(reader, reader.uint32()); + break; + case 4: + message.upgradedClientState = Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): UpgradeProposal { const message = createBaseUpgradeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; + message.title = object.title ?? ''; + message.description = object.description ?? ''; message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined; return message; @@ -895,8 +895,8 @@ export const UpgradeProposal = { }, toAmino(message: UpgradeProposal): UpgradeProposalAmino { const obj: any = {}; - obj.title = message.title === "" ? undefined : message.title; - obj.description = message.description === "" ? undefined : message.description; + obj.title = message.title === '' ? undefined : message.title; + obj.description = message.description === '' ? undefined : message.description; obj.plan = message.plan ? Plan.toAmino(message.plan) : undefined; obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState) : undefined; return obj; @@ -906,7 +906,7 @@ export const UpgradeProposal = { }, toAminoMsg(message: UpgradeProposal): UpgradeProposalAminoMsg { return { - type: "cosmos-sdk/UpgradeProposal", + type: 'cosmos-sdk/UpgradeProposal', value: UpgradeProposal.toAmino(message) }; }, @@ -918,7 +918,7 @@ export const UpgradeProposal = { }, toProtoMsg(message: UpgradeProposal): UpgradeProposalProtoMsg { return { - typeUrl: "/ibc.core.client.v1.UpgradeProposal", + typeUrl: '/ibc.core.client.v1.UpgradeProposal', value: UpgradeProposal.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/core/client/v1/tx.amino.ts b/libs/cosmos-types/ibc/core/client/v1/tx.amino.ts index dc80a575..70744564 100644 --- a/libs/cosmos-types/ibc/core/client/v1/tx.amino.ts +++ b/libs/cosmos-types/ibc/core/client/v1/tx.amino.ts @@ -1,37 +1,37 @@ -import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour, MsgRecoverClient, MsgIBCSoftwareUpgrade, MsgUpdateParams } from "./tx"; +import { MsgCreateClient, MsgIBCSoftwareUpgrade, MsgRecoverClient, MsgSubmitMisbehaviour, MsgUpdateClient, MsgUpdateParams,MsgUpgradeClient } from './tx'; export const AminoConverter = { - "/ibc.core.client.v1.MsgCreateClient": { - aminoType: "cosmos-sdk/MsgCreateClient", + '/ibc.core.client.v1.MsgCreateClient': { + aminoType: 'cosmos-sdk/MsgCreateClient', toAmino: MsgCreateClient.toAmino, fromAmino: MsgCreateClient.fromAmino }, - "/ibc.core.client.v1.MsgUpdateClient": { - aminoType: "cosmos-sdk/MsgUpdateClient", + '/ibc.core.client.v1.MsgUpdateClient': { + aminoType: 'cosmos-sdk/MsgUpdateClient', toAmino: MsgUpdateClient.toAmino, fromAmino: MsgUpdateClient.fromAmino }, - "/ibc.core.client.v1.MsgUpgradeClient": { - aminoType: "cosmos-sdk/MsgUpgradeClient", + '/ibc.core.client.v1.MsgUpgradeClient': { + aminoType: 'cosmos-sdk/MsgUpgradeClient', toAmino: MsgUpgradeClient.toAmino, fromAmino: MsgUpgradeClient.fromAmino }, - "/ibc.core.client.v1.MsgSubmitMisbehaviour": { - aminoType: "cosmos-sdk/MsgSubmitMisbehaviour", + '/ibc.core.client.v1.MsgSubmitMisbehaviour': { + aminoType: 'cosmos-sdk/MsgSubmitMisbehaviour', toAmino: MsgSubmitMisbehaviour.toAmino, fromAmino: MsgSubmitMisbehaviour.fromAmino }, - "/ibc.core.client.v1.MsgRecoverClient": { - aminoType: "cosmos-sdk/MsgRecoverClient", + '/ibc.core.client.v1.MsgRecoverClient': { + aminoType: 'cosmos-sdk/MsgRecoverClient', toAmino: MsgRecoverClient.toAmino, fromAmino: MsgRecoverClient.fromAmino }, - "/ibc.core.client.v1.MsgIBCSoftwareUpgrade": { - aminoType: "cosmos-sdk/MsgIBCSoftwareUpgrade", + '/ibc.core.client.v1.MsgIBCSoftwareUpgrade': { + aminoType: 'cosmos-sdk/MsgIBCSoftwareUpgrade', toAmino: MsgIBCSoftwareUpgrade.toAmino, fromAmino: MsgIBCSoftwareUpgrade.fromAmino }, - "/ibc.core.client.v1.MsgUpdateParams": { - aminoType: "cosmos-sdk/MsgUpdateParams", + '/ibc.core.client.v1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino } diff --git a/libs/cosmos-types/ibc/core/client/v1/tx.registry.ts b/libs/cosmos-types/ibc/core/client/v1/tx.registry.ts index b6d3c750..27d7baf5 100644 --- a/libs/cosmos-types/ibc/core/client/v1/tx.registry.ts +++ b/libs/cosmos-types/ibc/core/client/v1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../../types"; -import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour, MsgRecoverClient, MsgIBCSoftwareUpgrade, MsgUpdateParams } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/ibc.core.client.v1.MsgCreateClient", MsgCreateClient], ["/ibc.core.client.v1.MsgUpdateClient", MsgUpdateClient], ["/ibc.core.client.v1.MsgUpgradeClient", MsgUpgradeClient], ["/ibc.core.client.v1.MsgSubmitMisbehaviour", MsgSubmitMisbehaviour], ["/ibc.core.client.v1.MsgRecoverClient", MsgRecoverClient], ["/ibc.core.client.v1.MsgIBCSoftwareUpgrade", MsgIBCSoftwareUpgrade], ["/ibc.core.client.v1.MsgUpdateParams", MsgUpdateParams]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../../types'; +import { MsgCreateClient, MsgIBCSoftwareUpgrade, MsgRecoverClient, MsgSubmitMisbehaviour, MsgUpdateClient, MsgUpdateParams,MsgUpgradeClient } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/ibc.core.client.v1.MsgCreateClient', MsgCreateClient], ['/ibc.core.client.v1.MsgUpdateClient', MsgUpdateClient], ['/ibc.core.client.v1.MsgUpgradeClient', MsgUpgradeClient], ['/ibc.core.client.v1.MsgSubmitMisbehaviour', MsgSubmitMisbehaviour], ['/ibc.core.client.v1.MsgRecoverClient', MsgRecoverClient], ['/ibc.core.client.v1.MsgIBCSoftwareUpgrade', MsgIBCSoftwareUpgrade], ['/ibc.core.client.v1.MsgUpdateParams', MsgUpdateParams]]; \ No newline at end of file diff --git a/libs/cosmos-types/ibc/core/client/v1/tx.rpc.msg.ts b/libs/cosmos-types/ibc/core/client/v1/tx.rpc.msg.ts index 10ea4dc7..8183aa4c 100644 --- a/libs/cosmos-types/ibc/core/client/v1/tx.rpc.msg.ts +++ b/libs/cosmos-types/ibc/core/client/v1/tx.rpc.msg.ts @@ -1,21 +1,21 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../../types"; -import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour, MsgRecoverClient, MsgIBCSoftwareUpgrade, MsgUpdateParams } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../../types'; +import { MsgCreateClient, MsgIBCSoftwareUpgrade, MsgRecoverClient, MsgSubmitMisbehaviour, MsgUpdateClient, MsgUpdateParams,MsgUpgradeClient } from './tx'; /** Msg defines the ibc/client Msg service. */ export interface Msg { /** CreateClient defines a rpc handler method for MsgCreateClient. */ - createClient(signerAddress: string, message: MsgCreateClient, fee: number | StdFee | "auto", memo?: string): Promise; + createClient(signerAddress: string, message: MsgCreateClient, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateClient defines a rpc handler method for MsgUpdateClient. */ - updateClient(signerAddress: string, message: MsgUpdateClient, fee: number | StdFee | "auto", memo?: string): Promise; + updateClient(signerAddress: string, message: MsgUpdateClient, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ - upgradeClient(signerAddress: string, message: MsgUpgradeClient, fee: number | StdFee | "auto", memo?: string): Promise; + upgradeClient(signerAddress: string, message: MsgUpgradeClient, fee: number | StdFee | 'auto', memo?: string): Promise; /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ - submitMisbehaviour(signerAddress: string, message: MsgSubmitMisbehaviour, fee: number | StdFee | "auto", memo?: string): Promise; + submitMisbehaviour(signerAddress: string, message: MsgSubmitMisbehaviour, fee: number | StdFee | 'auto', memo?: string): Promise; /** RecoverClient defines a rpc handler method for MsgRecoverClient. */ - recoverClient(signerAddress: string, message: MsgRecoverClient, fee: number | StdFee | "auto", memo?: string): Promise; + recoverClient(signerAddress: string, message: MsgRecoverClient, fee: number | StdFee | 'auto', memo?: string): Promise; /** IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. */ - iBCSoftwareUpgrade(signerAddress: string, message: MsgIBCSoftwareUpgrade, fee: number | StdFee | "auto", memo?: string): Promise; + iBCSoftwareUpgrade(signerAddress: string, message: MsgIBCSoftwareUpgrade, fee: number | StdFee | 'auto', memo?: string): Promise; /** UpdateClientParams defines a rpc handler method for MsgUpdateParams. */ - updateClientParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateClientParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -23,7 +23,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* CreateClient defines a rpc handler method for MsgCreateClient. */ - createClient = async (signerAddress: string, message: MsgCreateClient, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + createClient = async (signerAddress: string, message: MsgCreateClient, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgCreateClient.typeUrl, value: message @@ -31,7 +31,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateClient defines a rpc handler method for MsgUpdateClient. */ - updateClient = async (signerAddress: string, message: MsgUpdateClient, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateClient = async (signerAddress: string, message: MsgUpdateClient, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateClient.typeUrl, value: message @@ -39,7 +39,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ - upgradeClient = async (signerAddress: string, message: MsgUpgradeClient, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + upgradeClient = async (signerAddress: string, message: MsgUpgradeClient, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpgradeClient.typeUrl, value: message @@ -47,7 +47,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ - submitMisbehaviour = async (signerAddress: string, message: MsgSubmitMisbehaviour, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + submitMisbehaviour = async (signerAddress: string, message: MsgSubmitMisbehaviour, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgSubmitMisbehaviour.typeUrl, value: message @@ -55,7 +55,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* RecoverClient defines a rpc handler method for MsgRecoverClient. */ - recoverClient = async (signerAddress: string, message: MsgRecoverClient, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + recoverClient = async (signerAddress: string, message: MsgRecoverClient, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgRecoverClient.typeUrl, value: message @@ -63,7 +63,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. */ - iBCSoftwareUpgrade = async (signerAddress: string, message: MsgIBCSoftwareUpgrade, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + iBCSoftwareUpgrade = async (signerAddress: string, message: MsgIBCSoftwareUpgrade, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgIBCSoftwareUpgrade.typeUrl, value: message @@ -71,7 +71,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* UpdateClientParams defines a rpc handler method for MsgUpdateParams. */ - updateClientParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateClientParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message diff --git a/libs/cosmos-types/ibc/core/client/v1/tx.ts b/libs/cosmos-types/ibc/core/client/v1/tx.ts index de0d64f7..2efb2fbb 100644 --- a/libs/cosmos-types/ibc/core/client/v1/tx.ts +++ b/libs/cosmos-types/ibc/core/client/v1/tx.ts @@ -1,9 +1,9 @@ -import { Any, AnyAmino } from "../../../../google/protobuf/any"; -import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; -import { Params, ParamsAmino } from "./client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { Plan, PlanAmino } from '../../../../cosmos/upgrade/v1beta1/upgrade'; +import { Any, AnyAmino } from '../../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { Params, ParamsAmino } from './client'; /** MsgCreateClient defines a message to create an IBC client */ export interface MsgCreateClient { /** light client state */ @@ -17,7 +17,7 @@ export interface MsgCreateClient { signer: string; } export interface MsgCreateClientProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgCreateClient"; + typeUrl: '/ibc.core.client.v1.MsgCreateClient'; value: Uint8Array; } /** MsgCreateClient defines a message to create an IBC client */ @@ -33,19 +33,19 @@ export interface MsgCreateClientAmino { signer: string; } export interface MsgCreateClientAminoMsg { - type: "cosmos-sdk/MsgCreateClient"; + type: 'cosmos-sdk/MsgCreateClient'; value: MsgCreateClientAmino; } /** MsgCreateClientResponse defines the Msg/CreateClient response type. */ export interface MsgCreateClientResponse {} export interface MsgCreateClientResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse"; + typeUrl: '/ibc.core.client.v1.MsgCreateClientResponse'; value: Uint8Array; } /** MsgCreateClientResponse defines the Msg/CreateClient response type. */ export interface MsgCreateClientResponseAmino {} export interface MsgCreateClientResponseAminoMsg { - type: "cosmos-sdk/MsgCreateClientResponse"; + type: 'cosmos-sdk/MsgCreateClientResponse'; value: MsgCreateClientResponseAmino; } /** @@ -61,7 +61,7 @@ export interface MsgUpdateClient { signer: string; } export interface MsgUpdateClientProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient"; + typeUrl: '/ibc.core.client.v1.MsgUpdateClient'; value: Uint8Array; } /** @@ -77,19 +77,19 @@ export interface MsgUpdateClientAmino { signer: string; } export interface MsgUpdateClientAminoMsg { - type: "cosmos-sdk/MsgUpdateClient"; + type: 'cosmos-sdk/MsgUpdateClient'; value: MsgUpdateClientAmino; } /** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ export interface MsgUpdateClientResponse {} export interface MsgUpdateClientResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse"; + typeUrl: '/ibc.core.client.v1.MsgUpdateClientResponse'; value: Uint8Array; } /** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ export interface MsgUpdateClientResponseAmino {} export interface MsgUpdateClientResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateClientResponse"; + type: 'cosmos-sdk/MsgUpdateClientResponse'; value: MsgUpdateClientResponseAmino; } /** @@ -114,7 +114,7 @@ export interface MsgUpgradeClient { signer: string; } export interface MsgUpgradeClientProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient"; + typeUrl: '/ibc.core.client.v1.MsgUpgradeClient'; value: Uint8Array; } /** @@ -139,19 +139,19 @@ export interface MsgUpgradeClientAmino { signer: string; } export interface MsgUpgradeClientAminoMsg { - type: "cosmos-sdk/MsgUpgradeClient"; + type: 'cosmos-sdk/MsgUpgradeClient'; value: MsgUpgradeClientAmino; } /** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ export interface MsgUpgradeClientResponse {} export interface MsgUpgradeClientResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse"; + typeUrl: '/ibc.core.client.v1.MsgUpgradeClientResponse'; value: Uint8Array; } /** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ export interface MsgUpgradeClientResponseAmino {} export interface MsgUpgradeClientResponseAminoMsg { - type: "cosmos-sdk/MsgUpgradeClientResponse"; + type: 'cosmos-sdk/MsgUpgradeClientResponse'; value: MsgUpgradeClientResponseAmino; } /** @@ -169,7 +169,7 @@ export interface MsgSubmitMisbehaviour { signer: string; } export interface MsgSubmitMisbehaviourProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour"; + typeUrl: '/ibc.core.client.v1.MsgSubmitMisbehaviour'; value: Uint8Array; } /** @@ -187,7 +187,7 @@ export interface MsgSubmitMisbehaviourAmino { signer: string; } export interface MsgSubmitMisbehaviourAminoMsg { - type: "cosmos-sdk/MsgSubmitMisbehaviour"; + type: 'cosmos-sdk/MsgSubmitMisbehaviour'; value: MsgSubmitMisbehaviourAmino; } /** @@ -196,7 +196,7 @@ export interface MsgSubmitMisbehaviourAminoMsg { */ export interface MsgSubmitMisbehaviourResponse {} export interface MsgSubmitMisbehaviourResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse"; + typeUrl: '/ibc.core.client.v1.MsgSubmitMisbehaviourResponse'; value: Uint8Array; } /** @@ -205,7 +205,7 @@ export interface MsgSubmitMisbehaviourResponseProtoMsg { */ export interface MsgSubmitMisbehaviourResponseAmino {} export interface MsgSubmitMisbehaviourResponseAminoMsg { - type: "cosmos-sdk/MsgSubmitMisbehaviourResponse"; + type: 'cosmos-sdk/MsgSubmitMisbehaviourResponse'; value: MsgSubmitMisbehaviourResponseAmino; } /** MsgRecoverClient defines the message used to recover a frozen or expired client. */ @@ -221,7 +221,7 @@ export interface MsgRecoverClient { signer: string; } export interface MsgRecoverClientProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgRecoverClient"; + typeUrl: '/ibc.core.client.v1.MsgRecoverClient'; value: Uint8Array; } /** MsgRecoverClient defines the message used to recover a frozen or expired client. */ @@ -237,19 +237,19 @@ export interface MsgRecoverClientAmino { signer: string; } export interface MsgRecoverClientAminoMsg { - type: "cosmos-sdk/MsgRecoverClient"; + type: 'cosmos-sdk/MsgRecoverClient'; value: MsgRecoverClientAmino; } /** MsgRecoverClientResponse defines the Msg/RecoverClient response type. */ export interface MsgRecoverClientResponse {} export interface MsgRecoverClientResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgRecoverClientResponse"; + typeUrl: '/ibc.core.client.v1.MsgRecoverClientResponse'; value: Uint8Array; } /** MsgRecoverClientResponse defines the Msg/RecoverClient response type. */ export interface MsgRecoverClientResponseAmino {} export interface MsgRecoverClientResponseAminoMsg { - type: "cosmos-sdk/MsgRecoverClientResponse"; + type: 'cosmos-sdk/MsgRecoverClientResponse'; value: MsgRecoverClientResponseAmino; } /** MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal */ @@ -270,7 +270,7 @@ export interface MsgIBCSoftwareUpgrade { signer: string; } export interface MsgIBCSoftwareUpgradeProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgrade"; + typeUrl: '/ibc.core.client.v1.MsgIBCSoftwareUpgrade'; value: Uint8Array; } /** MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal */ @@ -291,19 +291,19 @@ export interface MsgIBCSoftwareUpgradeAmino { signer: string; } export interface MsgIBCSoftwareUpgradeAminoMsg { - type: "cosmos-sdk/MsgIBCSoftwareUpgrade"; + type: 'cosmos-sdk/MsgIBCSoftwareUpgrade'; value: MsgIBCSoftwareUpgradeAmino; } /** MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. */ export interface MsgIBCSoftwareUpgradeResponse {} export interface MsgIBCSoftwareUpgradeResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse"; + typeUrl: '/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse'; value: Uint8Array; } /** MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. */ export interface MsgIBCSoftwareUpgradeResponseAmino {} export interface MsgIBCSoftwareUpgradeResponseAminoMsg { - type: "cosmos-sdk/MsgIBCSoftwareUpgradeResponse"; + type: 'cosmos-sdk/MsgIBCSoftwareUpgradeResponse'; value: MsgIBCSoftwareUpgradeResponseAmino; } /** MsgUpdateParams defines the sdk.Msg type to update the client parameters. */ @@ -318,7 +318,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpdateParams"; + typeUrl: '/ibc.core.client.v1.MsgUpdateParams'; value: Uint8Array; } /** MsgUpdateParams defines the sdk.Msg type to update the client parameters. */ @@ -333,36 +333,36 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/MsgUpdateParams"; + type: 'cosmos-sdk/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** MsgUpdateParamsResponse defines the MsgUpdateParams response type. */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpdateParamsResponse"; + typeUrl: '/ibc.core.client.v1.MsgUpdateParamsResponse'; value: Uint8Array; } /** MsgUpdateParamsResponse defines the MsgUpdateParams response type. */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } function createBaseMsgCreateClient(): MsgCreateClient { return { clientState: undefined, consensusState: undefined, - signer: "" + signer: '' }; } export const MsgCreateClient = { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - aminoType: "cosmos-sdk/MsgCreateClient", + typeUrl: '/ibc.core.client.v1.MsgCreateClient', + aminoType: 'cosmos-sdk/MsgCreateClient', is(o: any): o is MsgCreateClient { - return o && (o.$typeUrl === MsgCreateClient.typeUrl || typeof o.signer === "string"); + return o && (o.$typeUrl === MsgCreateClient.typeUrl || typeof o.signer === 'string'); }, isAmino(o: any): o is MsgCreateClientAmino { - return o && (o.$typeUrl === MsgCreateClient.typeUrl || typeof o.signer === "string"); + return o && (o.$typeUrl === MsgCreateClient.typeUrl || typeof o.signer === 'string'); }, encode(message: MsgCreateClient, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.clientState !== undefined) { @@ -371,7 +371,7 @@ export const MsgCreateClient = { if (message.consensusState !== undefined) { Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(26).string(message.signer); } return writer; @@ -383,18 +383,18 @@ export const MsgCreateClient = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientState = Any.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -403,7 +403,7 @@ export const MsgCreateClient = { const message = createBaseMsgCreateClient(); message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgCreateClientAmino): MsgCreateClient { @@ -423,7 +423,7 @@ export const MsgCreateClient = { const obj: any = {}; obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgCreateClientAminoMsg): MsgCreateClient { @@ -431,7 +431,7 @@ export const MsgCreateClient = { }, toAminoMsg(message: MsgCreateClient): MsgCreateClientAminoMsg { return { - type: "cosmos-sdk/MsgCreateClient", + type: 'cosmos-sdk/MsgCreateClient', value: MsgCreateClient.toAmino(message) }; }, @@ -443,7 +443,7 @@ export const MsgCreateClient = { }, toProtoMsg(message: MsgCreateClient): MsgCreateClientProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", + typeUrl: '/ibc.core.client.v1.MsgCreateClient', value: MsgCreateClient.encode(message).finish() }; } @@ -454,8 +454,8 @@ function createBaseMsgCreateClientResponse(): MsgCreateClientResponse { return {}; } export const MsgCreateClientResponse = { - typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", - aminoType: "cosmos-sdk/MsgCreateClientResponse", + typeUrl: '/ibc.core.client.v1.MsgCreateClientResponse', + aminoType: 'cosmos-sdk/MsgCreateClientResponse', is(o: any): o is MsgCreateClientResponse { return o && o.$typeUrl === MsgCreateClientResponse.typeUrl; }, @@ -472,9 +472,9 @@ export const MsgCreateClientResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -496,7 +496,7 @@ export const MsgCreateClientResponse = { }, toAminoMsg(message: MsgCreateClientResponse): MsgCreateClientResponseAminoMsg { return { - type: "cosmos-sdk/MsgCreateClientResponse", + type: 'cosmos-sdk/MsgCreateClientResponse', value: MsgCreateClientResponse.toAmino(message) }; }, @@ -508,7 +508,7 @@ export const MsgCreateClientResponse = { }, toProtoMsg(message: MsgCreateClientResponse): MsgCreateClientResponseProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", + typeUrl: '/ibc.core.client.v1.MsgCreateClientResponse', value: MsgCreateClientResponse.encode(message).finish() }; } @@ -517,28 +517,28 @@ GlobalDecoderRegistry.register(MsgCreateClientResponse.typeUrl, MsgCreateClientR GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClientResponse.aminoType, MsgCreateClientResponse.typeUrl); function createBaseMsgUpdateClient(): MsgUpdateClient { return { - clientId: "", + clientId: '', clientMessage: undefined, - signer: "" + signer: '' }; } export const MsgUpdateClient = { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - aminoType: "cosmos-sdk/MsgUpdateClient", + typeUrl: '/ibc.core.client.v1.MsgUpdateClient', + aminoType: 'cosmos-sdk/MsgUpdateClient', is(o: any): o is MsgUpdateClient { - return o && (o.$typeUrl === MsgUpdateClient.typeUrl || typeof o.clientId === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgUpdateClient.typeUrl || typeof o.clientId === 'string' && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgUpdateClientAmino { - return o && (o.$typeUrl === MsgUpdateClient.typeUrl || typeof o.client_id === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgUpdateClient.typeUrl || typeof o.client_id === 'string' && typeof o.signer === 'string'); }, encode(message: MsgUpdateClient, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } if (message.clientMessage !== undefined) { Any.encode(message.clientMessage, writer.uint32(18).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(26).string(message.signer); } return writer; @@ -550,27 +550,27 @@ export const MsgUpdateClient = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientMessage = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientMessage = Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateClient { const message = createBaseMsgUpdateClient(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.clientMessage = object.clientMessage !== undefined && object.clientMessage !== null ? Any.fromPartial(object.clientMessage) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgUpdateClientAmino): MsgUpdateClient { @@ -588,9 +588,9 @@ export const MsgUpdateClient = { }, toAmino(message: MsgUpdateClient): MsgUpdateClientAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; obj.client_message = message.clientMessage ? Any.toAmino(message.clientMessage) : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgUpdateClientAminoMsg): MsgUpdateClient { @@ -598,7 +598,7 @@ export const MsgUpdateClient = { }, toAminoMsg(message: MsgUpdateClient): MsgUpdateClientAminoMsg { return { - type: "cosmos-sdk/MsgUpdateClient", + type: 'cosmos-sdk/MsgUpdateClient', value: MsgUpdateClient.toAmino(message) }; }, @@ -610,7 +610,7 @@ export const MsgUpdateClient = { }, toProtoMsg(message: MsgUpdateClient): MsgUpdateClientProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", + typeUrl: '/ibc.core.client.v1.MsgUpdateClient', value: MsgUpdateClient.encode(message).finish() }; } @@ -621,8 +621,8 @@ function createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse { return {}; } export const MsgUpdateClientResponse = { - typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", - aminoType: "cosmos-sdk/MsgUpdateClientResponse", + typeUrl: '/ibc.core.client.v1.MsgUpdateClientResponse', + aminoType: 'cosmos-sdk/MsgUpdateClientResponse', is(o: any): o is MsgUpdateClientResponse { return o && o.$typeUrl === MsgUpdateClientResponse.typeUrl; }, @@ -639,9 +639,9 @@ export const MsgUpdateClientResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -663,7 +663,7 @@ export const MsgUpdateClientResponse = { }, toAminoMsg(message: MsgUpdateClientResponse): MsgUpdateClientResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateClientResponse", + type: 'cosmos-sdk/MsgUpdateClientResponse', value: MsgUpdateClientResponse.toAmino(message) }; }, @@ -675,7 +675,7 @@ export const MsgUpdateClientResponse = { }, toProtoMsg(message: MsgUpdateClientResponse): MsgUpdateClientResponseProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", + typeUrl: '/ibc.core.client.v1.MsgUpdateClientResponse', value: MsgUpdateClientResponse.encode(message).finish() }; } @@ -684,25 +684,25 @@ GlobalDecoderRegistry.register(MsgUpdateClientResponse.typeUrl, MsgUpdateClientR GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClientResponse.aminoType, MsgUpdateClientResponse.typeUrl); function createBaseMsgUpgradeClient(): MsgUpgradeClient { return { - clientId: "", + clientId: '', clientState: undefined, consensusState: undefined, proofUpgradeClient: new Uint8Array(), proofUpgradeConsensusState: new Uint8Array(), - signer: "" + signer: '' }; } export const MsgUpgradeClient = { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - aminoType: "cosmos-sdk/MsgUpgradeClient", + typeUrl: '/ibc.core.client.v1.MsgUpgradeClient', + aminoType: 'cosmos-sdk/MsgUpgradeClient', is(o: any): o is MsgUpgradeClient { - return o && (o.$typeUrl === MsgUpgradeClient.typeUrl || typeof o.clientId === "string" && (o.proofUpgradeClient instanceof Uint8Array || typeof o.proofUpgradeClient === "string") && (o.proofUpgradeConsensusState instanceof Uint8Array || typeof o.proofUpgradeConsensusState === "string") && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgUpgradeClient.typeUrl || typeof o.clientId === 'string' && (o.proofUpgradeClient instanceof Uint8Array || typeof o.proofUpgradeClient === 'string') && (o.proofUpgradeConsensusState instanceof Uint8Array || typeof o.proofUpgradeConsensusState === 'string') && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgUpgradeClientAmino { - return o && (o.$typeUrl === MsgUpgradeClient.typeUrl || typeof o.client_id === "string" && (o.proof_upgrade_client instanceof Uint8Array || typeof o.proof_upgrade_client === "string") && (o.proof_upgrade_consensus_state instanceof Uint8Array || typeof o.proof_upgrade_consensus_state === "string") && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgUpgradeClient.typeUrl || typeof o.client_id === 'string' && (o.proof_upgrade_client instanceof Uint8Array || typeof o.proof_upgrade_client === 'string') && (o.proof_upgrade_consensus_state instanceof Uint8Array || typeof o.proof_upgrade_consensus_state === 'string') && typeof o.signer === 'string'); }, encode(message: MsgUpgradeClient, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } if (message.clientState !== undefined) { @@ -717,7 +717,7 @@ export const MsgUpgradeClient = { if (message.proofUpgradeConsensusState.length !== 0) { writer.uint32(42).bytes(message.proofUpgradeConsensusState); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(50).string(message.signer); } return writer; @@ -729,39 +729,39 @@ export const MsgUpgradeClient = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.proofUpgradeClient = reader.bytes(); - break; - case 5: - message.proofUpgradeConsensusState = reader.bytes(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = Any.decode(reader, reader.uint32()); + break; + case 3: + message.consensusState = Any.decode(reader, reader.uint32()); + break; + case 4: + message.proofUpgradeClient = reader.bytes(); + break; + case 5: + message.proofUpgradeConsensusState = reader.bytes(); + break; + case 6: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpgradeClient { const message = createBaseMsgUpgradeClient(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; message.proofUpgradeClient = object.proofUpgradeClient ?? new Uint8Array(); message.proofUpgradeConsensusState = object.proofUpgradeConsensusState ?? new Uint8Array(); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgUpgradeClientAmino): MsgUpgradeClient { @@ -788,12 +788,12 @@ export const MsgUpgradeClient = { }, toAmino(message: MsgUpgradeClient): MsgUpgradeClientAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; obj.proof_upgrade_client = message.proofUpgradeClient ? base64FromBytes(message.proofUpgradeClient) : undefined; obj.proof_upgrade_consensus_state = message.proofUpgradeConsensusState ? base64FromBytes(message.proofUpgradeConsensusState) : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgUpgradeClientAminoMsg): MsgUpgradeClient { @@ -801,7 +801,7 @@ export const MsgUpgradeClient = { }, toAminoMsg(message: MsgUpgradeClient): MsgUpgradeClientAminoMsg { return { - type: "cosmos-sdk/MsgUpgradeClient", + type: 'cosmos-sdk/MsgUpgradeClient', value: MsgUpgradeClient.toAmino(message) }; }, @@ -813,7 +813,7 @@ export const MsgUpgradeClient = { }, toProtoMsg(message: MsgUpgradeClient): MsgUpgradeClientProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", + typeUrl: '/ibc.core.client.v1.MsgUpgradeClient', value: MsgUpgradeClient.encode(message).finish() }; } @@ -824,8 +824,8 @@ function createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse { return {}; } export const MsgUpgradeClientResponse = { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", - aminoType: "cosmos-sdk/MsgUpgradeClientResponse", + typeUrl: '/ibc.core.client.v1.MsgUpgradeClientResponse', + aminoType: 'cosmos-sdk/MsgUpgradeClientResponse', is(o: any): o is MsgUpgradeClientResponse { return o && o.$typeUrl === MsgUpgradeClientResponse.typeUrl; }, @@ -842,9 +842,9 @@ export const MsgUpgradeClientResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -866,7 +866,7 @@ export const MsgUpgradeClientResponse = { }, toAminoMsg(message: MsgUpgradeClientResponse): MsgUpgradeClientResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpgradeClientResponse", + type: 'cosmos-sdk/MsgUpgradeClientResponse', value: MsgUpgradeClientResponse.toAmino(message) }; }, @@ -878,7 +878,7 @@ export const MsgUpgradeClientResponse = { }, toProtoMsg(message: MsgUpgradeClientResponse): MsgUpgradeClientResponseProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", + typeUrl: '/ibc.core.client.v1.MsgUpgradeClientResponse', value: MsgUpgradeClientResponse.encode(message).finish() }; } @@ -887,28 +887,28 @@ GlobalDecoderRegistry.register(MsgUpgradeClientResponse.typeUrl, MsgUpgradeClien GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClientResponse.aminoType, MsgUpgradeClientResponse.typeUrl); function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { return { - clientId: "", + clientId: '', misbehaviour: undefined, - signer: "" + signer: '' }; } export const MsgSubmitMisbehaviour = { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - aminoType: "cosmos-sdk/MsgSubmitMisbehaviour", + typeUrl: '/ibc.core.client.v1.MsgSubmitMisbehaviour', + aminoType: 'cosmos-sdk/MsgSubmitMisbehaviour', is(o: any): o is MsgSubmitMisbehaviour { - return o && (o.$typeUrl === MsgSubmitMisbehaviour.typeUrl || typeof o.clientId === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgSubmitMisbehaviour.typeUrl || typeof o.clientId === 'string' && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgSubmitMisbehaviourAmino { - return o && (o.$typeUrl === MsgSubmitMisbehaviour.typeUrl || typeof o.client_id === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgSubmitMisbehaviour.typeUrl || typeof o.client_id === 'string' && typeof o.signer === 'string'); }, encode(message: MsgSubmitMisbehaviour, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } if (message.misbehaviour !== undefined) { Any.encode(message.misbehaviour, writer.uint32(18).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(26).string(message.signer); } return writer; @@ -920,27 +920,27 @@ export const MsgSubmitMisbehaviour = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.misbehaviour = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.misbehaviour = Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgSubmitMisbehaviour { const message = createBaseMsgSubmitMisbehaviour(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.misbehaviour = object.misbehaviour !== undefined && object.misbehaviour !== null ? Any.fromPartial(object.misbehaviour) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgSubmitMisbehaviourAmino): MsgSubmitMisbehaviour { @@ -958,9 +958,9 @@ export const MsgSubmitMisbehaviour = { }, toAmino(message: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; obj.misbehaviour = message.misbehaviour ? Any.toAmino(message.misbehaviour) : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgSubmitMisbehaviourAminoMsg): MsgSubmitMisbehaviour { @@ -968,7 +968,7 @@ export const MsgSubmitMisbehaviour = { }, toAminoMsg(message: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourAminoMsg { return { - type: "cosmos-sdk/MsgSubmitMisbehaviour", + type: 'cosmos-sdk/MsgSubmitMisbehaviour', value: MsgSubmitMisbehaviour.toAmino(message) }; }, @@ -980,7 +980,7 @@ export const MsgSubmitMisbehaviour = { }, toProtoMsg(message: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", + typeUrl: '/ibc.core.client.v1.MsgSubmitMisbehaviour', value: MsgSubmitMisbehaviour.encode(message).finish() }; } @@ -991,8 +991,8 @@ function createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourRespons return {}; } export const MsgSubmitMisbehaviourResponse = { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", - aminoType: "cosmos-sdk/MsgSubmitMisbehaviourResponse", + typeUrl: '/ibc.core.client.v1.MsgSubmitMisbehaviourResponse', + aminoType: 'cosmos-sdk/MsgSubmitMisbehaviourResponse', is(o: any): o is MsgSubmitMisbehaviourResponse { return o && o.$typeUrl === MsgSubmitMisbehaviourResponse.typeUrl; }, @@ -1009,9 +1009,9 @@ export const MsgSubmitMisbehaviourResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1033,7 +1033,7 @@ export const MsgSubmitMisbehaviourResponse = { }, toAminoMsg(message: MsgSubmitMisbehaviourResponse): MsgSubmitMisbehaviourResponseAminoMsg { return { - type: "cosmos-sdk/MsgSubmitMisbehaviourResponse", + type: 'cosmos-sdk/MsgSubmitMisbehaviourResponse', value: MsgSubmitMisbehaviourResponse.toAmino(message) }; }, @@ -1045,7 +1045,7 @@ export const MsgSubmitMisbehaviourResponse = { }, toProtoMsg(message: MsgSubmitMisbehaviourResponse): MsgSubmitMisbehaviourResponseProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", + typeUrl: '/ibc.core.client.v1.MsgSubmitMisbehaviourResponse', value: MsgSubmitMisbehaviourResponse.encode(message).finish() }; } @@ -1054,28 +1054,28 @@ GlobalDecoderRegistry.register(MsgSubmitMisbehaviourResponse.typeUrl, MsgSubmitM GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviourResponse.aminoType, MsgSubmitMisbehaviourResponse.typeUrl); function createBaseMsgRecoverClient(): MsgRecoverClient { return { - subjectClientId: "", - substituteClientId: "", - signer: "" + subjectClientId: '', + substituteClientId: '', + signer: '' }; } export const MsgRecoverClient = { - typeUrl: "/ibc.core.client.v1.MsgRecoverClient", - aminoType: "cosmos-sdk/MsgRecoverClient", + typeUrl: '/ibc.core.client.v1.MsgRecoverClient', + aminoType: 'cosmos-sdk/MsgRecoverClient', is(o: any): o is MsgRecoverClient { - return o && (o.$typeUrl === MsgRecoverClient.typeUrl || typeof o.subjectClientId === "string" && typeof o.substituteClientId === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgRecoverClient.typeUrl || typeof o.subjectClientId === 'string' && typeof o.substituteClientId === 'string' && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgRecoverClientAmino { - return o && (o.$typeUrl === MsgRecoverClient.typeUrl || typeof o.subject_client_id === "string" && typeof o.substitute_client_id === "string" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgRecoverClient.typeUrl || typeof o.subject_client_id === 'string' && typeof o.substitute_client_id === 'string' && typeof o.signer === 'string'); }, encode(message: MsgRecoverClient, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.subjectClientId !== "") { + if (message.subjectClientId !== '') { writer.uint32(10).string(message.subjectClientId); } - if (message.substituteClientId !== "") { + if (message.substituteClientId !== '') { writer.uint32(18).string(message.substituteClientId); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(26).string(message.signer); } return writer; @@ -1087,27 +1087,27 @@ export const MsgRecoverClient = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subjectClientId = reader.string(); - break; - case 2: - message.substituteClientId = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.subjectClientId = reader.string(); + break; + case 2: + message.substituteClientId = reader.string(); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgRecoverClient { const message = createBaseMsgRecoverClient(); - message.subjectClientId = object.subjectClientId ?? ""; - message.substituteClientId = object.substituteClientId ?? ""; - message.signer = object.signer ?? ""; + message.subjectClientId = object.subjectClientId ?? ''; + message.substituteClientId = object.substituteClientId ?? ''; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgRecoverClientAmino): MsgRecoverClient { @@ -1125,9 +1125,9 @@ export const MsgRecoverClient = { }, toAmino(message: MsgRecoverClient): MsgRecoverClientAmino { const obj: any = {}; - obj.subject_client_id = message.subjectClientId === "" ? undefined : message.subjectClientId; - obj.substitute_client_id = message.substituteClientId === "" ? undefined : message.substituteClientId; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.subject_client_id = message.subjectClientId === '' ? undefined : message.subjectClientId; + obj.substitute_client_id = message.substituteClientId === '' ? undefined : message.substituteClientId; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgRecoverClientAminoMsg): MsgRecoverClient { @@ -1135,7 +1135,7 @@ export const MsgRecoverClient = { }, toAminoMsg(message: MsgRecoverClient): MsgRecoverClientAminoMsg { return { - type: "cosmos-sdk/MsgRecoverClient", + type: 'cosmos-sdk/MsgRecoverClient', value: MsgRecoverClient.toAmino(message) }; }, @@ -1147,7 +1147,7 @@ export const MsgRecoverClient = { }, toProtoMsg(message: MsgRecoverClient): MsgRecoverClientProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgRecoverClient", + typeUrl: '/ibc.core.client.v1.MsgRecoverClient', value: MsgRecoverClient.encode(message).finish() }; } @@ -1158,8 +1158,8 @@ function createBaseMsgRecoverClientResponse(): MsgRecoverClientResponse { return {}; } export const MsgRecoverClientResponse = { - typeUrl: "/ibc.core.client.v1.MsgRecoverClientResponse", - aminoType: "cosmos-sdk/MsgRecoverClientResponse", + typeUrl: '/ibc.core.client.v1.MsgRecoverClientResponse', + aminoType: 'cosmos-sdk/MsgRecoverClientResponse', is(o: any): o is MsgRecoverClientResponse { return o && o.$typeUrl === MsgRecoverClientResponse.typeUrl; }, @@ -1176,9 +1176,9 @@ export const MsgRecoverClientResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1200,7 +1200,7 @@ export const MsgRecoverClientResponse = { }, toAminoMsg(message: MsgRecoverClientResponse): MsgRecoverClientResponseAminoMsg { return { - type: "cosmos-sdk/MsgRecoverClientResponse", + type: 'cosmos-sdk/MsgRecoverClientResponse', value: MsgRecoverClientResponse.toAmino(message) }; }, @@ -1212,7 +1212,7 @@ export const MsgRecoverClientResponse = { }, toProtoMsg(message: MsgRecoverClientResponse): MsgRecoverClientResponseProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgRecoverClientResponse", + typeUrl: '/ibc.core.client.v1.MsgRecoverClientResponse', value: MsgRecoverClientResponse.encode(message).finish() }; } @@ -1223,17 +1223,17 @@ function createBaseMsgIBCSoftwareUpgrade(): MsgIBCSoftwareUpgrade { return { plan: Plan.fromPartial({}), upgradedClientState: undefined, - signer: "" + signer: '' }; } export const MsgIBCSoftwareUpgrade = { - typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgrade", - aminoType: "cosmos-sdk/MsgIBCSoftwareUpgrade", + typeUrl: '/ibc.core.client.v1.MsgIBCSoftwareUpgrade', + aminoType: 'cosmos-sdk/MsgIBCSoftwareUpgrade', is(o: any): o is MsgIBCSoftwareUpgrade { - return o && (o.$typeUrl === MsgIBCSoftwareUpgrade.typeUrl || Plan.is(o.plan) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgIBCSoftwareUpgrade.typeUrl || Plan.is(o.plan) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgIBCSoftwareUpgradeAmino { - return o && (o.$typeUrl === MsgIBCSoftwareUpgrade.typeUrl || Plan.isAmino(o.plan) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgIBCSoftwareUpgrade.typeUrl || Plan.isAmino(o.plan) && typeof o.signer === 'string'); }, encode(message: MsgIBCSoftwareUpgrade, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.plan !== undefined) { @@ -1242,7 +1242,7 @@ export const MsgIBCSoftwareUpgrade = { if (message.upgradedClientState !== undefined) { Any.encode(message.upgradedClientState, writer.uint32(18).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(26).string(message.signer); } return writer; @@ -1254,18 +1254,18 @@ export const MsgIBCSoftwareUpgrade = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 2: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.plan = Plan.decode(reader, reader.uint32()); + break; + case 2: + message.upgradedClientState = Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1274,7 +1274,7 @@ export const MsgIBCSoftwareUpgrade = { const message = createBaseMsgIBCSoftwareUpgrade(); message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgIBCSoftwareUpgradeAmino): MsgIBCSoftwareUpgrade { @@ -1294,7 +1294,7 @@ export const MsgIBCSoftwareUpgrade = { const obj: any = {}; obj.plan = message.plan ? Plan.toAmino(message.plan) : undefined; obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState) : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgIBCSoftwareUpgradeAminoMsg): MsgIBCSoftwareUpgrade { @@ -1302,7 +1302,7 @@ export const MsgIBCSoftwareUpgrade = { }, toAminoMsg(message: MsgIBCSoftwareUpgrade): MsgIBCSoftwareUpgradeAminoMsg { return { - type: "cosmos-sdk/MsgIBCSoftwareUpgrade", + type: 'cosmos-sdk/MsgIBCSoftwareUpgrade', value: MsgIBCSoftwareUpgrade.toAmino(message) }; }, @@ -1314,7 +1314,7 @@ export const MsgIBCSoftwareUpgrade = { }, toProtoMsg(message: MsgIBCSoftwareUpgrade): MsgIBCSoftwareUpgradeProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgrade", + typeUrl: '/ibc.core.client.v1.MsgIBCSoftwareUpgrade', value: MsgIBCSoftwareUpgrade.encode(message).finish() }; } @@ -1325,8 +1325,8 @@ function createBaseMsgIBCSoftwareUpgradeResponse(): MsgIBCSoftwareUpgradeRespons return {}; } export const MsgIBCSoftwareUpgradeResponse = { - typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse", - aminoType: "cosmos-sdk/MsgIBCSoftwareUpgradeResponse", + typeUrl: '/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse', + aminoType: 'cosmos-sdk/MsgIBCSoftwareUpgradeResponse', is(o: any): o is MsgIBCSoftwareUpgradeResponse { return o && o.$typeUrl === MsgIBCSoftwareUpgradeResponse.typeUrl; }, @@ -1343,9 +1343,9 @@ export const MsgIBCSoftwareUpgradeResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1367,7 +1367,7 @@ export const MsgIBCSoftwareUpgradeResponse = { }, toAminoMsg(message: MsgIBCSoftwareUpgradeResponse): MsgIBCSoftwareUpgradeResponseAminoMsg { return { - type: "cosmos-sdk/MsgIBCSoftwareUpgradeResponse", + type: 'cosmos-sdk/MsgIBCSoftwareUpgradeResponse', value: MsgIBCSoftwareUpgradeResponse.toAmino(message) }; }, @@ -1379,7 +1379,7 @@ export const MsgIBCSoftwareUpgradeResponse = { }, toProtoMsg(message: MsgIBCSoftwareUpgradeResponse): MsgIBCSoftwareUpgradeResponseProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse", + typeUrl: '/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse', value: MsgIBCSoftwareUpgradeResponse.encode(message).finish() }; } @@ -1388,21 +1388,21 @@ GlobalDecoderRegistry.register(MsgIBCSoftwareUpgradeResponse.typeUrl, MsgIBCSoft GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgradeResponse.aminoType, MsgIBCSoftwareUpgradeResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - signer: "", + signer: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/ibc.core.client.v1.MsgUpdateParams", - aminoType: "cosmos-sdk/MsgUpdateParams", + typeUrl: '/ibc.core.client.v1.MsgUpdateParams', + aminoType: 'cosmos-sdk/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(10).string(message.signer); } if (message.params !== undefined) { @@ -1417,22 +1417,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.signer = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.signer = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -1448,7 +1448,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; obj.params = message.params ? Params.toAmino(message.params) : undefined; return obj; }, @@ -1457,7 +1457,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParams", + type: 'cosmos-sdk/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -1469,7 +1469,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgUpdateParams", + typeUrl: '/ibc.core.client.v1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -1480,8 +1480,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/ibc.core.client.v1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/MsgUpdateParamsResponse", + typeUrl: '/ibc.core.client.v1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -1498,9 +1498,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1522,7 +1522,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParamsResponse", + type: 'cosmos-sdk/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -1534,7 +1534,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/ibc.core.client.v1.MsgUpdateParamsResponse", + typeUrl: '/ibc.core.client.v1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/core/commitment/v1/commitment.ts b/libs/cosmos-types/ibc/core/commitment/v1/commitment.ts index 5061d630..0663fbfa 100644 --- a/libs/cosmos-types/ibc/core/commitment/v1/commitment.ts +++ b/libs/cosmos-types/ibc/core/commitment/v1/commitment.ts @@ -1,7 +1,7 @@ -import { CommitmentProof, CommitmentProofAmino } from "../../../../cosmos/ics23/v1/proofs"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { CommitmentProof, CommitmentProofAmino } from '../../../../cosmos/ics23/v1/proofs'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; /** * MerkleRoot defines a merkle root hash. * In the Cosmos SDK, the AppHash of a block header becomes the root. @@ -10,7 +10,7 @@ export interface MerkleRoot { hash: Uint8Array; } export interface MerkleRootProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerkleRoot"; + typeUrl: '/ibc.core.commitment.v1.MerkleRoot'; value: Uint8Array; } /** @@ -21,7 +21,7 @@ export interface MerkleRootAmino { hash: string; } export interface MerkleRootAminoMsg { - type: "cosmos-sdk/MerkleRoot"; + type: 'cosmos-sdk/MerkleRoot'; value: MerkleRootAmino; } /** @@ -33,7 +33,7 @@ export interface MerklePrefix { keyPrefix: Uint8Array; } export interface MerklePrefixProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerklePrefix"; + typeUrl: '/ibc.core.commitment.v1.MerklePrefix'; value: Uint8Array; } /** @@ -45,7 +45,7 @@ export interface MerklePrefixAmino { key_prefix: string; } export interface MerklePrefixAminoMsg { - type: "cosmos-sdk/MerklePrefix"; + type: 'cosmos-sdk/MerklePrefix'; value: MerklePrefixAmino; } /** @@ -57,7 +57,7 @@ export interface MerklePath { keyPath: string[]; } export interface MerklePathProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerklePath"; + typeUrl: '/ibc.core.commitment.v1.MerklePath'; value: Uint8Array; } /** @@ -69,7 +69,7 @@ export interface MerklePathAmino { key_path: string[]; } export interface MerklePathAminoMsg { - type: "cosmos-sdk/MerklePath"; + type: 'cosmos-sdk/MerklePath'; value: MerklePathAmino; } /** @@ -83,7 +83,7 @@ export interface MerkleProof { proofs: CommitmentProof[]; } export interface MerkleProofProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerkleProof"; + typeUrl: '/ibc.core.commitment.v1.MerkleProof'; value: Uint8Array; } /** @@ -97,7 +97,7 @@ export interface MerkleProofAmino { proofs: CommitmentProofAmino[]; } export interface MerkleProofAminoMsg { - type: "cosmos-sdk/MerkleProof"; + type: 'cosmos-sdk/MerkleProof'; value: MerkleProofAmino; } function createBaseMerkleRoot(): MerkleRoot { @@ -106,13 +106,13 @@ function createBaseMerkleRoot(): MerkleRoot { }; } export const MerkleRoot = { - typeUrl: "/ibc.core.commitment.v1.MerkleRoot", - aminoType: "cosmos-sdk/MerkleRoot", + typeUrl: '/ibc.core.commitment.v1.MerkleRoot', + aminoType: 'cosmos-sdk/MerkleRoot', is(o: any): o is MerkleRoot { - return o && (o.$typeUrl === MerkleRoot.typeUrl || o.hash instanceof Uint8Array || typeof o.hash === "string"); + return o && (o.$typeUrl === MerkleRoot.typeUrl || o.hash instanceof Uint8Array || typeof o.hash === 'string'); }, isAmino(o: any): o is MerkleRootAmino { - return o && (o.$typeUrl === MerkleRoot.typeUrl || o.hash instanceof Uint8Array || typeof o.hash === "string"); + return o && (o.$typeUrl === MerkleRoot.typeUrl || o.hash instanceof Uint8Array || typeof o.hash === 'string'); }, encode(message: MerkleRoot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.hash.length !== 0) { @@ -127,12 +127,12 @@ export const MerkleRoot = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -159,7 +159,7 @@ export const MerkleRoot = { }, toAminoMsg(message: MerkleRoot): MerkleRootAminoMsg { return { - type: "cosmos-sdk/MerkleRoot", + type: 'cosmos-sdk/MerkleRoot', value: MerkleRoot.toAmino(message) }; }, @@ -171,7 +171,7 @@ export const MerkleRoot = { }, toProtoMsg(message: MerkleRoot): MerkleRootProtoMsg { return { - typeUrl: "/ibc.core.commitment.v1.MerkleRoot", + typeUrl: '/ibc.core.commitment.v1.MerkleRoot', value: MerkleRoot.encode(message).finish() }; } @@ -184,13 +184,13 @@ function createBaseMerklePrefix(): MerklePrefix { }; } export const MerklePrefix = { - typeUrl: "/ibc.core.commitment.v1.MerklePrefix", - aminoType: "cosmos-sdk/MerklePrefix", + typeUrl: '/ibc.core.commitment.v1.MerklePrefix', + aminoType: 'cosmos-sdk/MerklePrefix', is(o: any): o is MerklePrefix { - return o && (o.$typeUrl === MerklePrefix.typeUrl || o.keyPrefix instanceof Uint8Array || typeof o.keyPrefix === "string"); + return o && (o.$typeUrl === MerklePrefix.typeUrl || o.keyPrefix instanceof Uint8Array || typeof o.keyPrefix === 'string'); }, isAmino(o: any): o is MerklePrefixAmino { - return o && (o.$typeUrl === MerklePrefix.typeUrl || o.key_prefix instanceof Uint8Array || typeof o.key_prefix === "string"); + return o && (o.$typeUrl === MerklePrefix.typeUrl || o.key_prefix instanceof Uint8Array || typeof o.key_prefix === 'string'); }, encode(message: MerklePrefix, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.keyPrefix.length !== 0) { @@ -205,12 +205,12 @@ export const MerklePrefix = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyPrefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.keyPrefix = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -237,7 +237,7 @@ export const MerklePrefix = { }, toAminoMsg(message: MerklePrefix): MerklePrefixAminoMsg { return { - type: "cosmos-sdk/MerklePrefix", + type: 'cosmos-sdk/MerklePrefix', value: MerklePrefix.toAmino(message) }; }, @@ -249,7 +249,7 @@ export const MerklePrefix = { }, toProtoMsg(message: MerklePrefix): MerklePrefixProtoMsg { return { - typeUrl: "/ibc.core.commitment.v1.MerklePrefix", + typeUrl: '/ibc.core.commitment.v1.MerklePrefix', value: MerklePrefix.encode(message).finish() }; } @@ -262,13 +262,13 @@ function createBaseMerklePath(): MerklePath { }; } export const MerklePath = { - typeUrl: "/ibc.core.commitment.v1.MerklePath", - aminoType: "cosmos-sdk/MerklePath", + typeUrl: '/ibc.core.commitment.v1.MerklePath', + aminoType: 'cosmos-sdk/MerklePath', is(o: any): o is MerklePath { - return o && (o.$typeUrl === MerklePath.typeUrl || Array.isArray(o.keyPath) && (!o.keyPath.length || typeof o.keyPath[0] === "string")); + return o && (o.$typeUrl === MerklePath.typeUrl || Array.isArray(o.keyPath) && (!o.keyPath.length || typeof o.keyPath[0] === 'string')); }, isAmino(o: any): o is MerklePathAmino { - return o && (o.$typeUrl === MerklePath.typeUrl || Array.isArray(o.key_path) && (!o.key_path.length || typeof o.key_path[0] === "string")); + return o && (o.$typeUrl === MerklePath.typeUrl || Array.isArray(o.key_path) && (!o.key_path.length || typeof o.key_path[0] === 'string')); }, encode(message: MerklePath, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.keyPath) { @@ -283,12 +283,12 @@ export const MerklePath = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyPath.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.keyPath.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -317,7 +317,7 @@ export const MerklePath = { }, toAminoMsg(message: MerklePath): MerklePathAminoMsg { return { - type: "cosmos-sdk/MerklePath", + type: 'cosmos-sdk/MerklePath', value: MerklePath.toAmino(message) }; }, @@ -329,7 +329,7 @@ export const MerklePath = { }, toProtoMsg(message: MerklePath): MerklePathProtoMsg { return { - typeUrl: "/ibc.core.commitment.v1.MerklePath", + typeUrl: '/ibc.core.commitment.v1.MerklePath', value: MerklePath.encode(message).finish() }; } @@ -342,8 +342,8 @@ function createBaseMerkleProof(): MerkleProof { }; } export const MerkleProof = { - typeUrl: "/ibc.core.commitment.v1.MerkleProof", - aminoType: "cosmos-sdk/MerkleProof", + typeUrl: '/ibc.core.commitment.v1.MerkleProof', + aminoType: 'cosmos-sdk/MerkleProof', is(o: any): o is MerkleProof { return o && (o.$typeUrl === MerkleProof.typeUrl || Array.isArray(o.proofs) && (!o.proofs.length || CommitmentProof.is(o.proofs[0]))); }, @@ -363,12 +363,12 @@ export const MerkleProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.proofs.push(CommitmentProof.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.proofs.push(CommitmentProof.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -397,7 +397,7 @@ export const MerkleProof = { }, toAminoMsg(message: MerkleProof): MerkleProofAminoMsg { return { - type: "cosmos-sdk/MerkleProof", + type: 'cosmos-sdk/MerkleProof', value: MerkleProof.toAmino(message) }; }, @@ -409,7 +409,7 @@ export const MerkleProof = { }, toProtoMsg(message: MerkleProof): MerkleProofProtoMsg { return { - typeUrl: "/ibc.core.commitment.v1.MerkleProof", + typeUrl: '/ibc.core.commitment.v1.MerkleProof', value: MerkleProof.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/core/connection/v1/connection.ts b/libs/cosmos-types/ibc/core/connection/v1/connection.ts index dbd13ac9..f8d75d60 100644 --- a/libs/cosmos-types/ibc/core/connection/v1/connection.ts +++ b/libs/cosmos-types/ibc/core/connection/v1/connection.ts @@ -1,7 +1,7 @@ -import { MerklePrefix, MerklePrefixAmino } from "../../commitment/v1/commitment"; -import { isSet, DeepPartial } from "../../../../helpers"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { DeepPartial,isSet } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { MerklePrefix, MerklePrefixAmino } from '../../commitment/v1/commitment'; /** * State defines if a connection is in one of the following states: * INIT, TRYOPEN, OPEN or UNINITIALIZED. @@ -23,37 +23,37 @@ export enum State { export const StateAmino = State; export function stateFromJSON(object: any): State { switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; + case 0: + case 'STATE_UNINITIALIZED_UNSPECIFIED': + return State.STATE_UNINITIALIZED_UNSPECIFIED; + case 1: + case 'STATE_INIT': + return State.STATE_INIT; + case 2: + case 'STATE_TRYOPEN': + return State.STATE_TRYOPEN; + case 3: + case 'STATE_OPEN': + return State.STATE_OPEN; + case -1: + case 'UNRECOGNIZED': + default: + return State.UNRECOGNIZED; } } export function stateToJSON(object: State): string { switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - case State.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case State.STATE_UNINITIALIZED_UNSPECIFIED: + return 'STATE_UNINITIALIZED_UNSPECIFIED'; + case State.STATE_INIT: + return 'STATE_INIT'; + case State.STATE_TRYOPEN: + return 'STATE_TRYOPEN'; + case State.STATE_OPEN: + return 'STATE_OPEN'; + case State.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** @@ -82,7 +82,7 @@ export interface ConnectionEnd { delayPeriod: bigint; } export interface ConnectionEndProtoMsg { - typeUrl: "/ibc.core.connection.v1.ConnectionEnd"; + typeUrl: '/ibc.core.connection.v1.ConnectionEnd'; value: Uint8Array; } /** @@ -111,7 +111,7 @@ export interface ConnectionEndAmino { delay_period: string; } export interface ConnectionEndAminoMsg { - type: "cosmos-sdk/ConnectionEnd"; + type: 'cosmos-sdk/ConnectionEnd'; value: ConnectionEndAmino; } /** @@ -136,7 +136,7 @@ export interface IdentifiedConnection { delayPeriod: bigint; } export interface IdentifiedConnectionProtoMsg { - typeUrl: "/ibc.core.connection.v1.IdentifiedConnection"; + typeUrl: '/ibc.core.connection.v1.IdentifiedConnection'; value: Uint8Array; } /** @@ -161,7 +161,7 @@ export interface IdentifiedConnectionAmino { delay_period: string; } export interface IdentifiedConnectionAminoMsg { - type: "cosmos-sdk/IdentifiedConnection"; + type: 'cosmos-sdk/IdentifiedConnection'; value: IdentifiedConnectionAmino; } /** Counterparty defines the counterparty chain associated with a connection end. */ @@ -180,7 +180,7 @@ export interface Counterparty { prefix: MerklePrefix; } export interface CounterpartyProtoMsg { - typeUrl: "/ibc.core.connection.v1.Counterparty"; + typeUrl: '/ibc.core.connection.v1.Counterparty'; value: Uint8Array; } /** Counterparty defines the counterparty chain associated with a connection end. */ @@ -199,7 +199,7 @@ export interface CounterpartyAmino { prefix: MerklePrefixAmino; } export interface CounterpartyAminoMsg { - type: "cosmos-sdk/Counterparty"; + type: 'cosmos-sdk/Counterparty'; value: CounterpartyAmino; } /** ClientPaths define all the connection paths for a client state. */ @@ -208,7 +208,7 @@ export interface ClientPaths { paths: string[]; } export interface ClientPathsProtoMsg { - typeUrl: "/ibc.core.connection.v1.ClientPaths"; + typeUrl: '/ibc.core.connection.v1.ClientPaths'; value: Uint8Array; } /** ClientPaths define all the connection paths for a client state. */ @@ -217,7 +217,7 @@ export interface ClientPathsAmino { paths: string[]; } export interface ClientPathsAminoMsg { - type: "cosmos-sdk/ClientPaths"; + type: 'cosmos-sdk/ClientPaths'; value: ClientPathsAmino; } /** ConnectionPaths define all the connection paths for a given client state. */ @@ -228,7 +228,7 @@ export interface ConnectionPaths { paths: string[]; } export interface ConnectionPathsProtoMsg { - typeUrl: "/ibc.core.connection.v1.ConnectionPaths"; + typeUrl: '/ibc.core.connection.v1.ConnectionPaths'; value: Uint8Array; } /** ConnectionPaths define all the connection paths for a given client state. */ @@ -239,7 +239,7 @@ export interface ConnectionPathsAmino { paths: string[]; } export interface ConnectionPathsAminoMsg { - type: "cosmos-sdk/ConnectionPaths"; + type: 'cosmos-sdk/ConnectionPaths'; value: ConnectionPathsAmino; } /** @@ -253,7 +253,7 @@ export interface Version { features: string[]; } export interface VersionProtoMsg { - typeUrl: "/ibc.core.connection.v1.Version"; + typeUrl: '/ibc.core.connection.v1.Version'; value: Uint8Array; } /** @@ -267,7 +267,7 @@ export interface VersionAmino { features: string[]; } export interface VersionAminoMsg { - type: "cosmos-sdk/Version"; + type: 'cosmos-sdk/Version'; value: VersionAmino; } /** Params defines the set of Connection parameters. */ @@ -280,7 +280,7 @@ export interface Params { maxExpectedTimePerBlock: bigint; } export interface ParamsProtoMsg { - typeUrl: "/ibc.core.connection.v1.Params"; + typeUrl: '/ibc.core.connection.v1.Params'; value: Uint8Array; } /** Params defines the set of Connection parameters. */ @@ -293,12 +293,12 @@ export interface ParamsAmino { max_expected_time_per_block: string; } export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; + type: 'cosmos-sdk/Params'; value: ParamsAmino; } function createBaseConnectionEnd(): ConnectionEnd { return { - clientId: "", + clientId: '', versions: [], state: 0, counterparty: Counterparty.fromPartial({}), @@ -306,16 +306,16 @@ function createBaseConnectionEnd(): ConnectionEnd { }; } export const ConnectionEnd = { - typeUrl: "/ibc.core.connection.v1.ConnectionEnd", - aminoType: "cosmos-sdk/ConnectionEnd", + typeUrl: '/ibc.core.connection.v1.ConnectionEnd', + aminoType: 'cosmos-sdk/ConnectionEnd', is(o: any): o is ConnectionEnd { - return o && (o.$typeUrl === ConnectionEnd.typeUrl || typeof o.clientId === "string" && Array.isArray(o.versions) && (!o.versions.length || Version.is(o.versions[0])) && isSet(o.state) && Counterparty.is(o.counterparty) && typeof o.delayPeriod === "bigint"); + return o && (o.$typeUrl === ConnectionEnd.typeUrl || typeof o.clientId === 'string' && Array.isArray(o.versions) && (!o.versions.length || Version.is(o.versions[0])) && isSet(o.state) && Counterparty.is(o.counterparty) && typeof o.delayPeriod === 'bigint'); }, isAmino(o: any): o is ConnectionEndAmino { - return o && (o.$typeUrl === ConnectionEnd.typeUrl || typeof o.client_id === "string" && Array.isArray(o.versions) && (!o.versions.length || Version.isAmino(o.versions[0])) && isSet(o.state) && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === "bigint"); + return o && (o.$typeUrl === ConnectionEnd.typeUrl || typeof o.client_id === 'string' && Array.isArray(o.versions) && (!o.versions.length || Version.isAmino(o.versions[0])) && isSet(o.state) && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === 'bigint'); }, encode(message: ConnectionEnd, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } for (const v of message.versions) { @@ -339,31 +339,31 @@ export const ConnectionEnd = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 3: - message.state = (reader.int32() as any); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.versions.push(Version.decode(reader, reader.uint32())); + break; + case 3: + message.state = (reader.int32() as any); + break; + case 4: + message.counterparty = Counterparty.decode(reader, reader.uint32()); + break; + case 5: + message.delayPeriod = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ConnectionEnd { const message = createBaseConnectionEnd(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.versions = object.versions?.map(e => Version.fromPartial(e)) || []; message.state = object.state ?? 0; message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; @@ -389,7 +389,7 @@ export const ConnectionEnd = { }, toAmino(message: ConnectionEnd): ConnectionEndAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; if (message.versions) { obj.versions = message.versions.map(e => e ? Version.toAmino(e) : undefined); } else { @@ -405,7 +405,7 @@ export const ConnectionEnd = { }, toAminoMsg(message: ConnectionEnd): ConnectionEndAminoMsg { return { - type: "cosmos-sdk/ConnectionEnd", + type: 'cosmos-sdk/ConnectionEnd', value: ConnectionEnd.toAmino(message) }; }, @@ -417,7 +417,7 @@ export const ConnectionEnd = { }, toProtoMsg(message: ConnectionEnd): ConnectionEndProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.ConnectionEnd", + typeUrl: '/ibc.core.connection.v1.ConnectionEnd', value: ConnectionEnd.encode(message).finish() }; } @@ -426,8 +426,8 @@ GlobalDecoderRegistry.register(ConnectionEnd.typeUrl, ConnectionEnd); GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionEnd.aminoType, ConnectionEnd.typeUrl); function createBaseIdentifiedConnection(): IdentifiedConnection { return { - id: "", - clientId: "", + id: '', + clientId: '', versions: [], state: 0, counterparty: Counterparty.fromPartial({}), @@ -435,19 +435,19 @@ function createBaseIdentifiedConnection(): IdentifiedConnection { }; } export const IdentifiedConnection = { - typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", - aminoType: "cosmos-sdk/IdentifiedConnection", + typeUrl: '/ibc.core.connection.v1.IdentifiedConnection', + aminoType: 'cosmos-sdk/IdentifiedConnection', is(o: any): o is IdentifiedConnection { - return o && (o.$typeUrl === IdentifiedConnection.typeUrl || typeof o.id === "string" && typeof o.clientId === "string" && Array.isArray(o.versions) && (!o.versions.length || Version.is(o.versions[0])) && isSet(o.state) && Counterparty.is(o.counterparty) && typeof o.delayPeriod === "bigint"); + return o && (o.$typeUrl === IdentifiedConnection.typeUrl || typeof o.id === 'string' && typeof o.clientId === 'string' && Array.isArray(o.versions) && (!o.versions.length || Version.is(o.versions[0])) && isSet(o.state) && Counterparty.is(o.counterparty) && typeof o.delayPeriod === 'bigint'); }, isAmino(o: any): o is IdentifiedConnectionAmino { - return o && (o.$typeUrl === IdentifiedConnection.typeUrl || typeof o.id === "string" && typeof o.client_id === "string" && Array.isArray(o.versions) && (!o.versions.length || Version.isAmino(o.versions[0])) && isSet(o.state) && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === "bigint"); + return o && (o.$typeUrl === IdentifiedConnection.typeUrl || typeof o.id === 'string' && typeof o.client_id === 'string' && Array.isArray(o.versions) && (!o.versions.length || Version.isAmino(o.versions[0])) && isSet(o.state) && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === 'bigint'); }, encode(message: IdentifiedConnection, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== "") { + if (message.id !== '') { writer.uint32(10).string(message.id); } - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(18).string(message.clientId); } for (const v of message.versions) { @@ -471,35 +471,35 @@ export const IdentifiedConnection = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 4: - message.state = (reader.int32() as any); - break; - case 5: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 6: - message.delayPeriod = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.id = reader.string(); + break; + case 2: + message.clientId = reader.string(); + break; + case 3: + message.versions.push(Version.decode(reader, reader.uint32())); + break; + case 4: + message.state = (reader.int32() as any); + break; + case 5: + message.counterparty = Counterparty.decode(reader, reader.uint32()); + break; + case 6: + message.delayPeriod = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): IdentifiedConnection { const message = createBaseIdentifiedConnection(); - message.id = object.id ?? ""; - message.clientId = object.clientId ?? ""; + message.id = object.id ?? ''; + message.clientId = object.clientId ?? ''; message.versions = object.versions?.map(e => Version.fromPartial(e)) || []; message.state = object.state ?? 0; message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; @@ -528,8 +528,8 @@ export const IdentifiedConnection = { }, toAmino(message: IdentifiedConnection): IdentifiedConnectionAmino { const obj: any = {}; - obj.id = message.id === "" ? undefined : message.id; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.id = message.id === '' ? undefined : message.id; + obj.client_id = message.clientId === '' ? undefined : message.clientId; if (message.versions) { obj.versions = message.versions.map(e => e ? Version.toAmino(e) : undefined); } else { @@ -545,7 +545,7 @@ export const IdentifiedConnection = { }, toAminoMsg(message: IdentifiedConnection): IdentifiedConnectionAminoMsg { return { - type: "cosmos-sdk/IdentifiedConnection", + type: 'cosmos-sdk/IdentifiedConnection', value: IdentifiedConnection.toAmino(message) }; }, @@ -557,7 +557,7 @@ export const IdentifiedConnection = { }, toProtoMsg(message: IdentifiedConnection): IdentifiedConnectionProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", + typeUrl: '/ibc.core.connection.v1.IdentifiedConnection', value: IdentifiedConnection.encode(message).finish() }; } @@ -566,25 +566,25 @@ GlobalDecoderRegistry.register(IdentifiedConnection.typeUrl, IdentifiedConnectio GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedConnection.aminoType, IdentifiedConnection.typeUrl); function createBaseCounterparty(): Counterparty { return { - clientId: "", - connectionId: "", + clientId: '', + connectionId: '', prefix: MerklePrefix.fromPartial({}) }; } export const Counterparty = { - typeUrl: "/ibc.core.connection.v1.Counterparty", - aminoType: "cosmos-sdk/Counterparty", + typeUrl: '/ibc.core.connection.v1.Counterparty', + aminoType: 'cosmos-sdk/Counterparty', is(o: any): o is Counterparty { - return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.clientId === "string" && typeof o.connectionId === "string" && MerklePrefix.is(o.prefix)); + return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.clientId === 'string' && typeof o.connectionId === 'string' && MerklePrefix.is(o.prefix)); }, isAmino(o: any): o is CounterpartyAmino { - return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.client_id === "string" && typeof o.connection_id === "string" && MerklePrefix.isAmino(o.prefix)); + return o && (o.$typeUrl === Counterparty.typeUrl || typeof o.client_id === 'string' && typeof o.connection_id === 'string' && MerklePrefix.isAmino(o.prefix)); }, encode(message: Counterparty, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } - if (message.connectionId !== "") { + if (message.connectionId !== '') { writer.uint32(18).string(message.connectionId); } if (message.prefix !== undefined) { @@ -599,26 +599,26 @@ export const Counterparty = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.connectionId = reader.string(); - break; - case 3: - message.prefix = MerklePrefix.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.prefix = MerklePrefix.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Counterparty { const message = createBaseCounterparty(); - message.clientId = object.clientId ?? ""; - message.connectionId = object.connectionId ?? ""; + message.clientId = object.clientId ?? ''; + message.connectionId = object.connectionId ?? ''; message.prefix = object.prefix !== undefined && object.prefix !== null ? MerklePrefix.fromPartial(object.prefix) : undefined; return message; }, @@ -637,8 +637,8 @@ export const Counterparty = { }, toAmino(message: Counterparty): CounterpartyAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; - obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; + obj.connection_id = message.connectionId === '' ? undefined : message.connectionId; obj.prefix = message.prefix ? MerklePrefix.toAmino(message.prefix) : undefined; return obj; }, @@ -647,7 +647,7 @@ export const Counterparty = { }, toAminoMsg(message: Counterparty): CounterpartyAminoMsg { return { - type: "cosmos-sdk/Counterparty", + type: 'cosmos-sdk/Counterparty', value: Counterparty.toAmino(message) }; }, @@ -659,7 +659,7 @@ export const Counterparty = { }, toProtoMsg(message: Counterparty): CounterpartyProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.Counterparty", + typeUrl: '/ibc.core.connection.v1.Counterparty', value: Counterparty.encode(message).finish() }; } @@ -672,13 +672,13 @@ function createBaseClientPaths(): ClientPaths { }; } export const ClientPaths = { - typeUrl: "/ibc.core.connection.v1.ClientPaths", - aminoType: "cosmos-sdk/ClientPaths", + typeUrl: '/ibc.core.connection.v1.ClientPaths', + aminoType: 'cosmos-sdk/ClientPaths', is(o: any): o is ClientPaths { - return o && (o.$typeUrl === ClientPaths.typeUrl || Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === "string")); + return o && (o.$typeUrl === ClientPaths.typeUrl || Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === 'string')); }, isAmino(o: any): o is ClientPathsAmino { - return o && (o.$typeUrl === ClientPaths.typeUrl || Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === "string")); + return o && (o.$typeUrl === ClientPaths.typeUrl || Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === 'string')); }, encode(message: ClientPaths, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.paths) { @@ -693,12 +693,12 @@ export const ClientPaths = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -727,7 +727,7 @@ export const ClientPaths = { }, toAminoMsg(message: ClientPaths): ClientPathsAminoMsg { return { - type: "cosmos-sdk/ClientPaths", + type: 'cosmos-sdk/ClientPaths', value: ClientPaths.toAmino(message) }; }, @@ -739,7 +739,7 @@ export const ClientPaths = { }, toProtoMsg(message: ClientPaths): ClientPathsProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.ClientPaths", + typeUrl: '/ibc.core.connection.v1.ClientPaths', value: ClientPaths.encode(message).finish() }; } @@ -748,21 +748,21 @@ GlobalDecoderRegistry.register(ClientPaths.typeUrl, ClientPaths); GlobalDecoderRegistry.registerAminoProtoMapping(ClientPaths.aminoType, ClientPaths.typeUrl); function createBaseConnectionPaths(): ConnectionPaths { return { - clientId: "", + clientId: '', paths: [] }; } export const ConnectionPaths = { - typeUrl: "/ibc.core.connection.v1.ConnectionPaths", - aminoType: "cosmos-sdk/ConnectionPaths", + typeUrl: '/ibc.core.connection.v1.ConnectionPaths', + aminoType: 'cosmos-sdk/ConnectionPaths', is(o: any): o is ConnectionPaths { - return o && (o.$typeUrl === ConnectionPaths.typeUrl || typeof o.clientId === "string" && Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === "string")); + return o && (o.$typeUrl === ConnectionPaths.typeUrl || typeof o.clientId === 'string' && Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === 'string')); }, isAmino(o: any): o is ConnectionPathsAmino { - return o && (o.$typeUrl === ConnectionPaths.typeUrl || typeof o.client_id === "string" && Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === "string")); + return o && (o.$typeUrl === ConnectionPaths.typeUrl || typeof o.client_id === 'string' && Array.isArray(o.paths) && (!o.paths.length || typeof o.paths[0] === 'string')); }, encode(message: ConnectionPaths, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } for (const v of message.paths) { @@ -777,22 +777,22 @@ export const ConnectionPaths = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ConnectionPaths { const message = createBaseConnectionPaths(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.paths = object.paths?.map(e => e) || []; return message; }, @@ -806,7 +806,7 @@ export const ConnectionPaths = { }, toAmino(message: ConnectionPaths): ConnectionPathsAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; if (message.paths) { obj.paths = message.paths.map(e => e); } else { @@ -819,7 +819,7 @@ export const ConnectionPaths = { }, toAminoMsg(message: ConnectionPaths): ConnectionPathsAminoMsg { return { - type: "cosmos-sdk/ConnectionPaths", + type: 'cosmos-sdk/ConnectionPaths', value: ConnectionPaths.toAmino(message) }; }, @@ -831,7 +831,7 @@ export const ConnectionPaths = { }, toProtoMsg(message: ConnectionPaths): ConnectionPathsProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.ConnectionPaths", + typeUrl: '/ibc.core.connection.v1.ConnectionPaths', value: ConnectionPaths.encode(message).finish() }; } @@ -840,21 +840,21 @@ GlobalDecoderRegistry.register(ConnectionPaths.typeUrl, ConnectionPaths); GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionPaths.aminoType, ConnectionPaths.typeUrl); function createBaseVersion(): Version { return { - identifier: "", + identifier: '', features: [] }; } export const Version = { - typeUrl: "/ibc.core.connection.v1.Version", - aminoType: "cosmos-sdk/Version", + typeUrl: '/ibc.core.connection.v1.Version', + aminoType: 'cosmos-sdk/Version', is(o: any): o is Version { - return o && (o.$typeUrl === Version.typeUrl || typeof o.identifier === "string" && Array.isArray(o.features) && (!o.features.length || typeof o.features[0] === "string")); + return o && (o.$typeUrl === Version.typeUrl || typeof o.identifier === 'string' && Array.isArray(o.features) && (!o.features.length || typeof o.features[0] === 'string')); }, isAmino(o: any): o is VersionAmino { - return o && (o.$typeUrl === Version.typeUrl || typeof o.identifier === "string" && Array.isArray(o.features) && (!o.features.length || typeof o.features[0] === "string")); + return o && (o.$typeUrl === Version.typeUrl || typeof o.identifier === 'string' && Array.isArray(o.features) && (!o.features.length || typeof o.features[0] === 'string')); }, encode(message: Version, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.identifier !== "") { + if (message.identifier !== '') { writer.uint32(10).string(message.identifier); } for (const v of message.features) { @@ -869,22 +869,22 @@ export const Version = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - message.features.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.identifier = reader.string(); + break; + case 2: + message.features.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Version { const message = createBaseVersion(); - message.identifier = object.identifier ?? ""; + message.identifier = object.identifier ?? ''; message.features = object.features?.map(e => e) || []; return message; }, @@ -898,7 +898,7 @@ export const Version = { }, toAmino(message: Version): VersionAmino { const obj: any = {}; - obj.identifier = message.identifier === "" ? undefined : message.identifier; + obj.identifier = message.identifier === '' ? undefined : message.identifier; if (message.features) { obj.features = message.features.map(e => e); } else { @@ -911,7 +911,7 @@ export const Version = { }, toAminoMsg(message: Version): VersionAminoMsg { return { - type: "cosmos-sdk/Version", + type: 'cosmos-sdk/Version', value: Version.toAmino(message) }; }, @@ -923,7 +923,7 @@ export const Version = { }, toProtoMsg(message: Version): VersionProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.Version", + typeUrl: '/ibc.core.connection.v1.Version', value: Version.encode(message).finish() }; } @@ -936,13 +936,13 @@ function createBaseParams(): Params { }; } export const Params = { - typeUrl: "/ibc.core.connection.v1.Params", - aminoType: "cosmos-sdk/Params", + typeUrl: '/ibc.core.connection.v1.Params', + aminoType: 'cosmos-sdk/Params', is(o: any): o is Params { - return o && (o.$typeUrl === Params.typeUrl || typeof o.maxExpectedTimePerBlock === "bigint"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.maxExpectedTimePerBlock === 'bigint'); }, isAmino(o: any): o is ParamsAmino { - return o && (o.$typeUrl === Params.typeUrl || typeof o.max_expected_time_per_block === "bigint"); + return o && (o.$typeUrl === Params.typeUrl || typeof o.max_expected_time_per_block === 'bigint'); }, encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.maxExpectedTimePerBlock !== BigInt(0)) { @@ -957,12 +957,12 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.maxExpectedTimePerBlock = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.maxExpectedTimePerBlock = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -989,7 +989,7 @@ export const Params = { }, toAminoMsg(message: Params): ParamsAminoMsg { return { - type: "cosmos-sdk/Params", + type: 'cosmos-sdk/Params', value: Params.toAmino(message) }; }, @@ -1001,7 +1001,7 @@ export const Params = { }, toProtoMsg(message: Params): ParamsProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.Params", + typeUrl: '/ibc.core.connection.v1.Params', value: Params.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/core/connection/v1/tx.amino.ts b/libs/cosmos-types/ibc/core/connection/v1/tx.amino.ts index 719f737c..f6a3763a 100644 --- a/libs/cosmos-types/ibc/core/connection/v1/tx.amino.ts +++ b/libs/cosmos-types/ibc/core/connection/v1/tx.amino.ts @@ -1,27 +1,27 @@ -import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgUpdateParams } from "./tx"; +import { MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgConnectionOpenInit, MsgConnectionOpenTry, MsgUpdateParams } from './tx'; export const AminoConverter = { - "/ibc.core.connection.v1.MsgConnectionOpenInit": { - aminoType: "cosmos-sdk/MsgConnectionOpenInit", + '/ibc.core.connection.v1.MsgConnectionOpenInit': { + aminoType: 'cosmos-sdk/MsgConnectionOpenInit', toAmino: MsgConnectionOpenInit.toAmino, fromAmino: MsgConnectionOpenInit.fromAmino }, - "/ibc.core.connection.v1.MsgConnectionOpenTry": { - aminoType: "cosmos-sdk/MsgConnectionOpenTry", + '/ibc.core.connection.v1.MsgConnectionOpenTry': { + aminoType: 'cosmos-sdk/MsgConnectionOpenTry', toAmino: MsgConnectionOpenTry.toAmino, fromAmino: MsgConnectionOpenTry.fromAmino }, - "/ibc.core.connection.v1.MsgConnectionOpenAck": { - aminoType: "cosmos-sdk/MsgConnectionOpenAck", + '/ibc.core.connection.v1.MsgConnectionOpenAck': { + aminoType: 'cosmos-sdk/MsgConnectionOpenAck', toAmino: MsgConnectionOpenAck.toAmino, fromAmino: MsgConnectionOpenAck.fromAmino }, - "/ibc.core.connection.v1.MsgConnectionOpenConfirm": { - aminoType: "cosmos-sdk/MsgConnectionOpenConfirm", + '/ibc.core.connection.v1.MsgConnectionOpenConfirm': { + aminoType: 'cosmos-sdk/MsgConnectionOpenConfirm', toAmino: MsgConnectionOpenConfirm.toAmino, fromAmino: MsgConnectionOpenConfirm.fromAmino }, - "/ibc.core.connection.v1.MsgUpdateParams": { - aminoType: "cosmos-sdk/MsgUpdateParams", + '/ibc.core.connection.v1.MsgUpdateParams': { + aminoType: 'cosmos-sdk/MsgUpdateParams', toAmino: MsgUpdateParams.toAmino, fromAmino: MsgUpdateParams.fromAmino } diff --git a/libs/cosmos-types/ibc/core/connection/v1/tx.registry.ts b/libs/cosmos-types/ibc/core/connection/v1/tx.registry.ts index ec449d4d..1e9d03da 100644 --- a/libs/cosmos-types/ibc/core/connection/v1/tx.registry.ts +++ b/libs/cosmos-types/ibc/core/connection/v1/tx.registry.ts @@ -1,3 +1,3 @@ -import { TelescopeGeneratedType } from "../../../../types"; -import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgUpdateParams } from "./tx"; -export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [["/ibc.core.connection.v1.MsgConnectionOpenInit", MsgConnectionOpenInit], ["/ibc.core.connection.v1.MsgConnectionOpenTry", MsgConnectionOpenTry], ["/ibc.core.connection.v1.MsgConnectionOpenAck", MsgConnectionOpenAck], ["/ibc.core.connection.v1.MsgConnectionOpenConfirm", MsgConnectionOpenConfirm], ["/ibc.core.connection.v1.MsgUpdateParams", MsgUpdateParams]]; \ No newline at end of file +import { TelescopeGeneratedType } from '../../../../types'; +import { MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgConnectionOpenInit, MsgConnectionOpenTry, MsgUpdateParams } from './tx'; +export const registry: ReadonlyArray<[string, TelescopeGeneratedType]> = [['/ibc.core.connection.v1.MsgConnectionOpenInit', MsgConnectionOpenInit], ['/ibc.core.connection.v1.MsgConnectionOpenTry', MsgConnectionOpenTry], ['/ibc.core.connection.v1.MsgConnectionOpenAck', MsgConnectionOpenAck], ['/ibc.core.connection.v1.MsgConnectionOpenConfirm', MsgConnectionOpenConfirm], ['/ibc.core.connection.v1.MsgUpdateParams', MsgUpdateParams]]; \ No newline at end of file diff --git a/libs/cosmos-types/ibc/core/connection/v1/tx.rpc.msg.ts b/libs/cosmos-types/ibc/core/connection/v1/tx.rpc.msg.ts index 4150c72c..e7171a83 100644 --- a/libs/cosmos-types/ibc/core/connection/v1/tx.rpc.msg.ts +++ b/libs/cosmos-types/ibc/core/connection/v1/tx.rpc.msg.ts @@ -1,23 +1,23 @@ -import { DeliverTxResponse, StdFee, TxRpc } from "../../../../types"; -import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgUpdateParams } from "./tx"; +import { DeliverTxResponse, StdFee, TxRpc } from '../../../../types'; +import { MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgConnectionOpenInit, MsgConnectionOpenTry, MsgUpdateParams } from './tx'; /** Msg defines the ibc/connection Msg service. */ export interface Msg { /** ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */ - connectionOpenInit(signerAddress: string, message: MsgConnectionOpenInit, fee: number | StdFee | "auto", memo?: string): Promise; + connectionOpenInit(signerAddress: string, message: MsgConnectionOpenInit, fee: number | StdFee | 'auto', memo?: string): Promise; /** ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */ - connectionOpenTry(signerAddress: string, message: MsgConnectionOpenTry, fee: number | StdFee | "auto", memo?: string): Promise; + connectionOpenTry(signerAddress: string, message: MsgConnectionOpenTry, fee: number | StdFee | 'auto', memo?: string): Promise; /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ - connectionOpenAck(signerAddress: string, message: MsgConnectionOpenAck, fee: number | StdFee | "auto", memo?: string): Promise; + connectionOpenAck(signerAddress: string, message: MsgConnectionOpenAck, fee: number | StdFee | 'auto', memo?: string): Promise; /** * ConnectionOpenConfirm defines a rpc handler method for * MsgConnectionOpenConfirm. */ - connectionOpenConfirm(signerAddress: string, message: MsgConnectionOpenConfirm, fee: number | StdFee | "auto", memo?: string): Promise; + connectionOpenConfirm(signerAddress: string, message: MsgConnectionOpenConfirm, fee: number | StdFee | 'auto', memo?: string): Promise; /** * UpdateConnectionParams defines a rpc handler method for * MsgUpdateParams. */ - updateConnectionParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto", memo?: string): Promise; + updateConnectionParams(signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto', memo?: string): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: TxRpc; @@ -25,7 +25,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; } /* ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */ - connectionOpenInit = async (signerAddress: string, message: MsgConnectionOpenInit, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + connectionOpenInit = async (signerAddress: string, message: MsgConnectionOpenInit, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgConnectionOpenInit.typeUrl, value: message @@ -33,7 +33,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */ - connectionOpenTry = async (signerAddress: string, message: MsgConnectionOpenTry, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + connectionOpenTry = async (signerAddress: string, message: MsgConnectionOpenTry, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgConnectionOpenTry.typeUrl, value: message @@ -41,7 +41,7 @@ export class MsgClientImpl implements Msg { return this.rpc.signAndBroadcast!(signerAddress, data, fee, memo); }; /* ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ - connectionOpenAck = async (signerAddress: string, message: MsgConnectionOpenAck, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + connectionOpenAck = async (signerAddress: string, message: MsgConnectionOpenAck, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgConnectionOpenAck.typeUrl, value: message @@ -50,7 +50,7 @@ export class MsgClientImpl implements Msg { }; /* ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. */ - connectionOpenConfirm = async (signerAddress: string, message: MsgConnectionOpenConfirm, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + connectionOpenConfirm = async (signerAddress: string, message: MsgConnectionOpenConfirm, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgConnectionOpenConfirm.typeUrl, value: message @@ -59,7 +59,7 @@ export class MsgClientImpl implements Msg { }; /* UpdateConnectionParams defines a rpc handler method for MsgUpdateParams. */ - updateConnectionParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | "auto" = "auto", memo: string = ""): Promise => { + updateConnectionParams = async (signerAddress: string, message: MsgUpdateParams, fee: number | StdFee | 'auto' = 'auto', memo: string = ''): Promise => { const data = [{ typeUrl: MsgUpdateParams.typeUrl, value: message diff --git a/libs/cosmos-types/ibc/core/connection/v1/tx.ts b/libs/cosmos-types/ibc/core/connection/v1/tx.ts index 9cfb9902..d5fb7a93 100644 --- a/libs/cosmos-types/ibc/core/connection/v1/tx.ts +++ b/libs/cosmos-types/ibc/core/connection/v1/tx.ts @@ -1,9 +1,9 @@ -import { Counterparty, CounterpartyAmino, Version, VersionAmino } from "./connection"; -import { Any, AnyAmino } from "../../../../google/protobuf/any"; -import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../../binary'; +import { Any, AnyAmino } from '../../../../google/protobuf/any'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../../helpers'; +import { GlobalDecoderRegistry } from '../../../../registry'; +import { Height, HeightAmino, Params, ParamsAmino } from '../../client/v1/client'; +import { Counterparty, CounterpartyAmino, Version, VersionAmino } from './connection'; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to * initialize a connection with Chain B. @@ -16,7 +16,7 @@ export interface MsgConnectionOpenInit { signer: string; } export interface MsgConnectionOpenInitProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenInit'; value: Uint8Array; } /** @@ -31,7 +31,7 @@ export interface MsgConnectionOpenInitAmino { signer: string; } export interface MsgConnectionOpenInitAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenInit"; + type: 'cosmos-sdk/MsgConnectionOpenInit'; value: MsgConnectionOpenInitAmino; } /** @@ -40,7 +40,7 @@ export interface MsgConnectionOpenInitAminoMsg { */ export interface MsgConnectionOpenInitResponse {} export interface MsgConnectionOpenInitResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenInitResponse'; value: Uint8Array; } /** @@ -49,7 +49,7 @@ export interface MsgConnectionOpenInitResponseProtoMsg { */ export interface MsgConnectionOpenInitResponseAmino {} export interface MsgConnectionOpenInitResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenInitResponse"; + type: 'cosmos-sdk/MsgConnectionOpenInitResponse'; value: MsgConnectionOpenInitResponseAmino; } /** @@ -81,7 +81,7 @@ export interface MsgConnectionOpenTry { hostConsensusStateProof: Uint8Array; } export interface MsgConnectionOpenTryProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenTry'; value: Uint8Array; } /** @@ -113,19 +113,19 @@ export interface MsgConnectionOpenTryAmino { host_consensus_state_proof: string; } export interface MsgConnectionOpenTryAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenTry"; + type: 'cosmos-sdk/MsgConnectionOpenTry'; value: MsgConnectionOpenTryAmino; } /** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ export interface MsgConnectionOpenTryResponse {} export interface MsgConnectionOpenTryResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenTryResponse'; value: Uint8Array; } /** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ export interface MsgConnectionOpenTryResponseAmino {} export interface MsgConnectionOpenTryResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenTryResponse"; + type: 'cosmos-sdk/MsgConnectionOpenTryResponse'; value: MsgConnectionOpenTryResponseAmino; } /** @@ -153,7 +153,7 @@ export interface MsgConnectionOpenAck { hostConsensusStateProof: Uint8Array; } export interface MsgConnectionOpenAckProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenAck'; value: Uint8Array; } /** @@ -181,19 +181,19 @@ export interface MsgConnectionOpenAckAmino { host_consensus_state_proof: string; } export interface MsgConnectionOpenAckAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenAck"; + type: 'cosmos-sdk/MsgConnectionOpenAck'; value: MsgConnectionOpenAckAmino; } /** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ export interface MsgConnectionOpenAckResponse {} export interface MsgConnectionOpenAckResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenAckResponse'; value: Uint8Array; } /** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ export interface MsgConnectionOpenAckResponseAmino {} export interface MsgConnectionOpenAckResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenAckResponse"; + type: 'cosmos-sdk/MsgConnectionOpenAckResponse'; value: MsgConnectionOpenAckResponseAmino; } /** @@ -208,7 +208,7 @@ export interface MsgConnectionOpenConfirm { signer: string; } export interface MsgConnectionOpenConfirmProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenConfirm'; value: Uint8Array; } /** @@ -223,7 +223,7 @@ export interface MsgConnectionOpenConfirmAmino { signer: string; } export interface MsgConnectionOpenConfirmAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenConfirm"; + type: 'cosmos-sdk/MsgConnectionOpenConfirm'; value: MsgConnectionOpenConfirmAmino; } /** @@ -232,7 +232,7 @@ export interface MsgConnectionOpenConfirmAminoMsg { */ export interface MsgConnectionOpenConfirmResponse {} export interface MsgConnectionOpenConfirmResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse"; + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse'; value: Uint8Array; } /** @@ -241,7 +241,7 @@ export interface MsgConnectionOpenConfirmResponseProtoMsg { */ export interface MsgConnectionOpenConfirmResponseAmino {} export interface MsgConnectionOpenConfirmResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenConfirmResponse"; + type: 'cosmos-sdk/MsgConnectionOpenConfirmResponse'; value: MsgConnectionOpenConfirmResponseAmino; } /** MsgUpdateParams defines the sdk.Msg type to update the connection parameters. */ @@ -256,7 +256,7 @@ export interface MsgUpdateParams { params: Params; } export interface MsgUpdateParamsProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgUpdateParams"; + typeUrl: '/ibc.core.connection.v1.MsgUpdateParams'; value: Uint8Array; } /** MsgUpdateParams defines the sdk.Msg type to update the connection parameters. */ @@ -271,41 +271,41 @@ export interface MsgUpdateParamsAmino { params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { - type: "cosmos-sdk/MsgUpdateParams"; + type: 'cosmos-sdk/MsgUpdateParams'; value: MsgUpdateParamsAmino; } /** MsgUpdateParamsResponse defines the MsgUpdateParams response type. */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgUpdateParamsResponse"; + typeUrl: '/ibc.core.connection.v1.MsgUpdateParamsResponse'; value: Uint8Array; } /** MsgUpdateParamsResponse defines the MsgUpdateParams response type. */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateParamsResponse"; + type: 'cosmos-sdk/MsgUpdateParamsResponse'; value: MsgUpdateParamsResponseAmino; } function createBaseMsgConnectionOpenInit(): MsgConnectionOpenInit { return { - clientId: "", + clientId: '', counterparty: Counterparty.fromPartial({}), version: undefined, delayPeriod: BigInt(0), - signer: "" + signer: '' }; } export const MsgConnectionOpenInit = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - aminoType: "cosmos-sdk/MsgConnectionOpenInit", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenInit', + aminoType: 'cosmos-sdk/MsgConnectionOpenInit', is(o: any): o is MsgConnectionOpenInit { - return o && (o.$typeUrl === MsgConnectionOpenInit.typeUrl || typeof o.clientId === "string" && Counterparty.is(o.counterparty) && typeof o.delayPeriod === "bigint" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgConnectionOpenInit.typeUrl || typeof o.clientId === 'string' && Counterparty.is(o.counterparty) && typeof o.delayPeriod === 'bigint' && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgConnectionOpenInitAmino { - return o && (o.$typeUrl === MsgConnectionOpenInit.typeUrl || typeof o.client_id === "string" && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === "bigint" && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgConnectionOpenInit.typeUrl || typeof o.client_id === 'string' && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === 'bigint' && typeof o.signer === 'string'); }, encode(message: MsgConnectionOpenInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } if (message.counterparty !== undefined) { @@ -317,7 +317,7 @@ export const MsgConnectionOpenInit = { if (message.delayPeriod !== BigInt(0)) { writer.uint32(32).uint64(message.delayPeriod); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(42).string(message.signer); } return writer; @@ -329,35 +329,35 @@ export const MsgConnectionOpenInit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.delayPeriod = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.counterparty = Counterparty.decode(reader, reader.uint32()); + break; + case 3: + message.version = Version.decode(reader, reader.uint32()); + break; + case 4: + message.delayPeriod = reader.uint64(); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgConnectionOpenInit { const message = createBaseMsgConnectionOpenInit(); - message.clientId = object.clientId ?? ""; + message.clientId = object.clientId ?? ''; message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; message.version = object.version !== undefined && object.version !== null ? Version.fromPartial(object.version) : undefined; message.delayPeriod = object.delayPeriod !== undefined && object.delayPeriod !== null ? BigInt(object.delayPeriod.toString()) : BigInt(0); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgConnectionOpenInitAmino): MsgConnectionOpenInit { @@ -381,11 +381,11 @@ export const MsgConnectionOpenInit = { }, toAmino(message: MsgConnectionOpenInit): MsgConnectionOpenInitAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; obj.version = message.version ? Version.toAmino(message.version) : undefined; obj.delay_period = message.delayPeriod !== BigInt(0) ? message.delayPeriod.toString() : undefined; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgConnectionOpenInitAminoMsg): MsgConnectionOpenInit { @@ -393,7 +393,7 @@ export const MsgConnectionOpenInit = { }, toAminoMsg(message: MsgConnectionOpenInit): MsgConnectionOpenInitAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenInit", + type: 'cosmos-sdk/MsgConnectionOpenInit', value: MsgConnectionOpenInit.toAmino(message) }; }, @@ -405,7 +405,7 @@ export const MsgConnectionOpenInit = { }, toProtoMsg(message: MsgConnectionOpenInit): MsgConnectionOpenInitProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenInit', value: MsgConnectionOpenInit.encode(message).finish() }; } @@ -416,8 +416,8 @@ function createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitRespons return {}; } export const MsgConnectionOpenInitResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenInitResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenInitResponse', + aminoType: 'cosmos-sdk/MsgConnectionOpenInitResponse', is(o: any): o is MsgConnectionOpenInitResponse { return o && o.$typeUrl === MsgConnectionOpenInitResponse.typeUrl; }, @@ -434,9 +434,9 @@ export const MsgConnectionOpenInitResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -458,7 +458,7 @@ export const MsgConnectionOpenInitResponse = { }, toAminoMsg(message: MsgConnectionOpenInitResponse): MsgConnectionOpenInitResponseAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenInitResponse", + type: 'cosmos-sdk/MsgConnectionOpenInitResponse', value: MsgConnectionOpenInitResponse.toAmino(message) }; }, @@ -470,7 +470,7 @@ export const MsgConnectionOpenInitResponse = { }, toProtoMsg(message: MsgConnectionOpenInitResponse): MsgConnectionOpenInitResponseProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenInitResponse', value: MsgConnectionOpenInitResponse.encode(message).finish() }; } @@ -479,8 +479,8 @@ GlobalDecoderRegistry.register(MsgConnectionOpenInitResponse.typeUrl, MsgConnect GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInitResponse.aminoType, MsgConnectionOpenInitResponse.typeUrl); function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { return { - clientId: "", - previousConnectionId: "", + clientId: '', + previousConnectionId: '', clientState: undefined, counterparty: Counterparty.fromPartial({}), delayPeriod: BigInt(0), @@ -490,24 +490,24 @@ function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { proofClient: new Uint8Array(), proofConsensus: new Uint8Array(), consensusHeight: Height.fromPartial({}), - signer: "", + signer: '', hostConsensusStateProof: new Uint8Array() }; } export const MsgConnectionOpenTry = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - aminoType: "cosmos-sdk/MsgConnectionOpenTry", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenTry', + aminoType: 'cosmos-sdk/MsgConnectionOpenTry', is(o: any): o is MsgConnectionOpenTry { - return o && (o.$typeUrl === MsgConnectionOpenTry.typeUrl || typeof o.clientId === "string" && typeof o.previousConnectionId === "string" && Counterparty.is(o.counterparty) && typeof o.delayPeriod === "bigint" && Array.isArray(o.counterpartyVersions) && (!o.counterpartyVersions.length || Version.is(o.counterpartyVersions[0])) && Height.is(o.proofHeight) && (o.proofInit instanceof Uint8Array || typeof o.proofInit === "string") && (o.proofClient instanceof Uint8Array || typeof o.proofClient === "string") && (o.proofConsensus instanceof Uint8Array || typeof o.proofConsensus === "string") && Height.is(o.consensusHeight) && typeof o.signer === "string" && (o.hostConsensusStateProof instanceof Uint8Array || typeof o.hostConsensusStateProof === "string")); + return o && (o.$typeUrl === MsgConnectionOpenTry.typeUrl || typeof o.clientId === 'string' && typeof o.previousConnectionId === 'string' && Counterparty.is(o.counterparty) && typeof o.delayPeriod === 'bigint' && Array.isArray(o.counterpartyVersions) && (!o.counterpartyVersions.length || Version.is(o.counterpartyVersions[0])) && Height.is(o.proofHeight) && (o.proofInit instanceof Uint8Array || typeof o.proofInit === 'string') && (o.proofClient instanceof Uint8Array || typeof o.proofClient === 'string') && (o.proofConsensus instanceof Uint8Array || typeof o.proofConsensus === 'string') && Height.is(o.consensusHeight) && typeof o.signer === 'string' && (o.hostConsensusStateProof instanceof Uint8Array || typeof o.hostConsensusStateProof === 'string')); }, isAmino(o: any): o is MsgConnectionOpenTryAmino { - return o && (o.$typeUrl === MsgConnectionOpenTry.typeUrl || typeof o.client_id === "string" && typeof o.previous_connection_id === "string" && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === "bigint" && Array.isArray(o.counterparty_versions) && (!o.counterparty_versions.length || Version.isAmino(o.counterparty_versions[0])) && Height.isAmino(o.proof_height) && (o.proof_init instanceof Uint8Array || typeof o.proof_init === "string") && (o.proof_client instanceof Uint8Array || typeof o.proof_client === "string") && (o.proof_consensus instanceof Uint8Array || typeof o.proof_consensus === "string") && Height.isAmino(o.consensus_height) && typeof o.signer === "string" && (o.host_consensus_state_proof instanceof Uint8Array || typeof o.host_consensus_state_proof === "string")); + return o && (o.$typeUrl === MsgConnectionOpenTry.typeUrl || typeof o.client_id === 'string' && typeof o.previous_connection_id === 'string' && Counterparty.isAmino(o.counterparty) && typeof o.delay_period === 'bigint' && Array.isArray(o.counterparty_versions) && (!o.counterparty_versions.length || Version.isAmino(o.counterparty_versions[0])) && Height.isAmino(o.proof_height) && (o.proof_init instanceof Uint8Array || typeof o.proof_init === 'string') && (o.proof_client instanceof Uint8Array || typeof o.proof_client === 'string') && (o.proof_consensus instanceof Uint8Array || typeof o.proof_consensus === 'string') && Height.isAmino(o.consensus_height) && typeof o.signer === 'string' && (o.host_consensus_state_proof instanceof Uint8Array || typeof o.host_consensus_state_proof === 'string')); }, encode(message: MsgConnectionOpenTry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { + if (message.clientId !== '') { writer.uint32(10).string(message.clientId); } - if (message.previousConnectionId !== "") { + if (message.previousConnectionId !== '') { writer.uint32(18).string(message.previousConnectionId); } if (message.clientState !== undefined) { @@ -537,7 +537,7 @@ export const MsgConnectionOpenTry = { if (message.consensusHeight !== undefined) { Height.encode(message.consensusHeight, writer.uint32(90).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(98).string(message.signer); } if (message.hostConsensusStateProof.length !== 0) { @@ -552,56 +552,56 @@ export const MsgConnectionOpenTry = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.previousConnectionId = reader.string(); - break; - case 3: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = reader.uint64(); - break; - case 6: - message.counterpartyVersions.push(Version.decode(reader, reader.uint32())); - break; - case 7: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.proofInit = reader.bytes(); - break; - case 9: - message.proofClient = reader.bytes(); - break; - case 10: - message.proofConsensus = reader.bytes(); - break; - case 11: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 12: - message.signer = reader.string(); - break; - case 13: - message.hostConsensusStateProof = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.clientId = reader.string(); + break; + case 2: + message.previousConnectionId = reader.string(); + break; + case 3: + message.clientState = Any.decode(reader, reader.uint32()); + break; + case 4: + message.counterparty = Counterparty.decode(reader, reader.uint32()); + break; + case 5: + message.delayPeriod = reader.uint64(); + break; + case 6: + message.counterpartyVersions.push(Version.decode(reader, reader.uint32())); + break; + case 7: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 8: + message.proofInit = reader.bytes(); + break; + case 9: + message.proofClient = reader.bytes(); + break; + case 10: + message.proofConsensus = reader.bytes(); + break; + case 11: + message.consensusHeight = Height.decode(reader, reader.uint32()); + break; + case 12: + message.signer = reader.string(); + break; + case 13: + message.hostConsensusStateProof = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgConnectionOpenTry { const message = createBaseMsgConnectionOpenTry(); - message.clientId = object.clientId ?? ""; - message.previousConnectionId = object.previousConnectionId ?? ""; + message.clientId = object.clientId ?? ''; + message.previousConnectionId = object.previousConnectionId ?? ''; message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; message.delayPeriod = object.delayPeriod !== undefined && object.delayPeriod !== null ? BigInt(object.delayPeriod.toString()) : BigInt(0); @@ -611,7 +611,7 @@ export const MsgConnectionOpenTry = { message.proofClient = object.proofClient ?? new Uint8Array(); message.proofConsensus = object.proofConsensus ?? new Uint8Array(); message.consensusHeight = object.consensusHeight !== undefined && object.consensusHeight !== null ? Height.fromPartial(object.consensusHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; message.hostConsensusStateProof = object.hostConsensusStateProof ?? new Uint8Array(); return message; }, @@ -658,8 +658,8 @@ export const MsgConnectionOpenTry = { }, toAmino(message: MsgConnectionOpenTry): MsgConnectionOpenTryAmino { const obj: any = {}; - obj.client_id = message.clientId === "" ? undefined : message.clientId; - obj.previous_connection_id = message.previousConnectionId === "" ? undefined : message.previousConnectionId; + obj.client_id = message.clientId === '' ? undefined : message.clientId; + obj.previous_connection_id = message.previousConnectionId === '' ? undefined : message.previousConnectionId; obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; obj.delay_period = message.delayPeriod !== BigInt(0) ? message.delayPeriod.toString() : undefined; @@ -673,7 +673,7 @@ export const MsgConnectionOpenTry = { obj.proof_client = message.proofClient ? base64FromBytes(message.proofClient) : undefined; obj.proof_consensus = message.proofConsensus ? base64FromBytes(message.proofConsensus) : undefined; obj.consensus_height = message.consensusHeight ? Height.toAmino(message.consensusHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; obj.host_consensus_state_proof = message.hostConsensusStateProof ? base64FromBytes(message.hostConsensusStateProof) : undefined; return obj; }, @@ -682,7 +682,7 @@ export const MsgConnectionOpenTry = { }, toAminoMsg(message: MsgConnectionOpenTry): MsgConnectionOpenTryAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenTry", + type: 'cosmos-sdk/MsgConnectionOpenTry', value: MsgConnectionOpenTry.toAmino(message) }; }, @@ -694,7 +694,7 @@ export const MsgConnectionOpenTry = { }, toProtoMsg(message: MsgConnectionOpenTry): MsgConnectionOpenTryProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenTry', value: MsgConnectionOpenTry.encode(message).finish() }; } @@ -705,8 +705,8 @@ function createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse return {}; } export const MsgConnectionOpenTryResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenTryResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenTryResponse', + aminoType: 'cosmos-sdk/MsgConnectionOpenTryResponse', is(o: any): o is MsgConnectionOpenTryResponse { return o && o.$typeUrl === MsgConnectionOpenTryResponse.typeUrl; }, @@ -723,9 +723,9 @@ export const MsgConnectionOpenTryResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -747,7 +747,7 @@ export const MsgConnectionOpenTryResponse = { }, toAminoMsg(message: MsgConnectionOpenTryResponse): MsgConnectionOpenTryResponseAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenTryResponse", + type: 'cosmos-sdk/MsgConnectionOpenTryResponse', value: MsgConnectionOpenTryResponse.toAmino(message) }; }, @@ -759,7 +759,7 @@ export const MsgConnectionOpenTryResponse = { }, toProtoMsg(message: MsgConnectionOpenTryResponse): MsgConnectionOpenTryResponseProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenTryResponse', value: MsgConnectionOpenTryResponse.encode(message).finish() }; } @@ -768,8 +768,8 @@ GlobalDecoderRegistry.register(MsgConnectionOpenTryResponse.typeUrl, MsgConnecti GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTryResponse.aminoType, MsgConnectionOpenTryResponse.typeUrl); function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { return { - connectionId: "", - counterpartyConnectionId: "", + connectionId: '', + counterpartyConnectionId: '', version: undefined, clientState: undefined, proofHeight: Height.fromPartial({}), @@ -777,24 +777,24 @@ function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { proofClient: new Uint8Array(), proofConsensus: new Uint8Array(), consensusHeight: Height.fromPartial({}), - signer: "", + signer: '', hostConsensusStateProof: new Uint8Array() }; } export const MsgConnectionOpenAck = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - aminoType: "cosmos-sdk/MsgConnectionOpenAck", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenAck', + aminoType: 'cosmos-sdk/MsgConnectionOpenAck', is(o: any): o is MsgConnectionOpenAck { - return o && (o.$typeUrl === MsgConnectionOpenAck.typeUrl || typeof o.connectionId === "string" && typeof o.counterpartyConnectionId === "string" && Height.is(o.proofHeight) && (o.proofTry instanceof Uint8Array || typeof o.proofTry === "string") && (o.proofClient instanceof Uint8Array || typeof o.proofClient === "string") && (o.proofConsensus instanceof Uint8Array || typeof o.proofConsensus === "string") && Height.is(o.consensusHeight) && typeof o.signer === "string" && (o.hostConsensusStateProof instanceof Uint8Array || typeof o.hostConsensusStateProof === "string")); + return o && (o.$typeUrl === MsgConnectionOpenAck.typeUrl || typeof o.connectionId === 'string' && typeof o.counterpartyConnectionId === 'string' && Height.is(o.proofHeight) && (o.proofTry instanceof Uint8Array || typeof o.proofTry === 'string') && (o.proofClient instanceof Uint8Array || typeof o.proofClient === 'string') && (o.proofConsensus instanceof Uint8Array || typeof o.proofConsensus === 'string') && Height.is(o.consensusHeight) && typeof o.signer === 'string' && (o.hostConsensusStateProof instanceof Uint8Array || typeof o.hostConsensusStateProof === 'string')); }, isAmino(o: any): o is MsgConnectionOpenAckAmino { - return o && (o.$typeUrl === MsgConnectionOpenAck.typeUrl || typeof o.connection_id === "string" && typeof o.counterparty_connection_id === "string" && Height.isAmino(o.proof_height) && (o.proof_try instanceof Uint8Array || typeof o.proof_try === "string") && (o.proof_client instanceof Uint8Array || typeof o.proof_client === "string") && (o.proof_consensus instanceof Uint8Array || typeof o.proof_consensus === "string") && Height.isAmino(o.consensus_height) && typeof o.signer === "string" && (o.host_consensus_state_proof instanceof Uint8Array || typeof o.host_consensus_state_proof === "string")); + return o && (o.$typeUrl === MsgConnectionOpenAck.typeUrl || typeof o.connection_id === 'string' && typeof o.counterparty_connection_id === 'string' && Height.isAmino(o.proof_height) && (o.proof_try instanceof Uint8Array || typeof o.proof_try === 'string') && (o.proof_client instanceof Uint8Array || typeof o.proof_client === 'string') && (o.proof_consensus instanceof Uint8Array || typeof o.proof_consensus === 'string') && Height.isAmino(o.consensus_height) && typeof o.signer === 'string' && (o.host_consensus_state_proof instanceof Uint8Array || typeof o.host_consensus_state_proof === 'string')); }, encode(message: MsgConnectionOpenAck, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connectionId !== "") { + if (message.connectionId !== '') { writer.uint32(10).string(message.connectionId); } - if (message.counterpartyConnectionId !== "") { + if (message.counterpartyConnectionId !== '') { writer.uint32(18).string(message.counterpartyConnectionId); } if (message.version !== undefined) { @@ -818,7 +818,7 @@ export const MsgConnectionOpenAck = { if (message.consensusHeight !== undefined) { Height.encode(message.consensusHeight, writer.uint32(74).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(82).string(message.signer); } if (message.hostConsensusStateProof.length !== 0) { @@ -833,50 +833,50 @@ export const MsgConnectionOpenAck = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.counterpartyConnectionId = reader.string(); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 5: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 6: - message.proofTry = reader.bytes(); - break; - case 7: - message.proofClient = reader.bytes(); - break; - case 8: - message.proofConsensus = reader.bytes(); - break; - case 9: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 10: - message.signer = reader.string(); - break; - case 11: - message.hostConsensusStateProof = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.counterpartyConnectionId = reader.string(); + break; + case 3: + message.version = Version.decode(reader, reader.uint32()); + break; + case 4: + message.clientState = Any.decode(reader, reader.uint32()); + break; + case 5: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 6: + message.proofTry = reader.bytes(); + break; + case 7: + message.proofClient = reader.bytes(); + break; + case 8: + message.proofConsensus = reader.bytes(); + break; + case 9: + message.consensusHeight = Height.decode(reader, reader.uint32()); + break; + case 10: + message.signer = reader.string(); + break; + case 11: + message.hostConsensusStateProof = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgConnectionOpenAck { const message = createBaseMsgConnectionOpenAck(); - message.connectionId = object.connectionId ?? ""; - message.counterpartyConnectionId = object.counterpartyConnectionId ?? ""; + message.connectionId = object.connectionId ?? ''; + message.counterpartyConnectionId = object.counterpartyConnectionId ?? ''; message.version = object.version !== undefined && object.version !== null ? Version.fromPartial(object.version) : undefined; message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; @@ -884,7 +884,7 @@ export const MsgConnectionOpenAck = { message.proofClient = object.proofClient ?? new Uint8Array(); message.proofConsensus = object.proofConsensus ?? new Uint8Array(); message.consensusHeight = object.consensusHeight !== undefined && object.consensusHeight !== null ? Height.fromPartial(object.consensusHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; message.hostConsensusStateProof = object.hostConsensusStateProof ?? new Uint8Array(); return message; }, @@ -927,8 +927,8 @@ export const MsgConnectionOpenAck = { }, toAmino(message: MsgConnectionOpenAck): MsgConnectionOpenAckAmino { const obj: any = {}; - obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; - obj.counterparty_connection_id = message.counterpartyConnectionId === "" ? undefined : message.counterpartyConnectionId; + obj.connection_id = message.connectionId === '' ? undefined : message.connectionId; + obj.counterparty_connection_id = message.counterpartyConnectionId === '' ? undefined : message.counterpartyConnectionId; obj.version = message.version ? Version.toAmino(message.version) : undefined; obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; @@ -936,7 +936,7 @@ export const MsgConnectionOpenAck = { obj.proof_client = message.proofClient ? base64FromBytes(message.proofClient) : undefined; obj.proof_consensus = message.proofConsensus ? base64FromBytes(message.proofConsensus) : undefined; obj.consensus_height = message.consensusHeight ? Height.toAmino(message.consensusHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; obj.host_consensus_state_proof = message.hostConsensusStateProof ? base64FromBytes(message.hostConsensusStateProof) : undefined; return obj; }, @@ -945,7 +945,7 @@ export const MsgConnectionOpenAck = { }, toAminoMsg(message: MsgConnectionOpenAck): MsgConnectionOpenAckAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenAck", + type: 'cosmos-sdk/MsgConnectionOpenAck', value: MsgConnectionOpenAck.toAmino(message) }; }, @@ -957,7 +957,7 @@ export const MsgConnectionOpenAck = { }, toProtoMsg(message: MsgConnectionOpenAck): MsgConnectionOpenAckProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenAck', value: MsgConnectionOpenAck.encode(message).finish() }; } @@ -968,8 +968,8 @@ function createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse return {}; } export const MsgConnectionOpenAckResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenAckResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenAckResponse', + aminoType: 'cosmos-sdk/MsgConnectionOpenAckResponse', is(o: any): o is MsgConnectionOpenAckResponse { return o && o.$typeUrl === MsgConnectionOpenAckResponse.typeUrl; }, @@ -986,9 +986,9 @@ export const MsgConnectionOpenAckResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1010,7 +1010,7 @@ export const MsgConnectionOpenAckResponse = { }, toAminoMsg(message: MsgConnectionOpenAckResponse): MsgConnectionOpenAckResponseAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenAckResponse", + type: 'cosmos-sdk/MsgConnectionOpenAckResponse', value: MsgConnectionOpenAckResponse.toAmino(message) }; }, @@ -1022,7 +1022,7 @@ export const MsgConnectionOpenAckResponse = { }, toProtoMsg(message: MsgConnectionOpenAckResponse): MsgConnectionOpenAckResponseProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenAckResponse', value: MsgConnectionOpenAckResponse.encode(message).finish() }; } @@ -1031,23 +1031,23 @@ GlobalDecoderRegistry.register(MsgConnectionOpenAckResponse.typeUrl, MsgConnecti GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAckResponse.aminoType, MsgConnectionOpenAckResponse.typeUrl); function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { return { - connectionId: "", + connectionId: '', proofAck: new Uint8Array(), proofHeight: Height.fromPartial({}), - signer: "" + signer: '' }; } export const MsgConnectionOpenConfirm = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - aminoType: "cosmos-sdk/MsgConnectionOpenConfirm", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenConfirm', + aminoType: 'cosmos-sdk/MsgConnectionOpenConfirm', is(o: any): o is MsgConnectionOpenConfirm { - return o && (o.$typeUrl === MsgConnectionOpenConfirm.typeUrl || typeof o.connectionId === "string" && (o.proofAck instanceof Uint8Array || typeof o.proofAck === "string") && Height.is(o.proofHeight) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgConnectionOpenConfirm.typeUrl || typeof o.connectionId === 'string' && (o.proofAck instanceof Uint8Array || typeof o.proofAck === 'string') && Height.is(o.proofHeight) && typeof o.signer === 'string'); }, isAmino(o: any): o is MsgConnectionOpenConfirmAmino { - return o && (o.$typeUrl === MsgConnectionOpenConfirm.typeUrl || typeof o.connection_id === "string" && (o.proof_ack instanceof Uint8Array || typeof o.proof_ack === "string") && Height.isAmino(o.proof_height) && typeof o.signer === "string"); + return o && (o.$typeUrl === MsgConnectionOpenConfirm.typeUrl || typeof o.connection_id === 'string' && (o.proof_ack instanceof Uint8Array || typeof o.proof_ack === 'string') && Height.isAmino(o.proof_height) && typeof o.signer === 'string'); }, encode(message: MsgConnectionOpenConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connectionId !== "") { + if (message.connectionId !== '') { writer.uint32(10).string(message.connectionId); } if (message.proofAck.length !== 0) { @@ -1056,7 +1056,7 @@ export const MsgConnectionOpenConfirm = { if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); } - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(34).string(message.signer); } return writer; @@ -1068,31 +1068,31 @@ export const MsgConnectionOpenConfirm = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.proofAck = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.proofAck = reader.bytes(); + break; + case 3: + message.proofHeight = Height.decode(reader, reader.uint32()); + break; + case 4: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgConnectionOpenConfirm { const message = createBaseMsgConnectionOpenConfirm(); - message.connectionId = object.connectionId ?? ""; + message.connectionId = object.connectionId ?? ''; message.proofAck = object.proofAck ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; return message; }, fromAmino(object: MsgConnectionOpenConfirmAmino): MsgConnectionOpenConfirm { @@ -1113,10 +1113,10 @@ export const MsgConnectionOpenConfirm = { }, toAmino(message: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmAmino { const obj: any = {}; - obj.connection_id = message.connectionId === "" ? undefined : message.connectionId; + obj.connection_id = message.connectionId === '' ? undefined : message.connectionId; obj.proof_ack = message.proofAck ? base64FromBytes(message.proofAck) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; return obj; }, fromAminoMsg(object: MsgConnectionOpenConfirmAminoMsg): MsgConnectionOpenConfirm { @@ -1124,7 +1124,7 @@ export const MsgConnectionOpenConfirm = { }, toAminoMsg(message: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenConfirm", + type: 'cosmos-sdk/MsgConnectionOpenConfirm', value: MsgConnectionOpenConfirm.toAmino(message) }; }, @@ -1136,7 +1136,7 @@ export const MsgConnectionOpenConfirm = { }, toProtoMsg(message: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenConfirm', value: MsgConnectionOpenConfirm.encode(message).finish() }; } @@ -1147,8 +1147,8 @@ function createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmR return {}; } export const MsgConnectionOpenConfirmResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenConfirmResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse', + aminoType: 'cosmos-sdk/MsgConnectionOpenConfirmResponse', is(o: any): o is MsgConnectionOpenConfirmResponse { return o && o.$typeUrl === MsgConnectionOpenConfirmResponse.typeUrl; }, @@ -1165,9 +1165,9 @@ export const MsgConnectionOpenConfirmResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1189,7 +1189,7 @@ export const MsgConnectionOpenConfirmResponse = { }, toAminoMsg(message: MsgConnectionOpenConfirmResponse): MsgConnectionOpenConfirmResponseAminoMsg { return { - type: "cosmos-sdk/MsgConnectionOpenConfirmResponse", + type: 'cosmos-sdk/MsgConnectionOpenConfirmResponse', value: MsgConnectionOpenConfirmResponse.toAmino(message) }; }, @@ -1201,7 +1201,7 @@ export const MsgConnectionOpenConfirmResponse = { }, toProtoMsg(message: MsgConnectionOpenConfirmResponse): MsgConnectionOpenConfirmResponseProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", + typeUrl: '/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse', value: MsgConnectionOpenConfirmResponse.encode(message).finish() }; } @@ -1210,21 +1210,21 @@ GlobalDecoderRegistry.register(MsgConnectionOpenConfirmResponse.typeUrl, MsgConn GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirmResponse.aminoType, MsgConnectionOpenConfirmResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { - signer: "", + signer: '', params: Params.fromPartial({}) }; } export const MsgUpdateParams = { - typeUrl: "/ibc.core.connection.v1.MsgUpdateParams", - aminoType: "cosmos-sdk/MsgUpdateParams", + typeUrl: '/ibc.core.connection.v1.MsgUpdateParams', + aminoType: 'cosmos-sdk/MsgUpdateParams', is(o: any): o is MsgUpdateParams { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === "string" && Params.is(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === 'string' && Params.is(o.params)); }, isAmino(o: any): o is MsgUpdateParamsAmino { - return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === "string" && Params.isAmino(o.params)); + return o && (o.$typeUrl === MsgUpdateParams.typeUrl || typeof o.signer === 'string' && Params.isAmino(o.params)); }, encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signer !== "") { + if (message.signer !== '') { writer.uint32(10).string(message.signer); } if (message.params !== undefined) { @@ -1239,22 +1239,22 @@ export const MsgUpdateParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.signer = reader.string(); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.signer = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); - message.signer = object.signer ?? ""; + message.signer = object.signer ?? ''; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, @@ -1270,7 +1270,7 @@ export const MsgUpdateParams = { }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; - obj.signer = message.signer === "" ? undefined : message.signer; + obj.signer = message.signer === '' ? undefined : message.signer; obj.params = message.params ? Params.toAmino(message.params) : undefined; return obj; }, @@ -1279,7 +1279,7 @@ export const MsgUpdateParams = { }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParams", + type: 'cosmos-sdk/MsgUpdateParams', value: MsgUpdateParams.toAmino(message) }; }, @@ -1291,7 +1291,7 @@ export const MsgUpdateParams = { }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgUpdateParams", + typeUrl: '/ibc.core.connection.v1.MsgUpdateParams', value: MsgUpdateParams.encode(message).finish() }; } @@ -1302,8 +1302,8 @@ function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { - typeUrl: "/ibc.core.connection.v1.MsgUpdateParamsResponse", - aminoType: "cosmos-sdk/MsgUpdateParamsResponse", + typeUrl: '/ibc.core.connection.v1.MsgUpdateParamsResponse', + aminoType: 'cosmos-sdk/MsgUpdateParamsResponse', is(o: any): o is MsgUpdateParamsResponse { return o && o.$typeUrl === MsgUpdateParamsResponse.typeUrl; }, @@ -1320,9 +1320,9 @@ export const MsgUpdateParamsResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1344,7 +1344,7 @@ export const MsgUpdateParamsResponse = { }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { - type: "cosmos-sdk/MsgUpdateParamsResponse", + type: 'cosmos-sdk/MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.toAmino(message) }; }, @@ -1356,7 +1356,7 @@ export const MsgUpdateParamsResponse = { }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { - typeUrl: "/ibc.core.connection.v1.MsgUpdateParamsResponse", + typeUrl: '/ibc.core.connection.v1.MsgUpdateParamsResponse', value: MsgUpdateParamsResponse.encode(message).finish() }; } diff --git a/libs/cosmos-types/ibc/rpc.tx.ts b/libs/cosmos-types/ibc/rpc.tx.ts index 07abe50f..a828d165 100644 --- a/libs/cosmos-types/ibc/rpc.tx.ts +++ b/libs/cosmos-types/ibc/rpc.tx.ts @@ -1,4 +1,4 @@ -import { Rpc } from "../helpers"; +import { Rpc } from '../helpers'; export const createRPCMsgClient = async ({ rpc }: { @@ -6,46 +6,46 @@ export const createRPCMsgClient = async ({ }) => ({ cosmos: { authz: { - v1beta1: new (await import("../cosmos/authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/authz/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, bank: { - v1beta1: new (await import("../cosmos/bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/bank/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, distribution: { - v1beta1: new (await import("../cosmos/distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/distribution/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, feegrant: { - v1beta1: new (await import("../cosmos/feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/feegrant/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, gov: { - v1: new (await import("../cosmos/gov/v1/tx.rpc.msg")).MsgClientImpl(rpc), - v1beta1: new (await import("../cosmos/gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('../cosmos/gov/v1/tx.rpc.msg')).MsgClientImpl(rpc), + v1beta1: new (await import('../cosmos/gov/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, group: { - v1: new (await import("../cosmos/group/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('../cosmos/group/v1/tx.rpc.msg')).MsgClientImpl(rpc) }, staking: { - v1beta1: new (await import("../cosmos/staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/staking/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) }, vesting: { - v1beta1: new (await import("../cosmos/vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + v1beta1: new (await import('../cosmos/vesting/v1beta1/tx.rpc.msg')).MsgClientImpl(rpc) } }, ibc: { applications: { transfer: { - v1: new (await import("./applications/transfer/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('./applications/transfer/v1/tx.rpc.msg')).MsgClientImpl(rpc) } }, core: { channel: { - v1: new (await import("./core/channel/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('./core/channel/v1/tx.rpc.msg')).MsgClientImpl(rpc) }, client: { - v1: new (await import("./core/client/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('./core/client/v1/tx.rpc.msg')).MsgClientImpl(rpc) }, connection: { - v1: new (await import("./core/connection/v1/tx.rpc.msg")).MsgClientImpl(rpc) + v1: new (await import('./core/connection/v1/tx.rpc.msg')).MsgClientImpl(rpc) } } } diff --git a/libs/cosmos-types/index.ts b/libs/cosmos-types/index.ts index 9cbdf110..8f61a414 100644 --- a/libs/cosmos-types/index.ts +++ b/libs/cosmos-types/index.ts @@ -1,3 +1,3 @@ throw new Error( - "@interchainjs/cosmos-types have no entry-point: consult README for usage" + '@interchainjs/cosmos-types have no entry-point: consult README for usage' ); diff --git a/libs/cosmos-types/injective/types/v1beta1/account.ts b/libs/cosmos-types/injective/types/v1beta1/account.ts index 08000833..e85cb1a5 100644 --- a/libs/cosmos-types/injective/types/v1beta1/account.ts +++ b/libs/cosmos-types/injective/types/v1beta1/account.ts @@ -1,7 +1,7 @@ -import { BaseAccount, BaseAccountAmino } from "../../../cosmos/auth/v1beta1/auth"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; +import { BinaryReader, BinaryWriter } from '../../../binary'; +import { BaseAccount, BaseAccountAmino } from '../../../cosmos/auth/v1beta1/auth'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../../helpers'; +import { GlobalDecoderRegistry } from '../../../registry'; /** * EthAccount implements the authtypes.AccountI interface and embeds an * authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. @@ -11,7 +11,7 @@ export interface EthAccount { codeHash: Uint8Array; } export interface EthAccountProtoMsg { - typeUrl: "/injective.types.v1beta1.EthAccount"; + typeUrl: '/injective.types.v1beta1.EthAccount'; value: Uint8Array; } /** @@ -23,7 +23,7 @@ export interface EthAccountAmino { code_hash: string; } export interface EthAccountAminoMsg { - type: "/injective.types.v1beta1.EthAccount"; + type: '/injective.types.v1beta1.EthAccount'; value: EthAccountAmino; } function createBaseEthAccount(): EthAccount { @@ -33,12 +33,12 @@ function createBaseEthAccount(): EthAccount { }; } export const EthAccount = { - typeUrl: "/injective.types.v1beta1.EthAccount", + typeUrl: '/injective.types.v1beta1.EthAccount', is(o: any): o is EthAccount { - return o && (o.$typeUrl === EthAccount.typeUrl || o.codeHash instanceof Uint8Array || typeof o.codeHash === "string"); + return o && (o.$typeUrl === EthAccount.typeUrl || o.codeHash instanceof Uint8Array || typeof o.codeHash === 'string'); }, isAmino(o: any): o is EthAccountAmino { - return o && (o.$typeUrl === EthAccount.typeUrl || o.code_hash instanceof Uint8Array || typeof o.code_hash === "string"); + return o && (o.$typeUrl === EthAccount.typeUrl || o.code_hash instanceof Uint8Array || typeof o.code_hash === 'string'); }, encode(message: EthAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.baseAccount !== undefined) { @@ -56,15 +56,15 @@ export const EthAccount = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.codeHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.baseAccount = BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + message.codeHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -102,7 +102,7 @@ export const EthAccount = { }, toProtoMsg(message: EthAccount): EthAccountProtoMsg { return { - typeUrl: "/injective.types.v1beta1.EthAccount", + typeUrl: '/injective.types.v1beta1.EthAccount', value: EthAccount.encode(message).finish() }; } diff --git a/libs/cosmos-types/package.json b/libs/cosmos-types/package.json index efabea7c..56b462bf 100644 --- a/libs/cosmos-types/package.json +++ b/libs/cosmos-types/package.json @@ -18,10 +18,11 @@ }, "scripts": { "copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist", - "clean": "del dist/**", + "clean": "rimraf dist/**", + "prepare": "npm run build", "build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy", - "lint": "eslint . --fix", - "prepare": "npm run build" + "build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy", + "lint": "eslint . --fix" }, "dependencies": { "@interchainjs/types": "0.0.1-beta.2", @@ -32,4 +33,4 @@ "blockchain", "query" ] -} +} \ No newline at end of file diff --git a/libs/cosmos-types/registry.ts b/libs/cosmos-types/registry.ts index 8f3a958f..95ce0029 100644 --- a/libs/cosmos-types/registry.ts +++ b/libs/cosmos-types/registry.ts @@ -4,9 +4,9 @@ * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ -import { BinaryReader } from "./binary"; -import { Any, AnyAmino } from "./google/protobuf/any"; -import { IProtoType, TelescopeGeneratedCodec } from "./types"; +import { BinaryReader } from './binary'; +import { Any, AnyAmino } from './google/protobuf/any'; +import { IProtoType, TelescopeGeneratedCodec } from './types'; export class GlobalDecoderRegistry { static registry: { diff --git a/libs/cosmos-types/service-ops.ts b/libs/cosmos-types/service-ops.ts index e7a682dd..bbd9b844 100644 --- a/libs/cosmos-types/service-ops.ts +++ b/libs/cosmos-types/service-ops.ts @@ -1,16 +1,16 @@ -import { TxRpc } from "./types"; -import * as _CosmosAuthV1beta1Queryrpc from "./cosmos/auth/v1beta1/query.rpc.Query"; -import * as _CosmosBankV1beta1Queryrpc from "./cosmos/bank/v1beta1/query.rpc.Query"; -import * as _CosmosGovV1beta1Queryrpc from "./cosmos/gov/v1beta1/query.rpc.Query"; -import * as _CosmosStakingV1beta1Queryrpc from "./cosmos/staking/v1beta1/query.rpc.Query"; -import * as _CosmwasmWasmV1Queryrpc from "./cosmwasm/wasm/v1/query.rpc.Query"; -import * as _CosmosAuthzV1beta1Txrpc from "./cosmos/authz/v1beta1/tx.rpc.msg"; -import * as _CosmosBankV1beta1Txrpc from "./cosmos/bank/v1beta1/tx.rpc.msg"; -import * as _CosmosDistributionV1beta1Txrpc from "./cosmos/distribution/v1beta1/tx.rpc.msg"; -import * as _CosmosGovV1beta1Txrpc from "./cosmos/gov/v1beta1/tx.rpc.msg"; -import * as _CosmosStakingV1beta1Txrpc from "./cosmos/staking/v1beta1/tx.rpc.msg"; -import * as _IbcApplicationsTransferV1Txrpc from "./ibc/applications/transfer/v1/tx.rpc.msg"; -import * as _CosmwasmWasmV1Txrpc from "./cosmwasm/wasm/v1/tx.rpc.msg"; +import * as _CosmosAuthV1beta1Queryrpc from './cosmos/auth/v1beta1/query.rpc.Query'; +import * as _CosmosAuthzV1beta1Txrpc from './cosmos/authz/v1beta1/tx.rpc.msg'; +import * as _CosmosBankV1beta1Queryrpc from './cosmos/bank/v1beta1/query.rpc.Query'; +import * as _CosmosBankV1beta1Txrpc from './cosmos/bank/v1beta1/tx.rpc.msg'; +import * as _CosmosDistributionV1beta1Txrpc from './cosmos/distribution/v1beta1/tx.rpc.msg'; +import * as _CosmosGovV1beta1Queryrpc from './cosmos/gov/v1beta1/query.rpc.Query'; +import * as _CosmosGovV1beta1Txrpc from './cosmos/gov/v1beta1/tx.rpc.msg'; +import * as _CosmosStakingV1beta1Queryrpc from './cosmos/staking/v1beta1/query.rpc.Query'; +import * as _CosmosStakingV1beta1Txrpc from './cosmos/staking/v1beta1/tx.rpc.msg'; +import * as _CosmwasmWasmV1Queryrpc from './cosmwasm/wasm/v1/query.rpc.Query'; +import * as _CosmwasmWasmV1Txrpc from './cosmwasm/wasm/v1/tx.rpc.msg'; +import * as _IbcApplicationsTransferV1Txrpc from './ibc/applications/transfer/v1/tx.rpc.msg'; +import { TxRpc } from './types'; export interface QueryImpl extends _CosmosAuthV1beta1Queryrpc.QueryImpl, _CosmosBankV1beta1Queryrpc.QueryImpl, _CosmosGovV1beta1Queryrpc.QueryImpl, _CosmosStakingV1beta1Queryrpc.QueryImpl, _CosmwasmWasmV1Queryrpc.QueryImpl {} export class QueryImpl { rpc: TxRpc; diff --git a/libs/cosmos-types/stargate.ts b/libs/cosmos-types/stargate.ts index 13bae895..bab8c63d 100644 --- a/libs/cosmos-types/stargate.ts +++ b/libs/cosmos-types/stargate.ts @@ -1,28 +1,28 @@ -import { MsgExec, MsgGrant, MsgRevoke } from "./cosmos/authz/v1beta1/tx"; -import { MsgMultiSend, MsgSend } from "./cosmos/bank/v1beta1/tx"; +import { MsgExec, MsgGrant, MsgRevoke } from './cosmos/authz/v1beta1/tx'; +import { MsgMultiSend, MsgSend } from './cosmos/bank/v1beta1/tx'; import { MsgFundCommunityPool, MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, -} from "./cosmos/distribution/v1beta1/tx"; +} from './cosmos/distribution/v1beta1/tx'; import { MsgGrantAllowance, MsgRevokeAllowance, -} from "./cosmos/feegrant/v1beta1/tx"; +} from './cosmos/feegrant/v1beta1/tx'; import { MsgDeposit as MsgDepositV1, MsgExecLegacyContent as MsgExecLegacyContentV1, MsgSubmitProposal as MsgSubmitProposalV1, MsgVote as MsgVoteV1, MsgVoteWeighted as MsgVoteWeightedV1, -} from "./cosmos/gov/v1/tx"; +} from './cosmos/gov/v1/tx'; import { MsgDeposit, MsgSubmitProposal, MsgVote, MsgVoteWeighted, -} from "./cosmos/gov/v1beta1/tx"; +} from './cosmos/gov/v1beta1/tx'; import { MsgCreateGroup, MsgCreateGroupPolicy, @@ -38,16 +38,16 @@ import { MsgUpdateGroupPolicyMetadata, MsgVote as MsgGroupVote, MsgWithdrawProposal, -} from "./cosmos/group/v1/tx"; +} from './cosmos/group/v1/tx'; import { MsgBeginRedelegate, MsgCreateValidator, MsgDelegate, MsgEditValidator, MsgUndelegate, -} from "./cosmos/staking/v1beta1/tx"; -import { MsgCreateVestingAccount } from "./cosmos/vesting/v1beta1/tx"; -import { MsgTransfer } from "./ibc/applications/transfer/v1/tx"; +} from './cosmos/staking/v1beta1/tx'; +import { MsgCreateVestingAccount } from './cosmos/vesting/v1beta1/tx'; +import { MsgTransfer } from './ibc/applications/transfer/v1/tx'; import { MsgChannelCloseConfirm, MsgChannelCloseInit, @@ -58,19 +58,19 @@ import { MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, -} from "./ibc/core/channel/v1/tx"; +} from './ibc/core/channel/v1/tx'; import { MsgCreateClient, MsgSubmitMisbehaviour, MsgUpdateClient, MsgUpgradeClient, -} from "./ibc/core/client/v1/tx"; +} from './ibc/core/client/v1/tx'; import { MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgConnectionOpenInit, MsgConnectionOpenTry, -} from "./ibc/core/connection/v1/tx"; +} from './ibc/core/connection/v1/tx'; const AuthzMsgs = [MsgGrant, MsgExec, MsgRevoke]; const BankMsgs = [MsgSend, MsgMultiSend]; diff --git a/libs/cosmos-types/tendermint/abci/types.ts b/libs/cosmos-types/tendermint/abci/types.ts index b4136dea..6b0ebede 100644 --- a/libs/cosmos-types/tendermint/abci/types.ts +++ b/libs/cosmos-types/tendermint/abci/types.ts @@ -1,11 +1,11 @@ -import { Timestamp } from "../../google/protobuf/timestamp"; -import { ConsensusParams, ConsensusParamsAmino } from "../types/params"; -import { ProofOps, ProofOpsAmino } from "../crypto/proof"; -import { PublicKey, PublicKeyAmino } from "../crypto/keys"; -import { BlockIDFlag } from "../types/validator"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { Timestamp } from '../../google/protobuf/timestamp'; +import { base64FromBytes, bytesFromBase64, DeepPartial, fromTimestamp, isSet,toTimestamp } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; +import { PublicKey, PublicKeyAmino } from '../crypto/keys'; +import { ProofOps, ProofOpsAmino } from '../crypto/proof'; +import { ConsensusParams, ConsensusParamsAmino } from '../types/params'; +import { BlockIDFlag } from '../types/validator'; export enum CheckTxType { NEW = 0, RECHECK = 1, @@ -14,27 +14,27 @@ export enum CheckTxType { export const CheckTxTypeAmino = CheckTxType; export function checkTxTypeFromJSON(object: any): CheckTxType { switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; + case 0: + case 'NEW': + return CheckTxType.NEW; + case 1: + case 'RECHECK': + return CheckTxType.RECHECK; + case -1: + case 'UNRECOGNIZED': + default: + return CheckTxType.UNRECOGNIZED; } } export function checkTxTypeToJSON(object: CheckTxType): string { switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - case CheckTxType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case CheckTxType.NEW: + return 'NEW'; + case CheckTxType.RECHECK: + return 'RECHECK'; + case CheckTxType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum ResponseOfferSnapshot_Result { @@ -55,47 +55,47 @@ export enum ResponseOfferSnapshot_Result { export const ResponseOfferSnapshot_ResultAmino = ResponseOfferSnapshot_Result; export function responseOfferSnapshot_ResultFromJSON(object: any): ResponseOfferSnapshot_Result { switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; + case 0: + case 'UNKNOWN': + return ResponseOfferSnapshot_Result.UNKNOWN; + case 1: + case 'ACCEPT': + return ResponseOfferSnapshot_Result.ACCEPT; + case 2: + case 'ABORT': + return ResponseOfferSnapshot_Result.ABORT; + case 3: + case 'REJECT': + return ResponseOfferSnapshot_Result.REJECT; + case 4: + case 'REJECT_FORMAT': + return ResponseOfferSnapshot_Result.REJECT_FORMAT; + case 5: + case 'REJECT_SENDER': + return ResponseOfferSnapshot_Result.REJECT_SENDER; + case -1: + case 'UNRECOGNIZED': + default: + return ResponseOfferSnapshot_Result.UNRECOGNIZED; } } export function responseOfferSnapshot_ResultToJSON(object: ResponseOfferSnapshot_Result): string { switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - case ResponseOfferSnapshot_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ResponseOfferSnapshot_Result.UNKNOWN: + return 'UNKNOWN'; + case ResponseOfferSnapshot_Result.ACCEPT: + return 'ACCEPT'; + case ResponseOfferSnapshot_Result.ABORT: + return 'ABORT'; + case ResponseOfferSnapshot_Result.REJECT: + return 'REJECT'; + case ResponseOfferSnapshot_Result.REJECT_FORMAT: + return 'REJECT_FORMAT'; + case ResponseOfferSnapshot_Result.REJECT_SENDER: + return 'REJECT_SENDER'; + case ResponseOfferSnapshot_Result.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum ResponseApplySnapshotChunk_Result { @@ -116,47 +116,47 @@ export enum ResponseApplySnapshotChunk_Result { export const ResponseApplySnapshotChunk_ResultAmino = ResponseApplySnapshotChunk_Result; export function responseApplySnapshotChunk_ResultFromJSON(object: any): ResponseApplySnapshotChunk_Result { switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; + case 0: + case 'UNKNOWN': + return ResponseApplySnapshotChunk_Result.UNKNOWN; + case 1: + case 'ACCEPT': + return ResponseApplySnapshotChunk_Result.ACCEPT; + case 2: + case 'ABORT': + return ResponseApplySnapshotChunk_Result.ABORT; + case 3: + case 'RETRY': + return ResponseApplySnapshotChunk_Result.RETRY; + case 4: + case 'RETRY_SNAPSHOT': + return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; + case 5: + case 'REJECT_SNAPSHOT': + return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; + case -1: + case 'UNRECOGNIZED': + default: + return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; } } export function responseApplySnapshotChunk_ResultToJSON(object: ResponseApplySnapshotChunk_Result): string { switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ResponseApplySnapshotChunk_Result.UNKNOWN: + return 'UNKNOWN'; + case ResponseApplySnapshotChunk_Result.ACCEPT: + return 'ACCEPT'; + case ResponseApplySnapshotChunk_Result.ABORT: + return 'ABORT'; + case ResponseApplySnapshotChunk_Result.RETRY: + return 'RETRY'; + case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: + return 'RETRY_SNAPSHOT'; + case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: + return 'REJECT_SNAPSHOT'; + case ResponseApplySnapshotChunk_Result.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum ResponseProcessProposal_ProposalStatus { @@ -168,32 +168,32 @@ export enum ResponseProcessProposal_ProposalStatus { export const ResponseProcessProposal_ProposalStatusAmino = ResponseProcessProposal_ProposalStatus; export function responseProcessProposal_ProposalStatusFromJSON(object: any): ResponseProcessProposal_ProposalStatus { switch (object) { - case 0: - case "UNKNOWN": - return ResponseProcessProposal_ProposalStatus.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseProcessProposal_ProposalStatus.ACCEPT; - case 2: - case "REJECT": - return ResponseProcessProposal_ProposalStatus.REJECT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseProcessProposal_ProposalStatus.UNRECOGNIZED; + case 0: + case 'UNKNOWN': + return ResponseProcessProposal_ProposalStatus.UNKNOWN; + case 1: + case 'ACCEPT': + return ResponseProcessProposal_ProposalStatus.ACCEPT; + case 2: + case 'REJECT': + return ResponseProcessProposal_ProposalStatus.REJECT; + case -1: + case 'UNRECOGNIZED': + default: + return ResponseProcessProposal_ProposalStatus.UNRECOGNIZED; } } export function responseProcessProposal_ProposalStatusToJSON(object: ResponseProcessProposal_ProposalStatus): string { switch (object) { - case ResponseProcessProposal_ProposalStatus.UNKNOWN: - return "UNKNOWN"; - case ResponseProcessProposal_ProposalStatus.ACCEPT: - return "ACCEPT"; - case ResponseProcessProposal_ProposalStatus.REJECT: - return "REJECT"; - case ResponseProcessProposal_ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ResponseProcessProposal_ProposalStatus.UNKNOWN: + return 'UNKNOWN'; + case ResponseProcessProposal_ProposalStatus.ACCEPT: + return 'ACCEPT'; + case ResponseProcessProposal_ProposalStatus.REJECT: + return 'REJECT'; + case ResponseProcessProposal_ProposalStatus.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum ResponseVerifyVoteExtension_VerifyStatus { @@ -211,32 +211,32 @@ export enum ResponseVerifyVoteExtension_VerifyStatus { export const ResponseVerifyVoteExtension_VerifyStatusAmino = ResponseVerifyVoteExtension_VerifyStatus; export function responseVerifyVoteExtension_VerifyStatusFromJSON(object: any): ResponseVerifyVoteExtension_VerifyStatus { switch (object) { - case 0: - case "UNKNOWN": - return ResponseVerifyVoteExtension_VerifyStatus.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseVerifyVoteExtension_VerifyStatus.ACCEPT; - case 2: - case "REJECT": - return ResponseVerifyVoteExtension_VerifyStatus.REJECT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseVerifyVoteExtension_VerifyStatus.UNRECOGNIZED; + case 0: + case 'UNKNOWN': + return ResponseVerifyVoteExtension_VerifyStatus.UNKNOWN; + case 1: + case 'ACCEPT': + return ResponseVerifyVoteExtension_VerifyStatus.ACCEPT; + case 2: + case 'REJECT': + return ResponseVerifyVoteExtension_VerifyStatus.REJECT; + case -1: + case 'UNRECOGNIZED': + default: + return ResponseVerifyVoteExtension_VerifyStatus.UNRECOGNIZED; } } export function responseVerifyVoteExtension_VerifyStatusToJSON(object: ResponseVerifyVoteExtension_VerifyStatus): string { switch (object) { - case ResponseVerifyVoteExtension_VerifyStatus.UNKNOWN: - return "UNKNOWN"; - case ResponseVerifyVoteExtension_VerifyStatus.ACCEPT: - return "ACCEPT"; - case ResponseVerifyVoteExtension_VerifyStatus.REJECT: - return "REJECT"; - case ResponseVerifyVoteExtension_VerifyStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case ResponseVerifyVoteExtension_VerifyStatus.UNKNOWN: + return 'UNKNOWN'; + case ResponseVerifyVoteExtension_VerifyStatus.ACCEPT: + return 'ACCEPT'; + case ResponseVerifyVoteExtension_VerifyStatus.REJECT: + return 'REJECT'; + case ResponseVerifyVoteExtension_VerifyStatus.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export enum MisbehaviorType { @@ -248,32 +248,32 @@ export enum MisbehaviorType { export const MisbehaviorTypeAmino = MisbehaviorType; export function misbehaviorTypeFromJSON(object: any): MisbehaviorType { switch (object) { - case 0: - case "UNKNOWN": - return MisbehaviorType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return MisbehaviorType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return MisbehaviorType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return MisbehaviorType.UNRECOGNIZED; + case 0: + case 'UNKNOWN': + return MisbehaviorType.UNKNOWN; + case 1: + case 'DUPLICATE_VOTE': + return MisbehaviorType.DUPLICATE_VOTE; + case 2: + case 'LIGHT_CLIENT_ATTACK': + return MisbehaviorType.LIGHT_CLIENT_ATTACK; + case -1: + case 'UNRECOGNIZED': + default: + return MisbehaviorType.UNRECOGNIZED; } } export function misbehaviorTypeToJSON(object: MisbehaviorType): string { switch (object) { - case MisbehaviorType.UNKNOWN: - return "UNKNOWN"; - case MisbehaviorType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case MisbehaviorType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - case MisbehaviorType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case MisbehaviorType.UNKNOWN: + return 'UNKNOWN'; + case MisbehaviorType.DUPLICATE_VOTE: + return 'DUPLICATE_VOTE'; + case MisbehaviorType.LIGHT_CLIENT_ATTACK: + return 'LIGHT_CLIENT_ATTACK'; + case MisbehaviorType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export interface Request { @@ -295,7 +295,7 @@ export interface Request { finalizeBlock?: RequestFinalizeBlock; } export interface RequestProtoMsg { - typeUrl: "/tendermint.abci.Request"; + typeUrl: '/tendermint.abci.Request'; value: Uint8Array; } export interface RequestAmino { @@ -317,31 +317,31 @@ export interface RequestAmino { finalize_block?: RequestFinalizeBlockAmino; } export interface RequestAminoMsg { - type: "/tendermint.abci.Request"; + type: '/tendermint.abci.Request'; value: RequestAmino; } export interface RequestEcho { message: string; } export interface RequestEchoProtoMsg { - typeUrl: "/tendermint.abci.RequestEcho"; + typeUrl: '/tendermint.abci.RequestEcho'; value: Uint8Array; } export interface RequestEchoAmino { message: string; } export interface RequestEchoAminoMsg { - type: "/tendermint.abci.RequestEcho"; + type: '/tendermint.abci.RequestEcho'; value: RequestEchoAmino; } export interface RequestFlush {} export interface RequestFlushProtoMsg { - typeUrl: "/tendermint.abci.RequestFlush"; + typeUrl: '/tendermint.abci.RequestFlush'; value: Uint8Array; } export interface RequestFlushAmino {} export interface RequestFlushAminoMsg { - type: "/tendermint.abci.RequestFlush"; + type: '/tendermint.abci.RequestFlush'; value: RequestFlushAmino; } export interface RequestInfo { @@ -351,7 +351,7 @@ export interface RequestInfo { abciVersion: string; } export interface RequestInfoProtoMsg { - typeUrl: "/tendermint.abci.RequestInfo"; + typeUrl: '/tendermint.abci.RequestInfo'; value: Uint8Array; } export interface RequestInfoAmino { @@ -361,7 +361,7 @@ export interface RequestInfoAmino { abci_version: string; } export interface RequestInfoAminoMsg { - type: "/tendermint.abci.RequestInfo"; + type: '/tendermint.abci.RequestInfo'; value: RequestInfoAmino; } export interface RequestInitChain { @@ -373,7 +373,7 @@ export interface RequestInitChain { initialHeight: bigint; } export interface RequestInitChainProtoMsg { - typeUrl: "/tendermint.abci.RequestInitChain"; + typeUrl: '/tendermint.abci.RequestInitChain'; value: Uint8Array; } export interface RequestInitChainAmino { @@ -385,7 +385,7 @@ export interface RequestInitChainAmino { initial_height: string; } export interface RequestInitChainAminoMsg { - type: "/tendermint.abci.RequestInitChain"; + type: '/tendermint.abci.RequestInitChain'; value: RequestInitChainAmino; } export interface RequestQuery { @@ -395,7 +395,7 @@ export interface RequestQuery { prove: boolean; } export interface RequestQueryProtoMsg { - typeUrl: "/tendermint.abci.RequestQuery"; + typeUrl: '/tendermint.abci.RequestQuery'; value: Uint8Array; } export interface RequestQueryAmino { @@ -405,7 +405,7 @@ export interface RequestQueryAmino { prove: boolean; } export interface RequestQueryAminoMsg { - type: "/tendermint.abci.RequestQuery"; + type: '/tendermint.abci.RequestQuery'; value: RequestQueryAmino; } export interface RequestCheckTx { @@ -413,7 +413,7 @@ export interface RequestCheckTx { type: CheckTxType; } export interface RequestCheckTxProtoMsg { - typeUrl: "/tendermint.abci.RequestCheckTx"; + typeUrl: '/tendermint.abci.RequestCheckTx'; value: Uint8Array; } export interface RequestCheckTxAmino { @@ -421,29 +421,29 @@ export interface RequestCheckTxAmino { type: CheckTxType; } export interface RequestCheckTxAminoMsg { - type: "/tendermint.abci.RequestCheckTx"; + type: '/tendermint.abci.RequestCheckTx'; value: RequestCheckTxAmino; } export interface RequestCommit {} export interface RequestCommitProtoMsg { - typeUrl: "/tendermint.abci.RequestCommit"; + typeUrl: '/tendermint.abci.RequestCommit'; value: Uint8Array; } export interface RequestCommitAmino {} export interface RequestCommitAminoMsg { - type: "/tendermint.abci.RequestCommit"; + type: '/tendermint.abci.RequestCommit'; value: RequestCommitAmino; } /** lists available snapshots */ export interface RequestListSnapshots {} export interface RequestListSnapshotsProtoMsg { - typeUrl: "/tendermint.abci.RequestListSnapshots"; + typeUrl: '/tendermint.abci.RequestListSnapshots'; value: Uint8Array; } /** lists available snapshots */ export interface RequestListSnapshotsAmino {} export interface RequestListSnapshotsAminoMsg { - type: "/tendermint.abci.RequestListSnapshots"; + type: '/tendermint.abci.RequestListSnapshots'; value: RequestListSnapshotsAmino; } /** offers a snapshot to the application */ @@ -454,7 +454,7 @@ export interface RequestOfferSnapshot { appHash: Uint8Array; } export interface RequestOfferSnapshotProtoMsg { - typeUrl: "/tendermint.abci.RequestOfferSnapshot"; + typeUrl: '/tendermint.abci.RequestOfferSnapshot'; value: Uint8Array; } /** offers a snapshot to the application */ @@ -465,7 +465,7 @@ export interface RequestOfferSnapshotAmino { app_hash: string; } export interface RequestOfferSnapshotAminoMsg { - type: "/tendermint.abci.RequestOfferSnapshot"; + type: '/tendermint.abci.RequestOfferSnapshot'; value: RequestOfferSnapshotAmino; } /** loads a snapshot chunk */ @@ -475,7 +475,7 @@ export interface RequestLoadSnapshotChunk { chunk: number; } export interface RequestLoadSnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk"; + typeUrl: '/tendermint.abci.RequestLoadSnapshotChunk'; value: Uint8Array; } /** loads a snapshot chunk */ @@ -485,7 +485,7 @@ export interface RequestLoadSnapshotChunkAmino { chunk: number; } export interface RequestLoadSnapshotChunkAminoMsg { - type: "/tendermint.abci.RequestLoadSnapshotChunk"; + type: '/tendermint.abci.RequestLoadSnapshotChunk'; value: RequestLoadSnapshotChunkAmino; } /** Applies a snapshot chunk */ @@ -495,7 +495,7 @@ export interface RequestApplySnapshotChunk { sender: string; } export interface RequestApplySnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.RequestApplySnapshotChunk"; + typeUrl: '/tendermint.abci.RequestApplySnapshotChunk'; value: Uint8Array; } /** Applies a snapshot chunk */ @@ -505,7 +505,7 @@ export interface RequestApplySnapshotChunkAmino { sender: string; } export interface RequestApplySnapshotChunkAminoMsg { - type: "/tendermint.abci.RequestApplySnapshotChunk"; + type: '/tendermint.abci.RequestApplySnapshotChunk'; value: RequestApplySnapshotChunkAmino; } export interface RequestPrepareProposal { @@ -525,7 +525,7 @@ export interface RequestPrepareProposal { proposerAddress: Uint8Array; } export interface RequestPrepareProposalProtoMsg { - typeUrl: "/tendermint.abci.RequestPrepareProposal"; + typeUrl: '/tendermint.abci.RequestPrepareProposal'; value: Uint8Array; } export interface RequestPrepareProposalAmino { @@ -545,7 +545,7 @@ export interface RequestPrepareProposalAmino { proposer_address: string; } export interface RequestPrepareProposalAminoMsg { - type: "/tendermint.abci.RequestPrepareProposal"; + type: '/tendermint.abci.RequestPrepareProposal'; value: RequestPrepareProposalAmino; } export interface RequestProcessProposal { @@ -561,7 +561,7 @@ export interface RequestProcessProposal { proposerAddress: Uint8Array; } export interface RequestProcessProposalProtoMsg { - typeUrl: "/tendermint.abci.RequestProcessProposal"; + typeUrl: '/tendermint.abci.RequestProcessProposal'; value: Uint8Array; } export interface RequestProcessProposalAmino { @@ -577,7 +577,7 @@ export interface RequestProcessProposalAmino { proposer_address: string; } export interface RequestProcessProposalAminoMsg { - type: "/tendermint.abci.RequestProcessProposal"; + type: '/tendermint.abci.RequestProcessProposal'; value: RequestProcessProposalAmino; } /** Extends a vote with application-injected data */ @@ -596,7 +596,7 @@ export interface RequestExtendVote { proposerAddress: Uint8Array; } export interface RequestExtendVoteProtoMsg { - typeUrl: "/tendermint.abci.RequestExtendVote"; + typeUrl: '/tendermint.abci.RequestExtendVote'; value: Uint8Array; } /** Extends a vote with application-injected data */ @@ -615,7 +615,7 @@ export interface RequestExtendVoteAmino { proposer_address: string; } export interface RequestExtendVoteAminoMsg { - type: "/tendermint.abci.RequestExtendVote"; + type: '/tendermint.abci.RequestExtendVote'; value: RequestExtendVoteAmino; } /** Verify the vote extension */ @@ -628,7 +628,7 @@ export interface RequestVerifyVoteExtension { voteExtension: Uint8Array; } export interface RequestVerifyVoteExtensionProtoMsg { - typeUrl: "/tendermint.abci.RequestVerifyVoteExtension"; + typeUrl: '/tendermint.abci.RequestVerifyVoteExtension'; value: Uint8Array; } /** Verify the vote extension */ @@ -641,7 +641,7 @@ export interface RequestVerifyVoteExtensionAmino { vote_extension: string; } export interface RequestVerifyVoteExtensionAminoMsg { - type: "/tendermint.abci.RequestVerifyVoteExtension"; + type: '/tendermint.abci.RequestVerifyVoteExtension'; value: RequestVerifyVoteExtensionAmino; } export interface RequestFinalizeBlock { @@ -657,7 +657,7 @@ export interface RequestFinalizeBlock { proposerAddress: Uint8Array; } export interface RequestFinalizeBlockProtoMsg { - typeUrl: "/tendermint.abci.RequestFinalizeBlock"; + typeUrl: '/tendermint.abci.RequestFinalizeBlock'; value: Uint8Array; } export interface RequestFinalizeBlockAmino { @@ -673,7 +673,7 @@ export interface RequestFinalizeBlockAmino { proposer_address: string; } export interface RequestFinalizeBlockAminoMsg { - type: "/tendermint.abci.RequestFinalizeBlock"; + type: '/tendermint.abci.RequestFinalizeBlock'; value: RequestFinalizeBlockAmino; } export interface Response { @@ -696,7 +696,7 @@ export interface Response { finalizeBlock?: ResponseFinalizeBlock; } export interface ResponseProtoMsg { - typeUrl: "/tendermint.abci.Response"; + typeUrl: '/tendermint.abci.Response'; value: Uint8Array; } export interface ResponseAmino { @@ -719,7 +719,7 @@ export interface ResponseAmino { finalize_block?: ResponseFinalizeBlockAmino; } export interface ResponseAminoMsg { - type: "/tendermint.abci.Response"; + type: '/tendermint.abci.Response'; value: ResponseAmino; } /** nondeterministic */ @@ -727,7 +727,7 @@ export interface ResponseException { error: string; } export interface ResponseExceptionProtoMsg { - typeUrl: "/tendermint.abci.ResponseException"; + typeUrl: '/tendermint.abci.ResponseException'; value: Uint8Array; } /** nondeterministic */ @@ -735,31 +735,31 @@ export interface ResponseExceptionAmino { error: string; } export interface ResponseExceptionAminoMsg { - type: "/tendermint.abci.ResponseException"; + type: '/tendermint.abci.ResponseException'; value: ResponseExceptionAmino; } export interface ResponseEcho { message: string; } export interface ResponseEchoProtoMsg { - typeUrl: "/tendermint.abci.ResponseEcho"; + typeUrl: '/tendermint.abci.ResponseEcho'; value: Uint8Array; } export interface ResponseEchoAmino { message: string; } export interface ResponseEchoAminoMsg { - type: "/tendermint.abci.ResponseEcho"; + type: '/tendermint.abci.ResponseEcho'; value: ResponseEchoAmino; } export interface ResponseFlush {} export interface ResponseFlushProtoMsg { - typeUrl: "/tendermint.abci.ResponseFlush"; + typeUrl: '/tendermint.abci.ResponseFlush'; value: Uint8Array; } export interface ResponseFlushAmino {} export interface ResponseFlushAminoMsg { - type: "/tendermint.abci.ResponseFlush"; + type: '/tendermint.abci.ResponseFlush'; value: ResponseFlushAmino; } export interface ResponseInfo { @@ -770,7 +770,7 @@ export interface ResponseInfo { lastBlockAppHash: Uint8Array; } export interface ResponseInfoProtoMsg { - typeUrl: "/tendermint.abci.ResponseInfo"; + typeUrl: '/tendermint.abci.ResponseInfo'; value: Uint8Array; } export interface ResponseInfoAmino { @@ -781,7 +781,7 @@ export interface ResponseInfoAmino { last_block_app_hash: string; } export interface ResponseInfoAminoMsg { - type: "/tendermint.abci.ResponseInfo"; + type: '/tendermint.abci.ResponseInfo'; value: ResponseInfoAmino; } export interface ResponseInitChain { @@ -790,7 +790,7 @@ export interface ResponseInitChain { appHash: Uint8Array; } export interface ResponseInitChainProtoMsg { - typeUrl: "/tendermint.abci.ResponseInitChain"; + typeUrl: '/tendermint.abci.ResponseInitChain'; value: Uint8Array; } export interface ResponseInitChainAmino { @@ -799,7 +799,7 @@ export interface ResponseInitChainAmino { app_hash: string; } export interface ResponseInitChainAminoMsg { - type: "/tendermint.abci.ResponseInitChain"; + type: '/tendermint.abci.ResponseInitChain'; value: ResponseInitChainAmino; } export interface ResponseQuery { @@ -816,7 +816,7 @@ export interface ResponseQuery { codespace: string; } export interface ResponseQueryProtoMsg { - typeUrl: "/tendermint.abci.ResponseQuery"; + typeUrl: '/tendermint.abci.ResponseQuery'; value: Uint8Array; } export interface ResponseQueryAmino { @@ -833,7 +833,7 @@ export interface ResponseQueryAmino { codespace: string; } export interface ResponseQueryAminoMsg { - type: "/tendermint.abci.ResponseQuery"; + type: '/tendermint.abci.ResponseQuery'; value: ResponseQueryAmino; } export interface ResponseCheckTx { @@ -849,7 +849,7 @@ export interface ResponseCheckTx { codespace: string; } export interface ResponseCheckTxProtoMsg { - typeUrl: "/tendermint.abci.ResponseCheckTx"; + typeUrl: '/tendermint.abci.ResponseCheckTx'; value: Uint8Array; } export interface ResponseCheckTxAmino { @@ -865,63 +865,63 @@ export interface ResponseCheckTxAmino { codespace: string; } export interface ResponseCheckTxAminoMsg { - type: "/tendermint.abci.ResponseCheckTx"; + type: '/tendermint.abci.ResponseCheckTx'; value: ResponseCheckTxAmino; } export interface ResponseCommit { retainHeight: bigint; } export interface ResponseCommitProtoMsg { - typeUrl: "/tendermint.abci.ResponseCommit"; + typeUrl: '/tendermint.abci.ResponseCommit'; value: Uint8Array; } export interface ResponseCommitAmino { retain_height: string; } export interface ResponseCommitAminoMsg { - type: "/tendermint.abci.ResponseCommit"; + type: '/tendermint.abci.ResponseCommit'; value: ResponseCommitAmino; } export interface ResponseListSnapshots { snapshots: Snapshot[]; } export interface ResponseListSnapshotsProtoMsg { - typeUrl: "/tendermint.abci.ResponseListSnapshots"; + typeUrl: '/tendermint.abci.ResponseListSnapshots'; value: Uint8Array; } export interface ResponseListSnapshotsAmino { snapshots: SnapshotAmino[]; } export interface ResponseListSnapshotsAminoMsg { - type: "/tendermint.abci.ResponseListSnapshots"; + type: '/tendermint.abci.ResponseListSnapshots'; value: ResponseListSnapshotsAmino; } export interface ResponseOfferSnapshot { result: ResponseOfferSnapshot_Result; } export interface ResponseOfferSnapshotProtoMsg { - typeUrl: "/tendermint.abci.ResponseOfferSnapshot"; + typeUrl: '/tendermint.abci.ResponseOfferSnapshot'; value: Uint8Array; } export interface ResponseOfferSnapshotAmino { result: ResponseOfferSnapshot_Result; } export interface ResponseOfferSnapshotAminoMsg { - type: "/tendermint.abci.ResponseOfferSnapshot"; + type: '/tendermint.abci.ResponseOfferSnapshot'; value: ResponseOfferSnapshotAmino; } export interface ResponseLoadSnapshotChunk { chunk: Uint8Array; } export interface ResponseLoadSnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk"; + typeUrl: '/tendermint.abci.ResponseLoadSnapshotChunk'; value: Uint8Array; } export interface ResponseLoadSnapshotChunkAmino { chunk: string; } export interface ResponseLoadSnapshotChunkAminoMsg { - type: "/tendermint.abci.ResponseLoadSnapshotChunk"; + type: '/tendermint.abci.ResponseLoadSnapshotChunk'; value: ResponseLoadSnapshotChunkAmino; } export interface ResponseApplySnapshotChunk { @@ -932,7 +932,7 @@ export interface ResponseApplySnapshotChunk { rejectSenders: string[]; } export interface ResponseApplySnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk"; + typeUrl: '/tendermint.abci.ResponseApplySnapshotChunk'; value: Uint8Array; } export interface ResponseApplySnapshotChunkAmino { @@ -943,63 +943,63 @@ export interface ResponseApplySnapshotChunkAmino { reject_senders: string[]; } export interface ResponseApplySnapshotChunkAminoMsg { - type: "/tendermint.abci.ResponseApplySnapshotChunk"; + type: '/tendermint.abci.ResponseApplySnapshotChunk'; value: ResponseApplySnapshotChunkAmino; } export interface ResponsePrepareProposal { txs: Uint8Array[]; } export interface ResponsePrepareProposalProtoMsg { - typeUrl: "/tendermint.abci.ResponsePrepareProposal"; + typeUrl: '/tendermint.abci.ResponsePrepareProposal'; value: Uint8Array; } export interface ResponsePrepareProposalAmino { txs: string[]; } export interface ResponsePrepareProposalAminoMsg { - type: "/tendermint.abci.ResponsePrepareProposal"; + type: '/tendermint.abci.ResponsePrepareProposal'; value: ResponsePrepareProposalAmino; } export interface ResponseProcessProposal { status: ResponseProcessProposal_ProposalStatus; } export interface ResponseProcessProposalProtoMsg { - typeUrl: "/tendermint.abci.ResponseProcessProposal"; + typeUrl: '/tendermint.abci.ResponseProcessProposal'; value: Uint8Array; } export interface ResponseProcessProposalAmino { status: ResponseProcessProposal_ProposalStatus; } export interface ResponseProcessProposalAminoMsg { - type: "/tendermint.abci.ResponseProcessProposal"; + type: '/tendermint.abci.ResponseProcessProposal'; value: ResponseProcessProposalAmino; } export interface ResponseExtendVote { voteExtension: Uint8Array; } export interface ResponseExtendVoteProtoMsg { - typeUrl: "/tendermint.abci.ResponseExtendVote"; + typeUrl: '/tendermint.abci.ResponseExtendVote'; value: Uint8Array; } export interface ResponseExtendVoteAmino { vote_extension: string; } export interface ResponseExtendVoteAminoMsg { - type: "/tendermint.abci.ResponseExtendVote"; + type: '/tendermint.abci.ResponseExtendVote'; value: ResponseExtendVoteAmino; } export interface ResponseVerifyVoteExtension { status: ResponseVerifyVoteExtension_VerifyStatus; } export interface ResponseVerifyVoteExtensionProtoMsg { - typeUrl: "/tendermint.abci.ResponseVerifyVoteExtension"; + typeUrl: '/tendermint.abci.ResponseVerifyVoteExtension'; value: Uint8Array; } export interface ResponseVerifyVoteExtensionAmino { status: ResponseVerifyVoteExtension_VerifyStatus; } export interface ResponseVerifyVoteExtensionAminoMsg { - type: "/tendermint.abci.ResponseVerifyVoteExtension"; + type: '/tendermint.abci.ResponseVerifyVoteExtension'; value: ResponseVerifyVoteExtensionAmino; } export interface ResponseFinalizeBlock { @@ -1022,7 +1022,7 @@ export interface ResponseFinalizeBlock { appHash: Uint8Array; } export interface ResponseFinalizeBlockProtoMsg { - typeUrl: "/tendermint.abci.ResponseFinalizeBlock"; + typeUrl: '/tendermint.abci.ResponseFinalizeBlock'; value: Uint8Array; } export interface ResponseFinalizeBlockAmino { @@ -1045,7 +1045,7 @@ export interface ResponseFinalizeBlockAmino { app_hash: string; } export interface ResponseFinalizeBlockAminoMsg { - type: "/tendermint.abci.ResponseFinalizeBlock"; + type: '/tendermint.abci.ResponseFinalizeBlock'; value: ResponseFinalizeBlockAmino; } export interface CommitInfo { @@ -1053,7 +1053,7 @@ export interface CommitInfo { votes: VoteInfo[]; } export interface CommitInfoProtoMsg { - typeUrl: "/tendermint.abci.CommitInfo"; + typeUrl: '/tendermint.abci.CommitInfo'; value: Uint8Array; } export interface CommitInfoAmino { @@ -1061,7 +1061,7 @@ export interface CommitInfoAmino { votes: VoteInfoAmino[]; } export interface CommitInfoAminoMsg { - type: "/tendermint.abci.CommitInfo"; + type: '/tendermint.abci.CommitInfo'; value: CommitInfoAmino; } /** @@ -1079,7 +1079,7 @@ export interface ExtendedCommitInfo { votes: ExtendedVoteInfo[]; } export interface ExtendedCommitInfoProtoMsg { - typeUrl: "/tendermint.abci.ExtendedCommitInfo"; + typeUrl: '/tendermint.abci.ExtendedCommitInfo'; value: Uint8Array; } /** @@ -1097,7 +1097,7 @@ export interface ExtendedCommitInfoAmino { votes: ExtendedVoteInfoAmino[]; } export interface ExtendedCommitInfoAminoMsg { - type: "/tendermint.abci.ExtendedCommitInfo"; + type: '/tendermint.abci.ExtendedCommitInfo'; value: ExtendedCommitInfoAmino; } /** @@ -1110,7 +1110,7 @@ export interface Event { attributes: EventAttribute[]; } export interface EventProtoMsg { - typeUrl: "/tendermint.abci.Event"; + typeUrl: '/tendermint.abci.Event'; value: Uint8Array; } /** @@ -1123,7 +1123,7 @@ export interface EventAmino { attributes: EventAttributeAmino[]; } export interface EventAminoMsg { - type: "/tendermint.abci.Event"; + type: '/tendermint.abci.Event'; value: EventAmino; } /** EventAttribute is a single key-value pair, associated with an event. */ @@ -1134,7 +1134,7 @@ export interface EventAttribute { index: boolean; } export interface EventAttributeProtoMsg { - typeUrl: "/tendermint.abci.EventAttribute"; + typeUrl: '/tendermint.abci.EventAttribute'; value: Uint8Array; } /** EventAttribute is a single key-value pair, associated with an event. */ @@ -1145,7 +1145,7 @@ export interface EventAttributeAmino { index: boolean; } export interface EventAttributeAminoMsg { - type: "/tendermint.abci.EventAttribute"; + type: '/tendermint.abci.EventAttribute'; value: EventAttributeAmino; } /** @@ -1166,7 +1166,7 @@ export interface ExecTxResult { codespace: string; } export interface ExecTxResultProtoMsg { - typeUrl: "/tendermint.abci.ExecTxResult"; + typeUrl: '/tendermint.abci.ExecTxResult'; value: Uint8Array; } /** @@ -1187,7 +1187,7 @@ export interface ExecTxResultAmino { codespace: string; } export interface ExecTxResultAminoMsg { - type: "/tendermint.abci.ExecTxResult"; + type: '/tendermint.abci.ExecTxResult'; value: ExecTxResultAmino; } /** @@ -1202,7 +1202,7 @@ export interface TxResult { result: ExecTxResult; } export interface TxResultProtoMsg { - typeUrl: "/tendermint.abci.TxResult"; + typeUrl: '/tendermint.abci.TxResult'; value: Uint8Array; } /** @@ -1217,7 +1217,7 @@ export interface TxResultAmino { result: ExecTxResultAmino; } export interface TxResultAminoMsg { - type: "/tendermint.abci.TxResult"; + type: '/tendermint.abci.TxResult'; value: TxResultAmino; } export interface Validator { @@ -1230,7 +1230,7 @@ export interface Validator { power: bigint; } export interface ValidatorProtoMsg { - typeUrl: "/tendermint.abci.Validator"; + typeUrl: '/tendermint.abci.Validator'; value: Uint8Array; } export interface ValidatorAmino { @@ -1243,7 +1243,7 @@ export interface ValidatorAmino { power: string; } export interface ValidatorAminoMsg { - type: "/tendermint.abci.Validator"; + type: '/tendermint.abci.Validator'; value: ValidatorAmino; } export interface ValidatorUpdate { @@ -1251,7 +1251,7 @@ export interface ValidatorUpdate { power: bigint; } export interface ValidatorUpdateProtoMsg { - typeUrl: "/tendermint.abci.ValidatorUpdate"; + typeUrl: '/tendermint.abci.ValidatorUpdate'; value: Uint8Array; } export interface ValidatorUpdateAmino { @@ -1259,7 +1259,7 @@ export interface ValidatorUpdateAmino { power: string; } export interface ValidatorUpdateAminoMsg { - type: "/tendermint.abci.ValidatorUpdate"; + type: '/tendermint.abci.ValidatorUpdate'; value: ValidatorUpdateAmino; } export interface VoteInfo { @@ -1267,7 +1267,7 @@ export interface VoteInfo { blockIdFlag: BlockIDFlag; } export interface VoteInfoProtoMsg { - typeUrl: "/tendermint.abci.VoteInfo"; + typeUrl: '/tendermint.abci.VoteInfo'; value: Uint8Array; } export interface VoteInfoAmino { @@ -1275,7 +1275,7 @@ export interface VoteInfoAmino { block_id_flag: BlockIDFlag; } export interface VoteInfoAminoMsg { - type: "/tendermint.abci.VoteInfo"; + type: '/tendermint.abci.VoteInfo'; value: VoteInfoAmino; } export interface ExtendedVoteInfo { @@ -1289,7 +1289,7 @@ export interface ExtendedVoteInfo { blockIdFlag: BlockIDFlag; } export interface ExtendedVoteInfoProtoMsg { - typeUrl: "/tendermint.abci.ExtendedVoteInfo"; + typeUrl: '/tendermint.abci.ExtendedVoteInfo'; value: Uint8Array; } export interface ExtendedVoteInfoAmino { @@ -1303,7 +1303,7 @@ export interface ExtendedVoteInfoAmino { block_id_flag: BlockIDFlag; } export interface ExtendedVoteInfoAminoMsg { - type: "/tendermint.abci.ExtendedVoteInfo"; + type: '/tendermint.abci.ExtendedVoteInfo'; value: ExtendedVoteInfoAmino; } export interface Misbehavior { @@ -1322,7 +1322,7 @@ export interface Misbehavior { totalVotingPower: bigint; } export interface MisbehaviorProtoMsg { - typeUrl: "/tendermint.abci.Misbehavior"; + typeUrl: '/tendermint.abci.Misbehavior'; value: Uint8Array; } export interface MisbehaviorAmino { @@ -1341,7 +1341,7 @@ export interface MisbehaviorAmino { total_voting_power: string; } export interface MisbehaviorAminoMsg { - type: "/tendermint.abci.Misbehavior"; + type: '/tendermint.abci.Misbehavior'; value: MisbehaviorAmino; } export interface Snapshot { @@ -1357,7 +1357,7 @@ export interface Snapshot { metadata: Uint8Array; } export interface SnapshotProtoMsg { - typeUrl: "/tendermint.abci.Snapshot"; + typeUrl: '/tendermint.abci.Snapshot'; value: Uint8Array; } export interface SnapshotAmino { @@ -1373,7 +1373,7 @@ export interface SnapshotAmino { metadata: string; } export interface SnapshotAminoMsg { - type: "/tendermint.abci.Snapshot"; + type: '/tendermint.abci.Snapshot'; value: SnapshotAmino; } function createBaseRequest(): Request { @@ -1397,7 +1397,7 @@ function createBaseRequest(): Request { }; } export const Request = { - typeUrl: "/tendermint.abci.Request", + typeUrl: '/tendermint.abci.Request', is(o: any): o is Request { return o && o.$typeUrl === Request.typeUrl; }, @@ -1462,57 +1462,57 @@ export const Request = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 5: - message.initChain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 8: - message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32()); - break; - case 13: - message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32()); - break; - case 14: - message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 15: - message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.prepareProposal = RequestPrepareProposal.decode(reader, reader.uint32()); - break; - case 17: - message.processProposal = RequestProcessProposal.decode(reader, reader.uint32()); - break; - case 18: - message.extendVote = RequestExtendVote.decode(reader, reader.uint32()); - break; - case 19: - message.verifyVoteExtension = RequestVerifyVoteExtension.decode(reader, reader.uint32()); - break; - case 20: - message.finalizeBlock = RequestFinalizeBlock.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.echo = RequestEcho.decode(reader, reader.uint32()); + break; + case 2: + message.flush = RequestFlush.decode(reader, reader.uint32()); + break; + case 3: + message.info = RequestInfo.decode(reader, reader.uint32()); + break; + case 5: + message.initChain = RequestInitChain.decode(reader, reader.uint32()); + break; + case 6: + message.query = RequestQuery.decode(reader, reader.uint32()); + break; + case 8: + message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); + break; + case 11: + message.commit = RequestCommit.decode(reader, reader.uint32()); + break; + case 12: + message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32()); + break; + case 13: + message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32()); + break; + case 14: + message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 15: + message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32()); + break; + case 16: + message.prepareProposal = RequestPrepareProposal.decode(reader, reader.uint32()); + break; + case 17: + message.processProposal = RequestProcessProposal.decode(reader, reader.uint32()); + break; + case 18: + message.extendVote = RequestExtendVote.decode(reader, reader.uint32()); + break; + case 19: + message.verifyVoteExtension = RequestVerifyVoteExtension.decode(reader, reader.uint32()); + break; + case 20: + message.finalizeBlock = RequestFinalizeBlock.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1620,7 +1620,7 @@ export const Request = { }, toProtoMsg(message: Request): RequestProtoMsg { return { - typeUrl: "/tendermint.abci.Request", + typeUrl: '/tendermint.abci.Request', value: Request.encode(message).finish() }; } @@ -1628,19 +1628,19 @@ export const Request = { GlobalDecoderRegistry.register(Request.typeUrl, Request); function createBaseRequestEcho(): RequestEcho { return { - message: "" + message: '' }; } export const RequestEcho = { - typeUrl: "/tendermint.abci.RequestEcho", + typeUrl: '/tendermint.abci.RequestEcho', is(o: any): o is RequestEcho { - return o && (o.$typeUrl === RequestEcho.typeUrl || typeof o.message === "string"); + return o && (o.$typeUrl === RequestEcho.typeUrl || typeof o.message === 'string'); }, isAmino(o: any): o is RequestEchoAmino { - return o && (o.$typeUrl === RequestEcho.typeUrl || typeof o.message === "string"); + return o && (o.$typeUrl === RequestEcho.typeUrl || typeof o.message === 'string'); }, encode(message: RequestEcho, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.message !== "") { + if (message.message !== '') { writer.uint32(10).string(message.message); } return writer; @@ -1652,19 +1652,19 @@ export const RequestEcho = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): RequestEcho { const message = createBaseRequestEcho(); - message.message = object.message ?? ""; + message.message = object.message ?? ''; return message; }, fromAmino(object: RequestEchoAmino): RequestEcho { @@ -1676,7 +1676,7 @@ export const RequestEcho = { }, toAmino(message: RequestEcho): RequestEchoAmino { const obj: any = {}; - obj.message = message.message === "" ? undefined : message.message; + obj.message = message.message === '' ? undefined : message.message; return obj; }, fromAminoMsg(object: RequestEchoAminoMsg): RequestEcho { @@ -1690,7 +1690,7 @@ export const RequestEcho = { }, toProtoMsg(message: RequestEcho): RequestEchoProtoMsg { return { - typeUrl: "/tendermint.abci.RequestEcho", + typeUrl: '/tendermint.abci.RequestEcho', value: RequestEcho.encode(message).finish() }; } @@ -1700,7 +1700,7 @@ function createBaseRequestFlush(): RequestFlush { return {}; } export const RequestFlush = { - typeUrl: "/tendermint.abci.RequestFlush", + typeUrl: '/tendermint.abci.RequestFlush', is(o: any): o is RequestFlush { return o && o.$typeUrl === RequestFlush.typeUrl; }, @@ -1717,9 +1717,9 @@ export const RequestFlush = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1747,7 +1747,7 @@ export const RequestFlush = { }, toProtoMsg(message: RequestFlush): RequestFlushProtoMsg { return { - typeUrl: "/tendermint.abci.RequestFlush", + typeUrl: '/tendermint.abci.RequestFlush', value: RequestFlush.encode(message).finish() }; } @@ -1755,22 +1755,22 @@ export const RequestFlush = { GlobalDecoderRegistry.register(RequestFlush.typeUrl, RequestFlush); function createBaseRequestInfo(): RequestInfo { return { - version: "", + version: '', blockVersion: BigInt(0), p2pVersion: BigInt(0), - abciVersion: "" + abciVersion: '' }; } export const RequestInfo = { - typeUrl: "/tendermint.abci.RequestInfo", + typeUrl: '/tendermint.abci.RequestInfo', is(o: any): o is RequestInfo { - return o && (o.$typeUrl === RequestInfo.typeUrl || typeof o.version === "string" && typeof o.blockVersion === "bigint" && typeof o.p2pVersion === "bigint" && typeof o.abciVersion === "string"); + return o && (o.$typeUrl === RequestInfo.typeUrl || typeof o.version === 'string' && typeof o.blockVersion === 'bigint' && typeof o.p2pVersion === 'bigint' && typeof o.abciVersion === 'string'); }, isAmino(o: any): o is RequestInfoAmino { - return o && (o.$typeUrl === RequestInfo.typeUrl || typeof o.version === "string" && typeof o.block_version === "bigint" && typeof o.p2p_version === "bigint" && typeof o.abci_version === "string"); + return o && (o.$typeUrl === RequestInfo.typeUrl || typeof o.version === 'string' && typeof o.block_version === 'bigint' && typeof o.p2p_version === 'bigint' && typeof o.abci_version === 'string'); }, encode(message: RequestInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== "") { + if (message.version !== '') { writer.uint32(10).string(message.version); } if (message.blockVersion !== BigInt(0)) { @@ -1779,7 +1779,7 @@ export const RequestInfo = { if (message.p2pVersion !== BigInt(0)) { writer.uint32(24).uint64(message.p2pVersion); } - if (message.abciVersion !== "") { + if (message.abciVersion !== '') { writer.uint32(34).string(message.abciVersion); } return writer; @@ -1791,31 +1791,31 @@ export const RequestInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.blockVersion = reader.uint64(); - break; - case 3: - message.p2pVersion = reader.uint64(); - break; - case 4: - message.abciVersion = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.version = reader.string(); + break; + case 2: + message.blockVersion = reader.uint64(); + break; + case 3: + message.p2pVersion = reader.uint64(); + break; + case 4: + message.abciVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): RequestInfo { const message = createBaseRequestInfo(); - message.version = object.version ?? ""; + message.version = object.version ?? ''; message.blockVersion = object.blockVersion !== undefined && object.blockVersion !== null ? BigInt(object.blockVersion.toString()) : BigInt(0); message.p2pVersion = object.p2pVersion !== undefined && object.p2pVersion !== null ? BigInt(object.p2pVersion.toString()) : BigInt(0); - message.abciVersion = object.abciVersion ?? ""; + message.abciVersion = object.abciVersion ?? ''; return message; }, fromAmino(object: RequestInfoAmino): RequestInfo { @@ -1836,10 +1836,10 @@ export const RequestInfo = { }, toAmino(message: RequestInfo): RequestInfoAmino { const obj: any = {}; - obj.version = message.version === "" ? undefined : message.version; + obj.version = message.version === '' ? undefined : message.version; obj.block_version = message.blockVersion !== BigInt(0) ? message.blockVersion.toString() : undefined; obj.p2p_version = message.p2pVersion !== BigInt(0) ? message.p2pVersion.toString() : undefined; - obj.abci_version = message.abciVersion === "" ? undefined : message.abciVersion; + obj.abci_version = message.abciVersion === '' ? undefined : message.abciVersion; return obj; }, fromAminoMsg(object: RequestInfoAminoMsg): RequestInfo { @@ -1853,7 +1853,7 @@ export const RequestInfo = { }, toProtoMsg(message: RequestInfo): RequestInfoProtoMsg { return { - typeUrl: "/tendermint.abci.RequestInfo", + typeUrl: '/tendermint.abci.RequestInfo', value: RequestInfo.encode(message).finish() }; } @@ -1862,7 +1862,7 @@ GlobalDecoderRegistry.register(RequestInfo.typeUrl, RequestInfo); function createBaseRequestInitChain(): RequestInitChain { return { time: new Date(), - chainId: "", + chainId: '', consensusParams: undefined, validators: [], appStateBytes: new Uint8Array(), @@ -1870,18 +1870,18 @@ function createBaseRequestInitChain(): RequestInitChain { }; } export const RequestInitChain = { - typeUrl: "/tendermint.abci.RequestInitChain", + typeUrl: '/tendermint.abci.RequestInitChain', is(o: any): o is RequestInitChain { - return o && (o.$typeUrl === RequestInitChain.typeUrl || Timestamp.is(o.time) && typeof o.chainId === "string" && Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.is(o.validators[0])) && (o.appStateBytes instanceof Uint8Array || typeof o.appStateBytes === "string") && typeof o.initialHeight === "bigint"); + return o && (o.$typeUrl === RequestInitChain.typeUrl || Timestamp.is(o.time) && typeof o.chainId === 'string' && Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.is(o.validators[0])) && (o.appStateBytes instanceof Uint8Array || typeof o.appStateBytes === 'string') && typeof o.initialHeight === 'bigint'); }, isAmino(o: any): o is RequestInitChainAmino { - return o && (o.$typeUrl === RequestInitChain.typeUrl || Timestamp.isAmino(o.time) && typeof o.chain_id === "string" && Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.isAmino(o.validators[0])) && (o.app_state_bytes instanceof Uint8Array || typeof o.app_state_bytes === "string") && typeof o.initial_height === "bigint"); + return o && (o.$typeUrl === RequestInitChain.typeUrl || Timestamp.isAmino(o.time) && typeof o.chain_id === 'string' && Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.isAmino(o.validators[0])) && (o.app_state_bytes instanceof Uint8Array || typeof o.app_state_bytes === 'string') && typeof o.initial_height === 'bigint'); }, encode(message: RequestInitChain, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.time !== undefined) { Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).ldelim(); } - if (message.chainId !== "") { + if (message.chainId !== '') { writer.uint32(18).string(message.chainId); } if (message.consensusParams !== undefined) { @@ -1905,27 +1905,27 @@ export const RequestInitChain = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 4: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 5: - message.appStateBytes = reader.bytes(); - break; - case 6: - message.initialHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); + break; + case 4: + message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 5: + message.appStateBytes = reader.bytes(); + break; + case 6: + message.initialHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1933,7 +1933,7 @@ export const RequestInitChain = { fromPartial(object: DeepPartial): RequestInitChain { const message = createBaseRequestInitChain(); message.time = object.time ?? undefined; - message.chainId = object.chainId ?? ""; + message.chainId = object.chainId ?? ''; message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null ? ConsensusParams.fromPartial(object.consensusParams) : undefined; message.validators = object.validators?.map(e => ValidatorUpdate.fromPartial(e)) || []; message.appStateBytes = object.appStateBytes ?? new Uint8Array(); @@ -1963,7 +1963,7 @@ export const RequestInitChain = { toAmino(message: RequestInitChain): RequestInitChainAmino { const obj: any = {}; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; - obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.chain_id = message.chainId === '' ? undefined : message.chainId; obj.consensus_params = message.consensusParams ? ConsensusParams.toAmino(message.consensusParams) : undefined; if (message.validators) { obj.validators = message.validators.map(e => e ? ValidatorUpdate.toAmino(e) : undefined); @@ -1985,7 +1985,7 @@ export const RequestInitChain = { }, toProtoMsg(message: RequestInitChain): RequestInitChainProtoMsg { return { - typeUrl: "/tendermint.abci.RequestInitChain", + typeUrl: '/tendermint.abci.RequestInitChain', value: RequestInitChain.encode(message).finish() }; } @@ -1994,24 +1994,24 @@ GlobalDecoderRegistry.register(RequestInitChain.typeUrl, RequestInitChain); function createBaseRequestQuery(): RequestQuery { return { data: new Uint8Array(), - path: "", + path: '', height: BigInt(0), prove: false }; } export const RequestQuery = { - typeUrl: "/tendermint.abci.RequestQuery", + typeUrl: '/tendermint.abci.RequestQuery', is(o: any): o is RequestQuery { - return o && (o.$typeUrl === RequestQuery.typeUrl || (o.data instanceof Uint8Array || typeof o.data === "string") && typeof o.path === "string" && typeof o.height === "bigint" && typeof o.prove === "boolean"); + return o && (o.$typeUrl === RequestQuery.typeUrl || (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.path === 'string' && typeof o.height === 'bigint' && typeof o.prove === 'boolean'); }, isAmino(o: any): o is RequestQueryAmino { - return o && (o.$typeUrl === RequestQuery.typeUrl || (o.data instanceof Uint8Array || typeof o.data === "string") && typeof o.path === "string" && typeof o.height === "bigint" && typeof o.prove === "boolean"); + return o && (o.$typeUrl === RequestQuery.typeUrl || (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.path === 'string' && typeof o.height === 'bigint' && typeof o.prove === 'boolean'); }, encode(message: RequestQuery, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.data.length !== 0) { writer.uint32(10).bytes(message.data); } - if (message.path !== "") { + if (message.path !== '') { writer.uint32(18).string(message.path); } if (message.height !== BigInt(0)) { @@ -2029,21 +2029,21 @@ export const RequestQuery = { while (reader.pos < end) { const 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; + 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; @@ -2051,7 +2051,7 @@ export const RequestQuery = { fromPartial(object: DeepPartial): RequestQuery { const message = createBaseRequestQuery(); message.data = object.data ?? new Uint8Array(); - message.path = object.path ?? ""; + message.path = object.path ?? ''; message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); message.prove = object.prove ?? false; return message; @@ -2075,7 +2075,7 @@ export const RequestQuery = { toAmino(message: RequestQuery): RequestQueryAmino { const obj: any = {}; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.path = message.path === "" ? undefined : message.path; + obj.path = message.path === '' ? undefined : message.path; obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.prove = message.prove === false ? undefined : message.prove; return obj; @@ -2091,7 +2091,7 @@ export const RequestQuery = { }, toProtoMsg(message: RequestQuery): RequestQueryProtoMsg { return { - typeUrl: "/tendermint.abci.RequestQuery", + typeUrl: '/tendermint.abci.RequestQuery', value: RequestQuery.encode(message).finish() }; } @@ -2104,12 +2104,12 @@ function createBaseRequestCheckTx(): RequestCheckTx { }; } export const RequestCheckTx = { - typeUrl: "/tendermint.abci.RequestCheckTx", + typeUrl: '/tendermint.abci.RequestCheckTx', is(o: any): o is RequestCheckTx { - return o && (o.$typeUrl === RequestCheckTx.typeUrl || (o.tx instanceof Uint8Array || typeof o.tx === "string") && isSet(o.type)); + return o && (o.$typeUrl === RequestCheckTx.typeUrl || (o.tx instanceof Uint8Array || typeof o.tx === 'string') && isSet(o.type)); }, isAmino(o: any): o is RequestCheckTxAmino { - return o && (o.$typeUrl === RequestCheckTx.typeUrl || (o.tx instanceof Uint8Array || typeof o.tx === "string") && isSet(o.type)); + return o && (o.$typeUrl === RequestCheckTx.typeUrl || (o.tx instanceof Uint8Array || typeof o.tx === 'string') && isSet(o.type)); }, encode(message: RequestCheckTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.tx.length !== 0) { @@ -2127,15 +2127,15 @@ export const RequestCheckTx = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.tx = reader.bytes(); + break; + case 2: + message.type = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2173,7 +2173,7 @@ export const RequestCheckTx = { }, toProtoMsg(message: RequestCheckTx): RequestCheckTxProtoMsg { return { - typeUrl: "/tendermint.abci.RequestCheckTx", + typeUrl: '/tendermint.abci.RequestCheckTx', value: RequestCheckTx.encode(message).finish() }; } @@ -2183,7 +2183,7 @@ function createBaseRequestCommit(): RequestCommit { return {}; } export const RequestCommit = { - typeUrl: "/tendermint.abci.RequestCommit", + typeUrl: '/tendermint.abci.RequestCommit', is(o: any): o is RequestCommit { return o && o.$typeUrl === RequestCommit.typeUrl; }, @@ -2200,9 +2200,9 @@ export const RequestCommit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2230,7 +2230,7 @@ export const RequestCommit = { }, toProtoMsg(message: RequestCommit): RequestCommitProtoMsg { return { - typeUrl: "/tendermint.abci.RequestCommit", + typeUrl: '/tendermint.abci.RequestCommit', value: RequestCommit.encode(message).finish() }; } @@ -2240,7 +2240,7 @@ function createBaseRequestListSnapshots(): RequestListSnapshots { return {}; } export const RequestListSnapshots = { - typeUrl: "/tendermint.abci.RequestListSnapshots", + typeUrl: '/tendermint.abci.RequestListSnapshots', is(o: any): o is RequestListSnapshots { return o && o.$typeUrl === RequestListSnapshots.typeUrl; }, @@ -2257,9 +2257,9 @@ export const RequestListSnapshots = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2287,7 +2287,7 @@ export const RequestListSnapshots = { }, toProtoMsg(message: RequestListSnapshots): RequestListSnapshotsProtoMsg { return { - typeUrl: "/tendermint.abci.RequestListSnapshots", + typeUrl: '/tendermint.abci.RequestListSnapshots', value: RequestListSnapshots.encode(message).finish() }; } @@ -2300,12 +2300,12 @@ function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { }; } export const RequestOfferSnapshot = { - typeUrl: "/tendermint.abci.RequestOfferSnapshot", + typeUrl: '/tendermint.abci.RequestOfferSnapshot', is(o: any): o is RequestOfferSnapshot { - return o && (o.$typeUrl === RequestOfferSnapshot.typeUrl || o.appHash instanceof Uint8Array || typeof o.appHash === "string"); + return o && (o.$typeUrl === RequestOfferSnapshot.typeUrl || o.appHash instanceof Uint8Array || typeof o.appHash === 'string'); }, isAmino(o: any): o is RequestOfferSnapshotAmino { - return o && (o.$typeUrl === RequestOfferSnapshot.typeUrl || o.app_hash instanceof Uint8Array || typeof o.app_hash === "string"); + return o && (o.$typeUrl === RequestOfferSnapshot.typeUrl || o.app_hash instanceof Uint8Array || typeof o.app_hash === 'string'); }, encode(message: RequestOfferSnapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.snapshot !== undefined) { @@ -2323,15 +2323,15 @@ export const RequestOfferSnapshot = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.snapshot = Snapshot.decode(reader, reader.uint32()); + break; + case 2: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2369,7 +2369,7 @@ export const RequestOfferSnapshot = { }, toProtoMsg(message: RequestOfferSnapshot): RequestOfferSnapshotProtoMsg { return { - typeUrl: "/tendermint.abci.RequestOfferSnapshot", + typeUrl: '/tendermint.abci.RequestOfferSnapshot', value: RequestOfferSnapshot.encode(message).finish() }; } @@ -2383,12 +2383,12 @@ function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { }; } export const RequestLoadSnapshotChunk = { - typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", + typeUrl: '/tendermint.abci.RequestLoadSnapshotChunk', is(o: any): o is RequestLoadSnapshotChunk { - return o && (o.$typeUrl === RequestLoadSnapshotChunk.typeUrl || typeof o.height === "bigint" && typeof o.format === "number" && typeof o.chunk === "number"); + return o && (o.$typeUrl === RequestLoadSnapshotChunk.typeUrl || typeof o.height === 'bigint' && typeof o.format === 'number' && typeof o.chunk === 'number'); }, isAmino(o: any): o is RequestLoadSnapshotChunkAmino { - return o && (o.$typeUrl === RequestLoadSnapshotChunk.typeUrl || typeof o.height === "bigint" && typeof o.format === "number" && typeof o.chunk === "number"); + return o && (o.$typeUrl === RequestLoadSnapshotChunk.typeUrl || typeof o.height === 'bigint' && typeof o.format === 'number' && typeof o.chunk === 'number'); }, encode(message: RequestLoadSnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.height !== BigInt(0)) { @@ -2409,18 +2409,18 @@ export const RequestLoadSnapshotChunk = { while (reader.pos < end) { const 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; + 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; @@ -2463,7 +2463,7 @@ export const RequestLoadSnapshotChunk = { }, toProtoMsg(message: RequestLoadSnapshotChunk): RequestLoadSnapshotChunkProtoMsg { return { - typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", + typeUrl: '/tendermint.abci.RequestLoadSnapshotChunk', value: RequestLoadSnapshotChunk.encode(message).finish() }; } @@ -2473,16 +2473,16 @@ function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { return { index: 0, chunk: new Uint8Array(), - sender: "" + sender: '' }; } export const RequestApplySnapshotChunk = { - typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", + typeUrl: '/tendermint.abci.RequestApplySnapshotChunk', is(o: any): o is RequestApplySnapshotChunk { - return o && (o.$typeUrl === RequestApplySnapshotChunk.typeUrl || typeof o.index === "number" && (o.chunk instanceof Uint8Array || typeof o.chunk === "string") && typeof o.sender === "string"); + return o && (o.$typeUrl === RequestApplySnapshotChunk.typeUrl || typeof o.index === 'number' && (o.chunk instanceof Uint8Array || typeof o.chunk === 'string') && typeof o.sender === 'string'); }, isAmino(o: any): o is RequestApplySnapshotChunkAmino { - return o && (o.$typeUrl === RequestApplySnapshotChunk.typeUrl || typeof o.index === "number" && (o.chunk instanceof Uint8Array || typeof o.chunk === "string") && typeof o.sender === "string"); + return o && (o.$typeUrl === RequestApplySnapshotChunk.typeUrl || typeof o.index === 'number' && (o.chunk instanceof Uint8Array || typeof o.chunk === 'string') && typeof o.sender === 'string'); }, encode(message: RequestApplySnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.index !== 0) { @@ -2491,7 +2491,7 @@ export const RequestApplySnapshotChunk = { if (message.chunk.length !== 0) { writer.uint32(18).bytes(message.chunk); } - if (message.sender !== "") { + if (message.sender !== '') { writer.uint32(26).string(message.sender); } return writer; @@ -2503,18 +2503,18 @@ export const RequestApplySnapshotChunk = { while (reader.pos < end) { const 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; + 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; @@ -2523,7 +2523,7 @@ export const RequestApplySnapshotChunk = { const message = createBaseRequestApplySnapshotChunk(); message.index = object.index ?? 0; message.chunk = object.chunk ?? new Uint8Array(); - message.sender = object.sender ?? ""; + message.sender = object.sender ?? ''; return message; }, fromAmino(object: RequestApplySnapshotChunkAmino): RequestApplySnapshotChunk { @@ -2543,7 +2543,7 @@ export const RequestApplySnapshotChunk = { const obj: any = {}; obj.index = message.index === 0 ? undefined : message.index; obj.chunk = message.chunk ? base64FromBytes(message.chunk) : undefined; - obj.sender = message.sender === "" ? undefined : message.sender; + obj.sender = message.sender === '' ? undefined : message.sender; return obj; }, fromAminoMsg(object: RequestApplySnapshotChunkAminoMsg): RequestApplySnapshotChunk { @@ -2557,7 +2557,7 @@ export const RequestApplySnapshotChunk = { }, toProtoMsg(message: RequestApplySnapshotChunk): RequestApplySnapshotChunkProtoMsg { return { - typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", + typeUrl: '/tendermint.abci.RequestApplySnapshotChunk', value: RequestApplySnapshotChunk.encode(message).finish() }; } @@ -2576,12 +2576,12 @@ function createBaseRequestPrepareProposal(): RequestPrepareProposal { }; } export const RequestPrepareProposal = { - typeUrl: "/tendermint.abci.RequestPrepareProposal", + typeUrl: '/tendermint.abci.RequestPrepareProposal', is(o: any): o is RequestPrepareProposal { - return o && (o.$typeUrl === RequestPrepareProposal.typeUrl || typeof o.maxTxBytes === "bigint" && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && ExtendedCommitInfo.is(o.localLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && typeof o.height === "bigint" && Timestamp.is(o.time) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === "string") && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === "string")); + return o && (o.$typeUrl === RequestPrepareProposal.typeUrl || typeof o.maxTxBytes === 'bigint' && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && ExtendedCommitInfo.is(o.localLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && typeof o.height === 'bigint' && Timestamp.is(o.time) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === 'string') && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === 'string')); }, isAmino(o: any): o is RequestPrepareProposalAmino { - return o && (o.$typeUrl === RequestPrepareProposal.typeUrl || typeof o.max_tx_bytes === "bigint" && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && ExtendedCommitInfo.isAmino(o.local_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && typeof o.height === "bigint" && Timestamp.isAmino(o.time) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === "string") && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === "string")); + return o && (o.$typeUrl === RequestPrepareProposal.typeUrl || typeof o.max_tx_bytes === 'bigint' && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && ExtendedCommitInfo.isAmino(o.local_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && typeof o.height === 'bigint' && Timestamp.isAmino(o.time) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === 'string') && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === 'string')); }, encode(message: RequestPrepareProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.maxTxBytes !== BigInt(0)) { @@ -2617,33 +2617,33 @@ export const RequestPrepareProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.maxTxBytes = reader.int64(); - break; - case 2: - message.txs.push(reader.bytes()); - break; - case 3: - message.localLastCommit = ExtendedCommitInfo.decode(reader, reader.uint32()); - break; - case 4: - message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); - break; - case 5: - message.height = reader.int64(); - break; - case 6: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.nextValidatorsHash = reader.bytes(); - break; - case 8: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.maxTxBytes = reader.int64(); + break; + case 2: + message.txs.push(reader.bytes()); + break; + case 3: + message.localLastCommit = ExtendedCommitInfo.decode(reader, reader.uint32()); + break; + case 4: + message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); + break; + case 5: + message.height = reader.int64(); + break; + case 6: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 7: + message.nextValidatorsHash = reader.bytes(); + break; + case 8: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2715,7 +2715,7 @@ export const RequestPrepareProposal = { }, toProtoMsg(message: RequestPrepareProposal): RequestPrepareProposalProtoMsg { return { - typeUrl: "/tendermint.abci.RequestPrepareProposal", + typeUrl: '/tendermint.abci.RequestPrepareProposal', value: RequestPrepareProposal.encode(message).finish() }; } @@ -2734,12 +2734,12 @@ function createBaseRequestProcessProposal(): RequestProcessProposal { }; } export const RequestProcessProposal = { - typeUrl: "/tendermint.abci.RequestProcessProposal", + typeUrl: '/tendermint.abci.RequestProcessProposal', is(o: any): o is RequestProcessProposal { - return o && (o.$typeUrl === RequestProcessProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && CommitInfo.is(o.proposedLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === "string") && typeof o.height === "bigint" && Timestamp.is(o.time) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === "string") && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === "string")); + return o && (o.$typeUrl === RequestProcessProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && CommitInfo.is(o.proposedLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === 'string') && typeof o.height === 'bigint' && Timestamp.is(o.time) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === 'string') && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === 'string')); }, isAmino(o: any): o is RequestProcessProposalAmino { - return o && (o.$typeUrl === RequestProcessProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && CommitInfo.isAmino(o.proposed_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === "string") && typeof o.height === "bigint" && Timestamp.isAmino(o.time) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === "string") && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === "string")); + return o && (o.$typeUrl === RequestProcessProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && CommitInfo.isAmino(o.proposed_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === 'string') && typeof o.height === 'bigint' && Timestamp.isAmino(o.time) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === 'string') && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === 'string')); }, encode(message: RequestProcessProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.txs) { @@ -2775,33 +2775,33 @@ export const RequestProcessProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - case 2: - message.proposedLastCommit = CommitInfo.decode(reader, reader.uint32()); - break; - case 3: - message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.height = reader.int64(); - break; - case 6: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.nextValidatorsHash = reader.bytes(); - break; - case 8: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.txs.push(reader.bytes()); + break; + case 2: + message.proposedLastCommit = CommitInfo.decode(reader, reader.uint32()); + break; + case 3: + message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); + break; + case 4: + message.hash = reader.bytes(); + break; + case 5: + message.height = reader.int64(); + break; + case 6: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 7: + message.nextValidatorsHash = reader.bytes(); + break; + case 8: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2873,7 +2873,7 @@ export const RequestProcessProposal = { }, toProtoMsg(message: RequestProcessProposal): RequestProcessProposalProtoMsg { return { - typeUrl: "/tendermint.abci.RequestProcessProposal", + typeUrl: '/tendermint.abci.RequestProcessProposal', value: RequestProcessProposal.encode(message).finish() }; } @@ -2892,12 +2892,12 @@ function createBaseRequestExtendVote(): RequestExtendVote { }; } export const RequestExtendVote = { - typeUrl: "/tendermint.abci.RequestExtendVote", + typeUrl: '/tendermint.abci.RequestExtendVote', is(o: any): o is RequestExtendVote { - return o && (o.$typeUrl === RequestExtendVote.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === "string") && typeof o.height === "bigint" && Timestamp.is(o.time) && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && CommitInfo.is(o.proposedLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === "string") && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === "string")); + return o && (o.$typeUrl === RequestExtendVote.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === 'string') && typeof o.height === 'bigint' && Timestamp.is(o.time) && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && CommitInfo.is(o.proposedLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === 'string') && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === 'string')); }, isAmino(o: any): o is RequestExtendVoteAmino { - return o && (o.$typeUrl === RequestExtendVote.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === "string") && typeof o.height === "bigint" && Timestamp.isAmino(o.time) && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && CommitInfo.isAmino(o.proposed_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === "string") && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === "string")); + return o && (o.$typeUrl === RequestExtendVote.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === 'string') && typeof o.height === 'bigint' && Timestamp.isAmino(o.time) && Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && CommitInfo.isAmino(o.proposed_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === 'string') && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === 'string')); }, encode(message: RequestExtendVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.hash.length !== 0) { @@ -2933,33 +2933,33 @@ export const RequestExtendVote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.txs.push(reader.bytes()); - break; - case 5: - message.proposedLastCommit = CommitInfo.decode(reader, reader.uint32()); - break; - case 6: - message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); - break; - case 7: - message.nextValidatorsHash = reader.bytes(); - break; - case 8: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 4: + message.txs.push(reader.bytes()); + break; + case 5: + message.proposedLastCommit = CommitInfo.decode(reader, reader.uint32()); + break; + case 6: + message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); + break; + case 7: + message.nextValidatorsHash = reader.bytes(); + break; + case 8: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3031,7 +3031,7 @@ export const RequestExtendVote = { }, toProtoMsg(message: RequestExtendVote): RequestExtendVoteProtoMsg { return { - typeUrl: "/tendermint.abci.RequestExtendVote", + typeUrl: '/tendermint.abci.RequestExtendVote', value: RequestExtendVote.encode(message).finish() }; } @@ -3046,12 +3046,12 @@ function createBaseRequestVerifyVoteExtension(): RequestVerifyVoteExtension { }; } export const RequestVerifyVoteExtension = { - typeUrl: "/tendermint.abci.RequestVerifyVoteExtension", + typeUrl: '/tendermint.abci.RequestVerifyVoteExtension', is(o: any): o is RequestVerifyVoteExtension { - return o && (o.$typeUrl === RequestVerifyVoteExtension.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === "string") && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === "string") && typeof o.height === "bigint" && (o.voteExtension instanceof Uint8Array || typeof o.voteExtension === "string")); + return o && (o.$typeUrl === RequestVerifyVoteExtension.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === 'string') && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === 'string') && typeof o.height === 'bigint' && (o.voteExtension instanceof Uint8Array || typeof o.voteExtension === 'string')); }, isAmino(o: any): o is RequestVerifyVoteExtensionAmino { - return o && (o.$typeUrl === RequestVerifyVoteExtension.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === "string") && (o.validator_address instanceof Uint8Array || typeof o.validator_address === "string") && typeof o.height === "bigint" && (o.vote_extension instanceof Uint8Array || typeof o.vote_extension === "string")); + return o && (o.$typeUrl === RequestVerifyVoteExtension.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === 'string') && (o.validator_address instanceof Uint8Array || typeof o.validator_address === 'string') && typeof o.height === 'bigint' && (o.vote_extension instanceof Uint8Array || typeof o.vote_extension === 'string')); }, encode(message: RequestVerifyVoteExtension, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.hash.length !== 0) { @@ -3075,21 +3075,21 @@ export const RequestVerifyVoteExtension = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.voteExtension = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.voteExtension = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3137,7 +3137,7 @@ export const RequestVerifyVoteExtension = { }, toProtoMsg(message: RequestVerifyVoteExtension): RequestVerifyVoteExtensionProtoMsg { return { - typeUrl: "/tendermint.abci.RequestVerifyVoteExtension", + typeUrl: '/tendermint.abci.RequestVerifyVoteExtension', value: RequestVerifyVoteExtension.encode(message).finish() }; } @@ -3156,12 +3156,12 @@ function createBaseRequestFinalizeBlock(): RequestFinalizeBlock { }; } export const RequestFinalizeBlock = { - typeUrl: "/tendermint.abci.RequestFinalizeBlock", + typeUrl: '/tendermint.abci.RequestFinalizeBlock', is(o: any): o is RequestFinalizeBlock { - return o && (o.$typeUrl === RequestFinalizeBlock.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && CommitInfo.is(o.decidedLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === "string") && typeof o.height === "bigint" && Timestamp.is(o.time) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === "string") && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === "string")); + return o && (o.$typeUrl === RequestFinalizeBlock.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && CommitInfo.is(o.decidedLastCommit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.is(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === 'string') && typeof o.height === 'bigint' && Timestamp.is(o.time) && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === 'string') && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === 'string')); }, isAmino(o: any): o is RequestFinalizeBlockAmino { - return o && (o.$typeUrl === RequestFinalizeBlock.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string") && CommitInfo.isAmino(o.decided_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === "string") && typeof o.height === "bigint" && Timestamp.isAmino(o.time) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === "string") && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === "string")); + return o && (o.$typeUrl === RequestFinalizeBlock.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string') && CommitInfo.isAmino(o.decided_last_commit) && Array.isArray(o.misbehavior) && (!o.misbehavior.length || Misbehavior.isAmino(o.misbehavior[0])) && (o.hash instanceof Uint8Array || typeof o.hash === 'string') && typeof o.height === 'bigint' && Timestamp.isAmino(o.time) && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === 'string') && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === 'string')); }, encode(message: RequestFinalizeBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.txs) { @@ -3197,33 +3197,33 @@ export const RequestFinalizeBlock = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - case 2: - message.decidedLastCommit = CommitInfo.decode(reader, reader.uint32()); - break; - case 3: - message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.height = reader.int64(); - break; - case 6: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.nextValidatorsHash = reader.bytes(); - break; - case 8: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.txs.push(reader.bytes()); + break; + case 2: + message.decidedLastCommit = CommitInfo.decode(reader, reader.uint32()); + break; + case 3: + message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); + break; + case 4: + message.hash = reader.bytes(); + break; + case 5: + message.height = reader.int64(); + break; + case 6: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 7: + message.nextValidatorsHash = reader.bytes(); + break; + case 8: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3295,7 +3295,7 @@ export const RequestFinalizeBlock = { }, toProtoMsg(message: RequestFinalizeBlock): RequestFinalizeBlockProtoMsg { return { - typeUrl: "/tendermint.abci.RequestFinalizeBlock", + typeUrl: '/tendermint.abci.RequestFinalizeBlock', value: RequestFinalizeBlock.encode(message).finish() }; } @@ -3323,7 +3323,7 @@ function createBaseResponse(): Response { }; } export const Response = { - typeUrl: "/tendermint.abci.Response", + typeUrl: '/tendermint.abci.Response', is(o: any): o is Response { return o && o.$typeUrl === Response.typeUrl; }, @@ -3391,60 +3391,60 @@ export const Response = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 6: - message.initChain = ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 9: - message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32()); - break; - case 14: - message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32()); - break; - case 15: - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32()); - break; - case 17: - message.prepareProposal = ResponsePrepareProposal.decode(reader, reader.uint32()); - break; - case 18: - message.processProposal = ResponseProcessProposal.decode(reader, reader.uint32()); - break; - case 19: - message.extendVote = ResponseExtendVote.decode(reader, reader.uint32()); - break; - case 20: - message.verifyVoteExtension = ResponseVerifyVoteExtension.decode(reader, reader.uint32()); - break; - case 21: - message.finalizeBlock = ResponseFinalizeBlock.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.exception = ResponseException.decode(reader, reader.uint32()); + break; + case 2: + message.echo = ResponseEcho.decode(reader, reader.uint32()); + break; + case 3: + message.flush = ResponseFlush.decode(reader, reader.uint32()); + break; + case 4: + message.info = ResponseInfo.decode(reader, reader.uint32()); + break; + case 6: + message.initChain = ResponseInitChain.decode(reader, reader.uint32()); + break; + case 7: + message.query = ResponseQuery.decode(reader, reader.uint32()); + break; + case 9: + message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); + break; + case 12: + message.commit = ResponseCommit.decode(reader, reader.uint32()); + break; + case 13: + message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32()); + break; + case 14: + message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32()); + break; + case 15: + message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 16: + message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32()); + break; + case 17: + message.prepareProposal = ResponsePrepareProposal.decode(reader, reader.uint32()); + break; + case 18: + message.processProposal = ResponseProcessProposal.decode(reader, reader.uint32()); + break; + case 19: + message.extendVote = ResponseExtendVote.decode(reader, reader.uint32()); + break; + case 20: + message.verifyVoteExtension = ResponseVerifyVoteExtension.decode(reader, reader.uint32()); + break; + case 21: + message.finalizeBlock = ResponseFinalizeBlock.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3557,7 +3557,7 @@ export const Response = { }, toProtoMsg(message: Response): ResponseProtoMsg { return { - typeUrl: "/tendermint.abci.Response", + typeUrl: '/tendermint.abci.Response', value: Response.encode(message).finish() }; } @@ -3565,19 +3565,19 @@ export const Response = { GlobalDecoderRegistry.register(Response.typeUrl, Response); function createBaseResponseException(): ResponseException { return { - error: "" + error: '' }; } export const ResponseException = { - typeUrl: "/tendermint.abci.ResponseException", + typeUrl: '/tendermint.abci.ResponseException', is(o: any): o is ResponseException { - return o && (o.$typeUrl === ResponseException.typeUrl || typeof o.error === "string"); + return o && (o.$typeUrl === ResponseException.typeUrl || typeof o.error === 'string'); }, isAmino(o: any): o is ResponseExceptionAmino { - return o && (o.$typeUrl === ResponseException.typeUrl || typeof o.error === "string"); + return o && (o.$typeUrl === ResponseException.typeUrl || typeof o.error === 'string'); }, encode(message: ResponseException, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.error !== "") { + if (message.error !== '') { writer.uint32(10).string(message.error); } return writer; @@ -3589,19 +3589,19 @@ export const ResponseException = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ResponseException { const message = createBaseResponseException(); - message.error = object.error ?? ""; + message.error = object.error ?? ''; return message; }, fromAmino(object: ResponseExceptionAmino): ResponseException { @@ -3613,7 +3613,7 @@ export const ResponseException = { }, toAmino(message: ResponseException): ResponseExceptionAmino { const obj: any = {}; - obj.error = message.error === "" ? undefined : message.error; + obj.error = message.error === '' ? undefined : message.error; return obj; }, fromAminoMsg(object: ResponseExceptionAminoMsg): ResponseException { @@ -3627,7 +3627,7 @@ export const ResponseException = { }, toProtoMsg(message: ResponseException): ResponseExceptionProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseException", + typeUrl: '/tendermint.abci.ResponseException', value: ResponseException.encode(message).finish() }; } @@ -3635,19 +3635,19 @@ export const ResponseException = { GlobalDecoderRegistry.register(ResponseException.typeUrl, ResponseException); function createBaseResponseEcho(): ResponseEcho { return { - message: "" + message: '' }; } export const ResponseEcho = { - typeUrl: "/tendermint.abci.ResponseEcho", + typeUrl: '/tendermint.abci.ResponseEcho', is(o: any): o is ResponseEcho { - return o && (o.$typeUrl === ResponseEcho.typeUrl || typeof o.message === "string"); + return o && (o.$typeUrl === ResponseEcho.typeUrl || typeof o.message === 'string'); }, isAmino(o: any): o is ResponseEchoAmino { - return o && (o.$typeUrl === ResponseEcho.typeUrl || typeof o.message === "string"); + return o && (o.$typeUrl === ResponseEcho.typeUrl || typeof o.message === 'string'); }, encode(message: ResponseEcho, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.message !== "") { + if (message.message !== '') { writer.uint32(10).string(message.message); } return writer; @@ -3659,19 +3659,19 @@ export const ResponseEcho = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ResponseEcho { const message = createBaseResponseEcho(); - message.message = object.message ?? ""; + message.message = object.message ?? ''; return message; }, fromAmino(object: ResponseEchoAmino): ResponseEcho { @@ -3683,7 +3683,7 @@ export const ResponseEcho = { }, toAmino(message: ResponseEcho): ResponseEchoAmino { const obj: any = {}; - obj.message = message.message === "" ? undefined : message.message; + obj.message = message.message === '' ? undefined : message.message; return obj; }, fromAminoMsg(object: ResponseEchoAminoMsg): ResponseEcho { @@ -3697,7 +3697,7 @@ export const ResponseEcho = { }, toProtoMsg(message: ResponseEcho): ResponseEchoProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseEcho", + typeUrl: '/tendermint.abci.ResponseEcho', value: ResponseEcho.encode(message).finish() }; } @@ -3707,7 +3707,7 @@ function createBaseResponseFlush(): ResponseFlush { return {}; } export const ResponseFlush = { - typeUrl: "/tendermint.abci.ResponseFlush", + typeUrl: '/tendermint.abci.ResponseFlush', is(o: any): o is ResponseFlush { return o && o.$typeUrl === ResponseFlush.typeUrl; }, @@ -3724,9 +3724,9 @@ export const ResponseFlush = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3754,7 +3754,7 @@ export const ResponseFlush = { }, toProtoMsg(message: ResponseFlush): ResponseFlushProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseFlush", + typeUrl: '/tendermint.abci.ResponseFlush', value: ResponseFlush.encode(message).finish() }; } @@ -3762,26 +3762,26 @@ export const ResponseFlush = { GlobalDecoderRegistry.register(ResponseFlush.typeUrl, ResponseFlush); function createBaseResponseInfo(): ResponseInfo { return { - data: "", - version: "", + data: '', + version: '', appVersion: BigInt(0), lastBlockHeight: BigInt(0), lastBlockAppHash: new Uint8Array() }; } export const ResponseInfo = { - typeUrl: "/tendermint.abci.ResponseInfo", + typeUrl: '/tendermint.abci.ResponseInfo', is(o: any): o is ResponseInfo { - return o && (o.$typeUrl === ResponseInfo.typeUrl || typeof o.data === "string" && typeof o.version === "string" && typeof o.appVersion === "bigint" && typeof o.lastBlockHeight === "bigint" && (o.lastBlockAppHash instanceof Uint8Array || typeof o.lastBlockAppHash === "string")); + return o && (o.$typeUrl === ResponseInfo.typeUrl || typeof o.data === 'string' && typeof o.version === 'string' && typeof o.appVersion === 'bigint' && typeof o.lastBlockHeight === 'bigint' && (o.lastBlockAppHash instanceof Uint8Array || typeof o.lastBlockAppHash === 'string')); }, isAmino(o: any): o is ResponseInfoAmino { - return o && (o.$typeUrl === ResponseInfo.typeUrl || typeof o.data === "string" && typeof o.version === "string" && typeof o.app_version === "bigint" && typeof o.last_block_height === "bigint" && (o.last_block_app_hash instanceof Uint8Array || typeof o.last_block_app_hash === "string")); + return o && (o.$typeUrl === ResponseInfo.typeUrl || typeof o.data === 'string' && typeof o.version === 'string' && typeof o.app_version === 'bigint' && typeof o.last_block_height === 'bigint' && (o.last_block_app_hash instanceof Uint8Array || typeof o.last_block_app_hash === 'string')); }, encode(message: ResponseInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data !== "") { + if (message.data !== '') { writer.uint32(10).string(message.data); } - if (message.version !== "") { + if (message.version !== '') { writer.uint32(18).string(message.version); } if (message.appVersion !== BigInt(0)) { @@ -3802,32 +3802,32 @@ export const ResponseInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.appVersion = reader.uint64(); - break; - case 4: - message.lastBlockHeight = reader.int64(); - break; - case 5: - message.lastBlockAppHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.data = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.appVersion = reader.uint64(); + break; + case 4: + message.lastBlockHeight = reader.int64(); + break; + case 5: + message.lastBlockAppHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): ResponseInfo { const message = createBaseResponseInfo(); - message.data = object.data ?? ""; - message.version = object.version ?? ""; + message.data = object.data ?? ''; + message.version = object.version ?? ''; message.appVersion = object.appVersion !== undefined && object.appVersion !== null ? BigInt(object.appVersion.toString()) : BigInt(0); message.lastBlockHeight = object.lastBlockHeight !== undefined && object.lastBlockHeight !== null ? BigInt(object.lastBlockHeight.toString()) : BigInt(0); message.lastBlockAppHash = object.lastBlockAppHash ?? new Uint8Array(); @@ -3854,8 +3854,8 @@ export const ResponseInfo = { }, toAmino(message: ResponseInfo): ResponseInfoAmino { const obj: any = {}; - obj.data = message.data === "" ? undefined : message.data; - obj.version = message.version === "" ? undefined : message.version; + obj.data = message.data === '' ? undefined : message.data; + obj.version = message.version === '' ? undefined : message.version; obj.app_version = message.appVersion !== BigInt(0) ? message.appVersion.toString() : undefined; obj.last_block_height = message.lastBlockHeight !== BigInt(0) ? message.lastBlockHeight.toString() : undefined; obj.last_block_app_hash = message.lastBlockAppHash ? base64FromBytes(message.lastBlockAppHash) : undefined; @@ -3872,7 +3872,7 @@ export const ResponseInfo = { }, toProtoMsg(message: ResponseInfo): ResponseInfoProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseInfo", + typeUrl: '/tendermint.abci.ResponseInfo', value: ResponseInfo.encode(message).finish() }; } @@ -3886,12 +3886,12 @@ function createBaseResponseInitChain(): ResponseInitChain { }; } export const ResponseInitChain = { - typeUrl: "/tendermint.abci.ResponseInitChain", + typeUrl: '/tendermint.abci.ResponseInitChain', is(o: any): o is ResponseInitChain { - return o && (o.$typeUrl === ResponseInitChain.typeUrl || Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.is(o.validators[0])) && (o.appHash instanceof Uint8Array || typeof o.appHash === "string")); + return o && (o.$typeUrl === ResponseInitChain.typeUrl || Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.is(o.validators[0])) && (o.appHash instanceof Uint8Array || typeof o.appHash === 'string')); }, isAmino(o: any): o is ResponseInitChainAmino { - return o && (o.$typeUrl === ResponseInitChain.typeUrl || Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.isAmino(o.validators[0])) && (o.app_hash instanceof Uint8Array || typeof o.app_hash === "string")); + return o && (o.$typeUrl === ResponseInitChain.typeUrl || Array.isArray(o.validators) && (!o.validators.length || ValidatorUpdate.isAmino(o.validators[0])) && (o.app_hash instanceof Uint8Array || typeof o.app_hash === 'string')); }, encode(message: ResponseInitChain, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.consensusParams !== undefined) { @@ -3912,18 +3912,18 @@ export const ResponseInitChain = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 2: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 3: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); + break; + case 2: + message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 3: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3968,7 +3968,7 @@ export const ResponseInitChain = { }, toProtoMsg(message: ResponseInitChain): ResponseInitChainProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseInitChain", + typeUrl: '/tendermint.abci.ResponseInitChain', value: ResponseInitChain.encode(message).finish() }; } @@ -3977,32 +3977,32 @@ GlobalDecoderRegistry.register(ResponseInitChain.typeUrl, ResponseInitChain); function createBaseResponseQuery(): ResponseQuery { return { code: 0, - log: "", - info: "", + log: '', + info: '', index: BigInt(0), key: new Uint8Array(), value: new Uint8Array(), proofOps: undefined, height: BigInt(0), - codespace: "" + codespace: '' }; } export const ResponseQuery = { - typeUrl: "/tendermint.abci.ResponseQuery", + typeUrl: '/tendermint.abci.ResponseQuery', is(o: any): o is ResponseQuery { - return o && (o.$typeUrl === ResponseQuery.typeUrl || typeof o.code === "number" && typeof o.log === "string" && typeof o.info === "string" && typeof o.index === "bigint" && (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string") && typeof o.height === "bigint" && typeof o.codespace === "string"); + return o && (o.$typeUrl === ResponseQuery.typeUrl || typeof o.code === 'number' && typeof o.log === 'string' && typeof o.info === 'string' && typeof o.index === 'bigint' && (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string') && typeof o.height === 'bigint' && typeof o.codespace === 'string'); }, isAmino(o: any): o is ResponseQueryAmino { - return o && (o.$typeUrl === ResponseQuery.typeUrl || typeof o.code === "number" && typeof o.log === "string" && typeof o.info === "string" && typeof o.index === "bigint" && (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string") && typeof o.height === "bigint" && typeof o.codespace === "string"); + return o && (o.$typeUrl === ResponseQuery.typeUrl || typeof o.code === 'number' && typeof o.log === 'string' && typeof o.info === 'string' && typeof o.index === 'bigint' && (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.value instanceof Uint8Array || typeof o.value === 'string') && typeof o.height === 'bigint' && typeof o.codespace === 'string'); }, encode(message: ResponseQuery, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.code !== 0) { writer.uint32(8).uint32(message.code); } - if (message.log !== "") { + if (message.log !== '') { writer.uint32(26).string(message.log); } - if (message.info !== "") { + if (message.info !== '') { writer.uint32(34).string(message.info); } if (message.index !== BigInt(0)) { @@ -4020,7 +4020,7 @@ export const ResponseQuery = { if (message.height !== BigInt(0)) { writer.uint32(72).int64(message.height); } - if (message.codespace !== "") { + if (message.codespace !== '') { writer.uint32(82).string(message.codespace); } return writer; @@ -4032,36 +4032,36 @@ export const ResponseQuery = { while (reader.pos < end) { const 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.proofOps = 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; + 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.proofOps = 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; @@ -4069,14 +4069,14 @@ export const ResponseQuery = { fromPartial(object: DeepPartial): ResponseQuery { const message = createBaseResponseQuery(); message.code = object.code ?? 0; - message.log = object.log ?? ""; - message.info = object.info ?? ""; + message.log = object.log ?? ''; + message.info = object.info ?? ''; message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); message.proofOps = object.proofOps !== undefined && object.proofOps !== null ? ProofOps.fromPartial(object.proofOps) : undefined; message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.codespace = object.codespace ?? ""; + message.codespace = object.codespace ?? ''; return message; }, fromAmino(object: ResponseQueryAmino): ResponseQuery { @@ -4113,14 +4113,14 @@ export const ResponseQuery = { toAmino(message: ResponseQuery): ResponseQueryAmino { const obj: any = {}; obj.code = message.code === 0 ? undefined : message.code; - obj.log = message.log === "" ? undefined : message.log; - obj.info = message.info === "" ? undefined : message.info; + obj.log = message.log === '' ? undefined : message.log; + obj.info = message.info === '' ? undefined : message.info; obj.index = message.index !== BigInt(0) ? message.index.toString() : undefined; obj.key = message.key ? base64FromBytes(message.key) : undefined; obj.value = message.value ? base64FromBytes(message.value) : undefined; obj.proof_ops = message.proofOps ? ProofOps.toAmino(message.proofOps) : undefined; obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; - obj.codespace = message.codespace === "" ? undefined : message.codespace; + obj.codespace = message.codespace === '' ? undefined : message.codespace; return obj; }, fromAminoMsg(object: ResponseQueryAminoMsg): ResponseQuery { @@ -4134,7 +4134,7 @@ export const ResponseQuery = { }, toProtoMsg(message: ResponseQuery): ResponseQueryProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseQuery", + typeUrl: '/tendermint.abci.ResponseQuery', value: ResponseQuery.encode(message).finish() }; } @@ -4144,21 +4144,21 @@ function createBaseResponseCheckTx(): ResponseCheckTx { return { code: 0, data: new Uint8Array(), - log: "", - info: "", + log: '', + info: '', gasWanted: BigInt(0), gasUsed: BigInt(0), events: [], - codespace: "" + codespace: '' }; } export const ResponseCheckTx = { - typeUrl: "/tendermint.abci.ResponseCheckTx", + typeUrl: '/tendermint.abci.ResponseCheckTx', is(o: any): o is ResponseCheckTx { - return o && (o.$typeUrl === ResponseCheckTx.typeUrl || typeof o.code === "number" && (o.data instanceof Uint8Array || typeof o.data === "string") && typeof o.log === "string" && typeof o.info === "string" && typeof o.gasWanted === "bigint" && typeof o.gasUsed === "bigint" && Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0])) && typeof o.codespace === "string"); + return o && (o.$typeUrl === ResponseCheckTx.typeUrl || typeof o.code === 'number' && (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.log === 'string' && typeof o.info === 'string' && typeof o.gasWanted === 'bigint' && typeof o.gasUsed === 'bigint' && Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0])) && typeof o.codespace === 'string'); }, isAmino(o: any): o is ResponseCheckTxAmino { - return o && (o.$typeUrl === ResponseCheckTx.typeUrl || typeof o.code === "number" && (o.data instanceof Uint8Array || typeof o.data === "string") && typeof o.log === "string" && typeof o.info === "string" && typeof o.gas_wanted === "bigint" && typeof o.gas_used === "bigint" && Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0])) && typeof o.codespace === "string"); + return o && (o.$typeUrl === ResponseCheckTx.typeUrl || typeof o.code === 'number' && (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.log === 'string' && typeof o.info === 'string' && typeof o.gas_wanted === 'bigint' && typeof o.gas_used === 'bigint' && Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0])) && typeof o.codespace === 'string'); }, encode(message: ResponseCheckTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.code !== 0) { @@ -4167,10 +4167,10 @@ export const ResponseCheckTx = { if (message.data.length !== 0) { writer.uint32(18).bytes(message.data); } - if (message.log !== "") { + if (message.log !== '') { writer.uint32(26).string(message.log); } - if (message.info !== "") { + if (message.info !== '') { writer.uint32(34).string(message.info); } if (message.gasWanted !== BigInt(0)) { @@ -4182,7 +4182,7 @@ export const ResponseCheckTx = { for (const v of message.events) { Event.encode(v!, writer.uint32(58).fork()).ldelim(); } - if (message.codespace !== "") { + if (message.codespace !== '') { writer.uint32(66).string(message.codespace); } return writer; @@ -4194,33 +4194,33 @@ export const ResponseCheckTx = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = reader.int64(); - break; - case 6: - message.gasUsed = reader.int64(); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + message.events.push(Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4229,12 +4229,12 @@ export const ResponseCheckTx = { const message = createBaseResponseCheckTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.info = object.info ?? ""; + message.log = object.log ?? ''; + message.info = object.info ?? ''; message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.codespace = object.codespace ?? ""; + message.codespace = object.codespace ?? ''; return message; }, fromAmino(object: ResponseCheckTxAmino): ResponseCheckTx { @@ -4267,8 +4267,8 @@ export const ResponseCheckTx = { const obj: any = {}; obj.code = message.code === 0 ? undefined : message.code; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.log = message.log === "" ? undefined : message.log; - obj.info = message.info === "" ? undefined : message.info; + obj.log = message.log === '' ? undefined : message.log; + obj.info = message.info === '' ? undefined : message.info; obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; if (message.events) { @@ -4276,7 +4276,7 @@ export const ResponseCheckTx = { } else { obj.events = message.events; } - obj.codespace = message.codespace === "" ? undefined : message.codespace; + obj.codespace = message.codespace === '' ? undefined : message.codespace; return obj; }, fromAminoMsg(object: ResponseCheckTxAminoMsg): ResponseCheckTx { @@ -4290,7 +4290,7 @@ export const ResponseCheckTx = { }, toProtoMsg(message: ResponseCheckTx): ResponseCheckTxProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseCheckTx", + typeUrl: '/tendermint.abci.ResponseCheckTx', value: ResponseCheckTx.encode(message).finish() }; } @@ -4302,12 +4302,12 @@ function createBaseResponseCommit(): ResponseCommit { }; } export const ResponseCommit = { - typeUrl: "/tendermint.abci.ResponseCommit", + typeUrl: '/tendermint.abci.ResponseCommit', is(o: any): o is ResponseCommit { - return o && (o.$typeUrl === ResponseCommit.typeUrl || typeof o.retainHeight === "bigint"); + return o && (o.$typeUrl === ResponseCommit.typeUrl || typeof o.retainHeight === 'bigint'); }, isAmino(o: any): o is ResponseCommitAmino { - return o && (o.$typeUrl === ResponseCommit.typeUrl || typeof o.retain_height === "bigint"); + return o && (o.$typeUrl === ResponseCommit.typeUrl || typeof o.retain_height === 'bigint'); }, encode(message: ResponseCommit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.retainHeight !== BigInt(0)) { @@ -4322,12 +4322,12 @@ export const ResponseCommit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.retainHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 3: + message.retainHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4360,7 +4360,7 @@ export const ResponseCommit = { }, toProtoMsg(message: ResponseCommit): ResponseCommitProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseCommit", + typeUrl: '/tendermint.abci.ResponseCommit', value: ResponseCommit.encode(message).finish() }; } @@ -4372,7 +4372,7 @@ function createBaseResponseListSnapshots(): ResponseListSnapshots { }; } export const ResponseListSnapshots = { - typeUrl: "/tendermint.abci.ResponseListSnapshots", + typeUrl: '/tendermint.abci.ResponseListSnapshots', is(o: any): o is ResponseListSnapshots { return o && (o.$typeUrl === ResponseListSnapshots.typeUrl || Array.isArray(o.snapshots) && (!o.snapshots.length || Snapshot.is(o.snapshots[0]))); }, @@ -4392,12 +4392,12 @@ export const ResponseListSnapshots = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.snapshots.push(Snapshot.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4432,7 +4432,7 @@ export const ResponseListSnapshots = { }, toProtoMsg(message: ResponseListSnapshots): ResponseListSnapshotsProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseListSnapshots", + typeUrl: '/tendermint.abci.ResponseListSnapshots', value: ResponseListSnapshots.encode(message).finish() }; } @@ -4444,7 +4444,7 @@ function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { }; } export const ResponseOfferSnapshot = { - typeUrl: "/tendermint.abci.ResponseOfferSnapshot", + typeUrl: '/tendermint.abci.ResponseOfferSnapshot', is(o: any): o is ResponseOfferSnapshot { return o && (o.$typeUrl === ResponseOfferSnapshot.typeUrl || isSet(o.result)); }, @@ -4464,12 +4464,12 @@ export const ResponseOfferSnapshot = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.result = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4502,7 +4502,7 @@ export const ResponseOfferSnapshot = { }, toProtoMsg(message: ResponseOfferSnapshot): ResponseOfferSnapshotProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseOfferSnapshot", + typeUrl: '/tendermint.abci.ResponseOfferSnapshot', value: ResponseOfferSnapshot.encode(message).finish() }; } @@ -4514,12 +4514,12 @@ function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { }; } export const ResponseLoadSnapshotChunk = { - typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", + typeUrl: '/tendermint.abci.ResponseLoadSnapshotChunk', is(o: any): o is ResponseLoadSnapshotChunk { - return o && (o.$typeUrl === ResponseLoadSnapshotChunk.typeUrl || o.chunk instanceof Uint8Array || typeof o.chunk === "string"); + return o && (o.$typeUrl === ResponseLoadSnapshotChunk.typeUrl || o.chunk instanceof Uint8Array || typeof o.chunk === 'string'); }, isAmino(o: any): o is ResponseLoadSnapshotChunkAmino { - return o && (o.$typeUrl === ResponseLoadSnapshotChunk.typeUrl || o.chunk instanceof Uint8Array || typeof o.chunk === "string"); + return o && (o.$typeUrl === ResponseLoadSnapshotChunk.typeUrl || o.chunk instanceof Uint8Array || typeof o.chunk === 'string'); }, encode(message: ResponseLoadSnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.chunk.length !== 0) { @@ -4534,12 +4534,12 @@ export const ResponseLoadSnapshotChunk = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.chunk = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4572,7 +4572,7 @@ export const ResponseLoadSnapshotChunk = { }, toProtoMsg(message: ResponseLoadSnapshotChunk): ResponseLoadSnapshotChunkProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", + typeUrl: '/tendermint.abci.ResponseLoadSnapshotChunk', value: ResponseLoadSnapshotChunk.encode(message).finish() }; } @@ -4586,12 +4586,12 @@ function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { }; } export const ResponseApplySnapshotChunk = { - typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", + typeUrl: '/tendermint.abci.ResponseApplySnapshotChunk', is(o: any): o is ResponseApplySnapshotChunk { - return o && (o.$typeUrl === ResponseApplySnapshotChunk.typeUrl || isSet(o.result) && Array.isArray(o.refetchChunks) && (!o.refetchChunks.length || typeof o.refetchChunks[0] === "number") && Array.isArray(o.rejectSenders) && (!o.rejectSenders.length || typeof o.rejectSenders[0] === "string")); + return o && (o.$typeUrl === ResponseApplySnapshotChunk.typeUrl || isSet(o.result) && Array.isArray(o.refetchChunks) && (!o.refetchChunks.length || typeof o.refetchChunks[0] === 'number') && Array.isArray(o.rejectSenders) && (!o.rejectSenders.length || typeof o.rejectSenders[0] === 'string')); }, isAmino(o: any): o is ResponseApplySnapshotChunkAmino { - return o && (o.$typeUrl === ResponseApplySnapshotChunk.typeUrl || isSet(o.result) && Array.isArray(o.refetch_chunks) && (!o.refetch_chunks.length || typeof o.refetch_chunks[0] === "number") && Array.isArray(o.reject_senders) && (!o.reject_senders.length || typeof o.reject_senders[0] === "string")); + return o && (o.$typeUrl === ResponseApplySnapshotChunk.typeUrl || isSet(o.result) && Array.isArray(o.refetch_chunks) && (!o.refetch_chunks.length || typeof o.refetch_chunks[0] === 'number') && Array.isArray(o.reject_senders) && (!o.reject_senders.length || typeof o.reject_senders[0] === 'string')); }, encode(message: ResponseApplySnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.result !== 0) { @@ -4614,25 +4614,25 @@ export const ResponseApplySnapshotChunk = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetchChunks.push(reader.uint32()); - } - } else { + case 1: + message.result = (reader.int32() as any); + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.refetchChunks.push(reader.uint32()); } - break; - case 3: - message.rejectSenders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + } else { + message.refetchChunks.push(reader.uint32()); + } + break; + case 3: + message.rejectSenders.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4679,7 +4679,7 @@ export const ResponseApplySnapshotChunk = { }, toProtoMsg(message: ResponseApplySnapshotChunk): ResponseApplySnapshotChunkProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", + typeUrl: '/tendermint.abci.ResponseApplySnapshotChunk', value: ResponseApplySnapshotChunk.encode(message).finish() }; } @@ -4691,12 +4691,12 @@ function createBaseResponsePrepareProposal(): ResponsePrepareProposal { }; } export const ResponsePrepareProposal = { - typeUrl: "/tendermint.abci.ResponsePrepareProposal", + typeUrl: '/tendermint.abci.ResponsePrepareProposal', is(o: any): o is ResponsePrepareProposal { - return o && (o.$typeUrl === ResponsePrepareProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string")); + return o && (o.$typeUrl === ResponsePrepareProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string')); }, isAmino(o: any): o is ResponsePrepareProposalAmino { - return o && (o.$typeUrl === ResponsePrepareProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string")); + return o && (o.$typeUrl === ResponsePrepareProposal.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string')); }, encode(message: ResponsePrepareProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.txs) { @@ -4711,12 +4711,12 @@ export const ResponsePrepareProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.txs.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4751,7 +4751,7 @@ export const ResponsePrepareProposal = { }, toProtoMsg(message: ResponsePrepareProposal): ResponsePrepareProposalProtoMsg { return { - typeUrl: "/tendermint.abci.ResponsePrepareProposal", + typeUrl: '/tendermint.abci.ResponsePrepareProposal', value: ResponsePrepareProposal.encode(message).finish() }; } @@ -4763,7 +4763,7 @@ function createBaseResponseProcessProposal(): ResponseProcessProposal { }; } export const ResponseProcessProposal = { - typeUrl: "/tendermint.abci.ResponseProcessProposal", + typeUrl: '/tendermint.abci.ResponseProcessProposal', is(o: any): o is ResponseProcessProposal { return o && (o.$typeUrl === ResponseProcessProposal.typeUrl || isSet(o.status)); }, @@ -4783,12 +4783,12 @@ export const ResponseProcessProposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.status = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.status = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4821,7 +4821,7 @@ export const ResponseProcessProposal = { }, toProtoMsg(message: ResponseProcessProposal): ResponseProcessProposalProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseProcessProposal", + typeUrl: '/tendermint.abci.ResponseProcessProposal', value: ResponseProcessProposal.encode(message).finish() }; } @@ -4833,12 +4833,12 @@ function createBaseResponseExtendVote(): ResponseExtendVote { }; } export const ResponseExtendVote = { - typeUrl: "/tendermint.abci.ResponseExtendVote", + typeUrl: '/tendermint.abci.ResponseExtendVote', is(o: any): o is ResponseExtendVote { - return o && (o.$typeUrl === ResponseExtendVote.typeUrl || o.voteExtension instanceof Uint8Array || typeof o.voteExtension === "string"); + return o && (o.$typeUrl === ResponseExtendVote.typeUrl || o.voteExtension instanceof Uint8Array || typeof o.voteExtension === 'string'); }, isAmino(o: any): o is ResponseExtendVoteAmino { - return o && (o.$typeUrl === ResponseExtendVote.typeUrl || o.vote_extension instanceof Uint8Array || typeof o.vote_extension === "string"); + return o && (o.$typeUrl === ResponseExtendVote.typeUrl || o.vote_extension instanceof Uint8Array || typeof o.vote_extension === 'string'); }, encode(message: ResponseExtendVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.voteExtension.length !== 0) { @@ -4853,12 +4853,12 @@ export const ResponseExtendVote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.voteExtension = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.voteExtension = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4891,7 +4891,7 @@ export const ResponseExtendVote = { }, toProtoMsg(message: ResponseExtendVote): ResponseExtendVoteProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseExtendVote", + typeUrl: '/tendermint.abci.ResponseExtendVote', value: ResponseExtendVote.encode(message).finish() }; } @@ -4903,7 +4903,7 @@ function createBaseResponseVerifyVoteExtension(): ResponseVerifyVoteExtension { }; } export const ResponseVerifyVoteExtension = { - typeUrl: "/tendermint.abci.ResponseVerifyVoteExtension", + typeUrl: '/tendermint.abci.ResponseVerifyVoteExtension', is(o: any): o is ResponseVerifyVoteExtension { return o && (o.$typeUrl === ResponseVerifyVoteExtension.typeUrl || isSet(o.status)); }, @@ -4923,12 +4923,12 @@ export const ResponseVerifyVoteExtension = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.status = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.status = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -4961,7 +4961,7 @@ export const ResponseVerifyVoteExtension = { }, toProtoMsg(message: ResponseVerifyVoteExtension): ResponseVerifyVoteExtensionProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseVerifyVoteExtension", + typeUrl: '/tendermint.abci.ResponseVerifyVoteExtension', value: ResponseVerifyVoteExtension.encode(message).finish() }; } @@ -4977,12 +4977,12 @@ function createBaseResponseFinalizeBlock(): ResponseFinalizeBlock { }; } export const ResponseFinalizeBlock = { - typeUrl: "/tendermint.abci.ResponseFinalizeBlock", + typeUrl: '/tendermint.abci.ResponseFinalizeBlock', is(o: any): o is ResponseFinalizeBlock { - return o && (o.$typeUrl === ResponseFinalizeBlock.typeUrl || Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0])) && Array.isArray(o.txResults) && (!o.txResults.length || ExecTxResult.is(o.txResults[0])) && Array.isArray(o.validatorUpdates) && (!o.validatorUpdates.length || ValidatorUpdate.is(o.validatorUpdates[0])) && (o.appHash instanceof Uint8Array || typeof o.appHash === "string")); + return o && (o.$typeUrl === ResponseFinalizeBlock.typeUrl || Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0])) && Array.isArray(o.txResults) && (!o.txResults.length || ExecTxResult.is(o.txResults[0])) && Array.isArray(o.validatorUpdates) && (!o.validatorUpdates.length || ValidatorUpdate.is(o.validatorUpdates[0])) && (o.appHash instanceof Uint8Array || typeof o.appHash === 'string')); }, isAmino(o: any): o is ResponseFinalizeBlockAmino { - return o && (o.$typeUrl === ResponseFinalizeBlock.typeUrl || Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0])) && Array.isArray(o.tx_results) && (!o.tx_results.length || ExecTxResult.isAmino(o.tx_results[0])) && Array.isArray(o.validator_updates) && (!o.validator_updates.length || ValidatorUpdate.isAmino(o.validator_updates[0])) && (o.app_hash instanceof Uint8Array || typeof o.app_hash === "string")); + return o && (o.$typeUrl === ResponseFinalizeBlock.typeUrl || Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0])) && Array.isArray(o.tx_results) && (!o.tx_results.length || ExecTxResult.isAmino(o.tx_results[0])) && Array.isArray(o.validator_updates) && (!o.validator_updates.length || ValidatorUpdate.isAmino(o.validator_updates[0])) && (o.app_hash instanceof Uint8Array || typeof o.app_hash === 'string')); }, encode(message: ResponseFinalizeBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.events) { @@ -5009,24 +5009,24 @@ export const ResponseFinalizeBlock = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 2: - message.txResults.push(ExecTxResult.decode(reader, reader.uint32())); - break; - case 3: - message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 4: - message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32()); - break; - case 5: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.events.push(Event.decode(reader, reader.uint32())); + break; + case 2: + message.txResults.push(ExecTxResult.decode(reader, reader.uint32())); + break; + case 3: + message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 4: + message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32()); + break; + case 5: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5085,7 +5085,7 @@ export const ResponseFinalizeBlock = { }, toProtoMsg(message: ResponseFinalizeBlock): ResponseFinalizeBlockProtoMsg { return { - typeUrl: "/tendermint.abci.ResponseFinalizeBlock", + typeUrl: '/tendermint.abci.ResponseFinalizeBlock', value: ResponseFinalizeBlock.encode(message).finish() }; } @@ -5098,12 +5098,12 @@ function createBaseCommitInfo(): CommitInfo { }; } export const CommitInfo = { - typeUrl: "/tendermint.abci.CommitInfo", + typeUrl: '/tendermint.abci.CommitInfo', is(o: any): o is CommitInfo { - return o && (o.$typeUrl === CommitInfo.typeUrl || typeof o.round === "number" && Array.isArray(o.votes) && (!o.votes.length || VoteInfo.is(o.votes[0]))); + return o && (o.$typeUrl === CommitInfo.typeUrl || typeof o.round === 'number' && Array.isArray(o.votes) && (!o.votes.length || VoteInfo.is(o.votes[0]))); }, isAmino(o: any): o is CommitInfoAmino { - return o && (o.$typeUrl === CommitInfo.typeUrl || typeof o.round === "number" && Array.isArray(o.votes) && (!o.votes.length || VoteInfo.isAmino(o.votes[0]))); + return o && (o.$typeUrl === CommitInfo.typeUrl || typeof o.round === 'number' && Array.isArray(o.votes) && (!o.votes.length || VoteInfo.isAmino(o.votes[0]))); }, encode(message: CommitInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.round !== 0) { @@ -5121,15 +5121,15 @@ export const CommitInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.round = reader.int32(); + break; + case 2: + message.votes.push(VoteInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5169,7 +5169,7 @@ export const CommitInfo = { }, toProtoMsg(message: CommitInfo): CommitInfoProtoMsg { return { - typeUrl: "/tendermint.abci.CommitInfo", + typeUrl: '/tendermint.abci.CommitInfo', value: CommitInfo.encode(message).finish() }; } @@ -5182,12 +5182,12 @@ function createBaseExtendedCommitInfo(): ExtendedCommitInfo { }; } export const ExtendedCommitInfo = { - typeUrl: "/tendermint.abci.ExtendedCommitInfo", + typeUrl: '/tendermint.abci.ExtendedCommitInfo', is(o: any): o is ExtendedCommitInfo { - return o && (o.$typeUrl === ExtendedCommitInfo.typeUrl || typeof o.round === "number" && Array.isArray(o.votes) && (!o.votes.length || ExtendedVoteInfo.is(o.votes[0]))); + return o && (o.$typeUrl === ExtendedCommitInfo.typeUrl || typeof o.round === 'number' && Array.isArray(o.votes) && (!o.votes.length || ExtendedVoteInfo.is(o.votes[0]))); }, isAmino(o: any): o is ExtendedCommitInfoAmino { - return o && (o.$typeUrl === ExtendedCommitInfo.typeUrl || typeof o.round === "number" && Array.isArray(o.votes) && (!o.votes.length || ExtendedVoteInfo.isAmino(o.votes[0]))); + return o && (o.$typeUrl === ExtendedCommitInfo.typeUrl || typeof o.round === 'number' && Array.isArray(o.votes) && (!o.votes.length || ExtendedVoteInfo.isAmino(o.votes[0]))); }, encode(message: ExtendedCommitInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.round !== 0) { @@ -5205,15 +5205,15 @@ export const ExtendedCommitInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(ExtendedVoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.round = reader.int32(); + break; + case 2: + message.votes.push(ExtendedVoteInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5253,7 +5253,7 @@ export const ExtendedCommitInfo = { }, toProtoMsg(message: ExtendedCommitInfo): ExtendedCommitInfoProtoMsg { return { - typeUrl: "/tendermint.abci.ExtendedCommitInfo", + typeUrl: '/tendermint.abci.ExtendedCommitInfo', value: ExtendedCommitInfo.encode(message).finish() }; } @@ -5261,20 +5261,20 @@ export const ExtendedCommitInfo = { GlobalDecoderRegistry.register(ExtendedCommitInfo.typeUrl, ExtendedCommitInfo); function createBaseEvent(): Event { return { - type: "", + type: '', attributes: [] }; } export const Event = { - typeUrl: "/tendermint.abci.Event", + typeUrl: '/tendermint.abci.Event', is(o: any): o is Event { - return o && (o.$typeUrl === Event.typeUrl || typeof o.type === "string" && Array.isArray(o.attributes) && (!o.attributes.length || EventAttribute.is(o.attributes[0]))); + return o && (o.$typeUrl === Event.typeUrl || typeof o.type === 'string' && Array.isArray(o.attributes) && (!o.attributes.length || EventAttribute.is(o.attributes[0]))); }, isAmino(o: any): o is EventAmino { - return o && (o.$typeUrl === Event.typeUrl || typeof o.type === "string" && Array.isArray(o.attributes) && (!o.attributes.length || EventAttribute.isAmino(o.attributes[0]))); + return o && (o.$typeUrl === Event.typeUrl || typeof o.type === 'string' && Array.isArray(o.attributes) && (!o.attributes.length || EventAttribute.isAmino(o.attributes[0]))); }, encode(message: Event, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { + if (message.type !== '') { writer.uint32(10).string(message.type); } for (const v of message.attributes) { @@ -5289,22 +5289,22 @@ export const Event = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(EventAttribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.type = reader.string(); + break; + case 2: + message.attributes.push(EventAttribute.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): Event { const message = createBaseEvent(); - message.type = object.type ?? ""; + message.type = object.type ?? ''; message.attributes = object.attributes?.map(e => EventAttribute.fromPartial(e)) || []; return message; }, @@ -5318,7 +5318,7 @@ export const Event = { }, toAmino(message: Event): EventAmino { const obj: any = {}; - obj.type = message.type === "" ? undefined : message.type; + obj.type = message.type === '' ? undefined : message.type; if (message.attributes) { obj.attributes = message.attributes.map(e => e ? EventAttribute.toAmino(e) : undefined); } else { @@ -5337,7 +5337,7 @@ export const Event = { }, toProtoMsg(message: Event): EventProtoMsg { return { - typeUrl: "/tendermint.abci.Event", + typeUrl: '/tendermint.abci.Event', value: Event.encode(message).finish() }; } @@ -5345,24 +5345,24 @@ export const Event = { GlobalDecoderRegistry.register(Event.typeUrl, Event); function createBaseEventAttribute(): EventAttribute { return { - key: "", - value: "", + key: '', + value: '', index: false }; } export const EventAttribute = { - typeUrl: "/tendermint.abci.EventAttribute", + typeUrl: '/tendermint.abci.EventAttribute', is(o: any): o is EventAttribute { - return o && (o.$typeUrl === EventAttribute.typeUrl || typeof o.key === "string" && typeof o.value === "string" && typeof o.index === "boolean"); + return o && (o.$typeUrl === EventAttribute.typeUrl || typeof o.key === 'string' && typeof o.value === 'string' && typeof o.index === 'boolean'); }, isAmino(o: any): o is EventAttributeAmino { - return o && (o.$typeUrl === EventAttribute.typeUrl || typeof o.key === "string" && typeof o.value === "string" && typeof o.index === "boolean"); + return o && (o.$typeUrl === EventAttribute.typeUrl || typeof o.key === 'string' && typeof o.value === 'string' && typeof o.index === 'boolean'); }, encode(message: EventAttribute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { + if (message.key !== '') { writer.uint32(10).string(message.key); } - if (message.value !== "") { + if (message.value !== '') { writer.uint32(18).string(message.value); } if (message.index === true) { @@ -5377,26 +5377,26 @@ export const EventAttribute = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + case 3: + message.index = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }, fromPartial(object: DeepPartial): EventAttribute { const message = createBaseEventAttribute(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; + message.key = object.key ?? ''; + message.value = object.value ?? ''; message.index = object.index ?? false; return message; }, @@ -5415,8 +5415,8 @@ export const EventAttribute = { }, toAmino(message: EventAttribute): EventAttributeAmino { const obj: any = {}; - obj.key = message.key === "" ? undefined : message.key; - obj.value = message.value === "" ? undefined : message.value; + obj.key = message.key === '' ? undefined : message.key; + obj.value = message.value === '' ? undefined : message.value; obj.index = message.index === false ? undefined : message.index; return obj; }, @@ -5431,7 +5431,7 @@ export const EventAttribute = { }, toProtoMsg(message: EventAttribute): EventAttributeProtoMsg { return { - typeUrl: "/tendermint.abci.EventAttribute", + typeUrl: '/tendermint.abci.EventAttribute', value: EventAttribute.encode(message).finish() }; } @@ -5441,21 +5441,21 @@ function createBaseExecTxResult(): ExecTxResult { return { code: 0, data: new Uint8Array(), - log: "", - info: "", + log: '', + info: '', gasWanted: BigInt(0), gasUsed: BigInt(0), events: [], - codespace: "" + codespace: '' }; } export const ExecTxResult = { - typeUrl: "/tendermint.abci.ExecTxResult", + typeUrl: '/tendermint.abci.ExecTxResult', is(o: any): o is ExecTxResult { - return o && (o.$typeUrl === ExecTxResult.typeUrl || typeof o.code === "number" && (o.data instanceof Uint8Array || typeof o.data === "string") && typeof o.log === "string" && typeof o.info === "string" && typeof o.gasWanted === "bigint" && typeof o.gasUsed === "bigint" && Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0])) && typeof o.codespace === "string"); + return o && (o.$typeUrl === ExecTxResult.typeUrl || typeof o.code === 'number' && (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.log === 'string' && typeof o.info === 'string' && typeof o.gasWanted === 'bigint' && typeof o.gasUsed === 'bigint' && Array.isArray(o.events) && (!o.events.length || Event.is(o.events[0])) && typeof o.codespace === 'string'); }, isAmino(o: any): o is ExecTxResultAmino { - return o && (o.$typeUrl === ExecTxResult.typeUrl || typeof o.code === "number" && (o.data instanceof Uint8Array || typeof o.data === "string") && typeof o.log === "string" && typeof o.info === "string" && typeof o.gas_wanted === "bigint" && typeof o.gas_used === "bigint" && Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0])) && typeof o.codespace === "string"); + return o && (o.$typeUrl === ExecTxResult.typeUrl || typeof o.code === 'number' && (o.data instanceof Uint8Array || typeof o.data === 'string') && typeof o.log === 'string' && typeof o.info === 'string' && typeof o.gas_wanted === 'bigint' && typeof o.gas_used === 'bigint' && Array.isArray(o.events) && (!o.events.length || Event.isAmino(o.events[0])) && typeof o.codespace === 'string'); }, encode(message: ExecTxResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.code !== 0) { @@ -5464,10 +5464,10 @@ export const ExecTxResult = { if (message.data.length !== 0) { writer.uint32(18).bytes(message.data); } - if (message.log !== "") { + if (message.log !== '') { writer.uint32(26).string(message.log); } - if (message.info !== "") { + if (message.info !== '') { writer.uint32(34).string(message.info); } if (message.gasWanted !== BigInt(0)) { @@ -5479,7 +5479,7 @@ export const ExecTxResult = { for (const v of message.events) { Event.encode(v!, writer.uint32(58).fork()).ldelim(); } - if (message.codespace !== "") { + if (message.codespace !== '') { writer.uint32(66).string(message.codespace); } return writer; @@ -5491,33 +5491,33 @@ export const ExecTxResult = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = reader.int64(); - break; - case 6: - message.gasUsed = reader.int64(); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + message.events.push(Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5526,12 +5526,12 @@ export const ExecTxResult = { const message = createBaseExecTxResult(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.info = object.info ?? ""; + message.log = object.log ?? ''; + message.info = object.info ?? ''; message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.codespace = object.codespace ?? ""; + message.codespace = object.codespace ?? ''; return message; }, fromAmino(object: ExecTxResultAmino): ExecTxResult { @@ -5564,8 +5564,8 @@ export const ExecTxResult = { const obj: any = {}; obj.code = message.code === 0 ? undefined : message.code; obj.data = message.data ? base64FromBytes(message.data) : undefined; - obj.log = message.log === "" ? undefined : message.log; - obj.info = message.info === "" ? undefined : message.info; + obj.log = message.log === '' ? undefined : message.log; + obj.info = message.info === '' ? undefined : message.info; obj.gas_wanted = message.gasWanted !== BigInt(0) ? message.gasWanted.toString() : undefined; obj.gas_used = message.gasUsed !== BigInt(0) ? message.gasUsed.toString() : undefined; if (message.events) { @@ -5573,7 +5573,7 @@ export const ExecTxResult = { } else { obj.events = message.events; } - obj.codespace = message.codespace === "" ? undefined : message.codespace; + obj.codespace = message.codespace === '' ? undefined : message.codespace; return obj; }, fromAminoMsg(object: ExecTxResultAminoMsg): ExecTxResult { @@ -5587,7 +5587,7 @@ export const ExecTxResult = { }, toProtoMsg(message: ExecTxResult): ExecTxResultProtoMsg { return { - typeUrl: "/tendermint.abci.ExecTxResult", + typeUrl: '/tendermint.abci.ExecTxResult', value: ExecTxResult.encode(message).finish() }; } @@ -5602,12 +5602,12 @@ function createBaseTxResult(): TxResult { }; } export const TxResult = { - typeUrl: "/tendermint.abci.TxResult", + typeUrl: '/tendermint.abci.TxResult', is(o: any): o is TxResult { - return o && (o.$typeUrl === TxResult.typeUrl || typeof o.height === "bigint" && typeof o.index === "number" && (o.tx instanceof Uint8Array || typeof o.tx === "string") && ExecTxResult.is(o.result)); + return o && (o.$typeUrl === TxResult.typeUrl || typeof o.height === 'bigint' && typeof o.index === 'number' && (o.tx instanceof Uint8Array || typeof o.tx === 'string') && ExecTxResult.is(o.result)); }, isAmino(o: any): o is TxResultAmino { - return o && (o.$typeUrl === TxResult.typeUrl || typeof o.height === "bigint" && typeof o.index === "number" && (o.tx instanceof Uint8Array || typeof o.tx === "string") && ExecTxResult.isAmino(o.result)); + return o && (o.$typeUrl === TxResult.typeUrl || typeof o.height === 'bigint' && typeof o.index === 'number' && (o.tx instanceof Uint8Array || typeof o.tx === 'string') && ExecTxResult.isAmino(o.result)); }, encode(message: TxResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.height !== BigInt(0)) { @@ -5631,21 +5631,21 @@ export const TxResult = { while (reader.pos < end) { const 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 = ExecTxResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + 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 = ExecTxResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5693,7 +5693,7 @@ export const TxResult = { }, toProtoMsg(message: TxResult): TxResultProtoMsg { return { - typeUrl: "/tendermint.abci.TxResult", + typeUrl: '/tendermint.abci.TxResult', value: TxResult.encode(message).finish() }; } @@ -5706,12 +5706,12 @@ function createBaseValidator(): Validator { }; } export const Validator = { - typeUrl: "/tendermint.abci.Validator", + typeUrl: '/tendermint.abci.Validator', is(o: any): o is Validator { - return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === "string") && typeof o.power === "bigint"); + return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === 'string') && typeof o.power === 'bigint'); }, isAmino(o: any): o is ValidatorAmino { - return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === "string") && typeof o.power === "bigint"); + return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === 'string') && typeof o.power === 'bigint'); }, encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.address.length !== 0) { @@ -5729,15 +5729,15 @@ export const Validator = { while (reader.pos < end) { const 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; + case 1: + message.address = reader.bytes(); + break; + case 3: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5775,7 +5775,7 @@ export const Validator = { }, toProtoMsg(message: Validator): ValidatorProtoMsg { return { - typeUrl: "/tendermint.abci.Validator", + typeUrl: '/tendermint.abci.Validator', value: Validator.encode(message).finish() }; } @@ -5788,12 +5788,12 @@ function createBaseValidatorUpdate(): ValidatorUpdate { }; } export const ValidatorUpdate = { - typeUrl: "/tendermint.abci.ValidatorUpdate", + typeUrl: '/tendermint.abci.ValidatorUpdate', is(o: any): o is ValidatorUpdate { - return o && (o.$typeUrl === ValidatorUpdate.typeUrl || PublicKey.is(o.pubKey) && typeof o.power === "bigint"); + return o && (o.$typeUrl === ValidatorUpdate.typeUrl || PublicKey.is(o.pubKey) && typeof o.power === 'bigint'); }, isAmino(o: any): o is ValidatorUpdateAmino { - return o && (o.$typeUrl === ValidatorUpdate.typeUrl || PublicKey.isAmino(o.pub_key) && typeof o.power === "bigint"); + return o && (o.$typeUrl === ValidatorUpdate.typeUrl || PublicKey.isAmino(o.pub_key) && typeof o.power === 'bigint'); }, encode(message: ValidatorUpdate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.pubKey !== undefined) { @@ -5811,15 +5811,15 @@ export const ValidatorUpdate = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pubKey = PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5857,7 +5857,7 @@ export const ValidatorUpdate = { }, toProtoMsg(message: ValidatorUpdate): ValidatorUpdateProtoMsg { return { - typeUrl: "/tendermint.abci.ValidatorUpdate", + typeUrl: '/tendermint.abci.ValidatorUpdate', value: ValidatorUpdate.encode(message).finish() }; } @@ -5870,7 +5870,7 @@ function createBaseVoteInfo(): VoteInfo { }; } export const VoteInfo = { - typeUrl: "/tendermint.abci.VoteInfo", + typeUrl: '/tendermint.abci.VoteInfo', is(o: any): o is VoteInfo { return o && (o.$typeUrl === VoteInfo.typeUrl || Validator.is(o.validator) && isSet(o.blockIdFlag)); }, @@ -5893,15 +5893,15 @@ export const VoteInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.blockIdFlag = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validator = Validator.decode(reader, reader.uint32()); + break; + case 3: + message.blockIdFlag = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -5939,7 +5939,7 @@ export const VoteInfo = { }, toProtoMsg(message: VoteInfo): VoteInfoProtoMsg { return { - typeUrl: "/tendermint.abci.VoteInfo", + typeUrl: '/tendermint.abci.VoteInfo', value: VoteInfo.encode(message).finish() }; } @@ -5954,12 +5954,12 @@ function createBaseExtendedVoteInfo(): ExtendedVoteInfo { }; } export const ExtendedVoteInfo = { - typeUrl: "/tendermint.abci.ExtendedVoteInfo", + typeUrl: '/tendermint.abci.ExtendedVoteInfo', is(o: any): o is ExtendedVoteInfo { - return o && (o.$typeUrl === ExtendedVoteInfo.typeUrl || Validator.is(o.validator) && (o.voteExtension instanceof Uint8Array || typeof o.voteExtension === "string") && (o.extensionSignature instanceof Uint8Array || typeof o.extensionSignature === "string") && isSet(o.blockIdFlag)); + return o && (o.$typeUrl === ExtendedVoteInfo.typeUrl || Validator.is(o.validator) && (o.voteExtension instanceof Uint8Array || typeof o.voteExtension === 'string') && (o.extensionSignature instanceof Uint8Array || typeof o.extensionSignature === 'string') && isSet(o.blockIdFlag)); }, isAmino(o: any): o is ExtendedVoteInfoAmino { - return o && (o.$typeUrl === ExtendedVoteInfo.typeUrl || Validator.isAmino(o.validator) && (o.vote_extension instanceof Uint8Array || typeof o.vote_extension === "string") && (o.extension_signature instanceof Uint8Array || typeof o.extension_signature === "string") && isSet(o.block_id_flag)); + return o && (o.$typeUrl === ExtendedVoteInfo.typeUrl || Validator.isAmino(o.validator) && (o.vote_extension instanceof Uint8Array || typeof o.vote_extension === 'string') && (o.extension_signature instanceof Uint8Array || typeof o.extension_signature === 'string') && isSet(o.block_id_flag)); }, encode(message: ExtendedVoteInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.validator !== undefined) { @@ -5983,21 +5983,21 @@ export const ExtendedVoteInfo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.voteExtension = reader.bytes(); - break; - case 4: - message.extensionSignature = reader.bytes(); - break; - case 5: - message.blockIdFlag = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validator = Validator.decode(reader, reader.uint32()); + break; + case 3: + message.voteExtension = reader.bytes(); + break; + case 4: + message.extensionSignature = reader.bytes(); + break; + case 5: + message.blockIdFlag = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6045,7 +6045,7 @@ export const ExtendedVoteInfo = { }, toProtoMsg(message: ExtendedVoteInfo): ExtendedVoteInfoProtoMsg { return { - typeUrl: "/tendermint.abci.ExtendedVoteInfo", + typeUrl: '/tendermint.abci.ExtendedVoteInfo', value: ExtendedVoteInfo.encode(message).finish() }; } @@ -6061,12 +6061,12 @@ function createBaseMisbehavior(): Misbehavior { }; } export const Misbehavior = { - typeUrl: "/tendermint.abci.Misbehavior", + typeUrl: '/tendermint.abci.Misbehavior', is(o: any): o is Misbehavior { - return o && (o.$typeUrl === Misbehavior.typeUrl || isSet(o.type) && Validator.is(o.validator) && typeof o.height === "bigint" && Timestamp.is(o.time) && typeof o.totalVotingPower === "bigint"); + return o && (o.$typeUrl === Misbehavior.typeUrl || isSet(o.type) && Validator.is(o.validator) && typeof o.height === 'bigint' && Timestamp.is(o.time) && typeof o.totalVotingPower === 'bigint'); }, isAmino(o: any): o is MisbehaviorAmino { - return o && (o.$typeUrl === Misbehavior.typeUrl || isSet(o.type) && Validator.isAmino(o.validator) && typeof o.height === "bigint" && Timestamp.isAmino(o.time) && typeof o.total_voting_power === "bigint"); + return o && (o.$typeUrl === Misbehavior.typeUrl || isSet(o.type) && Validator.isAmino(o.validator) && typeof o.height === 'bigint' && Timestamp.isAmino(o.time) && typeof o.total_voting_power === 'bigint'); }, encode(message: Misbehavior, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.type !== 0) { @@ -6093,24 +6093,24 @@ export const Misbehavior = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.totalVotingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.type = (reader.int32() as any); + break; + case 2: + message.validator = Validator.decode(reader, reader.uint32()); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 5: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -6163,7 +6163,7 @@ export const Misbehavior = { }, toProtoMsg(message: Misbehavior): MisbehaviorProtoMsg { return { - typeUrl: "/tendermint.abci.Misbehavior", + typeUrl: '/tendermint.abci.Misbehavior', value: Misbehavior.encode(message).finish() }; } @@ -6179,12 +6179,12 @@ function createBaseSnapshot(): Snapshot { }; } export const Snapshot = { - typeUrl: "/tendermint.abci.Snapshot", + typeUrl: '/tendermint.abci.Snapshot', is(o: any): o is Snapshot { - return o && (o.$typeUrl === Snapshot.typeUrl || typeof o.height === "bigint" && typeof o.format === "number" && typeof o.chunks === "number" && (o.hash instanceof Uint8Array || typeof o.hash === "string") && (o.metadata instanceof Uint8Array || typeof o.metadata === "string")); + return o && (o.$typeUrl === Snapshot.typeUrl || typeof o.height === 'bigint' && typeof o.format === 'number' && typeof o.chunks === 'number' && (o.hash instanceof Uint8Array || typeof o.hash === 'string') && (o.metadata instanceof Uint8Array || typeof o.metadata === 'string')); }, isAmino(o: any): o is SnapshotAmino { - return o && (o.$typeUrl === Snapshot.typeUrl || typeof o.height === "bigint" && typeof o.format === "number" && typeof o.chunks === "number" && (o.hash instanceof Uint8Array || typeof o.hash === "string") && (o.metadata instanceof Uint8Array || typeof o.metadata === "string")); + return o && (o.$typeUrl === Snapshot.typeUrl || typeof o.height === 'bigint' && typeof o.format === 'number' && typeof o.chunks === 'number' && (o.hash instanceof Uint8Array || typeof o.hash === 'string') && (o.metadata instanceof Uint8Array || typeof o.metadata === 'string')); }, encode(message: Snapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.height !== BigInt(0)) { @@ -6211,24 +6211,24 @@ export const Snapshot = { while (reader.pos < end) { const 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; + 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; @@ -6281,7 +6281,7 @@ export const Snapshot = { }, toProtoMsg(message: Snapshot): SnapshotProtoMsg { return { - typeUrl: "/tendermint.abci.Snapshot", + typeUrl: '/tendermint.abci.Snapshot', value: Snapshot.encode(message).finish() }; } diff --git a/libs/cosmos-types/tendermint/crypto/keys.ts b/libs/cosmos-types/tendermint/crypto/keys.ts index 9dc8476b..4a2f631f 100644 --- a/libs/cosmos-types/tendermint/crypto/keys.ts +++ b/libs/cosmos-types/tendermint/crypto/keys.ts @@ -1,13 +1,13 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; /** PublicKey defines the keys available for use with Validators */ export interface PublicKey { ed25519?: Uint8Array; secp256k1?: Uint8Array; } export interface PublicKeyProtoMsg { - typeUrl: "/tendermint.crypto.PublicKey"; + typeUrl: '/tendermint.crypto.PublicKey'; value: Uint8Array; } /** PublicKey defines the keys available for use with Validators */ @@ -16,7 +16,7 @@ export interface PublicKeyAmino { secp256k1?: string; } export interface PublicKeyAminoMsg { - type: "/tendermint.crypto.PublicKey"; + type: '/tendermint.crypto.PublicKey'; value: PublicKeyAmino; } function createBasePublicKey(): PublicKey { @@ -26,7 +26,7 @@ function createBasePublicKey(): PublicKey { }; } export const PublicKey = { - typeUrl: "/tendermint.crypto.PublicKey", + typeUrl: '/tendermint.crypto.PublicKey', is(o: any): o is PublicKey { return o && o.$typeUrl === PublicKey.typeUrl; }, @@ -49,15 +49,15 @@ export const PublicKey = { while (reader.pos < end) { const 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; + case 1: + message.ed25519 = reader.bytes(); + break; + case 2: + message.secp256k1 = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -95,7 +95,7 @@ export const PublicKey = { }, toProtoMsg(message: PublicKey): PublicKeyProtoMsg { return { - typeUrl: "/tendermint.crypto.PublicKey", + typeUrl: '/tendermint.crypto.PublicKey', value: PublicKey.encode(message).finish() }; } diff --git a/libs/cosmos-types/tendermint/crypto/proof.ts b/libs/cosmos-types/tendermint/crypto/proof.ts index 9312ba2c..69925610 100644 --- a/libs/cosmos-types/tendermint/crypto/proof.ts +++ b/libs/cosmos-types/tendermint/crypto/proof.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; export interface Proof { total: bigint; index: bigint; @@ -8,7 +8,7 @@ export interface Proof { aunts: Uint8Array[]; } export interface ProofProtoMsg { - typeUrl: "/tendermint.crypto.Proof"; + typeUrl: '/tendermint.crypto.Proof'; value: Uint8Array; } export interface ProofAmino { @@ -18,7 +18,7 @@ export interface ProofAmino { aunts: string[]; } export interface ProofAminoMsg { - type: "/tendermint.crypto.Proof"; + type: '/tendermint.crypto.Proof'; value: ProofAmino; } export interface ValueOp { @@ -28,7 +28,7 @@ export interface ValueOp { proof?: Proof; } export interface ValueOpProtoMsg { - typeUrl: "/tendermint.crypto.ValueOp"; + typeUrl: '/tendermint.crypto.ValueOp'; value: Uint8Array; } export interface ValueOpAmino { @@ -38,7 +38,7 @@ export interface ValueOpAmino { proof?: ProofAmino; } export interface ValueOpAminoMsg { - type: "/tendermint.crypto.ValueOp"; + type: '/tendermint.crypto.ValueOp'; value: ValueOpAmino; } export interface DominoOp { @@ -47,7 +47,7 @@ export interface DominoOp { output: string; } export interface DominoOpProtoMsg { - typeUrl: "/tendermint.crypto.DominoOp"; + typeUrl: '/tendermint.crypto.DominoOp'; value: Uint8Array; } export interface DominoOpAmino { @@ -56,7 +56,7 @@ export interface DominoOpAmino { output: string; } export interface DominoOpAminoMsg { - type: "/tendermint.crypto.DominoOp"; + type: '/tendermint.crypto.DominoOp'; value: DominoOpAmino; } /** @@ -70,7 +70,7 @@ export interface ProofOp { data: Uint8Array; } export interface ProofOpProtoMsg { - typeUrl: "/tendermint.crypto.ProofOp"; + typeUrl: '/tendermint.crypto.ProofOp'; value: Uint8Array; } /** @@ -84,7 +84,7 @@ export interface ProofOpAmino { data: string; } export interface ProofOpAminoMsg { - type: "/tendermint.crypto.ProofOp"; + type: '/tendermint.crypto.ProofOp'; value: ProofOpAmino; } /** ProofOps is Merkle proof defined by the list of ProofOps */ @@ -92,7 +92,7 @@ export interface ProofOps { ops: ProofOp[]; } export interface ProofOpsProtoMsg { - typeUrl: "/tendermint.crypto.ProofOps"; + typeUrl: '/tendermint.crypto.ProofOps'; value: Uint8Array; } /** ProofOps is Merkle proof defined by the list of ProofOps */ @@ -100,7 +100,7 @@ export interface ProofOpsAmino { ops: ProofOpAmino[]; } export interface ProofOpsAminoMsg { - type: "/tendermint.crypto.ProofOps"; + type: '/tendermint.crypto.ProofOps'; value: ProofOpsAmino; } function createBaseProof(): Proof { @@ -112,12 +112,12 @@ function createBaseProof(): Proof { }; } export const Proof = { - typeUrl: "/tendermint.crypto.Proof", + typeUrl: '/tendermint.crypto.Proof', is(o: any): o is Proof { - return o && (o.$typeUrl === Proof.typeUrl || typeof o.total === "bigint" && typeof o.index === "bigint" && (o.leafHash instanceof Uint8Array || typeof o.leafHash === "string") && Array.isArray(o.aunts) && (!o.aunts.length || o.aunts[0] instanceof Uint8Array || typeof o.aunts[0] === "string")); + return o && (o.$typeUrl === Proof.typeUrl || typeof o.total === 'bigint' && typeof o.index === 'bigint' && (o.leafHash instanceof Uint8Array || typeof o.leafHash === 'string') && Array.isArray(o.aunts) && (!o.aunts.length || o.aunts[0] instanceof Uint8Array || typeof o.aunts[0] === 'string')); }, isAmino(o: any): o is ProofAmino { - return o && (o.$typeUrl === Proof.typeUrl || typeof o.total === "bigint" && typeof o.index === "bigint" && (o.leaf_hash instanceof Uint8Array || typeof o.leaf_hash === "string") && Array.isArray(o.aunts) && (!o.aunts.length || o.aunts[0] instanceof Uint8Array || typeof o.aunts[0] === "string")); + return o && (o.$typeUrl === Proof.typeUrl || typeof o.total === 'bigint' && typeof o.index === 'bigint' && (o.leaf_hash instanceof Uint8Array || typeof o.leaf_hash === 'string') && Array.isArray(o.aunts) && (!o.aunts.length || o.aunts[0] instanceof Uint8Array || typeof o.aunts[0] === 'string')); }, encode(message: Proof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.total !== BigInt(0)) { @@ -141,21 +141,21 @@ export const Proof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.total = reader.int64(); - break; - case 2: - message.index = reader.int64(); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.total = reader.int64(); + break; + case 2: + message.index = reader.int64(); + break; + case 3: + message.leafHash = reader.bytes(); + break; + case 4: + message.aunts.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -205,7 +205,7 @@ export const Proof = { }, toProtoMsg(message: Proof): ProofProtoMsg { return { - typeUrl: "/tendermint.crypto.Proof", + typeUrl: '/tendermint.crypto.Proof', value: Proof.encode(message).finish() }; } @@ -218,12 +218,12 @@ function createBaseValueOp(): ValueOp { }; } export const ValueOp = { - typeUrl: "/tendermint.crypto.ValueOp", + typeUrl: '/tendermint.crypto.ValueOp', is(o: any): o is ValueOp { - return o && (o.$typeUrl === ValueOp.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === ValueOp.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, isAmino(o: any): o is ValueOpAmino { - return o && (o.$typeUrl === ValueOp.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string"); + return o && (o.$typeUrl === ValueOp.typeUrl || o.key instanceof Uint8Array || typeof o.key === 'string'); }, encode(message: ValueOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.key.length !== 0) { @@ -241,15 +241,15 @@ export const ValueOp = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.key = reader.bytes(); + break; + case 2: + message.proof = Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -287,7 +287,7 @@ export const ValueOp = { }, toProtoMsg(message: ValueOp): ValueOpProtoMsg { return { - typeUrl: "/tendermint.crypto.ValueOp", + typeUrl: '/tendermint.crypto.ValueOp', value: ValueOp.encode(message).finish() }; } @@ -295,27 +295,27 @@ export const ValueOp = { GlobalDecoderRegistry.register(ValueOp.typeUrl, ValueOp); function createBaseDominoOp(): DominoOp { return { - key: "", - input: "", - output: "" + key: '', + input: '', + output: '' }; } export const DominoOp = { - typeUrl: "/tendermint.crypto.DominoOp", + typeUrl: '/tendermint.crypto.DominoOp', is(o: any): o is DominoOp { - return o && (o.$typeUrl === DominoOp.typeUrl || typeof o.key === "string" && typeof o.input === "string" && typeof o.output === "string"); + return o && (o.$typeUrl === DominoOp.typeUrl || typeof o.key === 'string' && typeof o.input === 'string' && typeof o.output === 'string'); }, isAmino(o: any): o is DominoOpAmino { - return o && (o.$typeUrl === DominoOp.typeUrl || typeof o.key === "string" && typeof o.input === "string" && typeof o.output === "string"); + return o && (o.$typeUrl === DominoOp.typeUrl || typeof o.key === 'string' && typeof o.input === 'string' && typeof o.output === 'string'); }, encode(message: DominoOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { + if (message.key !== '') { writer.uint32(10).string(message.key); } - if (message.input !== "") { + if (message.input !== '') { writer.uint32(18).string(message.input); } - if (message.output !== "") { + if (message.output !== '') { writer.uint32(26).string(message.output); } return writer; @@ -327,27 +327,27 @@ export const DominoOp = { while (reader.pos < end) { const 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; + 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; }, fromPartial(object: DeepPartial): DominoOp { const message = createBaseDominoOp(); - message.key = object.key ?? ""; - message.input = object.input ?? ""; - message.output = object.output ?? ""; + message.key = object.key ?? ''; + message.input = object.input ?? ''; + message.output = object.output ?? ''; return message; }, fromAmino(object: DominoOpAmino): DominoOp { @@ -365,9 +365,9 @@ export const DominoOp = { }, toAmino(message: DominoOp): DominoOpAmino { const obj: any = {}; - obj.key = message.key === "" ? undefined : message.key; - obj.input = message.input === "" ? undefined : message.input; - obj.output = message.output === "" ? undefined : message.output; + obj.key = message.key === '' ? undefined : message.key; + obj.input = message.input === '' ? undefined : message.input; + obj.output = message.output === '' ? undefined : message.output; return obj; }, fromAminoMsg(object: DominoOpAminoMsg): DominoOp { @@ -381,7 +381,7 @@ export const DominoOp = { }, toProtoMsg(message: DominoOp): DominoOpProtoMsg { return { - typeUrl: "/tendermint.crypto.DominoOp", + typeUrl: '/tendermint.crypto.DominoOp', value: DominoOp.encode(message).finish() }; } @@ -389,21 +389,21 @@ export const DominoOp = { GlobalDecoderRegistry.register(DominoOp.typeUrl, DominoOp); function createBaseProofOp(): ProofOp { return { - type: "", + type: '', key: new Uint8Array(), data: new Uint8Array() }; } export const ProofOp = { - typeUrl: "/tendermint.crypto.ProofOp", + typeUrl: '/tendermint.crypto.ProofOp', is(o: any): o is ProofOp { - return o && (o.$typeUrl === ProofOp.typeUrl || typeof o.type === "string" && (o.key instanceof Uint8Array || typeof o.key === "string") && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === ProofOp.typeUrl || typeof o.type === 'string' && (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, isAmino(o: any): o is ProofOpAmino { - return o && (o.$typeUrl === ProofOp.typeUrl || typeof o.type === "string" && (o.key instanceof Uint8Array || typeof o.key === "string") && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === ProofOp.typeUrl || typeof o.type === 'string' && (o.key instanceof Uint8Array || typeof o.key === 'string') && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, encode(message: ProofOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { + if (message.type !== '') { writer.uint32(10).string(message.type); } if (message.key.length !== 0) { @@ -421,25 +421,25 @@ export const ProofOp = { while (reader.pos < end) { const 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; + 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; }, fromPartial(object: DeepPartial): ProofOp { const message = createBaseProofOp(); - message.type = object.type ?? ""; + message.type = object.type ?? ''; message.key = object.key ?? new Uint8Array(); message.data = object.data ?? new Uint8Array(); return message; @@ -459,7 +459,7 @@ export const ProofOp = { }, toAmino(message: ProofOp): ProofOpAmino { const obj: any = {}; - obj.type = message.type === "" ? undefined : message.type; + obj.type = message.type === '' ? undefined : message.type; obj.key = message.key ? base64FromBytes(message.key) : undefined; obj.data = message.data ? base64FromBytes(message.data) : undefined; return obj; @@ -475,7 +475,7 @@ export const ProofOp = { }, toProtoMsg(message: ProofOp): ProofOpProtoMsg { return { - typeUrl: "/tendermint.crypto.ProofOp", + typeUrl: '/tendermint.crypto.ProofOp', value: ProofOp.encode(message).finish() }; } @@ -487,7 +487,7 @@ function createBaseProofOps(): ProofOps { }; } export const ProofOps = { - typeUrl: "/tendermint.crypto.ProofOps", + typeUrl: '/tendermint.crypto.ProofOps', is(o: any): o is ProofOps { return o && (o.$typeUrl === ProofOps.typeUrl || Array.isArray(o.ops) && (!o.ops.length || ProofOp.is(o.ops[0]))); }, @@ -507,12 +507,12 @@ export const ProofOps = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.ops.push(ProofOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -547,7 +547,7 @@ export const ProofOps = { }, toProtoMsg(message: ProofOps): ProofOpsProtoMsg { return { - typeUrl: "/tendermint.crypto.ProofOps", + typeUrl: '/tendermint.crypto.ProofOps', value: ProofOps.encode(message).finish() }; } diff --git a/libs/cosmos-types/tendermint/types/block.ts b/libs/cosmos-types/tendermint/types/block.ts new file mode 100644 index 00000000..2d23793e --- /dev/null +++ b/libs/cosmos-types/tendermint/types/block.ts @@ -0,0 +1,131 @@ +import { BinaryReader, BinaryWriter } from '../../binary'; +import { DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; +import { EvidenceList, EvidenceListAmino } from './evidence'; +import { Commit, CommitAmino,Data, DataAmino, Header, HeaderAmino } from './types'; +export interface Block { + header: Header; + data: Data; + evidence: EvidenceList; + lastCommit?: Commit; +} +export interface BlockProtoMsg { + typeUrl: '/tendermint.types.Block'; + value: Uint8Array; +} +export interface BlockAmino { + header: HeaderAmino; + data: DataAmino; + evidence: EvidenceListAmino; + last_commit?: CommitAmino; +} +export interface BlockAminoMsg { + type: '/tendermint.types.Block'; + value: BlockAmino; +} +function createBaseBlock(): Block { + return { + header: Header.fromPartial({}), + data: Data.fromPartial({}), + evidence: EvidenceList.fromPartial({}), + lastCommit: undefined + }; +} +export const Block = { + typeUrl: '/tendermint.types.Block', + is(o: any): o is Block { + return o && (o.$typeUrl === Block.typeUrl || Header.is(o.header) && Data.is(o.data) && EvidenceList.is(o.evidence)); + }, + isAmino(o: any): o is BlockAmino { + return o && (o.$typeUrl === Block.typeUrl || Header.isAmino(o.header) && Data.isAmino(o.data) && EvidenceList.isAmino(o.evidence)); + }, + encode(message: Block, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.header !== undefined) { + Header.encode(message.header, writer.uint32(10).fork()).ldelim(); + } + if (message.data !== undefined) { + Data.encode(message.data, writer.uint32(18).fork()).ldelim(); + } + if (message.evidence !== undefined) { + EvidenceList.encode(message.evidence, writer.uint32(26).fork()).ldelim(); + } + if (message.lastCommit !== undefined) { + Commit.encode(message.lastCommit, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): Block { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBlock(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = Header.decode(reader, reader.uint32()); + break; + case 2: + message.data = Data.decode(reader, reader.uint32()); + break; + case 3: + message.evidence = EvidenceList.decode(reader, reader.uint32()); + break; + case 4: + message.lastCommit = Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): Block { + const message = createBaseBlock(); + message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; + message.data = object.data !== undefined && object.data !== null ? Data.fromPartial(object.data) : undefined; + message.evidence = object.evidence !== undefined && object.evidence !== null ? EvidenceList.fromPartial(object.evidence) : undefined; + message.lastCommit = object.lastCommit !== undefined && object.lastCommit !== null ? Commit.fromPartial(object.lastCommit) : undefined; + return message; + }, + fromAmino(object: BlockAmino): Block { + const message = createBaseBlock(); + if (object.header !== undefined && object.header !== null) { + message.header = Header.fromAmino(object.header); + } + if (object.data !== undefined && object.data !== null) { + message.data = Data.fromAmino(object.data); + } + if (object.evidence !== undefined && object.evidence !== null) { + message.evidence = EvidenceList.fromAmino(object.evidence); + } + if (object.last_commit !== undefined && object.last_commit !== null) { + message.lastCommit = Commit.fromAmino(object.last_commit); + } + return message; + }, + toAmino(message: Block): BlockAmino { + const obj: any = {}; + obj.header = message.header ? Header.toAmino(message.header) : undefined; + obj.data = message.data ? Data.toAmino(message.data) : undefined; + obj.evidence = message.evidence ? EvidenceList.toAmino(message.evidence) : undefined; + obj.last_commit = message.lastCommit ? Commit.toAmino(message.lastCommit) : undefined; + return obj; + }, + fromAminoMsg(object: BlockAminoMsg): Block { + return Block.fromAmino(object.value); + }, + fromProtoMsg(message: BlockProtoMsg): Block { + return Block.decode(message.value); + }, + toProto(message: Block): Uint8Array { + return Block.encode(message).finish(); + }, + toProtoMsg(message: Block): BlockProtoMsg { + return { + typeUrl: '/tendermint.types.Block', + value: Block.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(Block.typeUrl, Block); \ No newline at end of file diff --git a/libs/cosmos-types/tendermint/types/evidence.ts b/libs/cosmos-types/tendermint/types/evidence.ts new file mode 100644 index 00000000..29f53935 --- /dev/null +++ b/libs/cosmos-types/tendermint/types/evidence.ts @@ -0,0 +1,476 @@ +import { BinaryReader, BinaryWriter } from '../../binary'; +import { Timestamp } from '../../google/protobuf/timestamp'; +import { DeepPartial, fromTimestamp,toTimestamp } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; +import { LightBlock, LightBlockAmino,Vote, VoteAmino } from './types'; +import { Validator, ValidatorAmino } from './validator'; +export interface Evidence { + duplicateVoteEvidence?: DuplicateVoteEvidence; + lightClientAttackEvidence?: LightClientAttackEvidence; +} +export interface EvidenceProtoMsg { + typeUrl: '/tendermint.types.Evidence'; + value: Uint8Array; +} +export interface EvidenceAmino { + duplicate_vote_evidence?: DuplicateVoteEvidenceAmino; + light_client_attack_evidence?: LightClientAttackEvidenceAmino; +} +export interface EvidenceAminoMsg { + type: '/tendermint.types.Evidence'; + value: EvidenceAmino; +} +/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ +export interface DuplicateVoteEvidence { + voteA?: Vote; + voteB?: Vote; + totalVotingPower: bigint; + validatorPower: bigint; + timestamp: Date; +} +export interface DuplicateVoteEvidenceProtoMsg { + typeUrl: '/tendermint.types.DuplicateVoteEvidence'; + value: Uint8Array; +} +/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ +export interface DuplicateVoteEvidenceAmino { + vote_a?: VoteAmino; + vote_b?: VoteAmino; + total_voting_power: string; + validator_power: string; + timestamp: string; +} +export interface DuplicateVoteEvidenceAminoMsg { + type: '/tendermint.types.DuplicateVoteEvidence'; + value: DuplicateVoteEvidenceAmino; +} +/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ +export interface LightClientAttackEvidence { + conflictingBlock?: LightBlock; + commonHeight: bigint; + byzantineValidators: Validator[]; + totalVotingPower: bigint; + timestamp: Date; +} +export interface LightClientAttackEvidenceProtoMsg { + typeUrl: '/tendermint.types.LightClientAttackEvidence'; + value: Uint8Array; +} +/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ +export interface LightClientAttackEvidenceAmino { + conflicting_block?: LightBlockAmino; + common_height: string; + byzantine_validators: ValidatorAmino[]; + total_voting_power: string; + timestamp: string; +} +export interface LightClientAttackEvidenceAminoMsg { + type: '/tendermint.types.LightClientAttackEvidence'; + value: LightClientAttackEvidenceAmino; +} +export interface EvidenceList { + evidence: Evidence[]; +} +export interface EvidenceListProtoMsg { + typeUrl: '/tendermint.types.EvidenceList'; + value: Uint8Array; +} +export interface EvidenceListAmino { + evidence: EvidenceAmino[]; +} +export interface EvidenceListAminoMsg { + type: '/tendermint.types.EvidenceList'; + value: EvidenceListAmino; +} +function createBaseEvidence(): Evidence { + return { + duplicateVoteEvidence: undefined, + lightClientAttackEvidence: undefined + }; +} +export const Evidence = { + typeUrl: '/tendermint.types.Evidence', + is(o: any): o is Evidence { + return o && o.$typeUrl === Evidence.typeUrl; + }, + isAmino(o: any): o is EvidenceAmino { + return o && o.$typeUrl === Evidence.typeUrl; + }, + encode(message: Evidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.duplicateVoteEvidence !== undefined) { + DuplicateVoteEvidence.encode(message.duplicateVoteEvidence, writer.uint32(10).fork()).ldelim(); + } + if (message.lightClientAttackEvidence !== undefined) { + LightClientAttackEvidence.encode(message.lightClientAttackEvidence, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): Evidence { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEvidence(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.duplicateVoteEvidence = DuplicateVoteEvidence.decode(reader, reader.uint32()); + break; + case 2: + message.lightClientAttackEvidence = LightClientAttackEvidence.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): Evidence { + const message = createBaseEvidence(); + message.duplicateVoteEvidence = object.duplicateVoteEvidence !== undefined && object.duplicateVoteEvidence !== null ? DuplicateVoteEvidence.fromPartial(object.duplicateVoteEvidence) : undefined; + message.lightClientAttackEvidence = object.lightClientAttackEvidence !== undefined && object.lightClientAttackEvidence !== null ? LightClientAttackEvidence.fromPartial(object.lightClientAttackEvidence) : undefined; + return message; + }, + fromAmino(object: EvidenceAmino): Evidence { + const message = createBaseEvidence(); + if (object.duplicate_vote_evidence !== undefined && object.duplicate_vote_evidence !== null) { + message.duplicateVoteEvidence = DuplicateVoteEvidence.fromAmino(object.duplicate_vote_evidence); + } + if (object.light_client_attack_evidence !== undefined && object.light_client_attack_evidence !== null) { + message.lightClientAttackEvidence = LightClientAttackEvidence.fromAmino(object.light_client_attack_evidence); + } + return message; + }, + toAmino(message: Evidence): EvidenceAmino { + const obj: any = {}; + obj.duplicate_vote_evidence = message.duplicateVoteEvidence ? DuplicateVoteEvidence.toAmino(message.duplicateVoteEvidence) : undefined; + obj.light_client_attack_evidence = message.lightClientAttackEvidence ? LightClientAttackEvidence.toAmino(message.lightClientAttackEvidence) : undefined; + return obj; + }, + fromAminoMsg(object: EvidenceAminoMsg): Evidence { + return Evidence.fromAmino(object.value); + }, + fromProtoMsg(message: EvidenceProtoMsg): Evidence { + return Evidence.decode(message.value); + }, + toProto(message: Evidence): Uint8Array { + return Evidence.encode(message).finish(); + }, + toProtoMsg(message: Evidence): EvidenceProtoMsg { + return { + typeUrl: '/tendermint.types.Evidence', + value: Evidence.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(Evidence.typeUrl, Evidence); +function createBaseDuplicateVoteEvidence(): DuplicateVoteEvidence { + return { + voteA: undefined, + voteB: undefined, + totalVotingPower: BigInt(0), + validatorPower: BigInt(0), + timestamp: new Date() + }; +} +export const DuplicateVoteEvidence = { + typeUrl: '/tendermint.types.DuplicateVoteEvidence', + is(o: any): o is DuplicateVoteEvidence { + return o && (o.$typeUrl === DuplicateVoteEvidence.typeUrl || typeof o.totalVotingPower === 'bigint' && typeof o.validatorPower === 'bigint' && Timestamp.is(o.timestamp)); + }, + isAmino(o: any): o is DuplicateVoteEvidenceAmino { + return o && (o.$typeUrl === DuplicateVoteEvidence.typeUrl || typeof o.total_voting_power === 'bigint' && typeof o.validator_power === 'bigint' && Timestamp.isAmino(o.timestamp)); + }, + encode(message: DuplicateVoteEvidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.voteA !== undefined) { + Vote.encode(message.voteA, writer.uint32(10).fork()).ldelim(); + } + if (message.voteB !== undefined) { + Vote.encode(message.voteB, writer.uint32(18).fork()).ldelim(); + } + if (message.totalVotingPower !== BigInt(0)) { + writer.uint32(24).int64(message.totalVotingPower); + } + if (message.validatorPower !== BigInt(0)) { + writer.uint32(32).int64(message.validatorPower); + } + if (message.timestamp !== undefined) { + Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): DuplicateVoteEvidence { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDuplicateVoteEvidence(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.voteA = Vote.decode(reader, reader.uint32()); + break; + case 2: + message.voteB = Vote.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + case 4: + message.validatorPower = reader.int64(); + break; + case 5: + message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): DuplicateVoteEvidence { + const message = createBaseDuplicateVoteEvidence(); + message.voteA = object.voteA !== undefined && object.voteA !== null ? Vote.fromPartial(object.voteA) : undefined; + message.voteB = object.voteB !== undefined && object.voteB !== null ? Vote.fromPartial(object.voteB) : undefined; + message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); + message.validatorPower = object.validatorPower !== undefined && object.validatorPower !== null ? BigInt(object.validatorPower.toString()) : BigInt(0); + message.timestamp = object.timestamp ?? undefined; + return message; + }, + fromAmino(object: DuplicateVoteEvidenceAmino): DuplicateVoteEvidence { + const message = createBaseDuplicateVoteEvidence(); + if (object.vote_a !== undefined && object.vote_a !== null) { + message.voteA = Vote.fromAmino(object.vote_a); + } + if (object.vote_b !== undefined && object.vote_b !== null) { + message.voteB = Vote.fromAmino(object.vote_b); + } + if (object.total_voting_power !== undefined && object.total_voting_power !== null) { + message.totalVotingPower = BigInt(object.total_voting_power); + } + if (object.validator_power !== undefined && object.validator_power !== null) { + message.validatorPower = BigInt(object.validator_power); + } + if (object.timestamp !== undefined && object.timestamp !== null) { + message.timestamp = fromTimestamp(Timestamp.fromAmino(object.timestamp)); + } + return message; + }, + toAmino(message: DuplicateVoteEvidence): DuplicateVoteEvidenceAmino { + const obj: any = {}; + obj.vote_a = message.voteA ? Vote.toAmino(message.voteA) : undefined; + obj.vote_b = message.voteB ? Vote.toAmino(message.voteB) : undefined; + obj.total_voting_power = message.totalVotingPower !== BigInt(0) ? message.totalVotingPower.toString() : undefined; + obj.validator_power = message.validatorPower !== BigInt(0) ? message.validatorPower.toString() : undefined; + obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; + return obj; + }, + fromAminoMsg(object: DuplicateVoteEvidenceAminoMsg): DuplicateVoteEvidence { + return DuplicateVoteEvidence.fromAmino(object.value); + }, + fromProtoMsg(message: DuplicateVoteEvidenceProtoMsg): DuplicateVoteEvidence { + return DuplicateVoteEvidence.decode(message.value); + }, + toProto(message: DuplicateVoteEvidence): Uint8Array { + return DuplicateVoteEvidence.encode(message).finish(); + }, + toProtoMsg(message: DuplicateVoteEvidence): DuplicateVoteEvidenceProtoMsg { + return { + typeUrl: '/tendermint.types.DuplicateVoteEvidence', + value: DuplicateVoteEvidence.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(DuplicateVoteEvidence.typeUrl, DuplicateVoteEvidence); +function createBaseLightClientAttackEvidence(): LightClientAttackEvidence { + return { + conflictingBlock: undefined, + commonHeight: BigInt(0), + byzantineValidators: [], + totalVotingPower: BigInt(0), + timestamp: new Date() + }; +} +export const LightClientAttackEvidence = { + typeUrl: '/tendermint.types.LightClientAttackEvidence', + is(o: any): o is LightClientAttackEvidence { + return o && (o.$typeUrl === LightClientAttackEvidence.typeUrl || typeof o.commonHeight === 'bigint' && Array.isArray(o.byzantineValidators) && (!o.byzantineValidators.length || Validator.is(o.byzantineValidators[0])) && typeof o.totalVotingPower === 'bigint' && Timestamp.is(o.timestamp)); + }, + isAmino(o: any): o is LightClientAttackEvidenceAmino { + return o && (o.$typeUrl === LightClientAttackEvidence.typeUrl || typeof o.common_height === 'bigint' && Array.isArray(o.byzantine_validators) && (!o.byzantine_validators.length || Validator.isAmino(o.byzantine_validators[0])) && typeof o.total_voting_power === 'bigint' && Timestamp.isAmino(o.timestamp)); + }, + encode(message: LightClientAttackEvidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.conflictingBlock !== undefined) { + LightBlock.encode(message.conflictingBlock, writer.uint32(10).fork()).ldelim(); + } + if (message.commonHeight !== BigInt(0)) { + writer.uint32(16).int64(message.commonHeight); + } + for (const v of message.byzantineValidators) { + Validator.encode(v!, writer.uint32(26).fork()).ldelim(); + } + if (message.totalVotingPower !== BigInt(0)) { + writer.uint32(32).int64(message.totalVotingPower); + } + if (message.timestamp !== undefined) { + Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): LightClientAttackEvidence { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLightClientAttackEvidence(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.conflictingBlock = LightBlock.decode(reader, reader.uint32()); + break; + case 2: + message.commonHeight = reader.int64(); + break; + case 3: + message.byzantineValidators.push(Validator.decode(reader, reader.uint32())); + break; + case 4: + message.totalVotingPower = reader.int64(); + break; + case 5: + message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): LightClientAttackEvidence { + const message = createBaseLightClientAttackEvidence(); + message.conflictingBlock = object.conflictingBlock !== undefined && object.conflictingBlock !== null ? LightBlock.fromPartial(object.conflictingBlock) : undefined; + message.commonHeight = object.commonHeight !== undefined && object.commonHeight !== null ? BigInt(object.commonHeight.toString()) : BigInt(0); + message.byzantineValidators = object.byzantineValidators?.map(e => Validator.fromPartial(e)) || []; + message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); + message.timestamp = object.timestamp ?? undefined; + return message; + }, + fromAmino(object: LightClientAttackEvidenceAmino): LightClientAttackEvidence { + const message = createBaseLightClientAttackEvidence(); + if (object.conflicting_block !== undefined && object.conflicting_block !== null) { + message.conflictingBlock = LightBlock.fromAmino(object.conflicting_block); + } + if (object.common_height !== undefined && object.common_height !== null) { + message.commonHeight = BigInt(object.common_height); + } + message.byzantineValidators = object.byzantine_validators?.map(e => Validator.fromAmino(e)) || []; + if (object.total_voting_power !== undefined && object.total_voting_power !== null) { + message.totalVotingPower = BigInt(object.total_voting_power); + } + if (object.timestamp !== undefined && object.timestamp !== null) { + message.timestamp = fromTimestamp(Timestamp.fromAmino(object.timestamp)); + } + return message; + }, + toAmino(message: LightClientAttackEvidence): LightClientAttackEvidenceAmino { + const obj: any = {}; + obj.conflicting_block = message.conflictingBlock ? LightBlock.toAmino(message.conflictingBlock) : undefined; + obj.common_height = message.commonHeight !== BigInt(0) ? message.commonHeight.toString() : undefined; + if (message.byzantineValidators) { + obj.byzantine_validators = message.byzantineValidators.map(e => e ? Validator.toAmino(e) : undefined); + } else { + obj.byzantine_validators = message.byzantineValidators; + } + obj.total_voting_power = message.totalVotingPower !== BigInt(0) ? message.totalVotingPower.toString() : undefined; + obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined; + return obj; + }, + fromAminoMsg(object: LightClientAttackEvidenceAminoMsg): LightClientAttackEvidence { + return LightClientAttackEvidence.fromAmino(object.value); + }, + fromProtoMsg(message: LightClientAttackEvidenceProtoMsg): LightClientAttackEvidence { + return LightClientAttackEvidence.decode(message.value); + }, + toProto(message: LightClientAttackEvidence): Uint8Array { + return LightClientAttackEvidence.encode(message).finish(); + }, + toProtoMsg(message: LightClientAttackEvidence): LightClientAttackEvidenceProtoMsg { + return { + typeUrl: '/tendermint.types.LightClientAttackEvidence', + value: LightClientAttackEvidence.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(LightClientAttackEvidence.typeUrl, LightClientAttackEvidence); +function createBaseEvidenceList(): EvidenceList { + return { + evidence: [] + }; +} +export const EvidenceList = { + typeUrl: '/tendermint.types.EvidenceList', + is(o: any): o is EvidenceList { + return o && (o.$typeUrl === EvidenceList.typeUrl || Array.isArray(o.evidence) && (!o.evidence.length || Evidence.is(o.evidence[0]))); + }, + isAmino(o: any): o is EvidenceListAmino { + return o && (o.$typeUrl === EvidenceList.typeUrl || Array.isArray(o.evidence) && (!o.evidence.length || Evidence.isAmino(o.evidence[0]))); + }, + encode(message: EvidenceList, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.evidence) { + Evidence.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): EvidenceList { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEvidenceList(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.evidence.push(Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): EvidenceList { + const message = createBaseEvidenceList(); + message.evidence = object.evidence?.map(e => Evidence.fromPartial(e)) || []; + return message; + }, + fromAmino(object: EvidenceListAmino): EvidenceList { + const message = createBaseEvidenceList(); + message.evidence = object.evidence?.map(e => Evidence.fromAmino(e)) || []; + return message; + }, + toAmino(message: EvidenceList): EvidenceListAmino { + const obj: any = {}; + if (message.evidence) { + obj.evidence = message.evidence.map(e => e ? Evidence.toAmino(e) : undefined); + } else { + obj.evidence = message.evidence; + } + return obj; + }, + fromAminoMsg(object: EvidenceListAminoMsg): EvidenceList { + return EvidenceList.fromAmino(object.value); + }, + fromProtoMsg(message: EvidenceListProtoMsg): EvidenceList { + return EvidenceList.decode(message.value); + }, + toProto(message: EvidenceList): Uint8Array { + return EvidenceList.encode(message).finish(); + }, + toProtoMsg(message: EvidenceList): EvidenceListProtoMsg { + return { + typeUrl: '/tendermint.types.EvidenceList', + value: EvidenceList.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(EvidenceList.typeUrl, EvidenceList); \ No newline at end of file diff --git a/libs/cosmos-types/tendermint/types/params.ts b/libs/cosmos-types/tendermint/types/params.ts index 2d55ee83..81e162ce 100644 --- a/libs/cosmos-types/tendermint/types/params.ts +++ b/libs/cosmos-types/tendermint/types/params.ts @@ -1,7 +1,7 @@ -import { Duration, DurationAmino } from "../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { Duration, DurationAmino } from '../../google/protobuf/duration'; +import { DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. @@ -14,7 +14,7 @@ export interface ConsensusParams { abci?: ABCIParams; } export interface ConsensusParamsProtoMsg { - typeUrl: "/tendermint.types.ConsensusParams"; + typeUrl: '/tendermint.types.ConsensusParams'; value: Uint8Array; } /** @@ -29,7 +29,7 @@ export interface ConsensusParamsAmino { abci?: ABCIParamsAmino; } export interface ConsensusParamsAminoMsg { - type: "/tendermint.types.ConsensusParams"; + type: '/tendermint.types.ConsensusParams'; value: ConsensusParamsAmino; } /** BlockParams contains limits on the block size. */ @@ -46,7 +46,7 @@ export interface BlockParams { maxGas: bigint; } export interface BlockParamsProtoMsg { - typeUrl: "/tendermint.types.BlockParams"; + typeUrl: '/tendermint.types.BlockParams'; value: Uint8Array; } /** BlockParams contains limits on the block size. */ @@ -63,7 +63,7 @@ export interface BlockParamsAmino { max_gas: string; } export interface BlockParamsAminoMsg { - type: "/tendermint.types.BlockParams"; + type: '/tendermint.types.BlockParams'; value: BlockParamsAmino; } /** EvidenceParams determine how we handle evidence of malfeasance. */ @@ -91,7 +91,7 @@ export interface EvidenceParams { maxBytes: bigint; } export interface EvidenceParamsProtoMsg { - typeUrl: "/tendermint.types.EvidenceParams"; + typeUrl: '/tendermint.types.EvidenceParams'; value: Uint8Array; } /** EvidenceParams determine how we handle evidence of malfeasance. */ @@ -119,7 +119,7 @@ export interface EvidenceParamsAmino { max_bytes: string; } export interface EvidenceParamsAminoMsg { - type: "/tendermint.types.EvidenceParams"; + type: '/tendermint.types.EvidenceParams'; value: EvidenceParamsAmino; } /** @@ -130,7 +130,7 @@ export interface ValidatorParams { pubKeyTypes: string[]; } export interface ValidatorParamsProtoMsg { - typeUrl: "/tendermint.types.ValidatorParams"; + typeUrl: '/tendermint.types.ValidatorParams'; value: Uint8Array; } /** @@ -141,7 +141,7 @@ export interface ValidatorParamsAmino { pub_key_types: string[]; } export interface ValidatorParamsAminoMsg { - type: "/tendermint.types.ValidatorParams"; + type: '/tendermint.types.ValidatorParams'; value: ValidatorParamsAmino; } /** VersionParams contains the ABCI application version. */ @@ -149,7 +149,7 @@ export interface VersionParams { app: bigint; } export interface VersionParamsProtoMsg { - typeUrl: "/tendermint.types.VersionParams"; + typeUrl: '/tendermint.types.VersionParams'; value: Uint8Array; } /** VersionParams contains the ABCI application version. */ @@ -157,7 +157,7 @@ export interface VersionParamsAmino { app: string; } export interface VersionParamsAminoMsg { - type: "/tendermint.types.VersionParams"; + type: '/tendermint.types.VersionParams'; value: VersionParamsAmino; } /** @@ -170,7 +170,7 @@ export interface HashedParams { blockMaxGas: bigint; } export interface HashedParamsProtoMsg { - typeUrl: "/tendermint.types.HashedParams"; + typeUrl: '/tendermint.types.HashedParams'; value: Uint8Array; } /** @@ -183,7 +183,7 @@ export interface HashedParamsAmino { block_max_gas: string; } export interface HashedParamsAminoMsg { - type: "/tendermint.types.HashedParams"; + type: '/tendermint.types.HashedParams'; value: HashedParamsAmino; } /** ABCIParams configure functionality specific to the Application Blockchain Interface. */ @@ -202,7 +202,7 @@ export interface ABCIParams { voteExtensionsEnableHeight: bigint; } export interface ABCIParamsProtoMsg { - typeUrl: "/tendermint.types.ABCIParams"; + typeUrl: '/tendermint.types.ABCIParams'; value: Uint8Array; } /** ABCIParams configure functionality specific to the Application Blockchain Interface. */ @@ -221,7 +221,7 @@ export interface ABCIParamsAmino { vote_extensions_enable_height: string; } export interface ABCIParamsAminoMsg { - type: "/tendermint.types.ABCIParams"; + type: '/tendermint.types.ABCIParams'; value: ABCIParamsAmino; } function createBaseConsensusParams(): ConsensusParams { @@ -234,7 +234,7 @@ function createBaseConsensusParams(): ConsensusParams { }; } export const ConsensusParams = { - typeUrl: "/tendermint.types.ConsensusParams", + typeUrl: '/tendermint.types.ConsensusParams', is(o: any): o is ConsensusParams { return o && o.$typeUrl === ConsensusParams.typeUrl; }, @@ -266,24 +266,24 @@ export const ConsensusParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - case 5: - message.abci = ABCIParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.block = BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = ValidatorParams.decode(reader, reader.uint32()); + break; + case 4: + message.version = VersionParams.decode(reader, reader.uint32()); + break; + case 5: + message.abci = ABCIParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -336,7 +336,7 @@ export const ConsensusParams = { }, toProtoMsg(message: ConsensusParams): ConsensusParamsProtoMsg { return { - typeUrl: "/tendermint.types.ConsensusParams", + typeUrl: '/tendermint.types.ConsensusParams', value: ConsensusParams.encode(message).finish() }; } @@ -349,12 +349,12 @@ function createBaseBlockParams(): BlockParams { }; } export const BlockParams = { - typeUrl: "/tendermint.types.BlockParams", + typeUrl: '/tendermint.types.BlockParams', is(o: any): o is BlockParams { - return o && (o.$typeUrl === BlockParams.typeUrl || typeof o.maxBytes === "bigint" && typeof o.maxGas === "bigint"); + return o && (o.$typeUrl === BlockParams.typeUrl || typeof o.maxBytes === 'bigint' && typeof o.maxGas === 'bigint'); }, isAmino(o: any): o is BlockParamsAmino { - return o && (o.$typeUrl === BlockParams.typeUrl || typeof o.max_bytes === "bigint" && typeof o.max_gas === "bigint"); + return o && (o.$typeUrl === BlockParams.typeUrl || typeof o.max_bytes === 'bigint' && typeof o.max_gas === 'bigint'); }, encode(message: BlockParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.maxBytes !== BigInt(0)) { @@ -372,15 +372,15 @@ export const BlockParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.maxBytes = reader.int64(); - break; - case 2: - message.maxGas = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -418,7 +418,7 @@ export const BlockParams = { }, toProtoMsg(message: BlockParams): BlockParamsProtoMsg { return { - typeUrl: "/tendermint.types.BlockParams", + typeUrl: '/tendermint.types.BlockParams', value: BlockParams.encode(message).finish() }; } @@ -432,12 +432,12 @@ function createBaseEvidenceParams(): EvidenceParams { }; } export const EvidenceParams = { - typeUrl: "/tendermint.types.EvidenceParams", + typeUrl: '/tendermint.types.EvidenceParams', is(o: any): o is EvidenceParams { - return o && (o.$typeUrl === EvidenceParams.typeUrl || typeof o.maxAgeNumBlocks === "bigint" && Duration.is(o.maxAgeDuration) && typeof o.maxBytes === "bigint"); + return o && (o.$typeUrl === EvidenceParams.typeUrl || typeof o.maxAgeNumBlocks === 'bigint' && Duration.is(o.maxAgeDuration) && typeof o.maxBytes === 'bigint'); }, isAmino(o: any): o is EvidenceParamsAmino { - return o && (o.$typeUrl === EvidenceParams.typeUrl || typeof o.max_age_num_blocks === "bigint" && Duration.isAmino(o.max_age_duration) && typeof o.max_bytes === "bigint"); + return o && (o.$typeUrl === EvidenceParams.typeUrl || typeof o.max_age_num_blocks === 'bigint' && Duration.isAmino(o.max_age_duration) && typeof o.max_bytes === 'bigint'); }, encode(message: EvidenceParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.maxAgeNumBlocks !== BigInt(0)) { @@ -458,18 +458,18 @@ export const EvidenceParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.maxAgeNumBlocks = reader.int64(); - break; - case 2: - message.maxAgeDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.maxBytes = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.maxAgeNumBlocks = reader.int64(); + break; + case 2: + message.maxAgeDuration = Duration.decode(reader, reader.uint32()); + break; + case 3: + message.maxBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -512,7 +512,7 @@ export const EvidenceParams = { }, toProtoMsg(message: EvidenceParams): EvidenceParamsProtoMsg { return { - typeUrl: "/tendermint.types.EvidenceParams", + typeUrl: '/tendermint.types.EvidenceParams', value: EvidenceParams.encode(message).finish() }; } @@ -524,12 +524,12 @@ function createBaseValidatorParams(): ValidatorParams { }; } export const ValidatorParams = { - typeUrl: "/tendermint.types.ValidatorParams", + typeUrl: '/tendermint.types.ValidatorParams', is(o: any): o is ValidatorParams { - return o && (o.$typeUrl === ValidatorParams.typeUrl || Array.isArray(o.pubKeyTypes) && (!o.pubKeyTypes.length || typeof o.pubKeyTypes[0] === "string")); + return o && (o.$typeUrl === ValidatorParams.typeUrl || Array.isArray(o.pubKeyTypes) && (!o.pubKeyTypes.length || typeof o.pubKeyTypes[0] === 'string')); }, isAmino(o: any): o is ValidatorParamsAmino { - return o && (o.$typeUrl === ValidatorParams.typeUrl || Array.isArray(o.pub_key_types) && (!o.pub_key_types.length || typeof o.pub_key_types[0] === "string")); + return o && (o.$typeUrl === ValidatorParams.typeUrl || Array.isArray(o.pub_key_types) && (!o.pub_key_types.length || typeof o.pub_key_types[0] === 'string')); }, encode(message: ValidatorParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.pubKeyTypes) { @@ -544,12 +544,12 @@ export const ValidatorParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pubKeyTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pubKeyTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -584,7 +584,7 @@ export const ValidatorParams = { }, toProtoMsg(message: ValidatorParams): ValidatorParamsProtoMsg { return { - typeUrl: "/tendermint.types.ValidatorParams", + typeUrl: '/tendermint.types.ValidatorParams', value: ValidatorParams.encode(message).finish() }; } @@ -596,12 +596,12 @@ function createBaseVersionParams(): VersionParams { }; } export const VersionParams = { - typeUrl: "/tendermint.types.VersionParams", + typeUrl: '/tendermint.types.VersionParams', is(o: any): o is VersionParams { - return o && (o.$typeUrl === VersionParams.typeUrl || typeof o.app === "bigint"); + return o && (o.$typeUrl === VersionParams.typeUrl || typeof o.app === 'bigint'); }, isAmino(o: any): o is VersionParamsAmino { - return o && (o.$typeUrl === VersionParams.typeUrl || typeof o.app === "bigint"); + return o && (o.$typeUrl === VersionParams.typeUrl || typeof o.app === 'bigint'); }, encode(message: VersionParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.app !== BigInt(0)) { @@ -616,12 +616,12 @@ export const VersionParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.app = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -654,7 +654,7 @@ export const VersionParams = { }, toProtoMsg(message: VersionParams): VersionParamsProtoMsg { return { - typeUrl: "/tendermint.types.VersionParams", + typeUrl: '/tendermint.types.VersionParams', value: VersionParams.encode(message).finish() }; } @@ -667,12 +667,12 @@ function createBaseHashedParams(): HashedParams { }; } export const HashedParams = { - typeUrl: "/tendermint.types.HashedParams", + typeUrl: '/tendermint.types.HashedParams', is(o: any): o is HashedParams { - return o && (o.$typeUrl === HashedParams.typeUrl || typeof o.blockMaxBytes === "bigint" && typeof o.blockMaxGas === "bigint"); + return o && (o.$typeUrl === HashedParams.typeUrl || typeof o.blockMaxBytes === 'bigint' && typeof o.blockMaxGas === 'bigint'); }, isAmino(o: any): o is HashedParamsAmino { - return o && (o.$typeUrl === HashedParams.typeUrl || typeof o.block_max_bytes === "bigint" && typeof o.block_max_gas === "bigint"); + return o && (o.$typeUrl === HashedParams.typeUrl || typeof o.block_max_bytes === 'bigint' && typeof o.block_max_gas === 'bigint'); }, encode(message: HashedParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.blockMaxBytes !== BigInt(0)) { @@ -690,15 +690,15 @@ export const HashedParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.blockMaxBytes = reader.int64(); - break; - case 2: - message.blockMaxGas = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.blockMaxBytes = reader.int64(); + break; + case 2: + message.blockMaxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -736,7 +736,7 @@ export const HashedParams = { }, toProtoMsg(message: HashedParams): HashedParamsProtoMsg { return { - typeUrl: "/tendermint.types.HashedParams", + typeUrl: '/tendermint.types.HashedParams', value: HashedParams.encode(message).finish() }; } @@ -748,12 +748,12 @@ function createBaseABCIParams(): ABCIParams { }; } export const ABCIParams = { - typeUrl: "/tendermint.types.ABCIParams", + typeUrl: '/tendermint.types.ABCIParams', is(o: any): o is ABCIParams { - return o && (o.$typeUrl === ABCIParams.typeUrl || typeof o.voteExtensionsEnableHeight === "bigint"); + return o && (o.$typeUrl === ABCIParams.typeUrl || typeof o.voteExtensionsEnableHeight === 'bigint'); }, isAmino(o: any): o is ABCIParamsAmino { - return o && (o.$typeUrl === ABCIParams.typeUrl || typeof o.vote_extensions_enable_height === "bigint"); + return o && (o.$typeUrl === ABCIParams.typeUrl || typeof o.vote_extensions_enable_height === 'bigint'); }, encode(message: ABCIParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.voteExtensionsEnableHeight !== BigInt(0)) { @@ -768,12 +768,12 @@ export const ABCIParams = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.voteExtensionsEnableHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.voteExtensionsEnableHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -806,7 +806,7 @@ export const ABCIParams = { }, toProtoMsg(message: ABCIParams): ABCIParamsProtoMsg { return { - typeUrl: "/tendermint.types.ABCIParams", + typeUrl: '/tendermint.types.ABCIParams', value: ABCIParams.encode(message).finish() }; } diff --git a/libs/cosmos-types/tendermint/types/types.ts b/libs/cosmos-types/tendermint/types/types.ts index e5257992..80a68990 100644 --- a/libs/cosmos-types/tendermint/types/types.ts +++ b/libs/cosmos-types/tendermint/types/types.ts @@ -1,10 +1,10 @@ -import { Proof, ProofAmino } from "../crypto/proof"; -import { Consensus, ConsensusAmino } from "../version/types"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { BlockIDFlag, ValidatorSet, ValidatorSetAmino } from "./validator"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, toTimestamp, fromTimestamp, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { Timestamp } from '../../google/protobuf/timestamp'; +import { base64FromBytes, bytesFromBase64, DeepPartial, fromTimestamp, isSet,toTimestamp } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; +import { Proof, ProofAmino } from '../crypto/proof'; +import { Consensus, ConsensusAmino } from '../version/types'; +import { BlockIDFlag, ValidatorSet, ValidatorSetAmino } from './validator'; /** SignedMsgType is a type of signed message in the consensus. */ export enum SignedMsgType { SIGNED_MSG_TYPE_UNKNOWN = 0, @@ -18,37 +18,37 @@ export enum SignedMsgType { export const SignedMsgTypeAmino = SignedMsgType; export function signedMsgTypeFromJSON(object: any): SignedMsgType { switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; + case 0: + case 'SIGNED_MSG_TYPE_UNKNOWN': + return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; + case 1: + case 'SIGNED_MSG_TYPE_PREVOTE': + return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; + case 2: + case 'SIGNED_MSG_TYPE_PRECOMMIT': + return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; + case 32: + case 'SIGNED_MSG_TYPE_PROPOSAL': + return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; + case -1: + case 'UNRECOGNIZED': + default: + return SignedMsgType.UNRECOGNIZED; } } export function signedMsgTypeToJSON(object: SignedMsgType): string { switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - case SignedMsgType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: + return 'SIGNED_MSG_TYPE_UNKNOWN'; + case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: + return 'SIGNED_MSG_TYPE_PREVOTE'; + case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: + return 'SIGNED_MSG_TYPE_PRECOMMIT'; + case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: + return 'SIGNED_MSG_TYPE_PROPOSAL'; + case SignedMsgType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } /** PartsetHeader */ @@ -57,7 +57,7 @@ export interface PartSetHeader { hash: Uint8Array; } export interface PartSetHeaderProtoMsg { - typeUrl: "/tendermint.types.PartSetHeader"; + typeUrl: '/tendermint.types.PartSetHeader'; value: Uint8Array; } /** PartsetHeader */ @@ -66,7 +66,7 @@ export interface PartSetHeaderAmino { hash: string; } export interface PartSetHeaderAminoMsg { - type: "/tendermint.types.PartSetHeader"; + type: '/tendermint.types.PartSetHeader'; value: PartSetHeaderAmino; } export interface Part { @@ -75,7 +75,7 @@ export interface Part { proof: Proof; } export interface PartProtoMsg { - typeUrl: "/tendermint.types.Part"; + typeUrl: '/tendermint.types.Part'; value: Uint8Array; } export interface PartAmino { @@ -84,7 +84,7 @@ export interface PartAmino { proof: ProofAmino; } export interface PartAminoMsg { - type: "/tendermint.types.Part"; + type: '/tendermint.types.Part'; value: PartAmino; } /** BlockID */ @@ -93,7 +93,7 @@ export interface BlockID { partSetHeader: PartSetHeader; } export interface BlockIDProtoMsg { - typeUrl: "/tendermint.types.BlockID"; + typeUrl: '/tendermint.types.BlockID'; value: Uint8Array; } /** BlockID */ @@ -102,7 +102,7 @@ export interface BlockIDAmino { part_set_header: PartSetHeaderAmino; } export interface BlockIDAminoMsg { - type: "/tendermint.types.BlockID"; + type: '/tendermint.types.BlockID'; value: BlockIDAmino; } /** Header defines the structure of a block header. */ @@ -132,7 +132,7 @@ export interface Header { proposerAddress: Uint8Array; } export interface HeaderProtoMsg { - typeUrl: "/tendermint.types.Header"; + typeUrl: '/tendermint.types.Header'; value: Uint8Array; } /** Header defines the structure of a block header. */ @@ -162,7 +162,7 @@ export interface HeaderAmino { proposer_address: string; } export interface HeaderAminoMsg { - type: "/tendermint.types.Header"; + type: '/tendermint.types.Header'; value: HeaderAmino; } /** Data contains the set of transactions included in the block */ @@ -175,7 +175,7 @@ export interface Data { txs: Uint8Array[]; } export interface DataProtoMsg { - typeUrl: "/tendermint.types.Data"; + typeUrl: '/tendermint.types.Data'; value: Uint8Array; } /** Data contains the set of transactions included in the block */ @@ -188,7 +188,7 @@ export interface DataAmino { txs: string[]; } export interface DataAminoMsg { - type: "/tendermint.types.Data"; + type: '/tendermint.types.Data'; value: DataAmino; } /** @@ -222,7 +222,7 @@ export interface Vote { extensionSignature: Uint8Array; } export interface VoteProtoMsg { - typeUrl: "/tendermint.types.Vote"; + typeUrl: '/tendermint.types.Vote'; value: Uint8Array; } /** @@ -256,7 +256,7 @@ export interface VoteAmino { extension_signature: string; } export interface VoteAminoMsg { - type: "/tendermint.types.Vote"; + type: '/tendermint.types.Vote'; value: VoteAmino; } /** Commit contains the evidence that a block was committed by a set of validators. */ @@ -267,7 +267,7 @@ export interface Commit { signatures: CommitSig[]; } export interface CommitProtoMsg { - typeUrl: "/tendermint.types.Commit"; + typeUrl: '/tendermint.types.Commit'; value: Uint8Array; } /** Commit contains the evidence that a block was committed by a set of validators. */ @@ -278,7 +278,7 @@ export interface CommitAmino { signatures: CommitSigAmino[]; } export interface CommitAminoMsg { - type: "/tendermint.types.Commit"; + type: '/tendermint.types.Commit'; value: CommitAmino; } /** CommitSig is a part of the Vote included in a Commit. */ @@ -289,7 +289,7 @@ export interface CommitSig { signature: Uint8Array; } export interface CommitSigProtoMsg { - typeUrl: "/tendermint.types.CommitSig"; + typeUrl: '/tendermint.types.CommitSig'; value: Uint8Array; } /** CommitSig is a part of the Vote included in a Commit. */ @@ -300,7 +300,7 @@ export interface CommitSigAmino { signature: string; } export interface CommitSigAminoMsg { - type: "/tendermint.types.CommitSig"; + type: '/tendermint.types.CommitSig'; value: CommitSigAmino; } export interface ExtendedCommit { @@ -310,7 +310,7 @@ export interface ExtendedCommit { extendedSignatures: ExtendedCommitSig[]; } export interface ExtendedCommitProtoMsg { - typeUrl: "/tendermint.types.ExtendedCommit"; + typeUrl: '/tendermint.types.ExtendedCommit'; value: Uint8Array; } export interface ExtendedCommitAmino { @@ -320,7 +320,7 @@ export interface ExtendedCommitAmino { extended_signatures: ExtendedCommitSigAmino[]; } export interface ExtendedCommitAminoMsg { - type: "/tendermint.types.ExtendedCommit"; + type: '/tendermint.types.ExtendedCommit'; value: ExtendedCommitAmino; } /** @@ -339,7 +339,7 @@ export interface ExtendedCommitSig { extensionSignature: Uint8Array; } export interface ExtendedCommitSigProtoMsg { - typeUrl: "/tendermint.types.ExtendedCommitSig"; + typeUrl: '/tendermint.types.ExtendedCommitSig'; value: Uint8Array; } /** @@ -358,7 +358,7 @@ export interface ExtendedCommitSigAmino { extension_signature: string; } export interface ExtendedCommitSigAminoMsg { - type: "/tendermint.types.ExtendedCommitSig"; + type: '/tendermint.types.ExtendedCommitSig'; value: ExtendedCommitSigAmino; } export interface Proposal { @@ -371,7 +371,7 @@ export interface Proposal { signature: Uint8Array; } export interface ProposalProtoMsg { - typeUrl: "/tendermint.types.Proposal"; + typeUrl: '/tendermint.types.Proposal'; value: Uint8Array; } export interface ProposalAmino { @@ -384,7 +384,7 @@ export interface ProposalAmino { signature: string; } export interface ProposalAminoMsg { - type: "/tendermint.types.Proposal"; + type: '/tendermint.types.Proposal'; value: ProposalAmino; } export interface SignedHeader { @@ -392,7 +392,7 @@ export interface SignedHeader { commit?: Commit; } export interface SignedHeaderProtoMsg { - typeUrl: "/tendermint.types.SignedHeader"; + typeUrl: '/tendermint.types.SignedHeader'; value: Uint8Array; } export interface SignedHeaderAmino { @@ -400,7 +400,7 @@ export interface SignedHeaderAmino { commit?: CommitAmino; } export interface SignedHeaderAminoMsg { - type: "/tendermint.types.SignedHeader"; + type: '/tendermint.types.SignedHeader'; value: SignedHeaderAmino; } export interface LightBlock { @@ -408,7 +408,7 @@ export interface LightBlock { validatorSet?: ValidatorSet; } export interface LightBlockProtoMsg { - typeUrl: "/tendermint.types.LightBlock"; + typeUrl: '/tendermint.types.LightBlock'; value: Uint8Array; } export interface LightBlockAmino { @@ -416,7 +416,7 @@ export interface LightBlockAmino { validator_set?: ValidatorSetAmino; } export interface LightBlockAminoMsg { - type: "/tendermint.types.LightBlock"; + type: '/tendermint.types.LightBlock'; value: LightBlockAmino; } export interface BlockMeta { @@ -426,7 +426,7 @@ export interface BlockMeta { numTxs: bigint; } export interface BlockMetaProtoMsg { - typeUrl: "/tendermint.types.BlockMeta"; + typeUrl: '/tendermint.types.BlockMeta'; value: Uint8Array; } export interface BlockMetaAmino { @@ -436,7 +436,7 @@ export interface BlockMetaAmino { num_txs: string; } export interface BlockMetaAminoMsg { - type: "/tendermint.types.BlockMeta"; + type: '/tendermint.types.BlockMeta'; value: BlockMetaAmino; } /** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ @@ -446,7 +446,7 @@ export interface TxProof { proof?: Proof; } export interface TxProofProtoMsg { - typeUrl: "/tendermint.types.TxProof"; + typeUrl: '/tendermint.types.TxProof'; value: Uint8Array; } /** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ @@ -456,7 +456,7 @@ export interface TxProofAmino { proof?: ProofAmino; } export interface TxProofAminoMsg { - type: "/tendermint.types.TxProof"; + type: '/tendermint.types.TxProof'; value: TxProofAmino; } function createBasePartSetHeader(): PartSetHeader { @@ -466,12 +466,12 @@ function createBasePartSetHeader(): PartSetHeader { }; } export const PartSetHeader = { - typeUrl: "/tendermint.types.PartSetHeader", + typeUrl: '/tendermint.types.PartSetHeader', is(o: any): o is PartSetHeader { - return o && (o.$typeUrl === PartSetHeader.typeUrl || typeof o.total === "number" && (o.hash instanceof Uint8Array || typeof o.hash === "string")); + return o && (o.$typeUrl === PartSetHeader.typeUrl || typeof o.total === 'number' && (o.hash instanceof Uint8Array || typeof o.hash === 'string')); }, isAmino(o: any): o is PartSetHeaderAmino { - return o && (o.$typeUrl === PartSetHeader.typeUrl || typeof o.total === "number" && (o.hash instanceof Uint8Array || typeof o.hash === "string")); + return o && (o.$typeUrl === PartSetHeader.typeUrl || typeof o.total === 'number' && (o.hash instanceof Uint8Array || typeof o.hash === 'string')); }, encode(message: PartSetHeader, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.total !== 0) { @@ -489,15 +489,15 @@ export const PartSetHeader = { while (reader.pos < end) { const 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; + case 1: + message.total = reader.uint32(); + break; + case 2: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -535,7 +535,7 @@ export const PartSetHeader = { }, toProtoMsg(message: PartSetHeader): PartSetHeaderProtoMsg { return { - typeUrl: "/tendermint.types.PartSetHeader", + typeUrl: '/tendermint.types.PartSetHeader', value: PartSetHeader.encode(message).finish() }; } @@ -549,12 +549,12 @@ function createBasePart(): Part { }; } export const Part = { - typeUrl: "/tendermint.types.Part", + typeUrl: '/tendermint.types.Part', is(o: any): o is Part { - return o && (o.$typeUrl === Part.typeUrl || typeof o.index === "number" && (o.bytes instanceof Uint8Array || typeof o.bytes === "string") && Proof.is(o.proof)); + return o && (o.$typeUrl === Part.typeUrl || typeof o.index === 'number' && (o.bytes instanceof Uint8Array || typeof o.bytes === 'string') && Proof.is(o.proof)); }, isAmino(o: any): o is PartAmino { - return o && (o.$typeUrl === Part.typeUrl || typeof o.index === "number" && (o.bytes instanceof Uint8Array || typeof o.bytes === "string") && Proof.isAmino(o.proof)); + return o && (o.$typeUrl === Part.typeUrl || typeof o.index === 'number' && (o.bytes instanceof Uint8Array || typeof o.bytes === 'string') && Proof.isAmino(o.proof)); }, encode(message: Part, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.index !== 0) { @@ -575,18 +575,18 @@ export const Part = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.index = reader.uint32(); + break; + case 2: + message.bytes = reader.bytes(); + break; + case 3: + message.proof = Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -629,7 +629,7 @@ export const Part = { }, toProtoMsg(message: Part): PartProtoMsg { return { - typeUrl: "/tendermint.types.Part", + typeUrl: '/tendermint.types.Part', value: Part.encode(message).finish() }; } @@ -642,12 +642,12 @@ function createBaseBlockID(): BlockID { }; } export const BlockID = { - typeUrl: "/tendermint.types.BlockID", + typeUrl: '/tendermint.types.BlockID', is(o: any): o is BlockID { - return o && (o.$typeUrl === BlockID.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === "string") && PartSetHeader.is(o.partSetHeader)); + return o && (o.$typeUrl === BlockID.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === 'string') && PartSetHeader.is(o.partSetHeader)); }, isAmino(o: any): o is BlockIDAmino { - return o && (o.$typeUrl === BlockID.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === "string") && PartSetHeader.isAmino(o.part_set_header)); + return o && (o.$typeUrl === BlockID.typeUrl || (o.hash instanceof Uint8Array || typeof o.hash === 'string') && PartSetHeader.isAmino(o.part_set_header)); }, encode(message: BlockID, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.hash.length !== 0) { @@ -665,15 +665,15 @@ export const BlockID = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -711,7 +711,7 @@ export const BlockID = { }, toProtoMsg(message: BlockID): BlockIDProtoMsg { return { - typeUrl: "/tendermint.types.BlockID", + typeUrl: '/tendermint.types.BlockID', value: BlockID.encode(message).finish() }; } @@ -720,7 +720,7 @@ GlobalDecoderRegistry.register(BlockID.typeUrl, BlockID); function createBaseHeader(): Header { return { version: Consensus.fromPartial({}), - chainId: "", + chainId: '', height: BigInt(0), time: new Date(), lastBlockId: BlockID.fromPartial({}), @@ -736,18 +736,18 @@ function createBaseHeader(): Header { }; } export const Header = { - typeUrl: "/tendermint.types.Header", + typeUrl: '/tendermint.types.Header', is(o: any): o is Header { - return o && (o.$typeUrl === Header.typeUrl || Consensus.is(o.version) && typeof o.chainId === "string" && typeof o.height === "bigint" && Timestamp.is(o.time) && BlockID.is(o.lastBlockId) && (o.lastCommitHash instanceof Uint8Array || typeof o.lastCommitHash === "string") && (o.dataHash instanceof Uint8Array || typeof o.dataHash === "string") && (o.validatorsHash instanceof Uint8Array || typeof o.validatorsHash === "string") && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === "string") && (o.consensusHash instanceof Uint8Array || typeof o.consensusHash === "string") && (o.appHash instanceof Uint8Array || typeof o.appHash === "string") && (o.lastResultsHash instanceof Uint8Array || typeof o.lastResultsHash === "string") && (o.evidenceHash instanceof Uint8Array || typeof o.evidenceHash === "string") && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === "string")); + return o && (o.$typeUrl === Header.typeUrl || Consensus.is(o.version) && typeof o.chainId === 'string' && typeof o.height === 'bigint' && Timestamp.is(o.time) && BlockID.is(o.lastBlockId) && (o.lastCommitHash instanceof Uint8Array || typeof o.lastCommitHash === 'string') && (o.dataHash instanceof Uint8Array || typeof o.dataHash === 'string') && (o.validatorsHash instanceof Uint8Array || typeof o.validatorsHash === 'string') && (o.nextValidatorsHash instanceof Uint8Array || typeof o.nextValidatorsHash === 'string') && (o.consensusHash instanceof Uint8Array || typeof o.consensusHash === 'string') && (o.appHash instanceof Uint8Array || typeof o.appHash === 'string') && (o.lastResultsHash instanceof Uint8Array || typeof o.lastResultsHash === 'string') && (o.evidenceHash instanceof Uint8Array || typeof o.evidenceHash === 'string') && (o.proposerAddress instanceof Uint8Array || typeof o.proposerAddress === 'string')); }, isAmino(o: any): o is HeaderAmino { - return o && (o.$typeUrl === Header.typeUrl || Consensus.isAmino(o.version) && typeof o.chain_id === "string" && typeof o.height === "bigint" && Timestamp.isAmino(o.time) && BlockID.isAmino(o.last_block_id) && (o.last_commit_hash instanceof Uint8Array || typeof o.last_commit_hash === "string") && (o.data_hash instanceof Uint8Array || typeof o.data_hash === "string") && (o.validators_hash instanceof Uint8Array || typeof o.validators_hash === "string") && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === "string") && (o.consensus_hash instanceof Uint8Array || typeof o.consensus_hash === "string") && (o.app_hash instanceof Uint8Array || typeof o.app_hash === "string") && (o.last_results_hash instanceof Uint8Array || typeof o.last_results_hash === "string") && (o.evidence_hash instanceof Uint8Array || typeof o.evidence_hash === "string") && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === "string")); + return o && (o.$typeUrl === Header.typeUrl || Consensus.isAmino(o.version) && typeof o.chain_id === 'string' && typeof o.height === 'bigint' && Timestamp.isAmino(o.time) && BlockID.isAmino(o.last_block_id) && (o.last_commit_hash instanceof Uint8Array || typeof o.last_commit_hash === 'string') && (o.data_hash instanceof Uint8Array || typeof o.data_hash === 'string') && (o.validators_hash instanceof Uint8Array || typeof o.validators_hash === 'string') && (o.next_validators_hash instanceof Uint8Array || typeof o.next_validators_hash === 'string') && (o.consensus_hash instanceof Uint8Array || typeof o.consensus_hash === 'string') && (o.app_hash instanceof Uint8Array || typeof o.app_hash === 'string') && (o.last_results_hash instanceof Uint8Array || typeof o.last_results_hash === 'string') && (o.evidence_hash instanceof Uint8Array || typeof o.evidence_hash === 'string') && (o.proposer_address instanceof Uint8Array || typeof o.proposer_address === 'string')); }, encode(message: Header, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.version !== undefined) { Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); } - if (message.chainId !== "") { + if (message.chainId !== '') { writer.uint32(18).string(message.chainId); } if (message.height !== BigInt(0)) { @@ -795,51 +795,51 @@ export const Header = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.version = Consensus.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 5: + message.lastBlockId = BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.lastCommitHash = reader.bytes(); + break; + case 7: + message.dataHash = reader.bytes(); + break; + case 8: + message.validatorsHash = reader.bytes(); + break; + case 9: + message.nextValidatorsHash = reader.bytes(); + break; + case 10: + message.consensusHash = reader.bytes(); + break; + case 11: + message.appHash = reader.bytes(); + break; + case 12: + message.lastResultsHash = reader.bytes(); + break; + case 13: + message.evidenceHash = reader.bytes(); + break; + case 14: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -847,7 +847,7 @@ export const Header = { fromPartial(object: DeepPartial
): Header { const message = createBaseHeader(); message.version = object.version !== undefined && object.version !== null ? Consensus.fromPartial(object.version) : undefined; - message.chainId = object.chainId ?? ""; + message.chainId = object.chainId ?? ''; message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); message.time = object.time ?? undefined; message.lastBlockId = object.lastBlockId !== undefined && object.lastBlockId !== null ? BlockID.fromPartial(object.lastBlockId) : undefined; @@ -911,7 +911,7 @@ export const Header = { toAmino(message: Header): HeaderAmino { const obj: any = {}; obj.version = message.version ? Consensus.toAmino(message.version) : undefined; - obj.chain_id = message.chainId === "" ? undefined : message.chainId; + obj.chain_id = message.chainId === '' ? undefined : message.chainId; obj.height = message.height !== BigInt(0) ? message.height.toString() : undefined; obj.time = message.time ? Timestamp.toAmino(toTimestamp(message.time)) : undefined; obj.last_block_id = message.lastBlockId ? BlockID.toAmino(message.lastBlockId) : undefined; @@ -937,7 +937,7 @@ export const Header = { }, toProtoMsg(message: Header): HeaderProtoMsg { return { - typeUrl: "/tendermint.types.Header", + typeUrl: '/tendermint.types.Header', value: Header.encode(message).finish() }; } @@ -949,12 +949,12 @@ function createBaseData(): Data { }; } export const Data = { - typeUrl: "/tendermint.types.Data", + typeUrl: '/tendermint.types.Data', is(o: any): o is Data { - return o && (o.$typeUrl === Data.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string")); + return o && (o.$typeUrl === Data.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string')); }, isAmino(o: any): o is DataAmino { - return o && (o.$typeUrl === Data.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === "string")); + return o && (o.$typeUrl === Data.typeUrl || Array.isArray(o.txs) && (!o.txs.length || o.txs[0] instanceof Uint8Array || typeof o.txs[0] === 'string')); }, encode(message: Data, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.txs) { @@ -969,12 +969,12 @@ export const Data = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.txs.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1009,7 +1009,7 @@ export const Data = { }, toProtoMsg(message: Data): DataProtoMsg { return { - typeUrl: "/tendermint.types.Data", + typeUrl: '/tendermint.types.Data', value: Data.encode(message).finish() }; } @@ -1030,12 +1030,12 @@ function createBaseVote(): Vote { }; } export const Vote = { - typeUrl: "/tendermint.types.Vote", + typeUrl: '/tendermint.types.Vote', is(o: any): o is Vote { - return o && (o.$typeUrl === Vote.typeUrl || isSet(o.type) && typeof o.height === "bigint" && typeof o.round === "number" && BlockID.is(o.blockId) && Timestamp.is(o.timestamp) && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === "string") && typeof o.validatorIndex === "number" && (o.signature instanceof Uint8Array || typeof o.signature === "string") && (o.extension instanceof Uint8Array || typeof o.extension === "string") && (o.extensionSignature instanceof Uint8Array || typeof o.extensionSignature === "string")); + return o && (o.$typeUrl === Vote.typeUrl || isSet(o.type) && typeof o.height === 'bigint' && typeof o.round === 'number' && BlockID.is(o.blockId) && Timestamp.is(o.timestamp) && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === 'string') && typeof o.validatorIndex === 'number' && (o.signature instanceof Uint8Array || typeof o.signature === 'string') && (o.extension instanceof Uint8Array || typeof o.extension === 'string') && (o.extensionSignature instanceof Uint8Array || typeof o.extensionSignature === 'string')); }, isAmino(o: any): o is VoteAmino { - return o && (o.$typeUrl === Vote.typeUrl || isSet(o.type) && typeof o.height === "bigint" && typeof o.round === "number" && BlockID.isAmino(o.block_id) && Timestamp.isAmino(o.timestamp) && (o.validator_address instanceof Uint8Array || typeof o.validator_address === "string") && typeof o.validator_index === "number" && (o.signature instanceof Uint8Array || typeof o.signature === "string") && (o.extension instanceof Uint8Array || typeof o.extension === "string") && (o.extension_signature instanceof Uint8Array || typeof o.extension_signature === "string")); + return o && (o.$typeUrl === Vote.typeUrl || isSet(o.type) && typeof o.height === 'bigint' && typeof o.round === 'number' && BlockID.isAmino(o.block_id) && Timestamp.isAmino(o.timestamp) && (o.validator_address instanceof Uint8Array || typeof o.validator_address === 'string') && typeof o.validator_index === 'number' && (o.signature instanceof Uint8Array || typeof o.signature === 'string') && (o.extension instanceof Uint8Array || typeof o.extension === 'string') && (o.extension_signature instanceof Uint8Array || typeof o.extension_signature === 'string')); }, encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.type !== 0) { @@ -1077,39 +1077,39 @@ export const Vote = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - case 9: - message.extension = reader.bytes(); - break; - case 10: - message.extensionSignature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.type = (reader.int32() as any); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.blockId = BlockID.decode(reader, reader.uint32()); + break; + case 5: + message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 6: + message.validatorAddress = reader.bytes(); + break; + case 7: + message.validatorIndex = reader.int32(); + break; + case 8: + message.signature = reader.bytes(); + break; + case 9: + message.extension = reader.bytes(); + break; + case 10: + message.extensionSignature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1187,7 +1187,7 @@ export const Vote = { }, toProtoMsg(message: Vote): VoteProtoMsg { return { - typeUrl: "/tendermint.types.Vote", + typeUrl: '/tendermint.types.Vote', value: Vote.encode(message).finish() }; } @@ -1202,12 +1202,12 @@ function createBaseCommit(): Commit { }; } export const Commit = { - typeUrl: "/tendermint.types.Commit", + typeUrl: '/tendermint.types.Commit', is(o: any): o is Commit { - return o && (o.$typeUrl === Commit.typeUrl || typeof o.height === "bigint" && typeof o.round === "number" && BlockID.is(o.blockId) && Array.isArray(o.signatures) && (!o.signatures.length || CommitSig.is(o.signatures[0]))); + return o && (o.$typeUrl === Commit.typeUrl || typeof o.height === 'bigint' && typeof o.round === 'number' && BlockID.is(o.blockId) && Array.isArray(o.signatures) && (!o.signatures.length || CommitSig.is(o.signatures[0]))); }, isAmino(o: any): o is CommitAmino { - return o && (o.$typeUrl === Commit.typeUrl || typeof o.height === "bigint" && typeof o.round === "number" && BlockID.isAmino(o.block_id) && Array.isArray(o.signatures) && (!o.signatures.length || CommitSig.isAmino(o.signatures[0]))); + return o && (o.$typeUrl === Commit.typeUrl || typeof o.height === 'bigint' && typeof o.round === 'number' && BlockID.isAmino(o.block_id) && Array.isArray(o.signatures) && (!o.signatures.length || CommitSig.isAmino(o.signatures[0]))); }, encode(message: Commit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.height !== BigInt(0)) { @@ -1231,21 +1231,21 @@ export const Commit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.height = reader.int64(); + break; + case 2: + message.round = reader.int32(); + break; + case 3: + message.blockId = BlockID.decode(reader, reader.uint32()); + break; + case 4: + message.signatures.push(CommitSig.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1295,7 +1295,7 @@ export const Commit = { }, toProtoMsg(message: Commit): CommitProtoMsg { return { - typeUrl: "/tendermint.types.Commit", + typeUrl: '/tendermint.types.Commit', value: Commit.encode(message).finish() }; } @@ -1310,12 +1310,12 @@ function createBaseCommitSig(): CommitSig { }; } export const CommitSig = { - typeUrl: "/tendermint.types.CommitSig", + typeUrl: '/tendermint.types.CommitSig', is(o: any): o is CommitSig { - return o && (o.$typeUrl === CommitSig.typeUrl || isSet(o.blockIdFlag) && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === "string") && Timestamp.is(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === "string")); + return o && (o.$typeUrl === CommitSig.typeUrl || isSet(o.blockIdFlag) && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === 'string') && Timestamp.is(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === 'string')); }, isAmino(o: any): o is CommitSigAmino { - return o && (o.$typeUrl === CommitSig.typeUrl || isSet(o.block_id_flag) && (o.validator_address instanceof Uint8Array || typeof o.validator_address === "string") && Timestamp.isAmino(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === "string")); + return o && (o.$typeUrl === CommitSig.typeUrl || isSet(o.block_id_flag) && (o.validator_address instanceof Uint8Array || typeof o.validator_address === 'string') && Timestamp.isAmino(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === 'string')); }, encode(message: CommitSig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.blockIdFlag !== 0) { @@ -1339,21 +1339,21 @@ export const CommitSig = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.blockIdFlag = (reader.int32() as any); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.blockIdFlag = (reader.int32() as any); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 4: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1401,7 +1401,7 @@ export const CommitSig = { }, toProtoMsg(message: CommitSig): CommitSigProtoMsg { return { - typeUrl: "/tendermint.types.CommitSig", + typeUrl: '/tendermint.types.CommitSig', value: CommitSig.encode(message).finish() }; } @@ -1416,12 +1416,12 @@ function createBaseExtendedCommit(): ExtendedCommit { }; } export const ExtendedCommit = { - typeUrl: "/tendermint.types.ExtendedCommit", + typeUrl: '/tendermint.types.ExtendedCommit', is(o: any): o is ExtendedCommit { - return o && (o.$typeUrl === ExtendedCommit.typeUrl || typeof o.height === "bigint" && typeof o.round === "number" && BlockID.is(o.blockId) && Array.isArray(o.extendedSignatures) && (!o.extendedSignatures.length || ExtendedCommitSig.is(o.extendedSignatures[0]))); + return o && (o.$typeUrl === ExtendedCommit.typeUrl || typeof o.height === 'bigint' && typeof o.round === 'number' && BlockID.is(o.blockId) && Array.isArray(o.extendedSignatures) && (!o.extendedSignatures.length || ExtendedCommitSig.is(o.extendedSignatures[0]))); }, isAmino(o: any): o is ExtendedCommitAmino { - return o && (o.$typeUrl === ExtendedCommit.typeUrl || typeof o.height === "bigint" && typeof o.round === "number" && BlockID.isAmino(o.block_id) && Array.isArray(o.extended_signatures) && (!o.extended_signatures.length || ExtendedCommitSig.isAmino(o.extended_signatures[0]))); + return o && (o.$typeUrl === ExtendedCommit.typeUrl || typeof o.height === 'bigint' && typeof o.round === 'number' && BlockID.isAmino(o.block_id) && Array.isArray(o.extended_signatures) && (!o.extended_signatures.length || ExtendedCommitSig.isAmino(o.extended_signatures[0]))); }, encode(message: ExtendedCommit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.height !== BigInt(0)) { @@ -1445,21 +1445,21 @@ export const ExtendedCommit = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.extendedSignatures.push(ExtendedCommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.height = reader.int64(); + break; + case 2: + message.round = reader.int32(); + break; + case 3: + message.blockId = BlockID.decode(reader, reader.uint32()); + break; + case 4: + message.extendedSignatures.push(ExtendedCommitSig.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1509,7 +1509,7 @@ export const ExtendedCommit = { }, toProtoMsg(message: ExtendedCommit): ExtendedCommitProtoMsg { return { - typeUrl: "/tendermint.types.ExtendedCommit", + typeUrl: '/tendermint.types.ExtendedCommit', value: ExtendedCommit.encode(message).finish() }; } @@ -1526,12 +1526,12 @@ function createBaseExtendedCommitSig(): ExtendedCommitSig { }; } export const ExtendedCommitSig = { - typeUrl: "/tendermint.types.ExtendedCommitSig", + typeUrl: '/tendermint.types.ExtendedCommitSig', is(o: any): o is ExtendedCommitSig { - return o && (o.$typeUrl === ExtendedCommitSig.typeUrl || isSet(o.blockIdFlag) && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === "string") && Timestamp.is(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === "string") && (o.extension instanceof Uint8Array || typeof o.extension === "string") && (o.extensionSignature instanceof Uint8Array || typeof o.extensionSignature === "string")); + return o && (o.$typeUrl === ExtendedCommitSig.typeUrl || isSet(o.blockIdFlag) && (o.validatorAddress instanceof Uint8Array || typeof o.validatorAddress === 'string') && Timestamp.is(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === 'string') && (o.extension instanceof Uint8Array || typeof o.extension === 'string') && (o.extensionSignature instanceof Uint8Array || typeof o.extensionSignature === 'string')); }, isAmino(o: any): o is ExtendedCommitSigAmino { - return o && (o.$typeUrl === ExtendedCommitSig.typeUrl || isSet(o.block_id_flag) && (o.validator_address instanceof Uint8Array || typeof o.validator_address === "string") && Timestamp.isAmino(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === "string") && (o.extension instanceof Uint8Array || typeof o.extension === "string") && (o.extension_signature instanceof Uint8Array || typeof o.extension_signature === "string")); + return o && (o.$typeUrl === ExtendedCommitSig.typeUrl || isSet(o.block_id_flag) && (o.validator_address instanceof Uint8Array || typeof o.validator_address === 'string') && Timestamp.isAmino(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === 'string') && (o.extension instanceof Uint8Array || typeof o.extension === 'string') && (o.extension_signature instanceof Uint8Array || typeof o.extension_signature === 'string')); }, encode(message: ExtendedCommitSig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.blockIdFlag !== 0) { @@ -1561,27 +1561,27 @@ export const ExtendedCommitSig = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.blockIdFlag = (reader.int32() as any); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - case 5: - message.extension = reader.bytes(); - break; - case 6: - message.extensionSignature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.blockIdFlag = (reader.int32() as any); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 4: + message.signature = reader.bytes(); + break; + case 5: + message.extension = reader.bytes(); + break; + case 6: + message.extensionSignature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1639,7 +1639,7 @@ export const ExtendedCommitSig = { }, toProtoMsg(message: ExtendedCommitSig): ExtendedCommitSigProtoMsg { return { - typeUrl: "/tendermint.types.ExtendedCommitSig", + typeUrl: '/tendermint.types.ExtendedCommitSig', value: ExtendedCommitSig.encode(message).finish() }; } @@ -1657,12 +1657,12 @@ function createBaseProposal(): Proposal { }; } export const Proposal = { - typeUrl: "/tendermint.types.Proposal", + typeUrl: '/tendermint.types.Proposal', is(o: any): o is Proposal { - return o && (o.$typeUrl === Proposal.typeUrl || isSet(o.type) && typeof o.height === "bigint" && typeof o.round === "number" && typeof o.polRound === "number" && BlockID.is(o.blockId) && Timestamp.is(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === "string")); + return o && (o.$typeUrl === Proposal.typeUrl || isSet(o.type) && typeof o.height === 'bigint' && typeof o.round === 'number' && typeof o.polRound === 'number' && BlockID.is(o.blockId) && Timestamp.is(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === 'string')); }, isAmino(o: any): o is ProposalAmino { - return o && (o.$typeUrl === Proposal.typeUrl || isSet(o.type) && typeof o.height === "bigint" && typeof o.round === "number" && typeof o.pol_round === "number" && BlockID.isAmino(o.block_id) && Timestamp.isAmino(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === "string")); + return o && (o.$typeUrl === Proposal.typeUrl || isSet(o.type) && typeof o.height === 'bigint' && typeof o.round === 'number' && typeof o.pol_round === 'number' && BlockID.isAmino(o.block_id) && Timestamp.isAmino(o.timestamp) && (o.signature instanceof Uint8Array || typeof o.signature === 'string')); }, encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.type !== 0) { @@ -1695,30 +1695,30 @@ export const Proposal = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.type = (reader.int32() as any); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.polRound = reader.int32(); + break; + case 5: + message.blockId = BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + case 7: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1781,7 +1781,7 @@ export const Proposal = { }, toProtoMsg(message: Proposal): ProposalProtoMsg { return { - typeUrl: "/tendermint.types.Proposal", + typeUrl: '/tendermint.types.Proposal', value: Proposal.encode(message).finish() }; } @@ -1794,7 +1794,7 @@ function createBaseSignedHeader(): SignedHeader { }; } export const SignedHeader = { - typeUrl: "/tendermint.types.SignedHeader", + typeUrl: '/tendermint.types.SignedHeader', is(o: any): o is SignedHeader { return o && o.$typeUrl === SignedHeader.typeUrl; }, @@ -1817,15 +1817,15 @@ export const SignedHeader = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.header = Header.decode(reader, reader.uint32()); + break; + case 2: + message.commit = Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1863,7 +1863,7 @@ export const SignedHeader = { }, toProtoMsg(message: SignedHeader): SignedHeaderProtoMsg { return { - typeUrl: "/tendermint.types.SignedHeader", + typeUrl: '/tendermint.types.SignedHeader', value: SignedHeader.encode(message).finish() }; } @@ -1876,7 +1876,7 @@ function createBaseLightBlock(): LightBlock { }; } export const LightBlock = { - typeUrl: "/tendermint.types.LightBlock", + typeUrl: '/tendermint.types.LightBlock', is(o: any): o is LightBlock { return o && o.$typeUrl === LightBlock.typeUrl; }, @@ -1899,15 +1899,15 @@ export const LightBlock = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.signedHeader = SignedHeader.decode(reader, reader.uint32()); + break; + case 2: + message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1945,7 +1945,7 @@ export const LightBlock = { }, toProtoMsg(message: LightBlock): LightBlockProtoMsg { return { - typeUrl: "/tendermint.types.LightBlock", + typeUrl: '/tendermint.types.LightBlock', value: LightBlock.encode(message).finish() }; } @@ -1960,12 +1960,12 @@ function createBaseBlockMeta(): BlockMeta { }; } export const BlockMeta = { - typeUrl: "/tendermint.types.BlockMeta", + typeUrl: '/tendermint.types.BlockMeta', is(o: any): o is BlockMeta { - return o && (o.$typeUrl === BlockMeta.typeUrl || BlockID.is(o.blockId) && typeof o.blockSize === "bigint" && Header.is(o.header) && typeof o.numTxs === "bigint"); + return o && (o.$typeUrl === BlockMeta.typeUrl || BlockID.is(o.blockId) && typeof o.blockSize === 'bigint' && Header.is(o.header) && typeof o.numTxs === 'bigint'); }, isAmino(o: any): o is BlockMetaAmino { - return o && (o.$typeUrl === BlockMeta.typeUrl || BlockID.isAmino(o.block_id) && typeof o.block_size === "bigint" && Header.isAmino(o.header) && typeof o.num_txs === "bigint"); + return o && (o.$typeUrl === BlockMeta.typeUrl || BlockID.isAmino(o.block_id) && typeof o.block_size === 'bigint' && Header.isAmino(o.header) && typeof o.num_txs === 'bigint'); }, encode(message: BlockMeta, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.blockId !== undefined) { @@ -1989,21 +1989,21 @@ export const BlockMeta = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = reader.int64(); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.blockId = BlockID.decode(reader, reader.uint32()); + break; + case 2: + message.blockSize = reader.int64(); + break; + case 3: + message.header = Header.decode(reader, reader.uint32()); + break; + case 4: + message.numTxs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2051,7 +2051,7 @@ export const BlockMeta = { }, toProtoMsg(message: BlockMeta): BlockMetaProtoMsg { return { - typeUrl: "/tendermint.types.BlockMeta", + typeUrl: '/tendermint.types.BlockMeta', value: BlockMeta.encode(message).finish() }; } @@ -2065,12 +2065,12 @@ function createBaseTxProof(): TxProof { }; } export const TxProof = { - typeUrl: "/tendermint.types.TxProof", + typeUrl: '/tendermint.types.TxProof', is(o: any): o is TxProof { - return o && (o.$typeUrl === TxProof.typeUrl || (o.rootHash instanceof Uint8Array || typeof o.rootHash === "string") && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === TxProof.typeUrl || (o.rootHash instanceof Uint8Array || typeof o.rootHash === 'string') && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, isAmino(o: any): o is TxProofAmino { - return o && (o.$typeUrl === TxProof.typeUrl || (o.root_hash instanceof Uint8Array || typeof o.root_hash === "string") && (o.data instanceof Uint8Array || typeof o.data === "string")); + return o && (o.$typeUrl === TxProof.typeUrl || (o.root_hash instanceof Uint8Array || typeof o.root_hash === 'string') && (o.data instanceof Uint8Array || typeof o.data === 'string')); }, encode(message: TxProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.rootHash.length !== 0) { @@ -2091,18 +2091,18 @@ export const TxProof = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.rootHash = reader.bytes(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.proof = Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2145,7 +2145,7 @@ export const TxProof = { }, toProtoMsg(message: TxProof): TxProofProtoMsg { return { - typeUrl: "/tendermint.types.TxProof", + typeUrl: '/tendermint.types.TxProof', value: TxProof.encode(message).finish() }; } diff --git a/libs/cosmos-types/tendermint/types/validator.ts b/libs/cosmos-types/tendermint/types/validator.ts index d883e959..36a4e5d8 100644 --- a/libs/cosmos-types/tendermint/types/validator.ts +++ b/libs/cosmos-types/tendermint/types/validator.ts @@ -1,7 +1,7 @@ -import { PublicKey, PublicKeyAmino } from "../crypto/keys"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { base64FromBytes,bytesFromBase64, DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; +import { PublicKey, PublicKeyAmino } from '../crypto/keys'; /** BlockIdFlag indicates which BlockID the signature is for */ export enum BlockIDFlag { /** BLOCK_ID_FLAG_UNKNOWN - indicates an error condition */ @@ -16,37 +16,37 @@ export enum BlockIDFlag { export const BlockIDFlagAmino = BlockIDFlag; export function blockIDFlagFromJSON(object: any): BlockIDFlag { switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; + case 0: + case 'BLOCK_ID_FLAG_UNKNOWN': + return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; + case 1: + case 'BLOCK_ID_FLAG_ABSENT': + return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; + case 2: + case 'BLOCK_ID_FLAG_COMMIT': + return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; + case 3: + case 'BLOCK_ID_FLAG_NIL': + return BlockIDFlag.BLOCK_ID_FLAG_NIL; + case -1: + case 'UNRECOGNIZED': + default: + return BlockIDFlag.UNRECOGNIZED; } } export function blockIDFlagToJSON(object: BlockIDFlag): string { switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - case BlockIDFlag.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; + case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: + return 'BLOCK_ID_FLAG_UNKNOWN'; + case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: + return 'BLOCK_ID_FLAG_ABSENT'; + case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: + return 'BLOCK_ID_FLAG_COMMIT'; + case BlockIDFlag.BLOCK_ID_FLAG_NIL: + return 'BLOCK_ID_FLAG_NIL'; + case BlockIDFlag.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; } } export interface ValidatorSet { @@ -55,7 +55,7 @@ export interface ValidatorSet { totalVotingPower: bigint; } export interface ValidatorSetProtoMsg { - typeUrl: "/tendermint.types.ValidatorSet"; + typeUrl: '/tendermint.types.ValidatorSet'; value: Uint8Array; } export interface ValidatorSetAmino { @@ -64,7 +64,7 @@ export interface ValidatorSetAmino { total_voting_power: string; } export interface ValidatorSetAminoMsg { - type: "/tendermint.types.ValidatorSet"; + type: '/tendermint.types.ValidatorSet'; value: ValidatorSetAmino; } export interface Validator { @@ -74,7 +74,7 @@ export interface Validator { proposerPriority: bigint; } export interface ValidatorProtoMsg { - typeUrl: "/tendermint.types.Validator"; + typeUrl: '/tendermint.types.Validator'; value: Uint8Array; } export interface ValidatorAmino { @@ -84,7 +84,7 @@ export interface ValidatorAmino { proposer_priority: string; } export interface ValidatorAminoMsg { - type: "/tendermint.types.Validator"; + type: '/tendermint.types.Validator'; value: ValidatorAmino; } export interface SimpleValidator { @@ -92,7 +92,7 @@ export interface SimpleValidator { votingPower: bigint; } export interface SimpleValidatorProtoMsg { - typeUrl: "/tendermint.types.SimpleValidator"; + typeUrl: '/tendermint.types.SimpleValidator'; value: Uint8Array; } export interface SimpleValidatorAmino { @@ -100,7 +100,7 @@ export interface SimpleValidatorAmino { voting_power: string; } export interface SimpleValidatorAminoMsg { - type: "/tendermint.types.SimpleValidator"; + type: '/tendermint.types.SimpleValidator'; value: SimpleValidatorAmino; } function createBaseValidatorSet(): ValidatorSet { @@ -111,12 +111,12 @@ function createBaseValidatorSet(): ValidatorSet { }; } export const ValidatorSet = { - typeUrl: "/tendermint.types.ValidatorSet", + typeUrl: '/tendermint.types.ValidatorSet', is(o: any): o is ValidatorSet { - return o && (o.$typeUrl === ValidatorSet.typeUrl || Array.isArray(o.validators) && (!o.validators.length || Validator.is(o.validators[0])) && typeof o.totalVotingPower === "bigint"); + return o && (o.$typeUrl === ValidatorSet.typeUrl || Array.isArray(o.validators) && (!o.validators.length || Validator.is(o.validators[0])) && typeof o.totalVotingPower === 'bigint'); }, isAmino(o: any): o is ValidatorSetAmino { - return o && (o.$typeUrl === ValidatorSet.typeUrl || Array.isArray(o.validators) && (!o.validators.length || Validator.isAmino(o.validators[0])) && typeof o.total_voting_power === "bigint"); + return o && (o.$typeUrl === ValidatorSet.typeUrl || Array.isArray(o.validators) && (!o.validators.length || Validator.isAmino(o.validators[0])) && typeof o.total_voting_power === 'bigint'); }, encode(message: ValidatorSet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.validators) { @@ -137,18 +137,18 @@ export const ValidatorSet = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.validators.push(Validator.decode(reader, reader.uint32())); + break; + case 2: + message.proposer = Validator.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -193,7 +193,7 @@ export const ValidatorSet = { }, toProtoMsg(message: ValidatorSet): ValidatorSetProtoMsg { return { - typeUrl: "/tendermint.types.ValidatorSet", + typeUrl: '/tendermint.types.ValidatorSet', value: ValidatorSet.encode(message).finish() }; } @@ -208,12 +208,12 @@ function createBaseValidator(): Validator { }; } export const Validator = { - typeUrl: "/tendermint.types.Validator", + typeUrl: '/tendermint.types.Validator', is(o: any): o is Validator { - return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === "string") && PublicKey.is(o.pubKey) && typeof o.votingPower === "bigint" && typeof o.proposerPriority === "bigint"); + return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === 'string') && PublicKey.is(o.pubKey) && typeof o.votingPower === 'bigint' && typeof o.proposerPriority === 'bigint'); }, isAmino(o: any): o is ValidatorAmino { - return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === "string") && PublicKey.isAmino(o.pub_key) && typeof o.voting_power === "bigint" && typeof o.proposer_priority === "bigint"); + return o && (o.$typeUrl === Validator.typeUrl || (o.address instanceof Uint8Array || typeof o.address === 'string') && PublicKey.isAmino(o.pub_key) && typeof o.voting_power === 'bigint' && typeof o.proposer_priority === 'bigint'); }, encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.address.length !== 0) { @@ -237,21 +237,21 @@ export const Validator = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = reader.int64(); - break; - case 4: - message.proposerPriority = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.address = reader.bytes(); + break; + case 2: + message.pubKey = PublicKey.decode(reader, reader.uint32()); + break; + case 3: + message.votingPower = reader.int64(); + break; + case 4: + message.proposerPriority = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -299,7 +299,7 @@ export const Validator = { }, toProtoMsg(message: Validator): ValidatorProtoMsg { return { - typeUrl: "/tendermint.types.Validator", + typeUrl: '/tendermint.types.Validator', value: Validator.encode(message).finish() }; } @@ -312,12 +312,12 @@ function createBaseSimpleValidator(): SimpleValidator { }; } export const SimpleValidator = { - typeUrl: "/tendermint.types.SimpleValidator", + typeUrl: '/tendermint.types.SimpleValidator', is(o: any): o is SimpleValidator { - return o && (o.$typeUrl === SimpleValidator.typeUrl || typeof o.votingPower === "bigint"); + return o && (o.$typeUrl === SimpleValidator.typeUrl || typeof o.votingPower === 'bigint'); }, isAmino(o: any): o is SimpleValidatorAmino { - return o && (o.$typeUrl === SimpleValidator.typeUrl || typeof o.voting_power === "bigint"); + return o && (o.$typeUrl === SimpleValidator.typeUrl || typeof o.voting_power === 'bigint'); }, encode(message: SimpleValidator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.pubKey !== undefined) { @@ -335,15 +335,15 @@ export const SimpleValidator = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.pubKey = PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.votingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -381,7 +381,7 @@ export const SimpleValidator = { }, toProtoMsg(message: SimpleValidator): SimpleValidatorProtoMsg { return { - typeUrl: "/tendermint.types.SimpleValidator", + typeUrl: '/tendermint.types.SimpleValidator', value: SimpleValidator.encode(message).finish() }; } diff --git a/libs/cosmos-types/tendermint/version/types.ts b/libs/cosmos-types/tendermint/version/types.ts index 21727fb9..51049f1b 100644 --- a/libs/cosmos-types/tendermint/version/types.ts +++ b/libs/cosmos-types/tendermint/version/types.ts @@ -1,6 +1,6 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; +import { BinaryReader, BinaryWriter } from '../../binary'; +import { DeepPartial } from '../../helpers'; +import { GlobalDecoderRegistry } from '../../registry'; /** * App includes the protocol and software version for the application. * This information is included in ResponseInfo. The App.Protocol can be @@ -11,7 +11,7 @@ export interface App { software: string; } export interface AppProtoMsg { - typeUrl: "/tendermint.version.App"; + typeUrl: '/tendermint.version.App'; value: Uint8Array; } /** @@ -24,7 +24,7 @@ export interface AppAmino { software: string; } export interface AppAminoMsg { - type: "/tendermint.version.App"; + type: '/tendermint.version.App'; value: AppAmino; } /** @@ -37,7 +37,7 @@ export interface Consensus { app: bigint; } export interface ConsensusProtoMsg { - typeUrl: "/tendermint.version.Consensus"; + typeUrl: '/tendermint.version.Consensus'; value: Uint8Array; } /** @@ -50,28 +50,28 @@ export interface ConsensusAmino { app: string; } export interface ConsensusAminoMsg { - type: "/tendermint.version.Consensus"; + type: '/tendermint.version.Consensus'; value: ConsensusAmino; } function createBaseApp(): App { return { protocol: BigInt(0), - software: "" + software: '' }; } export const App = { - typeUrl: "/tendermint.version.App", + typeUrl: '/tendermint.version.App', is(o: any): o is App { - return o && (o.$typeUrl === App.typeUrl || typeof o.protocol === "bigint" && typeof o.software === "string"); + return o && (o.$typeUrl === App.typeUrl || typeof o.protocol === 'bigint' && typeof o.software === 'string'); }, isAmino(o: any): o is AppAmino { - return o && (o.$typeUrl === App.typeUrl || typeof o.protocol === "bigint" && typeof o.software === "string"); + return o && (o.$typeUrl === App.typeUrl || typeof o.protocol === 'bigint' && typeof o.software === 'string'); }, encode(message: App, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.protocol !== BigInt(0)) { writer.uint32(8).uint64(message.protocol); } - if (message.software !== "") { + if (message.software !== '') { writer.uint32(18).string(message.software); } return writer; @@ -83,15 +83,15 @@ export const App = { while (reader.pos < end) { const 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; + case 1: + message.protocol = reader.uint64(); + break; + case 2: + message.software = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -99,7 +99,7 @@ export const App = { fromPartial(object: DeepPartial): App { const message = createBaseApp(); message.protocol = object.protocol !== undefined && object.protocol !== null ? BigInt(object.protocol.toString()) : BigInt(0); - message.software = object.software ?? ""; + message.software = object.software ?? ''; return message; }, fromAmino(object: AppAmino): App { @@ -115,7 +115,7 @@ export const App = { toAmino(message: App): AppAmino { const obj: any = {}; obj.protocol = message.protocol !== BigInt(0) ? message.protocol.toString() : undefined; - obj.software = message.software === "" ? undefined : message.software; + obj.software = message.software === '' ? undefined : message.software; return obj; }, fromAminoMsg(object: AppAminoMsg): App { @@ -129,7 +129,7 @@ export const App = { }, toProtoMsg(message: App): AppProtoMsg { return { - typeUrl: "/tendermint.version.App", + typeUrl: '/tendermint.version.App', value: App.encode(message).finish() }; } @@ -142,12 +142,12 @@ function createBaseConsensus(): Consensus { }; } export const Consensus = { - typeUrl: "/tendermint.version.Consensus", + typeUrl: '/tendermint.version.Consensus', is(o: any): o is Consensus { - return o && (o.$typeUrl === Consensus.typeUrl || typeof o.block === "bigint" && typeof o.app === "bigint"); + return o && (o.$typeUrl === Consensus.typeUrl || typeof o.block === 'bigint' && typeof o.app === 'bigint'); }, isAmino(o: any): o is ConsensusAmino { - return o && (o.$typeUrl === Consensus.typeUrl || typeof o.block === "bigint" && typeof o.app === "bigint"); + return o && (o.$typeUrl === Consensus.typeUrl || typeof o.block === 'bigint' && typeof o.app === 'bigint'); }, encode(message: Consensus, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.block !== BigInt(0)) { @@ -165,15 +165,15 @@ export const Consensus = { while (reader.pos < end) { const 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; + case 1: + message.block = reader.uint64(); + break; + case 2: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -211,7 +211,7 @@ export const Consensus = { }, toProtoMsg(message: Consensus): ConsensusProtoMsg { return { - typeUrl: "/tendermint.version.Consensus", + typeUrl: '/tendermint.version.Consensus', value: Consensus.encode(message).finish() }; } diff --git a/libs/cosmos-types/types.ts b/libs/cosmos-types/types.ts index 5ebdcb00..02d2a7e1 100644 --- a/libs/cosmos-types/types.ts +++ b/libs/cosmos-types/types.ts @@ -4,12 +4,13 @@ * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ -import { IBinaryReader, IBinaryWriter } from "./binary"; -import { Any } from "./google/protobuf/any"; -import { OfflineSigner } from "@cosmjs/proto-signing"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; +import { OfflineSigner } from '@cosmjs/proto-signing'; +import { HttpEndpoint } from '@cosmjs/tendermint-rpc'; -export type ProtoMsg = Omit & { typeUrl: any }; +import { IBinaryReader, IBinaryWriter } from './binary'; +import { Any } from './google/protobuf/any'; + +export type ProtoMsg = Omit & { typeUrl: any }; export interface IAminoMsg { type: any; @@ -144,7 +145,7 @@ export interface TxRpc { signAndBroadcast?( signerAddress: string, messages: EncodeObject[], - fee: StdFee | "auto" | number, + fee: StdFee | 'auto' | number, memo: string ): Promise; } diff --git a/libs/cosmos-types/utf8.ts b/libs/cosmos-types/utf8.ts index 46055566..a75ceeb8 100644 --- a/libs/cosmos-types/utf8.ts +++ b/libs/cosmos-types/utf8.ts @@ -32,7 +32,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"use strict"; +'use strict'; /** * Calculates the UTF8 byte length of a string. @@ -70,7 +70,7 @@ export function utf8Read( end: number ) { const len = end - start; - if (len < 1) return ""; + if (len < 1) return ''; const chunk = []; let parts: string[] = [], i = 0, // char offset @@ -101,7 +101,7 @@ export function utf8Read( } if (parts) { if (i) parts.push(String.fromCharCode(...chunk.slice(0, i))); - return parts.join(""); + return parts.join(''); } return String.fromCharCode(...chunk.slice(0, i)); } diff --git a/libs/cosmos-types/varint.ts b/libs/cosmos-types/varint.ts index 84d016b9..908d0d58 100644 --- a/libs/cosmos-types/varint.ts +++ b/libs/cosmos-types/varint.ts @@ -86,7 +86,7 @@ export function varint64read(this: ReaderLike): [number, number] { } } - throw new Error("invalid varint"); + throw new Error('invalid varint'); } /** @@ -140,7 +140,7 @@ const TWO_PWR_32_DBL = 0x100000000; */ export function int64FromString(dec: string): { lo: number; hi: number } { // Check for minus sign. - const minus = dec[0] === "-"; + const minus = dec[0] === '-'; if (minus) { dec = dec.slice(1); } @@ -188,7 +188,7 @@ export function int64ToString(lo: number, hi: number): string { bits = negate(bits.lo, bits.hi); } const result = uInt64ToString(bits.lo, bits.hi); - return negative ? "-" + result : result; + return negative ? '-' + result : result; } /** @@ -285,7 +285,7 @@ function negate(lowBits: number, highBits: number) { */ const decimalFrom1e7WithLeadingZeros = (digit1e7: number) => { const partial = String(digit1e7); - return "0000000".slice(partial.length) + partial; + return '0000000'.slice(partial.length) + partial; }; /** @@ -353,7 +353,7 @@ export function varint32read(this: ReaderLike): number { for (let readBytes = 5; (b & 0x80) !== 0 && readBytes < 10; readBytes++) b = this.buf[this.pos++]; - if ((b & 0x80) != 0) throw new Error("invalid varint"); + if ((b & 0x80) != 0) throw new Error('invalid varint'); this.assertBounds(); @@ -454,18 +454,18 @@ export function int64Length(lo: number, hi: number) { ? 1 : 2 : part0 < 2097152 - ? 3 - : 4 + ? 3 + : 4 : part1 < 16384 - ? part1 < 128 - ? 5 - : 6 - : part1 < 2097152 - ? 7 - : 8 + ? part1 < 128 + ? 5 + : 6 + : part1 < 2097152 + ? 7 + : 8 : part2 < 128 - ? 9 - : 10; + ? 9 + : 10; } export function writeFixed32( diff --git a/libs/interchainjs/.eslintignore b/libs/interchainjs/.eslintignore new file mode 100644 index 00000000..838458f2 --- /dev/null +++ b/libs/interchainjs/.eslintignore @@ -0,0 +1 @@ +/dist/ \ No newline at end of file diff --git a/libs/interchainjs/index.ts b/libs/interchainjs/index.ts deleted file mode 100644 index 9f1c5f1c..00000000 --- a/libs/interchainjs/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -throw new Error( - "interchainjs have no entry-point: consult README for usage" -); diff --git a/libs/interchainjs/jest.starship.config.js b/libs/interchainjs/jest.starship.config.js index b978c3e8..c8558038 100644 --- a/libs/interchainjs/jest.starship.config.js +++ b/libs/interchainjs/jest.starship.config.js @@ -1,18 +1,18 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { testTimeout: 15000, - preset: "ts-jest", - testEnvironment: "node", + preset: 'ts-jest', + testEnvironment: 'node', transform: { - "^.+\\.tsx?$": [ - "ts-jest", + '^.+\\.tsx?$': [ + 'ts-jest', { babelConfig: false, - tsconfig: "tsconfig.json", + tsconfig: 'tsconfig.json', }, ], }, transformIgnorePatterns: [`/node_modules/*`], - testRegex: "(/starship/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", - moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], + testRegex: '(/starship/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], }; diff --git a/libs/interchainjs/package.json b/libs/interchainjs/package.json index 28438244..00d04c0e 100644 --- a/libs/interchainjs/package.json +++ b/libs/interchainjs/package.json @@ -18,8 +18,9 @@ }, "scripts": { "copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist", - "clean": "del dist/**", + "clean": "rimraf dist/**", "build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy", + "build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy", "lint": "eslint . --fix", "setupKind": "starship setup-kind --config ./starship/configs/starship.yaml", "cleanKind": "starship clean-kind --config ./starship/configs/starship.yaml", @@ -47,4 +48,4 @@ "cosmjs", "wallet" ] -} +} \ No newline at end of file diff --git a/libs/interchainjs/cosmwasm-stargate.ts b/libs/interchainjs/src/cosmwasm-stargate.ts similarity index 61% rename from libs/interchainjs/cosmwasm-stargate.ts rename to libs/interchainjs/src/cosmwasm-stargate.ts index 8ef04955..edc84e1c 100644 --- a/libs/interchainjs/cosmwasm-stargate.ts +++ b/libs/interchainjs/src/cosmwasm-stargate.ts @@ -1,14 +1,14 @@ -import { AminoSigner } from "@interchainjs/cosmos/amino"; -import { toConverter, toEncoder } from "@interchainjs/cosmos/utils"; -import { CosmWasmMsgs } from "@interchainjs/cosmos-types/cosmwasm"; -import { CosmWasmStargateImpl as TxImpl } from "@interchainjs/cosmos-types/service-ops"; -import { StargateMsgs } from "@interchainjs/cosmos-types/stargate"; -import { HttpEndpoint } from "@interchainjs/types"; +import { AminoSigner } from '@interchainjs/cosmos/amino'; +import { toConverter, toEncoder } from '@interchainjs/cosmos/utils'; +import { CosmWasmMsgs } from '@interchainjs/cosmos-types/cosmwasm'; +import { CosmWasmStargateImpl as TxImpl } from '@interchainjs/cosmos-types/service-ops'; +import { StargateMsgs } from '@interchainjs/cosmos-types/stargate'; +import { HttpEndpoint } from '@interchainjs/types'; -import { SigningClient } from "./signing-client"; -import { SignerOptions } from "./types/signing-client"; -import { OfflineSigner } from "./types/wallet"; -import { defaultAuth } from "./utils"; +import { SigningClient } from './signing-client'; +import { SignerOptions } from './types/signing-client'; +import { OfflineSigner } from './types/wallet'; +import { defaultAuth } from './utils'; export class CosmWasmSigningClient extends SigningClient { readonly helpers: TxImpl; diff --git a/libs/interchainjs/src/index.ts b/libs/interchainjs/src/index.ts new file mode 100644 index 00000000..bac5c9ae --- /dev/null +++ b/libs/interchainjs/src/index.ts @@ -0,0 +1,3 @@ +throw new Error( + 'interchainjs have no entry-point: consult README for usage' +); diff --git a/libs/interchainjs/query/rpc.ts b/libs/interchainjs/src/query/rpc.ts similarity index 60% rename from libs/interchainjs/query/rpc.ts rename to libs/interchainjs/src/query/rpc.ts index 5c3eccef..0b4241f9 100644 --- a/libs/interchainjs/query/rpc.ts +++ b/libs/interchainjs/src/query/rpc.ts @@ -1,12 +1,12 @@ -import { HttpEndpoint } from "@interchainjs/types"; +import { QueryImpl } from '@interchainjs/cosmos-types/service-ops'; +import { TxRpc } from '@interchainjs/cosmos-types/types'; +import { HttpEndpoint } from '@interchainjs/types'; import { fromBase64, randomId, toHex, toHttpEndpoint, -} from "@interchainjs/utils"; -import { QueryImpl } from "@interchainjs/cosmos-types/service-ops"; -import { TxRpc } from "@interchainjs/cosmos-types/types"; +} from '@interchainjs/utils'; function createTxRpc(endpoint: HttpEndpoint): TxRpc { return { @@ -16,15 +16,15 @@ function createTxRpc(endpoint: HttpEndpoint): TxRpc { data: Uint8Array ): Promise => { const req = { - method: "POST", + method: 'POST', headers: { - "Content-Type": "application/json", + 'Content-Type': 'application/json', ...endpoint.headers, }, body: JSON.stringify({ id: randomId(), - jsonrpc: "2.0", - method: "abci_query", + jsonrpc: '2.0', + method: 'abci_query', params: { data: toHex(data), path: `/${service}/${method}`, @@ -34,14 +34,14 @@ function createTxRpc(endpoint: HttpEndpoint): TxRpc { }; const resp = await fetch(endpoint.url, req); const json = await resp.json(); - if (json["error"] != void 0) { - throw new Error(`Request Error: ${json["error"]}`); + if (json['error'] != void 0) { + throw new Error(`Request Error: ${json['error']}`); } try { - const result = fromBase64(json["result"]["response"]["value"]); + const result = fromBase64(json['result']['response']['value']); return result; } catch (error) { - throw new Error(`Request Error: ${json["result"]["response"]["log"]}`); + throw new Error(`Request Error: ${json['result']['response']['log']}`); } }, }; diff --git a/libs/interchainjs/signing-client.ts b/libs/interchainjs/src/signing-client.ts similarity index 82% rename from libs/interchainjs/signing-client.ts rename to libs/interchainjs/src/signing-client.ts index 0579ee68..f22f1aa2 100644 --- a/libs/interchainjs/signing-client.ts +++ b/libs/interchainjs/src/signing-client.ts @@ -1,55 +1,55 @@ +import { AminoSigner } from '@interchainjs/cosmos/amino'; +import { AccountData } from '@interchainjs/cosmos/types'; +import { + constructAuthInfo, + constructSignerInfo, + constructTxBody, + toAminoMsgs, + toEncoder, + toFee, + toMessages, +} from '@interchainjs/cosmos/utils'; +import { IBinaryWriter } from '@interchainjs/cosmos-types/binary'; +import { PubKey as Secp256k1PubKey } from '@interchainjs/cosmos-types/cosmos/crypto/secp256k1/keys'; +import { SignMode } from '@interchainjs/cosmos-types/cosmos/tx/signing/v1beta1/signing'; +import { + AuthInfo, + SignDoc, + SignerInfo, + TxBody, + TxRaw, +} from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx'; +import { Any } from '@interchainjs/cosmos-types/google/protobuf/any'; +import { TxRpc } from '@interchainjs/cosmos-types/types'; import { Auth, HttpEndpoint, Price, StdFee, StdSignDoc, -} from "@interchainjs/types"; -import { fromBase64, Key } from "@interchainjs/utils"; +} from '@interchainjs/types'; +import { fromBase64, Key } from '@interchainjs/utils'; +import { + Block, + BlockResponse, + IndexedTx, + SearchTxQuery, + SearchTxResponse, + TxResponse, +} from './types/query'; import { DeliverTxResponse, EncodeObject, SignerData, SignerOptions, -} from "./types/signing-client"; +} from './types/signing-client'; import { - AccountData, OfflineAminoSigner, OfflineDirectSigner, OfflineSigner, -} from "./types/wallet"; -import { defaultAuth, BroadcastTxError, sleep, TimeoutError } from "./utils"; -import { - AuthInfo, - Secp256k1PubKey, - SignDoc, - SignMode, - SignerInfo, - TxBody, - TxRaw, - IBinaryWriter, - Any, -} from "@interchainjs/cosmos/types"; -import { - constructAuthInfo, - constructSignerInfo, - constructTxBody, - toAminoMsgs, - toEncoder, - toFee, - toMessages, -} from "@interchainjs/cosmos/utils"; -import { AminoSigner } from "@interchainjs/cosmos/amino"; -import { - SearchTxQuery, - SearchTxResponse, - IndexedTx, - Block, - BlockResponse, - TxResponse, -} from "./types/query"; -import { TxRpc } from "@interchainjs/cosmos-types/types"; +} from './types/wallet'; +import { BroadcastTxError, defaultAuth, sleep, TimeoutError } from './utils'; /** * implement the same methods as what in `cosmjs` signingClient @@ -60,8 +60,8 @@ export class SigningClient { readonly broadcastPollIntervalMs: number | undefined; readonly aminoSigner: AminoSigner; - private readonly _signAmino?: OfflineAminoSigner["signAmino"]; - private readonly _signDirect?: OfflineDirectSigner["signDirect"]; + private readonly _signAmino?: OfflineAminoSigner['signAmino']; + private readonly _signDirect?: OfflineDirectSigner['signDirect']; private readonly gasPrice?: Price | string; private _endpoint: string | HttpEndpoint; @@ -84,12 +84,8 @@ export class SigningClient { this.broadcastPollIntervalMs = options.broadcastPollIntervalMs; this.gasPrice = options.gasPrice; this.txRpc = { - request( - service: string, - method: string, - data: Uint8Array - ): Promise { - throw new Error("Not implemented yet"); + request(): Promise { + throw new Error('Not implemented yet'); }, signAndBroadcast: this.signAndBroadcast, }; @@ -116,7 +112,7 @@ export class SigningClient { if (isCompressed) { return Key.from(pubkey); } - throw new Error("Getting uncompressed public key is not implemented"); + throw new Error('Getting uncompressed public key is not implemented'); }; const auth: Auth = { ...defaultAuth, @@ -129,13 +125,15 @@ export class SigningClient { private async getAccountData(address: string): Promise { const accounts = await this.offlineSigner.getAccounts(); - const account = accounts.find((account) => account.address === address); + const account = accounts.find( + (account) => account.getAddress() === address + ); if (!account) { throw new Error( `No such account found in OfflineSigner for address ${address}` ); } - return account; + return account.toAccountData(); } private async getPubkey(address: string): Promise { @@ -148,12 +146,12 @@ export class SigningClient { ): IBinaryWriter; }; switch (account.algo) { - case "secp256k1": - typeUrl = Secp256k1PubKey.typeUrl; - PubKey = Secp256k1PubKey; - break; - default: - throw new Error(`${account.algo} not supported.`); + case 'secp256k1': + typeUrl = Secp256k1PubKey.typeUrl; + PubKey = Secp256k1PubKey; + break; + default: + throw new Error(`${account.algo} not supported.`); } const publicKey: Any = { typeUrl, @@ -206,11 +204,11 @@ export class SigningClient { private signWithAutoFee = async ( signerAddress: string, messages: EncodeObject[], - fee: StdFee | "auto" | number, - memo = "" + fee: StdFee | 'auto' | number, + memo = '' ): Promise => { let usedFee: StdFee; - if (fee == "auto" || typeof fee === "number") { + if (fee == 'auto' || typeof fee === 'number') { await this.initAuth(signerAddress); const { txBody } = constructTxBody( messages, @@ -228,7 +226,7 @@ export class SigningClient { txBody, [signerInfo], { - multiplier: typeof fee === "number" ? fee : void 0, + multiplier: typeof fee === 'number' ? fee : void 0, gasPrice: this.gasPrice, } ); @@ -275,7 +273,7 @@ export class SigningClient { return Promise.reject( new BroadcastTxError( broadcasted.check_tx?.code, - broadcasted.check_tx?.codespace ?? "", + broadcasted.check_tx?.codespace ?? '', broadcasted.check_tx?.log ) ); @@ -287,8 +285,8 @@ export class SigningClient { public async signAndBroadcastSync( signerAddress: string, messages: EncodeObject[], - fee: StdFee | "auto" | number, - memo = "" + fee: StdFee | 'auto' | number, + memo = '' ): Promise { const txRaw = await this.signWithAutoFee( signerAddress, @@ -323,16 +321,16 @@ export class SigningClient { const result = await this.getTx(txId); return result ? { - code: result.code, - height: result.height, - txIndex: result.txIndex, - events: result.events, - rawLog: result.rawLog, - transactionHash: txId, - msgResponses: result.msgResponses, - gasUsed: result.gasUsed, - gasWanted: result.gasWanted, - } + code: result.code, + height: result.height, + txIndex: result.txIndex, + events: result.events, + rawLog: result.rawLog, + transactionHash: txId, + msgResponses: result.msgResponses, + gasUsed: result.gasUsed, + gasWanted: result.gasWanted, + } : pollForTx(txId); }; @@ -355,8 +353,8 @@ export class SigningClient { signAndBroadcast = async ( signerAddress: string, messages: EncodeObject[], - fee: StdFee | "auto" | number, - memo = "" + fee: StdFee | 'auto' | number, + memo = '' ): Promise => { const txRaw = await this.signWithAutoFee( signerAddress, @@ -380,7 +378,7 @@ export class SigningClient { { accountNumber, sequence, chainId }: SignerData ): Promise { if (!this._signDirect) { - throw new Error("`signDirect` not implemented in provided OfflineSigner"); + throw new Error('`signDirect` not implemented in provided OfflineSigner'); } const { txBody } = constructTxBody( messages, @@ -424,7 +422,7 @@ export class SigningClient { { accountNumber, sequence, chainId }: SignerData ): Promise { if (!this._signAmino) { - throw new Error("`signAmino` not implemented in provided OfflineSigner"); + throw new Error('`signAmino` not implemented in provided OfflineSigner'); } const doc: StdSignDoc = { chain_id: chainId, @@ -471,7 +469,7 @@ export class SigningClient { async getTx(id: string): Promise { const data = await fetch(`${this.endpoint.url}/tx?hash=0x${id}`); const json = await data.json(); - const tx: TxResponse = json["result"]; + const tx: TxResponse = json['result']; if (!tx) return null; const txRaw = TxRaw.decode(fromBase64(tx.tx)); const txBody = TxBody.decode(txRaw.bodyBytes); @@ -491,21 +489,21 @@ export class SigningClient { async searchTx(query: SearchTxQuery): Promise { let rawQuery: string; - if (typeof query === "string") { + if (typeof query === 'string') { rawQuery = query; } else if (Array.isArray(query)) { - rawQuery = query.map((t) => `${t.key}=${t.value}`).join(" AND "); + rawQuery = query.map((t) => `${t.key}=${t.value}`).join(' AND '); } else { - throw new Error("Got unsupported query type."); + throw new Error('Got unsupported query type.'); } - const orderBy: "asc" | "desc" = "asc"; + const orderBy: 'asc' | 'desc' = 'asc'; const data = await fetch( `${this.endpoint.url}/tx_search?query="${rawQuery}"&order_by="${orderBy}"` // `${this.endpoint.url}/tx_search?query="${rawQuery}"&order_by="${orderBy}"&page=1&per_page=100` ); const json = await data.json(); - const { txs }: SearchTxResponse = json["result"]; + const { txs }: SearchTxResponse = json['result']; return txs.map((tx) => { return { height: Number.parseInt(tx.height), @@ -514,7 +512,7 @@ export class SigningClient { code: 0, // events: tx.tx_result.tags, events: [], - rawLog: tx.tx_result.log || "", + rawLog: tx.tx_result.log || '', tx: fromBase64(tx.tx), msgResponses: [], gasUsed: BigInt(tx.tx_result.gas_used), @@ -530,7 +528,7 @@ export class SigningClient { : `${this.endpoint.url}/block` ); const json = await data.json(); - const { block_id, block }: BlockResponse = json["result"]; + const { block_id, block }: BlockResponse = json['result']; return { id: block_id.hash.toUpperCase(), header: { diff --git a/libs/interchainjs/stargate.ts b/libs/interchainjs/src/stargate.ts similarity index 62% rename from libs/interchainjs/stargate.ts rename to libs/interchainjs/src/stargate.ts index 6ce8fbef..dbcf3d0d 100644 --- a/libs/interchainjs/stargate.ts +++ b/libs/interchainjs/src/stargate.ts @@ -1,13 +1,13 @@ -import { AminoSigner } from "@interchainjs/cosmos/amino"; -import { toConverter, toEncoder } from "@interchainjs/cosmos/utils"; -import { StargateImpl as TxImpl } from "@interchainjs/cosmos-types/service-ops"; -import { StargateMsgs } from "@interchainjs/cosmos-types/stargate"; -import { HttpEndpoint } from "@interchainjs/types"; +import { AminoSigner } from '@interchainjs/cosmos/amino'; +import { toConverter, toEncoder } from '@interchainjs/cosmos/utils'; +import { StargateImpl as TxImpl } from '@interchainjs/cosmos-types/service-ops'; +import { StargateMsgs } from '@interchainjs/cosmos-types/stargate'; +import { HttpEndpoint } from '@interchainjs/types'; -import { SigningClient } from "./signing-client"; -import { SignerOptions } from "./types/signing-client"; -import { OfflineSigner } from "./types/wallet"; -import { defaultAuth } from "./utils"; +import { SigningClient } from './signing-client'; +import { SignerOptions } from './types/signing-client'; +import { OfflineSigner } from './types/wallet'; +import { defaultAuth } from './utils'; export class StargateSigningClient extends SigningClient { readonly helpers: TxImpl; diff --git a/libs/interchainjs/src/types/index.ts b/libs/interchainjs/src/types/index.ts new file mode 100644 index 00000000..6308f780 --- /dev/null +++ b/libs/interchainjs/src/types/index.ts @@ -0,0 +1,3 @@ +export * from './query'; +export * from './signing-client'; +export * from './wallet'; diff --git a/libs/interchainjs/types/query.ts b/libs/interchainjs/src/types/query.ts similarity index 98% rename from libs/interchainjs/types/query.ts rename to libs/interchainjs/src/types/query.ts index b437658b..ad358486 100644 --- a/libs/interchainjs/types/query.ts +++ b/libs/interchainjs/src/types/query.ts @@ -1,4 +1,4 @@ -import { Event } from "@interchainjs/types"; +import { Event } from '@interchainjs/types'; /** A transaction that is indexed as part of the transaction history */ export interface IndexedTx { diff --git a/libs/interchainjs/types/signing-client.ts b/libs/interchainjs/src/types/signing-client.ts similarity index 90% rename from libs/interchainjs/types/signing-client.ts rename to libs/interchainjs/src/types/signing-client.ts index c22f170e..fdb97402 100644 --- a/libs/interchainjs/types/signing-client.ts +++ b/libs/interchainjs/src/types/signing-client.ts @@ -1,6 +1,6 @@ -import { Price } from "@interchainjs/types"; -import { AminoConverter, Message } from "@interchainjs/cosmos/types"; -import { Event, TelescopeGeneratedType } from "@interchainjs/types"; +import { AminoConverter, Message } from '@interchainjs/cosmos/types'; +import { Price } from '@interchainjs/types'; +import { Event, TelescopeGeneratedType } from '@interchainjs/types'; export type EncodeObject = Message; diff --git a/libs/interchainjs/types/wallet.ts b/libs/interchainjs/src/types/wallet.ts similarity index 60% rename from libs/interchainjs/types/wallet.ts rename to libs/interchainjs/src/types/wallet.ts index c644936c..0e056947 100644 --- a/libs/interchainjs/types/wallet.ts +++ b/libs/interchainjs/src/types/wallet.ts @@ -1,15 +1,10 @@ -import { SignDoc, StdSignDoc } from "@interchainjs/types"; +import { CosmosAccount } from '@interchainjs/cosmos/types'; +import { SignDoc, StdSignDoc } from '@interchainjs/types'; -export type Algo = "secp256k1" | "ed25519" | "sr25519"; +export type Algo = 'secp256k1' | 'ed25519' | 'sr25519'; export type Bech32Address = string; -export interface AccountData { - address: Bech32Address; - algo: Algo; - pubkey: Uint8Array; -} - export interface Pubkey { type: string; value: any; @@ -26,7 +21,7 @@ export interface AminoSignResponse { } export interface OfflineAminoSigner { - getAccounts: () => Promise; + getAccounts: () => Promise; signAmino: ( signerAddress: string, signDoc: StdSignDoc @@ -39,7 +34,7 @@ export interface DirectSignResponse { } export interface OfflineDirectSigner { - getAccounts: () => Promise; + getAccounts: () => Promise; signDirect: ( signerAddress: string, signDoc: SignDoc @@ -48,12 +43,6 @@ export interface OfflineDirectSigner { export type OfflineSigner = OfflineAminoSigner | OfflineDirectSigner; -export interface Wallet { - getAccounts: () => AccountData[]; - signAmino: (signerAddress: string, signDoc: StdSignDoc) => AminoSignResponse; - signDirect: (signerAddress: string, signDoc: SignDoc) => DirectSignResponse; -} - export interface WalletOptions { bip39Password?: string; hdPaths?: string[]; diff --git a/libs/interchainjs/src/utils.ts b/libs/interchainjs/src/utils.ts new file mode 100644 index 00000000..af24d3a1 --- /dev/null +++ b/libs/interchainjs/src/utils.ts @@ -0,0 +1,47 @@ + + +import { Auth } from '@interchainjs/types'; + + +/** + * An error when broadcasting the transaction. This contains the CheckTx errors + * from the blockchain. Once a transaction is included in a block no BroadcastTxError + * is thrown, even if the execution fails (DeliverTx errors). + */ +export class BroadcastTxError extends Error { + public readonly code: number; + public readonly codespace: string; + public readonly log: string | undefined; + + public constructor(code: number, codespace: string, log: string | undefined) { + super( + `Broadcasting transaction failed with code ${code} (codespace: ${codespace}). Log: ${log}` + ); + this.code = code; + this.codespace = codespace; + this.log = log; + } +} + +export class TimeoutError extends Error { + public readonly txId: string; + + public constructor(message: string, txId: string) { + super(message); + this.txId = txId; + } +} + +export async function sleep(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +export const defaultAuth: Auth = { + algo: 'secp256k1', + getPublicKey: (_isCompressed?: boolean) => { + throw new Error('Not implemented yet'); + }, + sign: (_data: Uint8Array) => { + throw new Error('Not implemented yet'); + }, +}; \ No newline at end of file diff --git a/libs/interchainjs/wallets/secp256k1.ts b/libs/interchainjs/src/wallets/secp256k1.ts similarity index 50% rename from libs/interchainjs/wallets/secp256k1.ts rename to libs/interchainjs/src/wallets/secp256k1.ts index 86b70949..a5eef843 100644 --- a/libs/interchainjs/wallets/secp256k1.ts +++ b/libs/interchainjs/src/wallets/secp256k1.ts @@ -1,34 +1,35 @@ -import { Auth, StdSignDoc } from "@interchainjs/types"; -import { Secp256k1Auth } from "@interchainjs/auth/secp256k1"; -import { SignDoc } from "@interchainjs/cosmos/types"; -import { encodeStdSignDoc } from "@interchainjs/cosmos/utils"; +import { defaultHdPaths } from '@interchainjs/auth/defaults'; +import { Secp256k1Auth } from '@interchainjs/auth/secp256k1'; +import { defaultSignerConfig } from '@interchainjs/cosmos/defaults'; +import { CosmosAccount, CosmosBaseWallet } from '@interchainjs/cosmos/types'; +import { encodeStdSignDoc } from '@interchainjs/cosmos/utils'; +import { SignDoc } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx'; +import { Auth, StdSignDoc } from '@interchainjs/types'; import { - AccountData, + Algo, AminoSignResponse, + Bech32Address, DirectSignResponse, OfflineAminoSigner, OfflineDirectSigner, - Wallet, WalletOptions, - Bech32Address, - Algo, -} from "../types/wallet"; -import { defaultSignerConfig } from "@interchainjs/cosmos/defaults"; -import { defaultHdPaths } from "@interchainjs/auth/defaults"; +} from '../types/wallet'; const isPublicKeyCompressed = defaultSignerConfig.publicKey.isCompressed; const toAddress = defaultSignerConfig.publicKey.hash; const messageHash = defaultSignerConfig.message.hash; const defaultHdPath = defaultHdPaths.find( - ({ network, algo }) => network === "cosmos" && algo === "secp256k1" + ({ network, algo }) => network === 'cosmos' && algo === 'secp256k1' )!.path; -export class Secp256k1Wallet implements Wallet { +export class Secp256k1Wallet +implements CosmosBaseWallet, OfflineAminoSigner, OfflineDirectSigner +{ readonly auths: Auth[] = []; readonly addrs: Bech32Address[] = []; - constructor(auths: Auth[], prefix: string = "cosmos") { + constructor(auths: Auth[], prefix: string = 'cosmos') { this.auths = auths; this.auths.forEach((auth) => { this.addrs.push( @@ -39,25 +40,46 @@ export class Secp256k1Wallet implements Wallet { static fromMnemonic(mnemonic: string, options?: WalletOptions) { const hdPaths = options?.hdPaths || [defaultHdPath]; - const auths: Auth[] = []; - hdPaths.forEach((hdPath) => { - auths.push( - Secp256k1Auth.fromMnemonic(mnemonic, hdPath, { - bip39Password: options?.bip39Password, - }) - ); + const auths: Auth[] = Secp256k1Auth.fromMnemonic(mnemonic, hdPaths, { + bip39Password: options?.bip39Password, }); return new Secp256k1Wallet(auths, options?.prefix); } - getAccounts(): AccountData[] { - const accounts: AccountData[] = []; + async getAccountAuths(): Promise< + { + auth: Auth; + account: CosmosAccount; + }[] + > { + const accounts = await this.getAccounts(); + + return accounts.map((account, i) => { + const auth = this.auths[i]; + return { auth, account }; + }); + } + + async getAccounts(): Promise { + const accounts: CosmosAccount[] = []; this.auths.forEach((auth, i) => { - accounts.push({ - address: this.addrs[i], + const address = this.addrs[i]; + const account = { + toAccountData() { + return { + address: address, + algo: auth.algo as Algo, + pubkey: auth.getPublicKey(isPublicKeyCompressed).value, + }; + }, + getAddress() { + return address; + }, algo: auth.algo as Algo, - pubkey: auth.getPublicKey(isPublicKeyCompressed).value, - }); + publicKey: auth.getPublicKey(isPublicKeyCompressed), + }; + + accounts.push(account); }); return accounts; } @@ -65,23 +87,23 @@ export class Secp256k1Wallet implements Wallet { private getAuthFromBech32Addr(address: string) { const id = this.addrs.findIndex((addr) => addr === address); if (id === -1) { - throw new Error("No such signerAddress been authed."); + throw new Error('No such signerAddress been authed.'); } return this.auths[id]; } - signDirect(signerAddress: string, signDoc: SignDoc): DirectSignResponse { + async signDirect( + signerAddress: string, + signDoc: SignDoc + ): Promise { const auth = this.getAuthFromBech32Addr(signerAddress); const doc = SignDoc.fromPartial(signDoc); - const signature = defaultSignerConfig.signature.toCompact( - auth.sign(messageHash(SignDoc.encode(doc).finish())), - auth.algo - ); + const signature = auth.sign(messageHash(SignDoc.encode(doc).finish())).toCompact(); return { signed: doc, signature: { pub_key: { - type: "tendermint/PubKeySecp256k1", + type: 'tendermint/PubKeySecp256k1', value: { key: auth.getPublicKey(isPublicKeyCompressed), }, @@ -91,17 +113,19 @@ export class Secp256k1Wallet implements Wallet { }; } - signAmino(signerAddress: string, signDoc: StdSignDoc): AminoSignResponse { + async signAmino( + signerAddress: string, + signDoc: StdSignDoc + ): Promise { const auth = this.getAuthFromBech32Addr(signerAddress); - const signature = defaultSignerConfig.signature.toCompact( - auth.sign(messageHash(encodeStdSignDoc(signDoc))), - auth.algo - ); + const signature = auth + .sign(messageHash(encodeStdSignDoc(signDoc))) + .toCompact(); return { signed: signDoc, signature: { pub_key: { - type: "tendermint/PubKeySecp256k1", + type: 'tendermint/PubKeySecp256k1', value: { key: auth.getPublicKey(isPublicKeyCompressed), }, diff --git a/libs/interchainjs/starship/__tests__/gov.test.ts b/libs/interchainjs/starship/__tests__/gov.test.ts index 8f522ef6..d1ef6f50 100644 --- a/libs/interchainjs/starship/__tests__/gov.test.ts +++ b/libs/interchainjs/starship/__tests__/gov.test.ts @@ -1,32 +1,32 @@ -import "./setup.test"; +import './setup.test'; -import { generateMnemonic } from "@confio/relayer/build/lib/helpers"; -import { assertIsDeliverTxSuccess } from "@cosmjs/stargate"; +import { generateMnemonic } from '@confio/relayer/build/lib/helpers'; +import { assertIsDeliverTxSuccess } from '@cosmjs/stargate'; import { ProposalStatus, TextProposal, VoteOption, -} from "@interchainjs/cosmos-types/cosmos/gov/v1beta1/gov"; +} from '@interchainjs/cosmos-types/cosmos/gov/v1beta1/gov'; import { MsgSubmitProposal, MsgVote, -} from "@interchainjs/cosmos-types/cosmos/gov/v1beta1/tx"; +} from '@interchainjs/cosmos-types/cosmos/gov/v1beta1/tx'; import { BondStatus, bondStatusToJSON, -} from "@interchainjs/cosmos-types/cosmos/staking/v1beta1/staking"; -import { MsgDelegate } from "@interchainjs/cosmos-types/cosmos/staking/v1beta1/tx"; -import { fromBase64, toUtf8 } from "@interchainjs/utils"; -import { BigNumber } from "bignumber.js"; -import { RpcQuery } from "interchainjs/query/rpc"; -import { StargateSigningClient } from "interchainjs/stargate"; -import { OfflineAminoSigner, OfflineDirectSigner } from "interchainjs/types"; -import { Secp256k1Wallet } from "interchainjs/wallets/secp256k1"; -import { useChain } from "starshipjs"; - -import { waitUntil } from "../src"; - -describe("Governance tests for osmosis", () => { +} from '@interchainjs/cosmos-types/cosmos/staking/v1beta1/staking'; +import { MsgDelegate } from '@interchainjs/cosmos-types/cosmos/staking/v1beta1/tx'; +import { fromBase64, toUtf8 } from '@interchainjs/utils'; +import { BigNumber } from 'bignumber.js'; +import { RpcQuery } from 'interchainjs/query/rpc'; +import { StargateSigningClient } from 'interchainjs/stargate'; +import { OfflineAminoSigner, OfflineDirectSigner } from 'interchainjs/types'; +import { Secp256k1Wallet } from 'interchainjs/wallets/secp256k1'; +import { useChain } from 'starshipjs'; + +import { waitUntil } from '../src'; + +describe('Governance tests for osmosis', () => { let directSigner: OfflineDirectSigner, aminoSigner: OfflineAminoSigner, denom: string, @@ -40,9 +40,8 @@ describe("Governance tests for osmosis", () => { let validatorAddress: string; beforeAll(async () => { - ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = useChain( - "osmosis" - )); + ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = + useChain('osmosis')); denom = getCoin().base; // Initialize wallet @@ -54,8 +53,10 @@ describe("Governance tests for osmosis", () => { }); directSigner = directWallet.toOfflineDirectSigner(); aminoSigner = aminoWallet.toOfflineAminoSigner(); - directAddress = (await directSigner.getAccounts())[0].address; - aminoAddress = (await aminoSigner.getAccounts())[0].address; + directAddress = ( + await directSigner.getAccounts() + )[0].getAddress() as string; + aminoAddress = (await aminoSigner.getAccounts())[0].getAddress() as string; // Create custom cosmos interchain client queryClient = new RpcQuery(getRpcEndpoint()); @@ -65,16 +66,16 @@ describe("Governance tests for osmosis", () => { await creditFromFaucet(aminoAddress); }, 200000); - it("check address has tokens", async () => { + it('check address has tokens', async () => { const { balance } = await queryClient.balance({ address: directAddress, denom, }); - expect(balance!.amount).toEqual("10000000000"); + expect(balance!.amount).toEqual('10000000000'); }, 10000); - it("query validator address", async () => { + it('query validator address', async () => { const { validators } = await queryClient.validators({ status: bondStatusToJSON(BondStatus.BOND_STATUS_BONDED), }); @@ -91,7 +92,7 @@ describe("Governance tests for osmosis", () => { validatorAddress = allValidators[0].operatorAddress; }); - it("stake tokens to genesis validator", async () => { + it('stake tokens to genesis validator', async () => { const signingClient = StargateSigningClient.connectWithSigner( getRpcEndpoint(), directSigner @@ -121,10 +122,10 @@ describe("Governance tests for osmosis", () => { amount: [ { denom, - amount: "100000", + amount: '100000', }, ], - gas: "550000", + gas: '550000', }; const result = await signingClient.signAndBroadcast( @@ -135,15 +136,15 @@ describe("Governance tests for osmosis", () => { assertIsDeliverTxSuccess(result); }, 10000); - it("submit a txt proposal", async () => { + it('submit a txt proposal', async () => { const signingClient = StargateSigningClient.connectWithSigner( getRpcEndpoint(), directSigner ); const contentMsg = TextProposal.fromPartial({ - title: "Test Proposal", - description: "Test text proposal for the e2e testing", + title: 'Test Proposal', + description: 'Test text proposal for the e2e testing', }); // Stake half of the tokens @@ -153,12 +154,12 @@ describe("Governance tests for osmosis", () => { proposer: directAddress, initialDeposit: [ { - amount: "1000000", + amount: '1000000', denom: denom, }, ], content: { - typeUrl: "/cosmos.gov.v1beta1.TextProposal", + typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: TextProposal.encode(contentMsg).finish(), }, }), @@ -168,10 +169,10 @@ describe("Governance tests for osmosis", () => { amount: [ { denom, - amount: "100000", + amount: '100000', }, ], - gas: "550000", + gas: '550000', }; const result = await signingClient.signAndBroadcast( @@ -183,10 +184,10 @@ describe("Governance tests for osmosis", () => { // Get proposal id from log events const proposalIdEvent = result.events.find( - (event) => event.type === "submit_proposal" + (event) => event.type === 'submit_proposal' ); const proposalIdEncoded = proposalIdEvent!.attributes.find( - (attr) => toUtf8(fromBase64(attr.key)) === "proposal_id" + (attr) => toUtf8(fromBase64(attr.key)) === 'proposal_id' )!.value; proposalId = toUtf8(fromBase64(proposalIdEncoded)); @@ -194,7 +195,7 @@ describe("Governance tests for osmosis", () => { expect(BigInt(proposalId)).toBeGreaterThan(BigInt(0)); }, 200000); - it("query proposal", async () => { + it('query proposal', async () => { const result = await queryClient.proposal({ proposalId: BigInt(proposalId), }); @@ -202,7 +203,7 @@ describe("Governance tests for osmosis", () => { expect(result.proposal.proposalId.toString()).toEqual(proposalId); }, 10000); - it("vote on proposal using direct", async () => { + it('vote on proposal using direct', async () => { // create direct address signing client const signingClient = StargateSigningClient.connectWithSigner( getRpcEndpoint(), @@ -223,10 +224,10 @@ describe("Governance tests for osmosis", () => { amount: [ { denom, - amount: "100000", + amount: '100000', }, ], - gas: "550000", + gas: '550000', }; const result = await signingClient.signAndBroadcast( @@ -237,7 +238,7 @@ describe("Governance tests for osmosis", () => { assertIsDeliverTxSuccess(result); }, 10000); - it("verify direct vote", async () => { + it('verify direct vote', async () => { const { vote } = await queryClient.getVote({ proposalId: BigInt(proposalId), voter: directAddress, @@ -248,7 +249,7 @@ describe("Governance tests for osmosis", () => { expect(vote.option).toEqual(VoteOption.VOTE_OPTION_YES); }, 10000); - it("vote on proposal using amino", async () => { + it('vote on proposal using amino', async () => { // create amino address signing client const signingClient = StargateSigningClient.connectWithSigner( getRpcEndpoint(), @@ -269,10 +270,10 @@ describe("Governance tests for osmosis", () => { amount: [ { denom, - amount: "100000", + amount: '100000', }, ], - gas: "550000", + gas: '550000', }; const result = await signingClient.signAndBroadcast( @@ -283,7 +284,7 @@ describe("Governance tests for osmosis", () => { assertIsDeliverTxSuccess(result); }, 10000); - it("verify amino vote", async () => { + it('verify amino vote', async () => { const { vote } = await queryClient.getVote({ proposalId: BigInt(proposalId), voter: aminoAddress, @@ -294,7 +295,7 @@ describe("Governance tests for osmosis", () => { expect(vote.option).toEqual(VoteOption.VOTE_OPTION_NO); }, 10000); - it("wait for voting period to end", async () => { + it('wait for voting period to end', async () => { // wait for the voting period to end const { proposal } = await queryClient.proposal({ proposalId: BigInt(proposalId), @@ -303,7 +304,7 @@ describe("Governance tests for osmosis", () => { await expect(waitUntil(proposal.votingEndTime)).resolves.not.toThrow(); }, 200000); - it("verify proposal passed", async () => { + it('verify proposal passed', async () => { const { proposal } = await queryClient.proposal({ proposalId: BigInt(proposalId), }); diff --git a/libs/interchainjs/starship/__tests__/setup.test.ts b/libs/interchainjs/starship/__tests__/setup.test.ts index e0607794..d1f70b0b 100644 --- a/libs/interchainjs/starship/__tests__/setup.test.ts +++ b/libs/interchainjs/starship/__tests__/setup.test.ts @@ -1,10 +1,10 @@ -import path from "path"; -import { ConfigContext, useRegistry } from "starshipjs"; +import path from 'path'; +import { ConfigContext, useRegistry } from 'starshipjs'; beforeAll(async () => { - const configFile = path.join(__dirname, "..", "configs", "config.yaml"); + const configFile = path.join(__dirname, '..', 'configs', 'config.yaml'); ConfigContext.setConfigFile(configFile); ConfigContext.setRegistry(await useRegistry(configFile)); }); -it("should ", () => {}); +it('should ', () => {}); diff --git a/libs/interchainjs/starship/__tests__/staking.test.ts b/libs/interchainjs/starship/__tests__/staking.test.ts index 533e5a10..23f7fbe5 100644 --- a/libs/interchainjs/starship/__tests__/staking.test.ts +++ b/libs/interchainjs/starship/__tests__/staking.test.ts @@ -1,21 +1,27 @@ -import { generateMnemonic } from "@confio/relayer/build/lib/helpers"; -import { assertIsDeliverTxSuccess } from "@cosmjs/stargate"; -import { Secp256k1Wallet } from "interchainjs/wallets/secp256k1"; -import { RpcQuery } from "interchainjs/query/rpc"; -import { OfflineDirectSigner } from "interchainjs/types"; -import { StargateSigningClient } from "interchainjs/stargate"; -import BigNumber from "bignumber.js"; -import { useChain } from "starshipjs"; -import "./setup.test"; +import './setup.test'; + +import { ChainInfo } from '@chain-registry/client'; +import { Asset } from '@chain-registry/types'; +import { generateMnemonic } from '@confio/relayer/build/lib/helpers'; +import { assertIsDeliverTxSuccess } from '@cosmjs/stargate'; import { BondStatus, bondStatusToJSON, -} from "@interchainjs/cosmos-types/cosmos/staking/v1beta1/staking"; -import { MsgDelegate } from "@interchainjs/cosmos-types/cosmos/staking/v1beta1/tx"; - -describe("Staking tokens testing", () => { +} from '@interchainjs/cosmos-types/cosmos/staking/v1beta1/staking'; +import { MsgDelegate } from '@interchainjs/cosmos-types/cosmos/staking/v1beta1/tx'; +import BigNumber from 'bignumber.js'; +import { RpcQuery } from 'interchainjs/query/rpc'; +import { StargateSigningClient } from 'interchainjs/stargate'; +import { OfflineDirectSigner } from 'interchainjs/types'; +import { Secp256k1Wallet } from 'interchainjs/wallets/secp256k1'; +import { useChain } from 'starshipjs'; + +describe('Staking tokens testing', () => { let protoSigner: OfflineDirectSigner, denom: string, address: string; - let chainInfo, getCoin, getRpcEndpoint: () => string, creditFromFaucet; + let chainInfo: ChainInfo, + getCoin: () => Asset, + getRpcEndpoint: () => string, + creditFromFaucet: (address: string, denom?: string | null) => Promise; // Variables used accross testcases let queryClient: RpcQuery; @@ -23,9 +29,8 @@ describe("Staking tokens testing", () => { let delegationAmount: string; beforeAll(async () => { - ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = useChain( - "osmosis" - )); + ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = + useChain('osmosis')); denom = getCoin().base; const mnemonic = generateMnemonic(); @@ -34,7 +39,7 @@ describe("Staking tokens testing", () => { prefix: chainInfo.chain.bech32_prefix, }); protoSigner = wallet.toOfflineDirectSigner(); - address = (await protoSigner.getAccounts())[0].address; + address = (await protoSigner.getAccounts())[0].getAddress() as string; // Create custom cosmos interchain client queryClient = new RpcQuery(getRpcEndpoint()); @@ -43,16 +48,16 @@ describe("Staking tokens testing", () => { await creditFromFaucet(address); }, 200000); - it("check address has tokens", async () => { + it('check address has tokens', async () => { const { balance } = await queryClient.balance({ address, denom, }); - expect(balance!.amount).toEqual("10000000000"); + expect(balance!.amount).toEqual('10000000000'); }, 10000); - it("query validator address", async () => { + it('query validator address', async () => { const { validators } = await queryClient.validators({ status: bondStatusToJSON(BondStatus.BOND_STATUS_BONDED), }); @@ -69,7 +74,7 @@ describe("Staking tokens testing", () => { validatorAddress = allValidators[0].operatorAddress; }); - it("stake tokens to genesis validator", async () => { + it('stake tokens to genesis validator', async () => { const signingClient = StargateSigningClient.connectWithSigner( getRpcEndpoint(), protoSigner @@ -99,17 +104,17 @@ describe("Staking tokens testing", () => { amount: [ { denom, - amount: "100000", + amount: '100000', }, ], - gas: "550000", + gas: '550000', }; const result = await signingClient.signAndBroadcast(address, [msg], fee); assertIsDeliverTxSuccess(result); }); - it("query delegation", async () => { + it('query delegation', async () => { const { delegationResponse } = await queryClient.delegation({ delegatorAddr: address, validatorAddr: validatorAddress, diff --git a/libs/interchainjs/starship/__tests__/token.test.ts b/libs/interchainjs/starship/__tests__/token.test.ts index b220229a..40bdc217 100644 --- a/libs/interchainjs/starship/__tests__/token.test.ts +++ b/libs/interchainjs/starship/__tests__/token.test.ts @@ -1,23 +1,27 @@ -import "./setup.test"; - -import { generateMnemonic } from "@confio/relayer/build/lib/helpers"; -import { assertIsDeliverTxSuccess } from "@cosmjs/stargate"; -import { MsgTransfer } from "@interchainjs/cosmos-types/ibc/applications/transfer/v1/tx"; -import { RpcQuery } from "interchainjs/query/rpc"; -import { StargateSigningClient } from "interchainjs/stargate"; -import { OfflineDirectSigner } from "interchainjs/types"; -import { Secp256k1Wallet } from "interchainjs/wallets/secp256k1"; -import { useChain } from "starshipjs"; - -describe("Token transfers", () => { +import './setup.test'; + +import { ChainInfo } from '@chain-registry/client'; +import { Asset } from '@chain-registry/types'; +import { generateMnemonic } from '@confio/relayer/build/lib/helpers'; +import { assertIsDeliverTxSuccess } from '@cosmjs/stargate'; +import { MsgTransfer } from '@interchainjs/cosmos-types/ibc/applications/transfer/v1/tx'; +import { RpcQuery } from 'interchainjs/query/rpc'; +import { StargateSigningClient } from 'interchainjs/stargate'; +import { OfflineDirectSigner } from 'interchainjs/types'; +import { Secp256k1Wallet } from 'interchainjs/wallets/secp256k1'; +import { useChain } from 'starshipjs'; + +describe('Token transfers', () => { let protoSigner: OfflineDirectSigner, denom: string, address: string; - let chainInfo, getCoin, getRpcEndpoint: () => string, creditFromFaucet; + let chainInfo: ChainInfo, + getCoin: () => Asset, + getRpcEndpoint: () => string, + creditFromFaucet: (address: string, denom?: string | null) => Promise; let queryClient: RpcQuery; beforeAll(async () => { - ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = useChain( - "osmosis" - )); + ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = + useChain('osmosis')); denom = getCoin().base; const mnemonic = generateMnemonic(); @@ -26,7 +30,7 @@ describe("Token transfers", () => { prefix: chainInfo.chain.bech32_prefix, }); protoSigner = wallet.toOfflineDirectSigner(); - address = (await protoSigner.getAccounts())[0].address; + address = (await protoSigner.getAccounts())[0].getAddress() as string; // Create custom cosmos interchain client queryClient = new RpcQuery(getRpcEndpoint()); @@ -34,13 +38,13 @@ describe("Token transfers", () => { await creditFromFaucet(address); }); - it("send osmosis token to address", async () => { + it('send osmosis token to address', async () => { const mnemonic = generateMnemonic(); // Initialize wallet const wallet2 = Secp256k1Wallet.fromMnemonic(mnemonic, { prefix: chainInfo.chain.bech32_prefix, }); - const address2 = wallet2.getAccounts()[0].address; + const address2 = (await wallet2.getAccounts())[0].getAddress(); const signingClient = StargateSigningClient.connectWithSigner( getRpcEndpoint(), @@ -51,14 +55,14 @@ describe("Token transfers", () => { amount: [ { denom, - amount: "100000", + amount: '100000', }, ], - gas: "550000", + gas: '550000', }; const token = { - amount: "10000000", + amount: '10000000', denom, }; @@ -67,7 +71,7 @@ describe("Token transfers", () => { address, { fromAddress: address, toAddress: address2, amount: [token] }, fee, - "send tokens test" + 'send tokens test' ); const { balance } = await queryClient.balance({ address: address2, denom }); @@ -76,24 +80,20 @@ describe("Token transfers", () => { expect(balance!.denom).toEqual(denom); }, 10000); - it("send ibc osmo tokens to address on cosmos chain", async () => { + it('send ibc osmo tokens to address on cosmos chain', async () => { const signingClient = StargateSigningClient.connectWithSigner( getRpcEndpoint(), protoSigner ); - const { - chainInfo: cosmosChainInfo, - getRpcEndpoint: cosmosRpcEndpoint, - } = useChain("cosmos"); - - const { getRpcEndpoint: osmosisRpcEndpoint } = useChain("osmosis"); + const { chainInfo: cosmosChainInfo, getRpcEndpoint: cosmosRpcEndpoint } = + useChain('cosmos'); // Initialize wallet address for cosmos chain const cosmosWallet = Secp256k1Wallet.fromMnemonic(generateMnemonic(), { prefix: cosmosChainInfo.chain.bech32_prefix, }); - const cosmosAddress = cosmosWallet.getAccounts()[0].address; + const cosmosAddress = (await cosmosWallet.getAccounts())[0].getAddress(); const ibcInfos = chainInfo.fetcher.getChainIbcData( chainInfo.chain.chain_id @@ -106,10 +106,8 @@ describe("Token transfers", () => { expect(ibcInfo).toBeTruthy(); - const { - port_id: sourcePort, - channel_id: sourceChannel, - } = ibcInfo.channels[0].chain_1; + const { port_id: sourcePort, channel_id: sourceChannel } = + ibcInfo!.channels[0].chain_1; // Transfer osmosis tokens via IBC to cosmos chain const currentTime = Math.floor(Date.now()) * 1000000; @@ -119,15 +117,15 @@ describe("Token transfers", () => { amount: [ { denom, - amount: "100000", + amount: '100000', }, ], - gas: "550000", + gas: '550000', }; const token = { denom, - amount: "10000000", + amount: '10000000', }; // send ibc tokens @@ -141,10 +139,10 @@ describe("Token transfers", () => { receiver: cosmosAddress, timeoutHeight: undefined, timeoutTimestamp: BigInt(timeoutTime), - memo: "test transfer", + memo: 'test transfer', }), fee, - "" + '' ); assertIsDeliverTxSuccess(resp); @@ -153,16 +151,16 @@ describe("Token transfers", () => { const cosmosQueryClient = new RpcQuery(cosmosRpcEndpoint()); const { balances } = await cosmosQueryClient.allBalances({ address: cosmosAddress, - resolveDenom: true + resolveDenom: true, }); // check balances expect(balances.length).toEqual(1); const ibcBalance = balances.find((balance) => { - return balance.denom.startsWith("ibc/"); + return balance.denom.startsWith('ibc/'); }); expect(ibcBalance!.amount).toEqual(token.amount); - expect(ibcBalance!.denom).toContain("ibc/"); + expect(ibcBalance!.denom).toContain('ibc/'); // // check ibc denom trace of the same // const trace = await cosmosQueryClient.denomTrace({ diff --git a/libs/interchainjs/starship/src/utils.ts b/libs/interchainjs/starship/src/utils.ts index 5c7b568c..6f00b35c 100644 --- a/libs/interchainjs/starship/src/utils.ts +++ b/libs/interchainjs/starship/src/utils.ts @@ -1,7 +1,7 @@ // @ts-nocheck -import { ChainInfo } from "@chain-registry/client"; -import { Bip39, Random } from "@cosmjs/crypto"; -import { Coin, DirectSecp256k1HdWallet, OfflineSigner } from '@cosmjs/proto-signing'; +import { ChainInfo } from '@chain-registry/client'; +import { Bip39, Random } from '@cosmjs/crypto'; +import { Coin, DirectSecp256k1HdWallet } from '@cosmjs/proto-signing'; import { assertIsDeliverTxSuccess, SigningStargateClient } from '@cosmjs/stargate'; import BigNumber from 'bignumber.js'; import { ConfigContext, useChain } from 'starshipjs'; diff --git a/libs/interchainjs/tsconfig.esm.json b/libs/interchainjs/tsconfig.esm.json index 9658b30d..800d7506 100644 --- a/libs/interchainjs/tsconfig.esm.json +++ b/libs/interchainjs/tsconfig.esm.json @@ -1,11 +1,9 @@ { - "extends": "../../tsconfig.json", + "extends": "./tsconfig.json", "compilerOptions": { "outDir": "dist/esm", - "rootDir": ".", - "declaration": false, - "noImplicitAny": false - }, - "include": ["**/*.ts"], - "exclude": ["dist", "node_modules", "**/*.spec.*", "starship"] + "module": "es2022", + "rootDir": "src/", + "declaration": false + } } diff --git a/libs/interchainjs/tsconfig.json b/libs/interchainjs/tsconfig.json index 843e8f84..1a9d5696 100644 --- a/libs/interchainjs/tsconfig.json +++ b/libs/interchainjs/tsconfig.json @@ -2,9 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "dist", - "rootDir": ".", - "noImplicitAny": false + "rootDir": "src/" }, - "include": ["**/*.ts"], - "exclude": ["dist", "node_modules", "**/*.spec.*", "starship"] + "include": ["src/**/*.ts"], + "exclude": ["dist", "node_modules", "**/*.spec.*", "**/*.test.*"] } diff --git a/libs/interchainjs/types/index.ts b/libs/interchainjs/types/index.ts deleted file mode 100644 index beaa1086..00000000 --- a/libs/interchainjs/types/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./query"; -export * from "./signing-client"; -export * from "./wallet"; diff --git a/libs/interchainjs/utils.ts b/libs/interchainjs/utils.ts deleted file mode 100644 index 45037243..00000000 --- a/libs/interchainjs/utils.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Auth, ISignDoc, IWallet } from "@interchainjs/types"; -import { OfflineAminoSigner, OfflineDirectSigner } from "./types/wallet"; -import { Key } from "@interchainjs/utils"; -import { defaultSignerConfig } from "@interchainjs/cosmos/defaults"; - -/** - * An error when broadcasting the transaction. This contains the CheckTx errors - * from the blockchain. Once a transaction is included in a block no BroadcastTxError - * is thrown, even if the execution fails (DeliverTx errors). - */ -export class BroadcastTxError extends Error { - public readonly code: number; - public readonly codespace: string; - public readonly log: string | undefined; - - public constructor(code: number, codespace: string, log: string | undefined) { - super( - `Broadcasting transaction failed with code ${code} (codespace: ${codespace}). Log: ${log}` - ); - this.code = code; - this.codespace = codespace; - this.log = log; - } -} - -export class TimeoutError extends Error { - public readonly txId: string; - - public constructor(message: string, txId: string) { - super(message); - this.txId = txId; - } -} - -export async function sleep(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); -} - -export const defaultAuth: Auth = { - algo: "secp256k1", - getPublicKey: (_isCompressed?: boolean) => { - throw new Error("Not implemented yet"); - }, - sign: (_data: Uint8Array) => { - throw new Error("Not implemented yet"); - }, -}; - -export function toAminoWallet( - offlineSigner: OfflineAminoSigner, - prefix: string -): IWallet.CosmosAminoWallet { - const wallet: IWallet.CosmosAminoWallet = { - getAccount: async () => { - const accounts = await offlineSigner.getAccounts(); - const account = accounts.find((account) => - account.address.startsWith(prefix) - ); - const publicKey = Key.from(account.pubkey); - const address = defaultSignerConfig.publicKey.hash(publicKey); - return { - algo: account.algo, - publicKey, - getAddress(_prefix?: string) { - return _prefix ? address.toBech32(_prefix) : address; - }, - }; - }, - sign: async (doc: ISignDoc.CosmosAminoDoc) => { - const [account, ..._] = await offlineSigner.getAccounts(); - const { signature, signed } = await offlineSigner.signAmino( - account.address, - doc - ); - return { - signature: Key.fromBase64(signature.signature), - signDoc: signed as any, - }; - }, - }; - return wallet; -} - -export function toDirectWallet( - offlineSigner: OfflineDirectSigner, - prefix: string -): IWallet.CosmosDirectWallet { - const wallet: IWallet.CosmosDirectWallet = { - getAccount: async () => { - const accounts = await offlineSigner.getAccounts(); - const account = accounts.find((account) => - account.address.startsWith(prefix) - ); - const publicKey = Key.from(account.pubkey); - const address = defaultSignerConfig.publicKey.hash(publicKey); - return { - algo: account.algo, - publicKey, - getAddress(_prefix?: string) { - return _prefix ? address.toBech32(_prefix) : address; - }, - }; - }, - sign: async (doc: ISignDoc.CosmosDirectDoc) => { - const [account, ..._] = await offlineSigner.getAccounts(); - const { signature, signed } = await offlineSigner.signDirect( - account.address, - doc - ); - return { - signature: Key.fromBase64(signature.signature), - signDoc: signed as any, - }; - }, - }; - return wallet; -} diff --git a/networks/cosmos/amino.ts b/networks/cosmos/amino.ts deleted file mode 100644 index daff7f37..00000000 --- a/networks/cosmos/amino.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { - Auth, - BaseWallet, - ISignDoc, - HttpEndpoint, - ISigner, - SignerConfig, - StdFee, - IWallet, -} from "@interchainjs/types"; -import { - Encoder, - Message, - AminoConverter, - DocOptions, - SignerOptions, -} from "./types"; -import { toAminoMsgs } from "./utils/amino"; -import { - CosmosBaseSigner, - getAccountFromAuth, - SignResponseFromAuth, -} from "./utils"; -import { SignMode } from "./types"; -import { defaultSignerConfig } from "./defaults"; -import { constructAuthFromWallet } from "@interchainjs/utils"; - -export class AminoSignerBase extends CosmosBaseSigner< - ISignDoc.CosmosAminoDoc, - DocOptions -> { - readonly converters: AminoConverter[]; - - constructor( - auth: Auth, - encoders: Encoder[], - converters: AminoConverter[], - endpoint?: string | HttpEndpoint, - options?: SignerOptions - ) { - super(auth, encoders, endpoint, options); - this.converters = converters; - } - - addConverters = (converters: AminoConverter[]) => { - this.converters.push(...converters); - }; - - getConverter = (aminoType: string) => { - const converter = this.converters.find( - (converter) => converter.aminoType === aminoType - ); - if (!converter) { - throw new Error( - `No such Converter for type ${aminoType}, please add corresponding Converter with method \`addConverters\`` - ); - } - return converter; - }; - - getConverterFromTypeUrl = (typeUrl: string) => { - const converter = this.converters.find( - (converter) => converter.typeUrl === typeUrl - ); - if (!converter) { - throw new Error( - `No such Converter for typeUrl ${typeUrl}, please add corresponding Converter with method \`addConverter\`` - ); - } - return converter; - }; - - async createDoc( - messages: Message[], - fee?: StdFee, - memo?: string, - options?: DocOptions - ) { - const { txRaw, fee: _fee } = await this.createTxRaw( - messages, - options?.signMode ?? SignMode.SIGN_MODE_LEGACY_AMINO_JSON, - fee, - memo, - options - ); - - const signDoc: ISignDoc.CosmosAminoDoc = { - chain_id: options?.chainId ?? (await this.queryClient.getChainId()), - account_number: ( - options?.accountNumber ?? (await this.queryClient.getAccountNumber()) - ).toString(), - sequence: ( - options?.sequence ?? (await this.queryClient.getSequence()) - ).toString(), - fee, - msgs: toAminoMsgs(messages, this.getConverterFromTypeUrl), - memo: memo ?? "", - }; - return { signDoc, tx: txRaw }; - } - - signDoc = async (doc: ISignDoc.CosmosAminoDoc) => { - return SignResponseFromAuth.signAmino(this.auth, doc, this.config); - }; -} - -export class AminoSigner extends AminoSignerBase - implements ISigner.CosmosAminoSigner { - constructor( - auth: Auth, - encoders: Encoder[], - converters: AminoConverter[], - endpoint?: string | HttpEndpoint, - options?: SignerOptions - ) { - super(auth, encoders, converters, endpoint, options); - } - - static async fromWallet( - wallet: IWallet.CosmosAminoWallet, - encoders: Encoder[], - converters: AminoConverter[], - endpoint?: string | HttpEndpoint, - options?: SignerOptions - ) { - const auth: Auth = await constructAuthFromWallet( - wallet, - options?.publicKey?.isCompressed ?? - defaultSignerConfig.publicKey.isCompressed - ); - const signer = new AminoSigner( - auth, - encoders, - converters, - endpoint, - options - ); - signer.signDoc = wallet.sign; - return signer; - } - - static toWallet( - auth: Auth, - config: SignerConfig = defaultSignerConfig - ): IWallet.CosmosAminoWallet { - return { - getAccount: async () => getAccountFromAuth(auth, config), - sign: async (doc: ISignDoc.CosmosAminoDoc) => - SignResponseFromAuth.signAmino(auth, doc, config), - }; - } -} diff --git a/networks/cosmos/codegen/binary.ts b/networks/cosmos/codegen/binary.ts deleted file mode 100644 index a9f367f2..00000000 --- a/networks/cosmos/codegen/binary.ts +++ /dev/null @@ -1,534 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.11 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -// Copyright (c) 2016, Daniel Wirtz All rights reserved. - -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: - -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of its author, nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. - -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- - -// Code generated by the command line utilities is owned by the owner -// of the input file used when generating it. This code is not -// standalone and requires a support library to be linked with it. This -// support library is itself covered by the above license. - -import { utf8Length, utf8Read, utf8Write } from "./utf8"; -import { - int64ToString, - readInt32, - readUInt32, - uInt64ToString, - varint32read, - varint64read, - writeVarint32, - writeVarint64, - int64FromString, - int64Length, - writeFixed32, - writeByte, - zzDecode, - zzEncode, -} from "./varint"; - -export enum WireType { - Varint = 0, - - Fixed64 = 1, - - Bytes = 2, - - Fixed32 = 5, -} - -// Reader -export interface IBinaryReader { - buf: Uint8Array; - pos: number; - type: number; - len: number; - tag(): [number, WireType, number]; - skip(length?: number): this; - skipType(wireType: number): this; - uint32(): number; - int32(): number; - sint32(): number; - fixed32(): number; - sfixed32(): number; - int64(): bigint; - uint64(): bigint; - sint64(): bigint; - fixed64(): bigint; - sfixed64(): bigint; - float(): number; - double(): number; - bool(): boolean; - bytes(): Uint8Array; - string(): string; -} - -export class BinaryReader implements IBinaryReader { - buf: Uint8Array; - pos: number; - type: number; - len: number; - - assertBounds(): void { - if (this.pos > this.len) throw new RangeError("premature EOF"); - } - - constructor(buf?: ArrayLike) { - this.buf = buf ? new Uint8Array(buf) : new Uint8Array(0); - this.pos = 0; - this.type = 0; - this.len = this.buf.length; - } - - tag(): [number, WireType, number] { - const tag = this.uint32(), - fieldNo = tag >>> 3, - wireType = tag & 7; - if (fieldNo <= 0 || wireType < 0 || wireType > 5) - throw new Error( - "illegal tag: field no " + fieldNo + " wire type " + wireType - ); - return [fieldNo, wireType, tag]; - } - - skip(length?: number) { - if (typeof length === "number") { - if (this.pos + length > this.len) throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - if (this.pos >= this.len) throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; - } - - skipType(wireType: number) { - switch (wireType) { - case WireType.Varint: - this.skip(); - break; - case WireType.Fixed64: - this.skip(8); - break; - case WireType.Bytes: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType); - } - break; - case WireType.Fixed32: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); - } - return this; - } - - uint32(): number { - return varint32read.bind(this)(); - } - - int32(): number { - return this.uint32() | 0; - } - - sint32(): number { - const num = this.uint32(); - return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding - } - - fixed32(): number { - const val = readUInt32(this.buf, this.pos); - this.pos += 4; - return val; - } - - sfixed32(): number { - const val = readInt32(this.buf, this.pos); - this.pos += 4; - return val; - } - - int64(): bigint { - const [lo, hi] = varint64read.bind(this)(); - return BigInt(int64ToString(lo, hi)); - } - - uint64(): bigint { - const [lo, hi] = varint64read.bind(this)(); - return BigInt(uInt64ToString(lo, hi)); - } - - sint64(): bigint { - let [lo, hi] = varint64read.bind(this)(); - // zig zag - [lo, hi] = zzDecode(lo, hi); - return BigInt(int64ToString(lo, hi)); - } - - fixed64(): bigint { - const lo = this.sfixed32(); - const hi = this.sfixed32(); - return BigInt(uInt64ToString(lo, hi)); - } - sfixed64(): bigint { - const lo = this.sfixed32(); - const hi = this.sfixed32(); - return BigInt(int64ToString(lo, hi)); - } - - float(): number { - throw new Error("float not supported"); - } - - double(): number { - throw new Error("double not supported"); - } - - bool(): boolean { - const [lo, hi] = varint64read.bind(this)(); - return lo !== 0 || hi !== 0; - } - - bytes(): Uint8Array { - const len = this.uint32(), - start = this.pos; - this.pos += len; - this.assertBounds(); - return this.buf.subarray(start, start + len); - } - - string(): string { - const bytes = this.bytes(); - return utf8Read(bytes, 0, bytes.length); - } -} - -// Writer -export interface IBinaryWriter { - len: number; - head: IOp; - tail: IOp; - states: State | null; - finish(): Uint8Array; - fork(): IBinaryWriter; - reset(): IBinaryWriter; - ldelim(): IBinaryWriter; - tag(fieldNo: number, type: WireType): IBinaryWriter; - uint32(value: number): IBinaryWriter; - int32(value: number): IBinaryWriter; - sint32(value: number): IBinaryWriter; - int64(value: string | number | bigint): IBinaryWriter; - uint64: (value: string | number | bigint) => IBinaryWriter; - sint64(value: string | number | bigint): IBinaryWriter; - fixed64(value: string | number | bigint): IBinaryWriter; - sfixed64: (value: string | number | bigint) => IBinaryWriter; - bool(value: boolean): IBinaryWriter; - fixed32(value: number): IBinaryWriter; - sfixed32: (value: number) => IBinaryWriter; - float(value: number): IBinaryWriter; - double(value: number): IBinaryWriter; - bytes(value: Uint8Array): IBinaryWriter; - string(value: string): IBinaryWriter; -} - -interface IOp { - len: number; - next?: IOp; - proceed(buf: Uint8Array | number[], pos: number): void; -} - -class Op implements IOp { - fn?: ((val: T, buf: Uint8Array | number[], pos: number) => void) | null; - len: number; - val: T; - next?: IOp; - - constructor( - fn: - | (( - val: T, - buf: Uint8Array | number[], - pos: number - ) => void | undefined | null) - | null, - len: number, - val: T - ) { - this.fn = fn; - this.len = len; - this.val = val; - } - - proceed(buf: Uint8Array | number[], pos: number) { - if (this.fn) { - this.fn(this.val, buf, pos); - } - } -} - -class State { - head: IOp; - tail: IOp; - len: number; - next: State | null; - - constructor(writer: BinaryWriter) { - this.head = writer.head; - this.tail = writer.tail; - this.len = writer.len; - this.next = writer.states; - } -} - -export class BinaryWriter implements IBinaryWriter { - len = 0; - head: IOp; - tail: IOp; - states: State | null; - - constructor() { - this.head = new Op(null, 0, 0); - this.tail = this.head; - this.states = null; - } - - static create() { - return new BinaryWriter(); - } - - static alloc(size: number): Uint8Array | number[] { - if (typeof Uint8Array !== "undefined") { - return pool( - (size) => new Uint8Array(size), - Uint8Array.prototype.subarray - )(size); - } else { - return new Array(size); - } - } - - private _push( - fn: (val: T, buf: Uint8Array | number[], pos: number) => void, - len: number, - val: T - ) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; - } - - finish(): Uint8Array { - let head = this.head.next, - pos = 0; - const buf = BinaryWriter.alloc(this.len); - while (head) { - head.proceed(buf, pos); - pos += head.len; - head = head.next; - } - return buf as Uint8Array; - } - - fork(): BinaryWriter { - this.states = new State(this); - this.head = this.tail = new Op(null, 0, 0); - this.len = 0; - return this; - } - - reset(): BinaryWriter { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(null, 0, 0); - this.len = 0; - } - return this; - } - - ldelim(): BinaryWriter { - const head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; - } - - tag(fieldNo: number, type: WireType): BinaryWriter { - return this.uint32(((fieldNo << 3) | type) >>> 0); - } - - uint32(value: number): BinaryWriter { - this.len += (this.tail = this.tail.next = - new Op( - writeVarint32, - (value = value >>> 0) < 128 - ? 1 - : value < 16384 - ? 2 - : value < 2097152 - ? 3 - : value < 268435456 - ? 4 - : 5, - value - )).len; - return this; - } - - int32(value: number): BinaryWriter { - return value < 0 - ? this._push(writeVarint64, 10, int64FromString(value.toString())) // 10 bytes per spec - : this.uint32(value); - } - - sint32(value: number): BinaryWriter { - return this.uint32(((value << 1) ^ (value >> 31)) >>> 0); - } - - int64(value: string | number | bigint): BinaryWriter { - const { lo, hi } = int64FromString(value.toString()); - return this._push(writeVarint64, int64Length(lo, hi), { lo, hi }); - } - - // uint64 is the same with int64 - uint64 = BinaryWriter.prototype.int64; - - sint64(value: string | number | bigint): BinaryWriter { - let { lo, hi } = int64FromString(value.toString()); - // zig zag - [lo, hi] = zzEncode(lo, hi); - return this._push(writeVarint64, int64Length(lo, hi), { lo, hi }); - } - - fixed64(value: string | number | bigint): BinaryWriter { - const { lo, hi } = int64FromString(value.toString()); - return this._push(writeFixed32, 4, lo)._push(writeFixed32, 4, hi); - } - - // sfixed64 is the same with fixed64 - sfixed64 = BinaryWriter.prototype.fixed64; - - bool(value: boolean): BinaryWriter { - return this._push(writeByte, 1, value ? 1 : 0); - } - - fixed32(value: number): BinaryWriter { - return this._push(writeFixed32, 4, value >>> 0); - } - - // sfixed32 is the same with fixed32 - sfixed32 = BinaryWriter.prototype.fixed32; - - float(value: number): BinaryWriter { - throw new Error("float not supported" + value); - } - - double(value: number): BinaryWriter { - throw new Error("double not supported" + value); - } - - bytes(value: Uint8Array): BinaryWriter { - const len = value.length >>> 0; - if (!len) return this._push(writeByte, 1, 0); - return this.uint32(len)._push(writeBytes, len, value); - } - - string(value: string): BinaryWriter { - const len = utf8Length(value); - return len - ? this.uint32(len)._push(utf8Write, len, value) - : this._push(writeByte, 1, 0); - } -} - -function writeBytes( - val: Uint8Array | number[], - buf: Uint8Array | number[], - pos: number -) { - if (typeof Uint8Array !== "undefined") { - (buf as Uint8Array).set(val, pos); - } else { - for (let i = 0; i < val.length; ++i) buf[pos + i] = val[i]; - } -} - -function pool( - alloc: (size: number) => Uint8Array, - slice: (begin?: number, end?: number) => Uint8Array, - size?: number -): (size: number) => Uint8Array { - const SIZE = size || 8192; - const MAX = SIZE >>> 1; - let slab: Uint8Array | null = null; - let offset = SIZE; - return function pool_alloc(size): Uint8Array { - if (size < 1 || size > MAX) return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - const buf: Uint8Array = slice.call(slab, offset, (offset += size)); - if (offset & 7) - // align to 32 bit - offset = (offset | 7) + 1; - return buf; - }; -} - -function indexOutOfRange(reader: BinaryReader, writeLength?: number) { - return RangeError( - "index out of range: " + - reader.pos + - " + " + - (writeLength || 1) + - " > " + - reader.len - ); -} diff --git a/networks/cosmos/codegen/cosmos/auth/v1beta1/auth.ts b/networks/cosmos/codegen/cosmos/auth/v1beta1/auth.ts deleted file mode 100644 index 1acf7407..00000000 --- a/networks/cosmos/codegen/cosmos/auth/v1beta1/auth.ts +++ /dev/null @@ -1,270 +0,0 @@ -import { Any } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccount { - address: string; - pubKey?: Any; - accountNumber: bigint; - sequence: bigint; -} -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccount { - baseAccount?: BaseAccount; - name: string; - permissions: string[]; -} -/** - * ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules. - * - * Since: cosmos-sdk 0.47 - */ -export interface ModuleCredential { - /** module_name is the name of the module used for address derivation (passed into address.Module). */ - moduleName: string; - /** - * derivation_keys is for deriving a module account address (passed into address.Module) - * adding more keys creates sub-account addresses (passed into address.Derive) - */ - derivationKeys: Uint8Array[]; -} -/** Params defines the parameters for the auth module. */ -export interface Params { - maxMemoCharacters: bigint; - txSigLimit: bigint; - txSizeCostPerByte: bigint; - sigVerifyCostEd25519: bigint; - sigVerifyCostSecp256k1: bigint; -} -function createBaseBaseAccount(): BaseAccount { - return { - address: "", - pubKey: undefined, - accountNumber: BigInt(0), - sequence: BigInt(0) - }; -} -export const BaseAccount = { - typeUrl: "/cosmos.auth.v1beta1.BaseAccount", - aminoType: "cosmos-sdk/BaseAccount", - encode(message: BaseAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pubKey !== undefined) { - Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.accountNumber !== BigInt(0)) { - writer.uint32(24).uint64(message.accountNumber); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(32).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BaseAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBaseAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.accountNumber = reader.uint64(); - break; - case 4: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): BaseAccount { - const message = createBaseBaseAccount(); - message.address = object.address ?? ""; - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? Any.fromPartial(object.pubKey) : undefined; - message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - } -}; -function createBaseModuleAccount(): ModuleAccount { - return { - baseAccount: undefined, - name: "", - permissions: [] - }; -} -export const ModuleAccount = { - typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", - aminoType: "cosmos-sdk/ModuleAccount", - encode(message: ModuleAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - for (const v of message.permissions) { - writer.uint32(26).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ModuleAccount { - const message = createBaseModuleAccount(); - message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null ? BaseAccount.fromPartial(object.baseAccount) : undefined; - message.name = object.name ?? ""; - message.permissions = object.permissions?.map(e => e) || []; - return message; - } -}; -function createBaseModuleCredential(): ModuleCredential { - return { - moduleName: "", - derivationKeys: [] - }; -} -export const ModuleCredential = { - typeUrl: "/cosmos.auth.v1beta1.ModuleCredential", - aminoType: "cosmos-sdk/ModuleCredential", - encode(message: ModuleCredential, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.moduleName !== "") { - writer.uint32(10).string(message.moduleName); - } - for (const v of message.derivationKeys) { - writer.uint32(18).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleCredential { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleCredential(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moduleName = reader.string(); - break; - case 2: - message.derivationKeys.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ModuleCredential { - const message = createBaseModuleCredential(); - message.moduleName = object.moduleName ?? ""; - message.derivationKeys = object.derivationKeys?.map(e => e) || []; - return message; - } -}; -function createBaseParams(): Params { - return { - maxMemoCharacters: BigInt(0), - txSigLimit: BigInt(0), - txSizeCostPerByte: BigInt(0), - sigVerifyCostEd25519: BigInt(0), - sigVerifyCostSecp256k1: BigInt(0) - }; -} -export const Params = { - typeUrl: "/cosmos.auth.v1beta1.Params", - aminoType: "cosmos-sdk/x/auth/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxMemoCharacters !== BigInt(0)) { - writer.uint32(8).uint64(message.maxMemoCharacters); - } - if (message.txSigLimit !== BigInt(0)) { - writer.uint32(16).uint64(message.txSigLimit); - } - if (message.txSizeCostPerByte !== BigInt(0)) { - writer.uint32(24).uint64(message.txSizeCostPerByte); - } - if (message.sigVerifyCostEd25519 !== BigInt(0)) { - writer.uint32(32).uint64(message.sigVerifyCostEd25519); - } - if (message.sigVerifyCostSecp256k1 !== BigInt(0)) { - writer.uint32(40).uint64(message.sigVerifyCostSecp256k1); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxMemoCharacters = reader.uint64(); - break; - case 2: - message.txSigLimit = reader.uint64(); - break; - case 3: - message.txSizeCostPerByte = reader.uint64(); - break; - case 4: - message.sigVerifyCostEd25519 = reader.uint64(); - break; - case 5: - message.sigVerifyCostSecp256k1 = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.maxMemoCharacters = object.maxMemoCharacters !== undefined && object.maxMemoCharacters !== null ? BigInt(object.maxMemoCharacters.toString()) : BigInt(0); - message.txSigLimit = object.txSigLimit !== undefined && object.txSigLimit !== null ? BigInt(object.txSigLimit.toString()) : BigInt(0); - message.txSizeCostPerByte = object.txSizeCostPerByte !== undefined && object.txSizeCostPerByte !== null ? BigInt(object.txSizeCostPerByte.toString()) : BigInt(0); - message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519 !== undefined && object.sigVerifyCostEd25519 !== null ? BigInt(object.sigVerifyCostEd25519.toString()) : BigInt(0); - message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1 !== undefined && object.sigVerifyCostSecp256k1 !== null ? BigInt(object.sigVerifyCostSecp256k1.toString()) : BigInt(0); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts b/networks/cosmos/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 42e91e15..00000000 --- a/networks/cosmos/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,263 +0,0 @@ -import { TxRpc } from "@interchainjs/types"; -import { BinaryReader } from "../../../binary"; -import { - QueryAccountsRequest, - QueryAccountsResponse, - QueryAccountRequest, - QueryAccountResponse, - QueryAccountAddressByIDRequest, - QueryAccountAddressByIDResponse, - QueryParamsRequest, - QueryParamsResponse, - QueryModuleAccountsRequest, - QueryModuleAccountsResponse, - QueryModuleAccountByNameRequest, - QueryModuleAccountByNameResponse, - Bech32PrefixRequest, - Bech32PrefixResponse, - AddressBytesToStringRequest, - AddressBytesToStringResponse, - AddressStringToBytesRequest, - AddressStringToBytesResponse, - QueryAccountInfoRequest, - QueryAccountInfoResponse, -} from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Accounts returns all the existing accounts. - * - * When called from another module, this query might consume a high amount of - * gas if the pagination field is incorrectly set. - * - * Since: cosmos-sdk 0.43 - */ - accounts(request?: QueryAccountsRequest): Promise; - /** Account returns account details based on address. */ - account(request: QueryAccountRequest): Promise; - /** - * AccountAddressByID returns account address based on account number. - * - * Since: cosmos-sdk 0.46.2 - */ - accountAddressByID( - request: QueryAccountAddressByIDRequest - ): Promise; - /** Params queries all parameters. */ - params(request?: QueryParamsRequest): Promise; - /** - * ModuleAccounts returns all the existing module accounts. - * - * Since: cosmos-sdk 0.46 - */ - moduleAccounts( - request?: QueryModuleAccountsRequest - ): Promise; - /** ModuleAccountByName returns the module account info by module name */ - moduleAccountByName( - request: QueryModuleAccountByNameRequest - ): Promise; - /** - * Bech32Prefix queries bech32Prefix - * - * Since: cosmos-sdk 0.46 - */ - bech32Prefix(request?: Bech32PrefixRequest): Promise; - /** - * AddressBytesToString converts Account Address bytes to string - * - * Since: cosmos-sdk 0.46 - */ - addressBytesToString( - request: AddressBytesToStringRequest - ): Promise; - /** - * AddressStringToBytes converts Address string to bytes - * - * Since: cosmos-sdk 0.46 - */ - addressStringToBytes( - request: AddressStringToBytesRequest - ): Promise; - /** - * AccountInfo queries account info which is common to all account types. - * - * Since: cosmos-sdk 0.47 - */ - accountInfo( - request: QueryAccountInfoRequest - ): Promise; -} -/** Query defines the gRPC querier service. */ -export interface QueryImpl { - /** Account returns account details based on address. */ - account(request: QueryAccountRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: TxRpc; - constructor(rpc: TxRpc) { - this.rpc = rpc; - } - /* Accounts returns all the existing accounts. - - When called from another module, this query might consume a high amount of - gas if the pagination field is incorrectly set. - - Since: cosmos-sdk 0.43 */ - accounts = async ( - request: QueryAccountsRequest = { - pagination: undefined, - } - ): Promise => { - const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "Accounts", - data - ); - return promise.then((data) => - QueryAccountsResponse.decode(new BinaryReader(data)) - ); - }; - /* Account returns account details based on address. */ - account = async ( - request: QueryAccountRequest - ): Promise => { - const data = QueryAccountRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "Account", - data - ); - return promise.then((data) => - QueryAccountResponse.decode(new BinaryReader(data)) - ); - }; - /* AccountAddressByID returns account address based on account number. - - Since: cosmos-sdk 0.46.2 */ - accountAddressByID = async ( - request: QueryAccountAddressByIDRequest - ): Promise => { - const data = QueryAccountAddressByIDRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "AccountAddressByID", - data - ); - return promise.then((data) => - QueryAccountAddressByIDResponse.decode(new BinaryReader(data)) - ); - }; - /* Params queries all parameters. */ - params = async ( - request: QueryParamsRequest = {} - ): Promise => { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "Params", - data - ); - return promise.then((data) => - QueryParamsResponse.decode(new BinaryReader(data)) - ); - }; - /* ModuleAccounts returns all the existing module accounts. - - Since: cosmos-sdk 0.46 */ - moduleAccounts = async ( - request: QueryModuleAccountsRequest = {} - ): Promise => { - const data = QueryModuleAccountsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "ModuleAccounts", - data - ); - return promise.then((data) => - QueryModuleAccountsResponse.decode(new BinaryReader(data)) - ); - }; - /* ModuleAccountByName returns the module account info by module name */ - moduleAccountByName = async ( - request: QueryModuleAccountByNameRequest - ): Promise => { - const data = QueryModuleAccountByNameRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "ModuleAccountByName", - data - ); - return promise.then((data) => - QueryModuleAccountByNameResponse.decode(new BinaryReader(data)) - ); - }; - /* Bech32Prefix queries bech32Prefix - - Since: cosmos-sdk 0.46 */ - bech32Prefix = async ( - request: Bech32PrefixRequest = {} - ): Promise => { - const data = Bech32PrefixRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "Bech32Prefix", - data - ); - return promise.then((data) => - Bech32PrefixResponse.decode(new BinaryReader(data)) - ); - }; - /* AddressBytesToString converts Account Address bytes to string - - Since: cosmos-sdk 0.46 */ - addressBytesToString = async ( - request: AddressBytesToStringRequest - ): Promise => { - const data = AddressBytesToStringRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "AddressBytesToString", - data - ); - return promise.then((data) => - AddressBytesToStringResponse.decode(new BinaryReader(data)) - ); - }; - /* AddressStringToBytes converts Address string to bytes - - Since: cosmos-sdk 0.46 */ - addressStringToBytes = async ( - request: AddressStringToBytesRequest - ): Promise => { - const data = AddressStringToBytesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "AddressStringToBytes", - data - ); - return promise.then((data) => - AddressStringToBytesResponse.decode(new BinaryReader(data)) - ); - }; - /* AccountInfo queries account info which is common to all account types. - - Since: cosmos-sdk 0.47 */ - accountInfo = async ( - request: QueryAccountInfoRequest - ): Promise => { - const data = QueryAccountInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.auth.v1beta1.Query", - "AccountInfo", - data - ); - return promise.then((data) => - QueryAccountInfoResponse.decode(new BinaryReader(data)) - ); - }; -} -export const createClientImpl = (rpc: TxRpc) => { - return new QueryClientImpl(rpc); -}; diff --git a/networks/cosmos/codegen/cosmos/auth/v1beta1/query.ts b/networks/cosmos/codegen/cosmos/auth/v1beta1/query.ts deleted file mode 100644 index 2f5d6337..00000000 --- a/networks/cosmos/codegen/cosmos/auth/v1beta1/query.ts +++ /dev/null @@ -1,887 +0,0 @@ -import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { Any } from "../../../google/protobuf/any"; -import { Params, BaseAccount } from "./auth"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** - * QueryAccountsRequest is the request type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsRequest { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest; -} -/** - * QueryAccountsResponse is the response type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsResponse { - /** accounts are the existing accounts */ - accounts: Any[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse; -} -/** QueryAccountRequest is the request type for the Query/Account RPC method. */ -export interface QueryAccountRequest { - /** address defines the address to query for. */ - address: string; -} -/** QueryAccountResponse is the response type for the Query/Account RPC method. */ -export interface QueryAccountResponse { - /** account defines the account of the corresponding address. */ - account?: Any; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params; -} -/** - * QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryModuleAccountsRequest {} -/** - * QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryModuleAccountsResponse { - accounts: Any[]; -} -/** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */ -export interface QueryModuleAccountByNameRequest { - name: string; -} -/** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */ -export interface QueryModuleAccountByNameResponse { - account?: Any; -} -/** - * Bech32PrefixRequest is the request type for Bech32Prefix rpc method. - * - * Since: cosmos-sdk 0.46 - */ -export interface Bech32PrefixRequest {} -/** - * Bech32PrefixResponse is the response type for Bech32Prefix rpc method. - * - * Since: cosmos-sdk 0.46 - */ -export interface Bech32PrefixResponse { - bech32Prefix: string; -} -/** - * AddressBytesToStringRequest is the request type for AddressString rpc method. - * - * Since: cosmos-sdk 0.46 - */ -export interface AddressBytesToStringRequest { - addressBytes: Uint8Array; -} -/** - * AddressBytesToStringResponse is the response type for AddressString rpc method. - * - * Since: cosmos-sdk 0.46 - */ -export interface AddressBytesToStringResponse { - addressString: string; -} -/** - * AddressStringToBytesRequest is the request type for AccountBytes rpc method. - * - * Since: cosmos-sdk 0.46 - */ -export interface AddressStringToBytesRequest { - addressString: string; -} -/** - * AddressStringToBytesResponse is the response type for AddressBytes rpc method. - * - * Since: cosmos-sdk 0.46 - */ -export interface AddressStringToBytesResponse { - addressBytes: Uint8Array; -} -/** - * QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method - * - * Since: cosmos-sdk 0.46.2 - */ -export interface QueryAccountAddressByIDRequest { - /** - * Deprecated, use account_id instead - * - * id is the account number of the address to be queried. This field - * should have been an uint64 (like all account numbers), and will be - * updated to uint64 in a future version of the auth query. - */ - /** @deprecated */ - id: bigint; - /** - * account_id is the account number of the address to be queried. - * - * Since: cosmos-sdk 0.47 - */ - accountId: bigint; -} -/** - * QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method - * - * Since: cosmos-sdk 0.46.2 - */ -export interface QueryAccountAddressByIDResponse { - accountAddress: string; -} -/** - * QueryAccountInfoRequest is the Query/AccountInfo request type. - * - * Since: cosmos-sdk 0.47 - */ -export interface QueryAccountInfoRequest { - /** address is the account address string. */ - address: string; -} -/** - * QueryAccountInfoResponse is the Query/AccountInfo response type. - * - * Since: cosmos-sdk 0.47 - */ -export interface QueryAccountInfoResponse { - /** info is the account info which is represented by BaseAccount. */ - info?: BaseAccount; -} -function createBaseQueryAccountsRequest(): QueryAccountsRequest { - return { - pagination: undefined - }; -} -export const QueryAccountsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", - aminoType: "cosmos-sdk/QueryAccountsRequest", - encode(message: QueryAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountsRequest { - const message = createBaseQueryAccountsRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - } -}; -function createBaseQueryAccountsResponse(): QueryAccountsResponse { - return { - accounts: [], - pagination: undefined - }; -} -export const QueryAccountsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", - aminoType: "cosmos-sdk/QueryAccountsResponse", - encode(message: QueryAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.accounts) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accounts.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountsResponse { - const message = createBaseQueryAccountsResponse(); - message.accounts = object.accounts?.map(e => Any.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - } -}; -function createBaseQueryAccountRequest(): QueryAccountRequest { - return { - address: "" - }; -} -export const QueryAccountRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", - aminoType: "cosmos-sdk/QueryAccountRequest", - encode(message: QueryAccountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountRequest { - const message = createBaseQueryAccountRequest(); - message.address = object.address ?? ""; - return message; - } -}; -function createBaseQueryAccountResponse(): QueryAccountResponse { - return { - account: undefined - }; -} -export const QueryAccountResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", - aminoType: "cosmos-sdk/QueryAccountResponse", - encode(message: QueryAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.account !== undefined) { - Any.encode(message.account, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountResponse { - const message = createBaseQueryAccountResponse(); - message.account = object.account !== undefined && object.account !== null ? Any.fromPartial(object.account) : undefined; - return message; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - } -}; -function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest { - return {}; -} -export const QueryModuleAccountsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", - aminoType: "cosmos-sdk/QueryModuleAccountsRequest", - encode(_: QueryModuleAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(_: DeepPartial): QueryModuleAccountsRequest { - const message = createBaseQueryModuleAccountsRequest(); - return message; - } -}; -function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse { - return { - accounts: [] - }; -} -export const QueryModuleAccountsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", - aminoType: "cosmos-sdk/QueryModuleAccountsResponse", - encode(message: QueryModuleAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.accounts) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accounts.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryModuleAccountsResponse { - const message = createBaseQueryModuleAccountsResponse(); - message.accounts = object.accounts?.map(e => Any.fromPartial(e)) || []; - return message; - } -}; -function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRequest { - return { - name: "" - }; -} -export const QueryModuleAccountByNameRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", - aminoType: "cosmos-sdk/QueryModuleAccountByNameRequest", - encode(message: QueryModuleAccountByNameRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountByNameRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountByNameRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryModuleAccountByNameRequest { - const message = createBaseQueryModuleAccountByNameRequest(); - message.name = object.name ?? ""; - return message; - } -}; -function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameResponse { - return { - account: undefined - }; -} -export const QueryModuleAccountByNameResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", - aminoType: "cosmos-sdk/QueryModuleAccountByNameResponse", - encode(message: QueryModuleAccountByNameResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.account !== undefined) { - Any.encode(message.account, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountByNameResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountByNameResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryModuleAccountByNameResponse { - const message = createBaseQueryModuleAccountByNameResponse(); - message.account = object.account !== undefined && object.account !== null ? Any.fromPartial(object.account) : undefined; - return message; - } -}; -function createBaseBech32PrefixRequest(): Bech32PrefixRequest { - return {}; -} -export const Bech32PrefixRequest = { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", - aminoType: "cosmos-sdk/Bech32PrefixRequest", - encode(_: Bech32PrefixRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Bech32PrefixRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBech32PrefixRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(_: DeepPartial): Bech32PrefixRequest { - const message = createBaseBech32PrefixRequest(); - return message; - } -}; -function createBaseBech32PrefixResponse(): Bech32PrefixResponse { - return { - bech32Prefix: "" - }; -} -export const Bech32PrefixResponse = { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", - aminoType: "cosmos-sdk/Bech32PrefixResponse", - encode(message: Bech32PrefixResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bech32Prefix !== "") { - writer.uint32(10).string(message.bech32Prefix); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Bech32PrefixResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBech32PrefixResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bech32Prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Bech32PrefixResponse { - const message = createBaseBech32PrefixResponse(); - message.bech32Prefix = object.bech32Prefix ?? ""; - return message; - } -}; -function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest { - return { - addressBytes: new Uint8Array() - }; -} -export const AddressBytesToStringRequest = { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", - aminoType: "cosmos-sdk/AddressBytesToStringRequest", - encode(message: AddressBytesToStringRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressBytes.length !== 0) { - writer.uint32(10).bytes(message.addressBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressBytesToStringRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressBytesToStringRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): AddressBytesToStringRequest { - const message = createBaseAddressBytesToStringRequest(); - message.addressBytes = object.addressBytes ?? new Uint8Array(); - return message; - } -}; -function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse { - return { - addressString: "" - }; -} -export const AddressBytesToStringResponse = { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", - aminoType: "cosmos-sdk/AddressBytesToStringResponse", - encode(message: AddressBytesToStringResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressString !== "") { - writer.uint32(10).string(message.addressString); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressBytesToStringResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressBytesToStringResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressString = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): AddressBytesToStringResponse { - const message = createBaseAddressBytesToStringResponse(); - message.addressString = object.addressString ?? ""; - return message; - } -}; -function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest { - return { - addressString: "" - }; -} -export const AddressStringToBytesRequest = { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", - aminoType: "cosmos-sdk/AddressStringToBytesRequest", - encode(message: AddressStringToBytesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressString !== "") { - writer.uint32(10).string(message.addressString); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressStringToBytesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressStringToBytesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressString = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): AddressStringToBytesRequest { - const message = createBaseAddressStringToBytesRequest(); - message.addressString = object.addressString ?? ""; - return message; - } -}; -function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse { - return { - addressBytes: new Uint8Array() - }; -} -export const AddressStringToBytesResponse = { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", - aminoType: "cosmos-sdk/AddressStringToBytesResponse", - encode(message: AddressStringToBytesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressBytes.length !== 0) { - writer.uint32(10).bytes(message.addressBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressStringToBytesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressStringToBytesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): AddressStringToBytesResponse { - const message = createBaseAddressStringToBytesResponse(); - message.addressBytes = object.addressBytes ?? new Uint8Array(); - return message; - } -}; -function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequest { - return { - id: BigInt(0), - accountId: BigInt(0) - }; -} -export const QueryAccountAddressByIDRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", - aminoType: "cosmos-sdk/QueryAccountAddressByIDRequest", - encode(message: QueryAccountAddressByIDRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== BigInt(0)) { - writer.uint32(8).int64(message.id); - } - if (message.accountId !== BigInt(0)) { - writer.uint32(16).uint64(message.accountId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountAddressByIDRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountAddressByIDRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.int64(); - break; - case 2: - message.accountId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountAddressByIDRequest { - const message = createBaseQueryAccountAddressByIDRequest(); - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.accountId = object.accountId !== undefined && object.accountId !== null ? BigInt(object.accountId.toString()) : BigInt(0); - return message; - } -}; -function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDResponse { - return { - accountAddress: "" - }; -} -export const QueryAccountAddressByIDResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", - aminoType: "cosmos-sdk/QueryAccountAddressByIDResponse", - encode(message: QueryAccountAddressByIDResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.accountAddress !== "") { - writer.uint32(10).string(message.accountAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountAddressByIDResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountAddressByIDResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accountAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountAddressByIDResponse { - const message = createBaseQueryAccountAddressByIDResponse(); - message.accountAddress = object.accountAddress ?? ""; - return message; - } -}; -function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest { - return { - address: "" - }; -} -export const QueryAccountInfoRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest", - aminoType: "cosmos-sdk/QueryAccountInfoRequest", - encode(message: QueryAccountInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountInfoRequest { - const message = createBaseQueryAccountInfoRequest(); - message.address = object.address ?? ""; - return message; - } -}; -function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse { - return { - info: undefined - }; -} -export const QueryAccountInfoResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse", - aminoType: "cosmos-sdk/QueryAccountInfoResponse", - encode(message: QueryAccountInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.info !== undefined) { - BaseAccount.encode(message.info, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info = BaseAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): QueryAccountInfoResponse { - const message = createBaseQueryAccountInfoResponse(); - message.info = object.info !== undefined && object.info !== null ? BaseAccount.fromPartial(object.info) : undefined; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/base/abci/v1beta1/abci.ts b/networks/cosmos/codegen/cosmos/base/abci/v1beta1/abci.ts deleted file mode 100644 index fa6cc5e7..00000000 --- a/networks/cosmos/codegen/cosmos/base/abci/v1beta1/abci.ts +++ /dev/null @@ -1,748 +0,0 @@ -import { Any } from "../../../../google/protobuf/any"; -import { Event } from "../../../../tendermint/abci/types"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponse { - /** The block height */ - height: bigint; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - rawLog: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLog[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gasWanted: bigint; - /** Amount of gas consumed by transaction. */ - gasUsed: bigint; - /** The request transaction bytes. */ - tx?: Any; - /** - * 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. - */ - timestamp: string; - /** - * 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. 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 - */ - events: Event[]; -} -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLog { - msgIndex: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEvent[]; -} -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEvent { - type: string; - attributes: Attribute[]; -} -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface Attribute { - key: string; - value: string; -} -/** GasInfo defines tx execution gas context. */ -export interface GasInfo { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gasWanted: bigint; - /** GasUsed is the amount of gas actually consumed. */ - gasUsed: bigint; -} -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - * Deprecated. This field is still populated, but prefer msg_response instead - * because it also contains the Msg response typeURL. - */ - /** @deprecated */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: Event[]; - /** - * msg_responses contains the Msg handler responses type packed in Anys. - * - * Since: cosmos-sdk 0.46 - */ - msgResponses: Any[]; -} -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponse { - gasInfo: GasInfo; - result?: Result; -} -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -/** @deprecated */ -export interface MsgData { - msgType: string; - data: Uint8Array; -} -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgData { - /** data field is deprecated and not populated. */ - /** @deprecated */ - data: MsgData[]; - /** - * msg_responses contains the Msg handler responses packed into Anys. - * - * Since: cosmos-sdk 0.46 - */ - msgResponses: Any[]; -} -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResult { - /** Count of all txs */ - totalCount: bigint; - /** Count of txs in current page */ - count: bigint; - /** Index of current page, start from 1 */ - pageNumber: bigint; - /** Count of total pages */ - pageTotal: bigint; - /** Max count txs per page */ - limit: bigint; - /** List of txs in current page */ - txs: TxResponse[]; -} -function createBaseTxResponse(): TxResponse { - return { - height: BigInt(0), - txhash: "", - codespace: "", - code: 0, - data: "", - rawLog: "", - logs: [], - info: "", - gasWanted: BigInt(0), - gasUsed: BigInt(0), - tx: undefined, - timestamp: "", - events: [] - }; -} -export const TxResponse = { - typeUrl: "/cosmos.base.abci.v1beta1.TxResponse", - aminoType: "cosmos-sdk/TxResponse", - encode(message: TxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.txhash !== "") { - writer.uint32(18).string(message.txhash); - } - if (message.codespace !== "") { - writer.uint32(26).string(message.codespace); - } - if (message.code !== 0) { - writer.uint32(32).uint32(message.code); - } - if (message.data !== "") { - writer.uint32(42).string(message.data); - } - if (message.rawLog !== "") { - writer.uint32(50).string(message.rawLog); - } - for (const v of message.logs) { - ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.info !== "") { - writer.uint32(66).string(message.info); - } - if (message.gasWanted !== BigInt(0)) { - writer.uint32(72).int64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(80).int64(message.gasUsed); - } - if (message.tx !== undefined) { - Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); - } - if (message.timestamp !== "") { - writer.uint32(98).string(message.timestamp); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(106).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.rawLog = reader.string(); - break; - case 7: - message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gasWanted = reader.int64(); - break; - case 10: - message.gasUsed = reader.int64(); - break; - case 11: - message.tx = Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - case 13: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxResponse { - const message = createBaseTxResponse(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.txhash = object.txhash ?? ""; - message.codespace = object.codespace ?? ""; - message.code = object.code ?? 0; - message.data = object.data ?? ""; - message.rawLog = object.rawLog ?? ""; - message.logs = object.logs?.map(e => ABCIMessageLog.fromPartial(e)) || []; - message.info = object.info ?? ""; - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - message.tx = object.tx !== undefined && object.tx !== null ? Any.fromPartial(object.tx) : undefined; - message.timestamp = object.timestamp ?? ""; - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - return message; - } -}; -function createBaseABCIMessageLog(): ABCIMessageLog { - return { - msgIndex: 0, - log: "", - events: [] - }; -} -export const ABCIMessageLog = { - typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog", - aminoType: "cosmos-sdk/ABCIMessageLog", - encode(message: ABCIMessageLog, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msgIndex !== 0) { - writer.uint32(8).uint32(message.msgIndex); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - StringEvent.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ABCIMessageLog { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseABCIMessageLog(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgIndex = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ABCIMessageLog { - const message = createBaseABCIMessageLog(); - message.msgIndex = object.msgIndex ?? 0; - message.log = object.log ?? ""; - message.events = object.events?.map(e => StringEvent.fromPartial(e)) || []; - return message; - } -}; -function createBaseStringEvent(): StringEvent { - return { - type: "", - attributes: [] - }; -} -export const StringEvent = { - typeUrl: "/cosmos.base.abci.v1beta1.StringEvent", - aminoType: "cosmos-sdk/StringEvent", - encode(message: StringEvent, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - Attribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): StringEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStringEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): StringEvent { - const message = createBaseStringEvent(); - message.type = object.type ?? ""; - message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; - return message; - } -}; -function createBaseAttribute(): Attribute { - return { - key: "", - value: "" - }; -} -export const Attribute = { - typeUrl: "/cosmos.base.abci.v1beta1.Attribute", - aminoType: "cosmos-sdk/Attribute", - encode(message: Attribute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Attribute { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAttribute(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): Attribute { - const message = createBaseAttribute(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - } -}; -function createBaseGasInfo(): GasInfo { - return { - gasWanted: BigInt(0), - gasUsed: BigInt(0) - }; -} -export const GasInfo = { - typeUrl: "/cosmos.base.abci.v1beta1.GasInfo", - aminoType: "cosmos-sdk/GasInfo", - encode(message: GasInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gasWanted !== BigInt(0)) { - writer.uint32(8).uint64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(16).uint64(message.gasUsed); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GasInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGasInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasWanted = reader.uint64(); - break; - case 2: - message.gasUsed = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): GasInfo { - const message = createBaseGasInfo(); - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - return message; - } -}; -function createBaseResult(): Result { - return { - data: new Uint8Array(), - log: "", - events: [], - msgResponses: [] - }; -} -export const Result = { - typeUrl: "/cosmos.base.abci.v1beta1.Result", - aminoType: "cosmos-sdk/Result", - encode(message: Result, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.msgResponses) { - Any.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Result { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 4: - message.msgResponses.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Result { - const message = createBaseResult(); - message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.msgResponses = object.msgResponses?.map(e => Any.fromPartial(e)) || []; - return message; - } -}; -function createBaseSimulationResponse(): SimulationResponse { - return { - gasInfo: GasInfo.fromPartial({}), - result: undefined - }; -} -export const SimulationResponse = { - typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse", - aminoType: "cosmos-sdk/SimulationResponse", - encode(message: SimulationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimulationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimulationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SimulationResponse { - const message = createBaseSimulationResponse(); - message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null ? GasInfo.fromPartial(object.gasInfo) : undefined; - message.result = object.result !== undefined && object.result !== null ? Result.fromPartial(object.result) : undefined; - return message; - } -}; -function createBaseMsgData(): MsgData { - return { - msgType: "", - data: new Uint8Array() - }; -} -export const MsgData = { - typeUrl: "/cosmos.base.abci.v1beta1.MsgData", - aminoType: "cosmos-sdk/MsgData", - encode(message: MsgData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msgType !== "") { - writer.uint32(10).string(message.msgType); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): MsgData { - const message = createBaseMsgData(); - message.msgType = object.msgType ?? ""; - message.data = object.data ?? new Uint8Array(); - return message; - } -}; -function createBaseTxMsgData(): TxMsgData { - return { - data: [], - msgResponses: [] - }; -} -export const TxMsgData = { - typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData", - aminoType: "cosmos-sdk/TxMsgData", - encode(message: TxMsgData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.data) { - MsgData.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.msgResponses) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxMsgData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxMsgData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(MsgData.decode(reader, reader.uint32())); - break; - case 2: - message.msgResponses.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxMsgData { - const message = createBaseTxMsgData(); - message.data = object.data?.map(e => MsgData.fromPartial(e)) || []; - message.msgResponses = object.msgResponses?.map(e => Any.fromPartial(e)) || []; - return message; - } -}; -function createBaseSearchTxsResult(): SearchTxsResult { - return { - totalCount: BigInt(0), - count: BigInt(0), - pageNumber: BigInt(0), - pageTotal: BigInt(0), - limit: BigInt(0), - txs: [] - }; -} -export const SearchTxsResult = { - typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult", - aminoType: "cosmos-sdk/SearchTxsResult", - encode(message: SearchTxsResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.totalCount !== BigInt(0)) { - writer.uint32(8).uint64(message.totalCount); - } - if (message.count !== BigInt(0)) { - writer.uint32(16).uint64(message.count); - } - if (message.pageNumber !== BigInt(0)) { - writer.uint32(24).uint64(message.pageNumber); - } - if (message.pageTotal !== BigInt(0)) { - writer.uint32(32).uint64(message.pageTotal); - } - if (message.limit !== BigInt(0)) { - writer.uint32(40).uint64(message.limit); - } - for (const v of message.txs) { - TxResponse.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SearchTxsResult { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchTxsResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalCount = reader.uint64(); - break; - case 2: - message.count = reader.uint64(); - break; - case 3: - message.pageNumber = reader.uint64(); - break; - case 4: - message.pageTotal = reader.uint64(); - break; - case 5: - message.limit = reader.uint64(); - break; - case 6: - message.txs.push(TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SearchTxsResult { - const message = createBaseSearchTxsResult(); - message.totalCount = object.totalCount !== undefined && object.totalCount !== null ? BigInt(object.totalCount.toString()) : BigInt(0); - message.count = object.count !== undefined && object.count !== null ? BigInt(object.count.toString()) : BigInt(0); - message.pageNumber = object.pageNumber !== undefined && object.pageNumber !== null ? BigInt(object.pageNumber.toString()) : BigInt(0); - message.pageTotal = object.pageTotal !== undefined && object.pageTotal !== null ? BigInt(object.pageTotal.toString()) : BigInt(0); - message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); - message.txs = object.txs?.map(e => TxResponse.fromPartial(e)) || []; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/base/query/v1beta1/pagination.ts b/networks/cosmos/codegen/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 13ebd44a..00000000 --- a/networks/cosmos/codegen/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface 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. - */ - key: Uint8Array; - /** - * 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. - */ - offset: bigint; - /** - * 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. - */ - limit: bigint; - /** - * 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. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -/** - * 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; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently. It will be empty if - * there are no more results. - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: bigint; -} -function createBasePageRequest(): PageRequest { - return { - key: new Uint8Array(), - offset: BigInt(0), - limit: BigInt(0), - countTotal: false, - reverse: false - }; -} -export const PageRequest = { - typeUrl: "/cosmos.base.query.v1beta1.PageRequest", - aminoType: "cosmos-sdk/PageRequest", - encode(message: PageRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== BigInt(0)) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== BigInt(0)) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePageRequest(); - while (reader.pos < end) { - const 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.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): PageRequest { - const message = createBasePageRequest(); - message.key = object.key ?? new Uint8Array(); - message.offset = object.offset !== undefined && object.offset !== null ? BigInt(object.offset.toString()) : BigInt(0); - message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); - message.countTotal = object.countTotal ?? false; - message.reverse = object.reverse ?? false; - return message; - } -}; -function createBasePageResponse(): PageResponse { - return { - nextKey: new Uint8Array(), - total: BigInt(0) - }; -} -export const PageResponse = { - typeUrl: "/cosmos.base.query.v1beta1.PageResponse", - aminoType: "cosmos-sdk/PageResponse", - encode(message: PageResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== BigInt(0)) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePageResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): PageResponse { - const message = createBasePageResponse(); - message.nextKey = object.nextKey ?? new Uint8Array(); - message.total = object.total !== undefined && object.total !== null ? BigInt(object.total.toString()) : BigInt(0); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/base/v1beta1/coin.ts b/networks/cosmos/codegen/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index 328ba89c..00000000 --- a/networks/cosmos/codegen/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** - * 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. - */ -export interface Coin { - denom: string; - amount: string; -} -/** - * 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. - */ -export interface DecCoin { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -function createBaseCoin(): Coin { - return { - denom: "", - amount: "" - }; -} -export const Coin = { - typeUrl: "/cosmos.base.v1beta1.Coin", - aminoType: "cosmos-sdk/Coin", - encode(message: Coin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Coin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCoin(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): Coin { - const message = createBaseCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; - return message; - } -}; -function createBaseDecCoin(): DecCoin { - return { - denom: "", - amount: "" - }; -} -export const DecCoin = { - typeUrl: "/cosmos.base.v1beta1.DecCoin", - aminoType: "cosmos-sdk/DecCoin", - encode(message: DecCoin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecCoin(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): DecCoin { - const message = createBaseDecCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; - return message; - } -}; -function createBaseIntProto(): IntProto { - return { - int: "" - }; -} -export const IntProto = { - typeUrl: "/cosmos.base.v1beta1.IntProto", - aminoType: "cosmos-sdk/IntProto", - encode(message: IntProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): IntProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIntProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): IntProto { - const message = createBaseIntProto(); - message.int = object.int ?? ""; - return message; - } -}; -function createBaseDecProto(): DecProto { - return { - dec: "" - }; -} -export const DecProto = { - typeUrl: "/cosmos.base.v1beta1.DecProto", - aminoType: "cosmos-sdk/DecProto", - encode(message: DecProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DecProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): DecProto { - const message = createBaseDecProto(); - message.dec = object.dec ?? ""; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts b/networks/cosmos/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts deleted file mode 100644 index 98ec109c..00000000 --- a/networks/cosmos/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; -/** - * 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. - */ -export interface MultiSignature { - signatures: Uint8Array[]; -} -/** - * 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. - */ -export interface CompactBitArray { - extraBitsStored: number; - elems: Uint8Array; -} -function createBaseMultiSignature(): MultiSignature { - return { - signatures: [] - }; -} -export const MultiSignature = { - typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature", - aminoType: "cosmos-sdk/MultiSignature", - encode(message: MultiSignature, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.signatures) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MultiSignature { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMultiSignature(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): MultiSignature { - const message = createBaseMultiSignature(); - message.signatures = object.signatures?.map(e => e) || []; - return message; - } -}; -function createBaseCompactBitArray(): CompactBitArray { - return { - extraBitsStored: 0, - elems: new Uint8Array() - }; -} -export const CompactBitArray = { - typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray", - aminoType: "cosmos-sdk/CompactBitArray", - encode(message: CompactBitArray, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.extraBitsStored !== 0) { - writer.uint32(8).uint32(message.extraBitsStored); - } - if (message.elems.length !== 0) { - writer.uint32(18).bytes(message.elems); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CompactBitArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCompactBitArray(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.extraBitsStored = reader.uint32(); - break; - case 2: - message.elems = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): CompactBitArray { - const message = createBaseCompactBitArray(); - message.extraBitsStored = object.extraBitsStored ?? 0; - message.elems = object.elems ?? new Uint8Array(); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/crypto/secp256k1/keys.ts b/networks/cosmos/codegen/cosmos/crypto/secp256k1/keys.ts deleted file mode 100644 index 05adc655..00000000 --- a/networks/cosmos/codegen/cosmos/crypto/secp256k1/keys.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** - * 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. - */ -export interface PubKey { - key: Uint8Array; -} -/** PrivKey defines a secp256k1 private key. */ -export interface PrivKey { - key: Uint8Array; -} -function createBasePubKey(): PubKey { - return { - key: new Uint8Array() - }; -} -export const PubKey = { - typeUrl: "/cosmos.crypto.secp256k1.PubKey", - aminoType: "tendermint/PubKeySecp256k1", - encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PubKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePubKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): PubKey { - const message = createBasePubKey(); - message.key = object.key ?? new Uint8Array(); - return message; - } -}; -function createBasePrivKey(): PrivKey { - return { - key: new Uint8Array() - }; -} -export const PrivKey = { - typeUrl: "/cosmos.crypto.secp256k1.PrivKey", - aminoType: "tendermint/PrivKeySecp256k1", - encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PrivKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePrivKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): PrivKey { - const message = createBasePrivKey(); - message.key = object.key ?? new Uint8Array(); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/tx/signing/v1beta1/signing.ts b/networks/cosmos/codegen/cosmos/tx/signing/v1beta1/signing.ts deleted file mode 100644 index 8a2ac520..00000000 --- a/networks/cosmos/codegen/cosmos/tx/signing/v1beta1/signing.ts +++ /dev/null @@ -1,460 +0,0 @@ -import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; -import { Any } from "../../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; -/** - * SignMode represents a signing mode with its own security guarantees. - * - * This enum should be considered a registry of all known sign modes - * in the Cosmos ecosystem. Apps are not expected to support all known - * sign modes. Apps that would like to support custom sign modes are - * encouraged to open a small PR against this file to add a new case - * to this SignMode enum describing their sign mode so that different - * apps have a consistent version of this enum. - */ -export enum SignMode { - /** - * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - * rejected. - */ - SIGN_MODE_UNSPECIFIED = 0, - /** - * SIGN_MODE_DIRECT - 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 - 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. It is currently not supported. - */ - SIGN_MODE_TEXTUAL = 2, - /** - * SIGN_MODE_DIRECT_AUX - SIGN_MODE_DIRECT_AUX specifies a signing mode which uses - * SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - * require signers signing over other signers' `signer_info`. It also allows - * for adding Tips in transactions. - * - * Since: cosmos-sdk 0.46 - */ - SIGN_MODE_DIRECT_AUX = 3, - /** - * SIGN_MODE_LEGACY_AMINO_JSON - 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 - 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, - UNRECOGNIZED = -1, -} -export function signModeFromJSON(object: any): SignMode { - switch (object) { - case 0: - case "SIGN_MODE_UNSPECIFIED": - return SignMode.SIGN_MODE_UNSPECIFIED; - case 1: - case "SIGN_MODE_DIRECT": - return SignMode.SIGN_MODE_DIRECT; - case 2: - case "SIGN_MODE_TEXTUAL": - return SignMode.SIGN_MODE_TEXTUAL; - case 3: - case "SIGN_MODE_DIRECT_AUX": - return SignMode.SIGN_MODE_DIRECT_AUX; - case 127: - case "SIGN_MODE_LEGACY_AMINO_JSON": - return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; - case 191: - case "SIGN_MODE_EIP_191": - return SignMode.SIGN_MODE_EIP_191; - case -1: - case "UNRECOGNIZED": - default: - return SignMode.UNRECOGNIZED; - } -} -export function signModeToJSON(object: SignMode): string { - switch (object) { - case SignMode.SIGN_MODE_UNSPECIFIED: - return "SIGN_MODE_UNSPECIFIED"; - case SignMode.SIGN_MODE_DIRECT: - return "SIGN_MODE_DIRECT"; - case SignMode.SIGN_MODE_TEXTUAL: - return "SIGN_MODE_TEXTUAL"; - case SignMode.SIGN_MODE_DIRECT_AUX: - return "SIGN_MODE_DIRECT_AUX"; - case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: - return "SIGN_MODE_LEGACY_AMINO_JSON"; - case SignMode.SIGN_MODE_EIP_191: - return "SIGN_MODE_EIP_191"; - case SignMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** SignatureDescriptors wraps multiple SignatureDescriptor's. */ -export interface SignatureDescriptors { - /** signatures are the signature descriptors */ - signatures: SignatureDescriptor[]; -} -/** - * 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. - */ -export interface SignatureDescriptor { - /** public_key is the public key of the signer */ - publicKey?: Any; - data?: SignatureDescriptor_Data; - /** - * 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. - */ - sequence: bigint; -} -/** Data represents signature data */ -export interface SignatureDescriptor_Data { - /** single represents a single signer */ - single?: SignatureDescriptor_Data_Single; - /** multi represents a multisig signer */ - multi?: SignatureDescriptor_Data_Multi; -} -/** Single is the signature data for a single signer */ -export interface SignatureDescriptor_Data_Single { - /** mode is the signing mode of the single signer */ - mode: SignMode; - /** signature is the raw signature bytes */ - signature: Uint8Array; -} -/** Multi is the signature data for a multisig public key */ -export interface SignatureDescriptor_Data_Multi { - /** bitarray specifies which keys within the multisig are signing */ - bitarray?: CompactBitArray; - /** signatures is the signatures of the multi-signature */ - signatures: SignatureDescriptor_Data[]; -} -function createBaseSignatureDescriptors(): SignatureDescriptors { - return { - signatures: [], - }; -} -export const SignatureDescriptors = { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors", - aminoType: "cosmos-sdk/SignatureDescriptors", - encode( - message: SignatureDescriptors, - writer: BinaryWriter = BinaryWriter.create() - ): BinaryWriter { - for (const v of message.signatures) { - SignatureDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode( - input: BinaryReader | Uint8Array, - length?: number - ): SignatureDescriptors { - const reader = - input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptors(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatures.push( - SignatureDescriptor.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SignatureDescriptors { - const message = createBaseSignatureDescriptors(); - message.signatures = - object.signatures?.map((e) => SignatureDescriptor.fromPartial(e)) || []; - return message; - }, -}; -function createBaseSignatureDescriptor(): SignatureDescriptor { - return { - publicKey: undefined, - data: undefined, - sequence: BigInt(0), - }; -} -export const SignatureDescriptor = { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor", - aminoType: "cosmos-sdk/SignatureDescriptor", - encode( - message: SignatureDescriptor, - writer: BinaryWriter = BinaryWriter.create() - ): BinaryWriter { - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); - } - if (message.data !== undefined) { - SignatureDescriptor_Data.encode( - message.data, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode( - input: BinaryReader | Uint8Array, - length?: number - ): SignatureDescriptor { - const reader = - input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.data = SignatureDescriptor_Data.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SignatureDescriptor { - const message = createBaseSignatureDescriptor(); - message.publicKey = - object.publicKey !== undefined && object.publicKey !== null - ? Any.fromPartial(object.publicKey) - : undefined; - message.data = - object.data !== undefined && object.data !== null - ? SignatureDescriptor_Data.fromPartial(object.data) - : undefined; - message.sequence = - object.sequence !== undefined && object.sequence !== null - ? BigInt(object.sequence.toString()) - : BigInt(0); - return message; - }, -}; -function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { - return { - single: undefined, - multi: undefined, - }; -} -export const SignatureDescriptor_Data = { - typeUrl: "/cosmos.tx.signing.v1beta1.Data", - aminoType: "cosmos-sdk/Data", - encode( - message: SignatureDescriptor_Data, - writer: BinaryWriter = BinaryWriter.create() - ): BinaryWriter { - if (message.single !== undefined) { - SignatureDescriptor_Data_Single.encode( - message.single, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.multi !== undefined) { - SignatureDescriptor_Data_Multi.encode( - message.multi, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - decode( - input: BinaryReader | Uint8Array, - length?: number - ): SignatureDescriptor_Data { - const reader = - input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor_Data(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.single = SignatureDescriptor_Data_Single.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.multi = SignatureDescriptor_Data_Multi.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial( - object: DeepPartial - ): SignatureDescriptor_Data { - const message = createBaseSignatureDescriptor_Data(); - message.single = - object.single !== undefined && object.single !== null - ? SignatureDescriptor_Data_Single.fromPartial(object.single) - : undefined; - message.multi = - object.multi !== undefined && object.multi !== null - ? SignatureDescriptor_Data_Multi.fromPartial(object.multi) - : undefined; - return message; - }, -}; -function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { - return { - mode: 0, - signature: new Uint8Array(), - }; -} -export const SignatureDescriptor_Data_Single = { - typeUrl: "/cosmos.tx.signing.v1beta1.Single", - aminoType: "cosmos-sdk/Single", - encode( - message: SignatureDescriptor_Data_Single, - writer: BinaryWriter = BinaryWriter.create() - ): BinaryWriter { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode); - } - if (message.signature.length !== 0) { - writer.uint32(18).bytes(message.signature); - } - return writer; - }, - decode( - input: BinaryReader | Uint8Array, - length?: number - ): SignatureDescriptor_Data_Single { - const reader = - input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor_Data_Single(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = reader.int32() as any; - break; - case 2: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial( - object: DeepPartial - ): SignatureDescriptor_Data_Single { - const message = createBaseSignatureDescriptor_Data_Single(); - message.mode = object.mode ?? 0; - message.signature = object.signature ?? new Uint8Array(); - return message; - }, -}; -function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { - return { - bitarray: undefined, - signatures: [], - }; -} -export const SignatureDescriptor_Data_Multi = { - typeUrl: "/cosmos.tx.signing.v1beta1.Multi", - aminoType: "cosmos-sdk/Multi", - encode( - message: SignatureDescriptor_Data_Multi, - writer: BinaryWriter = BinaryWriter.create() - ): BinaryWriter { - if (message.bitarray !== undefined) { - CompactBitArray.encode( - message.bitarray, - writer.uint32(10).fork() - ).ldelim(); - } - for (const v of message.signatures) { - SignatureDescriptor_Data.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode( - input: BinaryReader | Uint8Array, - length?: number - ): SignatureDescriptor_Data_Multi { - const reader = - input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor_Data_Multi(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bitarray = CompactBitArray.decode(reader, reader.uint32()); - break; - case 2: - message.signatures.push( - SignatureDescriptor_Data.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial( - object: DeepPartial - ): SignatureDescriptor_Data_Multi { - const message = createBaseSignatureDescriptor_Data_Multi(); - message.bitarray = - object.bitarray !== undefined && object.bitarray !== null - ? CompactBitArray.fromPartial(object.bitarray) - : undefined; - message.signatures = - object.signatures?.map((e) => SignatureDescriptor_Data.fromPartial(e)) || - []; - return message; - }, -}; diff --git a/networks/cosmos/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts b/networks/cosmos/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts deleted file mode 100644 index 3e6a3a84..00000000 --- a/networks/cosmos/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts +++ /dev/null @@ -1,207 +0,0 @@ -import { TxRpc } from "@interchainjs/types"; -import { BinaryReader } from "../../../binary"; -import { - SimulateRequest, - SimulateResponse, - GetTxRequest, - GetTxResponse, - BroadcastTxRequest, - BroadcastTxResponse, - GetTxsEventRequest, - GetTxsEventResponse, - GetBlockWithTxsRequest, - GetBlockWithTxsResponse, - TxDecodeRequest, - TxDecodeResponse, - TxEncodeRequest, - TxEncodeResponse, - TxEncodeAminoRequest, - TxEncodeAminoResponse, - TxDecodeAminoRequest, - TxDecodeAminoResponse, -} from "./service"; -/** Service defines a gRPC service for interacting with transactions. */ -export interface Service { - /** Simulate simulates executing a transaction for estimating gas usage. */ - simulate(request: SimulateRequest): Promise; - /** GetTx fetches a tx by hash. */ - getTx(request: GetTxRequest): Promise; - /** BroadcastTx broadcast transaction. */ - broadcastTx(request: BroadcastTxRequest): Promise; - /** GetTxsEvent fetches txs by event. */ - getTxsEvent(request: GetTxsEventRequest): Promise; - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - getBlockWithTxs( - request: GetBlockWithTxsRequest - ): Promise; - /** - * TxDecode decodes the transaction. - * - * Since: cosmos-sdk 0.47 - */ - txDecode(request: TxDecodeRequest): Promise; - /** - * TxEncode encodes the transaction. - * - * Since: cosmos-sdk 0.47 - */ - txEncode(request: TxEncodeRequest): Promise; - /** - * TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. - * - * Since: cosmos-sdk 0.47 - */ - txEncodeAmino(request: TxEncodeAminoRequest): Promise; - /** - * TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. - * - * Since: cosmos-sdk 0.47 - */ - txDecodeAmino(request: TxDecodeAminoRequest): Promise; -} -/** Service defines a gRPC service for interacting with transactions. */ -export interface QueryImpl { - /** Simulate simulates executing a transaction for estimating gas usage. */ - simulate(request: SimulateRequest): Promise; -} -export class ServiceClientImpl implements Service { - private readonly rpc: TxRpc; - constructor(rpc: TxRpc) { - this.rpc = rpc; - } - /* Simulate simulates executing a transaction for estimating gas usage. */ - simulate = async (request: SimulateRequest): Promise => { - const data = SimulateRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "Simulate", - data - ); - return promise.then((data: ArrayLike) => - SimulateResponse.decode(new BinaryReader(data)) - ); - }; - /* GetTx fetches a tx by hash. */ - getTx = async (request: GetTxRequest): Promise => { - const data = GetTxRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "GetTx", - data - ); - return promise.then((data: ArrayLike) => - GetTxResponse.decode(new BinaryReader(data)) - ); - }; - /* BroadcastTx broadcast transaction. */ - broadcastTx = async ( - request: BroadcastTxRequest - ): Promise => { - const data = BroadcastTxRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "BroadcastTx", - data - ); - return promise.then((data: ArrayLike) => - BroadcastTxResponse.decode(new BinaryReader(data)) - ); - }; - /* GetTxsEvent fetches txs by event. */ - getTxsEvent = async ( - request: GetTxsEventRequest - ): Promise => { - const data = GetTxsEventRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "GetTxsEvent", - data - ); - return promise.then((data: ArrayLike) => - GetTxsEventResponse.decode(new BinaryReader(data)) - ); - }; - /* GetBlockWithTxs fetches a block with decoded txs. - - Since: cosmos-sdk 0.45.2 */ - getBlockWithTxs = async ( - request: GetBlockWithTxsRequest - ): Promise => { - const data = GetBlockWithTxsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "GetBlockWithTxs", - data - ); - return promise.then((data: ArrayLike) => - GetBlockWithTxsResponse.decode(new BinaryReader(data)) - ); - }; - /* TxDecode decodes the transaction. - - Since: cosmos-sdk 0.47 */ - txDecode = async (request: TxDecodeRequest): Promise => { - const data = TxDecodeRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "TxDecode", - data - ); - return promise.then((data: ArrayLike) => - TxDecodeResponse.decode(new BinaryReader(data)) - ); - }; - /* TxEncode encodes the transaction. - - Since: cosmos-sdk 0.47 */ - txEncode = async (request: TxEncodeRequest): Promise => { - const data = TxEncodeRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "TxEncode", - data - ); - return promise.then((data: ArrayLike) => - TxEncodeResponse.decode(new BinaryReader(data)) - ); - }; - /* TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. - - Since: cosmos-sdk 0.47 */ - txEncodeAmino = async ( - request: TxEncodeAminoRequest - ): Promise => { - const data = TxEncodeAminoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "TxEncodeAmino", - data - ); - return promise.then((data: ArrayLike) => - TxEncodeAminoResponse.decode(new BinaryReader(data)) - ); - }; - /* TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. - - Since: cosmos-sdk 0.47 */ - txDecodeAmino = async ( - request: TxDecodeAminoRequest - ): Promise => { - const data = TxDecodeAminoRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.tx.v1beta1.Service", - "TxDecodeAmino", - data - ); - return promise.then((data: ArrayLike) => - TxDecodeAminoResponse.decode(new BinaryReader(data)) - ); - }; -} -export const createClientImpl = (rpc: TxRpc) => { - return new ServiceClientImpl(rpc); -}; diff --git a/networks/cosmos/codegen/cosmos/tx/v1beta1/service.ts b/networks/cosmos/codegen/cosmos/tx/v1beta1/service.ts deleted file mode 100644 index ac1cbe2b..00000000 --- a/networks/cosmos/codegen/cosmos/tx/v1beta1/service.ts +++ /dev/null @@ -1,1090 +0,0 @@ -import { Tx } from "./tx"; -import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; -import { BlockID } from "../../../tendermint/types/types"; -import { Block } from "../../../tendermint/types/block"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** OrderBy defines the sorting order */ -export enum OrderBy { - /** ORDER_BY_UNSPECIFIED - ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. */ - ORDER_BY_UNSPECIFIED = 0, - /** ORDER_BY_ASC - ORDER_BY_ASC defines ascending order */ - ORDER_BY_ASC = 1, - /** ORDER_BY_DESC - ORDER_BY_DESC defines descending order */ - ORDER_BY_DESC = 2, - UNRECOGNIZED = -1, -} -export function orderByFromJSON(object: any): OrderBy { - switch (object) { - case 0: - case "ORDER_BY_UNSPECIFIED": - return OrderBy.ORDER_BY_UNSPECIFIED; - case 1: - case "ORDER_BY_ASC": - return OrderBy.ORDER_BY_ASC; - case 2: - case "ORDER_BY_DESC": - return OrderBy.ORDER_BY_DESC; - case -1: - case "UNRECOGNIZED": - default: - return OrderBy.UNRECOGNIZED; - } -} -export function orderByToJSON(object: OrderBy): string { - switch (object) { - case OrderBy.ORDER_BY_UNSPECIFIED: - return "ORDER_BY_UNSPECIFIED"; - case OrderBy.ORDER_BY_ASC: - return "ORDER_BY_ASC"; - case OrderBy.ORDER_BY_DESC: - return "ORDER_BY_DESC"; - case OrderBy.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. */ -export enum BroadcastMode { - /** BROADCAST_MODE_UNSPECIFIED - zero-value for mode ordering */ - BROADCAST_MODE_UNSPECIFIED = 0, - /** - * BROADCAST_MODE_BLOCK - DEPRECATED: use BROADCAST_MODE_SYNC instead, - * BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - */ - BROADCAST_MODE_BLOCK = 1, - /** - * BROADCAST_MODE_SYNC - 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 - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - * immediately. - */ - BROADCAST_MODE_ASYNC = 3, - UNRECOGNIZED = -1, -} -export function broadcastModeFromJSON(object: any): BroadcastMode { - switch (object) { - case 0: - case "BROADCAST_MODE_UNSPECIFIED": - return BroadcastMode.BROADCAST_MODE_UNSPECIFIED; - case 1: - case "BROADCAST_MODE_BLOCK": - return BroadcastMode.BROADCAST_MODE_BLOCK; - case 2: - case "BROADCAST_MODE_SYNC": - return BroadcastMode.BROADCAST_MODE_SYNC; - case 3: - case "BROADCAST_MODE_ASYNC": - return BroadcastMode.BROADCAST_MODE_ASYNC; - case -1: - case "UNRECOGNIZED": - default: - return BroadcastMode.UNRECOGNIZED; - } -} -export function broadcastModeToJSON(object: BroadcastMode): string { - switch (object) { - case BroadcastMode.BROADCAST_MODE_UNSPECIFIED: - return "BROADCAST_MODE_UNSPECIFIED"; - case BroadcastMode.BROADCAST_MODE_BLOCK: - return "BROADCAST_MODE_BLOCK"; - case BroadcastMode.BROADCAST_MODE_SYNC: - return "BROADCAST_MODE_SYNC"; - case BroadcastMode.BROADCAST_MODE_ASYNC: - return "BROADCAST_MODE_ASYNC"; - case BroadcastMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * GetTxsEventRequest is the request type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventRequest { - /** events is the list of transaction event type. */ - events: string[]; - /** - * pagination defines a pagination for the request. - * Deprecated post v0.46.x: use page and limit instead. - */ - /** @deprecated */ - pagination?: PageRequest; - orderBy: OrderBy; - /** page is the page number to query, starts at 1. If not provided, will default to first page. */ - page: bigint; - /** - * 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. - */ - limit: bigint; -} -/** - * GetTxsEventResponse is the response type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventResponse { - /** txs is the list of queried transactions. */ - txs: Tx[]; - /** tx_responses is the list of queried TxResponses. */ - txResponses: TxResponse[]; - /** - * pagination defines a pagination for the response. - * Deprecated post v0.46.x: use total instead. - */ - /** @deprecated */ - pagination?: PageResponse; - /** total is total number of results available */ - total: bigint; -} -/** - * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest - * RPC method. - */ -export interface BroadcastTxRequest { - /** tx_bytes is the raw transaction. */ - txBytes: Uint8Array; - mode: BroadcastMode; -} -/** - * BroadcastTxResponse is the response type for the - * Service.BroadcastTx method. - */ -export interface BroadcastTxResponse { - /** tx_response is the queried TxResponses. */ - txResponse?: TxResponse; -} -/** - * SimulateRequest is the request type for the Service.Simulate - * RPC method. - */ -export interface SimulateRequest { - /** - * tx is the transaction to simulate. - * Deprecated. Send raw tx bytes instead. - */ - /** @deprecated */ - tx?: Tx; - /** - * tx_bytes is the raw transaction. - * - * Since: cosmos-sdk 0.43 - */ - txBytes: Uint8Array; -} -/** - * SimulateResponse is the response type for the - * Service.SimulateRPC method. - */ -export interface SimulateResponse { - /** gas_info is the information about gas used in the simulation. */ - gasInfo?: GasInfo; - /** result is the result of the simulation. */ - result?: Result; -} -/** - * GetTxRequest is the request type for the Service.GetTx - * RPC method. - */ -export interface GetTxRequest { - /** hash is the tx hash to query, encoded as a hex string. */ - hash: string; -} -/** GetTxResponse is the response type for the Service.GetTx method. */ -export interface GetTxResponse { - /** tx is the queried transaction. */ - tx?: Tx; - /** tx_response is the queried TxResponses. */ - txResponse?: TxResponse; -} -/** - * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - * RPC method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsRequest { - /** height is the height of the block to query. */ - height: bigint; - /** pagination defines a pagination for the request. */ - pagination?: PageRequest; -} -/** - * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsResponse { - /** txs are the transactions in the block. */ - txs: Tx[]; - blockId?: BlockID; - block?: Block; - /** pagination defines a pagination for the response. */ - pagination?: PageResponse; -} -/** - * TxDecodeRequest is the request type for the Service.TxDecode - * RPC method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxDecodeRequest { - /** tx_bytes is the raw transaction. */ - txBytes: Uint8Array; -} -/** - * TxDecodeResponse is the response type for the - * Service.TxDecode method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxDecodeResponse { - /** tx is the decoded transaction. */ - tx?: Tx; -} -/** - * TxEncodeRequest is the request type for the Service.TxEncode - * RPC method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxEncodeRequest { - /** tx is the transaction to encode. */ - tx?: Tx; -} -/** - * TxEncodeResponse is the response type for the - * Service.TxEncode method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxEncodeResponse { - /** tx_bytes is the encoded transaction bytes. */ - txBytes: Uint8Array; -} -/** - * TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino - * RPC method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxEncodeAminoRequest { - aminoJson: string; -} -/** - * TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino - * RPC method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxEncodeAminoResponse { - aminoBinary: Uint8Array; -} -/** - * TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino - * RPC method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxDecodeAminoRequest { - aminoBinary: Uint8Array; -} -/** - * TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino - * RPC method. - * - * Since: cosmos-sdk 0.47 - */ -export interface TxDecodeAminoResponse { - aminoJson: string; -} -function createBaseGetTxsEventRequest(): GetTxsEventRequest { - return { - events: [], - pagination: undefined, - orderBy: 0, - page: BigInt(0), - limit: BigInt(0) - }; -} -export const GetTxsEventRequest = { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest", - aminoType: "cosmos-sdk/GetTxsEventRequest", - encode(message: GetTxsEventRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.events) { - writer.uint32(10).string(v!); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.orderBy !== 0) { - writer.uint32(24).int32(message.orderBy); - } - if (message.page !== BigInt(0)) { - writer.uint32(32).uint64(message.page); - } - if (message.limit !== BigInt(0)) { - writer.uint32(40).uint64(message.limit); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxsEventRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(reader.string()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 3: - message.orderBy = (reader.int32() as any); - break; - case 4: - message.page = reader.uint64(); - break; - case 5: - message.limit = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): GetTxsEventRequest { - const message = createBaseGetTxsEventRequest(); - message.events = object.events?.map(e => e) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - message.orderBy = object.orderBy ?? 0; - message.page = object.page !== undefined && object.page !== null ? BigInt(object.page.toString()) : BigInt(0); - message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); - return message; - } -}; -function createBaseGetTxsEventResponse(): GetTxsEventResponse { - return { - txs: [], - txResponses: [], - pagination: undefined, - total: BigInt(0) - }; -} -export const GetTxsEventResponse = { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse", - aminoType: "cosmos-sdk/GetTxsEventResponse", - encode(message: GetTxsEventResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.txResponses) { - TxResponse.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - if (message.total !== BigInt(0)) { - writer.uint32(32).uint64(message.total); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxsEventResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - case 2: - message.txResponses.push(TxResponse.decode(reader, reader.uint32())); - break; - case 3: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 4: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): GetTxsEventResponse { - const message = createBaseGetTxsEventResponse(); - message.txs = object.txs?.map(e => Tx.fromPartial(e)) || []; - message.txResponses = object.txResponses?.map(e => TxResponse.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - message.total = object.total !== undefined && object.total !== null ? BigInt(object.total.toString()) : BigInt(0); - return message; - } -}; -function createBaseBroadcastTxRequest(): BroadcastTxRequest { - return { - txBytes: new Uint8Array(), - mode: 0 - }; -} -export const BroadcastTxRequest = { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest", - aminoType: "cosmos-sdk/BroadcastTxRequest", - encode(message: BroadcastTxRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.txBytes.length !== 0) { - writer.uint32(10).bytes(message.txBytes); - } - if (message.mode !== 0) { - writer.uint32(16).int32(message.mode); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBroadcastTxRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txBytes = reader.bytes(); - break; - case 2: - message.mode = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): BroadcastTxRequest { - const message = createBaseBroadcastTxRequest(); - message.txBytes = object.txBytes ?? new Uint8Array(); - message.mode = object.mode ?? 0; - return message; - } -}; -function createBaseBroadcastTxResponse(): BroadcastTxResponse { - return { - txResponse: undefined - }; -} -export const BroadcastTxResponse = { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse", - aminoType: "cosmos-sdk/BroadcastTxResponse", - encode(message: BroadcastTxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.txResponse !== undefined) { - TxResponse.encode(message.txResponse, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBroadcastTxResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txResponse = TxResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): BroadcastTxResponse { - const message = createBaseBroadcastTxResponse(); - message.txResponse = object.txResponse !== undefined && object.txResponse !== null ? TxResponse.fromPartial(object.txResponse) : undefined; - return message; - } -}; -function createBaseSimulateRequest(): SimulateRequest { - return { - tx: undefined, - txBytes: new Uint8Array() - }; -} -export const SimulateRequest = { - typeUrl: "/cosmos.tx.v1beta1.SimulateRequest", - aminoType: "cosmos-sdk/SimulateRequest", - encode(message: SimulateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - if (message.txBytes.length !== 0) { - writer.uint32(18).bytes(message.txBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimulateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimulateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - case 2: - message.txBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SimulateRequest { - const message = createBaseSimulateRequest(); - message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; - message.txBytes = object.txBytes ?? new Uint8Array(); - return message; - } -}; -function createBaseSimulateResponse(): SimulateResponse { - return { - gasInfo: undefined, - result: undefined - }; -} -export const SimulateResponse = { - typeUrl: "/cosmos.tx.v1beta1.SimulateResponse", - aminoType: "cosmos-sdk/SimulateResponse", - encode(message: SimulateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimulateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimulateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SimulateResponse { - const message = createBaseSimulateResponse(); - message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null ? GasInfo.fromPartial(object.gasInfo) : undefined; - message.result = object.result !== undefined && object.result !== null ? Result.fromPartial(object.result) : undefined; - return message; - } -}; -function createBaseGetTxRequest(): GetTxRequest { - return { - hash: "" - }; -} -export const GetTxRequest = { - typeUrl: "/cosmos.tx.v1beta1.GetTxRequest", - aminoType: "cosmos-sdk/GetTxRequest", - encode(message: GetTxRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): GetTxRequest { - const message = createBaseGetTxRequest(); - message.hash = object.hash ?? ""; - return message; - } -}; -function createBaseGetTxResponse(): GetTxResponse { - return { - tx: undefined, - txResponse: undefined - }; -} -export const GetTxResponse = { - typeUrl: "/cosmos.tx.v1beta1.GetTxResponse", - aminoType: "cosmos-sdk/GetTxResponse", - encode(message: GetTxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - if (message.txResponse !== undefined) { - TxResponse.encode(message.txResponse, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - case 2: - message.txResponse = TxResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): GetTxResponse { - const message = createBaseGetTxResponse(); - message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; - message.txResponse = object.txResponse !== undefined && object.txResponse !== null ? TxResponse.fromPartial(object.txResponse) : undefined; - return message; - } -}; -function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { - return { - height: BigInt(0), - pagination: undefined - }; -} -export const GetBlockWithTxsRequest = { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest", - aminoType: "cosmos-sdk/GetBlockWithTxsRequest", - encode(message: GetBlockWithTxsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockWithTxsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): GetBlockWithTxsRequest { - const message = createBaseGetBlockWithTxsRequest(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - } -}; -function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { - return { - txs: [], - blockId: undefined, - block: undefined, - pagination: undefined - }; -} -export const GetBlockWithTxsResponse = { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse", - aminoType: "cosmos-sdk/GetBlockWithTxsResponse", - encode(message: GetBlockWithTxsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(18).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(26).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockWithTxsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - case 2: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 3: - message.block = Block.decode(reader, reader.uint32()); - break; - case 4: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): GetBlockWithTxsResponse { - const message = createBaseGetBlockWithTxsResponse(); - message.txs = object.txs?.map(e => Tx.fromPartial(e)) || []; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.block = object.block !== undefined && object.block !== null ? Block.fromPartial(object.block) : undefined; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - } -}; -function createBaseTxDecodeRequest(): TxDecodeRequest { - return { - txBytes: new Uint8Array() - }; -} -export const TxDecodeRequest = { - typeUrl: "/cosmos.tx.v1beta1.TxDecodeRequest", - aminoType: "cosmos-sdk/TxDecodeRequest", - encode(message: TxDecodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.txBytes.length !== 0) { - writer.uint32(10).bytes(message.txBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxDecodeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxDecodeRequest { - const message = createBaseTxDecodeRequest(); - message.txBytes = object.txBytes ?? new Uint8Array(); - return message; - } -}; -function createBaseTxDecodeResponse(): TxDecodeResponse { - return { - tx: undefined - }; -} -export const TxDecodeResponse = { - typeUrl: "/cosmos.tx.v1beta1.TxDecodeResponse", - aminoType: "cosmos-sdk/TxDecodeResponse", - encode(message: TxDecodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxDecodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxDecodeResponse { - const message = createBaseTxDecodeResponse(); - message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; - return message; - } -}; -function createBaseTxEncodeRequest(): TxEncodeRequest { - return { - tx: undefined - }; -} -export const TxEncodeRequest = { - typeUrl: "/cosmos.tx.v1beta1.TxEncodeRequest", - aminoType: "cosmos-sdk/TxEncodeRequest", - encode(message: TxEncodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxEncodeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxEncodeRequest { - const message = createBaseTxEncodeRequest(); - message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; - return message; - } -}; -function createBaseTxEncodeResponse(): TxEncodeResponse { - return { - txBytes: new Uint8Array() - }; -} -export const TxEncodeResponse = { - typeUrl: "/cosmos.tx.v1beta1.TxEncodeResponse", - aminoType: "cosmos-sdk/TxEncodeResponse", - encode(message: TxEncodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.txBytes.length !== 0) { - writer.uint32(10).bytes(message.txBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxEncodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxEncodeResponse { - const message = createBaseTxEncodeResponse(); - message.txBytes = object.txBytes ?? new Uint8Array(); - return message; - } -}; -function createBaseTxEncodeAminoRequest(): TxEncodeAminoRequest { - return { - aminoJson: "" - }; -} -export const TxEncodeAminoRequest = { - typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoRequest", - aminoType: "cosmos-sdk/TxEncodeAminoRequest", - encode(message: TxEncodeAminoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.aminoJson !== "") { - writer.uint32(10).string(message.aminoJson); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeAminoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxEncodeAminoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aminoJson = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxEncodeAminoRequest { - const message = createBaseTxEncodeAminoRequest(); - message.aminoJson = object.aminoJson ?? ""; - return message; - } -}; -function createBaseTxEncodeAminoResponse(): TxEncodeAminoResponse { - return { - aminoBinary: new Uint8Array() - }; -} -export const TxEncodeAminoResponse = { - typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoResponse", - aminoType: "cosmos-sdk/TxEncodeAminoResponse", - encode(message: TxEncodeAminoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.aminoBinary.length !== 0) { - writer.uint32(10).bytes(message.aminoBinary); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeAminoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxEncodeAminoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aminoBinary = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxEncodeAminoResponse { - const message = createBaseTxEncodeAminoResponse(); - message.aminoBinary = object.aminoBinary ?? new Uint8Array(); - return message; - } -}; -function createBaseTxDecodeAminoRequest(): TxDecodeAminoRequest { - return { - aminoBinary: new Uint8Array() - }; -} -export const TxDecodeAminoRequest = { - typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoRequest", - aminoType: "cosmos-sdk/TxDecodeAminoRequest", - encode(message: TxDecodeAminoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.aminoBinary.length !== 0) { - writer.uint32(10).bytes(message.aminoBinary); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeAminoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxDecodeAminoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aminoBinary = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxDecodeAminoRequest { - const message = createBaseTxDecodeAminoRequest(); - message.aminoBinary = object.aminoBinary ?? new Uint8Array(); - return message; - } -}; -function createBaseTxDecodeAminoResponse(): TxDecodeAminoResponse { - return { - aminoJson: "" - }; -} -export const TxDecodeAminoResponse = { - typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoResponse", - aminoType: "cosmos-sdk/TxDecodeAminoResponse", - encode(message: TxDecodeAminoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.aminoJson !== "") { - writer.uint32(10).string(message.aminoJson); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeAminoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxDecodeAminoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.aminoJson = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxDecodeAminoResponse { - const message = createBaseTxDecodeAminoResponse(); - message.aminoJson = object.aminoJson ?? ""; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/tx/v1beta1/tx.ts b/networks/cosmos/codegen/cosmos/tx/v1beta1/tx.ts deleted file mode 100644 index 0a240ef5..00000000 --- a/networks/cosmos/codegen/cosmos/tx/v1beta1/tx.ts +++ /dev/null @@ -1,992 +0,0 @@ -import { Any } from "../../../google/protobuf/any"; -import { SignMode } from "../signing/v1beta1/signing"; -import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig"; -import { Coin } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** Tx is the standard type used for broadcasting transactions. */ -export interface Tx { - /** body is the processable content of the transaction */ - body?: TxBody; - /** - * auth_info is the authorization related content of the transaction, - * specifically signers, signer modes and fee - */ - authInfo?: AuthInfo; - /** - * 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. - */ - signatures: Uint8Array[]; -} -/** - * 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. - */ -export interface TxRaw { - /** - * body_bytes is a protobuf serialization of a TxBody that matches the - * representation in SignDoc. - */ - bodyBytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in SignDoc. - */ - authInfoBytes: Uint8Array; - /** - * 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. - */ - signatures: Uint8Array[]; -} -/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ -export interface SignDoc { - /** - * body_bytes is protobuf serialization of a TxBody that matches the - * representation in TxRaw. - */ - bodyBytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in TxRaw. - */ - authInfoBytes: Uint8Array; - /** - * 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 - */ - chainId: string; - /** account_number is the account number of the account in state */ - accountNumber: bigint; -} -/** - * SignDocDirectAux is the type used for generating sign bytes for - * SIGN_MODE_DIRECT_AUX. - * - * Since: cosmos-sdk 0.46 - */ -export interface SignDocDirectAux { - /** - * body_bytes is protobuf serialization of a TxBody that matches the - * representation in TxRaw. - */ - bodyBytes: Uint8Array; - /** public_key is the public key of the signing account. */ - publicKey?: Any; - /** - * chain_id is the identifier of the chain this transaction targets. - * It prevents signed transactions from being used on another chain by an - * attacker. - */ - chainId: string; - /** account_number is the account number of the account in state. */ - accountNumber: bigint; - /** sequence is the sequence number of the signing account. */ - sequence: bigint; - /** - * Tip is the optional tip used for transactions fees paid in another denom. - * It should be left empty if the signer is not the tipper for this - * transaction. - * - * This field is ignored if the chain didn't enable tips, i.e. didn't add the - * `TipDecorator` in its posthandler. - */ - tip?: Tip; -} -/** TxBody is the body of a transaction that all signers sign over. */ -export interface 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. - */ - messages: Any[]; - /** - * 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). - */ - memo: string; - /** - * timeout is the block height after which this transaction will not - * be processed by the chain - */ - timeoutHeight: bigint; - /** - * 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 - */ - extensionOptions: Any[]; - /** - * 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 - */ - nonCriticalExtensionOptions: Any[]; -} -/** - * AuthInfo describes the fee and signer modes that are used to sign a - * transaction. - */ -export interface 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. - */ - signerInfos: SignerInfo[]; - /** - * 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; - /** - * Tip is the optional tip used for transactions fees paid in another denom. - * - * This field is ignored if the chain didn't enable tips, i.e. didn't add the - * `TipDecorator` in its posthandler. - * - * Since: cosmos-sdk 0.46 - */ - tip?: Tip; -} -/** - * SignerInfo describes the public key and signing mode of a single top-level - * signer. - */ -export interface 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. - */ - publicKey?: Any; - /** - * mode_info describes the signing mode of the signer and is a nested - * structure to support nested multisig pubkey's - */ - modeInfo?: ModeInfo; - /** - * 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. - */ - sequence: bigint; -} -/** ModeInfo describes the signing mode of a single or nested multisig signer. */ -export interface ModeInfo { - /** single represents a single signer */ - single?: ModeInfo_Single; - /** multi represents a nested multisig signer */ - multi?: ModeInfo_Multi; -} -/** - * 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 - */ -export interface ModeInfo_Single { - /** mode is the signing mode of the single signer */ - mode: SignMode; -} -/** Multi is the mode info for a multisig public key */ -export interface ModeInfo_Multi { - /** bitarray specifies which keys within the multisig are signing */ - bitarray?: CompactBitArray; - /** - * mode_infos is the corresponding modes of the signers of the multisig - * which could include nested multisig public keys - */ - modeInfos: ModeInfo[]; -} -/** - * 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. - */ -export interface Fee { - /** amount is the amount of coins to be paid as a fee */ - amount: Coin[]; - /** - * gas_limit is the maximum gas that can be used in transaction processing - * before an out of gas error occurs - */ - gasLimit: bigint; - /** - * 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. - */ - payer: string; - /** - * 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 - */ - granter: string; -} -/** - * Tip is the tip used for meta-transactions. - * - * Since: cosmos-sdk 0.46 - */ -export interface Tip { - /** amount is the amount of the tip */ - amount: Coin[]; - /** tipper is the address of the account paying for the tip */ - tipper: string; -} -/** - * AuxSignerData is the intermediary format that an auxiliary signer (e.g. a - * tipper) builds and sends to the fee payer (who will build and broadcast the - * actual tx). AuxSignerData is not a valid tx in itself, and will be rejected - * by the node if sent directly as-is. - * - * Since: cosmos-sdk 0.46 - */ -export interface AuxSignerData { - /** - * address is the bech32-encoded address of the auxiliary signer. If using - * AuxSignerData across different chains, the bech32 prefix of the target - * chain (where the final transaction is broadcasted) should be used. - */ - address: string; - /** - * sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer - * signs. Note: we use the same sign doc even if we're signing with - * LEGACY_AMINO_JSON. - */ - signDoc?: SignDocDirectAux; - /** mode is the signing mode of the single signer. */ - mode: SignMode; - /** sig is the signature of the sign doc. */ - sig: Uint8Array; -} -function createBaseTx(): Tx { - return { - body: undefined, - authInfo: undefined, - signatures: [] - }; -} -export const Tx = { - typeUrl: "/cosmos.tx.v1beta1.Tx", - aminoType: "cosmos-sdk/Tx", - encode(message: Tx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.body !== undefined) { - TxBody.encode(message.body, writer.uint32(10).fork()).ldelim(); - } - if (message.authInfo !== undefined) { - AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.signatures) { - writer.uint32(26).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Tx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.body = TxBody.decode(reader, reader.uint32()); - break; - case 2: - message.authInfo = AuthInfo.decode(reader, reader.uint32()); - break; - case 3: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Tx { - const message = createBaseTx(); - message.body = object.body !== undefined && object.body !== null ? TxBody.fromPartial(object.body) : undefined; - message.authInfo = object.authInfo !== undefined && object.authInfo !== null ? AuthInfo.fromPartial(object.authInfo) : undefined; - message.signatures = object.signatures?.map(e => e) || []; - return message; - } -}; -function createBaseTxRaw(): TxRaw { - return { - bodyBytes: new Uint8Array(), - authInfoBytes: new Uint8Array(), - signatures: [] - }; -} -export const TxRaw = { - typeUrl: "/cosmos.tx.v1beta1.TxRaw", - aminoType: "cosmos-sdk/TxRaw", - encode(message: TxRaw, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bodyBytes.length !== 0) { - writer.uint32(10).bytes(message.bodyBytes); - } - if (message.authInfoBytes.length !== 0) { - writer.uint32(18).bytes(message.authInfoBytes); - } - for (const v of message.signatures) { - writer.uint32(26).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxRaw { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxRaw(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bodyBytes = reader.bytes(); - break; - case 2: - message.authInfoBytes = reader.bytes(); - break; - case 3: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxRaw { - const message = createBaseTxRaw(); - message.bodyBytes = object.bodyBytes ?? new Uint8Array(); - message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); - message.signatures = object.signatures?.map(e => e) || []; - return message; - } -}; -function createBaseSignDoc(): SignDoc { - return { - bodyBytes: new Uint8Array(), - authInfoBytes: new Uint8Array(), - chainId: "", - accountNumber: BigInt(0) - }; -} -export const SignDoc = { - typeUrl: "/cosmos.tx.v1beta1.SignDoc", - aminoType: "cosmos-sdk/SignDoc", - encode(message: SignDoc, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bodyBytes.length !== 0) { - writer.uint32(10).bytes(message.bodyBytes); - } - if (message.authInfoBytes.length !== 0) { - writer.uint32(18).bytes(message.authInfoBytes); - } - if (message.chainId !== "") { - writer.uint32(26).string(message.chainId); - } - if (message.accountNumber !== BigInt(0)) { - writer.uint32(32).uint64(message.accountNumber); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignDoc { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignDoc(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bodyBytes = reader.bytes(); - break; - case 2: - message.authInfoBytes = reader.bytes(); - break; - case 3: - message.chainId = reader.string(); - break; - case 4: - message.accountNumber = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SignDoc { - const message = createBaseSignDoc(); - message.bodyBytes = object.bodyBytes ?? new Uint8Array(); - message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); - message.chainId = object.chainId ?? ""; - message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); - return message; - } -}; -function createBaseSignDocDirectAux(): SignDocDirectAux { - return { - bodyBytes: new Uint8Array(), - publicKey: undefined, - chainId: "", - accountNumber: BigInt(0), - sequence: BigInt(0), - tip: undefined - }; -} -export const SignDocDirectAux = { - typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux", - aminoType: "cosmos-sdk/SignDocDirectAux", - encode(message: SignDocDirectAux, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bodyBytes.length !== 0) { - writer.uint32(10).bytes(message.bodyBytes); - } - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(18).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(26).string(message.chainId); - } - if (message.accountNumber !== BigInt(0)) { - writer.uint32(32).uint64(message.accountNumber); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(40).uint64(message.sequence); - } - if (message.tip !== undefined) { - Tip.encode(message.tip, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignDocDirectAux { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignDocDirectAux(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bodyBytes = reader.bytes(); - break; - case 2: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.chainId = reader.string(); - break; - case 4: - message.accountNumber = reader.uint64(); - break; - case 5: - message.sequence = reader.uint64(); - break; - case 6: - message.tip = Tip.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SignDocDirectAux { - const message = createBaseSignDocDirectAux(); - message.bodyBytes = object.bodyBytes ?? new Uint8Array(); - message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; - message.chainId = object.chainId ?? ""; - message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.tip = object.tip !== undefined && object.tip !== null ? Tip.fromPartial(object.tip) : undefined; - return message; - } -}; -function createBaseTxBody(): TxBody { - return { - messages: [], - memo: "", - timeoutHeight: BigInt(0), - extensionOptions: [], - nonCriticalExtensionOptions: [] - }; -} -export const TxBody = { - typeUrl: "/cosmos.tx.v1beta1.TxBody", - aminoType: "cosmos-sdk/TxBody", - encode(message: TxBody, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.messages) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.memo !== "") { - writer.uint32(18).string(message.memo); - } - if (message.timeoutHeight !== BigInt(0)) { - writer.uint32(24).uint64(message.timeoutHeight); - } - for (const v of message.extensionOptions) { - Any.encode(v!, writer.uint32(8186).fork()).ldelim(); - } - for (const v of message.nonCriticalExtensionOptions) { - Any.encode(v!, writer.uint32(16378).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxBody { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxBody(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.memo = reader.string(); - break; - case 3: - message.timeoutHeight = reader.uint64(); - break; - case 1023: - message.extensionOptions.push(Any.decode(reader, reader.uint32())); - break; - case 2047: - message.nonCriticalExtensionOptions.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxBody { - const message = createBaseTxBody(); - message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; - message.memo = object.memo ?? ""; - message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? BigInt(object.timeoutHeight.toString()) : BigInt(0); - message.extensionOptions = object.extensionOptions?.map(e => Any.fromPartial(e)) || []; - message.nonCriticalExtensionOptions = object.nonCriticalExtensionOptions?.map(e => Any.fromPartial(e)) || []; - return message; - } -}; -function createBaseAuthInfo(): AuthInfo { - return { - signerInfos: [], - fee: undefined, - tip: undefined - }; -} -export const AuthInfo = { - typeUrl: "/cosmos.tx.v1beta1.AuthInfo", - aminoType: "cosmos-sdk/AuthInfo", - encode(message: AuthInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.signerInfos) { - SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fee !== undefined) { - Fee.encode(message.fee, writer.uint32(18).fork()).ldelim(); - } - if (message.tip !== undefined) { - Tip.encode(message.tip, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AuthInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signerInfos.push(SignerInfo.decode(reader, reader.uint32())); - break; - case 2: - message.fee = Fee.decode(reader, reader.uint32()); - break; - case 3: - message.tip = Tip.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): AuthInfo { - const message = createBaseAuthInfo(); - message.signerInfos = object.signerInfos?.map(e => SignerInfo.fromPartial(e)) || []; - message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; - message.tip = object.tip !== undefined && object.tip !== null ? Tip.fromPartial(object.tip) : undefined; - return message; - } -}; -function createBaseSignerInfo(): SignerInfo { - return { - publicKey: undefined, - modeInfo: undefined, - sequence: BigInt(0) - }; -} -export const SignerInfo = { - typeUrl: "/cosmos.tx.v1beta1.SignerInfo", - aminoType: "cosmos-sdk/SignerInfo", - encode(message: SignerInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); - } - if (message.modeInfo !== undefined) { - ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim(); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignerInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignerInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.modeInfo = ModeInfo.decode(reader, reader.uint32()); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SignerInfo { - const message = createBaseSignerInfo(); - message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; - message.modeInfo = object.modeInfo !== undefined && object.modeInfo !== null ? ModeInfo.fromPartial(object.modeInfo) : undefined; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - } -}; -function createBaseModeInfo(): ModeInfo { - return { - single: undefined, - multi: undefined - }; -} -export const ModeInfo = { - typeUrl: "/cosmos.tx.v1beta1.ModeInfo", - aminoType: "cosmos-sdk/ModeInfo", - encode(message: ModeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.single !== undefined) { - ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); - } - if (message.multi !== undefined) { - ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.single = ModeInfo_Single.decode(reader, reader.uint32()); - break; - case 2: - message.multi = ModeInfo_Multi.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ModeInfo { - const message = createBaseModeInfo(); - message.single = object.single !== undefined && object.single !== null ? ModeInfo_Single.fromPartial(object.single) : undefined; - message.multi = object.multi !== undefined && object.multi !== null ? ModeInfo_Multi.fromPartial(object.multi) : undefined; - return message; - } -}; -function createBaseModeInfo_Single(): ModeInfo_Single { - return { - mode: 0 - }; -} -export const ModeInfo_Single = { - typeUrl: "/cosmos.tx.v1beta1.Single", - aminoType: "cosmos-sdk/Single", - encode(message: ModeInfo_Single, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo_Single { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModeInfo_Single(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ModeInfo_Single { - const message = createBaseModeInfo_Single(); - message.mode = object.mode ?? 0; - return message; - } -}; -function createBaseModeInfo_Multi(): ModeInfo_Multi { - return { - bitarray: undefined, - modeInfos: [] - }; -} -export const ModeInfo_Multi = { - typeUrl: "/cosmos.tx.v1beta1.Multi", - aminoType: "cosmos-sdk/Multi", - encode(message: ModeInfo_Multi, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bitarray !== undefined) { - CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.modeInfos) { - ModeInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo_Multi { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModeInfo_Multi(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bitarray = CompactBitArray.decode(reader, reader.uint32()); - break; - case 2: - message.modeInfos.push(ModeInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ModeInfo_Multi { - const message = createBaseModeInfo_Multi(); - message.bitarray = object.bitarray !== undefined && object.bitarray !== null ? CompactBitArray.fromPartial(object.bitarray) : undefined; - message.modeInfos = object.modeInfos?.map(e => ModeInfo.fromPartial(e)) || []; - return message; - } -}; -function createBaseFee(): Fee { - return { - amount: [], - gasLimit: BigInt(0), - payer: "", - granter: "" - }; -} -export const Fee = { - typeUrl: "/cosmos.tx.v1beta1.Fee", - aminoType: "cosmos-sdk/Fee", - encode(message: Fee, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.gasLimit !== BigInt(0)) { - writer.uint32(16).uint64(message.gasLimit); - } - if (message.payer !== "") { - writer.uint32(26).string(message.payer); - } - if (message.granter !== "") { - writer.uint32(34).string(message.granter); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Fee { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFee(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.gasLimit = reader.uint64(); - break; - case 3: - message.payer = reader.string(); - break; - case 4: - message.granter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Fee { - const message = createBaseFee(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - message.gasLimit = object.gasLimit !== undefined && object.gasLimit !== null ? BigInt(object.gasLimit.toString()) : BigInt(0); - message.payer = object.payer ?? ""; - message.granter = object.granter ?? ""; - return message; - } -}; -function createBaseTip(): Tip { - return { - amount: [], - tipper: "" - }; -} -export const Tip = { - typeUrl: "/cosmos.tx.v1beta1.Tip", - aminoType: "cosmos-sdk/Tip", - encode(message: Tip, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.tipper !== "") { - writer.uint32(18).string(message.tipper); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Tip { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTip(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.tipper = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Tip { - const message = createBaseTip(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - message.tipper = object.tipper ?? ""; - return message; - } -}; -function createBaseAuxSignerData(): AuxSignerData { - return { - address: "", - signDoc: undefined, - mode: 0, - sig: new Uint8Array() - }; -} -export const AuxSignerData = { - typeUrl: "/cosmos.tx.v1beta1.AuxSignerData", - aminoType: "cosmos-sdk/AuxSignerData", - encode(message: AuxSignerData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.signDoc !== undefined) { - SignDocDirectAux.encode(message.signDoc, writer.uint32(18).fork()).ldelim(); - } - if (message.mode !== 0) { - writer.uint32(24).int32(message.mode); - } - if (message.sig.length !== 0) { - writer.uint32(34).bytes(message.sig); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AuxSignerData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuxSignerData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.signDoc = SignDocDirectAux.decode(reader, reader.uint32()); - break; - case 3: - message.mode = (reader.int32() as any); - break; - case 4: - message.sig = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): AuxSignerData { - const message = createBaseAuxSignerData(); - message.address = object.address ?? ""; - message.signDoc = object.signDoc !== undefined && object.signDoc !== null ? SignDocDirectAux.fromPartial(object.signDoc) : undefined; - message.mode = object.mode ?? 0; - message.sig = object.sig ?? new Uint8Array(); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/cosmos/vesting/v1beta1/vesting.ts b/networks/cosmos/codegen/cosmos/vesting/v1beta1/vesting.ts deleted file mode 100644 index 21d16dd0..00000000 --- a/networks/cosmos/codegen/cosmos/vesting/v1beta1/vesting.ts +++ /dev/null @@ -1,344 +0,0 @@ -import { BaseAccount } from "../../auth/v1beta1/auth"; -import { Coin } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccount { - baseAccount?: BaseAccount; - originalVesting: Coin[]; - delegatedFree: Coin[]; - delegatedVesting: Coin[]; - /** Vesting end time, as unix timestamp (in seconds). */ - endTime: bigint; -} -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccount { - baseVestingAccount?: BaseVestingAccount; - /** Vesting start time, as unix timestamp (in seconds). */ - startTime: bigint; -} -/** - * 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. - */ -export interface DelayedVestingAccount { - baseVestingAccount?: BaseVestingAccount; -} -/** Period defines a length of time and amount of coins that will vest. */ -export interface Period { - /** Period duration in seconds. */ - length: bigint; - amount: Coin[]; -} -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccount { - baseVestingAccount?: BaseVestingAccount; - startTime: bigint; - vestingPeriods: Period[]; -} -/** - * 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 - */ -export interface PermanentLockedAccount { - baseVestingAccount?: BaseVestingAccount; -} -function createBaseBaseVestingAccount(): BaseVestingAccount { - return { - baseAccount: undefined, - originalVesting: [], - delegatedFree: [], - delegatedVesting: [], - endTime: BigInt(0) - }; -} -export const BaseVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", - aminoType: "cosmos-sdk/BaseVestingAccount", - encode(message: BaseVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.originalVesting) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatedFree) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.delegatedVesting) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.endTime !== BigInt(0)) { - writer.uint32(40).int64(message.endTime); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BaseVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBaseVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.originalVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.delegatedFree.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.delegatedVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.endTime = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): BaseVestingAccount { - const message = createBaseBaseVestingAccount(); - message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null ? BaseAccount.fromPartial(object.baseAccount) : undefined; - message.originalVesting = object.originalVesting?.map(e => Coin.fromPartial(e)) || []; - message.delegatedFree = object.delegatedFree?.map(e => Coin.fromPartial(e)) || []; - message.delegatedVesting = object.delegatedVesting?.map(e => Coin.fromPartial(e)) || []; - message.endTime = object.endTime !== undefined && object.endTime !== null ? BigInt(object.endTime.toString()) : BigInt(0); - return message; - } -}; -function createBaseContinuousVestingAccount(): ContinuousVestingAccount { - return { - baseVestingAccount: undefined, - startTime: BigInt(0) - }; -} -export const ContinuousVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", - aminoType: "cosmos-sdk/ContinuousVestingAccount", - encode(message: ContinuousVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== BigInt(0)) { - writer.uint32(16).int64(message.startTime); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ContinuousVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContinuousVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ContinuousVestingAccount { - const message = createBaseContinuousVestingAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - message.startTime = object.startTime !== undefined && object.startTime !== null ? BigInt(object.startTime.toString()) : BigInt(0); - return message; - } -}; -function createBaseDelayedVestingAccount(): DelayedVestingAccount { - return { - baseVestingAccount: undefined - }; -} -export const DelayedVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", - aminoType: "cosmos-sdk/DelayedVestingAccount", - encode(message: DelayedVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DelayedVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelayedVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): DelayedVestingAccount { - const message = createBaseDelayedVestingAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - return message; - } -}; -function createBasePeriod(): Period { - return { - length: BigInt(0), - amount: [] - }; -} -export const Period = { - typeUrl: "/cosmos.vesting.v1beta1.Period", - aminoType: "cosmos-sdk/Period", - encode(message: Period, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.length !== BigInt(0)) { - writer.uint32(8).int64(message.length); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Period { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeriod(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.length = reader.int64(); - break; - case 2: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Period { - const message = createBasePeriod(); - message.length = object.length !== undefined && object.length !== null ? BigInt(object.length.toString()) : BigInt(0); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - } -}; -function createBasePeriodicVestingAccount(): PeriodicVestingAccount { - return { - baseVestingAccount: undefined, - startTime: BigInt(0), - vestingPeriods: [] - }; -} -export const PeriodicVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", - aminoType: "cosmos-sdk/PeriodicVestingAccount", - encode(message: PeriodicVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== BigInt(0)) { - writer.uint32(16).int64(message.startTime); - } - for (const v of message.vestingPeriods) { - Period.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PeriodicVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeriodicVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = reader.int64(); - break; - case 3: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): PeriodicVestingAccount { - const message = createBasePeriodicVestingAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - message.startTime = object.startTime !== undefined && object.startTime !== null ? BigInt(object.startTime.toString()) : BigInt(0); - message.vestingPeriods = object.vestingPeriods?.map(e => Period.fromPartial(e)) || []; - return message; - } -}; -function createBasePermanentLockedAccount(): PermanentLockedAccount { - return { - baseVestingAccount: undefined - }; -} -export const PermanentLockedAccount = { - typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", - aminoType: "cosmos-sdk/PermanentLockedAccount", - encode(message: PermanentLockedAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PermanentLockedAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePermanentLockedAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): PermanentLockedAccount { - const message = createBasePermanentLockedAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/google/api/http.ts b/networks/cosmos/codegen/google/api/http.ts deleted file mode 100644 index b95f3fe9..00000000 --- a/networks/cosmos/codegen/google/api/http.ts +++ /dev/null @@ -1,554 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** - * 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. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parameters 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. - */ - fullyDecodeReservedExpansion: boolean; -} -/** - * # gRPC Transcoding - * - * gRPC Transcoding is a feature for mapping between a gRPC method and one or - * more HTTP REST endpoints. It allows developers to build a single API service - * that supports both gRPC APIs and REST APIs. Many systems, including [Google - * APIs](https://github.com/googleapis/googleapis), - * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC - * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), - * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature - * and use it for large scale production services. - * - * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies - * how different portions of the gRPC request message are mapped to the URL - * path, URL query parameters, and HTTP request body. It also controls how the - * gRPC response message is mapped to the HTTP response body. `HttpRule` is - * typically specified as an `google.api.http` annotation on the gRPC method. - * - * Each mapping specifies a URL path template and an HTTP method. The path - * template may refer to one or more fields in the gRPC request message, as long - * as each field is a non-repeated field with a primitive (non-message) type. - * The path template controls how fields of the request message are mapped to - * the URL path. - * - * Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/{name=messages/*}" - * }; - * } - * } - * message GetMessageRequest { - * string name = 1; // Mapped to URL path. - * } - * message Message { - * string text = 1; // The resource content. - * } - * - * This enables an HTTP REST to gRPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` - * - * Any fields in the request message which are not bound by the path template - * automatically become HTTP query parameters if there is no HTTP request body. - * For example: - * - * 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 URL path. - * int64 revision = 2; // Mapped to URL query parameter `revision`. - * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. - * } - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `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 URL query parameters must have a - * primitive type or a repeated primitive type or a non-repeated message type. - * In the case of a repeated type, the parameter can be repeated in the URL - * as `...?param=A¶m=B`. In the case of a message type, each field of the - * message is mapped to a separate parameter, such as - * `...?foo.a=A&foo.b=B&foo.c=C`. - * - * For HTTP methods that 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) = { - * patch: "/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 | gRPC - * -----|----- - * `PATCH /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) = { - * patch: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | gRPC - * -----|----- - * `PATCH /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 when - * 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 | gRPC - * -----|----- - * `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 - * - * 1. Leaf request fields (recursive expansion nested messages in the request - * message) are classified into three categories: - * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They - * are passed via the HTTP - * request body. - * - All other fields are passed via the URL query parameters, and the - * parameter name is the field path in the request message. A repeated - * field can be represented as multiple query parameters under the same - * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL - * query parameter, all fields - * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP - * request body, all - * fields are passed via URL path and URL query parameters. - * - * ### Path template syntax - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single URL path segment. The syntax `**` matches - * zero or more URL path segments, which must be the last part of the URL path - * except the `Verb`. - * - * 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=*}`. - * - * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` - * contains any reserved character, such characters should be percent-encoded - * before the matching. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path on the client - * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The - * server side does the reverse decoding. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{var}`. - * - * If a variable contains multiple path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path on the - * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. - * The server side does the reverse decoding, except "%2F" and "%2f" are left - * unchanged. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{+var}`. - * - * ## Using gRPC API Service Configuration - * - * gRPC API Service Configuration (service config) is a configuration language - * for configuring a gRPC service to become a user-facing product. The - * service config is simply the YAML representation of the `google.api.Service` - * proto message. - * - * As an alternative to annotating your proto file, you can configure gRPC - * transcoding in your service config YAML files. You do this by specifying a - * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same - * effect as the proto annotation. This can be particularly useful if you - * have a proto that is reused in multiple services. Note that any transcoding - * specified in the service config will override any matching transcoding - * configuration in the proto. - * - * Example: - * - * http: - * rules: - * # Selects a gRPC method and applies HttpRule to it. - * - selector: example.v1.Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * ## Special notes - * - * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the - * proto to JSON conversion must follow the [proto3 - * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). - * - * While the single segment variable follows the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** follow RFC 6570 Section - * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding - * for multi segment variables. - * - * The path variables **must not** refer to any repeated or mapped field, - * because client libraries are not capable of handling such variable expansion. - * - * The path variables **must not** capture the leading "/" character. The reason - * is that the most common use case "{var}" does not capture the leading "/" - * character. For consistency, all path variables must share the same behavior. - * - * Repeated message fields must not be mapped to URL query parameters, because - * no client library can support such complicated mapping. - * - * If an API needs to use a JSON array for request or response body, it can map - * the request or response body to a repeated field. However, some gRPC - * Transcoding implementations may not support this feature. - */ -export interface HttpRule { - /** - * Selects a method to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax - * details. - */ - selector: string; - /** - * Maps to HTTP GET. Used for listing and getting information about - * resources. - */ - get?: string; - /** Maps to HTTP PUT. Used for replacing a resource. */ - put?: string; - /** Maps to HTTP POST. Used for creating a resource or performing an action. */ - post?: string; - /** Maps to HTTP DELETE. Used for deleting a resource. */ - delete?: string; - /** Maps to HTTP PATCH. Used for updating a resource. */ - patch?: string; - /** - * 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. - */ - custom?: CustomHttpPattern; - /** - * The name of the request field whose value is mapped to the HTTP request - * body, or `*` for mapping all request fields not captured by the path - * pattern to the HTTP body, or omitted for not having any HTTP request body. - * - * NOTE: the referred field must be present at the top-level of the request - * message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * response body. When omitted, the entire response message will be used - * as the HTTP response body. - * - * NOTE: The referred field must be present at the top-level of the response - * message type. - */ - responseBody: string; - /** - * 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). - */ - additionalBindings: HttpRule[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -function createBaseHttp(): Http { - return { - rules: [], - fullyDecodeReservedExpansion: false - }; -} -export const Http = { - typeUrl: "/google.api.Http", - encode(message: Http, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Http { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Http { - const message = createBaseHttp(); - message.rules = object.rules?.map(e => HttpRule.fromPartial(e)) || []; - message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; - return message; - } -}; -function createBaseHttpRule(): HttpRule { - return { - selector: "", - get: undefined, - put: undefined, - post: undefined, - delete: undefined, - patch: undefined, - custom: undefined, - body: "", - responseBody: "", - additionalBindings: [] - }; -} -export const HttpRule = { - typeUrl: "/google.api.HttpRule", - encode(message: HttpRule, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttpRule(); - while (reader.pos < end) { - const 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 = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): HttpRule { - const message = createBaseHttpRule(); - message.selector = object.selector ?? ""; - message.get = object.get ?? undefined; - message.put = object.put ?? undefined; - message.post = object.post ?? undefined; - message.delete = object.delete ?? undefined; - message.patch = object.patch ?? undefined; - message.custom = object.custom !== undefined && object.custom !== null ? CustomHttpPattern.fromPartial(object.custom) : undefined; - message.body = object.body ?? ""; - message.responseBody = object.responseBody ?? ""; - message.additionalBindings = object.additionalBindings?.map(e => HttpRule.fromPartial(e)) || []; - return message; - } -}; -function createBaseCustomHttpPattern(): CustomHttpPattern { - return { - kind: "", - path: "" - }; -} -export const CustomHttpPattern = { - typeUrl: "/google.api.CustomHttpPattern", - encode(message: CustomHttpPattern, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCustomHttpPattern(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = createBaseCustomHttpPattern(); - message.kind = object.kind ?? ""; - message.path = object.path ?? ""; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/google/protobuf/any.ts b/networks/cosmos/codegen/google/protobuf/any.ts deleted file mode 100644 index 2b2d565b..00000000 --- a/networks/cosmos/codegen/google/protobuf/any.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** - * `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); - * } - * // or ... - * if (any.isSameTypeAs(Foo.getDefaultInstance())) { - * foo = any.unpack(Foo.getDefaultInstance()); - * } - * - * 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 := anypb.New(foo) - * if err != nil { - * ... - * } - * ... - * foo := &pb.Foo{} - * if err := any.UnmarshalTo(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" - * } - */ -export interface 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. As of May 2023, there are no widely used type server - * implementations and no plans to implement one. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -function createBaseAny(): Any { - return { - typeUrl: "", - value: new Uint8Array() - }; -} -export const Any = { - typeUrl: "/google.protobuf.Any", - encode(message: Any, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Any { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAny(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Any { - const message = createBaseAny(); - message.typeUrl = object.typeUrl ?? ""; - message.value = object.value ?? new Uint8Array(); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/google/protobuf/duration.ts b/networks/cosmos/codegen/google/protobuf/duration.ts deleted file mode 100644 index 0d6b1726..00000000 --- a/networks/cosmos/codegen/google/protobuf/duration.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: bigint; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -function createBaseDuration(): Duration { - return { - seconds: BigInt(0), - nanos: 0 - }; -} -export const Duration = { - typeUrl: "/google.protobuf.Duration", - encode(message: Duration, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.seconds !== BigInt(0)) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Duration { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDuration(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): Duration { - const message = createBaseDuration(); - message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0); - message.nanos = object.nanos ?? 0; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/google/protobuf/timestamp.ts b/networks/cosmos/codegen/google/protobuf/timestamp.ts deleted file mode 100644 index 5c563ad7..00000000 --- a/networks/cosmos/codegen/google/protobuf/timestamp.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); - * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * Example 6: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: bigint; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -function createBaseTimestamp(): Timestamp { - return { - seconds: BigInt(0), - nanos: 0 - }; -} -export const Timestamp = { - typeUrl: "/google.protobuf.Timestamp", - encode(message: Timestamp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.seconds !== BigInt(0)) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimestamp(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): Timestamp { - const message = createBaseTimestamp(); - message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0); - message.nanos = object.nanos ?? 0; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/helpers.ts b/networks/cosmos/codegen/helpers.ts deleted file mode 100644 index 537cfe4b..00000000 --- a/networks/cosmos/codegen/helpers.ts +++ /dev/null @@ -1,251 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.11 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== 'undefined') return globalThis; - if (typeof self !== 'undefined') return self; - if (typeof window !== 'undefined') return window; - if (typeof global !== 'undefined') return global; - throw 'Unable to locate global object'; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, 'base64').toString('binary')); - -export function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, 'binary').toString('base64')); - -export function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return btoa(bin.join('')); -} - -export interface AminoHeight { - readonly revision_number?: string; - readonly revision_height?: string; -} - -export function omitDefault( - input: T -): T | undefined { - if (typeof input === 'string') { - return input === '' ? undefined : input; - } - - if (typeof input === 'number') { - return input === 0 ? undefined : input; - } - - if (typeof input === 'bigint') { - return input === BigInt(0) ? undefined : input; - } - - throw new Error(`Got unsupported type ${typeof input}`); -} - -interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: bigint; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - - nanos: number; -} - -export function toDuration(duration: string): Duration { - return { - seconds: BigInt(Math.floor(parseInt(duration) / 1000000000)), - nanos: parseInt(duration) % 1000000000 - }; -} - -export function fromDuration(duration: Duration): string { - return ( - parseInt(duration.seconds.toString()) * 1000000000 + - duration.nanos - ).toString(); -} - -export function isSet(value: any): boolean { - return value !== null && value !== undefined; -} - -export function isObject(value: any): boolean { - return typeof value === 'object' && value !== null; -} - -export interface PageRequest { - key: Uint8Array; - offset: bigint; - limit: bigint; - countTotal: boolean; - reverse: boolean; -} - -export interface PageRequestParams { - 'pagination.key'?: string; - 'pagination.offset'?: string; - 'pagination.limit'?: string; - 'pagination.count_total'?: boolean; - 'pagination.reverse'?: boolean; -} - -export interface Params { - params: PageRequestParams; -} - -export const setPaginationParams = ( - options: Params, - pagination?: PageRequest -) => { - if (!pagination) { - return options; - } - - if (typeof pagination?.countTotal !== 'undefined') { - options.params['pagination.count_total'] = pagination.countTotal; - } - if (typeof pagination?.key !== 'undefined') { - // String to Uint8Array - // let uint8arr = new Uint8Array(Buffer.from(data,'base64')); - - // Uint8Array to String - options.params['pagination.key'] = Buffer.from(pagination.key).toString( - 'base64' - ); - } - if (typeof pagination?.limit !== 'undefined') { - options.params['pagination.limit'] = pagination.limit.toString(); - } - if (typeof pagination?.offset !== 'undefined') { - options.params['pagination.offset'] = pagination.offset.toString(); - } - if (typeof pagination?.reverse !== 'undefined') { - options.params['pagination.reverse'] = pagination.reverse; - } - - return options; -}; - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | bigint - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude>, - never - >; - -export interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: bigint; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - - nanos: number; -} - -export function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(date.getTime() / 1_000); - const nanos = (date.getTime() % 1000) * 1000000; - return { - seconds, - nanos - }; -} - -export function fromTimestamp(t: Timestamp): Date { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} - -const timestampFromJSON = (object: any): Timestamp => { - return { - seconds: isSet(object.seconds) - ? BigInt(object.seconds.toString()) - : BigInt(0), - nanos: isSet(object.nanos) ? Number(object.nanos) : 0 - }; -}; - -export function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === 'string') { - return toTimestamp(new Date(o)); - } else { - return timestampFromJSON(o); - } -} - -function numberToLong(number: number) { - return BigInt(Math.trunc(number)); -} - diff --git a/networks/cosmos/codegen/tendermint/abci/types.ts b/networks/cosmos/codegen/tendermint/abci/types.ts deleted file mode 100644 index 5289bc37..00000000 --- a/networks/cosmos/codegen/tendermint/abci/types.ts +++ /dev/null @@ -1,3153 +0,0 @@ -import { Timestamp } from "../../google/protobuf/timestamp"; -import { ConsensusParams } from "../types/params"; -import { Header } from "../types/types"; -import { ProofOps } from "../crypto/proof"; -import { PublicKey } from "../crypto/keys"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -export enum CheckTxType { - NEW = 0, - RECHECK = 1, - UNRECOGNIZED = -1, -} -export function checkTxTypeFromJSON(object: any): CheckTxType { - switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; - } -} -export function checkTxTypeToJSON(object: CheckTxType): string { - switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - case CheckTxType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum ResponseOfferSnapshot_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Snapshot accepted, apply chunks */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** REJECT - Reject this specific snapshot, try others */ - REJECT = 3, - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - REJECT_FORMAT = 4, - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - REJECT_SENDER = 5, - UNRECOGNIZED = -1, -} -export function responseOfferSnapshot_ResultFromJSON(object: any): ResponseOfferSnapshot_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; - } -} -export function responseOfferSnapshot_ResultToJSON(object: ResponseOfferSnapshot_Result): string { - switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - case ResponseOfferSnapshot_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum ResponseApplySnapshotChunk_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Chunk successfully accepted */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** RETRY - Retry chunk (combine with refetch and reject) */ - RETRY = 3, - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - RETRY_SNAPSHOT = 4, - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - REJECT_SNAPSHOT = 5, - UNRECOGNIZED = -1, -} -export function responseApplySnapshotChunk_ResultFromJSON(object: any): ResponseApplySnapshotChunk_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; - } -} -export function responseApplySnapshotChunk_ResultToJSON(object: ResponseApplySnapshotChunk_Result): string { - switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum ResponseProcessProposal_ProposalStatus { - UNKNOWN = 0, - ACCEPT = 1, - REJECT = 2, - UNRECOGNIZED = -1, -} -export function responseProcessProposal_ProposalStatusFromJSON(object: any): ResponseProcessProposal_ProposalStatus { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseProcessProposal_ProposalStatus.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseProcessProposal_ProposalStatus.ACCEPT; - case 2: - case "REJECT": - return ResponseProcessProposal_ProposalStatus.REJECT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseProcessProposal_ProposalStatus.UNRECOGNIZED; - } -} -export function responseProcessProposal_ProposalStatusToJSON(object: ResponseProcessProposal_ProposalStatus): string { - switch (object) { - case ResponseProcessProposal_ProposalStatus.UNKNOWN: - return "UNKNOWN"; - case ResponseProcessProposal_ProposalStatus.ACCEPT: - return "ACCEPT"; - case ResponseProcessProposal_ProposalStatus.REJECT: - return "REJECT"; - case ResponseProcessProposal_ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum MisbehaviorType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2, - UNRECOGNIZED = -1, -} -export function misbehaviorTypeFromJSON(object: any): MisbehaviorType { - switch (object) { - case 0: - case "UNKNOWN": - return MisbehaviorType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return MisbehaviorType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return MisbehaviorType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return MisbehaviorType.UNRECOGNIZED; - } -} -export function misbehaviorTypeToJSON(object: MisbehaviorType): string { - switch (object) { - case MisbehaviorType.UNKNOWN: - return "UNKNOWN"; - case MisbehaviorType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case MisbehaviorType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - case MisbehaviorType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export interface Request { - echo?: RequestEcho; - flush?: RequestFlush; - info?: RequestInfo; - initChain?: RequestInitChain; - query?: RequestQuery; - beginBlock?: RequestBeginBlock; - checkTx?: RequestCheckTx; - deliverTx?: RequestDeliverTx; - endBlock?: RequestEndBlock; - commit?: RequestCommit; - listSnapshots?: RequestListSnapshots; - offerSnapshot?: RequestOfferSnapshot; - loadSnapshotChunk?: RequestLoadSnapshotChunk; - applySnapshotChunk?: RequestApplySnapshotChunk; - prepareProposal?: RequestPrepareProposal; - processProposal?: RequestProcessProposal; -} -export interface RequestEcho { - message: string; -} -export interface RequestFlush {} -export interface RequestInfo { - version: string; - blockVersion: bigint; - p2pVersion: bigint; - abciVersion: string; -} -export interface RequestInitChain { - time: Date; - chainId: string; - consensusParams?: ConsensusParams; - validators: ValidatorUpdate[]; - appStateBytes: Uint8Array; - initialHeight: bigint; -} -export interface RequestQuery { - data: Uint8Array; - path: string; - height: bigint; - prove: boolean; -} -export interface RequestBeginBlock { - hash: Uint8Array; - header: Header; - lastCommitInfo: CommitInfo; - byzantineValidators: Misbehavior[]; -} -export interface RequestCheckTx { - tx: Uint8Array; - type: CheckTxType; -} -export interface RequestDeliverTx { - tx: Uint8Array; -} -export interface RequestEndBlock { - height: bigint; -} -export interface RequestCommit {} -/** lists available snapshots */ -export interface RequestListSnapshots {} -/** offers a snapshot to the application */ -export interface RequestOfferSnapshot { - /** snapshot offered by peers */ - snapshot?: Snapshot; - /** light client-verified app hash for snapshot height */ - appHash: Uint8Array; -} -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunk { - height: bigint; - format: number; - chunk: number; -} -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunk { - index: number; - chunk: Uint8Array; - sender: string; -} -export interface RequestPrepareProposal { - /** the modified transactions cannot exceed this size. */ - maxTxBytes: bigint; - /** - * txs is an array of transactions that will be included in a block, - * sent to the app for possible modifications. - */ - txs: Uint8Array[]; - localLastCommit: ExtendedCommitInfo; - misbehavior: Misbehavior[]; - height: bigint; - time: Date; - nextValidatorsHash: Uint8Array; - /** address of the public key of the validator proposing the block. */ - proposerAddress: Uint8Array; -} -export interface RequestProcessProposal { - txs: Uint8Array[]; - proposedLastCommit: CommitInfo; - misbehavior: Misbehavior[]; - /** hash is the merkle root hash of the fields of the proposed block. */ - hash: Uint8Array; - height: bigint; - time: Date; - nextValidatorsHash: Uint8Array; - /** address of the public key of the original proposer of the block. */ - proposerAddress: Uint8Array; -} -export interface Response { - exception?: ResponseException; - echo?: ResponseEcho; - flush?: ResponseFlush; - info?: ResponseInfo; - initChain?: ResponseInitChain; - query?: ResponseQuery; - beginBlock?: ResponseBeginBlock; - checkTx?: ResponseCheckTx; - deliverTx?: ResponseDeliverTx; - endBlock?: ResponseEndBlock; - commit?: ResponseCommit; - listSnapshots?: ResponseListSnapshots; - offerSnapshot?: ResponseOfferSnapshot; - loadSnapshotChunk?: ResponseLoadSnapshotChunk; - applySnapshotChunk?: ResponseApplySnapshotChunk; - prepareProposal?: ResponsePrepareProposal; - processProposal?: ResponseProcessProposal; -} -/** nondeterministic */ -export interface ResponseException { - error: string; -} -export interface ResponseEcho { - message: string; -} -export interface ResponseFlush {} -export interface ResponseInfo { - data: string; - version: string; - appVersion: bigint; - lastBlockHeight: bigint; - lastBlockAppHash: Uint8Array; -} -export interface ResponseInitChain { - consensusParams?: ConsensusParams; - validators: ValidatorUpdate[]; - appHash: Uint8Array; -} -export interface ResponseQuery { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: bigint; - key: Uint8Array; - value: Uint8Array; - proofOps?: ProofOps; - height: bigint; - codespace: string; -} -export interface ResponseBeginBlock { - events: Event[]; -} -export interface ResponseCheckTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: bigint; - gasUsed: bigint; - events: Event[]; - codespace: string; - sender: string; - priority: bigint; - /** - * mempool_error is set by CometBFT. - * ABCI applictions creating a ResponseCheckTX should not set mempool_error. - */ - mempoolError: string; -} -export interface ResponseDeliverTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: bigint; - gasUsed: bigint; - events: Event[]; - codespace: string; -} -export interface ResponseEndBlock { - validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates?: ConsensusParams; - events: Event[]; -} -export interface ResponseCommit { - /** reserve 1 */ - data: Uint8Array; - retainHeight: bigint; -} -export interface ResponseListSnapshots { - snapshots: Snapshot[]; -} -export interface ResponseOfferSnapshot { - result: ResponseOfferSnapshot_Result; -} -export interface ResponseLoadSnapshotChunk { - chunk: Uint8Array; -} -export interface ResponseApplySnapshotChunk { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetchChunks: number[]; - /** Chunk senders to reject and ban */ - rejectSenders: string[]; -} -export interface ResponsePrepareProposal { - txs: Uint8Array[]; -} -export interface ResponseProcessProposal { - status: ResponseProcessProposal_ProposalStatus; -} -export interface CommitInfo { - round: number; - votes: VoteInfo[]; -} -export interface ExtendedCommitInfo { - /** The round at which the block proposer decided in the previous height. */ - round: number; - /** - * List of validators' addresses in the last validator set with their voting - * information, including vote extensions. - */ - votes: ExtendedVoteInfo[]; -} -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface Event { - type: string; - attributes: EventAttribute[]; -} -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttribute { - key: string; - value: string; - /** nondeterministic */ - index: boolean; -} -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResult { - height: bigint; - index: number; - tx: Uint8Array; - result: ResponseDeliverTx; -} -/** Validator */ -export interface Validator { - /** - * The first 20 bytes of SHA256(public key) - * PubKey pub_key = 2 [(gogoproto.nullable)=false]; - */ - address: Uint8Array; - /** The voting power */ - power: bigint; -} -/** ValidatorUpdate */ -export interface ValidatorUpdate { - pubKey: PublicKey; - power: bigint; -} -/** VoteInfo */ -export interface VoteInfo { - validator: Validator; - signedLastBlock: boolean; -} -export interface ExtendedVoteInfo { - validator: Validator; - signedLastBlock: boolean; - /** Reserved for future use */ - voteExtension: Uint8Array; -} -export interface Misbehavior { - type: MisbehaviorType; - /** The offending validator */ - validator: Validator; - /** The height when the offense occurred */ - height: bigint; - /** The corresponding time where the offense occurred */ - time: Date; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - totalVotingPower: bigint; -} -export interface Snapshot { - /** The height at which the snapshot was taken */ - height: bigint; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} -function createBaseRequest(): Request { - return { - echo: undefined, - flush: undefined, - info: undefined, - initChain: undefined, - query: undefined, - beginBlock: undefined, - checkTx: undefined, - deliverTx: undefined, - endBlock: undefined, - commit: undefined, - listSnapshots: undefined, - offerSnapshot: undefined, - loadSnapshotChunk: undefined, - applySnapshotChunk: undefined, - prepareProposal: undefined, - processProposal: undefined - }; -} -export const Request = { - typeUrl: "/tendermint.abci.Request", - encode(message: Request, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.echo !== undefined) { - RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim(); - } - if (message.flush !== undefined) { - RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim(); - } - if (message.info !== undefined) { - RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); - } - if (message.initChain !== undefined) { - RequestInitChain.encode(message.initChain, writer.uint32(42).fork()).ldelim(); - } - if (message.query !== undefined) { - RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - RequestBeginBlock.encode(message.beginBlock, writer.uint32(58).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - RequestDeliverTx.encode(message.deliverTx, writer.uint32(74).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - RequestEndBlock.encode(message.endBlock, writer.uint32(82).fork()).ldelim(); - } - if (message.commit !== undefined) { - RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - RequestListSnapshots.encode(message.listSnapshots, writer.uint32(98).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(106).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(114).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - if (message.prepareProposal !== undefined) { - RequestPrepareProposal.encode(message.prepareProposal, writer.uint32(130).fork()).ldelim(); - } - if (message.processProposal !== undefined) { - RequestProcessProposal.encode(message.processProposal, writer.uint32(138).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Request { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 5: - message.initChain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.beginBlock = RequestBeginBlock.decode(reader, reader.uint32()); - break; - case 8: - message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.endBlock = RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32()); - break; - case 13: - message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32()); - break; - case 14: - message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 15: - message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.prepareProposal = RequestPrepareProposal.decode(reader, reader.uint32()); - break; - case 17: - message.processProposal = RequestProcessProposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Request { - const message = createBaseRequest(); - message.echo = object.echo !== undefined && object.echo !== null ? RequestEcho.fromPartial(object.echo) : undefined; - message.flush = object.flush !== undefined && object.flush !== null ? RequestFlush.fromPartial(object.flush) : undefined; - message.info = object.info !== undefined && object.info !== null ? RequestInfo.fromPartial(object.info) : undefined; - message.initChain = object.initChain !== undefined && object.initChain !== null ? RequestInitChain.fromPartial(object.initChain) : undefined; - message.query = object.query !== undefined && object.query !== null ? RequestQuery.fromPartial(object.query) : undefined; - message.beginBlock = object.beginBlock !== undefined && object.beginBlock !== null ? RequestBeginBlock.fromPartial(object.beginBlock) : undefined; - message.checkTx = object.checkTx !== undefined && object.checkTx !== null ? RequestCheckTx.fromPartial(object.checkTx) : undefined; - message.deliverTx = object.deliverTx !== undefined && object.deliverTx !== null ? RequestDeliverTx.fromPartial(object.deliverTx) : undefined; - message.endBlock = object.endBlock !== undefined && object.endBlock !== null ? RequestEndBlock.fromPartial(object.endBlock) : undefined; - message.commit = object.commit !== undefined && object.commit !== null ? RequestCommit.fromPartial(object.commit) : undefined; - message.listSnapshots = object.listSnapshots !== undefined && object.listSnapshots !== null ? RequestListSnapshots.fromPartial(object.listSnapshots) : undefined; - message.offerSnapshot = object.offerSnapshot !== undefined && object.offerSnapshot !== null ? RequestOfferSnapshot.fromPartial(object.offerSnapshot) : undefined; - message.loadSnapshotChunk = object.loadSnapshotChunk !== undefined && object.loadSnapshotChunk !== null ? RequestLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk) : undefined; - message.applySnapshotChunk = object.applySnapshotChunk !== undefined && object.applySnapshotChunk !== null ? RequestApplySnapshotChunk.fromPartial(object.applySnapshotChunk) : undefined; - message.prepareProposal = object.prepareProposal !== undefined && object.prepareProposal !== null ? RequestPrepareProposal.fromPartial(object.prepareProposal) : undefined; - message.processProposal = object.processProposal !== undefined && object.processProposal !== null ? RequestProcessProposal.fromPartial(object.processProposal) : undefined; - return message; - } -}; -function createBaseRequestEcho(): RequestEcho { - return { - message: "" - }; -} -export const RequestEcho = { - typeUrl: "/tendermint.abci.RequestEcho", - encode(message: RequestEcho, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestEcho { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestEcho(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestEcho { - const message = createBaseRequestEcho(); - message.message = object.message ?? ""; - return message; - } -}; -function createBaseRequestFlush(): RequestFlush { - return {}; -} -export const RequestFlush = { - typeUrl: "/tendermint.abci.RequestFlush", - encode(_: RequestFlush, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestFlush { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestFlush(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(_: DeepPartial): RequestFlush { - const message = createBaseRequestFlush(); - return message; - } -}; -function createBaseRequestInfo(): RequestInfo { - return { - version: "", - blockVersion: BigInt(0), - p2pVersion: BigInt(0), - abciVersion: "" - }; -} -export const RequestInfo = { - typeUrl: "/tendermint.abci.RequestInfo", - encode(message: RequestInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== "") { - writer.uint32(10).string(message.version); - } - if (message.blockVersion !== BigInt(0)) { - writer.uint32(16).uint64(message.blockVersion); - } - if (message.p2pVersion !== BigInt(0)) { - writer.uint32(24).uint64(message.p2pVersion); - } - if (message.abciVersion !== "") { - writer.uint32(34).string(message.abciVersion); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.blockVersion = reader.uint64(); - break; - case 3: - message.p2pVersion = reader.uint64(); - break; - case 4: - message.abciVersion = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestInfo { - const message = createBaseRequestInfo(); - message.version = object.version ?? ""; - message.blockVersion = object.blockVersion !== undefined && object.blockVersion !== null ? BigInt(object.blockVersion.toString()) : BigInt(0); - message.p2pVersion = object.p2pVersion !== undefined && object.p2pVersion !== null ? BigInt(object.p2pVersion.toString()) : BigInt(0); - message.abciVersion = object.abciVersion ?? ""; - return message; - } -}; -function createBaseRequestInitChain(): RequestInitChain { - return { - time: new Date(), - chainId: "", - consensusParams: undefined, - validators: [], - appStateBytes: new Uint8Array(), - initialHeight: BigInt(0) - }; -} -export const RequestInitChain = { - typeUrl: "/tendermint.abci.RequestInitChain", - encode(message: RequestInitChain, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.appStateBytes.length !== 0) { - writer.uint32(42).bytes(message.appStateBytes); - } - if (message.initialHeight !== BigInt(0)) { - writer.uint32(48).int64(message.initialHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestInitChain { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestInitChain(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 4: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 5: - message.appStateBytes = reader.bytes(); - break; - case 6: - message.initialHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestInitChain { - const message = createBaseRequestInitChain(); - message.time = object.time ?? undefined; - message.chainId = object.chainId ?? ""; - message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null ? ConsensusParams.fromPartial(object.consensusParams) : undefined; - message.validators = object.validators?.map(e => ValidatorUpdate.fromPartial(e)) || []; - message.appStateBytes = object.appStateBytes ?? new Uint8Array(); - message.initialHeight = object.initialHeight !== undefined && object.initialHeight !== null ? BigInt(object.initialHeight.toString()) : BigInt(0); - return message; - } -}; -function createBaseRequestQuery(): RequestQuery { - return { - data: new Uint8Array(), - path: "", - height: BigInt(0), - prove: false - }; -} -export const RequestQuery = { - typeUrl: "/tendermint.abci.RequestQuery", - encode(message: RequestQuery, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).int64(message.height); - } - if (message.prove === true) { - writer.uint32(32).bool(message.prove); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestQuery { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestQuery(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): RequestQuery { - const message = createBaseRequestQuery(); - message.data = object.data ?? new Uint8Array(); - message.path = object.path ?? ""; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.prove = object.prove ?? false; - return message; - } -}; -function createBaseRequestBeginBlock(): RequestBeginBlock { - return { - hash: new Uint8Array(), - header: Header.fromPartial({}), - lastCommitInfo: CommitInfo.fromPartial({}), - byzantineValidators: [] - }; -} -export const RequestBeginBlock = { - typeUrl: "/tendermint.abci.RequestBeginBlock", - encode(message: RequestBeginBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.lastCommitInfo !== undefined) { - CommitInfo.encode(message.lastCommitInfo, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.byzantineValidators) { - Misbehavior.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestBeginBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestBeginBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.header = Header.decode(reader, reader.uint32()); - break; - case 3: - message.lastCommitInfo = CommitInfo.decode(reader, reader.uint32()); - break; - case 4: - message.byzantineValidators.push(Misbehavior.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestBeginBlock { - const message = createBaseRequestBeginBlock(); - message.hash = object.hash ?? new Uint8Array(); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.lastCommitInfo = object.lastCommitInfo !== undefined && object.lastCommitInfo !== null ? CommitInfo.fromPartial(object.lastCommitInfo) : undefined; - message.byzantineValidators = object.byzantineValidators?.map(e => Misbehavior.fromPartial(e)) || []; - return message; - } -}; -function createBaseRequestCheckTx(): RequestCheckTx { - return { - tx: new Uint8Array(), - type: 0 - }; -} -export const RequestCheckTx = { - typeUrl: "/tendermint.abci.RequestCheckTx", - encode(message: RequestCheckTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - if (message.type !== 0) { - writer.uint32(16).int32(message.type); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestCheckTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestCheckTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestCheckTx { - const message = createBaseRequestCheckTx(); - message.tx = object.tx ?? new Uint8Array(); - message.type = object.type ?? 0; - return message; - } -}; -function createBaseRequestDeliverTx(): RequestDeliverTx { - return { - tx: new Uint8Array() - }; -} -export const RequestDeliverTx = { - typeUrl: "/tendermint.abci.RequestDeliverTx", - encode(message: RequestDeliverTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestDeliverTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestDeliverTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestDeliverTx { - const message = createBaseRequestDeliverTx(); - message.tx = object.tx ?? new Uint8Array(); - return message; - } -}; -function createBaseRequestEndBlock(): RequestEndBlock { - return { - height: BigInt(0) - }; -} -export const RequestEndBlock = { - typeUrl: "/tendermint.abci.RequestEndBlock", - encode(message: RequestEndBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestEndBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestEndBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestEndBlock { - const message = createBaseRequestEndBlock(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - return message; - } -}; -function createBaseRequestCommit(): RequestCommit { - return {}; -} -export const RequestCommit = { - typeUrl: "/tendermint.abci.RequestCommit", - encode(_: RequestCommit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestCommit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestCommit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(_: DeepPartial): RequestCommit { - const message = createBaseRequestCommit(); - return message; - } -}; -function createBaseRequestListSnapshots(): RequestListSnapshots { - return {}; -} -export const RequestListSnapshots = { - typeUrl: "/tendermint.abci.RequestListSnapshots", - encode(_: RequestListSnapshots, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestListSnapshots { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestListSnapshots(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(_: DeepPartial): RequestListSnapshots { - const message = createBaseRequestListSnapshots(); - return message; - } -}; -function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { - return { - snapshot: undefined, - appHash: new Uint8Array() - }; -} -export const RequestOfferSnapshot = { - typeUrl: "/tendermint.abci.RequestOfferSnapshot", - encode(message: RequestOfferSnapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.snapshot !== undefined) { - Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(18).bytes(message.appHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestOfferSnapshot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestOfferSnapshot(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestOfferSnapshot { - const message = createBaseRequestOfferSnapshot(); - message.snapshot = object.snapshot !== undefined && object.snapshot !== null ? Snapshot.fromPartial(object.snapshot) : undefined; - message.appHash = object.appHash ?? new Uint8Array(); - return message; - } -}; -function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { - return { - height: BigInt(0), - format: 0, - chunk: 0 - }; -} -export const RequestLoadSnapshotChunk = { - typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", - encode(message: RequestLoadSnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunk !== 0) { - writer.uint32(24).uint32(message.chunk); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestLoadSnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestLoadSnapshotChunk(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): RequestLoadSnapshotChunk { - const message = createBaseRequestLoadSnapshotChunk(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.format = object.format ?? 0; - message.chunk = object.chunk ?? 0; - return message; - } -}; -function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { - return { - index: 0, - chunk: new Uint8Array(), - sender: "" - }; -} -export const RequestApplySnapshotChunk = { - typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", - encode(message: RequestApplySnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.chunk.length !== 0) { - writer.uint32(18).bytes(message.chunk); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestApplySnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestApplySnapshotChunk(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): RequestApplySnapshotChunk { - const message = createBaseRequestApplySnapshotChunk(); - message.index = object.index ?? 0; - message.chunk = object.chunk ?? new Uint8Array(); - message.sender = object.sender ?? ""; - return message; - } -}; -function createBaseRequestPrepareProposal(): RequestPrepareProposal { - return { - maxTxBytes: BigInt(0), - txs: [], - localLastCommit: ExtendedCommitInfo.fromPartial({}), - misbehavior: [], - height: BigInt(0), - time: new Date(), - nextValidatorsHash: new Uint8Array(), - proposerAddress: new Uint8Array() - }; -} -export const RequestPrepareProposal = { - typeUrl: "/tendermint.abci.RequestPrepareProposal", - encode(message: RequestPrepareProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxTxBytes !== BigInt(0)) { - writer.uint32(8).int64(message.maxTxBytes); - } - for (const v of message.txs) { - writer.uint32(18).bytes(v!); - } - if (message.localLastCommit !== undefined) { - ExtendedCommitInfo.encode(message.localLastCommit, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.misbehavior) { - Misbehavior.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.height !== BigInt(0)) { - writer.uint32(40).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(50).fork()).ldelim(); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(58).bytes(message.nextValidatorsHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(66).bytes(message.proposerAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestPrepareProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestPrepareProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxTxBytes = reader.int64(); - break; - case 2: - message.txs.push(reader.bytes()); - break; - case 3: - message.localLastCommit = ExtendedCommitInfo.decode(reader, reader.uint32()); - break; - case 4: - message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); - break; - case 5: - message.height = reader.int64(); - break; - case 6: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.nextValidatorsHash = reader.bytes(); - break; - case 8: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestPrepareProposal { - const message = createBaseRequestPrepareProposal(); - message.maxTxBytes = object.maxTxBytes !== undefined && object.maxTxBytes !== null ? BigInt(object.maxTxBytes.toString()) : BigInt(0); - message.txs = object.txs?.map(e => e) || []; - message.localLastCommit = object.localLastCommit !== undefined && object.localLastCommit !== null ? ExtendedCommitInfo.fromPartial(object.localLastCommit) : undefined; - message.misbehavior = object.misbehavior?.map(e => Misbehavior.fromPartial(e)) || []; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array(); - message.proposerAddress = object.proposerAddress ?? new Uint8Array(); - return message; - } -}; -function createBaseRequestProcessProposal(): RequestProcessProposal { - return { - txs: [], - proposedLastCommit: CommitInfo.fromPartial({}), - misbehavior: [], - hash: new Uint8Array(), - height: BigInt(0), - time: new Date(), - nextValidatorsHash: new Uint8Array(), - proposerAddress: new Uint8Array() - }; -} -export const RequestProcessProposal = { - typeUrl: "/tendermint.abci.RequestProcessProposal", - encode(message: RequestProcessProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - if (message.proposedLastCommit !== undefined) { - CommitInfo.encode(message.proposedLastCommit, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.misbehavior) { - Misbehavior.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.height !== BigInt(0)) { - writer.uint32(40).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(50).fork()).ldelim(); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(58).bytes(message.nextValidatorsHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(66).bytes(message.proposerAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestProcessProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestProcessProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - case 2: - message.proposedLastCommit = CommitInfo.decode(reader, reader.uint32()); - break; - case 3: - message.misbehavior.push(Misbehavior.decode(reader, reader.uint32())); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.height = reader.int64(); - break; - case 6: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.nextValidatorsHash = reader.bytes(); - break; - case 8: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): RequestProcessProposal { - const message = createBaseRequestProcessProposal(); - message.txs = object.txs?.map(e => e) || []; - message.proposedLastCommit = object.proposedLastCommit !== undefined && object.proposedLastCommit !== null ? CommitInfo.fromPartial(object.proposedLastCommit) : undefined; - message.misbehavior = object.misbehavior?.map(e => Misbehavior.fromPartial(e)) || []; - message.hash = object.hash ?? new Uint8Array(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array(); - message.proposerAddress = object.proposerAddress ?? new Uint8Array(); - return message; - } -}; -function createBaseResponse(): Response { - return { - exception: undefined, - echo: undefined, - flush: undefined, - info: undefined, - initChain: undefined, - query: undefined, - beginBlock: undefined, - checkTx: undefined, - deliverTx: undefined, - endBlock: undefined, - commit: undefined, - listSnapshots: undefined, - offerSnapshot: undefined, - loadSnapshotChunk: undefined, - applySnapshotChunk: undefined, - prepareProposal: undefined, - processProposal: undefined - }; -} -export const Response = { - typeUrl: "/tendermint.abci.Response", - encode(message: Response, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.exception !== undefined) { - ResponseException.encode(message.exception, writer.uint32(10).fork()).ldelim(); - } - if (message.echo !== undefined) { - ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim(); - } - if (message.flush !== undefined) { - ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim(); - } - if (message.info !== undefined) { - ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim(); - } - if (message.initChain !== undefined) { - ResponseInitChain.encode(message.initChain, writer.uint32(50).fork()).ldelim(); - } - if (message.query !== undefined) { - ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - ResponseBeginBlock.encode(message.beginBlock, writer.uint32(66).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - ResponseCheckTx.encode(message.checkTx, writer.uint32(74).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - ResponseDeliverTx.encode(message.deliverTx, writer.uint32(82).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - ResponseEndBlock.encode(message.endBlock, writer.uint32(90).fork()).ldelim(); - } - if (message.commit !== undefined) { - ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(106).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(114).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(130).fork()).ldelim(); - } - if (message.prepareProposal !== undefined) { - ResponsePrepareProposal.encode(message.prepareProposal, writer.uint32(138).fork()).ldelim(); - } - if (message.processProposal !== undefined) { - ResponseProcessProposal.encode(message.processProposal, writer.uint32(146).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Response { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 6: - message.initChain = ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.beginBlock = ResponseBeginBlock.decode(reader, reader.uint32()); - break; - case 9: - message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 11: - message.endBlock = ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32()); - break; - case 14: - message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32()); - break; - case 15: - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32()); - break; - case 17: - message.prepareProposal = ResponsePrepareProposal.decode(reader, reader.uint32()); - break; - case 18: - message.processProposal = ResponseProcessProposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Response { - const message = createBaseResponse(); - message.exception = object.exception !== undefined && object.exception !== null ? ResponseException.fromPartial(object.exception) : undefined; - message.echo = object.echo !== undefined && object.echo !== null ? ResponseEcho.fromPartial(object.echo) : undefined; - message.flush = object.flush !== undefined && object.flush !== null ? ResponseFlush.fromPartial(object.flush) : undefined; - message.info = object.info !== undefined && object.info !== null ? ResponseInfo.fromPartial(object.info) : undefined; - message.initChain = object.initChain !== undefined && object.initChain !== null ? ResponseInitChain.fromPartial(object.initChain) : undefined; - message.query = object.query !== undefined && object.query !== null ? ResponseQuery.fromPartial(object.query) : undefined; - message.beginBlock = object.beginBlock !== undefined && object.beginBlock !== null ? ResponseBeginBlock.fromPartial(object.beginBlock) : undefined; - message.checkTx = object.checkTx !== undefined && object.checkTx !== null ? ResponseCheckTx.fromPartial(object.checkTx) : undefined; - message.deliverTx = object.deliverTx !== undefined && object.deliverTx !== null ? ResponseDeliverTx.fromPartial(object.deliverTx) : undefined; - message.endBlock = object.endBlock !== undefined && object.endBlock !== null ? ResponseEndBlock.fromPartial(object.endBlock) : undefined; - message.commit = object.commit !== undefined && object.commit !== null ? ResponseCommit.fromPartial(object.commit) : undefined; - message.listSnapshots = object.listSnapshots !== undefined && object.listSnapshots !== null ? ResponseListSnapshots.fromPartial(object.listSnapshots) : undefined; - message.offerSnapshot = object.offerSnapshot !== undefined && object.offerSnapshot !== null ? ResponseOfferSnapshot.fromPartial(object.offerSnapshot) : undefined; - message.loadSnapshotChunk = object.loadSnapshotChunk !== undefined && object.loadSnapshotChunk !== null ? ResponseLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk) : undefined; - message.applySnapshotChunk = object.applySnapshotChunk !== undefined && object.applySnapshotChunk !== null ? ResponseApplySnapshotChunk.fromPartial(object.applySnapshotChunk) : undefined; - message.prepareProposal = object.prepareProposal !== undefined && object.prepareProposal !== null ? ResponsePrepareProposal.fromPartial(object.prepareProposal) : undefined; - message.processProposal = object.processProposal !== undefined && object.processProposal !== null ? ResponseProcessProposal.fromPartial(object.processProposal) : undefined; - return message; - } -}; -function createBaseResponseException(): ResponseException { - return { - error: "" - }; -} -export const ResponseException = { - typeUrl: "/tendermint.abci.ResponseException", - encode(message: ResponseException, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.error !== "") { - writer.uint32(10).string(message.error); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseException { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseException(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseException { - const message = createBaseResponseException(); - message.error = object.error ?? ""; - return message; - } -}; -function createBaseResponseEcho(): ResponseEcho { - return { - message: "" - }; -} -export const ResponseEcho = { - typeUrl: "/tendermint.abci.ResponseEcho", - encode(message: ResponseEcho, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseEcho { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseEcho(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseEcho { - const message = createBaseResponseEcho(); - message.message = object.message ?? ""; - return message; - } -}; -function createBaseResponseFlush(): ResponseFlush { - return {}; -} -export const ResponseFlush = { - typeUrl: "/tendermint.abci.ResponseFlush", - encode(_: ResponseFlush, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseFlush { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseFlush(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(_: DeepPartial): ResponseFlush { - const message = createBaseResponseFlush(); - return message; - } -}; -function createBaseResponseInfo(): ResponseInfo { - return { - data: "", - version: "", - appVersion: BigInt(0), - lastBlockHeight: BigInt(0), - lastBlockAppHash: new Uint8Array() - }; -} -export const ResponseInfo = { - typeUrl: "/tendermint.abci.ResponseInfo", - encode(message: ResponseInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data !== "") { - writer.uint32(10).string(message.data); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.appVersion !== BigInt(0)) { - writer.uint32(24).uint64(message.appVersion); - } - if (message.lastBlockHeight !== BigInt(0)) { - writer.uint32(32).int64(message.lastBlockHeight); - } - if (message.lastBlockAppHash.length !== 0) { - writer.uint32(42).bytes(message.lastBlockAppHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.appVersion = reader.uint64(); - break; - case 4: - message.lastBlockHeight = reader.int64(); - break; - case 5: - message.lastBlockAppHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseInfo { - const message = createBaseResponseInfo(); - message.data = object.data ?? ""; - message.version = object.version ?? ""; - message.appVersion = object.appVersion !== undefined && object.appVersion !== null ? BigInt(object.appVersion.toString()) : BigInt(0); - message.lastBlockHeight = object.lastBlockHeight !== undefined && object.lastBlockHeight !== null ? BigInt(object.lastBlockHeight.toString()) : BigInt(0); - message.lastBlockAppHash = object.lastBlockAppHash ?? new Uint8Array(); - return message; - } -}; -function createBaseResponseInitChain(): ResponseInitChain { - return { - consensusParams: undefined, - validators: [], - appHash: new Uint8Array() - }; -} -export const ResponseInitChain = { - typeUrl: "/tendermint.abci.ResponseInitChain", - encode(message: ResponseInitChain, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(26).bytes(message.appHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseInitChain { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseInitChain(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 2: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 3: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseInitChain { - const message = createBaseResponseInitChain(); - message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null ? ConsensusParams.fromPartial(object.consensusParams) : undefined; - message.validators = object.validators?.map(e => ValidatorUpdate.fromPartial(e)) || []; - message.appHash = object.appHash ?? new Uint8Array(); - return message; - } -}; -function createBaseResponseQuery(): ResponseQuery { - return { - code: 0, - log: "", - info: "", - index: BigInt(0), - key: new Uint8Array(), - value: new Uint8Array(), - proofOps: undefined, - height: BigInt(0), - codespace: "" - }; -} -export const ResponseQuery = { - typeUrl: "/tendermint.abci.ResponseQuery", - encode(message: ResponseQuery, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.index !== BigInt(0)) { - writer.uint32(40).int64(message.index); - } - if (message.key.length !== 0) { - writer.uint32(50).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(58).bytes(message.value); - } - if (message.proofOps !== undefined) { - ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim(); - } - if (message.height !== BigInt(0)) { - writer.uint32(72).int64(message.height); - } - if (message.codespace !== "") { - writer.uint32(82).string(message.codespace); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseQuery { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseQuery(); - while (reader.pos < end) { - const 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.proofOps = 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; - }, - fromPartial(object: DeepPartial): ResponseQuery { - const message = createBaseResponseQuery(); - message.code = object.code ?? 0; - message.log = object.log ?? ""; - message.info = object.info ?? ""; - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - message.proofOps = object.proofOps !== undefined && object.proofOps !== null ? ProofOps.fromPartial(object.proofOps) : undefined; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.codespace = object.codespace ?? ""; - return message; - } -}; -function createBaseResponseBeginBlock(): ResponseBeginBlock { - return { - events: [] - }; -} -export const ResponseBeginBlock = { - typeUrl: "/tendermint.abci.ResponseBeginBlock", - encode(message: ResponseBeginBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.events) { - Event.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseBeginBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseBeginBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseBeginBlock { - const message = createBaseResponseBeginBlock(); - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - return message; - } -}; -function createBaseResponseCheckTx(): ResponseCheckTx { - return { - code: 0, - data: new Uint8Array(), - log: "", - info: "", - gasWanted: BigInt(0), - gasUsed: BigInt(0), - events: [], - codespace: "", - sender: "", - priority: BigInt(0), - mempoolError: "" - }; -} -export const ResponseCheckTx = { - typeUrl: "/tendermint.abci.ResponseCheckTx", - encode(message: ResponseCheckTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== BigInt(0)) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - if (message.sender !== "") { - writer.uint32(74).string(message.sender); - } - if (message.priority !== BigInt(0)) { - writer.uint32(80).int64(message.priority); - } - if (message.mempoolError !== "") { - writer.uint32(90).string(message.mempoolError); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseCheckTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseCheckTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = reader.int64(); - break; - case 6: - message.gasUsed = reader.int64(); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - case 9: - message.sender = reader.string(); - break; - case 10: - message.priority = reader.int64(); - break; - case 11: - message.mempoolError = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseCheckTx { - const message = createBaseResponseCheckTx(); - message.code = object.code ?? 0; - message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.info = object.info ?? ""; - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.codespace = object.codespace ?? ""; - message.sender = object.sender ?? ""; - message.priority = object.priority !== undefined && object.priority !== null ? BigInt(object.priority.toString()) : BigInt(0); - message.mempoolError = object.mempoolError ?? ""; - return message; - } -}; -function createBaseResponseDeliverTx(): ResponseDeliverTx { - return { - code: 0, - data: new Uint8Array(), - log: "", - info: "", - gasWanted: BigInt(0), - gasUsed: BigInt(0), - events: [], - codespace: "" - }; -} -export const ResponseDeliverTx = { - typeUrl: "/tendermint.abci.ResponseDeliverTx", - encode(message: ResponseDeliverTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== BigInt(0)) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseDeliverTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseDeliverTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = reader.int64(); - break; - case 6: - message.gasUsed = reader.int64(); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseDeliverTx { - const message = createBaseResponseDeliverTx(); - message.code = object.code ?? 0; - message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.info = object.info ?? ""; - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.codespace = object.codespace ?? ""; - return message; - } -}; -function createBaseResponseEndBlock(): ResponseEndBlock { - return { - validatorUpdates: [], - consensusParamUpdates: undefined, - events: [] - }; -} -export const ResponseEndBlock = { - typeUrl: "/tendermint.abci.ResponseEndBlock", - encode(message: ResponseEndBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validatorUpdates) { - ValidatorUpdate.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusParamUpdates !== undefined) { - ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseEndBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseEndBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 2: - message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32()); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseEndBlock { - const message = createBaseResponseEndBlock(); - message.validatorUpdates = object.validatorUpdates?.map(e => ValidatorUpdate.fromPartial(e)) || []; - message.consensusParamUpdates = object.consensusParamUpdates !== undefined && object.consensusParamUpdates !== null ? ConsensusParams.fromPartial(object.consensusParamUpdates) : undefined; - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - return message; - } -}; -function createBaseResponseCommit(): ResponseCommit { - return { - data: new Uint8Array(), - retainHeight: BigInt(0) - }; -} -export const ResponseCommit = { - typeUrl: "/tendermint.abci.ResponseCommit", - encode(message: ResponseCommit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.retainHeight !== BigInt(0)) { - writer.uint32(24).int64(message.retainHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseCommit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseCommit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retainHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseCommit { - const message = createBaseResponseCommit(); - message.data = object.data ?? new Uint8Array(); - message.retainHeight = object.retainHeight !== undefined && object.retainHeight !== null ? BigInt(object.retainHeight.toString()) : BigInt(0); - return message; - } -}; -function createBaseResponseListSnapshots(): ResponseListSnapshots { - return { - snapshots: [] - }; -} -export const ResponseListSnapshots = { - typeUrl: "/tendermint.abci.ResponseListSnapshots", - encode(message: ResponseListSnapshots, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.snapshots) { - Snapshot.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseListSnapshots { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseListSnapshots(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseListSnapshots { - const message = createBaseResponseListSnapshots(); - message.snapshots = object.snapshots?.map(e => Snapshot.fromPartial(e)) || []; - return message; - } -}; -function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { - return { - result: 0 - }; -} -export const ResponseOfferSnapshot = { - typeUrl: "/tendermint.abci.ResponseOfferSnapshot", - encode(message: ResponseOfferSnapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseOfferSnapshot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseOfferSnapshot(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseOfferSnapshot { - const message = createBaseResponseOfferSnapshot(); - message.result = object.result ?? 0; - return message; - } -}; -function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { - return { - chunk: new Uint8Array() - }; -} -export const ResponseLoadSnapshotChunk = { - typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", - encode(message: ResponseLoadSnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.chunk.length !== 0) { - writer.uint32(10).bytes(message.chunk); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseLoadSnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseLoadSnapshotChunk(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk { - const message = createBaseResponseLoadSnapshotChunk(); - message.chunk = object.chunk ?? new Uint8Array(); - return message; - } -}; -function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { - return { - result: 0, - refetchChunks: [], - rejectSenders: [] - }; -} -export const ResponseApplySnapshotChunk = { - typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", - encode(message: ResponseApplySnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - writer.uint32(18).fork(); - for (const v of message.refetchChunks) { - writer.uint32(v); - } - writer.ldelim(); - for (const v of message.rejectSenders) { - writer.uint32(26).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseApplySnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseApplySnapshotChunk(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetchChunks.push(reader.uint32()); - } - } else { - message.refetchChunks.push(reader.uint32()); - } - break; - case 3: - message.rejectSenders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseApplySnapshotChunk { - const message = createBaseResponseApplySnapshotChunk(); - message.result = object.result ?? 0; - message.refetchChunks = object.refetchChunks?.map(e => e) || []; - message.rejectSenders = object.rejectSenders?.map(e => e) || []; - return message; - } -}; -function createBaseResponsePrepareProposal(): ResponsePrepareProposal { - return { - txs: [] - }; -} -export const ResponsePrepareProposal = { - typeUrl: "/tendermint.abci.ResponsePrepareProposal", - encode(message: ResponsePrepareProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponsePrepareProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponsePrepareProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponsePrepareProposal { - const message = createBaseResponsePrepareProposal(); - message.txs = object.txs?.map(e => e) || []; - return message; - } -}; -function createBaseResponseProcessProposal(): ResponseProcessProposal { - return { - status: 0 - }; -} -export const ResponseProcessProposal = { - typeUrl: "/tendermint.abci.ResponseProcessProposal", - encode(message: ResponseProcessProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.status !== 0) { - writer.uint32(8).int32(message.status); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseProcessProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseProcessProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ResponseProcessProposal { - const message = createBaseResponseProcessProposal(); - message.status = object.status ?? 0; - return message; - } -}; -function createBaseCommitInfo(): CommitInfo { - return { - round: 0, - votes: [] - }; -} -export const CommitInfo = { - typeUrl: "/tendermint.abci.CommitInfo", - encode(message: CommitInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - VoteInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommitInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommitInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): CommitInfo { - const message = createBaseCommitInfo(); - message.round = object.round ?? 0; - message.votes = object.votes?.map(e => VoteInfo.fromPartial(e)) || []; - return message; - } -}; -function createBaseExtendedCommitInfo(): ExtendedCommitInfo { - return { - round: 0, - votes: [] - }; -} -export const ExtendedCommitInfo = { - typeUrl: "/tendermint.abci.ExtendedCommitInfo", - encode(message: ExtendedCommitInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - ExtendedVoteInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ExtendedCommitInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtendedCommitInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(ExtendedVoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ExtendedCommitInfo { - const message = createBaseExtendedCommitInfo(); - message.round = object.round ?? 0; - message.votes = object.votes?.map(e => ExtendedVoteInfo.fromPartial(e)) || []; - return message; - } -}; -function createBaseEvent(): Event { - return { - type: "", - attributes: [] - }; -} -export const Event = { - typeUrl: "/tendermint.abci.Event", - encode(message: Event, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - EventAttribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Event { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(EventAttribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Event { - const message = createBaseEvent(); - message.type = object.type ?? ""; - message.attributes = object.attributes?.map(e => EventAttribute.fromPartial(e)) || []; - return message; - } -}; -function createBaseEventAttribute(): EventAttribute { - return { - key: "", - value: "", - index: false - }; -} -export const EventAttribute = { - typeUrl: "/tendermint.abci.EventAttribute", - encode(message: EventAttribute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - if (message.index === true) { - writer.uint32(24).bool(message.index); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventAttribute { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventAttribute(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): EventAttribute { - const message = createBaseEventAttribute(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - message.index = object.index ?? false; - return message; - } -}; -function createBaseTxResult(): TxResult { - return { - height: BigInt(0), - index: 0, - tx: new Uint8Array(), - result: ResponseDeliverTx.fromPartial({}) - }; -} -export const TxResult = { - typeUrl: "/tendermint.abci.TxResult", - encode(message: TxResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.index !== 0) { - writer.uint32(16).uint32(message.index); - } - if (message.tx.length !== 0) { - writer.uint32(26).bytes(message.tx); - } - if (message.result !== undefined) { - ResponseDeliverTx.encode(message.result, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxResult { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxResult(); - while (reader.pos < end) { - const 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 = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxResult { - const message = createBaseTxResult(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.index = object.index ?? 0; - message.tx = object.tx ?? new Uint8Array(); - message.result = object.result !== undefined && object.result !== null ? ResponseDeliverTx.fromPartial(object.result) : undefined; - return message; - } -}; -function createBaseValidator(): Validator { - return { - address: new Uint8Array(), - power: BigInt(0) - }; -} -export const Validator = { - typeUrl: "/tendermint.abci.Validator", - encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.power !== BigInt(0)) { - writer.uint32(24).int64(message.power); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Validator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidator(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): Validator { - const message = createBaseValidator(); - message.address = object.address ?? new Uint8Array(); - message.power = object.power !== undefined && object.power !== null ? BigInt(object.power.toString()) : BigInt(0); - return message; - } -}; -function createBaseValidatorUpdate(): ValidatorUpdate { - return { - pubKey: PublicKey.fromPartial({}), - power: BigInt(0) - }; -} -export const ValidatorUpdate = { - typeUrl: "/tendermint.abci.ValidatorUpdate", - encode(message: ValidatorUpdate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.power !== BigInt(0)) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorUpdate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorUpdate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ValidatorUpdate { - const message = createBaseValidatorUpdate(); - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? PublicKey.fromPartial(object.pubKey) : undefined; - message.power = object.power !== undefined && object.power !== null ? BigInt(object.power.toString()) : BigInt(0); - return message; - } -}; -function createBaseVoteInfo(): VoteInfo { - return { - validator: Validator.fromPartial({}), - signedLastBlock: false - }; -} -export const VoteInfo = { - typeUrl: "/tendermint.abci.VoteInfo", - encode(message: VoteInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signedLastBlock === true) { - writer.uint32(16).bool(message.signedLastBlock); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): VoteInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVoteInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signedLastBlock = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): VoteInfo { - const message = createBaseVoteInfo(); - message.validator = object.validator !== undefined && object.validator !== null ? Validator.fromPartial(object.validator) : undefined; - message.signedLastBlock = object.signedLastBlock ?? false; - return message; - } -}; -function createBaseExtendedVoteInfo(): ExtendedVoteInfo { - return { - validator: Validator.fromPartial({}), - signedLastBlock: false, - voteExtension: new Uint8Array() - }; -} -export const ExtendedVoteInfo = { - typeUrl: "/tendermint.abci.ExtendedVoteInfo", - encode(message: ExtendedVoteInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signedLastBlock === true) { - writer.uint32(16).bool(message.signedLastBlock); - } - if (message.voteExtension.length !== 0) { - writer.uint32(26).bytes(message.voteExtension); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ExtendedVoteInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtendedVoteInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signedLastBlock = reader.bool(); - break; - case 3: - message.voteExtension = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ExtendedVoteInfo { - const message = createBaseExtendedVoteInfo(); - message.validator = object.validator !== undefined && object.validator !== null ? Validator.fromPartial(object.validator) : undefined; - message.signedLastBlock = object.signedLastBlock ?? false; - message.voteExtension = object.voteExtension ?? new Uint8Array(); - return message; - } -}; -function createBaseMisbehavior(): Misbehavior { - return { - type: 0, - validator: Validator.fromPartial({}), - height: BigInt(0), - time: new Date(), - totalVotingPower: BigInt(0) - }; -} -export const Misbehavior = { - typeUrl: "/tendermint.abci.Misbehavior", - encode(message: Misbehavior, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(40).int64(message.totalVotingPower); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Misbehavior { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMisbehavior(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.totalVotingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Misbehavior { - const message = createBaseMisbehavior(); - message.type = object.type ?? 0; - message.validator = object.validator !== undefined && object.validator !== null ? Validator.fromPartial(object.validator) : undefined; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - return message; - } -}; -function createBaseSnapshot(): Snapshot { - return { - height: BigInt(0), - format: 0, - chunks: 0, - hash: new Uint8Array(), - metadata: new Uint8Array() - }; -} -export const Snapshot = { - typeUrl: "/tendermint.abci.Snapshot", - encode(message: Snapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata.length !== 0) { - writer.uint32(42).bytes(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Snapshot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshot(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): Snapshot { - const message = createBaseSnapshot(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.format = object.format ?? 0; - message.chunks = object.chunks ?? 0; - message.hash = object.hash ?? new Uint8Array(); - message.metadata = object.metadata ?? new Uint8Array(); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/crypto/keys.ts b/networks/cosmos/codegen/tendermint/crypto/keys.ts deleted file mode 100644 index e73bb601..00000000 --- a/networks/cosmos/codegen/tendermint/crypto/keys.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** PublicKey defines the keys available for use with Validators */ -export interface PublicKey { - ed25519?: Uint8Array; - secp256k1?: Uint8Array; -} -function createBasePublicKey(): PublicKey { - return { - ed25519: undefined, - secp256k1: undefined - }; -} -export const PublicKey = { - typeUrl: "/tendermint.crypto.PublicKey", - encode(message: PublicKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePublicKey(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): PublicKey { - const message = createBasePublicKey(); - message.ed25519 = object.ed25519 ?? undefined; - message.secp256k1 = object.secp256k1 ?? undefined; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/crypto/proof.ts b/networks/cosmos/codegen/tendermint/crypto/proof.ts deleted file mode 100644 index fca37502..00000000 --- a/networks/cosmos/codegen/tendermint/crypto/proof.ts +++ /dev/null @@ -1,277 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -export interface Proof { - total: bigint; - index: bigint; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof?: Proof; -} -export interface DominoOp { - key: string; - input: string; - output: string; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} -function createBaseProof(): Proof { - return { - total: BigInt(0), - index: BigInt(0), - leafHash: new Uint8Array(), - aunts: [] - }; -} -export const Proof = { - typeUrl: "/tendermint.crypto.Proof", - encode(message: Proof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.total !== BigInt(0)) { - writer.uint32(8).int64(message.total); - } - if (message.index !== BigInt(0)) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Proof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.int64(); - break; - case 2: - message.index = reader.int64(); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Proof { - const message = createBaseProof(); - message.total = object.total !== undefined && object.total !== null ? BigInt(object.total.toString()) : BigInt(0); - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - message.leafHash = object.leafHash ?? new Uint8Array(); - message.aunts = object.aunts?.map(e => e) || []; - return message; - } -}; -function createBaseValueOp(): ValueOp { - return { - key: new Uint8Array(), - proof: undefined - }; -} -export const ValueOp = { - typeUrl: "/tendermint.crypto.ValueOp", - encode(message: ValueOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValueOp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ValueOp { - const message = createBaseValueOp(); - message.key = object.key ?? new Uint8Array(); - message.proof = object.proof !== undefined && object.proof !== null ? Proof.fromPartial(object.proof) : undefined; - return message; - } -}; -function createBaseDominoOp(): DominoOp { - return { - key: "", - input: "", - output: "" - }; -} -export const DominoOp = { - typeUrl: "/tendermint.crypto.DominoOp", - encode(message: DominoOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDominoOp(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): DominoOp { - const message = createBaseDominoOp(); - message.key = object.key ?? ""; - message.input = object.input ?? ""; - message.output = object.output ?? ""; - return message; - } -}; -function createBaseProofOp(): ProofOp { - return { - type: "", - key: new Uint8Array(), - data: new Uint8Array() - }; -} -export const ProofOp = { - typeUrl: "/tendermint.crypto.ProofOp", - encode(message: ProofOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProofOp(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): ProofOp { - const message = createBaseProofOp(); - message.type = object.type ?? ""; - message.key = object.key ?? new Uint8Array(); - message.data = object.data ?? new Uint8Array(); - return message; - } -}; -function createBaseProofOps(): ProofOps { - return { - ops: [] - }; -} -export const ProofOps = { - typeUrl: "/tendermint.crypto.ProofOps", - encode(message: ProofOps, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProofOps(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ProofOps { - const message = createBaseProofOps(); - message.ops = object.ops?.map(e => ProofOp.fromPartial(e)) || []; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/types/block.ts b/networks/cosmos/codegen/tendermint/types/block.ts deleted file mode 100644 index 36e3ceb7..00000000 --- a/networks/cosmos/codegen/tendermint/types/block.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Header, Data, Commit } from "./types"; -import { EvidenceList } from "./evidence"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -export interface Block { - header: Header; - data: Data; - evidence: EvidenceList; - lastCommit?: Commit; -} -function createBaseBlock(): Block { - return { - header: Header.fromPartial({}), - data: Data.fromPartial({}), - evidence: EvidenceList.fromPartial({}), - lastCommit: undefined - }; -} -export const Block = { - typeUrl: "/tendermint.types.Block", - encode(message: Block, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.data !== undefined) { - Data.encode(message.data, writer.uint32(18).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceList.encode(message.evidence, writer.uint32(26).fork()).ldelim(); - } - if (message.lastCommit !== undefined) { - Commit.encode(message.lastCommit, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Block { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.data = Data.decode(reader, reader.uint32()); - break; - case 3: - message.evidence = EvidenceList.decode(reader, reader.uint32()); - break; - case 4: - message.lastCommit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Block { - const message = createBaseBlock(); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.data = object.data !== undefined && object.data !== null ? Data.fromPartial(object.data) : undefined; - message.evidence = object.evidence !== undefined && object.evidence !== null ? EvidenceList.fromPartial(object.evidence) : undefined; - message.lastCommit = object.lastCommit !== undefined && object.lastCommit !== null ? Commit.fromPartial(object.lastCommit) : undefined; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/types/evidence.ts b/networks/cosmos/codegen/tendermint/types/evidence.ts deleted file mode 100644 index a91d72c7..00000000 --- a/networks/cosmos/codegen/tendermint/types/evidence.ts +++ /dev/null @@ -1,244 +0,0 @@ -import { Vote, LightBlock } from "./types"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { Validator } from "./validator"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -export interface Evidence { - duplicateVoteEvidence?: DuplicateVoteEvidence; - lightClientAttackEvidence?: LightClientAttackEvidence; -} -/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ -export interface DuplicateVoteEvidence { - voteA?: Vote; - voteB?: Vote; - totalVotingPower: bigint; - validatorPower: bigint; - timestamp: Date; -} -/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ -export interface LightClientAttackEvidence { - conflictingBlock?: LightBlock; - commonHeight: bigint; - byzantineValidators: Validator[]; - totalVotingPower: bigint; - timestamp: Date; -} -export interface EvidenceList { - evidence: Evidence[]; -} -function createBaseEvidence(): Evidence { - return { - duplicateVoteEvidence: undefined, - lightClientAttackEvidence: undefined - }; -} -export const Evidence = { - typeUrl: "/tendermint.types.Evidence", - encode(message: Evidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.duplicateVoteEvidence !== undefined) { - DuplicateVoteEvidence.encode(message.duplicateVoteEvidence, writer.uint32(10).fork()).ldelim(); - } - if (message.lightClientAttackEvidence !== undefined) { - LightClientAttackEvidence.encode(message.lightClientAttackEvidence, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Evidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.duplicateVoteEvidence = DuplicateVoteEvidence.decode(reader, reader.uint32()); - break; - case 2: - message.lightClientAttackEvidence = LightClientAttackEvidence.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Evidence { - const message = createBaseEvidence(); - message.duplicateVoteEvidence = object.duplicateVoteEvidence !== undefined && object.duplicateVoteEvidence !== null ? DuplicateVoteEvidence.fromPartial(object.duplicateVoteEvidence) : undefined; - message.lightClientAttackEvidence = object.lightClientAttackEvidence !== undefined && object.lightClientAttackEvidence !== null ? LightClientAttackEvidence.fromPartial(object.lightClientAttackEvidence) : undefined; - return message; - } -}; -function createBaseDuplicateVoteEvidence(): DuplicateVoteEvidence { - return { - voteA: undefined, - voteB: undefined, - totalVotingPower: BigInt(0), - validatorPower: BigInt(0), - timestamp: new Date() - }; -} -export const DuplicateVoteEvidence = { - typeUrl: "/tendermint.types.DuplicateVoteEvidence", - encode(message: DuplicateVoteEvidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.voteA !== undefined) { - Vote.encode(message.voteA, writer.uint32(10).fork()).ldelim(); - } - if (message.voteB !== undefined) { - Vote.encode(message.voteB, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(24).int64(message.totalVotingPower); - } - if (message.validatorPower !== BigInt(0)) { - writer.uint32(32).int64(message.validatorPower); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DuplicateVoteEvidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDuplicateVoteEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voteA = Vote.decode(reader, reader.uint32()); - break; - case 2: - message.voteB = Vote.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = reader.int64(); - break; - case 4: - message.validatorPower = reader.int64(); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): DuplicateVoteEvidence { - const message = createBaseDuplicateVoteEvidence(); - message.voteA = object.voteA !== undefined && object.voteA !== null ? Vote.fromPartial(object.voteA) : undefined; - message.voteB = object.voteB !== undefined && object.voteB !== null ? Vote.fromPartial(object.voteB) : undefined; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - message.validatorPower = object.validatorPower !== undefined && object.validatorPower !== null ? BigInt(object.validatorPower.toString()) : BigInt(0); - message.timestamp = object.timestamp ?? undefined; - return message; - } -}; -function createBaseLightClientAttackEvidence(): LightClientAttackEvidence { - return { - conflictingBlock: undefined, - commonHeight: BigInt(0), - byzantineValidators: [], - totalVotingPower: BigInt(0), - timestamp: new Date() - }; -} -export const LightClientAttackEvidence = { - typeUrl: "/tendermint.types.LightClientAttackEvidence", - encode(message: LightClientAttackEvidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.conflictingBlock !== undefined) { - LightBlock.encode(message.conflictingBlock, writer.uint32(10).fork()).ldelim(); - } - if (message.commonHeight !== BigInt(0)) { - writer.uint32(16).int64(message.commonHeight); - } - for (const v of message.byzantineValidators) { - Validator.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(32).int64(message.totalVotingPower); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LightClientAttackEvidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLightClientAttackEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.conflictingBlock = LightBlock.decode(reader, reader.uint32()); - break; - case 2: - message.commonHeight = reader.int64(); - break; - case 3: - message.byzantineValidators.push(Validator.decode(reader, reader.uint32())); - break; - case 4: - message.totalVotingPower = reader.int64(); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): LightClientAttackEvidence { - const message = createBaseLightClientAttackEvidence(); - message.conflictingBlock = object.conflictingBlock !== undefined && object.conflictingBlock !== null ? LightBlock.fromPartial(object.conflictingBlock) : undefined; - message.commonHeight = object.commonHeight !== undefined && object.commonHeight !== null ? BigInt(object.commonHeight.toString()) : BigInt(0); - message.byzantineValidators = object.byzantineValidators?.map(e => Validator.fromPartial(e)) || []; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - message.timestamp = object.timestamp ?? undefined; - return message; - } -}; -function createBaseEvidenceList(): EvidenceList { - return { - evidence: [] - }; -} -export const EvidenceList = { - typeUrl: "/tendermint.types.EvidenceList", - encode(message: EvidenceList, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.evidence) { - Evidence.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EvidenceList { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvidenceList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Evidence.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): EvidenceList { - const message = createBaseEvidenceList(); - message.evidence = object.evidence?.map(e => Evidence.fromPartial(e)) || []; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/types/params.ts b/networks/cosmos/codegen/tendermint/types/params.ts deleted file mode 100644 index 3930d5c0..00000000 --- a/networks/cosmos/codegen/tendermint/types/params.ts +++ /dev/null @@ -1,342 +0,0 @@ -import { Duration } from "../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParams { - block?: BlockParams; - evidence?: EvidenceParams; - validator?: ValidatorParams; - version?: VersionParams; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - maxBytes: bigint; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - maxGas: bigint; -} -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParams { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - maxAgeNumBlocks: bigint; - /** - * 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). - */ - maxAgeDuration: Duration; - /** - * 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 - */ - maxBytes: bigint; -} -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParams { - pubKeyTypes: string[]; -} -/** VersionParams contains the ABCI application version. */ -export interface VersionParams { - app: bigint; -} -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParams { - blockMaxBytes: bigint; - blockMaxGas: bigint; -} -function createBaseConsensusParams(): ConsensusParams { - return { - block: undefined, - evidence: undefined, - validator: undefined, - version: undefined - }; -} -export const ConsensusParams = { - typeUrl: "/tendermint.types.ConsensusParams", - encode(message: ConsensusParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ConsensusParams { - const message = createBaseConsensusParams(); - message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; - message.evidence = object.evidence !== undefined && object.evidence !== null ? EvidenceParams.fromPartial(object.evidence) : undefined; - message.validator = object.validator !== undefined && object.validator !== null ? ValidatorParams.fromPartial(object.validator) : undefined; - message.version = object.version !== undefined && object.version !== null ? VersionParams.fromPartial(object.version) : undefined; - return message; - } -}; -function createBaseBlockParams(): BlockParams { - return { - maxBytes: BigInt(0), - maxGas: BigInt(0) - }; -} -export const BlockParams = { - typeUrl: "/tendermint.types.BlockParams", - encode(message: BlockParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxBytes !== BigInt(0)) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== BigInt(0)) { - writer.uint32(16).int64(message.maxGas); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = reader.int64(); - break; - case 2: - message.maxGas = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): BlockParams { - const message = createBaseBlockParams(); - message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? BigInt(object.maxBytes.toString()) : BigInt(0); - message.maxGas = object.maxGas !== undefined && object.maxGas !== null ? BigInt(object.maxGas.toString()) : BigInt(0); - return message; - } -}; -function createBaseEvidenceParams(): EvidenceParams { - return { - maxAgeNumBlocks: BigInt(0), - maxAgeDuration: Duration.fromPartial({}), - maxBytes: BigInt(0) - }; -} -export const EvidenceParams = { - typeUrl: "/tendermint.types.EvidenceParams", - encode(message: EvidenceParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxAgeNumBlocks !== BigInt(0)) { - writer.uint32(8).int64(message.maxAgeNumBlocks); - } - if (message.maxAgeDuration !== undefined) { - Duration.encode(message.maxAgeDuration, writer.uint32(18).fork()).ldelim(); - } - if (message.maxBytes !== BigInt(0)) { - writer.uint32(24).int64(message.maxBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EvidenceParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvidenceParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxAgeNumBlocks = reader.int64(); - break; - case 2: - message.maxAgeDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.maxBytes = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): EvidenceParams { - const message = createBaseEvidenceParams(); - message.maxAgeNumBlocks = object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null ? BigInt(object.maxAgeNumBlocks.toString()) : BigInt(0); - message.maxAgeDuration = object.maxAgeDuration !== undefined && object.maxAgeDuration !== null ? Duration.fromPartial(object.maxAgeDuration) : undefined; - message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? BigInt(object.maxBytes.toString()) : BigInt(0); - return message; - } -}; -function createBaseValidatorParams(): ValidatorParams { - return { - pubKeyTypes: [] - }; -} -export const ValidatorParams = { - typeUrl: "/tendermint.types.ValidatorParams", - encode(message: ValidatorParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pubKeyTypes) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKeyTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ValidatorParams { - const message = createBaseValidatorParams(); - message.pubKeyTypes = object.pubKeyTypes?.map(e => e) || []; - return message; - } -}; -function createBaseVersionParams(): VersionParams { - return { - app: BigInt(0) - }; -} -export const VersionParams = { - typeUrl: "/tendermint.types.VersionParams", - encode(message: VersionParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.app !== BigInt(0)) { - writer.uint32(8).uint64(message.app); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): VersionParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVersionParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): VersionParams { - const message = createBaseVersionParams(); - message.app = object.app !== undefined && object.app !== null ? BigInt(object.app.toString()) : BigInt(0); - return message; - } -}; -function createBaseHashedParams(): HashedParams { - return { - blockMaxBytes: BigInt(0), - blockMaxGas: BigInt(0) - }; -} -export const HashedParams = { - typeUrl: "/tendermint.types.HashedParams", - encode(message: HashedParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockMaxBytes !== BigInt(0)) { - writer.uint32(8).int64(message.blockMaxBytes); - } - if (message.blockMaxGas !== BigInt(0)) { - writer.uint32(16).int64(message.blockMaxGas); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): HashedParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHashedParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockMaxBytes = reader.int64(); - break; - case 2: - message.blockMaxGas = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): HashedParams { - const message = createBaseHashedParams(); - message.blockMaxBytes = object.blockMaxBytes !== undefined && object.blockMaxBytes !== null ? BigInt(object.blockMaxBytes.toString()) : BigInt(0); - message.blockMaxGas = object.blockMaxGas !== undefined && object.blockMaxGas !== null ? BigInt(object.blockMaxGas.toString()) : BigInt(0); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/types/types.ts b/networks/cosmos/codegen/tendermint/types/types.ts deleted file mode 100644 index f134f7a6..00000000 --- a/networks/cosmos/codegen/tendermint/types/types.ts +++ /dev/null @@ -1,1013 +0,0 @@ -import { Proof } from "../crypto/proof"; -import { Consensus } from "../version/types"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { ValidatorSet } from "./validator"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - case BlockIDFlag.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - case SignedMsgType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof; -} -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader; -} -/** Header defines the structure of a block header. */ -export interface Header { - /** basic block info */ - version: Consensus; - chainId: string; - height: bigint; - time: Date; - /** prev block info */ - lastBlockId: BlockID; - /** hashes of block data */ - lastCommitHash: Uint8Array; - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} -/** Data contains the set of transactions included in the block */ -export interface 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. - */ - txs: Uint8Array[]; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: bigint; - round: number; - blockId: BlockID; - timestamp: Date; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: bigint; - round: number; - blockId: BlockID; - signatures: CommitSig[]; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date; - signature: Uint8Array; -} -export interface Proposal { - type: SignedMsgType; - height: bigint; - round: number; - polRound: number; - blockId: BlockID; - timestamp: Date; - signature: Uint8Array; -} -export interface SignedHeader { - header?: Header; - commit?: Commit; -} -export interface LightBlock { - signedHeader?: SignedHeader; - validatorSet?: ValidatorSet; -} -export interface BlockMeta { - blockId: BlockID; - blockSize: bigint; - header: Header; - numTxs: bigint; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof?: Proof; -} -function createBasePartSetHeader(): PartSetHeader { - return { - total: 0, - hash: new Uint8Array() - }; -} -export const PartSetHeader = { - typeUrl: "/tendermint.types.PartSetHeader", - encode(message: PartSetHeader, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePartSetHeader(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): PartSetHeader { - const message = createBasePartSetHeader(); - message.total = object.total ?? 0; - message.hash = object.hash ?? new Uint8Array(); - return message; - } -}; -function createBasePart(): Part { - return { - index: 0, - bytes: new Uint8Array(), - proof: Proof.fromPartial({}) - }; -} -export const Part = { - typeUrl: "/tendermint.types.Part", - encode(message: Part, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Part { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePart(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Part { - const message = createBasePart(); - message.index = object.index ?? 0; - message.bytes = object.bytes ?? new Uint8Array(); - message.proof = object.proof !== undefined && object.proof !== null ? Proof.fromPartial(object.proof) : undefined; - return message; - } -}; -function createBaseBlockID(): BlockID { - return { - hash: new Uint8Array(), - partSetHeader: PartSetHeader.fromPartial({}) - }; -} -export const BlockID = { - typeUrl: "/tendermint.types.BlockID", - encode(message: BlockID, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode(message.partSetHeader, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BlockID { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockID(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): BlockID { - const message = createBaseBlockID(); - message.hash = object.hash ?? new Uint8Array(); - message.partSetHeader = object.partSetHeader !== undefined && object.partSetHeader !== null ? PartSetHeader.fromPartial(object.partSetHeader) : undefined; - return message; - } -}; -function createBaseHeader(): Header { - return { - version: Consensus.fromPartial({}), - chainId: "", - height: BigInt(0), - time: new Date(), - lastBlockId: BlockID.fromPartial({}), - lastCommitHash: new Uint8Array(), - dataHash: new Uint8Array(), - validatorsHash: new Uint8Array(), - nextValidatorsHash: new Uint8Array(), - consensusHash: new Uint8Array(), - appHash: new Uint8Array(), - lastResultsHash: new Uint8Array(), - evidenceHash: new Uint8Array(), - proposerAddress: new Uint8Array() - }; -} -export const Header = { - typeUrl: "/tendermint.types.Header", - encode(message: Header, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Header { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial
): Header { - const message = createBaseHeader(); - message.version = object.version !== undefined && object.version !== null ? Consensus.fromPartial(object.version) : undefined; - message.chainId = object.chainId ?? ""; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.lastBlockId = object.lastBlockId !== undefined && object.lastBlockId !== null ? BlockID.fromPartial(object.lastBlockId) : undefined; - message.lastCommitHash = object.lastCommitHash ?? new Uint8Array(); - message.dataHash = object.dataHash ?? new Uint8Array(); - message.validatorsHash = object.validatorsHash ?? new Uint8Array(); - message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array(); - message.consensusHash = object.consensusHash ?? new Uint8Array(); - message.appHash = object.appHash ?? new Uint8Array(); - message.lastResultsHash = object.lastResultsHash ?? new Uint8Array(); - message.evidenceHash = object.evidenceHash ?? new Uint8Array(); - message.proposerAddress = object.proposerAddress ?? new Uint8Array(); - return message; - } -}; -function createBaseData(): Data { - return { - txs: [] - }; -} -export const Data = { - typeUrl: "/tendermint.types.Data", - encode(message: Data, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Data { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Data { - const message = createBaseData(); - message.txs = object.txs?.map(e => e) || []; - return message; - } -}; -function createBaseVote(): Vote { - return { - type: 0, - height: BigInt(0), - round: 0, - blockId: BlockID.fromPartial({}), - timestamp: new Date(), - validatorAddress: new Uint8Array(), - validatorIndex: 0, - signature: new Uint8Array() - }; -} -export const Vote = { - typeUrl: "/tendermint.types.Vote", - encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== BigInt(0)) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Vote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Vote { - const message = createBaseVote(); - message.type = object.type ?? 0; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.round = object.round ?? 0; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.timestamp = object.timestamp ?? undefined; - message.validatorAddress = object.validatorAddress ?? new Uint8Array(); - message.validatorIndex = object.validatorIndex ?? 0; - message.signature = object.signature ?? new Uint8Array(); - return message; - } -}; -function createBaseCommit(): Commit { - return { - height: BigInt(0), - round: 0, - blockId: BlockID.fromPartial({}), - signatures: [] - }; -} -export const Commit = { - typeUrl: "/tendermint.types.Commit", - encode(message: Commit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Commit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Commit { - const message = createBaseCommit(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.round = object.round ?? 0; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.signatures = object.signatures?.map(e => CommitSig.fromPartial(e)) || []; - return message; - } -}; -function createBaseCommitSig(): CommitSig { - return { - blockIdFlag: 0, - validatorAddress: new Uint8Array(), - timestamp: new Date(), - signature: new Uint8Array() - }; -} -export const CommitSig = { - typeUrl: "/tendermint.types.CommitSig", - encode(message: CommitSig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommitSig(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = (reader.int32() as any); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): CommitSig { - const message = createBaseCommitSig(); - message.blockIdFlag = object.blockIdFlag ?? 0; - message.validatorAddress = object.validatorAddress ?? new Uint8Array(); - message.timestamp = object.timestamp ?? undefined; - message.signature = object.signature ?? new Uint8Array(); - return message; - } -}; -function createBaseProposal(): Proposal { - return { - type: 0, - height: BigInt(0), - round: 0, - polRound: 0, - blockId: BlockID.fromPartial({}), - timestamp: new Date(), - signature: new Uint8Array() - }; -} -export const Proposal = { - typeUrl: "/tendermint.types.Proposal", - encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== BigInt(0)) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Proposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Proposal { - const message = createBaseProposal(); - message.type = object.type ?? 0; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.round = object.round ?? 0; - message.polRound = object.polRound ?? 0; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.timestamp = object.timestamp ?? undefined; - message.signature = object.signature ?? new Uint8Array(); - return message; - } -}; -function createBaseSignedHeader(): SignedHeader { - return { - header: undefined, - commit: undefined - }; -} -export const SignedHeader = { - typeUrl: "/tendermint.types.SignedHeader", - encode(message: SignedHeader, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignedHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SignedHeader { - const message = createBaseSignedHeader(); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.commit = object.commit !== undefined && object.commit !== null ? Commit.fromPartial(object.commit) : undefined; - return message; - } -}; -function createBaseLightBlock(): LightBlock { - return { - signedHeader: undefined, - validatorSet: undefined - }; -} -export const LightBlock = { - typeUrl: "/tendermint.types.LightBlock", - encode(message: LightBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signedHeader !== undefined) { - SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLightBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): LightBlock { - const message = createBaseLightBlock(); - message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null ? SignedHeader.fromPartial(object.signedHeader) : undefined; - message.validatorSet = object.validatorSet !== undefined && object.validatorSet !== null ? ValidatorSet.fromPartial(object.validatorSet) : undefined; - return message; - } -}; -function createBaseBlockMeta(): BlockMeta { - return { - blockId: BlockID.fromPartial({}), - blockSize: BigInt(0), - header: Header.fromPartial({}), - numTxs: BigInt(0) - }; -} -export const BlockMeta = { - typeUrl: "/tendermint.types.BlockMeta", - encode(message: BlockMeta, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== BigInt(0)) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== BigInt(0)) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockMeta(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = reader.int64(); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): BlockMeta { - const message = createBaseBlockMeta(); - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.blockSize = object.blockSize !== undefined && object.blockSize !== null ? BigInt(object.blockSize.toString()) : BigInt(0); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.numTxs = object.numTxs !== undefined && object.numTxs !== null ? BigInt(object.numTxs.toString()) : BigInt(0); - return message; - } -}; -function createBaseTxProof(): TxProof { - return { - rootHash: new Uint8Array(), - data: new Uint8Array(), - proof: undefined - }; -} -export const TxProof = { - typeUrl: "/tendermint.types.TxProof", - encode(message: TxProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): TxProof { - const message = createBaseTxProof(); - message.rootHash = object.rootHash ?? new Uint8Array(); - message.data = object.data ?? new Uint8Array(); - message.proof = object.proof !== undefined && object.proof !== null ? Proof.fromPartial(object.proof) : undefined; - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/types/validator.ts b/networks/cosmos/codegen/tendermint/types/validator.ts deleted file mode 100644 index 08b346e4..00000000 --- a/networks/cosmos/codegen/tendermint/types/validator.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { PublicKey } from "../crypto/keys"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -export interface ValidatorSet { - validators: Validator[]; - proposer?: Validator; - totalVotingPower: bigint; -} -export interface Validator { - address: Uint8Array; - pubKey: PublicKey; - votingPower: bigint; - proposerPriority: bigint; -} -export interface SimpleValidator { - pubKey?: PublicKey; - votingPower: bigint; -} -function createBaseValidatorSet(): ValidatorSet { - return { - validators: [], - proposer: undefined, - totalVotingPower: BigInt(0) - }; -} -export const ValidatorSet = { - typeUrl: "/tendermint.types.ValidatorSet", - encode(message: ValidatorSet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): ValidatorSet { - const message = createBaseValidatorSet(); - message.validators = object.validators?.map(e => Validator.fromPartial(e)) || []; - message.proposer = object.proposer !== undefined && object.proposer !== null ? Validator.fromPartial(object.proposer) : undefined; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - return message; - } -}; -function createBaseValidator(): Validator { - return { - address: new Uint8Array(), - pubKey: PublicKey.fromPartial({}), - votingPower: BigInt(0), - proposerPriority: BigInt(0) - }; -} -export const Validator = { - typeUrl: "/tendermint.types.Validator", - encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== BigInt(0)) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== BigInt(0)) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Validator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = reader.int64(); - break; - case 4: - message.proposerPriority = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): Validator { - const message = createBaseValidator(); - message.address = object.address ?? new Uint8Array(); - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? PublicKey.fromPartial(object.pubKey) : undefined; - message.votingPower = object.votingPower !== undefined && object.votingPower !== null ? BigInt(object.votingPower.toString()) : BigInt(0); - message.proposerPriority = object.proposerPriority !== undefined && object.proposerPriority !== null ? BigInt(object.proposerPriority.toString()) : BigInt(0); - return message; - } -}; -function createBaseSimpleValidator(): SimpleValidator { - return { - pubKey: undefined, - votingPower: BigInt(0) - }; -} -export const SimpleValidator = { - typeUrl: "/tendermint.types.SimpleValidator", - encode(message: SimpleValidator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== BigInt(0)) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimpleValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromPartial(object: DeepPartial): SimpleValidator { - const message = createBaseSimpleValidator(); - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? PublicKey.fromPartial(object.pubKey) : undefined; - message.votingPower = object.votingPower !== undefined && object.votingPower !== null ? BigInt(object.votingPower.toString()) : BigInt(0); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/tendermint/version/types.ts b/networks/cosmos/codegen/tendermint/version/types.ts deleted file mode 100644 index 8568b1cd..00000000 --- a/networks/cosmos/codegen/tendermint/version/types.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: bigint; - software: string; -} -/** - * 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. - */ -export interface Consensus { - block: bigint; - app: bigint; -} -function createBaseApp(): App { - return { - protocol: BigInt(0), - software: "" - }; -} -export const App = { - typeUrl: "/tendermint.version.App", - encode(message: App, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.protocol !== BigInt(0)) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): App { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseApp(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): App { - const message = createBaseApp(); - message.protocol = object.protocol !== undefined && object.protocol !== null ? BigInt(object.protocol.toString()) : BigInt(0); - message.software = object.software ?? ""; - return message; - } -}; -function createBaseConsensus(): Consensus { - return { - block: BigInt(0), - app: BigInt(0) - }; -} -export const Consensus = { - typeUrl: "/tendermint.version.Consensus", - encode(message: Consensus, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.block !== BigInt(0)) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== BigInt(0)) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Consensus { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensus(); - while (reader.pos < end) { - const 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; - }, - fromPartial(object: DeepPartial): Consensus { - const message = createBaseConsensus(); - message.block = object.block !== undefined && object.block !== null ? BigInt(object.block.toString()) : BigInt(0); - message.app = object.app !== undefined && object.app !== null ? BigInt(object.app.toString()) : BigInt(0); - return message; - } -}; \ No newline at end of file diff --git a/networks/cosmos/codegen/utf8.ts b/networks/cosmos/codegen/utf8.ts deleted file mode 100644 index 0c7e187a..00000000 --- a/networks/cosmos/codegen/utf8.ts +++ /dev/null @@ -1,148 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.11 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -// Copyright (c) 2016, Daniel Wirtz All rights reserved. - -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: - -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of its author, nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. - -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"use strict"; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -export function utf8Length(str: string) { - let len = 0, - c = 0; - for (let i = 0; i < str.length; ++i) { - c = str.charCodeAt(i); - if (c < 128) len += 1; - else if (c < 2048) len += 2; - else if ( - (c & 0xfc00) === 0xd800 && - (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00 - ) { - ++i; - len += 4; - } else len += 3; - } - return len; -} - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -export function utf8Read( - buffer: ArrayLike, - start: number, - end: number -) { - const len = end - start; - if (len < 1) return ""; - const chunk = []; - let parts: string[] = [], - i = 0, // char offset - t; // temporary - while (start < end) { - t = buffer[start++]; - if (t < 128) chunk[i++] = t; - else if (t > 191 && t < 224) - chunk[i++] = ((t & 31) << 6) | (buffer[start++] & 63); - else if (t > 239 && t < 365) { - t = - (((t & 7) << 18) | - ((buffer[start++] & 63) << 12) | - ((buffer[start++] & 63) << 6) | - (buffer[start++] & 63)) - - 0x10000; - chunk[i++] = 0xd800 + (t >> 10); - chunk[i++] = 0xdc00 + (t & 1023); - } else - chunk[i++] = - ((t & 15) << 12) | - ((buffer[start++] & 63) << 6) | - (buffer[start++] & 63); - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode(...chunk)); - i = 0; - } - } - if (parts) { - if (i) parts.push(String.fromCharCode(...chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode(...chunk.slice(0, i)); -} - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -export function utf8Write( - str: string, - buffer: Uint8Array | Array, - offset: number -) { - const start = offset; - let c1, // character 1 - c2; // character 2 - for (let i = 0; i < str.length; ++i) { - c1 = str.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = (c1 >> 6) | 192; - buffer[offset++] = (c1 & 63) | 128; - } else if ( - (c1 & 0xfc00) === 0xd800 && - ((c2 = str.charCodeAt(i + 1)) & 0xfc00) === 0xdc00 - ) { - c1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff); - ++i; - buffer[offset++] = (c1 >> 18) | 240; - buffer[offset++] = ((c1 >> 12) & 63) | 128; - buffer[offset++] = ((c1 >> 6) & 63) | 128; - buffer[offset++] = (c1 & 63) | 128; - } else { - buffer[offset++] = (c1 >> 12) | 224; - buffer[offset++] = ((c1 >> 6) & 63) | 128; - buffer[offset++] = (c1 & 63) | 128; - } - } - return offset - start; -} diff --git a/networks/cosmos/codegen/varint.ts b/networks/cosmos/codegen/varint.ts deleted file mode 100644 index b9ac8ece..00000000 --- a/networks/cosmos/codegen/varint.ts +++ /dev/null @@ -1,488 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.4.11 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -// Copyright 2008 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of 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. -// -// Code generated by the Protocol Buffer compiler is owned by the owner -// of the input file used when generating it. This code is not -// standalone and requires a support library to be linked with it. This -// support library is itself covered by the above license. - -/* eslint-disable prefer-const,@typescript-eslint/restrict-plus-operands */ - -/** - * Read a 64 bit varint as two JS numbers. - * - * Returns tuple: - * [0]: low bits - * [1]: high bits - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175 - */ -export function varint64read(this: ReaderLike): [number, number] { - let lowBits = 0; - let highBits = 0; - - for (let shift = 0; shift < 28; shift += 7) { - let b = this.buf[this.pos++]; - lowBits |= (b & 0x7f) << shift; - if ((b & 0x80) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - } - - let middleByte = this.buf[this.pos++]; - - // last four bits of the first 32 bit number - lowBits |= (middleByte & 0x0f) << 28; - - // 3 upper bits are part of the next 32 bit number - highBits = (middleByte & 0x70) >> 4; - - if ((middleByte & 0x80) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - - for (let shift = 3; shift <= 31; shift += 7) { - let b = this.buf[this.pos++]; - highBits |= (b & 0x7f) << shift; - if ((b & 0x80) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - } - - throw new Error("invalid varint"); -} - -/** - * Write a 64 bit varint, given as two JS numbers, to the given bytes array. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344 - */ -export function varint64write(lo: number, hi: number, bytes: number[]): void { - for (let i = 0; i < 28; i = i + 7) { - const shift = lo >>> i; - const hasNext = !(shift >>> 7 == 0 && hi == 0); - const byte = (hasNext ? shift | 0x80 : shift) & 0xff; - bytes.push(byte); - if (!hasNext) { - return; - } - } - - const splitBits = ((lo >>> 28) & 0x0f) | ((hi & 0x07) << 4); - const hasMoreBits = !(hi >> 3 == 0); - bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xff); - - if (!hasMoreBits) { - return; - } - - for (let i = 3; i < 31; i = i + 7) { - const shift = hi >>> i; - const hasNext = !(shift >>> 7 == 0); - const byte = (hasNext ? shift | 0x80 : shift) & 0xff; - bytes.push(byte); - if (!hasNext) { - return; - } - } - - bytes.push((hi >>> 31) & 0x01); -} - -// constants for binary math -const TWO_PWR_32_DBL = 0x100000000; - -/** - * Parse decimal string of 64 bit integer value as two JS numbers. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10 - */ -export function int64FromString(dec: string): { lo: number; hi: number } { - // Check for minus sign. - const minus = dec[0] === "-"; - if (minus) { - dec = dec.slice(1); - } - - // Work 6 decimal digits at a time, acting like we're converting base 1e6 - // digits to binary. This is safe to do with floating point math because - // Number.isSafeInteger(ALL_32_BITS * 1e6) == true. - const base = 1e6; - let lowBits = 0; - let highBits = 0; - - function add1e6digit(begin: number, end?: number) { - // Note: Number('') is 0. - const digit1e6 = Number(dec.slice(begin, end)); - highBits *= base; - lowBits = lowBits * base + digit1e6; - // Carry bits from lowBits to - if (lowBits >= TWO_PWR_32_DBL) { - highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0); - lowBits = lowBits % TWO_PWR_32_DBL; - } - } - - add1e6digit(-24, -18); - add1e6digit(-18, -12); - add1e6digit(-12, -6); - add1e6digit(-6); - return minus ? negate(lowBits, highBits) : newBits(lowBits, highBits); -} - -/** - * Losslessly converts a 64-bit signed integer in 32:32 split representation - * into a decimal string. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10 - */ -export function int64ToString(lo: number, hi: number): string { - let bits = newBits(lo, hi); - // If we're treating the input as a signed value and the high bit is set, do - // a manual two's complement conversion before the decimal conversion. - const negative = bits.hi & 0x80000000; - if (negative) { - bits = negate(bits.lo, bits.hi); - } - const result = uInt64ToString(bits.lo, bits.hi); - return negative ? "-" + result : result; -} - -/** - * Losslessly converts a 64-bit unsigned integer in 32:32 split representation - * into a decimal string. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10 - */ -export function uInt64ToString(lo: number, hi: number): string { - ({ lo, hi } = toUnsigned(lo, hi)); - // Skip the expensive conversion if the number is small enough to use the - // built-in conversions. - // Number.MAX_SAFE_INTEGER = 0x001FFFFF FFFFFFFF, thus any number with - // highBits <= 0x1FFFFF can be safely expressed with a double and retain - // integer precision. - // Proven by: Number.isSafeInteger(0x1FFFFF * 2**32 + 0xFFFFFFFF) == true. - if (hi <= 0x1fffff) { - return String(TWO_PWR_32_DBL * hi + lo); - } - - // What this code is doing is essentially converting the input number from - // base-2 to base-1e7, which allows us to represent the 64-bit range with - // only 3 (very large) digits. Those digits are then trivial to convert to - // a base-10 string. - - // The magic numbers used here are - - // 2^24 = 16777216 = (1,6777216) in base-1e7. - // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7. - - // Split 32:32 representation into 16:24:24 representation so our - // intermediate digits don't overflow. - const low = lo & 0xffffff; - const mid = ((lo >>> 24) | (hi << 8)) & 0xffffff; - const high = (hi >> 16) & 0xffff; - - // Assemble our three base-1e7 digits, ignoring carries. The maximum - // value in a digit at this step is representable as a 48-bit integer, which - // can be stored in a 64-bit floating point number. - let digitA = low + mid * 6777216 + high * 6710656; - let digitB = mid + high * 8147497; - let digitC = high * 2; - - // Apply carries from A to B and from B to C. - const base = 10000000; - if (digitA >= base) { - digitB += Math.floor(digitA / base); - digitA %= base; - } - - if (digitB >= base) { - digitC += Math.floor(digitB / base); - digitB %= base; - } - - // If digitC is 0, then we should have returned in the trivial code path - // at the top for non-safe integers. Given this, we can assume both digitB - // and digitA need leading zeros. - return ( - digitC.toString() + - decimalFrom1e7WithLeadingZeros(digitB) + - decimalFrom1e7WithLeadingZeros(digitA) - ); -} - -function toUnsigned(lo: number, hi: number): { lo: number; hi: number } { - return { lo: lo >>> 0, hi: hi >>> 0 }; -} - -function newBits(lo: number, hi: number): { lo: number; hi: number } { - return { lo: lo | 0, hi: hi | 0 }; -} - -/** - * Returns two's compliment negation of input. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Signed_32-bit_integers - */ -function negate(lowBits: number, highBits: number) { - highBits = ~highBits; - if (lowBits) { - lowBits = ~lowBits + 1; - } else { - // If lowBits is 0, then bitwise-not is 0xFFFFFFFF, - // adding 1 to that, results in 0x100000000, which leaves - // the low bits 0x0 and simply adds one to the high bits. - highBits += 1; - } - return newBits(lowBits, highBits); -} - -/** - * Returns decimal representation of digit1e7 with leading zeros. - */ -const decimalFrom1e7WithLeadingZeros = (digit1e7: number) => { - const partial = String(digit1e7); - return "0000000".slice(partial.length) + partial; -}; - -/** - * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)` - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144 - */ -export function varint32write(value: number, bytes: number[]): void { - if (value >= 0) { - // write value as varint 32 - while (value > 0x7f) { - bytes.push((value & 0x7f) | 0x80); - value = value >>> 7; - } - bytes.push(value); - } else { - for (let i = 0; i < 9; i++) { - bytes.push((value & 127) | 128); - value = value >> 7; - } - bytes.push(1); - } -} - -/** - * Read an unsigned 32 bit varint. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220 - */ -export function varint32read(this: ReaderLike): number { - let b = this.buf[this.pos++]; - let result = b & 0x7f; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - b = this.buf[this.pos++]; - result |= (b & 0x7f) << 7; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - b = this.buf[this.pos++]; - result |= (b & 0x7f) << 14; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - b = this.buf[this.pos++]; - result |= (b & 0x7f) << 21; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - // Extract only last 4 bits - b = this.buf[this.pos++]; - result |= (b & 0x0f) << 28; - - for (let readBytes = 5; (b & 0x80) !== 0 && readBytes < 10; readBytes++) - b = this.buf[this.pos++]; - - if ((b & 0x80) != 0) throw new Error("invalid varint"); - - this.assertBounds(); - - // Result can have 32 bits, convert it to unsigned - return result >>> 0; -} - -type ReaderLike = { - buf: Uint8Array; - pos: number; - len: number; - assertBounds(): void; -}; - -/** - * encode zig zag - */ -export function zzEncode(lo: number, hi: number) { - let mask = hi >> 31; - hi = (((hi << 1) | (lo >>> 31)) ^ mask) >>> 0; - lo = ((lo << 1) ^ mask) >>> 0; - return [lo, hi]; -} - -/** - * decode zig zag - */ -export function zzDecode(lo: number, hi: number) { - let mask = -(lo & 1); - lo = (((lo >>> 1) | (hi << 31)) ^ mask) >>> 0; - hi = ((hi >>> 1) ^ mask) >>> 0; - return [lo, hi]; -} - -/** - * unsigned int32 without moving pos. - */ -export function readUInt32(buf: Uint8Array, pos: number) { - return ( - (buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) + - buf[pos + 3] * 0x1000000 - ); -} - -/** - * signed int32 without moving pos. - */ -export function readInt32(buf: Uint8Array, pos: number) { - return ( - (buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) + - (buf[pos + 3] << 24) - ); -} - -/** - * writing varint32 to pos - */ -export function writeVarint32( - val: number, - buf: Uint8Array | number[], - pos: number -) { - while (val > 127) { - buf[pos++] = (val & 127) | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * writing varint64 to pos - */ -export function writeVarint64( - val: { lo: number; hi: number }, - buf: Uint8Array | number[], - pos: number -) { - while (val.hi) { - buf[pos++] = (val.lo & 127) | 128; - val.lo = ((val.lo >>> 7) | (val.hi << 25)) >>> 0; - val.hi >>>= 7; - } - while (val.lo > 127) { - buf[pos++] = (val.lo & 127) | 128; - val.lo = val.lo >>> 7; - } - buf[pos++] = val.lo; -} - -export function int64Length(lo: number, hi: number) { - let part0 = lo, - part1 = ((lo >>> 28) | (hi << 4)) >>> 0, - part2 = hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 - ? 1 - : 2 - : part0 < 2097152 - ? 3 - : 4 - : part1 < 16384 - ? part1 < 128 - ? 5 - : 6 - : part1 < 2097152 - ? 7 - : 8 - : part2 < 128 - ? 9 - : 10; -} - -export function writeFixed32( - val: number, - buf: Uint8Array | number[], - pos: number -) { - buf[pos] = val & 255; - buf[pos + 1] = (val >>> 8) & 255; - buf[pos + 2] = (val >>> 16) & 255; - buf[pos + 3] = val >>> 24; -} - -export function writeByte( - val: number, - buf: Uint8Array | number[], - pos: number -) { - buf[pos] = val & 255; -} diff --git a/networks/cosmos/direct.ts b/networks/cosmos/direct.ts deleted file mode 100644 index 7a1cbed7..00000000 --- a/networks/cosmos/direct.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { - Auth, - HttpEndpoint, - ISigner, - SignerConfig, - ISignDoc, - StdFee, - BaseWallet, - IWallet, -} from "@interchainjs/types"; -import { Encoder, Message, DocOptions, SignDoc, SignerOptions } from "./types"; -import { - CosmosBaseSigner, - SignResponseFromAuth, - getAccountFromAuth, -} from "./utils"; -import { SignMode } from "./types"; -import { defaultSignerConfig } from "./defaults"; -import { constructAuthFromWallet } from "@interchainjs/utils"; - -export class DirectSignerBase extends CosmosBaseSigner< - ISignDoc.CosmosDirectDoc, - DocOptions -> { - constructor( - auth: Auth, - encoders: Encoder[], - endpoint?: string | HttpEndpoint, - options?: SignerOptions - ) { - super(auth, encoders, endpoint, options); - } - - async createDoc( - messages: Message[], - fee?: StdFee, - memo?: string, - options?: DocOptions - ) { - const { txRaw } = await this.createTxRaw( - messages, - options?.signMode ?? SignMode.SIGN_MODE_DIRECT, - fee, - memo, - options - ); - - const signDoc: ISignDoc.CosmosDirectDoc = SignDoc.fromPartial({ - bodyBytes: txRaw.bodyBytes, - authInfoBytes: txRaw.authInfoBytes, - chainId: options?.chainId ?? (await this.queryClient.getChainId()), - accountNumber: - options?.accountNumber ?? (await this.queryClient.getAccountNumber()), - }); - return { signDoc, tx: txRaw }; - } - - signDoc = async (doc: ISignDoc.CosmosDirectDoc) => { - return SignResponseFromAuth.signDirect(this.auth, doc, this.config); - }; -} - -export class DirectSigner extends DirectSignerBase - implements ISigner.CosmosDirectSigner { - constructor( - auth: Auth, - encoders: Encoder[], - endpoint?: string | HttpEndpoint, - options?: SignerOptions - ) { - super(auth, encoders, endpoint, options); - } - - static async fromWallet( - wallet: IWallet.CosmosDirectWallet, - encoders: Encoder[], - endpoint?: string | HttpEndpoint, - options?: SignerOptions - ) { - const auth: Auth = await constructAuthFromWallet( - wallet, - options?.publicKey?.isCompressed ?? - defaultSignerConfig.publicKey.isCompressed - ); - const signer = new DirectSigner(auth, encoders, endpoint, options); - signer.signDoc = wallet.sign; - return signer; - } - - static toWallet( - auth: Auth, - config: SignerConfig = defaultSignerConfig - ): IWallet.CosmosDirectWallet { - return { - getAccount: async () => getAccountFromAuth(auth, config), - sign: async (doc: SignDoc) => - SignResponseFromAuth.signDirect(auth, doc, config), - }; - } -} diff --git a/networks/cosmos/index.ts b/networks/cosmos/index.ts deleted file mode 100644 index 2615ff42..00000000 --- a/networks/cosmos/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -throw new Error( - "@interchainjs/cosmos have no entry-point: consult README for usage" -); diff --git a/networks/cosmos/jest.starship.config.js b/networks/cosmos/jest.starship.config.js index 9e105662..76b14293 100644 --- a/networks/cosmos/jest.starship.config.js +++ b/networks/cosmos/jest.starship.config.js @@ -1,19 +1,19 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - testTimeout: 15000, - preset: "ts-jest", - testEnvironment: "node", - transform: { - "^.+\\.tsx?$": [ - "ts-jest", - { - babelConfig: false, - tsconfig: "tsconfig.json", - }, - ], - }, - transformIgnorePatterns: [`/node_modules/*`], - testRegex: "(/starship/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", - moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], - }; + testTimeout: 15000, + preset: 'ts-jest', + testEnvironment: 'node', + transform: { + '^.+\\.tsx?$': [ + 'ts-jest', + { + babelConfig: false, + tsconfig: 'tsconfig.json', + }, + ], + }, + transformIgnorePatterns: [`/node_modules/*`], + testRegex: '(/starship/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], +}; \ No newline at end of file diff --git a/networks/cosmos/package.json b/networks/cosmos/package.json index 482b0320..fbf56e5d 100644 --- a/networks/cosmos/package.json +++ b/networks/cosmos/package.json @@ -17,9 +17,13 @@ "directory": "dist" }, "scripts": { + "copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist", - "clean": "del dist/**", + "clean": "rimraf dist/**", + + "prepare": "npm run build", "build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy", + "build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy", "lint": "eslint . --fix", "setupKind": "starship setup-kind --config ./starship/configs/starship.yaml", "cleanKind": "starship clean-kind --config ./starship/configs/starship.yaml", @@ -29,12 +33,13 @@ "starship:debug": "jest --config ./jest.starship.config.js --runInBand --verbose --bail", "starship:watch": "jest --watch --config ./jest.starship.config.js", "starship:all": "yarn starship setup && sleep 10 && yarn starship deploy && yarn starship wait-for-pods && yarn starship get-pods && yarn starship start-ports && yarn starship port-pids", - "starship:clean": "yarn starship clean", - "prepare": "npm run build" + "starship:clean": "yarn starship clean" }, "dependencies": { + "@interchainjs/cosmos-types": "0.0.1-beta.2", "@interchainjs/types": "0.0.1-beta.2", "@interchainjs/utils": "0.0.1-beta.2", + "@interchainjs/auth": "0.0.1-beta.2", "@noble/curves": "^1.1.0", "@noble/hashes": "^1.3.1", "decimal.js": "^10.4.3" @@ -44,4 +49,4 @@ "blockchain", "transaction" ] -} +} \ No newline at end of file diff --git a/networks/cosmos/scripts/gen-fee-tokens.ts b/networks/cosmos/scripts/gen-fee-tokens.ts deleted file mode 100644 index 1f6f6a68..00000000 --- a/networks/cosmos/scripts/gen-fee-tokens.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { chains } from "chain-registry"; -import fs from "fs"; - -const entries = chains - .map((chain) => { - return [chain.chain_id, chain.fees?.fee_tokens] as [string, any]; - }) - .filter(([, feeTokens]) => feeTokens && feeTokens.length !== 0) - .sort((a, b) => { - return a[0].localeCompare(b[0]); - }); - -const json = Object.fromEntries(entries); -delete json[""]; - -fs.writeFile( - "/Users/june/code/sign/packages/cosmos/src/core/config/fee-tokens.json", - JSON.stringify(json, void 0, 2), - (err) => { - if (err) { - console.error(err); - } - } -); diff --git a/networks/cosmos/scripts/gen-prefix.ts b/networks/cosmos/scripts/gen-prefix.ts deleted file mode 100644 index 7cd37a7e..00000000 --- a/networks/cosmos/scripts/gen-prefix.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { chains } from "chain-registry"; -import fs from "fs"; - -const entries = chains - .map((chain) => { - return [chain.chain_id, chain.bech32_prefix]; - }) - .sort((a, b) => { - return a[0].localeCompare(b[0]); - }); - -const json = Object.fromEntries(entries); -delete json[""]; - -fs.writeFile( - __dirname + "../data/prefix.json", - JSON.stringify(json, void 0, 2), - (err) => { - if (err) { - console.error(err); - } - } -); diff --git a/networks/cosmos/src/amino.ts b/networks/cosmos/src/amino.ts new file mode 100644 index 00000000..70105566 --- /dev/null +++ b/networks/cosmos/src/amino.ts @@ -0,0 +1,112 @@ +import { Auth, HttpEndpoint } from '@interchainjs/types'; +import { constructAuthsFromWallet } from '@interchainjs/utils'; + +import { BaseCosmosTxBuilder, CosmosBaseSigner } from './base'; +import { BaseCosmosTxBuilderContext } from './base/builder-context'; +import { AminoTxBuilder } from './builder/amino-tx-builder'; +import { defaultSignerConfig } from './defaults'; +import { + AminoConverter, + CosmosAminoDoc, + CosmosAminoSigner, + CosmosBaseWallet, + Encoder, + SignerOptions, +} from './types'; + +export abstract class AminoSignerBase< + AminoDoc, +> extends CosmosBaseSigner { + readonly converters: AminoConverter[]; + + constructor( + auth: Auth, + encoders: Encoder[], + converters: AminoConverter[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + super(auth, encoders, endpoint, options); + this.converters = converters; + } + + addConverters = (converters: AminoConverter[]) => { + this.converters.push(...converters); + }; + + getConverter = (aminoType: string) => { + const converter = this.converters.find( + (converter) => converter.aminoType === aminoType + ); + if (!converter) { + throw new Error( + `No such Converter for type ${aminoType}, please add corresponding Converter with method \`addConverters\`` + ); + } + return converter; + }; + + getConverterFromTypeUrl = (typeUrl: string) => { + const converter = this.converters.find( + (converter) => converter.typeUrl === typeUrl + ); + if (!converter) { + throw new Error( + `No such Converter for typeUrl ${typeUrl}, please add corresponding Converter with method \`addConverter\`` + ); + } + return converter; + }; +} + +export class AminoSigner + extends AminoSignerBase + implements CosmosAminoSigner +{ + constructor( + auth: Auth, + encoders: Encoder[], + converters: AminoConverter[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + super(auth, encoders, converters, endpoint, options); + } + + getTxBuilder(): BaseCosmosTxBuilder { + return new AminoTxBuilder(new BaseCosmosTxBuilderContext(this)); + } + + static async fromWallet( + wallet: CosmosBaseWallet, + encoders: Encoder[], + converters: AminoConverter[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + const [auth] = await constructAuthsFromWallet( + wallet, + options?.publicKey?.isCompressed ?? + defaultSignerConfig.publicKey.isCompressed + ); + return new AminoSigner(auth, encoders, converters, endpoint, options); + } + + static async fromWalletToSigners( + wallet: CosmosBaseWallet, + encoders: Encoder[], + converters: AminoConverter[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + const auths = await constructAuthsFromWallet( + wallet, + options?.publicKey?.isCompressed ?? + defaultSignerConfig.publicKey.isCompressed + ); + + return auths.map((auth) => { + return new AminoSigner(auth, encoders, converters, endpoint, options); + }); + } +} diff --git a/networks/cosmos/src/base/base-signer.ts b/networks/cosmos/src/base/base-signer.ts new file mode 100644 index 00000000..0d2a2bd0 --- /dev/null +++ b/networks/cosmos/src/base/base-signer.ts @@ -0,0 +1,175 @@ +import { BaseAccount } from '@interchainjs/cosmos-types/cosmos/auth/v1beta1/auth'; +import { + SignerInfo, + TxBody, + TxRaw, +} from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx'; +import { + Auth, + BaseSigner, + BroadcastOptions, + HttpEndpoint, + IKey, + SignResponse, +} from '@interchainjs/types'; +import { assertEmpty, isEmpty } from '@interchainjs/utils'; + +import { defaultSignerOptions } from '../defaults'; +import { RpcClient } from '../query/rpc'; +import { + BroadcastResponse, + CosmosSignArgs, + EncodedMessage, + Encoder, + FeeOptions, + QueryClient, + SignerOptions, + TimeoutHeightOption, + UniCosmosBaseSigner, +} from '../types'; +import { calculateFee } from '../utils/fee'; +import { BaseCosmosTxBuilder } from './tx-builder'; + +export abstract class CosmosBaseSigner + extends BaseSigner + implements UniCosmosBaseSigner +{ + _queryClient?: QueryClient; + readonly encoders: Encoder[]; + readonly _encodePublicKey: (key: IKey) => EncodedMessage; + readonly parseAccount: (encodedAccount: EncodedMessage) => BaseAccount; + prefix?: string; + txBuilder: BaseCosmosTxBuilder; + + constructor( + auth: Auth, + encoders: Encoder[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + super(auth, { ...options, ...defaultSignerOptions }); + this.encoders = encoders; + this.parseAccount = + options?.parseAccount ?? defaultSignerOptions.parseAccount; + this._encodePublicKey = + options?.encodePublicKey ?? defaultSignerOptions.encodePublicKey; + this.prefix = options?.prefix; + if (!isEmpty(endpoint)) { + this.setEndpoint(endpoint); + } + + this.txBuilder = this.getTxBuilder(); + } + + abstract getTxBuilder(): BaseCosmosTxBuilder; + + public get encodedPublicKey() { + return this._encodePublicKey(this.publicKey); + } + + addEncoders = (encoders: Encoder[]) => { + this.encoders.push(...encoders); + }; + + getEncoder = (typeUrl: string) => { + const encoder = this.encoders.find( + (encoder) => encoder.typeUrl === typeUrl + ); + if (!encoder) { + throw new Error( + `No such Encoder for typeUrl ${typeUrl}, please add corresponding Encoder with method \`addEncoder\`` + ); + } + return encoder; + }; + + async getAddress() { + return await this.queryClient.getAddress(); + } + + setEndpoint(endpoint: string | HttpEndpoint) { + this._queryClient = new RpcClient( + endpoint, + this.publicKeyHash, + this.prefix + ); + (this._queryClient as RpcClient).setAccountParser(this.parseAccount); + } + + get queryClient() { + assertEmpty(this._queryClient); + return this._queryClient; + } + + /** + * convert relative timeoutHeight to absolute timeoutHeight + */ + async toAbsoluteTimeoutHeight( + timeoutHeight?: TimeoutHeightOption + ): Promise<{ type: 'absolute'; value: bigint } | undefined> { + return isEmpty(timeoutHeight) + ? void 0 + : { + type: 'absolute', + value: + timeoutHeight.type === 'absolute' + ? timeoutHeight.value + : (await this.queryClient.getLatestBlockHeight()) + + timeoutHeight.value, + }; + } + + async sign( + args: CosmosSignArgs + ): Promise> { + const signed = await this.txBuilder.buildSignedTxDoc(args); + + return { + ...signed, + broadcast: async (options?: BroadcastOptions) => { + return this.broadcast(signed.tx, options); + }, + }; + } + + async broadcast(txRaw: TxRaw, options?: BroadcastOptions) { + return this.broadcastArbitrary( + TxRaw.encode(TxRaw.fromPartial(txRaw)).finish(), + options + ); + } + + async broadcastArbitrary(message: Uint8Array, options?: BroadcastOptions) { + const result = await this.queryClient.broadcast(message, options); + return result; + } + + async signAndBroadcast( + { messages, fee, memo, options: signOptions }: CosmosSignArgs, + options?: BroadcastOptions + ) { + const { broadcast } = await this.sign({ + messages, + fee, + memo, + options: signOptions, + }); + return await broadcast(options); + } + + async simulate(txBody: TxBody, signerInfos: SignerInfo[]) { + return await this.queryClient.simulate(txBody, signerInfos); + } + + async estimateFee( + txBody: TxBody, + signerInfos: SignerInfo[], + options?: FeeOptions + ) { + const { gasInfo } = await this.simulate(txBody, signerInfos); + if (typeof gasInfo === 'undefined') { + throw new Error('Fail to estimate gas by simulate tx.'); + } + return await calculateFee(gasInfo, options, this.queryClient.getChainId); + } +} diff --git a/networks/cosmos/src/base/builder-context.ts b/networks/cosmos/src/base/builder-context.ts new file mode 100644 index 00000000..27e0eaf3 --- /dev/null +++ b/networks/cosmos/src/base/builder-context.ts @@ -0,0 +1,7 @@ +import { ITxBuilderContext } from '@interchainjs/types'; + +export class BaseCosmosTxBuilderContext +implements ITxBuilderContext +{ + constructor(public signer: Signer) {} +} diff --git a/networks/cosmos/src/base/index.ts b/networks/cosmos/src/base/index.ts new file mode 100644 index 00000000..1d44b06e --- /dev/null +++ b/networks/cosmos/src/base/index.ts @@ -0,0 +1,2 @@ +export * from './base-signer'; +export * from './tx-builder'; diff --git a/networks/cosmos/src/base/tx-builder.ts b/networks/cosmos/src/base/tx-builder.ts new file mode 100644 index 00000000..439bf724 --- /dev/null +++ b/networks/cosmos/src/base/tx-builder.ts @@ -0,0 +1,171 @@ +import { SignMode } from '@interchainjs/cosmos-types/cosmos/tx/signing/v1beta1/signing'; +import { + AuthInfo, + Fee, + SignerInfo, + TxBody, + TxRaw, +} from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx'; +import { ITxBuilder, StdFee } from '@interchainjs/types'; + +import { + CosmosCreateDocResponse, + CosmosSignArgs, + DocOptions, + EncodedMessage, +} from '../types'; +import { calculateFee, toFee } from '../utils'; +import { CosmosBaseSigner } from './base-signer'; +import { BaseCosmosTxBuilderContext } from './builder-context'; + +/** + * BaseCosmosTxBuilder is a helper class to build the Tx and signDoc + */ +export abstract class BaseCosmosTxBuilder +implements ITxBuilder> +{ + constructor( + public signMode: SignMode, + protected ctx: BaseCosmosTxBuilderContext> + ) {} + + abstract buildDoc( + args: CosmosSignArgs, + rxRaw: Partial + ): Promise; + + abstract buildDocBytes(doc: SignDoc): Promise; + + async buildTxRaw({ + messages, + fee, + memo, + options, + }: CosmosSignArgs): Promise & { fee: StdFee }> { + const { txBody, encode: txBodyEncode } = await this.buildTxBody({ + messages, + memo, + options, + }); + const { signerInfo } = await this.buildSignerInfo( + this.ctx.signer.encodedPublicKey, + options?.sequence ?? (await this.ctx.signer.queryClient.getSequence()), + this.signMode + ); + + const stdFee = await this.getFee(fee, txBody, [signerInfo], options); + + return { + bodyBytes: txBodyEncode(), + authInfoBytes: ( + await this.buildAuthInfo([signerInfo], toFee(stdFee)) + ).encode(), + fee: stdFee, + }; + } + + async buildTxBody({ messages, memo, options }: CosmosSignArgs): Promise<{ + txBody: TxBody; + encode: () => Uint8Array; + }> { + if (options?.timeoutHeight?.type === 'relative') { + throw new Error( + "timeoutHeight type in function `constructTxBody` shouldn't be `relative`. Please update it to `absolute` value before calling this function." + ); + } + const encoded = messages.map(({ typeUrl, value }) => { + return { + typeUrl, + value: this.ctx.signer.getEncoder(typeUrl).encode(value), + }; + }); + const txBody = TxBody.fromPartial({ + messages: encoded, + memo, + timeoutHeight: options?.timeoutHeight?.value, + extensionOptions: options?.extensionOptions, + nonCriticalExtensionOptions: options?.nonCriticalExtensionOptions, + }); + return { + txBody, + encode: () => TxBody.encode(txBody).finish(), + }; + } + + async buildSignerInfo( + publicKey: EncodedMessage, + sequence: bigint, + signMode: SignMode + ): Promise<{ + signerInfo: SignerInfo; + encode: () => Uint8Array; + }> { + const signerInfo = SignerInfo.fromPartial({ + publicKey, + sequence, + modeInfo: { single: { mode: signMode } }, + }); + + return { signerInfo, encode: () => SignerInfo.encode(signerInfo).finish() }; + } + + async buildAuthInfo( + signerInfos: SignerInfo[], + fee: Fee + ): Promise<{ + authInfo: AuthInfo; + encode: () => Uint8Array; + }> { + const authInfo = AuthInfo.fromPartial({ signerInfos, fee }); + + return { authInfo, encode: () => AuthInfo.encode(authInfo).finish() }; + } + + async getFee( + fee: StdFee, + txBody: TxBody, + signerInfos: SignerInfo[], + options: DocOptions + ) { + if (fee) { + return fee; + } + const { gasInfo } = await this.ctx.signer.simulate(txBody, signerInfos); + if (typeof gasInfo === 'undefined') { + throw new Error('Fail to estimate gas by simulate tx.'); + } + await calculateFee(gasInfo, options, async () => { + return this.ctx.signer.queryClient.getChainId(); + }); + } + + async buildSignedTxDoc({ + messages, + fee, + memo, + options, + }: CosmosSignArgs): Promise> { + // create partial TxRaw + const txRaw = await this.buildTxRaw({ messages, fee, memo, options }); + + // buildDoc + const doc = await this.buildDoc({ messages, fee, memo, options }, txRaw); + // get doc bytes + const docBytes = await this.buildDocBytes(doc); + + // sign signature to the doc bytes + const signature = this.ctx.signer.signArbitrary(docBytes); + + // build TxRaw + const signedTxRaw = TxRaw.fromPartial({ + bodyBytes: txRaw.bodyBytes, + authInfoBytes: txRaw.authInfoBytes, + signatures: [signature.value], + }); + + return { + tx: signedTxRaw, + doc: doc, + }; + } +} diff --git a/networks/cosmos/src/builder/amino-tx-builder.ts b/networks/cosmos/src/builder/amino-tx-builder.ts new file mode 100644 index 00000000..d36c6c16 --- /dev/null +++ b/networks/cosmos/src/builder/amino-tx-builder.ts @@ -0,0 +1,42 @@ +import { SignMode } from '@interchainjs/cosmos-types/cosmos/tx/signing/v1beta1/signing'; + +import { type AminoSignerBase } from '../amino'; +import { BaseCosmosTxBuilder } from '../base'; +import { BaseCosmosTxBuilderContext } from '../base/builder-context'; +import { CosmosAminoDoc, CosmosSignArgs } from '../types'; +import { encodeStdSignDoc, toAminoMsgs } from '../utils'; + +export class AminoTxBuilder extends BaseCosmosTxBuilder { + constructor( + protected ctx: BaseCosmosTxBuilderContext> + ) { + super(SignMode.SIGN_MODE_LEGACY_AMINO_JSON, ctx); + } + + async buildDoc({ + messages, + fee, + memo, + options, + }: CosmosSignArgs): Promise { + const signDoc: CosmosAminoDoc = { + chain_id: + options?.chainId ?? (await this.ctx.signer.queryClient.getChainId()), + account_number: ( + options?.accountNumber ?? + (await this.ctx.signer.queryClient.getAccountNumber()) + ).toString(), + sequence: ( + options?.sequence ?? (await this.ctx.signer.queryClient.getSequence()) + ).toString(), + fee, + msgs: toAminoMsgs(messages, this.ctx.signer.getConverterFromTypeUrl), + memo: memo ?? '', + }; + return signDoc; + } + + async buildDocBytes(doc: CosmosAminoDoc): Promise { + return encodeStdSignDoc(doc); + } +} diff --git a/networks/cosmos/src/builder/direct-tx-builder.ts b/networks/cosmos/src/builder/direct-tx-builder.ts new file mode 100644 index 00000000..2efbb521 --- /dev/null +++ b/networks/cosmos/src/builder/direct-tx-builder.ts @@ -0,0 +1,37 @@ +import { SignMode } from '@interchainjs/cosmos-types/cosmos/tx/signing/v1beta1/signing'; +import { + SignDoc, + TxRaw, +} from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx'; + +import { BaseCosmosTxBuilder, CosmosBaseSigner } from '../base'; +import { BaseCosmosTxBuilderContext } from '../base/builder-context'; +import { CosmosDirectDoc, CosmosSignArgs } from '../types'; + +export class DirectTxBuilder extends BaseCosmosTxBuilder { + constructor( + protected ctx: BaseCosmosTxBuilderContext> + ) { + super(SignMode.SIGN_MODE_DIRECT, ctx); + } + + async buildDoc( + { options }: CosmosSignArgs, + txRaw: Partial + ): Promise { + const signDoc: CosmosDirectDoc = SignDoc.fromPartial({ + bodyBytes: txRaw.bodyBytes, + authInfoBytes: txRaw.authInfoBytes, + chainId: + options?.chainId ?? (await this.ctx.signer.queryClient.getChainId()), + accountNumber: + options?.accountNumber ?? + (await this.ctx.signer.queryClient.getAccountNumber()), + }); + return signDoc; + } + + async buildDocBytes(doc: CosmosDirectDoc): Promise { + return SignDoc.encode(doc).finish(); + } +} diff --git a/networks/cosmos/data/fee-tokens.json b/networks/cosmos/src/data/fee-tokens.json similarity index 100% rename from networks/cosmos/data/fee-tokens.json rename to networks/cosmos/src/data/fee-tokens.json diff --git a/networks/cosmos/data/prefix.json b/networks/cosmos/src/data/prefix.json similarity index 100% rename from networks/cosmos/data/prefix.json rename to networks/cosmos/src/data/prefix.json diff --git a/networks/cosmos/defaults.ts b/networks/cosmos/src/defaults.ts similarity index 55% rename from networks/cosmos/defaults.ts rename to networks/cosmos/src/defaults.ts index bb93c839..4845d3ca 100644 --- a/networks/cosmos/defaults.ts +++ b/networks/cosmos/src/defaults.ts @@ -1,28 +1,24 @@ -import { bytes as assertBytes } from "@noble/hashes/_assert"; -import { sha256 } from "@noble/hashes/sha256"; +import { Secp256k1Signature } from '@interchainjs/auth/secp256k1'; import { - EncodedMessage, - FeeOptions, - Secp256k1PubKey, - SignerOptions, -} from "./types"; -import { - SignerConfig, - Signature, - BroadcastOptions, - IKey, -} from "@interchainjs/types"; -import { ripemd160 } from "@noble/hashes/ripemd160"; -import { Key } from "@interchainjs/utils"; -import { secp256k1 } from "@noble/curves/secp256k1"; -import { BaseAccount, ModuleAccount } from "./codegen/cosmos/auth/v1beta1/auth"; + BaseAccount, + ModuleAccount, +} from '@interchainjs/cosmos-types/cosmos/auth/v1beta1/auth'; +import { PubKey as Secp256k1PubKey } from '@interchainjs/cosmos-types/cosmos/crypto/secp256k1/keys'; import { BaseVestingAccount, ContinuousVestingAccount, DelayedVestingAccount, PeriodicVestingAccount, -} from "./codegen/cosmos/vesting/v1beta1/vesting"; -import { toDecoder } from "./utils"; +} from '@interchainjs/cosmos-types/cosmos/vesting/v1beta1/vesting'; +import { EthAccount } from '@interchainjs/cosmos-types/injective/types/v1beta1/account'; +import { BroadcastOptions, IKey, SignerConfig } from '@interchainjs/types'; +import { Key } from '@interchainjs/utils'; +import { bytes as assertBytes } from '@noble/hashes/_assert'; +import { ripemd160 } from '@noble/hashes/ripemd160'; +import { sha256 } from '@noble/hashes/sha256'; + +import { EncodedMessage, FeeOptions, SignerOptions } from './types'; +import { toDecoder } from './utils'; export const defaultBroadcastOptions: BroadcastOptions = { checkTx: true, @@ -31,7 +27,7 @@ export const defaultBroadcastOptions: BroadcastOptions = { export const defaultFeeOptions: FeeOptions = { multiplier: 1.6, - gasPrice: "average", + gasPrice: 'average', }; export const defaultSignerConfig: SignerConfig = { @@ -47,35 +43,14 @@ export const defaultSignerConfig: SignerConfig = { }, }, signature: { - toCompact: (signature: Signature, algo: string) => { - switch (algo) { - case "secp256k1": - const sig = new secp256k1.Signature( - signature.r.toBigInt(), - signature.s.toBigInt(), - // @ts-ignore - signature.recovery - ); - return Key.from(sig.toCompactRawBytes()); - case "ed25519": - throw new Error("Not implemented yet"); - default: - throw new Error(`Unidentified algorithm: ${algo}`); - } - }, fromCompact: (key: Key, algo: string) => { switch (algo) { - case "secp256k1": - const sig = secp256k1.Signature.fromCompact(key.toHex()); - return { - r: Key.fromBigInt(sig.r), - s: Key.fromBigInt(sig.s), - recovery: sig.recovery, - }; - case "ed25519": - throw new Error("Not implemented yet"); - default: - throw new Error(`Unidentified algorithm: ${algo}`); + case 'secp256k1': + return Secp256k1Signature.fromCompact(key); + case 'ed25519': + throw new Error('Not implemented yet'); + default: + throw new Error(`Unidentified algorithm: ${algo}`); } }, }, @@ -97,6 +72,7 @@ const accountCodecs = [ ContinuousVestingAccount, DelayedVestingAccount, PeriodicVestingAccount, + EthAccount, ]; export const defaultAccountParser = ( diff --git a/networks/cosmos/src/direct.ts b/networks/cosmos/src/direct.ts new file mode 100644 index 00000000..8cb4ad46 --- /dev/null +++ b/networks/cosmos/src/direct.ts @@ -0,0 +1,74 @@ +import { Auth, HttpEndpoint } from '@interchainjs/types'; +import { constructAuthsFromWallet } from '@interchainjs/utils'; + +import { BaseCosmosTxBuilder, CosmosBaseSigner } from './base'; +import { BaseCosmosTxBuilderContext } from './base/builder-context'; +import { DirectTxBuilder } from './builder/direct-tx-builder'; +import { defaultSignerConfig } from './defaults'; +import { + CosmosBaseWallet, + CosmosDirectDoc, + CosmosDirectSigner, + Encoder, + SignerOptions, +} from './types'; + +export class DirectSignerBase extends CosmosBaseSigner { + constructor( + auth: Auth, + encoders: Encoder[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + super(auth, encoders, endpoint, options); + } + + getTxBuilder(): BaseCosmosTxBuilder { + return new DirectTxBuilder(new BaseCosmosTxBuilderContext(this)); + } +} + +export class DirectSigner + extends DirectSignerBase + implements CosmosDirectSigner +{ + constructor( + auth: Auth, + encoders: Encoder[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + super(auth, encoders, endpoint, options); + } + + static async fromWallet( + wallet: CosmosBaseWallet, + encoders: Encoder[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + const [auth] = await constructAuthsFromWallet( + wallet, + options?.publicKey?.isCompressed ?? + defaultSignerConfig.publicKey.isCompressed + ); + return new DirectSigner(auth, encoders, endpoint, options); + } + + static async fromWalletToSigners( + wallet: CosmosBaseWallet, + encoders: Encoder[], + endpoint?: string | HttpEndpoint, + options?: SignerOptions + ) { + const auths = await constructAuthsFromWallet( + wallet, + options?.publicKey?.isCompressed ?? + defaultSignerConfig.publicKey.isCompressed + ); + + return auths.map((auth) => { + return new DirectSigner(auth, encoders, endpoint, options); + }); + } +} diff --git a/networks/cosmos/src/index.ts b/networks/cosmos/src/index.ts new file mode 100644 index 00000000..95be6fe6 --- /dev/null +++ b/networks/cosmos/src/index.ts @@ -0,0 +1,3 @@ +throw new Error( + '@interchainjs/cosmos have no entry-point: consult README for usage' +); diff --git a/networks/cosmos/query/rpc.ts b/networks/cosmos/src/query/rpc.ts similarity index 60% rename from networks/cosmos/query/rpc.ts rename to networks/cosmos/src/query/rpc.ts index 732923b6..f4b0b0ad 100644 --- a/networks/cosmos/query/rpc.ts +++ b/networks/cosmos/src/query/rpc.ts @@ -1,20 +1,26 @@ -import { BaseAccount } from "../codegen/cosmos/auth/v1beta1/auth"; -import { QueryClientImpl as AuthQuery } from "../codegen/cosmos/auth/v1beta1/query.rpc.Query"; -import { ServiceClientImpl as TxQuery } from "../codegen/cosmos/tx/v1beta1/service.rpc.Service"; +import { BaseAccount } from '@interchainjs/cosmos-types/cosmos/auth/v1beta1/auth'; +import { QueryClientImpl as AuthQuery } from '@interchainjs/cosmos-types/cosmos/auth/v1beta1/query.rpc.Query'; +import { SignMode } from '@interchainjs/cosmos-types/cosmos/tx/signing/v1beta1/signing'; +import { ServiceClientImpl as TxQuery } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/service.rpc.Service'; +import { + Fee, + SignerInfo, + Tx, + TxBody, +} from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx'; +import { BroadcastOptions, HttpEndpoint } from '@interchainjs/types'; +import { isEmpty, Key, toHttpEndpoint } from '@interchainjs/utils'; + +import { defaultAccountParser, defaultBroadcastOptions } from '../defaults'; import { BroadcastMode, BroadcastResponse, EncodedMessage, QueryClient, -} from "../types"; -import { Status, CometBroadcastResponse } from "../types/rpc"; -import { broadcast, createTxRpc, getPrefix } from "../utils/rpc"; -import { Key, isEmpty, toHttpEndpoint } from "@interchainjs/utils"; -import { TxBody, SignerInfo, Tx, Fee } from "../codegen/cosmos/tx/v1beta1/tx"; -import { constructAuthInfo } from "../utils/direct"; -import { SignMode } from "../codegen/cosmos/tx/signing/v1beta1/signing"; -import { HttpEndpoint, BroadcastOptions } from "@interchainjs/types"; -import { defaultAccountParser, defaultBroadcastOptions } from "../defaults"; +} from '../types'; +import { Status } from '../types/rpc'; +import { constructAuthInfo } from '../utils/direct'; +import { broadcast, createTxRpc, getPrefix } from '../utils/rpc'; export class RpcClient implements QueryClient { readonly endpoint: HttpEndpoint; @@ -24,9 +30,8 @@ export class RpcClient implements QueryClient { protected readonly authQuery: AuthQuery; protected readonly txQuery: TxQuery; protected readonly publicKeyHash?: Key; - protected parseAccount: ( - encodedAccount: EncodedMessage - ) => BaseAccount = defaultAccountParser; + protected parseAccount: (encodedAccount: EncodedMessage) => BaseAccount = + defaultAccountParser; protected _prefix?: string; constructor( @@ -55,7 +60,7 @@ export class RpcClient implements QueryClient { async getAddress() { if (!this.publicKeyHash) { throw new Error( - "publicKeyHash is not provided when constructing RpcClient" + 'publicKeyHash is not provided when constructing RpcClient' ); } return this.publicKeyHash.toBech32(await this.getPrefix()); @@ -70,13 +75,17 @@ export class RpcClient implements QueryClient { throw new Error(`Account is undefined.`); } + if (BaseAccount.is(accountResp.account)) { + return accountResp.account; + } + return this.parseAccount(accountResp.account); } protected async getStatus(): Promise { const data = await fetch(`${this.endpoint.url}/status`); const json = await data.json(); - return json["result"]; + return json['result']; } getChainId = async () => { @@ -132,39 +141,39 @@ export class RpcClient implements QueryClient { const { checkTx, deliverTx } = { ...defaultBroadcastOptions, ...options }; const mode: BroadcastMode = checkTx && deliverTx - ? "broadcast_tx_commit" + ? 'broadcast_tx_commit' : checkTx - ? "broadcast_tx_sync" - : "broadcast_tx_async"; + ? 'broadcast_tx_sync' + : 'broadcast_tx_async'; const resp = await broadcast(this.endpoint, mode, txBytes); switch (mode) { - case "broadcast_tx_async": - const { hash: hash1, ...rest1 } = resp as CometBroadcastResponse.Async; - return { - hash: hash1, - add_tx: rest1, - }; - case "broadcast_tx_sync": - const { hash: hash2, ...rest2 } = resp as CometBroadcastResponse.Sync; - return { - hash: hash2, - check_tx: rest2, - }; - case "broadcast_tx_commit": - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { - check_tx, - deliver_tx, - height, - hash: hash3, - } = resp as CometBroadcastResponse.Commit; - return { - hash: hash3, - check_tx, - deliver_tx: { height, ...deliver_tx }, - }; - default: - throw new Error(`Wrong method: ${mode}`); + case 'broadcast_tx_async': + const { hash: hash1, ...rest1 } = resp as AsyncCometBroadcastResponse; + return { + hash: hash1, + add_tx: rest1, + }; + case 'broadcast_tx_sync': + const { hash: hash2, ...rest2 } = resp as SyncCometBroadcastResponse; + return { + hash: hash2, + check_tx: rest2, + }; + case 'broadcast_tx_commit': + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { + check_tx, + deliver_tx, + height, + hash: hash3, + } = resp as CometBroadcastResponse.Commit; + return { + hash: hash3, + check_tx, + deliver_tx: { height, ...deliver_tx }, + }; + default: + throw new Error(`Wrong method: ${mode}`); } } } diff --git a/networks/cosmos/src/types/index.ts b/networks/cosmos/src/types/index.ts new file mode 100644 index 00000000..28eec104 --- /dev/null +++ b/networks/cosmos/src/types/index.ts @@ -0,0 +1,2 @@ +export * from './rpc'; +export * from './signer'; diff --git a/networks/cosmos/types/rpc.ts b/networks/cosmos/src/types/rpc.ts similarity index 65% rename from networks/cosmos/types/rpc.ts rename to networks/cosmos/src/types/rpc.ts index 640f886b..ffd28401 100644 --- a/networks/cosmos/types/rpc.ts +++ b/networks/cosmos/src/types/rpc.ts @@ -1,22 +1,21 @@ -import { CheckTxResponse, DeliverTxResponse } from "./signer"; +import { CheckTxResponse, DeliverTxResponse } from './signer'; -export namespace CometBroadcastResponse { - export interface Async { - hash: string; - code: number; - data: string; - log: string; - codespace: string; - } - export type Sync = { - hash: string; - } & CheckTxResponse; - export interface Commit { - hash: string; - check_tx: CheckTxResponse; - deliver_tx: DeliverTxResponse; - height: string; - } +export interface AsyncCometBroadcastResponse { + hash: string; + code: number; + data: string; + log: string; + codespace: string; +} +export type SyncCometBroadcastResponse = { + hash: string; +} & CheckTxResponse; + +export interface Commit { + hash: string; + check_tx: CheckTxResponse; + deliver_tx: DeliverTxResponse; + height: string; } interface NodeInfo { diff --git a/networks/cosmos/types/signer.ts b/networks/cosmos/src/types/signer.ts similarity index 65% rename from networks/cosmos/types/signer.ts rename to networks/cosmos/src/types/signer.ts index 9367511c..18b969ec 100644 --- a/networks/cosmos/types/signer.ts +++ b/networks/cosmos/src/types/signer.ts @@ -1,17 +1,29 @@ +import { BaseAccount } from '@interchainjs/cosmos-types/cosmos/auth/v1beta1/auth'; +import { SignMode } from '@interchainjs/cosmos-types/cosmos/tx/signing/v1beta1/signing'; +import { SimulateResponse } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/service'; import { + SignDoc, + SignerInfo, + TxBody, + TxRaw, +} from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx'; +import { Any } from '@interchainjs/cosmos-types/google/protobuf/any'; +import { + BaseWalletAccount, BroadcastOptions, + CreateDocResponse, HttpEndpoint, IKey, Price, SignerConfig, -} from "@interchainjs/types"; + StdFee, + StdSignDoc, + UniSigner, + Wallet, +} from '@interchainjs/types'; +import { Event } from '@interchainjs/types'; -import { SignMode } from "../codegen/cosmos/tx/signing/v1beta1/signing"; -import { SignerInfo, TxBody } from "../codegen/cosmos/tx/v1beta1/tx"; -import { Any } from "../codegen/google/protobuf/any"; -import { Event } from "@interchainjs/types"; -import { SimulateResponse } from "../codegen/cosmos/tx/v1beta1/service"; -import { BaseAccount } from "../codegen/cosmos/auth/v1beta1/auth"; +export type Algo = 'secp256k1' | 'ed25519' | 'sr25519'; export interface SignerOptions extends Partial { parseAccount?: (encodedAccount: EncodedMessage) => BaseAccount; @@ -56,9 +68,9 @@ export interface AminoConverter { } export type BroadcastMode = - | "broadcast_tx_async" - | "broadcast_tx_sync" - | "broadcast_tx_commit"; + | 'broadcast_tx_async' + | 'broadcast_tx_sync' + | 'broadcast_tx_commit'; export interface CheckTxResponse { code: number; @@ -109,7 +121,7 @@ export type DocOptions = FeeOptions & SignOptions & TxOptions; export interface FeeOptions { multiplier?: number; - gasPrice?: Price | string | "average" | "high" | "low"; + gasPrice?: Price | string | 'average' | 'high' | 'low'; } export interface SignOptions { @@ -120,7 +132,7 @@ export interface SignOptions { } export interface TimeoutHeightOption { - type: "relative" | "absolute"; + type: 'relative' | 'absolute'; value: bigint; } @@ -164,3 +176,58 @@ export interface QueryClient { options?: BroadcastOptions ) => Promise; } + +export type CosmosSignArgs