From 38f521351a8d79e960492baad1fad4c30286d709 Mon Sep 17 00:00:00 2001
From: nick134 <76399455+nick134-bit@users.noreply.github.com>
Date: Tue, 26 Mar 2024 15:48:04 +0100
Subject: [PATCH] feat: injective amino signing (#549)
* feat: dashboard through api
---
.eslintrc | 1 +
components/Pages/Dashboard/Dashboard.tsx | 32 +-
.../Dashboard/hooks/getDashboardDataAPI.ts | 58 +
.../Dashboard/hooks/useGetDailyBuybacks.ts | 130 -
.../ChainSelect/ChainList/ChainItem.tsx | 15 +-
.../Wallet/Modal/WalletConnectButton.tsx | 3 -
components/Wallet/Modal/WalletModal.tsx | 10 +-
components/Wallet/Wallet.tsx | 20 +-
constants/settings.ts | 2 +-
hooks/useClients.ts | 39 +-
libs/fetchSupply.tsx | 2 +-
package.json | 1 +
public/mainnet/migaloo-1/pools_list.json | 2 +-
public/mainnet/osmosis-1/pools_list.json | 4 +-
services/useAPI.ts | 12 +-
util/getDashboardData.ts | 2 +-
util/inj-types/amino/amino.ts | 1 +
util/inj-types/amino/bundle.ts | 4 +
util/inj-types/binary.ts | 534 ++
.../cosmos/app/runtime/v1alpha1/module.ts | 345 +
util/inj-types/cosmos/app/v1alpha1/module.ts | 454 ++
.../inj-types/cosmos/auth/module/v1/module.ts | 247 +
util/inj-types/cosmos/auth/v1beta1/auth.ts | 557 ++
util/inj-types/cosmos/auth/v1beta1/genesis.ts | 115 +
.../cosmos/auth/v1beta1/query.lcd.ts | 94 +
.../cosmos/auth/v1beta1/query.rpc.Query.ts | 179 +
util/inj-types/cosmos/auth/v1beta1/query.ts | 2070 ++++++
.../inj-types/cosmos/auth/v1beta1/tx.amino.ts | 8 +
.../cosmos/auth/v1beta1/tx.registry.ts | 35 +
.../cosmos/auth/v1beta1/tx.rpc.msg.ts | 28 +
util/inj-types/cosmos/auth/v1beta1/tx.ts | 218 +
.../cosmos/authz/module/v1/module.ts | 73 +
util/inj-types/cosmos/authz/v1beta1/authz.ts | 585 ++
util/inj-types/cosmos/authz/v1beta1/event.ts | 254 +
.../inj-types/cosmos/authz/v1beta1/genesis.ts | 95 +
.../cosmos/authz/v1beta1/query.lcd.ts | 59 +
.../cosmos/authz/v1beta1/query.rpc.Query.ts | 64 +
util/inj-types/cosmos/authz/v1beta1/query.ts | 690 ++
.../cosmos/authz/v1beta1/tx.rpc.msg.ts | 62 +
util/inj-types/cosmos/authz/v1beta1/tx.ts | 855 +++
.../inj-types/cosmos/bank/module/v1/module.ts | 121 +
util/inj-types/cosmos/bank/v1beta1/authz.ts | 142 +
util/inj-types/cosmos/bank/v1beta1/bank.ts | 976 +++
util/inj-types/cosmos/bank/v1beta1/events.ts | 216 +
util/inj-types/cosmos/bank/v1beta1/genesis.ts | 306 +
.../cosmos/bank/v1beta1/query.lcd.ts | 163 +
.../cosmos/bank/v1beta1/query.rpc.Query.ts | 228 +
util/inj-types/cosmos/bank/v1beta1/query.ts | 2528 +++++++
.../inj-types/cosmos/bank/v1beta1/tx.amino.ts | 23 +
.../cosmos/bank/v1beta1/tx.registry.ts | 89 +
.../cosmos/bank/v1beta1/tx.rpc.msg.ts | 64 +
util/inj-types/cosmos/bank/v1beta1/tx.ts | 845 +++
.../cosmos/base/abci/v1beta1/abci.ts | 1527 +++++
.../cosmos/base/node/v1beta1/query.lcd.ts | 17 +
.../base/node/v1beta1/query.rpc.Service.ts | 30 +
.../cosmos/base/node/v1beta1/query.ts | 163 +
.../cosmos/base/query/v1beta1/pagination.ts | 373 ++
.../base/reflection/v2alpha1/reflection.ts | 2640 ++++++++
util/inj-types/cosmos/base/v1beta1/coin.ts | 422 ++
util/inj-types/cosmos/bundle.ts | 552 ++
.../cosmos/capability/module/v1/module.ts | 100 +
util/inj-types/cosmos/client.ts | 72 +
.../cosmos/consensus/module/v1/module.ts | 94 +
.../cosmos/consensus/v1/query.lcd.ts | 17 +
.../cosmos/consensus/v1/query.rpc.Query.ts | 30 +
util/inj-types/cosmos/consensus/v1/query.ts | 174 +
.../inj-types/cosmos/consensus/v1/tx.amino.ts | 8 +
.../cosmos/consensus/v1/tx.registry.ts | 35 +
.../cosmos/consensus/v1/tx.rpc.msg.ts | 28 +
util/inj-types/cosmos/consensus/v1/tx.ts | 234 +
.../cosmos/crisis/module/v1/module.ts | 111 +
util/inj-types/cosmos/crypto/ed25519/keys.ts | 209 +
util/inj-types/cosmos/crypto/hd/v1/hd.ts | 168 +
.../cosmos/crypto/keyring/v1/record.ts | 512 ++
util/inj-types/cosmos/crypto/multisig/keys.ts | 122 +
.../crypto/multisig/v1beta1/multisig.ts | 226 +
.../inj-types/cosmos/crypto/secp256k1/keys.ts | 200 +
.../inj-types/cosmos/crypto/secp256r1/keys.ts | 192 +
.../cosmos/distribution/module/v1/module.ts | 109 +
.../distribution/v1beta1/distribution.ts | 1521 +++++
.../cosmos/distribution/v1beta1/genesis.ts | 1126 ++++
.../cosmos/distribution/v1beta1/query.lcd.ts | 76 +
.../distribution/v1beta1/query.rpc.Query.ts | 133 +
.../cosmos/distribution/v1beta1/query.ts | 2097 ++++++
.../cosmos/distribution/v1beta1/tx.amino.ts | 33 +
.../distribution/v1beta1/tx.registry.ts | 125 +
.../cosmos/distribution/v1beta1/tx.rpc.msg.ts | 96 +
.../cosmos/distribution/v1beta1/tx.ts | 1247 ++++
.../cosmos/evidence/module/v1/module.ts | 73 +
.../cosmos/feegrant/module/v1/module.ts | 73 +
.../cosmos/feegrant/v1beta1/feegrant.ts | 635 ++
.../cosmos/feegrant/v1beta1/genesis.ts | 95 +
.../cosmos/feegrant/v1beta1/query.lcd.ts | 42 +
.../feegrant/v1beta1/query.rpc.Query.ts | 58 +
.../cosmos/feegrant/v1beta1/query.ts | 665 ++
.../cosmos/feegrant/v1beta1/tx.amino.ts | 13 +
.../cosmos/feegrant/v1beta1/tx.registry.ts | 53 +
.../cosmos/feegrant/v1beta1/tx.rpc.msg.ts | 36 +
util/inj-types/cosmos/feegrant/v1beta1/tx.ts | 449 ++
.../cosmos/genutil/module/v1/module.ts | 73 +
util/inj-types/cosmos/gov/module/v1/module.ts | 117 +
util/inj-types/cosmos/gov/v1/genesis.ts | 255 +
util/inj-types/cosmos/gov/v1/gov.ts | 1639 +++++
util/inj-types/cosmos/gov/v1/query.lcd.ts | 80 +
.../cosmos/gov/v1/query.rpc.Query.ts | 107 +
util/inj-types/cosmos/gov/v1/query.ts | 1753 +++++
util/inj-types/cosmos/gov/v1/tx.amino.ts | 33 +
util/inj-types/cosmos/gov/v1/tx.registry.ts | 125 +
util/inj-types/cosmos/gov/v1/tx.rpc.msg.ts | 72 +
util/inj-types/cosmos/gov/v1/tx.ts | 1606 +++++
util/inj-types/cosmos/gov/v1beta1/genesis.ts | 203 +
util/inj-types/cosmos/gov/v1beta1/gov.ts | 1690 +++++
.../inj-types/cosmos/gov/v1beta1/query.lcd.ts | 80 +
.../cosmos/gov/v1beta1/query.rpc.Query.ts | 107 +
util/inj-types/cosmos/gov/v1beta1/query.ts | 1699 +++++
util/inj-types/cosmos/gov/v1beta1/tx.amino.ts | 23 +
.../cosmos/gov/v1beta1/tx.registry.ts | 89 +
.../cosmos/gov/v1beta1/tx.rpc.msg.ts | 50 +
util/inj-types/cosmos/gov/v1beta1/tx.ts | 1122 ++++
.../cosmos/group/module/v1/module.ts | 124 +
util/inj-types/cosmos/group/v1/events.ts | 1008 +++
util/inj-types/cosmos/group/v1/genesis.ts | 242 +
util/inj-types/cosmos/group/v1/query.lcd.ts | 145 +
.../cosmos/group/v1/query.rpc.Query.ts | 191 +
util/inj-types/cosmos/group/v1/query.ts | 2928 ++++++++
util/inj-types/cosmos/group/v1/tx.amino.ts | 73 +
util/inj-types/cosmos/group/v1/tx.registry.ts | 269 +
util/inj-types/cosmos/group/v1/tx.rpc.msg.ts | 124 +
util/inj-types/cosmos/group/v1/tx.ts | 3157 +++++++++
util/inj-types/cosmos/group/v1/types.ts | 2143 ++++++
util/inj-types/cosmos/ics23/v1/proofs.ts | 2104 ++++++
.../inj-types/cosmos/mint/module/v1/module.ts | 109 +
util/inj-types/cosmos/mint/v1beta1/genesis.ts | 112 +
util/inj-types/cosmos/mint/v1beta1/mint.ts | 289 +
.../cosmos/mint/v1beta1/query.lcd.ts | 27 +
.../cosmos/mint/v1beta1/query.rpc.Query.ts | 52 +
util/inj-types/cosmos/mint/v1beta1/query.ts | 519 ++
.../inj-types/cosmos/mint/v1beta1/tx.amino.ts | 8 +
.../cosmos/mint/v1beta1/tx.registry.ts | 35 +
.../cosmos/mint/v1beta1/tx.rpc.msg.ts | 28 +
util/inj-types/cosmos/mint/v1beta1/tx.ts | 218 +
util/inj-types/cosmos/msg/v1/msg.ts | 1 +
util/inj-types/cosmos/nft/module/v1/module.ts | 73 +
.../cosmos/orm/module/v1alpha1/module.ts | 85 +
.../orm/query/v1alpha1/query.rpc.Query.ts | 41 +
.../cosmos/orm/query/v1alpha1/query.ts | 979 +++
.../cosmos/params/module/v1/module.ts | 73 +
.../inj-types/cosmos/params/v1beta1/params.ts | 256 +
.../cosmos/params/v1beta1/query.lcd.ts | 34 +
.../cosmos/params/v1beta1/query.rpc.Query.ts | 51 +
util/inj-types/cosmos/params/v1beta1/query.ts | 519 ++
util/inj-types/cosmos/query/v1/query.ts | 1 +
.../cosmos/reflection/v1/reflection.ts | 168 +
util/inj-types/cosmos/rpc.query.ts | 64 +
util/inj-types/cosmos/rpc.tx.ts | 46 +
.../cosmos/slashing/module/v1/module.ts | 94 +
.../cosmos/staking/module/v1/module.ts | 121 +
.../inj-types/cosmos/staking/v1beta1/authz.ts | 318 +
.../cosmos/staking/v1beta1/genesis.ts | 343 +
.../cosmos/staking/v1beta1/query.lcd.ts | 159 +
.../cosmos/staking/v1beta1/query.rpc.Query.ts | 241 +
.../inj-types/cosmos/staking/v1beta1/query.ts | 3029 +++++++++
.../cosmos/staking/v1beta1/staking.ts | 3040 +++++++++
.../cosmos/staking/v1beta1/tx.amino.ts | 38 +
.../cosmos/staking/v1beta1/tx.registry.ts | 143 +
.../cosmos/staking/v1beta1/tx.rpc.msg.ts | 94 +
util/inj-types/cosmos/staking/v1beta1/tx.ts | 1597 +++++
util/inj-types/cosmos/tx/config/v1/config.ts | 123 +
.../cosmos/tx/signing/v1beta1/signing.ts | 687 ++
.../cosmos/tx/v1beta1/service.lcd.ts | 54 +
.../cosmos/tx/v1beta1/service.rpc.Service.ts | 148 +
util/inj-types/cosmos/tx/v1beta1/service.ts | 2261 +++++++
util/inj-types/cosmos/tx/v1beta1/tx.ts | 2049 ++++++
.../cosmos/upgrade/module/v1/module.ts | 94 +
.../cosmos/upgrade/v1beta1/query.lcd.ts | 52 +
.../cosmos/upgrade/v1beta1/query.rpc.Query.ts | 98 +
.../inj-types/cosmos/upgrade/v1beta1/query.ts | 1009 +++
.../cosmos/upgrade/v1beta1/tx.amino.ts | 13 +
.../cosmos/upgrade/v1beta1/tx.registry.ts | 53 +
.../cosmos/upgrade/v1beta1/tx.rpc.msg.ts | 42 +
util/inj-types/cosmos/upgrade/v1beta1/tx.ts | 394 ++
.../cosmos/upgrade/v1beta1/upgrade.ts | 606 ++
.../cosmos/vesting/module/v1/module.ts | 73 +
.../cosmos/vesting/v1beta1/tx.amino.ts | 18 +
.../cosmos/vesting/v1beta1/tx.registry.ts | 71 +
.../cosmos/vesting/v1beta1/tx.rpc.msg.ts | 56 +
util/inj-types/cosmos/vesting/v1beta1/tx.ts | 698 ++
.../cosmos/vesting/v1beta1/vesting.ts | 737 +++
util/inj-types/cosmos_proto/bundle.ts | 4 +
util/inj-types/cosmos_proto/cosmos.ts | 349 +
util/inj-types/cosmwasm/bundle.ts | 36 +
util/inj-types/cosmwasm/client.ts | 47 +
util/inj-types/cosmwasm/rpc.query.ts | 69 +
util/inj-types/cosmwasm/rpc.tx.ts | 51 +
util/inj-types/cosmwasm/wasm/v1/authz.ts | 1364 ++++
util/inj-types/cosmwasm/wasm/v1/genesis.ts | 525 ++
util/inj-types/cosmwasm/wasm/v1/ibc.ts | 345 +
.../cosmwasm/wasm/v1/proposal_legacy.ts | 2550 +++++++
util/inj-types/cosmwasm/wasm/v1/query.lcd.ts | 108 +
.../cosmwasm/wasm/v1/query.rpc.Query.ts | 144 +
util/inj-types/cosmwasm/wasm/v1/query.ts | 2534 +++++++
util/inj-types/cosmwasm/wasm/v1/tx.amino.ts | 88 +
.../inj-types/cosmwasm/wasm/v1/tx.registry.ts | 323 +
util/inj-types/cosmwasm/wasm/v1/tx.rpc.msg.ts | 222 +
util/inj-types/cosmwasm/wasm/v1/tx.ts | 4164 ++++++++++++
util/inj-types/cosmwasm/wasm/v1/types.ts | 1670 +++++
util/inj-types/gogoproto/bundle.ts | 4 +
util/inj-types/gogoproto/gogo.ts | 1 +
util/inj-types/google/api/annotations.ts | 1 +
util/inj-types/google/api/http.ts | 1352 ++++
util/inj-types/google/bundle.ts | 12 +
util/inj-types/google/protobuf/any.ts | 399 ++
util/inj-types/google/protobuf/descriptor.ts | 5180 +++++++++++++++
util/inj-types/google/protobuf/duration.ts | 281 +
util/inj-types/google/protobuf/timestamp.ts | 347 +
util/inj-types/helpers.ts | 255 +
.../controller/v1/controller.ts | 103 +
.../controller/v1/query.lcd.ts | 22 +
.../controller/v1/query.rpc.Query.ts | 41 +
.../controller/v1/query.ts | 361 +
.../controller/v1/tx.amino.ts | 13 +
.../controller/v1/tx.registry.ts | 53 +
.../controller/v1/tx.rpc.msg.ts | 28 +
.../interchain_accounts/controller/v1/tx.ts | 461 ++
.../interchain_accounts/genesis/v1/genesis.ts | 657 ++
.../interchain_accounts/host/v1/host.ts | 122 +
.../interchain_accounts/host/v1/query.lcd.ts | 17 +
.../host/v1/query.rpc.Query.ts | 30 +
.../interchain_accounts/host/v1/query.ts | 166 +
.../interchain_accounts/v1/account.ts | 111 +
.../interchain_accounts/v1/metadata.ts | 194 +
.../interchain_accounts/v1/packet.ts | 253 +
.../ibc/applications/transfer/v1/authz.ts | 256 +
.../ibc/applications/transfer/v1/genesis.ts | 151 +
.../ibc/applications/transfer/v1/query.lcd.ts | 69 +
.../transfer/v1/query.rpc.Query.ts | 87 +
.../ibc/applications/transfer/v1/query.ts | 1174 ++++
.../ibc/applications/transfer/v1/transfer.ts | 262 +
.../ibc/applications/transfer/v1/tx.amino.ts | 8 +
.../applications/transfer/v1/tx.registry.ts | 35 +
.../applications/transfer/v1/tx.rpc.msg.ts | 20 +
.../ibc/applications/transfer/v1/tx.ts | 331 +
.../ibc/applications/transfer/v2/packet.ts | 174 +
util/inj-types/ibc/bundle.ts | 184 +
util/inj-types/ibc/client.ts | 59 +
util/inj-types/ibc/core/channel/v1/channel.ts | 1257 ++++
util/inj-types/ibc/core/channel/v1/genesis.ts | 343 +
.../ibc/core/channel/v1/query.lcd.ts | 115 +
.../ibc/core/channel/v1/query.rpc.Query.ts | 196 +
util/inj-types/ibc/core/channel/v1/query.ts | 3475 ++++++++++
.../inj-types/ibc/core/channel/v1/tx.amino.ts | 53 +
.../ibc/core/channel/v1/tx.registry.ts | 197 +
.../ibc/core/channel/v1/tx.rpc.msg.ts | 96 +
util/inj-types/ibc/core/channel/v1/tx.ts | 2482 +++++++
util/inj-types/ibc/core/client/v1/client.ts | 930 +++
util/inj-types/ibc/core/client/v1/genesis.ts | 418 ++
.../inj-types/ibc/core/client/v1/query.lcd.ts | 86 +
.../ibc/core/client/v1/query.rpc.Query.ts | 128 +
util/inj-types/ibc/core/client/v1/query.ts | 1980 ++++++
util/inj-types/ibc/core/client/v1/tx.amino.ts | 23 +
.../ibc/core/client/v1/tx.registry.ts | 89 +
.../ibc/core/client/v1/tx.rpc.msg.ts | 44 +
util/inj-types/ibc/core/client/v1/tx.ts | 902 +++
.../ibc/core/commitment/v1/commitment.ts | 418 ++
.../ibc/core/connection/v1/connection.ts | 1006 +++
.../ibc/core/connection/v1/genesis.ts | 144 +
.../ibc/core/connection/v1/query.lcd.ts | 54 +
.../ibc/core/connection/v1/query.rpc.Query.ts | 99 +
.../inj-types/ibc/core/connection/v1/query.ts | 1401 ++++
.../ibc/core/connection/v1/tx.amino.ts | 23 +
.../ibc/core/connection/v1/tx.registry.ts | 89 +
.../ibc/core/connection/v1/tx.rpc.msg.ts | 48 +
util/inj-types/ibc/core/connection/v1/tx.ts | 1175 ++++
.../lightclients/localhost/v2/localhost.ts | 95 +
.../solomachine/v2/solomachine.ts | 2104 ++++++
.../solomachine/v3/solomachine.ts | 1071 +++
.../lightclients/tendermint/v1/tendermint.ts | 860 +++
util/inj-types/ibc/rpc.query.ts | 90 +
util/inj-types/ibc/rpc.tx.ts | 69 +
util/inj-types/index.ts | 20 +
util/inj-types/tendermint/abci/types.ts | 5873 +++++++++++++++++
util/inj-types/tendermint/blocksync/types.ts | 554 ++
util/inj-types/tendermint/bundle.ts | 82 +
util/inj-types/tendermint/consensus/types.ts | 1308 ++++
util/inj-types/tendermint/consensus/wal.ts | 547 ++
util/inj-types/tendermint/crypto/keys.ts | 100 +
util/inj-types/tendermint/crypto/proof.ts | 548 ++
util/inj-types/tendermint/libs/bits/types.ts | 108 +
util/inj-types/tendermint/mempool/types.ts | 164 +
util/inj-types/tendermint/p2p/conn.ts | 440 ++
util/inj-types/tendermint/p2p/pex.ts | 241 +
util/inj-types/tendermint/p2p/types.ts | 502 ++
util/inj-types/tendermint/privval/types.ts | 1041 +++
util/inj-types/tendermint/rpc/grpc/types.ts | 300 +
util/inj-types/tendermint/state/types.ts | 828 +++
util/inj-types/tendermint/statesync/types.ts | 578 ++
util/inj-types/tendermint/store/types.ts | 97 +
util/inj-types/tendermint/types/block.ts | 129 +
util/inj-types/tendermint/types/canonical.ts | 531 ++
util/inj-types/tendermint/types/events.ts | 112 +
util/inj-types/tendermint/types/evidence.ts | 470 ++
util/inj-types/tendermint/types/params.ts | 690 ++
util/inj-types/tendermint/types/types.ts | 1848 ++++++
util/inj-types/tendermint/types/validator.ts | 335 +
util/inj-types/tendermint/version/types.ts | 222 +
util/inj-types/utf8.ts | 148 +
util/inj-types/varint.ts | 488 ++
307 files changed, 143968 insertions(+), 206 deletions(-)
create mode 100644 components/Pages/Dashboard/hooks/getDashboardDataAPI.ts
delete mode 100644 components/Pages/Dashboard/hooks/useGetDailyBuybacks.ts
create mode 100644 util/inj-types/amino/amino.ts
create mode 100644 util/inj-types/amino/bundle.ts
create mode 100644 util/inj-types/binary.ts
create mode 100644 util/inj-types/cosmos/app/runtime/v1alpha1/module.ts
create mode 100644 util/inj-types/cosmos/app/v1alpha1/module.ts
create mode 100644 util/inj-types/cosmos/auth/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/auth.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/auth/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/authz/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/authz.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/event.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/authz/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/bank/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/authz.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/bank.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/events.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/bank/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/base/abci/v1beta1/abci.ts
create mode 100644 util/inj-types/cosmos/base/node/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/base/node/v1beta1/query.rpc.Service.ts
create mode 100644 util/inj-types/cosmos/base/node/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/base/query/v1beta1/pagination.ts
create mode 100644 util/inj-types/cosmos/base/reflection/v2alpha1/reflection.ts
create mode 100644 util/inj-types/cosmos/base/v1beta1/coin.ts
create mode 100644 util/inj-types/cosmos/bundle.ts
create mode 100644 util/inj-types/cosmos/capability/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/client.ts
create mode 100644 util/inj-types/cosmos/consensus/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/consensus/v1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/consensus/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/consensus/v1/query.ts
create mode 100644 util/inj-types/cosmos/consensus/v1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/consensus/v1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/consensus/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/consensus/v1/tx.ts
create mode 100644 util/inj-types/cosmos/crisis/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/crypto/ed25519/keys.ts
create mode 100644 util/inj-types/cosmos/crypto/hd/v1/hd.ts
create mode 100644 util/inj-types/cosmos/crypto/keyring/v1/record.ts
create mode 100644 util/inj-types/cosmos/crypto/multisig/keys.ts
create mode 100644 util/inj-types/cosmos/crypto/multisig/v1beta1/multisig.ts
create mode 100644 util/inj-types/cosmos/crypto/secp256k1/keys.ts
create mode 100644 util/inj-types/cosmos/crypto/secp256r1/keys.ts
create mode 100644 util/inj-types/cosmos/distribution/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/distribution.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/distribution/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/evidence/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/feegrant/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/feegrant.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/feegrant/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/genutil/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/gov/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/gov/v1/genesis.ts
create mode 100644 util/inj-types/cosmos/gov/v1/gov.ts
create mode 100644 util/inj-types/cosmos/gov/v1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/gov/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/gov/v1/query.ts
create mode 100644 util/inj-types/cosmos/gov/v1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/gov/v1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/gov/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/gov/v1/tx.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/gov.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/gov/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/group/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/group/v1/events.ts
create mode 100644 util/inj-types/cosmos/group/v1/genesis.ts
create mode 100644 util/inj-types/cosmos/group/v1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/group/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/group/v1/query.ts
create mode 100644 util/inj-types/cosmos/group/v1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/group/v1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/group/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/group/v1/tx.ts
create mode 100644 util/inj-types/cosmos/group/v1/types.ts
create mode 100644 util/inj-types/cosmos/ics23/v1/proofs.ts
create mode 100644 util/inj-types/cosmos/mint/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/mint.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/mint/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/msg/v1/msg.ts
create mode 100644 util/inj-types/cosmos/nft/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/orm/module/v1alpha1/module.ts
create mode 100644 util/inj-types/cosmos/orm/query/v1alpha1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/orm/query/v1alpha1/query.ts
create mode 100644 util/inj-types/cosmos/params/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/params/v1beta1/params.ts
create mode 100644 util/inj-types/cosmos/params/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/params/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/params/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/query/v1/query.ts
create mode 100644 util/inj-types/cosmos/reflection/v1/reflection.ts
create mode 100644 util/inj-types/cosmos/rpc.query.ts
create mode 100644 util/inj-types/cosmos/rpc.tx.ts
create mode 100644 util/inj-types/cosmos/slashing/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/staking/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/authz.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/genesis.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/staking.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/staking/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/tx/config/v1/config.ts
create mode 100644 util/inj-types/cosmos/tx/signing/v1beta1/signing.ts
create mode 100644 util/inj-types/cosmos/tx/v1beta1/service.lcd.ts
create mode 100644 util/inj-types/cosmos/tx/v1beta1/service.rpc.Service.ts
create mode 100644 util/inj-types/cosmos/tx/v1beta1/service.ts
create mode 100644 util/inj-types/cosmos/tx/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/upgrade/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/query.lcd.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/query.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/upgrade/v1beta1/upgrade.ts
create mode 100644 util/inj-types/cosmos/vesting/module/v1/module.ts
create mode 100644 util/inj-types/cosmos/vesting/v1beta1/tx.amino.ts
create mode 100644 util/inj-types/cosmos/vesting/v1beta1/tx.registry.ts
create mode 100644 util/inj-types/cosmos/vesting/v1beta1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmos/vesting/v1beta1/tx.ts
create mode 100644 util/inj-types/cosmos/vesting/v1beta1/vesting.ts
create mode 100644 util/inj-types/cosmos_proto/bundle.ts
create mode 100644 util/inj-types/cosmos_proto/cosmos.ts
create mode 100644 util/inj-types/cosmwasm/bundle.ts
create mode 100644 util/inj-types/cosmwasm/client.ts
create mode 100644 util/inj-types/cosmwasm/rpc.query.ts
create mode 100644 util/inj-types/cosmwasm/rpc.tx.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/authz.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/genesis.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/ibc.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/proposal_legacy.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/query.lcd.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/query.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/tx.amino.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/tx.registry.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/tx.ts
create mode 100644 util/inj-types/cosmwasm/wasm/v1/types.ts
create mode 100644 util/inj-types/gogoproto/bundle.ts
create mode 100644 util/inj-types/gogoproto/gogo.ts
create mode 100644 util/inj-types/google/api/annotations.ts
create mode 100644 util/inj-types/google/api/http.ts
create mode 100644 util/inj-types/google/bundle.ts
create mode 100644 util/inj-types/google/protobuf/any.ts
create mode 100644 util/inj-types/google/protobuf/descriptor.ts
create mode 100644 util/inj-types/google/protobuf/duration.ts
create mode 100644 util/inj-types/google/protobuf/timestamp.ts
create mode 100644 util/inj-types/helpers.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/controller.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/query.lcd.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/query.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/tx.amino.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/controller/v1/tx.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/genesis/v1/genesis.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/host/v1/host.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/host/v1/query.lcd.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/host/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/host/v1/query.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/v1/account.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/v1/metadata.ts
create mode 100644 util/inj-types/ibc/applications/interchain_accounts/v1/packet.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/authz.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/genesis.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/query.lcd.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/query.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/transfer.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/tx.amino.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/tx.registry.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v1/tx.ts
create mode 100644 util/inj-types/ibc/applications/transfer/v2/packet.ts
create mode 100644 util/inj-types/ibc/bundle.ts
create mode 100644 util/inj-types/ibc/client.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/channel.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/genesis.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/query.lcd.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/query.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/tx.amino.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/tx.registry.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/ibc/core/channel/v1/tx.ts
create mode 100644 util/inj-types/ibc/core/client/v1/client.ts
create mode 100644 util/inj-types/ibc/core/client/v1/genesis.ts
create mode 100644 util/inj-types/ibc/core/client/v1/query.lcd.ts
create mode 100644 util/inj-types/ibc/core/client/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/ibc/core/client/v1/query.ts
create mode 100644 util/inj-types/ibc/core/client/v1/tx.amino.ts
create mode 100644 util/inj-types/ibc/core/client/v1/tx.registry.ts
create mode 100644 util/inj-types/ibc/core/client/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/ibc/core/client/v1/tx.ts
create mode 100644 util/inj-types/ibc/core/commitment/v1/commitment.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/connection.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/genesis.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/query.lcd.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/query.rpc.Query.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/query.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/tx.amino.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/tx.registry.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/tx.rpc.msg.ts
create mode 100644 util/inj-types/ibc/core/connection/v1/tx.ts
create mode 100644 util/inj-types/ibc/lightclients/localhost/v2/localhost.ts
create mode 100644 util/inj-types/ibc/lightclients/solomachine/v2/solomachine.ts
create mode 100644 util/inj-types/ibc/lightclients/solomachine/v3/solomachine.ts
create mode 100644 util/inj-types/ibc/lightclients/tendermint/v1/tendermint.ts
create mode 100644 util/inj-types/ibc/rpc.query.ts
create mode 100644 util/inj-types/ibc/rpc.tx.ts
create mode 100644 util/inj-types/index.ts
create mode 100644 util/inj-types/tendermint/abci/types.ts
create mode 100644 util/inj-types/tendermint/blocksync/types.ts
create mode 100644 util/inj-types/tendermint/bundle.ts
create mode 100644 util/inj-types/tendermint/consensus/types.ts
create mode 100644 util/inj-types/tendermint/consensus/wal.ts
create mode 100644 util/inj-types/tendermint/crypto/keys.ts
create mode 100644 util/inj-types/tendermint/crypto/proof.ts
create mode 100644 util/inj-types/tendermint/libs/bits/types.ts
create mode 100644 util/inj-types/tendermint/mempool/types.ts
create mode 100644 util/inj-types/tendermint/p2p/conn.ts
create mode 100644 util/inj-types/tendermint/p2p/pex.ts
create mode 100644 util/inj-types/tendermint/p2p/types.ts
create mode 100644 util/inj-types/tendermint/privval/types.ts
create mode 100644 util/inj-types/tendermint/rpc/grpc/types.ts
create mode 100644 util/inj-types/tendermint/state/types.ts
create mode 100644 util/inj-types/tendermint/statesync/types.ts
create mode 100644 util/inj-types/tendermint/store/types.ts
create mode 100644 util/inj-types/tendermint/types/block.ts
create mode 100644 util/inj-types/tendermint/types/canonical.ts
create mode 100644 util/inj-types/tendermint/types/events.ts
create mode 100644 util/inj-types/tendermint/types/evidence.ts
create mode 100644 util/inj-types/tendermint/types/params.ts
create mode 100644 util/inj-types/tendermint/types/types.ts
create mode 100644 util/inj-types/tendermint/types/validator.ts
create mode 100644 util/inj-types/tendermint/version/types.ts
create mode 100644 util/inj-types/utf8.ts
create mode 100644 util/inj-types/varint.ts
diff --git a/.eslintrc b/.eslintrc
index ed3e98bc..3b5aff93 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -21,6 +21,7 @@
"eslint-plugin-import-helpers",
"@typescript-eslint"
],
+ "ignorePatterns": ["**/util/inj-types/**"],
"rules": {
// Possible Problems
"array-callback-return": [
diff --git a/components/Pages/Dashboard/Dashboard.tsx b/components/Pages/Dashboard/Dashboard.tsx
index 7aca34cc..5eccb011 100644
--- a/components/Pages/Dashboard/Dashboard.tsx
+++ b/components/Pages/Dashboard/Dashboard.tsx
@@ -1,16 +1,15 @@
import React, { FC, useEffect } from 'react'
+
import { HStack, Text, VStack } from '@chakra-ui/react'
import Loader from 'components/Loader'
import { Header } from 'components/Pages/Dashboard/Header'
import { StatsTable } from 'components/Pages/Dashboard/StatsTable'
import { usePrices } from 'hooks/usePrices'
-import { fetchSupply } from 'libs/fetchSupply'
import { useRecoilState } from 'recoil'
-import { getBondingAPRsAPI } from 'services/useAPI'
import { dashboardDataState } from 'state/dashboardDataState'
import { getChainLogoUrlByName } from 'util/getChainLogoUrlByName'
-import { getDashboardData } from 'util/getDashboardData'
- import { useGetDailyBuybacks } from './hooks/useGetDailyBuybacks'
+
+import { useGetDashboardDataAPI } from './hooks/getDashboardDataAPI'
export type DashboardData = {
logoUrl: string
@@ -22,20 +21,15 @@ export type DashboardData = {
}
export const Dashboard: FC = () => {
const [dashboardState, setDashboardDataState] = useRecoilState(dashboardDataState)
- const { data: buybackData, isLoading } = useGetDailyBuybacks()
+ const { data: dashboardData, isLoading } = useGetDashboardDataAPI()
const prices = usePrices()
useEffect(() => {
const fetchDashboardData = async () => {
- let [circulatingWhaleSupply, mockData, aprs]: any = await Promise.all([
- fetchSupply(),
- getDashboardData(),
- getBondingAPRsAPI(),
- ])
- circulatingWhaleSupply = circulatingWhaleSupply?.circulating / (10 ** 6) || 0
- const marketCap = circulatingWhaleSupply * (prices?.WHALE || 0)
- const mappedDashboardData = mockData.map((data) => {
- const apr = aprs[data.chainName].bondingAPR
- const buyback = buybackData.find(buybackData=> buybackData.chainName === data.chainName)?.buyback
+ const circulatingWhaleSupply = dashboardData.supply?.circulating / (10 ** 6) || 0
+ const marketCap = circulatingWhaleSupply * (prices?.WHALE || 0) || 0
+ const mappedDashboardData = dashboardData.dashboardData?.map((data) => {
+ const apr = dashboardData.bondingInfos[data.chainName]?.bondingAPR
+ const buyback = dashboardData.bondingInfos[data.chainName]?.buyback
return ({
logoUrl: getChainLogoUrlByName(data.chainName),
chainName: data.chainName,
@@ -50,7 +44,7 @@ export const Dashboard: FC = () => {
data: mappedDashboardData,
whalePrice: prices?.WHALE ? prices.WHALE : 0,
marketCap: marketCap ? marketCap : 0,
- isInitialized: prices?.WHALE !== 0 && marketCap !== 0,
+ isInitialized: prices?.WHALE !== 0 && circulatingWhaleSupply !== 0 && marketCap !== 0 && dashboardData.dashboardData?.length > 0,
})
}
if (!dashboardState.isInitialized) {
@@ -59,7 +53,7 @@ export const Dashboard: FC = () => {
}, [prices, dashboardState.isInitialized, isLoading])
return
- {dashboardState.isInitialized && }
+ {dashboardState.isInitialized && }
{!dashboardState.isInitialized && ( {
alignItems="center">
)}
- {dashboardState.isInitialized && }
- {dashboardState.isInitialized && {`Total Daily Dex Buybacks: ${dashboardState.data.reduce((acc, data) => acc + data.buyback, 0).toFixed(2)} WHALE`}}
+ {dashboardState.isInitialized && }
+ {dashboardState.isInitialized && {`Total Daily Dex Buybacks: ${dashboardState.data?.reduce((acc, data) => acc + data.buyback, 0).toFixed(2)} WHALE`}}
}
diff --git a/components/Pages/Dashboard/hooks/getDashboardDataAPI.ts b/components/Pages/Dashboard/hooks/getDashboardDataAPI.ts
new file mode 100644
index 00000000..1926043e
--- /dev/null
+++ b/components/Pages/Dashboard/hooks/getDashboardDataAPI.ts
@@ -0,0 +1,58 @@
+import { useMemo } from 'react'
+import { useQueries } from 'react-query'
+
+import { fetchSupply } from 'libs/fetchSupply'
+import { debounce } from 'lodash'
+import { getBondingAPRsAPI } from 'services/useAPI'
+import { getDashboardData } from 'util/getDashboardData'
+
+export const useGetDashboardDataAPI = () => {
+ const debouncedRefetch = useMemo(() => debounce((refetchFunc) => refetchFunc(), 500),
+ [])
+
+ const queries = useQueries([
+ {
+ queryKey: ['WHALEsupply'],
+ queryFn: () => fetchSupply(),
+ refetchOnMount: 'always',
+ refetchInterval: 180000
+ },
+ {
+ queryKey: ['dashBoardData'],
+ queryFn: () => getDashboardData(),
+ refetchOnMount: 'always',
+ refetchInterval: 180000
+ },
+ {
+ queryKey: ['bondingInfos'],
+ queryFn: () => getBondingAPRsAPI(),
+ refetchOnMount: 'always',
+ refetchInterval: 180000
+ },
+ ])
+
+ const isLoading = useMemo(() => queries.some((query) => (
+ query.isLoading || (!query.data && query.data !== 0)
+ )),
+ [queries])
+
+ const refetchAll = () => {
+ queries.forEach((query) => {
+ debouncedRefetch(query.refetch)
+ })
+ }
+
+ const data = useMemo(() => {
+ const supply = queries[0].data
+ const dashboardData = queries[1].data
+ const bondingInfos = queries[2].data
+
+ return { supply,
+ dashboardData,
+ bondingInfos }
+ }, [queries])
+
+ return { data,
+ isLoading,
+ refetch: refetchAll }
+}
diff --git a/components/Pages/Dashboard/hooks/useGetDailyBuybacks.ts b/components/Pages/Dashboard/hooks/useGetDailyBuybacks.ts
deleted file mode 100644
index 3d572d2b..00000000
--- a/components/Pages/Dashboard/hooks/useGetDailyBuybacks.ts
+++ /dev/null
@@ -1,130 +0,0 @@
-import { useMemo } from 'react'
-import { useQueries } from 'react-query'
-
-import { Config, useConfig } from 'components/Pages/Bonding/hooks/useDashboardData'
-import { getDailyBuybacks } from 'components/Pages/Dashboard/hooks/getDailyBuybacks'
-import { ChainId, WalletChainName } from 'constants/index'
-import { useClients } from 'hooks/useClients'
-import { debounce } from 'lodash'
-import { useRecoilValue } from 'recoil'
-import { chainState } from 'state/chainState'
-
-export const useGetDailyBuybacks = () => {
- const { network } = useRecoilValue(chainState)
- const debouncedRefetch = useMemo(() => debounce((refetchFunc) => refetchFunc(), 500),
- [])
- const migalooConfig: Config = useConfig(network, ChainId.migaloo)
- const terraConfig: Config = useConfig(network, ChainId.terra)
- const junoConfig: Config = useConfig(network, ChainId.juno)
- const seiConfig: Config = useConfig(network, ChainId.sei)
- const injectiveConfig: Config = useConfig(network, ChainId.injective)
- const chihuahuaConfig: Config = useConfig(network, ChainId.chihuahua)
- const terracConfig: Config = useConfig(network, ChainId.terrac)
- const osmosisConfig: Config = useConfig(network, ChainId.osmosis)
-
- const { cosmWasmClient: migalooClient } = useClients(WalletChainName.migaloo)
- const { cosmWasmClient: terraClient } = useClients(WalletChainName.terra)
- const { cosmWasmClient: junoClient } = useClients(WalletChainName.juno)
- const { cosmWasmClient: seiClient } = useClients(WalletChainName.sei)
- const { cosmWasmClient: injectiveClient } = useClients(WalletChainName.injective)
- const { cosmWasmClient: chihuahuaClient } = useClients(WalletChainName.chihuahua)
- const { cosmWasmClient: terracClient } = useClients(WalletChainName.terrac)
- const { cosmWasmClient: osmosisClient } = useClients(WalletChainName.osmosis)
-
- const queries = useQueries([
- {
- queryKey: ['migalooBuyback', network, migalooConfig],
- queryFn: () => getDailyBuybacks(migalooConfig, migalooClient),
- enabled: Boolean(migalooClient) && Boolean(migalooConfig),
- refetchOnMount: false,
- },
- {
- queryKey: ['terraBuyback', network, terraConfig],
- queryFn: () => getDailyBuybacks(terraConfig, terraClient),
- enabled: Boolean(terraClient) && Boolean(terraConfig),
- refetchOnMount: false,
- },
- {
- queryKey: ['junoBuyback', network, junoConfig],
- queryFn: () => getDailyBuybacks(junoConfig, junoClient),
- enabled: Boolean(junoClient) && Boolean(junoConfig),
- refetchOnMount: false,
- },
- {
- queryKey: ['seiBuyback', network, seiConfig],
- queryFn: () => getDailyBuybacks(seiConfig, seiClient),
- enabled: Boolean(seiClient) && Boolean(seiConfig),
- refetchOnMount: false,
- },
- {
- queryKey: ['injectiveBuyback', network, injectiveConfig],
- queryFn: () => getDailyBuybacks(injectiveConfig, injectiveClient),
- enabled: Boolean(injectiveClient) && Boolean(injectiveConfig),
- refetchOnMount: false,
- },
- {
- queryKey: ['chihuahuaBuyback', network, chihuahuaConfig],
- queryFn: () => getDailyBuybacks(chihuahuaConfig, chihuahuaClient),
- enabled: Boolean(chihuahuaClient) && Boolean(chihuahuaConfig),
- refetchOnMount: false,
- },
- {
- queryKey: ['terracBuyback', network, terracConfig],
- queryFn: () => getDailyBuybacks(terracConfig, terracClient),
- enabled: Boolean(terracClient) && Boolean(terracConfig),
- refetchOnMount: false,
- },
- {
- queryKey: ['osmosisBuyback', network, osmosisConfig],
- queryFn: () => getDailyBuybacks(osmosisConfig, osmosisClient),
- enabled: Boolean(osmosisConfig) && Boolean(osmosisClient),
- refetchOnMount: false,
- },
- ])
-
- const isLoading = useMemo(() => queries.some((query) => (
- query.isLoading || (!query.data && query.data !== 0)
- )),
- [queries])
-
- const refetchAll = () => {
- queries.forEach((query) => {
- debouncedRefetch(query.refetch)
- })
- }
-
- const data = useMemo(() => {
- const migalooBuyback = queries[0].data
- const terraBuyback = queries[1].data
- const junoBuyback = queries[2].data
- const seiBuyback = queries[3].data
- const injectiveBuyback = queries[4].data
- const chihuahuaBuyback = queries[5].data
- const terracBuyback = queries[6].data
- const osmosisBuyback = queries[7].data
-
-
- return [
- { chainName: WalletChainName.migaloo,
- buyback: migalooBuyback },
- { chainName: WalletChainName.terra,
- buyback: terraBuyback },
- { chainName: WalletChainName.juno,
- buyback: junoBuyback },
- { chainName: WalletChainName.sei,
- buyback: seiBuyback },
- { chainName: WalletChainName.injective,
- buyback: injectiveBuyback },
- { chainName: WalletChainName.chihuahua,
- buyback: chihuahuaBuyback },
- { chainName: WalletChainName.terrac,
- buyback: terracBuyback },
- { chainName: WalletChainName.osmosis,
- buyback: osmosisBuyback },
- ]
- }, [queries])
-
- return { data,
- isLoading,
- refetch: refetchAll }
-}
diff --git a/components/Wallet/ChainSelect/ChainList/ChainItem.tsx b/components/Wallet/ChainSelect/ChainList/ChainItem.tsx
index 9a7d98b3..ded985d7 100644
--- a/components/Wallet/ChainSelect/ChainList/ChainItem.tsx
+++ b/components/Wallet/ChainSelect/ChainList/ChainItem.tsx
@@ -11,12 +11,11 @@ const ChainItem = ({
onClose,
active,
walletConnected,
- walletType,
}) => {
const queryClient = useQueryClient()
return (
To access this chain, you must add it to your wallet.
- ) : !walletConnected && chain.chainName?.includes('Injective') && walletType !== 'station-extension' ? (
-
- Injective with Station not supported. Please try Keplr or Leap.
) : null
}
bg="transparent"
diff --git a/components/Wallet/Modal/WalletConnectButton.tsx b/components/Wallet/Modal/WalletConnectButton.tsx
index 91c8a3f5..25c07e53 100644
--- a/components/Wallet/Modal/WalletConnectButton.tsx
+++ b/components/Wallet/Modal/WalletConnectButton.tsx
@@ -63,9 +63,6 @@ export const WalletConnectButton = ({ onCloseModal, connect, walletType }: Props
console.error(`${chainId} not activated`)
handleChainActivationError(chainName, toast);
}
- if (walletType === WalletType.terraExtension && chainName.includes('injective')) {
- error = true
- }
}
if (!error) {
connect()
diff --git a/components/Wallet/Modal/WalletModal.tsx b/components/Wallet/Modal/WalletModal.tsx
index 3916b84a..2cdb1034 100644
--- a/components/Wallet/Modal/WalletModal.tsx
+++ b/components/Wallet/Modal/WalletModal.tsx
@@ -39,12 +39,18 @@ export const WalletModal = ({ isOpen, setOpen, walletRepo }) => {
}
}
- const shouldRenderButton = (wallet: { walletName: string, isModeExtension: boolean }) => {
+ const shouldRenderButton = (wallet: { walletName: WalletType, isModeExtension: boolean }) => {
const { walletName } = wallet
const okxchains = ['osmosis-1', 'juno-1', 'pacific-1', 'injective-1']
const inAppLeap = isMobile && window.leap && window.leap.mode === 'mobile-web'
const inAppKeplr = isMobile && window.keplr && window.keplr.mode === 'mobile-web' && !inAppLeap
- const inj = chainId.includes('injective') && (walletName === WalletType.keplrExtension || walletName === WalletType.leapExtension || walletName === WalletType.ninjiExtension || walletName === WalletType.okxwallet)
+ const inj = chainId.includes('injective') && [
+ WalletType.terraExtension,
+ WalletType.keplrExtension,
+ WalletType.leapExtension,
+ WalletType.ninjiExtension,
+ WalletType.okxwallet,
+ ].includes(walletName);
if (walletName === WalletType.okxwallet && !okxchains.includes(chainId)) {
return false
}
diff --git a/components/Wallet/Wallet.tsx b/components/Wallet/Wallet.tsx
index a97a0329..ceb3cc98 100644
--- a/components/Wallet/Wallet.tsx
+++ b/components/Wallet/Wallet.tsx
@@ -110,27 +110,19 @@ const Wallet = () => {
};
filterChains().then(async ([chainNames, ids]) => {
if (chainNames.includes('injective')) {
- if (walletType !== WalletType.terraExtension) {
- try {
- await walletWindowConnection.getKey(ChainId.injective)
- } catch {
- console.error('Injective not activated');
- const injIndex = chainNames.indexOf('injective')
- if (injIndex !== -1) {
- chainNames.splice(injIndex, 1)
- ids.splice(injIndex, 1)
- }
- }
- } else {
+ try {
+ await walletWindowConnection.getKey(ChainId.injective)
+ } catch {
+ console.error('Injective not activated');
const injIndex = chainNames.indexOf('injective')
if (injIndex !== -1) {
chainNames.splice(injIndex, 1)
ids.splice(injIndex, 1)
}
}
+ setWalletChains(chainNames)
+ setCurrentConnectedChainIds(ids)
}
- setWalletChains(chainNames)
- setCurrentConnectedChainIds(ids)
});
} else if (walletChains.length === 0) {
setCurrentConnectedChainIds(Object.values(ACTIVE_NETWORKS[currentChainState.network]))
diff --git a/constants/settings.ts b/constants/settings.ts
index a708b658..121a9c05 100644
--- a/constants/settings.ts
+++ b/constants/settings.ts
@@ -12,6 +12,6 @@ export const POOL_INFO_BASE_URL =
export const COSMOS_KIT_WALLET_KEY = 'cosmos-kit@2:core//current-wallet'
-export const API_URLS = ['https://fd60qhijvtes7do71ou6moc14s.ingress.pcgameservers.com']
+export const API_URLS = ['https://fd60qhijvtes7do71ou6moc14s.ingress.pcgameservers.com', 'https://9c0pbpbijhepr6ijm4lk85uiuc.ingress.europlots.com']
export const ADV_MEMO = 'app.whitewhale.money'
diff --git a/hooks/useClients.ts b/hooks/useClients.ts
index 1c6572c7..32ac3b14 100644
--- a/hooks/useClients.ts
+++ b/hooks/useClients.ts
@@ -1,8 +1,15 @@
import { useQueries } from 'react-query'
+import { GeneratedType, Registry } from '@cosmjs/proto-signing';
+import { AminoTypes } from '@cosmjs/stargate';
import { useChain } from '@cosmos-kit/react-lite'
import { InjectiveStargate } from '@injectivelabs/sdk-ts'
-import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx';
+import {
+ cosmosAminoConverters,
+ cosmosProtoRegistry,
+ cosmwasmAminoConverters,
+ cosmwasmProtoRegistry,
+} from 'util/inj-types';
export const useClients = (walletChainName: string) => {
const {
@@ -10,8 +17,7 @@ export const useClients = (walletChainName: string) => {
getSigningCosmWasmClient,
isWalletConnected,
setDefaultSignOptions,
- wallet,
- getOfflineSignerDirect, getOfflineSigner } = useChain(walletChainName)
+ wallet, getOfflineSigner } = useChain(walletChainName)
if (isWalletConnected && wallet?.name !== 'station-extension') {
try {
setDefaultSignOptions({
@@ -36,15 +42,24 @@ export const useClients = (walletChainName: string) => {
queryKey: ['injectiveSigningClient'],
queryFn: async () => {
try {
- let offlineSigner
- if (wallet.name.includes('okx')) {
- offlineSigner = await getOfflineSigner()
- } else {
- offlineSigner = await getOfflineSignerDirect()
- }
- const client = await InjectiveStargate.InjectiveSigningStargateClient.connectWithSigner('https://sentry.tm.injective.network:443',
- offlineSigner)
- client.registry.register('/cosmwasm.wasm.v1.MsgExecuteContract', MsgExecuteContract)
+ const offlineSigner: any = await getOfflineSigner()
+ const protoRegistry: ReadonlyArray<[string, GeneratedType]> = [
+ ...cosmosProtoRegistry,
+ ...cosmwasmProtoRegistry,
+ ];
+ const aminoConverters = {
+ ...cosmosAminoConverters,
+ ...cosmwasmAminoConverters,
+ };
+ const registry = new Registry(protoRegistry);
+ const aminoTypes = new AminoTypes(aminoConverters);
+ const client = await InjectiveStargate.InjectiveSigningStargateClient.connectWithSigner(
+ 'https://sentry.tm.injective.network:443',
+ offlineSigner, {
+ registry,
+ aminoTypes,
+ },
+ )
return client
} catch {
return null
diff --git a/libs/fetchSupply.tsx b/libs/fetchSupply.tsx
index 54adf6ef..cb5b4479 100644
--- a/libs/fetchSupply.tsx
+++ b/libs/fetchSupply.tsx
@@ -7,7 +7,7 @@ export type FetchSupplyResponse = {
const url = '/api/cors?url=https://apex.migaloo.zone/api/supply'
export const fetchSupply = async (): Promise => {
- const response = await fetchWithTimeout(`${await getFastestAPI()}/apex/supply`, 1000) || await fetch(url)
+ const response = await fetchWithTimeout(`${await getFastestAPI()}/apex/supply`, 10000) || await fetch(url)
let data = await response.json()
data = data?.data ? data.data : data
return data
diff --git a/package.json b/package.json
index 415177fb..e6afcf12 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "git rev-parse HEAD | xargs -I '{}' echo '{\"version\": \"{}\"}' > app_version.json && next build",
+ "prep-build": "next build",
"start": "next start",
"lint": "npx eslint . --fix",
"unimported": "npx unimported",
diff --git a/public/mainnet/migaloo-1/pools_list.json b/public/mainnet/migaloo-1/pools_list.json
index 66cd4b64..c4f24b51 100644
--- a/public/mainnet/migaloo-1/pools_list.json
+++ b/public/mainnet/migaloo-1/pools_list.json
@@ -494,7 +494,7 @@
],
"swap_address": "migaloo1ke0krjh5v3emzv5wdut6q7l0gednv7cx7naxqweae44jz8cxxq9srhy6dz",
"lp_token": "factory/migaloo1ke0krjh5v3emzv5wdut6q7l0gednv7cx7naxqweae44jz8cxxq9srhy6dz/uLP",
- "staking_address": "",
+ "staking_address": "migaloo1kwdf63gwzhdwyy7hmmn67p3dex57e5ek4na8g27hvd7kn9cj7nmqgsxyz7",
"rewards_tokens": []
},
{
diff --git a/public/mainnet/osmosis-1/pools_list.json b/public/mainnet/osmosis-1/pools_list.json
index 4fe830b4..17c5f37a 100644
--- a/public/mainnet/osmosis-1/pools_list.json
+++ b/public/mainnet/osmosis-1/pools_list.json
@@ -274,7 +274,7 @@
"OSMO"
],
"displayName": "bOSMO-OSMO",
- "displayLogo1": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/bosmo.png",
+ "displayLogo1": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/bOSMO.png",
"displayLogo2": "/logos/osmo.svg",
"pool_assets": [
{
@@ -283,7 +283,7 @@
"symbol": "bOSMO",
"name": "bOSMO",
"decimals": 6,
- "logoURI": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/bosmo.png",
+ "logoURI": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/bOSMO.png",
"tags": [
"native"
],
diff --git a/services/useAPI.ts b/services/useAPI.ts
index 1707f01d..b01ceb78 100644
--- a/services/useAPI.ts
+++ b/services/useAPI.ts
@@ -74,7 +74,7 @@ export const getRandomRPC = async (chainNameId: string) => {
export const getHealthyRestEndpoints = async (chainNameId: string) => {
try {
- const response = await fetchWithTimeout(`${await getFastestAPI()}/api/rests/${chainNameId}`, 1000);
+ const response = await fetchWithTimeout(`${await getFastestAPI()}/api/rests/${chainNameId}`);
const json = await response.json();
if (json?.data !== 'Chain not found') {
return json?.data
@@ -99,10 +99,10 @@ export const getRandomREST = async (chainNameId: string) => {
export const getPricesAPI = async (ids: Array) => {
try {
- let response = await fetchWithTimeout(`${await getFastestAPI()}/api/prices`, 1000)
+ let response = await fetchWithTimeout(`${await getFastestAPI()}/api/prices`)
let res = await response.text()
while (!response.ok) {
- response = await fetchWithTimeout(`${await getFastestAPI()}/api/prices`, 1000)
+ response = await fetchWithTimeout(`${await getFastestAPI()}/api/prices`)
res = await response.text()
}
const json = JSON.parse(res)
@@ -142,7 +142,7 @@ export const createEndpointOptions = (chains: any) => {
export const getGasPricesAPI = async () => {
try {
- const response = await fetchWithTimeout(`${await getFastestAPI()}/api/gasprices`, 1000)
+ const response = await fetchWithTimeout(`${await getFastestAPI()}/api/gasprices`)
const json = await response.json()
return json?.data || {}
} catch (error) {
@@ -153,7 +153,7 @@ export const getGasPricesAPI = async () => {
export const getPairAprAndDailyVolumeAPI = async (chain_name: string) => {
try {
- const response = await fetchWithTimeout(`${await getFastestAPI()}/api/pools/${chain_name}`, 5000)
+ const response = await fetchWithTimeout(`${await getFastestAPI()}/api/pools/${chain_name}`, 50000)
const json = await response.json()
return json?.data || null
} catch (error) {
@@ -164,7 +164,7 @@ export const getPairAprAndDailyVolumeAPI = async (chain_name: string) => {
export const getBondingAPRsAPI = async () => {
try {
- const response = await fetchWithTimeout(`${await getFastestAPI()}/apex/bonding/aprs`, 10000)
+ const response = await fetchWithTimeout(`${await getFastestAPI()}/apex/bonding/aprs`, 50000)
const json = await response.json()
return json?.data || null
} catch (error) {
diff --git a/util/getDashboardData.ts b/util/getDashboardData.ts
index 82edefe9..35acdc76 100644
--- a/util/getDashboardData.ts
+++ b/util/getDashboardData.ts
@@ -1,7 +1,7 @@
import { ENIGMA_URL } from 'constants/index'
import { fetchWithTimeout, getFastestAPI } from 'services/useAPI';
-interface ChainInfoResponse {
+export interface ChainInfoResponse {
chainName: string;
tvl: number;
volume24h: number
diff --git a/util/inj-types/amino/amino.ts b/util/inj-types/amino/amino.ts
new file mode 100644
index 00000000..693da49f
--- /dev/null
+++ b/util/inj-types/amino/amino.ts
@@ -0,0 +1 @@
+export {}
\ No newline at end of file
diff --git a/util/inj-types/amino/bundle.ts b/util/inj-types/amino/bundle.ts
new file mode 100644
index 00000000..d9ebdd1f
--- /dev/null
+++ b/util/inj-types/amino/bundle.ts
@@ -0,0 +1,4 @@
+import * as _0 from "./amino";
+export const amino = {
+ ..._0
+};
\ No newline at end of file
diff --git a/util/inj-types/binary.ts b/util/inj-types/binary.ts
new file mode 100644
index 00000000..db62c68b
--- /dev/null
+++ b/util/inj-types/binary.ts
@@ -0,0 +1,534 @@
+/**
+* This file and any referenced files were automatically generated by @cosmology/telescope@1.5.0
+* 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/util/inj-types/cosmos/app/runtime/v1alpha1/module.ts b/util/inj-types/cosmos/app/runtime/v1alpha1/module.ts
new file mode 100644
index 00000000..db4ff975
--- /dev/null
+++ b/util/inj-types/cosmos/app/runtime/v1alpha1/module.ts
@@ -0,0 +1,345 @@
+import { BinaryReader, BinaryWriter } from "../../../../binary";
+import { DeepPartial } from "../../../../helpers";
+/** Module is the config object for the runtime module. */
+export interface Module {
+ /** app_name is the name of the app. */
+ appName: string;
+ /**
+ * begin_blockers specifies the module names of begin blockers
+ * to call in the order in which they should be called. If this is left empty
+ * no begin blocker will be registered.
+ */
+ beginBlockers: string[];
+ /**
+ * end_blockers specifies the module names of the end blockers
+ * to call in the order in which they should be called. If this is left empty
+ * no end blocker will be registered.
+ */
+ endBlockers: string[];
+ /**
+ * init_genesis specifies the module names of init genesis functions
+ * to call in the order in which they should be called. If this is left empty
+ * no init genesis function will be registered.
+ */
+ initGenesis: string[];
+ /**
+ * export_genesis specifies the order in which to export module genesis data.
+ * If this is left empty, the init_genesis order will be used for export genesis
+ * if it is specified.
+ */
+ exportGenesis: string[];
+ /**
+ * override_store_keys is an optional list of overrides for the module store keys
+ * to be used in keeper construction.
+ */
+ overrideStoreKeys: StoreKeyConfig[];
+}
+export interface ModuleProtoMsg {
+ typeUrl: "/cosmos.app.runtime.v1alpha1.Module";
+ value: Uint8Array;
+}
+/** Module is the config object for the runtime module. */
+export interface ModuleAmino {
+ /** app_name is the name of the app. */
+ app_name?: string;
+ /**
+ * begin_blockers specifies the module names of begin blockers
+ * to call in the order in which they should be called. If this is left empty
+ * no begin blocker will be registered.
+ */
+ begin_blockers?: string[];
+ /**
+ * end_blockers specifies the module names of the end blockers
+ * to call in the order in which they should be called. If this is left empty
+ * no end blocker will be registered.
+ */
+ end_blockers?: string[];
+ /**
+ * init_genesis specifies the module names of init genesis functions
+ * to call in the order in which they should be called. If this is left empty
+ * no init genesis function will be registered.
+ */
+ init_genesis?: string[];
+ /**
+ * export_genesis specifies the order in which to export module genesis data.
+ * If this is left empty, the init_genesis order will be used for export genesis
+ * if it is specified.
+ */
+ export_genesis?: string[];
+ /**
+ * override_store_keys is an optional list of overrides for the module store keys
+ * to be used in keeper construction.
+ */
+ override_store_keys?: StoreKeyConfigAmino[];
+}
+export interface ModuleAminoMsg {
+ type: "cosmos-sdk/Module";
+ value: ModuleAmino;
+}
+/** Module is the config object for the runtime module. */
+export interface ModuleSDKType {
+ app_name: string;
+ begin_blockers: string[];
+ end_blockers: string[];
+ init_genesis: string[];
+ export_genesis: string[];
+ override_store_keys: StoreKeyConfigSDKType[];
+}
+/**
+ * StoreKeyConfig may be supplied to override the default module store key, which
+ * is the module name.
+ */
+export interface StoreKeyConfig {
+ /** name of the module to override the store key of */
+ moduleName: string;
+ /** the kv store key to use instead of the module name. */
+ kvStoreKey: string;
+}
+export interface StoreKeyConfigProtoMsg {
+ typeUrl: "/cosmos.app.runtime.v1alpha1.StoreKeyConfig";
+ value: Uint8Array;
+}
+/**
+ * StoreKeyConfig may be supplied to override the default module store key, which
+ * is the module name.
+ */
+export interface StoreKeyConfigAmino {
+ /** name of the module to override the store key of */
+ module_name?: string;
+ /** the kv store key to use instead of the module name. */
+ kv_store_key?: string;
+}
+export interface StoreKeyConfigAminoMsg {
+ type: "cosmos-sdk/StoreKeyConfig";
+ value: StoreKeyConfigAmino;
+}
+/**
+ * StoreKeyConfig may be supplied to override the default module store key, which
+ * is the module name.
+ */
+export interface StoreKeyConfigSDKType {
+ module_name: string;
+ kv_store_key: string;
+}
+function createBaseModule(): Module {
+ return {
+ appName: "",
+ beginBlockers: [],
+ endBlockers: [],
+ initGenesis: [],
+ exportGenesis: [],
+ overrideStoreKeys: []
+ };
+}
+export const Module = {
+ typeUrl: "/cosmos.app.runtime.v1alpha1.Module",
+ aminoType: "cosmos-sdk/Module",
+ encode(message: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.appName !== "") {
+ writer.uint32(10).string(message.appName);
+ }
+ for (const v of message.beginBlockers) {
+ writer.uint32(18).string(v!);
+ }
+ for (const v of message.endBlockers) {
+ writer.uint32(26).string(v!);
+ }
+ for (const v of message.initGenesis) {
+ writer.uint32(34).string(v!);
+ }
+ for (const v of message.exportGenesis) {
+ writer.uint32(42).string(v!);
+ }
+ for (const v of message.overrideStoreKeys) {
+ StoreKeyConfig.encode(v!, writer.uint32(50).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Module {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModule();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.appName = reader.string();
+ break;
+ case 2:
+ message.beginBlockers.push(reader.string());
+ break;
+ case 3:
+ message.endBlockers.push(reader.string());
+ break;
+ case 4:
+ message.initGenesis.push(reader.string());
+ break;
+ case 5:
+ message.exportGenesis.push(reader.string());
+ break;
+ case 6:
+ message.overrideStoreKeys.push(StoreKeyConfig.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Module {
+ const message = createBaseModule();
+ message.appName = object.appName ?? "";
+ message.beginBlockers = object.beginBlockers?.map(e => e) || [];
+ message.endBlockers = object.endBlockers?.map(e => e) || [];
+ message.initGenesis = object.initGenesis?.map(e => e) || [];
+ message.exportGenesis = object.exportGenesis?.map(e => e) || [];
+ message.overrideStoreKeys = object.overrideStoreKeys?.map(e => StoreKeyConfig.fromPartial(e)) || [];
+ return message;
+ },
+ fromAmino(object: ModuleAmino): Module {
+ const message = createBaseModule();
+ if (object.app_name !== undefined && object.app_name !== null) {
+ message.appName = object.app_name;
+ }
+ message.beginBlockers = object.begin_blockers?.map(e => e) || [];
+ message.endBlockers = object.end_blockers?.map(e => e) || [];
+ message.initGenesis = object.init_genesis?.map(e => e) || [];
+ message.exportGenesis = object.export_genesis?.map(e => e) || [];
+ message.overrideStoreKeys = object.override_store_keys?.map(e => StoreKeyConfig.fromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: Module): ModuleAmino {
+ const obj: any = {};
+ obj.app_name = message.appName === "" ? undefined : message.appName;
+ if (message.beginBlockers) {
+ obj.begin_blockers = message.beginBlockers.map(e => e);
+ } else {
+ obj.begin_blockers = message.beginBlockers;
+ }
+ if (message.endBlockers) {
+ obj.end_blockers = message.endBlockers.map(e => e);
+ } else {
+ obj.end_blockers = message.endBlockers;
+ }
+ if (message.initGenesis) {
+ obj.init_genesis = message.initGenesis.map(e => e);
+ } else {
+ obj.init_genesis = message.initGenesis;
+ }
+ if (message.exportGenesis) {
+ obj.export_genesis = message.exportGenesis.map(e => e);
+ } else {
+ obj.export_genesis = message.exportGenesis;
+ }
+ if (message.overrideStoreKeys) {
+ obj.override_store_keys = message.overrideStoreKeys.map(e => e ? StoreKeyConfig.toAmino(e) : undefined);
+ } else {
+ obj.override_store_keys = message.overrideStoreKeys;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: ModuleAminoMsg): Module {
+ return Module.fromAmino(object.value);
+ },
+ toAminoMsg(message: Module): ModuleAminoMsg {
+ return {
+ type: "cosmos-sdk/Module",
+ value: Module.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleProtoMsg): Module {
+ return Module.decode(message.value);
+ },
+ toProto(message: Module): Uint8Array {
+ return Module.encode(message).finish();
+ },
+ toProtoMsg(message: Module): ModuleProtoMsg {
+ return {
+ typeUrl: "/cosmos.app.runtime.v1alpha1.Module",
+ value: Module.encode(message).finish()
+ };
+ }
+};
+function createBaseStoreKeyConfig(): StoreKeyConfig {
+ return {
+ moduleName: "",
+ kvStoreKey: ""
+ };
+}
+export const StoreKeyConfig = {
+ typeUrl: "/cosmos.app.runtime.v1alpha1.StoreKeyConfig",
+ aminoType: "cosmos-sdk/StoreKeyConfig",
+ encode(message: StoreKeyConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.moduleName !== "") {
+ writer.uint32(10).string(message.moduleName);
+ }
+ if (message.kvStoreKey !== "") {
+ writer.uint32(18).string(message.kvStoreKey);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): StoreKeyConfig {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseStoreKeyConfig();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.moduleName = reader.string();
+ break;
+ case 2:
+ message.kvStoreKey = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): StoreKeyConfig {
+ const message = createBaseStoreKeyConfig();
+ message.moduleName = object.moduleName ?? "";
+ message.kvStoreKey = object.kvStoreKey ?? "";
+ return message;
+ },
+ fromAmino(object: StoreKeyConfigAmino): StoreKeyConfig {
+ const message = createBaseStoreKeyConfig();
+ if (object.module_name !== undefined && object.module_name !== null) {
+ message.moduleName = object.module_name;
+ }
+ if (object.kv_store_key !== undefined && object.kv_store_key !== null) {
+ message.kvStoreKey = object.kv_store_key;
+ }
+ return message;
+ },
+ toAmino(message: StoreKeyConfig): StoreKeyConfigAmino {
+ const obj: any = {};
+ obj.module_name = message.moduleName === "" ? undefined : message.moduleName;
+ obj.kv_store_key = message.kvStoreKey === "" ? undefined : message.kvStoreKey;
+ return obj;
+ },
+ fromAminoMsg(object: StoreKeyConfigAminoMsg): StoreKeyConfig {
+ return StoreKeyConfig.fromAmino(object.value);
+ },
+ toAminoMsg(message: StoreKeyConfig): StoreKeyConfigAminoMsg {
+ return {
+ type: "cosmos-sdk/StoreKeyConfig",
+ value: StoreKeyConfig.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: StoreKeyConfigProtoMsg): StoreKeyConfig {
+ return StoreKeyConfig.decode(message.value);
+ },
+ toProto(message: StoreKeyConfig): Uint8Array {
+ return StoreKeyConfig.encode(message).finish();
+ },
+ toProtoMsg(message: StoreKeyConfig): StoreKeyConfigProtoMsg {
+ return {
+ typeUrl: "/cosmos.app.runtime.v1alpha1.StoreKeyConfig",
+ value: StoreKeyConfig.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/app/v1alpha1/module.ts b/util/inj-types/cosmos/app/v1alpha1/module.ts
new file mode 100644
index 00000000..fd942e54
--- /dev/null
+++ b/util/inj-types/cosmos/app/v1alpha1/module.ts
@@ -0,0 +1,454 @@
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/** ModuleDescriptor describes an app module. */
+export interface ModuleDescriptor {
+ /**
+ * go_import names the package that should be imported by an app to load the
+ * module in the runtime module registry. It is required to make debugging
+ * of configuration errors easier for users.
+ */
+ goImport: string;
+ /**
+ * use_package refers to a protobuf package that this module
+ * uses and exposes to the world. In an app, only one module should "use"
+ * or own a single protobuf package. It is assumed that the module uses
+ * all of the .proto files in a single package.
+ */
+ usePackage: PackageReference[];
+ /**
+ * can_migrate_from defines which module versions this module can migrate
+ * state from. The framework will check that one module version is able to
+ * migrate from a previous module version before attempting to update its
+ * config. It is assumed that modules can transitively migrate from earlier
+ * versions. For instance if v3 declares it can migrate from v2, and v2
+ * declares it can migrate from v1, the framework knows how to migrate
+ * from v1 to v3, assuming all 3 module versions are registered at runtime.
+ */
+ canMigrateFrom: MigrateFromInfo[];
+}
+export interface ModuleDescriptorProtoMsg {
+ typeUrl: "/cosmos.app.v1alpha1.ModuleDescriptor";
+ value: Uint8Array;
+}
+/** ModuleDescriptor describes an app module. */
+export interface ModuleDescriptorAmino {
+ /**
+ * go_import names the package that should be imported by an app to load the
+ * module in the runtime module registry. It is required to make debugging
+ * of configuration errors easier for users.
+ */
+ go_import?: string;
+ /**
+ * use_package refers to a protobuf package that this module
+ * uses and exposes to the world. In an app, only one module should "use"
+ * or own a single protobuf package. It is assumed that the module uses
+ * all of the .proto files in a single package.
+ */
+ use_package?: PackageReferenceAmino[];
+ /**
+ * can_migrate_from defines which module versions this module can migrate
+ * state from. The framework will check that one module version is able to
+ * migrate from a previous module version before attempting to update its
+ * config. It is assumed that modules can transitively migrate from earlier
+ * versions. For instance if v3 declares it can migrate from v2, and v2
+ * declares it can migrate from v1, the framework knows how to migrate
+ * from v1 to v3, assuming all 3 module versions are registered at runtime.
+ */
+ can_migrate_from?: MigrateFromInfoAmino[];
+}
+export interface ModuleDescriptorAminoMsg {
+ type: "cosmos-sdk/ModuleDescriptor";
+ value: ModuleDescriptorAmino;
+}
+/** ModuleDescriptor describes an app module. */
+export interface ModuleDescriptorSDKType {
+ go_import: string;
+ use_package: PackageReferenceSDKType[];
+ can_migrate_from: MigrateFromInfoSDKType[];
+}
+/** PackageReference is a reference to a protobuf package used by a module. */
+export interface PackageReference {
+ /** name is the fully-qualified name of the package. */
+ name: string;
+ /**
+ * revision is the optional revision of the package that is being used.
+ * Protobuf packages used in Cosmos should generally have a major version
+ * as the last part of the package name, ex. foo.bar.baz.v1.
+ * The revision of a package can be thought of as the minor version of a
+ * package which has additional backwards compatible definitions that weren't
+ * present in a previous version.
+ *
+ * A package should indicate its revision with a source code comment
+ * above the package declaration in one of its files containing the
+ * text "Revision N" where N is an integer revision. All packages start
+ * at revision 0 the first time they are released in a module.
+ *
+ * When a new version of a module is released and items are added to existing
+ * .proto files, these definitions should contain comments of the form
+ * "Since Revision N" where N is an integer revision.
+ *
+ * When the module runtime starts up, it will check the pinned proto
+ * image and panic if there are runtime protobuf definitions that are not
+ * in the pinned descriptor which do not have
+ * a "Since Revision N" comment or have a "Since Revision N" comment where
+ * N is <= to the revision specified here. This indicates that the protobuf
+ * files have been updated, but the pinned file descriptor hasn't.
+ *
+ * If there are items in the pinned file descriptor with a revision
+ * greater than the value indicated here, this will also cause a panic
+ * as it may mean that the pinned descriptor for a legacy module has been
+ * improperly updated or that there is some other versioning discrepancy.
+ * Runtime protobuf definitions will also be checked for compatibility
+ * with pinned file descriptors to make sure there are no incompatible changes.
+ *
+ * This behavior ensures that:
+ * * pinned proto images are up-to-date
+ * * protobuf files are carefully annotated with revision comments which
+ * are important good client UX
+ * * protobuf files are changed in backwards and forwards compatible ways
+ */
+ revision: number;
+}
+export interface PackageReferenceProtoMsg {
+ typeUrl: "/cosmos.app.v1alpha1.PackageReference";
+ value: Uint8Array;
+}
+/** PackageReference is a reference to a protobuf package used by a module. */
+export interface PackageReferenceAmino {
+ /** name is the fully-qualified name of the package. */
+ name?: string;
+ /**
+ * revision is the optional revision of the package that is being used.
+ * Protobuf packages used in Cosmos should generally have a major version
+ * as the last part of the package name, ex. foo.bar.baz.v1.
+ * The revision of a package can be thought of as the minor version of a
+ * package which has additional backwards compatible definitions that weren't
+ * present in a previous version.
+ *
+ * A package should indicate its revision with a source code comment
+ * above the package declaration in one of its files containing the
+ * text "Revision N" where N is an integer revision. All packages start
+ * at revision 0 the first time they are released in a module.
+ *
+ * When a new version of a module is released and items are added to existing
+ * .proto files, these definitions should contain comments of the form
+ * "Since Revision N" where N is an integer revision.
+ *
+ * When the module runtime starts up, it will check the pinned proto
+ * image and panic if there are runtime protobuf definitions that are not
+ * in the pinned descriptor which do not have
+ * a "Since Revision N" comment or have a "Since Revision N" comment where
+ * N is <= to the revision specified here. This indicates that the protobuf
+ * files have been updated, but the pinned file descriptor hasn't.
+ *
+ * If there are items in the pinned file descriptor with a revision
+ * greater than the value indicated here, this will also cause a panic
+ * as it may mean that the pinned descriptor for a legacy module has been
+ * improperly updated or that there is some other versioning discrepancy.
+ * Runtime protobuf definitions will also be checked for compatibility
+ * with pinned file descriptors to make sure there are no incompatible changes.
+ *
+ * This behavior ensures that:
+ * * pinned proto images are up-to-date
+ * * protobuf files are carefully annotated with revision comments which
+ * are important good client UX
+ * * protobuf files are changed in backwards and forwards compatible ways
+ */
+ revision?: number;
+}
+export interface PackageReferenceAminoMsg {
+ type: "cosmos-sdk/PackageReference";
+ value: PackageReferenceAmino;
+}
+/** PackageReference is a reference to a protobuf package used by a module. */
+export interface PackageReferenceSDKType {
+ name: string;
+ revision: number;
+}
+/**
+ * MigrateFromInfo is information on a module version that a newer module
+ * can migrate from.
+ */
+export interface MigrateFromInfo {
+ /**
+ * module is the fully-qualified protobuf name of the module config object
+ * for the previous module version, ex: "cosmos.group.module.v1.Module".
+ */
+ module: string;
+}
+export interface MigrateFromInfoProtoMsg {
+ typeUrl: "/cosmos.app.v1alpha1.MigrateFromInfo";
+ value: Uint8Array;
+}
+/**
+ * MigrateFromInfo is information on a module version that a newer module
+ * can migrate from.
+ */
+export interface MigrateFromInfoAmino {
+ /**
+ * module is the fully-qualified protobuf name of the module config object
+ * for the previous module version, ex: "cosmos.group.module.v1.Module".
+ */
+ module?: string;
+}
+export interface MigrateFromInfoAminoMsg {
+ type: "cosmos-sdk/MigrateFromInfo";
+ value: MigrateFromInfoAmino;
+}
+/**
+ * MigrateFromInfo is information on a module version that a newer module
+ * can migrate from.
+ */
+export interface MigrateFromInfoSDKType {
+ module: string;
+}
+function createBaseModuleDescriptor(): ModuleDescriptor {
+ return {
+ goImport: "",
+ usePackage: [],
+ canMigrateFrom: []
+ };
+}
+export const ModuleDescriptor = {
+ typeUrl: "/cosmos.app.v1alpha1.ModuleDescriptor",
+ aminoType: "cosmos-sdk/ModuleDescriptor",
+ encode(message: ModuleDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.goImport !== "") {
+ writer.uint32(10).string(message.goImport);
+ }
+ for (const v of message.usePackage) {
+ PackageReference.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ for (const v of message.canMigrateFrom) {
+ MigrateFromInfo.encode(v!, writer.uint32(26).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): ModuleDescriptor {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModuleDescriptor();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.goImport = reader.string();
+ break;
+ case 2:
+ message.usePackage.push(PackageReference.decode(reader, reader.uint32()));
+ break;
+ case 3:
+ message.canMigrateFrom.push(MigrateFromInfo.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): ModuleDescriptor {
+ const message = createBaseModuleDescriptor();
+ message.goImport = object.goImport ?? "";
+ message.usePackage = object.usePackage?.map(e => PackageReference.fromPartial(e)) || [];
+ message.canMigrateFrom = object.canMigrateFrom?.map(e => MigrateFromInfo.fromPartial(e)) || [];
+ return message;
+ },
+ fromAmino(object: ModuleDescriptorAmino): ModuleDescriptor {
+ const message = createBaseModuleDescriptor();
+ if (object.go_import !== undefined && object.go_import !== null) {
+ message.goImport = object.go_import;
+ }
+ message.usePackage = object.use_package?.map(e => PackageReference.fromAmino(e)) || [];
+ message.canMigrateFrom = object.can_migrate_from?.map(e => MigrateFromInfo.fromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: ModuleDescriptor): ModuleDescriptorAmino {
+ const obj: any = {};
+ obj.go_import = message.goImport === "" ? undefined : message.goImport;
+ if (message.usePackage) {
+ obj.use_package = message.usePackage.map(e => e ? PackageReference.toAmino(e) : undefined);
+ } else {
+ obj.use_package = message.usePackage;
+ }
+ if (message.canMigrateFrom) {
+ obj.can_migrate_from = message.canMigrateFrom.map(e => e ? MigrateFromInfo.toAmino(e) : undefined);
+ } else {
+ obj.can_migrate_from = message.canMigrateFrom;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: ModuleDescriptorAminoMsg): ModuleDescriptor {
+ return ModuleDescriptor.fromAmino(object.value);
+ },
+ toAminoMsg(message: ModuleDescriptor): ModuleDescriptorAminoMsg {
+ return {
+ type: "cosmos-sdk/ModuleDescriptor",
+ value: ModuleDescriptor.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleDescriptorProtoMsg): ModuleDescriptor {
+ return ModuleDescriptor.decode(message.value);
+ },
+ toProto(message: ModuleDescriptor): Uint8Array {
+ return ModuleDescriptor.encode(message).finish();
+ },
+ toProtoMsg(message: ModuleDescriptor): ModuleDescriptorProtoMsg {
+ return {
+ typeUrl: "/cosmos.app.v1alpha1.ModuleDescriptor",
+ value: ModuleDescriptor.encode(message).finish()
+ };
+ }
+};
+function createBasePackageReference(): PackageReference {
+ return {
+ name: "",
+ revision: 0
+ };
+}
+export const PackageReference = {
+ typeUrl: "/cosmos.app.v1alpha1.PackageReference",
+ aminoType: "cosmos-sdk/PackageReference",
+ encode(message: PackageReference, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.revision !== 0) {
+ writer.uint32(16).uint32(message.revision);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): PackageReference {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBasePackageReference();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.revision = reader.uint32();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): PackageReference {
+ const message = createBasePackageReference();
+ message.name = object.name ?? "";
+ message.revision = object.revision ?? 0;
+ return message;
+ },
+ fromAmino(object: PackageReferenceAmino): PackageReference {
+ const message = createBasePackageReference();
+ if (object.name !== undefined && object.name !== null) {
+ message.name = object.name;
+ }
+ if (object.revision !== undefined && object.revision !== null) {
+ message.revision = object.revision;
+ }
+ return message;
+ },
+ toAmino(message: PackageReference): PackageReferenceAmino {
+ const obj: any = {};
+ obj.name = message.name === "" ? undefined : message.name;
+ obj.revision = message.revision === 0 ? undefined : message.revision;
+ return obj;
+ },
+ fromAminoMsg(object: PackageReferenceAminoMsg): PackageReference {
+ return PackageReference.fromAmino(object.value);
+ },
+ toAminoMsg(message: PackageReference): PackageReferenceAminoMsg {
+ return {
+ type: "cosmos-sdk/PackageReference",
+ value: PackageReference.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: PackageReferenceProtoMsg): PackageReference {
+ return PackageReference.decode(message.value);
+ },
+ toProto(message: PackageReference): Uint8Array {
+ return PackageReference.encode(message).finish();
+ },
+ toProtoMsg(message: PackageReference): PackageReferenceProtoMsg {
+ return {
+ typeUrl: "/cosmos.app.v1alpha1.PackageReference",
+ value: PackageReference.encode(message).finish()
+ };
+ }
+};
+function createBaseMigrateFromInfo(): MigrateFromInfo {
+ return {
+ module: ""
+ };
+}
+export const MigrateFromInfo = {
+ typeUrl: "/cosmos.app.v1alpha1.MigrateFromInfo",
+ aminoType: "cosmos-sdk/MigrateFromInfo",
+ encode(message: MigrateFromInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.module !== "") {
+ writer.uint32(10).string(message.module);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MigrateFromInfo {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMigrateFromInfo();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.module = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MigrateFromInfo {
+ const message = createBaseMigrateFromInfo();
+ message.module = object.module ?? "";
+ return message;
+ },
+ fromAmino(object: MigrateFromInfoAmino): MigrateFromInfo {
+ const message = createBaseMigrateFromInfo();
+ if (object.module !== undefined && object.module !== null) {
+ message.module = object.module;
+ }
+ return message;
+ },
+ toAmino(message: MigrateFromInfo): MigrateFromInfoAmino {
+ const obj: any = {};
+ obj.module = message.module === "" ? undefined : message.module;
+ return obj;
+ },
+ fromAminoMsg(object: MigrateFromInfoAminoMsg): MigrateFromInfo {
+ return MigrateFromInfo.fromAmino(object.value);
+ },
+ toAminoMsg(message: MigrateFromInfo): MigrateFromInfoAminoMsg {
+ return {
+ type: "cosmos-sdk/MigrateFromInfo",
+ value: MigrateFromInfo.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MigrateFromInfoProtoMsg): MigrateFromInfo {
+ return MigrateFromInfo.decode(message.value);
+ },
+ toProto(message: MigrateFromInfo): Uint8Array {
+ return MigrateFromInfo.encode(message).finish();
+ },
+ toProtoMsg(message: MigrateFromInfo): MigrateFromInfoProtoMsg {
+ return {
+ typeUrl: "/cosmos.app.v1alpha1.MigrateFromInfo",
+ value: MigrateFromInfo.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/module/v1/module.ts b/util/inj-types/cosmos/auth/module/v1/module.ts
new file mode 100644
index 00000000..ebcede09
--- /dev/null
+++ b/util/inj-types/cosmos/auth/module/v1/module.ts
@@ -0,0 +1,247 @@
+import { BinaryReader, BinaryWriter } from "../../../../binary";
+import { DeepPartial } from "../../../../helpers";
+/** Module is the config object for the auth module. */
+export interface Module {
+ /** bech32_prefix is the bech32 account prefix for the app. */
+ bech32Prefix: string;
+ /** module_account_permissions are module account permissions. */
+ moduleAccountPermissions: ModuleAccountPermission[];
+ /** authority defines the custom module authority. If not set, defaults to the governance module. */
+ authority: string;
+}
+export interface ModuleProtoMsg {
+ typeUrl: "/cosmos.auth.module.v1.Module";
+ value: Uint8Array;
+}
+/** Module is the config object for the auth module. */
+export interface ModuleAmino {
+ /** bech32_prefix is the bech32 account prefix for the app. */
+ bech32_prefix?: string;
+ /** module_account_permissions are module account permissions. */
+ module_account_permissions?: ModuleAccountPermissionAmino[];
+ /** authority defines the custom module authority. If not set, defaults to the governance module. */
+ authority?: string;
+}
+export interface ModuleAminoMsg {
+ type: "cosmos-sdk/Module";
+ value: ModuleAmino;
+}
+/** Module is the config object for the auth module. */
+export interface ModuleSDKType {
+ bech32_prefix: string;
+ module_account_permissions: ModuleAccountPermissionSDKType[];
+ authority: string;
+}
+/** ModuleAccountPermission represents permissions for a module account. */
+export interface ModuleAccountPermission {
+ /** account is the name of the module. */
+ account: string;
+ /**
+ * permissions are the permissions this module has. Currently recognized
+ * values are minter, burner and staking.
+ */
+ permissions: string[];
+}
+export interface ModuleAccountPermissionProtoMsg {
+ typeUrl: "/cosmos.auth.module.v1.ModuleAccountPermission";
+ value: Uint8Array;
+}
+/** ModuleAccountPermission represents permissions for a module account. */
+export interface ModuleAccountPermissionAmino {
+ /** account is the name of the module. */
+ account?: string;
+ /**
+ * permissions are the permissions this module has. Currently recognized
+ * values are minter, burner and staking.
+ */
+ permissions?: string[];
+}
+export interface ModuleAccountPermissionAminoMsg {
+ type: "cosmos-sdk/ModuleAccountPermission";
+ value: ModuleAccountPermissionAmino;
+}
+/** ModuleAccountPermission represents permissions for a module account. */
+export interface ModuleAccountPermissionSDKType {
+ account: string;
+ permissions: string[];
+}
+function createBaseModule(): Module {
+ return {
+ bech32Prefix: "",
+ moduleAccountPermissions: [],
+ authority: ""
+ };
+}
+export const Module = {
+ typeUrl: "/cosmos.auth.module.v1.Module",
+ aminoType: "cosmos-sdk/Module",
+ encode(message: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.bech32Prefix !== "") {
+ writer.uint32(10).string(message.bech32Prefix);
+ }
+ for (const v of message.moduleAccountPermissions) {
+ ModuleAccountPermission.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ if (message.authority !== "") {
+ writer.uint32(26).string(message.authority);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Module {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModule();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.bech32Prefix = reader.string();
+ break;
+ case 2:
+ message.moduleAccountPermissions.push(ModuleAccountPermission.decode(reader, reader.uint32()));
+ break;
+ case 3:
+ message.authority = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Module {
+ const message = createBaseModule();
+ message.bech32Prefix = object.bech32Prefix ?? "";
+ message.moduleAccountPermissions = object.moduleAccountPermissions?.map(e => ModuleAccountPermission.fromPartial(e)) || [];
+ message.authority = object.authority ?? "";
+ return message;
+ },
+ fromAmino(object: ModuleAmino): Module {
+ const message = createBaseModule();
+ if (object.bech32_prefix !== undefined && object.bech32_prefix !== null) {
+ message.bech32Prefix = object.bech32_prefix;
+ }
+ message.moduleAccountPermissions = object.module_account_permissions?.map(e => ModuleAccountPermission.fromAmino(e)) || [];
+ if (object.authority !== undefined && object.authority !== null) {
+ message.authority = object.authority;
+ }
+ return message;
+ },
+ toAmino(message: Module): ModuleAmino {
+ const obj: any = {};
+ obj.bech32_prefix = message.bech32Prefix === "" ? undefined : message.bech32Prefix;
+ if (message.moduleAccountPermissions) {
+ obj.module_account_permissions = message.moduleAccountPermissions.map(e => e ? ModuleAccountPermission.toAmino(e) : undefined);
+ } else {
+ obj.module_account_permissions = message.moduleAccountPermissions;
+ }
+ obj.authority = message.authority === "" ? undefined : message.authority;
+ return obj;
+ },
+ fromAminoMsg(object: ModuleAminoMsg): Module {
+ return Module.fromAmino(object.value);
+ },
+ toAminoMsg(message: Module): ModuleAminoMsg {
+ return {
+ type: "cosmos-sdk/Module",
+ value: Module.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleProtoMsg): Module {
+ return Module.decode(message.value);
+ },
+ toProto(message: Module): Uint8Array {
+ return Module.encode(message).finish();
+ },
+ toProtoMsg(message: Module): ModuleProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.module.v1.Module",
+ value: Module.encode(message).finish()
+ };
+ }
+};
+function createBaseModuleAccountPermission(): ModuleAccountPermission {
+ return {
+ account: "",
+ permissions: []
+ };
+}
+export const ModuleAccountPermission = {
+ typeUrl: "/cosmos.auth.module.v1.ModuleAccountPermission",
+ aminoType: "cosmos-sdk/ModuleAccountPermission",
+ encode(message: ModuleAccountPermission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.account !== "") {
+ writer.uint32(10).string(message.account);
+ }
+ for (const v of message.permissions) {
+ writer.uint32(18).string(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): ModuleAccountPermission {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModuleAccountPermission();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.account = reader.string();
+ break;
+ case 2:
+ message.permissions.push(reader.string());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): ModuleAccountPermission {
+ const message = createBaseModuleAccountPermission();
+ message.account = object.account ?? "";
+ message.permissions = object.permissions?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: ModuleAccountPermissionAmino): ModuleAccountPermission {
+ const message = createBaseModuleAccountPermission();
+ if (object.account !== undefined && object.account !== null) {
+ message.account = object.account;
+ }
+ message.permissions = object.permissions?.map(e => e) || [];
+ return message;
+ },
+ toAmino(message: ModuleAccountPermission): ModuleAccountPermissionAmino {
+ const obj: any = {};
+ obj.account = message.account === "" ? undefined : message.account;
+ if (message.permissions) {
+ obj.permissions = message.permissions.map(e => e);
+ } else {
+ obj.permissions = message.permissions;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: ModuleAccountPermissionAminoMsg): ModuleAccountPermission {
+ return ModuleAccountPermission.fromAmino(object.value);
+ },
+ toAminoMsg(message: ModuleAccountPermission): ModuleAccountPermissionAminoMsg {
+ return {
+ type: "cosmos-sdk/ModuleAccountPermission",
+ value: ModuleAccountPermission.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleAccountPermissionProtoMsg): ModuleAccountPermission {
+ return ModuleAccountPermission.decode(message.value);
+ },
+ toProto(message: ModuleAccountPermission): Uint8Array {
+ return ModuleAccountPermission.encode(message).finish();
+ },
+ toProtoMsg(message: ModuleAccountPermission): ModuleAccountPermissionProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.module.v1.ModuleAccountPermission",
+ value: ModuleAccountPermission.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/auth.ts b/util/inj-types/cosmos/auth/v1beta1/auth.ts
new file mode 100644
index 00000000..4dd1e700
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/auth.ts
@@ -0,0 +1,557 @@
+import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, bytesFromBase64, base64FromBytes } 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 {
+ $typeUrl?: "/cosmos.auth.v1beta1.BaseAccount";
+ address: string;
+ pubKey?: Any;
+ accountNumber: bigint;
+ sequence: bigint;
+}
+export interface BaseAccountProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount";
+ value: Uint8Array;
+}
+/**
+ * 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 BaseAccountAmino {
+ address?: string;
+ pub_key?: AnyAmino;
+ account_number?: string;
+ sequence?: string;
+}
+export interface BaseAccountAminoMsg {
+ type: "cosmos-sdk/BaseAccount";
+ value: BaseAccountAmino;
+}
+/**
+ * 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 BaseAccountSDKType {
+ $typeUrl?: "/cosmos.auth.v1beta1.BaseAccount";
+ address: string;
+ pub_key?: AnySDKType;
+ account_number: bigint;
+ sequence: bigint;
+}
+/** ModuleAccount defines an account for modules that holds coins on a pool. */
+export interface ModuleAccount {
+ $typeUrl?: "/cosmos.auth.v1beta1.ModuleAccount";
+ baseAccount?: BaseAccount;
+ name: string;
+ permissions: string[];
+}
+export interface ModuleAccountProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleAccount";
+ value: Uint8Array;
+}
+/** ModuleAccount defines an account for modules that holds coins on a pool. */
+export interface ModuleAccountAmino {
+ base_account?: BaseAccountAmino;
+ name?: string;
+ permissions?: string[];
+}
+export interface ModuleAccountAminoMsg {
+ type: "cosmos-sdk/ModuleAccount";
+ value: ModuleAccountAmino;
+}
+/** ModuleAccount defines an account for modules that holds coins on a pool. */
+export interface ModuleAccountSDKType {
+ $typeUrl?: "/cosmos.auth.v1beta1.ModuleAccount";
+ base_account?: BaseAccountSDKType;
+ 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[];
+}
+export interface ModuleCredentialProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleCredential";
+ value: Uint8Array;
+}
+/**
+ * ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface ModuleCredentialAmino {
+ /** module_name is the name of the module used for address derivation (passed into address.Module). */
+ module_name?: 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)
+ */
+ derivation_keys?: string[];
+}
+export interface ModuleCredentialAminoMsg {
+ type: "cosmos-sdk/ModuleCredential";
+ value: ModuleCredentialAmino;
+}
+/**
+ * ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface ModuleCredentialSDKType {
+ module_name: string;
+ derivation_keys: Uint8Array[];
+}
+/** Params defines the parameters for the auth module. */
+export interface Params {
+ maxMemoCharacters: bigint;
+ txSigLimit: bigint;
+ txSizeCostPerByte: bigint;
+ sigVerifyCostEd25519: bigint;
+ sigVerifyCostSecp256k1: bigint;
+}
+export interface ParamsProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.Params";
+ value: Uint8Array;
+}
+/** Params defines the parameters for the auth module. */
+export interface ParamsAmino {
+ max_memo_characters?: string;
+ tx_sig_limit?: string;
+ tx_size_cost_per_byte?: string;
+ sig_verify_cost_ed25519?: string;
+ sig_verify_cost_secp256k1?: string;
+}
+export interface ParamsAminoMsg {
+ type: "cosmos-sdk/x/auth/Params";
+ value: ParamsAmino;
+}
+/** Params defines the parameters for the auth module. */
+export interface ParamsSDKType {
+ max_memo_characters: bigint;
+ tx_sig_limit: bigint;
+ tx_size_cost_per_byte: bigint;
+ sig_verify_cost_ed25519: bigint;
+ sig_verify_cost_secp256k1: bigint;
+}
+function createBaseBaseAccount(): BaseAccount {
+ return {
+ $typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
+ 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;
+ },
+ fromAmino(object: BaseAccountAmino): BaseAccount {
+ const message = createBaseBaseAccount();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ if (object.pub_key !== undefined && object.pub_key !== null) {
+ message.pubKey = Any.fromAmino(object.pub_key);
+ }
+ 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);
+ }
+ return message;
+ },
+ toAmino(message: BaseAccount): BaseAccountAmino {
+ const obj: any = {};
+ 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;
+ return obj;
+ },
+ fromAminoMsg(object: BaseAccountAminoMsg): BaseAccount {
+ return BaseAccount.fromAmino(object.value);
+ },
+ toAminoMsg(message: BaseAccount): BaseAccountAminoMsg {
+ return {
+ type: "cosmos-sdk/BaseAccount",
+ value: BaseAccount.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: BaseAccountProtoMsg): BaseAccount {
+ return BaseAccount.decode(message.value);
+ },
+ toProto(message: BaseAccount): Uint8Array {
+ return BaseAccount.encode(message).finish();
+ },
+ toProtoMsg(message: BaseAccount): BaseAccountProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
+ value: BaseAccount.encode(message).finish()
+ };
+ }
+};
+function createBaseModuleAccount(): ModuleAccount {
+ return {
+ $typeUrl: "/cosmos.auth.v1beta1.ModuleAccount",
+ 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;
+ },
+ fromAmino(object: ModuleAccountAmino): ModuleAccount {
+ const message = createBaseModuleAccount();
+ if (object.base_account !== undefined && object.base_account !== null) {
+ message.baseAccount = BaseAccount.fromAmino(object.base_account);
+ }
+ if (object.name !== undefined && object.name !== null) {
+ message.name = object.name;
+ }
+ message.permissions = object.permissions?.map(e => e) || [];
+ return message;
+ },
+ toAmino(message: ModuleAccount): ModuleAccountAmino {
+ const obj: any = {};
+ obj.base_account = message.baseAccount ? BaseAccount.toAmino(message.baseAccount) : undefined;
+ obj.name = message.name === "" ? undefined : message.name;
+ if (message.permissions) {
+ obj.permissions = message.permissions.map(e => e);
+ } else {
+ obj.permissions = message.permissions;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: ModuleAccountAminoMsg): ModuleAccount {
+ return ModuleAccount.fromAmino(object.value);
+ },
+ toAminoMsg(message: ModuleAccount): ModuleAccountAminoMsg {
+ return {
+ type: "cosmos-sdk/ModuleAccount",
+ value: ModuleAccount.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleAccountProtoMsg): ModuleAccount {
+ return ModuleAccount.decode(message.value);
+ },
+ toProto(message: ModuleAccount): Uint8Array {
+ return ModuleAccount.encode(message).finish();
+ },
+ toProtoMsg(message: ModuleAccount): ModuleAccountProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleAccount",
+ value: ModuleAccount.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: ModuleCredentialAmino): ModuleCredential {
+ const message = createBaseModuleCredential();
+ if (object.module_name !== undefined && object.module_name !== null) {
+ message.moduleName = object.module_name;
+ }
+ message.derivationKeys = object.derivation_keys?.map(e => bytesFromBase64(e)) || [];
+ return message;
+ },
+ toAmino(message: ModuleCredential): ModuleCredentialAmino {
+ const obj: any = {};
+ obj.module_name = message.moduleName === "" ? undefined : message.moduleName;
+ if (message.derivationKeys) {
+ obj.derivation_keys = message.derivationKeys.map(e => base64FromBytes(e));
+ } else {
+ obj.derivation_keys = message.derivationKeys;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: ModuleCredentialAminoMsg): ModuleCredential {
+ return ModuleCredential.fromAmino(object.value);
+ },
+ toAminoMsg(message: ModuleCredential): ModuleCredentialAminoMsg {
+ return {
+ type: "cosmos-sdk/ModuleCredential",
+ value: ModuleCredential.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleCredentialProtoMsg): ModuleCredential {
+ return ModuleCredential.decode(message.value);
+ },
+ toProto(message: ModuleCredential): Uint8Array {
+ return ModuleCredential.encode(message).finish();
+ },
+ toProtoMsg(message: ModuleCredential): ModuleCredentialProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleCredential",
+ value: ModuleCredential.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: ParamsAmino): Params {
+ const message = createBaseParams();
+ if (object.max_memo_characters !== undefined && object.max_memo_characters !== null) {
+ message.maxMemoCharacters = BigInt(object.max_memo_characters);
+ }
+ if (object.tx_sig_limit !== undefined && object.tx_sig_limit !== null) {
+ message.txSigLimit = BigInt(object.tx_sig_limit);
+ }
+ if (object.tx_size_cost_per_byte !== undefined && object.tx_size_cost_per_byte !== null) {
+ message.txSizeCostPerByte = BigInt(object.tx_size_cost_per_byte);
+ }
+ if (object.sig_verify_cost_ed25519 !== undefined && object.sig_verify_cost_ed25519 !== null) {
+ message.sigVerifyCostEd25519 = BigInt(object.sig_verify_cost_ed25519);
+ }
+ if (object.sig_verify_cost_secp256k1 !== undefined && object.sig_verify_cost_secp256k1 !== null) {
+ message.sigVerifyCostSecp256k1 = BigInt(object.sig_verify_cost_secp256k1);
+ }
+ return message;
+ },
+ toAmino(message: Params): ParamsAmino {
+ const obj: any = {};
+ obj.max_memo_characters = message.maxMemoCharacters !== BigInt(0) ? message.maxMemoCharacters.toString() : undefined;
+ obj.tx_sig_limit = message.txSigLimit !== BigInt(0) ? message.txSigLimit.toString() : undefined;
+ obj.tx_size_cost_per_byte = message.txSizeCostPerByte !== BigInt(0) ? message.txSizeCostPerByte.toString() : undefined;
+ obj.sig_verify_cost_ed25519 = message.sigVerifyCostEd25519 !== BigInt(0) ? message.sigVerifyCostEd25519.toString() : undefined;
+ obj.sig_verify_cost_secp256k1 = message.sigVerifyCostSecp256k1 !== BigInt(0) ? message.sigVerifyCostSecp256k1.toString() : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: ParamsAminoMsg): Params {
+ return Params.fromAmino(object.value);
+ },
+ toAminoMsg(message: Params): ParamsAminoMsg {
+ return {
+ type: "cosmos-sdk/x/auth/Params",
+ value: Params.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ParamsProtoMsg): Params {
+ return Params.decode(message.value);
+ },
+ toProto(message: Params): Uint8Array {
+ return Params.encode(message).finish();
+ },
+ toProtoMsg(message: Params): ParamsProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.Params",
+ value: Params.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/genesis.ts b/util/inj-types/cosmos/auth/v1beta1/genesis.ts
new file mode 100644
index 00000000..e534fa5f
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/genesis.ts
@@ -0,0 +1,115 @@
+import { Params, ParamsAmino, ParamsSDKType } from "./auth";
+import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/** GenesisState defines the auth module's genesis state. */
+export interface GenesisState {
+ /** params defines all the parameters of the module. */
+ params: Params;
+ /** accounts are the accounts present at genesis. */
+ accounts: Any[];
+}
+export interface GenesisStateProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.GenesisState";
+ value: Uint8Array;
+}
+/** GenesisState defines the auth module's genesis state. */
+export interface GenesisStateAmino {
+ /** params defines all the parameters of the module. */
+ params: ParamsAmino;
+ /** accounts are the accounts present at genesis. */
+ accounts?: AnyAmino[];
+}
+export interface GenesisStateAminoMsg {
+ type: "cosmos-sdk/GenesisState";
+ value: GenesisStateAmino;
+}
+/** GenesisState defines the auth module's genesis state. */
+export interface GenesisStateSDKType {
+ params: ParamsSDKType;
+ accounts: AnySDKType[];
+}
+function createBaseGenesisState(): GenesisState {
+ return {
+ params: Params.fromPartial({}),
+ accounts: []
+ };
+}
+export const GenesisState = {
+ typeUrl: "/cosmos.auth.v1beta1.GenesisState",
+ aminoType: "cosmos-sdk/GenesisState",
+ encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.params !== undefined) {
+ Params.encode(message.params, writer.uint32(10).fork()).ldelim();
+ }
+ for (const v of message.accounts) {
+ Any.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GenesisState {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGenesisState();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.params = Params.decode(reader, reader.uint32());
+ break;
+ case 2:
+ message.accounts.push(Any.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): GenesisState {
+ const message = createBaseGenesisState();
+ message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined;
+ message.accounts = object.accounts?.map(e => Any.fromPartial(e)) || [];
+ return message;
+ },
+ fromAmino(object: GenesisStateAmino): GenesisState {
+ const message = createBaseGenesisState();
+ if (object.params !== undefined && object.params !== null) {
+ message.params = Params.fromAmino(object.params);
+ }
+ message.accounts = object.accounts?.map(e => Any.fromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: GenesisState): GenesisStateAmino {
+ const obj: any = {};
+ obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({}));
+ if (message.accounts) {
+ obj.accounts = message.accounts.map(e => e ? Any.toAmino(e) : undefined);
+ } else {
+ obj.accounts = message.accounts;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: GenesisStateAminoMsg): GenesisState {
+ return GenesisState.fromAmino(object.value);
+ },
+ toAminoMsg(message: GenesisState): GenesisStateAminoMsg {
+ return {
+ type: "cosmos-sdk/GenesisState",
+ value: GenesisState.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GenesisStateProtoMsg): GenesisState {
+ return GenesisState.decode(message.value);
+ },
+ toProto(message: GenesisState): Uint8Array {
+ return GenesisState.encode(message).finish();
+ },
+ toProtoMsg(message: GenesisState): GenesisStateProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.GenesisState",
+ value: GenesisState.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/query.lcd.ts b/util/inj-types/cosmos/auth/v1beta1/query.lcd.ts
new file mode 100644
index 00000000..decb8f66
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/query.lcd.ts
@@ -0,0 +1,94 @@
+import { setPaginationParams } from "../../../helpers";
+import { LCDClient } from "@cosmology/lcd";
+import { QueryAccountsRequest, QueryAccountsResponseSDKType, QueryAccountRequest, QueryAccountResponseSDKType, QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponseSDKType, QueryParamsRequest, QueryParamsResponseSDKType, QueryModuleAccountsRequest, QueryModuleAccountsResponseSDKType, QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponseSDKType, Bech32PrefixRequest, Bech32PrefixResponseSDKType, AddressBytesToStringRequest, AddressBytesToStringResponseSDKType, AddressStringToBytesRequest, AddressStringToBytesResponseSDKType, QueryAccountInfoRequest, QueryAccountInfoResponseSDKType } from "./query";
+export class LCDQueryClient {
+ req: LCDClient;
+ constructor({
+ requestClient
+ }: {
+ requestClient: LCDClient;
+ }) {
+ this.req = requestClient;
+ }
+ /* 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 (params: QueryAccountsRequest = {
+ pagination: undefined
+ }): Promise => {
+ const options: any = {
+ params: {}
+ };
+ if (typeof params?.pagination !== "undefined") {
+ setPaginationParams(options, params.pagination);
+ }
+ const endpoint = `cosmos/auth/v1beta1/accounts`;
+ return await this.req.get(endpoint, options);
+ };
+ /* Account returns account details based on address. */
+ account = async (params: QueryAccountRequest): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/accounts/${params.address}`;
+ return await this.req.get(endpoint);
+ };
+ /* AccountAddressByID returns account address based on account number.
+
+ Since: cosmos-sdk 0.46.2 */
+ accountAddressByID = async (params: QueryAccountAddressByIDRequest): Promise => {
+ const options: any = {
+ params: {}
+ };
+ if (typeof params?.accountId !== "undefined") {
+ options.params.account_id = params.accountId;
+ }
+ const endpoint = `cosmos/auth/v1beta1/address_by_id/${params.id}`;
+ return await this.req.get(endpoint, options);
+ };
+ /* Params queries all parameters. */
+ params = async (_params: QueryParamsRequest = {}): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/params`;
+ return await this.req.get(endpoint);
+ };
+ /* ModuleAccounts returns all the existing module accounts.
+
+ Since: cosmos-sdk 0.46 */
+ moduleAccounts = async (_params: QueryModuleAccountsRequest = {}): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/module_accounts`;
+ return await this.req.get(endpoint);
+ };
+ /* ModuleAccountByName returns the module account info by module name */
+ moduleAccountByName = async (params: QueryModuleAccountByNameRequest): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/module_accounts/${params.name}`;
+ return await this.req.get(endpoint);
+ };
+ /* Bech32Prefix queries bech32Prefix
+
+ Since: cosmos-sdk 0.46 */
+ bech32Prefix = async (_params: Bech32PrefixRequest = {}): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/bech32`;
+ return await this.req.get(endpoint);
+ };
+ /* AddressBytesToString converts Account Address bytes to string
+
+ Since: cosmos-sdk 0.46 */
+ addressBytesToString = async (params: AddressBytesToStringRequest): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/bech32/${params.addressBytes}`;
+ return await this.req.get(endpoint);
+ };
+ /* AddressStringToBytes converts Address string to bytes
+
+ Since: cosmos-sdk 0.46 */
+ addressStringToBytes = async (params: AddressStringToBytesRequest): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/bech32/${params.addressString}`;
+ return await this.req.get(endpoint);
+ };
+ /* AccountInfo queries account info which is common to all account types.
+
+ Since: cosmos-sdk 0.47 */
+ accountInfo = async (params: QueryAccountInfoRequest): Promise => {
+ const endpoint = `cosmos/auth/v1beta1/account_info/${params.address}`;
+ return await this.req.get(endpoint);
+ };
+}
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/query.rpc.Query.ts b/util/inj-types/cosmos/auth/v1beta1/query.rpc.Query.ts
new file mode 100644
index 00000000..bd98e21a
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/query.rpc.Query.ts
@@ -0,0 +1,179 @@
+import { Rpc } from "../../../helpers";
+import { BinaryReader } from "../../../binary";
+import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate";
+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;
+}
+export class QueryClientImpl implements Query {
+ private readonly rpc: Rpc;
+ constructor(rpc: Rpc) {
+ 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 createRpcQueryExtension = (base: QueryClient) => {
+ const rpc = createProtobufRpcClient(base);
+ const queryService = new QueryClientImpl(rpc);
+ return {
+ accounts(request?: QueryAccountsRequest): Promise {
+ return queryService.accounts(request);
+ },
+ account(request: QueryAccountRequest): Promise {
+ return queryService.account(request);
+ },
+ accountAddressByID(request: QueryAccountAddressByIDRequest): Promise {
+ return queryService.accountAddressByID(request);
+ },
+ params(request?: QueryParamsRequest): Promise {
+ return queryService.params(request);
+ },
+ moduleAccounts(request?: QueryModuleAccountsRequest): Promise {
+ return queryService.moduleAccounts(request);
+ },
+ moduleAccountByName(request: QueryModuleAccountByNameRequest): Promise {
+ return queryService.moduleAccountByName(request);
+ },
+ bech32Prefix(request?: Bech32PrefixRequest): Promise {
+ return queryService.bech32Prefix(request);
+ },
+ addressBytesToString(request: AddressBytesToStringRequest): Promise {
+ return queryService.addressBytesToString(request);
+ },
+ addressStringToBytes(request: AddressStringToBytesRequest): Promise {
+ return queryService.addressStringToBytes(request);
+ },
+ accountInfo(request: QueryAccountInfoRequest): Promise {
+ return queryService.accountInfo(request);
+ }
+ };
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/query.ts b/util/inj-types/cosmos/auth/v1beta1/query.ts
new file mode 100644
index 00000000..4efd1dc2
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/query.ts
@@ -0,0 +1,2070 @@
+//@ts-nocheck
+import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination";
+import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
+import { Params, ParamsAmino, ParamsSDKType, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, BaseAccountSDKType, ModuleAccount, ModuleAccountProtoMsg, ModuleAccountSDKType } from "./auth";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, bytesFromBase64, base64FromBytes } 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;
+}
+export interface QueryAccountsRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountsRequest is the request type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsRequestAmino {
+ /** pagination defines an optional pagination for the request. */
+ pagination?: PageRequestAmino;
+}
+export interface QueryAccountsRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountsRequest";
+ value: QueryAccountsRequestAmino;
+}
+/**
+ * QueryAccountsRequest is the request type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsRequestSDKType {
+ pagination?: PageRequestSDKType;
+}
+/**
+ * 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: (BaseAccount | Any)[] | Any[];
+ /** pagination defines the pagination in the response. */
+ pagination?: PageResponse;
+}
+export interface QueryAccountsResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse";
+ value: Uint8Array;
+}
+export type QueryAccountsResponseEncoded = Omit & {
+ /** accounts are the existing accounts */accounts: (BaseAccountProtoMsg | AnyProtoMsg)[];
+};
+/**
+ * QueryAccountsResponse is the response type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsResponseAmino {
+ /** accounts are the existing accounts */
+ accounts?: AnyAmino[];
+ /** pagination defines the pagination in the response. */
+ pagination?: PageResponseAmino;
+}
+export interface QueryAccountsResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountsResponse";
+ value: QueryAccountsResponseAmino;
+}
+/**
+ * QueryAccountsResponse is the response type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsResponseSDKType {
+ accounts: (BaseAccountSDKType | AnySDKType)[];
+ pagination?: PageResponseSDKType;
+}
+/** QueryAccountRequest is the request type for the Query/Account RPC method. */
+export interface QueryAccountRequest {
+ /** address defines the address to query for. */
+ address: string;
+}
+export interface QueryAccountRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest";
+ value: Uint8Array;
+}
+/** QueryAccountRequest is the request type for the Query/Account RPC method. */
+export interface QueryAccountRequestAmino {
+ /** address defines the address to query for. */
+ address?: string;
+}
+export interface QueryAccountRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountRequest";
+ value: QueryAccountRequestAmino;
+}
+/** QueryAccountRequest is the request type for the Query/Account RPC method. */
+export interface QueryAccountRequestSDKType {
+ 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?: BaseAccount | Any | undefined;
+}
+export interface QueryAccountResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse";
+ value: Uint8Array;
+}
+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. */
+export interface QueryAccountResponseAmino {
+ /** account defines the account of the corresponding address. */
+ account?: AnyAmino;
+}
+export interface QueryAccountResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountResponse";
+ value: QueryAccountResponseAmino;
+}
+/** QueryAccountResponse is the response type for the Query/Account RPC method. */
+export interface QueryAccountResponseSDKType {
+ account?: BaseAccountSDKType | AnySDKType | undefined;
+}
+/** QueryParamsRequest is the request type for the Query/Params RPC method. */
+export interface QueryParamsRequest {}
+export interface QueryParamsRequestProtoMsg {
+ 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";
+ value: QueryParamsRequestAmino;
+}
+/** QueryParamsRequest is the request type for the Query/Params RPC method. */
+export interface QueryParamsRequestSDKType {}
+/** QueryParamsResponse is the response type for the Query/Params RPC method. */
+export interface QueryParamsResponse {
+ /** params defines the parameters of the module. */
+ params: Params;
+}
+export interface QueryParamsResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse";
+ value: Uint8Array;
+}
+/** QueryParamsResponse is the response type for the Query/Params RPC method. */
+export interface QueryParamsResponseAmino {
+ /** params defines the parameters of the module. */
+ params?: ParamsAmino;
+}
+export interface QueryParamsResponseAminoMsg {
+ type: "cosmos-sdk/QueryParamsResponse";
+ value: QueryParamsResponseAmino;
+}
+/** QueryParamsResponse is the response type for the Query/Params RPC method. */
+export interface QueryParamsResponseSDKType {
+ params: ParamsSDKType;
+}
+/**
+ * QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsRequest {}
+export interface QueryModuleAccountsRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsRequestAmino {}
+export interface QueryModuleAccountsRequestAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountsRequest";
+ value: QueryModuleAccountsRequestAmino;
+}
+/**
+ * QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsRequestSDKType {}
+/**
+ * QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsResponse {
+ accounts: (ModuleAccount | Any)[] | Any[];
+}
+export interface QueryModuleAccountsResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse";
+ value: Uint8Array;
+}
+export type QueryModuleAccountsResponseEncoded = Omit & {
+ accounts: (ModuleAccountProtoMsg | AnyProtoMsg)[];
+};
+/**
+ * QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsResponseAmino {
+ accounts?: AnyAmino[];
+}
+export interface QueryModuleAccountsResponseAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountsResponse";
+ value: QueryModuleAccountsResponseAmino;
+}
+/**
+ * QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsResponseSDKType {
+ accounts: (ModuleAccountSDKType | AnySDKType)[];
+}
+/** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameRequest {
+ name: string;
+}
+export interface QueryModuleAccountByNameRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest";
+ value: Uint8Array;
+}
+/** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameRequestAmino {
+ name?: string;
+}
+export interface QueryModuleAccountByNameRequestAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountByNameRequest";
+ value: QueryModuleAccountByNameRequestAmino;
+}
+/** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameRequestSDKType {
+ name: string;
+}
+/** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameResponse {
+ account?: ModuleAccount | Any | undefined;
+}
+export interface QueryModuleAccountByNameResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse";
+ value: Uint8Array;
+}
+export type QueryModuleAccountByNameResponseEncoded = Omit & {
+ account?: ModuleAccountProtoMsg | AnyProtoMsg | undefined;
+};
+/** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameResponseAmino {
+ account?: AnyAmino;
+}
+export interface QueryModuleAccountByNameResponseAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountByNameResponse";
+ value: QueryModuleAccountByNameResponseAmino;
+}
+/** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameResponseSDKType {
+ account?: ModuleAccountSDKType | AnySDKType | undefined;
+}
+/**
+ * Bech32PrefixRequest is the request type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixRequest {}
+export interface Bech32PrefixRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest";
+ value: Uint8Array;
+}
+/**
+ * Bech32PrefixRequest is the request type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixRequestAmino {}
+export interface Bech32PrefixRequestAminoMsg {
+ type: "cosmos-sdk/Bech32PrefixRequest";
+ value: Bech32PrefixRequestAmino;
+}
+/**
+ * Bech32PrefixRequest is the request type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixRequestSDKType {}
+/**
+ * Bech32PrefixResponse is the response type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixResponse {
+ bech32Prefix: string;
+}
+export interface Bech32PrefixResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse";
+ value: Uint8Array;
+}
+/**
+ * Bech32PrefixResponse is the response type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixResponseAmino {
+ bech32_prefix?: string;
+}
+export interface Bech32PrefixResponseAminoMsg {
+ type: "cosmos-sdk/Bech32PrefixResponse";
+ value: Bech32PrefixResponseAmino;
+}
+/**
+ * Bech32PrefixResponse is the response type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixResponseSDKType {
+ bech32_prefix: string;
+}
+/**
+ * AddressBytesToStringRequest is the request type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringRequest {
+ addressBytes: Uint8Array;
+}
+export interface AddressBytesToStringRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest";
+ value: Uint8Array;
+}
+/**
+ * AddressBytesToStringRequest is the request type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringRequestAmino {
+ address_bytes?: string;
+}
+export interface AddressBytesToStringRequestAminoMsg {
+ type: "cosmos-sdk/AddressBytesToStringRequest";
+ value: AddressBytesToStringRequestAmino;
+}
+/**
+ * AddressBytesToStringRequest is the request type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringRequestSDKType {
+ address_bytes: Uint8Array;
+}
+/**
+ * AddressBytesToStringResponse is the response type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringResponse {
+ addressString: string;
+}
+export interface AddressBytesToStringResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse";
+ value: Uint8Array;
+}
+/**
+ * AddressBytesToStringResponse is the response type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringResponseAmino {
+ address_string?: string;
+}
+export interface AddressBytesToStringResponseAminoMsg {
+ type: "cosmos-sdk/AddressBytesToStringResponse";
+ value: AddressBytesToStringResponseAmino;
+}
+/**
+ * AddressBytesToStringResponse is the response type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringResponseSDKType {
+ address_string: string;
+}
+/**
+ * AddressStringToBytesRequest is the request type for AccountBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesRequest {
+ addressString: string;
+}
+export interface AddressStringToBytesRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest";
+ value: Uint8Array;
+}
+/**
+ * AddressStringToBytesRequest is the request type for AccountBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesRequestAmino {
+ address_string?: string;
+}
+export interface AddressStringToBytesRequestAminoMsg {
+ type: "cosmos-sdk/AddressStringToBytesRequest";
+ value: AddressStringToBytesRequestAmino;
+}
+/**
+ * AddressStringToBytesRequest is the request type for AccountBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesRequestSDKType {
+ address_string: string;
+}
+/**
+ * AddressStringToBytesResponse is the response type for AddressBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesResponse {
+ addressBytes: Uint8Array;
+}
+export interface AddressStringToBytesResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse";
+ value: Uint8Array;
+}
+/**
+ * AddressStringToBytesResponse is the response type for AddressBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesResponseAmino {
+ address_bytes?: string;
+}
+export interface AddressStringToBytesResponseAminoMsg {
+ type: "cosmos-sdk/AddressStringToBytesResponse";
+ value: AddressStringToBytesResponseAmino;
+}
+/**
+ * AddressStringToBytesResponse is the response type for AddressBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesResponseSDKType {
+ address_bytes: 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;
+}
+export interface QueryAccountAddressByIDRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDRequestAmino {
+ /**
+ * 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?: string;
+ /**
+ * account_id is the account number of the address to be queried.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+ account_id?: string;
+}
+export interface QueryAccountAddressByIDRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountAddressByIDRequest";
+ value: QueryAccountAddressByIDRequestAmino;
+}
+/**
+ * QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDRequestSDKType {
+ /** @deprecated */
+ id: bigint;
+ account_id?: bigint;
+}
+/**
+ * QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDResponse {
+ accountAddress: string;
+}
+export interface QueryAccountAddressByIDResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDResponseAmino {
+ account_address?: string;
+}
+export interface QueryAccountAddressByIDResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountAddressByIDResponse";
+ value: QueryAccountAddressByIDResponseAmino;
+}
+/**
+ * QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDResponseSDKType {
+ account_address: string;
+}
+/**
+ * QueryAccountInfoRequest is the Query/AccountInfo request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoRequest {
+ /** address is the account address string. */
+ address: string;
+}
+export interface QueryAccountInfoRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountInfoRequest is the Query/AccountInfo request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoRequestAmino {
+ /** address is the account address string. */
+ address?: string;
+}
+export interface QueryAccountInfoRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountInfoRequest";
+ value: QueryAccountInfoRequestAmino;
+}
+/**
+ * QueryAccountInfoRequest is the Query/AccountInfo request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoRequestSDKType {
+ 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;
+}
+export interface QueryAccountInfoResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountInfoResponse is the Query/AccountInfo response type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoResponseAmino {
+ /** info is the account info which is represented by BaseAccount. */
+ info?: BaseAccountAmino;
+}
+export interface QueryAccountInfoResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountInfoResponse";
+ value: QueryAccountInfoResponseAmino;
+}
+/**
+ * QueryAccountInfoResponse is the Query/AccountInfo response type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoResponseSDKType {
+ info?: BaseAccountSDKType;
+}
+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;
+ },
+ fromAmino(object: QueryAccountsRequestAmino): QueryAccountsRequest {
+ const message = createBaseQueryAccountsRequest();
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageRequest.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountsRequest): QueryAccountsRequestAmino {
+ const obj: any = {};
+ obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountsRequestAminoMsg): QueryAccountsRequest {
+ return QueryAccountsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountsRequest): QueryAccountsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountsRequest",
+ value: QueryAccountsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountsRequestProtoMsg): QueryAccountsRequest {
+ return QueryAccountsRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountsRequest): Uint8Array {
+ return QueryAccountsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountsRequest): QueryAccountsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest",
+ value: QueryAccountsRequest.encode(message).finish()
+ };
+ }
+};
+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! as Any), 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()) as Any));
+ 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;
+ },
+ fromAmino(object: QueryAccountsResponseAmino): QueryAccountsResponse {
+ const message = createBaseQueryAccountsResponse();
+ message.accounts = object.accounts?.map(e => Cosmos_authv1beta1AccountI_FromAmino(e)) || [];
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageResponse.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountsResponse): QueryAccountsResponseAmino {
+ const obj: any = {};
+ if (message.accounts) {
+ obj.accounts = message.accounts.map(e => e ? Cosmos_authv1beta1AccountI_ToAmino((e as Any)) : undefined);
+ } else {
+ obj.accounts = message.accounts;
+ }
+ obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountsResponseAminoMsg): QueryAccountsResponse {
+ return QueryAccountsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountsResponse): QueryAccountsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountsResponse",
+ value: QueryAccountsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountsResponseProtoMsg): QueryAccountsResponse {
+ return QueryAccountsResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountsResponse): Uint8Array {
+ return QueryAccountsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountsResponse): QueryAccountsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse",
+ value: QueryAccountsResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: QueryAccountRequestAmino): QueryAccountRequest {
+ const message = createBaseQueryAccountRequest();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountRequest): QueryAccountRequestAmino {
+ const obj: any = {};
+ obj.address = message.address === "" ? undefined : message.address;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountRequestAminoMsg): QueryAccountRequest {
+ return QueryAccountRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountRequest): QueryAccountRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountRequest",
+ value: QueryAccountRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountRequestProtoMsg): QueryAccountRequest {
+ return QueryAccountRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountRequest): Uint8Array {
+ return QueryAccountRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountRequest): QueryAccountRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest",
+ value: QueryAccountRequest.encode(message).finish()
+ };
+ }
+};
+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 as Any), 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 = (Cosmos_authv1beta1AccountI_InterfaceDecoder(reader) as Any);
+ 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;
+ },
+ fromAmino(object: QueryAccountResponseAmino): QueryAccountResponse {
+ const message = createBaseQueryAccountResponse();
+ if (object.account !== undefined && object.account !== null) {
+ message.account = Cosmos_authv1beta1AccountI_FromAmino(object.account);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountResponse): QueryAccountResponseAmino {
+ const obj: any = {};
+ obj.account = message.account ? Cosmos_authv1beta1AccountI_ToAmino((message.account as Any)) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountResponseAminoMsg): QueryAccountResponse {
+ return QueryAccountResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountResponse): QueryAccountResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountResponse",
+ value: QueryAccountResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountResponseProtoMsg): QueryAccountResponse {
+ return QueryAccountResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountResponse): Uint8Array {
+ return QueryAccountResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountResponse): QueryAccountResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse",
+ value: QueryAccountResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest {
+ const message = createBaseQueryParamsRequest();
+ return message;
+ },
+ toAmino(_: QueryParamsRequest): QueryParamsRequestAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest {
+ return QueryParamsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryParamsRequest",
+ value: QueryParamsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest {
+ return QueryParamsRequest.decode(message.value);
+ },
+ toProto(message: QueryParamsRequest): Uint8Array {
+ return QueryParamsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest",
+ value: QueryParamsRequest.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse {
+ const message = createBaseQueryParamsResponse();
+ if (object.params !== undefined && object.params !== null) {
+ message.params = Params.fromAmino(object.params);
+ }
+ return message;
+ },
+ toAmino(message: QueryParamsResponse): QueryParamsResponseAmino {
+ const obj: any = {};
+ obj.params = message.params ? Params.toAmino(message.params) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse {
+ return QueryParamsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryParamsResponse",
+ value: QueryParamsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse {
+ return QueryParamsResponse.decode(message.value);
+ },
+ toProto(message: QueryParamsResponse): Uint8Array {
+ return QueryParamsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse",
+ value: QueryParamsResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(_: QueryModuleAccountsRequestAmino): QueryModuleAccountsRequest {
+ const message = createBaseQueryModuleAccountsRequest();
+ return message;
+ },
+ toAmino(_: QueryModuleAccountsRequest): QueryModuleAccountsRequestAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountsRequestAminoMsg): QueryModuleAccountsRequest {
+ return QueryModuleAccountsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountsRequest",
+ value: QueryModuleAccountsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountsRequestProtoMsg): QueryModuleAccountsRequest {
+ return QueryModuleAccountsRequest.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountsRequest): Uint8Array {
+ return QueryModuleAccountsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest",
+ value: QueryModuleAccountsRequest.encode(message).finish()
+ };
+ }
+};
+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! as Any), 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()) as Any));
+ 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;
+ },
+ fromAmino(object: QueryModuleAccountsResponseAmino): QueryModuleAccountsResponse {
+ const message = createBaseQueryModuleAccountsResponse();
+ message.accounts = object.accounts?.map(e => Cosmos_authv1beta1ModuleAccountI_FromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseAmino {
+ const obj: any = {};
+ if (message.accounts) {
+ obj.accounts = message.accounts.map(e => e ? Cosmos_authv1beta1ModuleAccountI_ToAmino((e as Any)) : undefined);
+ } else {
+ obj.accounts = message.accounts;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountsResponseAminoMsg): QueryModuleAccountsResponse {
+ return QueryModuleAccountsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountsResponse",
+ value: QueryModuleAccountsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountsResponseProtoMsg): QueryModuleAccountsResponse {
+ return QueryModuleAccountsResponse.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountsResponse): Uint8Array {
+ return QueryModuleAccountsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse",
+ value: QueryModuleAccountsResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: QueryModuleAccountByNameRequestAmino): QueryModuleAccountByNameRequest {
+ const message = createBaseQueryModuleAccountByNameRequest();
+ if (object.name !== undefined && object.name !== null) {
+ message.name = object.name;
+ }
+ return message;
+ },
+ toAmino(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestAmino {
+ const obj: any = {};
+ obj.name = message.name === "" ? undefined : message.name;
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountByNameRequestAminoMsg): QueryModuleAccountByNameRequest {
+ return QueryModuleAccountByNameRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountByNameRequest",
+ value: QueryModuleAccountByNameRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountByNameRequestProtoMsg): QueryModuleAccountByNameRequest {
+ return QueryModuleAccountByNameRequest.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountByNameRequest): Uint8Array {
+ return QueryModuleAccountByNameRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest",
+ value: QueryModuleAccountByNameRequest.encode(message).finish()
+ };
+ }
+};
+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 as Any), 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 = (Cosmos_authv1beta1ModuleAccountI_InterfaceDecoder(reader) as Any);
+ 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;
+ },
+ fromAmino(object: QueryModuleAccountByNameResponseAmino): QueryModuleAccountByNameResponse {
+ const message = createBaseQueryModuleAccountByNameResponse();
+ if (object.account !== undefined && object.account !== null) {
+ message.account = Cosmos_authv1beta1ModuleAccountI_FromAmino(object.account);
+ }
+ return message;
+ },
+ toAmino(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseAmino {
+ const obj: any = {};
+ obj.account = message.account ? Cosmos_authv1beta1ModuleAccountI_ToAmino((message.account as Any)) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountByNameResponseAminoMsg): QueryModuleAccountByNameResponse {
+ return QueryModuleAccountByNameResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountByNameResponse",
+ value: QueryModuleAccountByNameResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountByNameResponseProtoMsg): QueryModuleAccountByNameResponse {
+ return QueryModuleAccountByNameResponse.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountByNameResponse): Uint8Array {
+ return QueryModuleAccountByNameResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse",
+ value: QueryModuleAccountByNameResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(_: Bech32PrefixRequestAmino): Bech32PrefixRequest {
+ const message = createBaseBech32PrefixRequest();
+ return message;
+ },
+ toAmino(_: Bech32PrefixRequest): Bech32PrefixRequestAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: Bech32PrefixRequestAminoMsg): Bech32PrefixRequest {
+ return Bech32PrefixRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/Bech32PrefixRequest",
+ value: Bech32PrefixRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: Bech32PrefixRequestProtoMsg): Bech32PrefixRequest {
+ return Bech32PrefixRequest.decode(message.value);
+ },
+ toProto(message: Bech32PrefixRequest): Uint8Array {
+ return Bech32PrefixRequest.encode(message).finish();
+ },
+ toProtoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest",
+ value: Bech32PrefixRequest.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: Bech32PrefixResponseAmino): Bech32PrefixResponse {
+ const message = createBaseBech32PrefixResponse();
+ if (object.bech32_prefix !== undefined && object.bech32_prefix !== null) {
+ message.bech32Prefix = object.bech32_prefix;
+ }
+ return message;
+ },
+ toAmino(message: Bech32PrefixResponse): Bech32PrefixResponseAmino {
+ const obj: any = {};
+ obj.bech32_prefix = message.bech32Prefix === "" ? undefined : message.bech32Prefix;
+ return obj;
+ },
+ fromAminoMsg(object: Bech32PrefixResponseAminoMsg): Bech32PrefixResponse {
+ return Bech32PrefixResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/Bech32PrefixResponse",
+ value: Bech32PrefixResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: Bech32PrefixResponseProtoMsg): Bech32PrefixResponse {
+ return Bech32PrefixResponse.decode(message.value);
+ },
+ toProto(message: Bech32PrefixResponse): Uint8Array {
+ return Bech32PrefixResponse.encode(message).finish();
+ },
+ toProtoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse",
+ value: Bech32PrefixResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: AddressBytesToStringRequestAmino): AddressBytesToStringRequest {
+ const message = createBaseAddressBytesToStringRequest();
+ if (object.address_bytes !== undefined && object.address_bytes !== null) {
+ message.addressBytes = bytesFromBase64(object.address_bytes);
+ }
+ return message;
+ },
+ toAmino(message: AddressBytesToStringRequest): AddressBytesToStringRequestAmino {
+ const obj: any = {};
+ obj.address_bytes = message.addressBytes ? base64FromBytes(message.addressBytes) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: AddressBytesToStringRequestAminoMsg): AddressBytesToStringRequest {
+ return AddressBytesToStringRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressBytesToStringRequest",
+ value: AddressBytesToStringRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressBytesToStringRequestProtoMsg): AddressBytesToStringRequest {
+ return AddressBytesToStringRequest.decode(message.value);
+ },
+ toProto(message: AddressBytesToStringRequest): Uint8Array {
+ return AddressBytesToStringRequest.encode(message).finish();
+ },
+ toProtoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest",
+ value: AddressBytesToStringRequest.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: AddressBytesToStringResponseAmino): AddressBytesToStringResponse {
+ const message = createBaseAddressBytesToStringResponse();
+ if (object.address_string !== undefined && object.address_string !== null) {
+ message.addressString = object.address_string;
+ }
+ return message;
+ },
+ toAmino(message: AddressBytesToStringResponse): AddressBytesToStringResponseAmino {
+ const obj: any = {};
+ obj.address_string = message.addressString === "" ? undefined : message.addressString;
+ return obj;
+ },
+ fromAminoMsg(object: AddressBytesToStringResponseAminoMsg): AddressBytesToStringResponse {
+ return AddressBytesToStringResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressBytesToStringResponse",
+ value: AddressBytesToStringResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressBytesToStringResponseProtoMsg): AddressBytesToStringResponse {
+ return AddressBytesToStringResponse.decode(message.value);
+ },
+ toProto(message: AddressBytesToStringResponse): Uint8Array {
+ return AddressBytesToStringResponse.encode(message).finish();
+ },
+ toProtoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse",
+ value: AddressBytesToStringResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: AddressStringToBytesRequestAmino): AddressStringToBytesRequest {
+ const message = createBaseAddressStringToBytesRequest();
+ if (object.address_string !== undefined && object.address_string !== null) {
+ message.addressString = object.address_string;
+ }
+ return message;
+ },
+ toAmino(message: AddressStringToBytesRequest): AddressStringToBytesRequestAmino {
+ const obj: any = {};
+ obj.address_string = message.addressString === "" ? undefined : message.addressString;
+ return obj;
+ },
+ fromAminoMsg(object: AddressStringToBytesRequestAminoMsg): AddressStringToBytesRequest {
+ return AddressStringToBytesRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressStringToBytesRequest",
+ value: AddressStringToBytesRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressStringToBytesRequestProtoMsg): AddressStringToBytesRequest {
+ return AddressStringToBytesRequest.decode(message.value);
+ },
+ toProto(message: AddressStringToBytesRequest): Uint8Array {
+ return AddressStringToBytesRequest.encode(message).finish();
+ },
+ toProtoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest",
+ value: AddressStringToBytesRequest.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: AddressStringToBytesResponseAmino): AddressStringToBytesResponse {
+ const message = createBaseAddressStringToBytesResponse();
+ if (object.address_bytes !== undefined && object.address_bytes !== null) {
+ message.addressBytes = bytesFromBase64(object.address_bytes);
+ }
+ return message;
+ },
+ toAmino(message: AddressStringToBytesResponse): AddressStringToBytesResponseAmino {
+ const obj: any = {};
+ obj.address_bytes = message.addressBytes ? base64FromBytes(message.addressBytes) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: AddressStringToBytesResponseAminoMsg): AddressStringToBytesResponse {
+ return AddressStringToBytesResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressStringToBytesResponse",
+ value: AddressStringToBytesResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressStringToBytesResponseProtoMsg): AddressStringToBytesResponse {
+ return AddressStringToBytesResponse.decode(message.value);
+ },
+ toProto(message: AddressStringToBytesResponse): Uint8Array {
+ return AddressStringToBytesResponse.encode(message).finish();
+ },
+ toProtoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse",
+ value: AddressStringToBytesResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: QueryAccountAddressByIDRequestAmino): QueryAccountAddressByIDRequest {
+ const message = createBaseQueryAccountAddressByIDRequest();
+ if (object.id !== undefined && object.id !== null) {
+ message.id = BigInt(object.id);
+ }
+ if (object.account_id !== undefined && object.account_id !== null) {
+ message.accountId = BigInt(object.account_id);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestAmino {
+ const obj: any = {};
+ obj.id = message.id !== BigInt(0) ? message.id.toString() : undefined;
+ obj.account_id = message.accountId !== BigInt(0) ? message.accountId.toString() : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountAddressByIDRequestAminoMsg): QueryAccountAddressByIDRequest {
+ return QueryAccountAddressByIDRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountAddressByIDRequest",
+ value: QueryAccountAddressByIDRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountAddressByIDRequestProtoMsg): QueryAccountAddressByIDRequest {
+ return QueryAccountAddressByIDRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountAddressByIDRequest): Uint8Array {
+ return QueryAccountAddressByIDRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest",
+ value: QueryAccountAddressByIDRequest.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: QueryAccountAddressByIDResponseAmino): QueryAccountAddressByIDResponse {
+ const message = createBaseQueryAccountAddressByIDResponse();
+ if (object.account_address !== undefined && object.account_address !== null) {
+ message.accountAddress = object.account_address;
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseAmino {
+ const obj: any = {};
+ obj.account_address = message.accountAddress === "" ? undefined : message.accountAddress;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountAddressByIDResponseAminoMsg): QueryAccountAddressByIDResponse {
+ return QueryAccountAddressByIDResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountAddressByIDResponse",
+ value: QueryAccountAddressByIDResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountAddressByIDResponseProtoMsg): QueryAccountAddressByIDResponse {
+ return QueryAccountAddressByIDResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountAddressByIDResponse): Uint8Array {
+ return QueryAccountAddressByIDResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse",
+ value: QueryAccountAddressByIDResponse.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: QueryAccountInfoRequestAmino): QueryAccountInfoRequest {
+ const message = createBaseQueryAccountInfoRequest();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountInfoRequest): QueryAccountInfoRequestAmino {
+ const obj: any = {};
+ obj.address = message.address === "" ? undefined : message.address;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountInfoRequestAminoMsg): QueryAccountInfoRequest {
+ return QueryAccountInfoRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountInfoRequest): QueryAccountInfoRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountInfoRequest",
+ value: QueryAccountInfoRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountInfoRequestProtoMsg): QueryAccountInfoRequest {
+ return QueryAccountInfoRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountInfoRequest): Uint8Array {
+ return QueryAccountInfoRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountInfoRequest): QueryAccountInfoRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest",
+ value: QueryAccountInfoRequest.encode(message).finish()
+ };
+ }
+};
+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;
+ },
+ fromAmino(object: QueryAccountInfoResponseAmino): QueryAccountInfoResponse {
+ const message = createBaseQueryAccountInfoResponse();
+ if (object.info !== undefined && object.info !== null) {
+ message.info = BaseAccount.fromAmino(object.info);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountInfoResponse): QueryAccountInfoResponseAmino {
+ const obj: any = {};
+ obj.info = message.info ? BaseAccount.toAmino(message.info) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountInfoResponseAminoMsg): QueryAccountInfoResponse {
+ return QueryAccountInfoResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountInfoResponse): QueryAccountInfoResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountInfoResponse",
+ value: QueryAccountInfoResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountInfoResponseProtoMsg): QueryAccountInfoResponse {
+ return QueryAccountInfoResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountInfoResponse): Uint8Array {
+ return QueryAccountInfoResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountInfoResponse): QueryAccountInfoResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse",
+ value: QueryAccountInfoResponse.encode(message).finish()
+ };
+ }
+};
+export const Cosmos_authv1beta1AccountI_InterfaceDecoder = (input: BinaryReader | Uint8Array): BaseAccount | Any => {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const data = Any.decode(reader, reader.uint32());
+ switch (data.typeUrl) {
+ case "/cosmos.auth.v1beta1.BaseAccount":
+ return BaseAccount.decode(data.value);
+ default:
+ return data;
+ }
+};
+export const Cosmos_authv1beta1AccountI_FromAmino = (content: AnyAmino): Any => {
+ switch (content.type) {
+ case "cosmos-sdk/BaseAccount":
+ return Any.fromPartial({
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
+ value: BaseAccount.encode(BaseAccount.fromPartial(BaseAccount.fromAmino(content.value))).finish()
+ });
+ default:
+ return Any.fromAmino(content);
+ }
+};
+export const Cosmos_authv1beta1AccountI_ToAmino = (content: Any) => {
+ switch (content.typeUrl) {
+ case "/cosmos.auth.v1beta1.BaseAccount":
+ return {
+ type: "cosmos-sdk/BaseAccount",
+ value: BaseAccount.toAmino(BaseAccount.decode(content.value, undefined))
+ };
+ default:
+ return Any.toAmino(content);
+ }
+};
+export const Cosmos_authv1beta1ModuleAccountI_InterfaceDecoder = (input: BinaryReader | Uint8Array): ModuleAccount | Any => {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const data = Any.decode(reader, reader.uint32());
+ switch (data.typeUrl) {
+ case "/cosmos.auth.v1beta1.ModuleAccount":
+ return ModuleAccount.decode(data.value);
+ default:
+ return data;
+ }
+};
+export const Cosmos_authv1beta1ModuleAccountI_FromAmino = (content: AnyAmino): Any => {
+ switch (content.type) {
+ case "cosmos-sdk/ModuleAccount":
+ return Any.fromPartial({
+ typeUrl: "/cosmos.auth.v1beta1.ModuleAccount",
+ value: ModuleAccount.encode(ModuleAccount.fromPartial(ModuleAccount.fromAmino(content.value))).finish()
+ });
+ default:
+ return Any.fromAmino(content);
+ }
+};
+export const Cosmos_authv1beta1ModuleAccountI_ToAmino = (content: Any) => {
+ switch (content.typeUrl) {
+ case "/cosmos.auth.v1beta1.ModuleAccount":
+ return {
+ type: "cosmos-sdk/ModuleAccount",
+ value: ModuleAccount.toAmino(ModuleAccount.decode(content.value, undefined))
+ };
+ default:
+ return Any.toAmino(content);
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/tx.amino.ts b/util/inj-types/cosmos/auth/v1beta1/tx.amino.ts
new file mode 100644
index 00000000..7232eddd
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/tx.amino.ts
@@ -0,0 +1,8 @@
+import { MsgUpdateParams } from "./tx";
+export const AminoConverter = {
+ "/cosmos.auth.v1beta1.MsgUpdateParams": {
+ aminoType: "cosmos-sdk/x/auth/MsgUpdateParams",
+ toAmino: MsgUpdateParams.toAmino,
+ fromAmino: MsgUpdateParams.fromAmino
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/tx.registry.ts b/util/inj-types/cosmos/auth/v1beta1/tx.registry.ts
new file mode 100644
index 00000000..2070e3ea
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/tx.registry.ts
@@ -0,0 +1,35 @@
+//@ts-nocheck
+import { GeneratedType, Registry } from "@cosmjs/proto-signing";
+import { MsgUpdateParams } from "./tx";
+export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.auth.v1beta1.MsgUpdateParams", MsgUpdateParams]];
+export const load = (protoRegistry: Registry) => {
+ registry.forEach(([typeUrl, mod]) => {
+ protoRegistry.register(typeUrl, mod);
+ });
+};
+export const MessageComposer = {
+ encoded: {
+ updateParams(value: MsgUpdateParams) {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams",
+ value: MsgUpdateParams.encode(value).finish()
+ };
+ }
+ },
+ withTypeUrl: {
+ updateParams(value: MsgUpdateParams) {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams",
+ value
+ };
+ }
+ },
+ fromPartial: {
+ updateParams(value: MsgUpdateParams) {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams",
+ value: MsgUpdateParams.fromPartial(value)
+ };
+ }
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/tx.rpc.msg.ts b/util/inj-types/cosmos/auth/v1beta1/tx.rpc.msg.ts
new file mode 100644
index 00000000..a1057581
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/tx.rpc.msg.ts
@@ -0,0 +1,28 @@
+import { Rpc } from "../../../helpers";
+import { BinaryReader } from "../../../binary";
+import { MsgUpdateParams, MsgUpdateParamsResponse } from "./tx";
+/** Msg defines the x/auth Msg service. */
+export interface Msg {
+ /**
+ * UpdateParams defines a (governance) operation for updating the x/auth module
+ * parameters. The authority defaults to the x/gov module account.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+ updateParams(request: MsgUpdateParams): Promise;
+}
+export class MsgClientImpl implements Msg {
+ private readonly rpc: Rpc;
+ constructor(rpc: Rpc) {
+ this.rpc = rpc;
+ }
+ /* UpdateParams defines a (governance) operation for updating the x/auth module
+ parameters. The authority defaults to the x/gov module account.
+
+ Since: cosmos-sdk 0.47 */
+ updateParams = async (request: MsgUpdateParams): Promise => {
+ const data = MsgUpdateParams.encode(request).finish();
+ const promise = this.rpc.request("cosmos.auth.v1beta1.Msg", "UpdateParams", data);
+ return promise.then(data => MsgUpdateParamsResponse.decode(new BinaryReader(data)));
+ };
+}
\ No newline at end of file
diff --git a/util/inj-types/cosmos/auth/v1beta1/tx.ts b/util/inj-types/cosmos/auth/v1beta1/tx.ts
new file mode 100644
index 00000000..388d1c6f
--- /dev/null
+++ b/util/inj-types/cosmos/auth/v1beta1/tx.ts
@@ -0,0 +1,218 @@
+import { Params, ParamsAmino, ParamsSDKType } from "./auth";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/**
+ * MsgUpdateParams is the Msg/UpdateParams request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface MsgUpdateParams {
+ /** authority is the address that controls the module (defaults to x/gov unless overwritten). */
+ authority: string;
+ /**
+ * params defines the x/auth parameters to update.
+ *
+ * NOTE: All parameters must be supplied.
+ */
+ params: Params;
+}
+export interface MsgUpdateParamsProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams";
+ value: Uint8Array;
+}
+/**
+ * MsgUpdateParams is the Msg/UpdateParams request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface MsgUpdateParamsAmino {
+ /** authority is the address that controls the module (defaults to x/gov unless overwritten). */
+ authority?: string;
+ /**
+ * params defines the x/auth parameters to update.
+ *
+ * NOTE: All parameters must be supplied.
+ */
+ params: ParamsAmino;
+}
+export interface MsgUpdateParamsAminoMsg {
+ type: "cosmos-sdk/x/auth/MsgUpdateParams";
+ value: MsgUpdateParamsAmino;
+}
+/**
+ * MsgUpdateParams is the Msg/UpdateParams request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface MsgUpdateParamsSDKType {
+ authority: string;
+ params: ParamsSDKType;
+}
+/**
+ * MsgUpdateParamsResponse defines the response structure for executing a
+ * MsgUpdateParams message.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface MsgUpdateParamsResponse {}
+export interface MsgUpdateParamsResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParamsResponse";
+ value: Uint8Array;
+}
+/**
+ * MsgUpdateParamsResponse defines the response structure for executing a
+ * MsgUpdateParams message.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface MsgUpdateParamsResponseAmino {}
+export interface MsgUpdateParamsResponseAminoMsg {
+ type: "cosmos-sdk/MsgUpdateParamsResponse";
+ value: MsgUpdateParamsResponseAmino;
+}
+/**
+ * MsgUpdateParamsResponse defines the response structure for executing a
+ * MsgUpdateParams message.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface MsgUpdateParamsResponseSDKType {}
+function createBaseMsgUpdateParams(): MsgUpdateParams {
+ return {
+ authority: "",
+ params: Params.fromPartial({})
+ };
+}
+export const MsgUpdateParams = {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams",
+ aminoType: "cosmos-sdk/x/auth/MsgUpdateParams",
+ encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.authority !== "") {
+ writer.uint32(10).string(message.authority);
+ }
+ if (message.params !== undefined) {
+ Params.encode(message.params, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParams {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgUpdateParams();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgUpdateParams {
+ const message = createBaseMsgUpdateParams();
+ message.authority = object.authority ?? "";
+ message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined;
+ return message;
+ },
+ fromAmino(object: MsgUpdateParamsAmino): MsgUpdateParams {
+ const message = createBaseMsgUpdateParams();
+ if (object.authority !== undefined && object.authority !== null) {
+ message.authority = object.authority;
+ }
+ if (object.params !== undefined && object.params !== null) {
+ message.params = Params.fromAmino(object.params);
+ }
+ return message;
+ },
+ toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino {
+ const obj: any = {};
+ obj.authority = message.authority === "" ? undefined : message.authority;
+ obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({}));
+ return obj;
+ },
+ fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams {
+ return MsgUpdateParams.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg {
+ return {
+ type: "cosmos-sdk/x/auth/MsgUpdateParams",
+ value: MsgUpdateParams.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgUpdateParamsProtoMsg): MsgUpdateParams {
+ return MsgUpdateParams.decode(message.value);
+ },
+ toProto(message: MsgUpdateParams): Uint8Array {
+ return MsgUpdateParams.encode(message).finish();
+ },
+ toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams",
+ value: MsgUpdateParams.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse {
+ return {};
+}
+export const MsgUpdateParamsResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParamsResponse",
+ aminoType: "cosmos-sdk/MsgUpdateParamsResponse",
+ encode(_: MsgUpdateParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParamsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgUpdateParamsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): MsgUpdateParamsResponse {
+ const message = createBaseMsgUpdateParamsResponse();
+ return message;
+ },
+ fromAmino(_: MsgUpdateParamsResponseAmino): MsgUpdateParamsResponse {
+ const message = createBaseMsgUpdateParamsResponse();
+ return message;
+ },
+ toAmino(_: MsgUpdateParamsResponse): MsgUpdateParamsResponseAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: MsgUpdateParamsResponseAminoMsg): MsgUpdateParamsResponse {
+ return MsgUpdateParamsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgUpdateParamsResponse",
+ value: MsgUpdateParamsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgUpdateParamsResponseProtoMsg): MsgUpdateParamsResponse {
+ return MsgUpdateParamsResponse.decode(message.value);
+ },
+ toProto(message: MsgUpdateParamsResponse): Uint8Array {
+ return MsgUpdateParamsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParamsResponse",
+ value: MsgUpdateParamsResponse.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/module/v1/module.ts b/util/inj-types/cosmos/authz/module/v1/module.ts
new file mode 100644
index 00000000..2aa1be4a
--- /dev/null
+++ b/util/inj-types/cosmos/authz/module/v1/module.ts
@@ -0,0 +1,73 @@
+import { BinaryReader, BinaryWriter } from "../../../../binary";
+import { DeepPartial } from "../../../../helpers";
+/** Module is the config object of the authz module. */
+export interface Module {}
+export interface ModuleProtoMsg {
+ typeUrl: "/cosmos.authz.module.v1.Module";
+ value: Uint8Array;
+}
+/** Module is the config object of the authz module. */
+export interface ModuleAmino {}
+export interface ModuleAminoMsg {
+ type: "cosmos-sdk/Module";
+ value: ModuleAmino;
+}
+/** Module is the config object of the authz module. */
+export interface ModuleSDKType {}
+function createBaseModule(): Module {
+ return {};
+}
+export const Module = {
+ typeUrl: "/cosmos.authz.module.v1.Module",
+ aminoType: "cosmos-sdk/Module",
+ encode(_: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Module {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModule();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): Module {
+ const message = createBaseModule();
+ return message;
+ },
+ fromAmino(_: ModuleAmino): Module {
+ const message = createBaseModule();
+ return message;
+ },
+ toAmino(_: Module): ModuleAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: ModuleAminoMsg): Module {
+ return Module.fromAmino(object.value);
+ },
+ toAminoMsg(message: Module): ModuleAminoMsg {
+ return {
+ type: "cosmos-sdk/Module",
+ value: Module.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleProtoMsg): Module {
+ return Module.decode(message.value);
+ },
+ toProto(message: Module): Uint8Array {
+ return Module.encode(message).finish();
+ },
+ toProtoMsg(message: Module): ModuleProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.module.v1.Module",
+ value: Module.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/authz.ts b/util/inj-types/cosmos/authz/v1beta1/authz.ts
new file mode 100644
index 00000000..fbd84396
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/authz.ts
@@ -0,0 +1,585 @@
+//@ts-nocheck
+import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
+import { Timestamp } from "../../../google/protobuf/timestamp";
+import { SendAuthorization, SendAuthorizationProtoMsg, SendAuthorizationSDKType } from "../../bank/v1beta1/authz";
+import { StakeAuthorization, StakeAuthorizationProtoMsg, StakeAuthorizationSDKType } from "../../staking/v1beta1/authz";
+import { StoreCodeAuthorization, StoreCodeAuthorizationProtoMsg, StoreCodeAuthorizationSDKType, ContractExecutionAuthorization, ContractExecutionAuthorizationProtoMsg, ContractExecutionAuthorizationSDKType, ContractMigrationAuthorization, ContractMigrationAuthorizationProtoMsg, ContractMigrationAuthorizationSDKType } from "../../../cosmwasm/wasm/v1/authz";
+import { TransferAuthorization, TransferAuthorizationProtoMsg, TransferAuthorizationSDKType } from "../../../ibc/applications/transfer/v1/authz";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers";
+/**
+ * GenericAuthorization gives the grantee unrestricted permissions to execute
+ * the provided method on behalf of the granter's account.
+ */
+export interface GenericAuthorization {
+ $typeUrl?: "/cosmos.authz.v1beta1.GenericAuthorization";
+ /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */
+ msg: string;
+}
+export interface GenericAuthorizationProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization";
+ value: Uint8Array;
+}
+/**
+ * GenericAuthorization gives the grantee unrestricted permissions to execute
+ * the provided method on behalf of the granter's account.
+ */
+export interface GenericAuthorizationAmino {
+ /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */
+ msg?: string;
+}
+export interface GenericAuthorizationAminoMsg {
+ type: "cosmos-sdk/GenericAuthorization";
+ value: GenericAuthorizationAmino;
+}
+/**
+ * GenericAuthorization gives the grantee unrestricted permissions to execute
+ * the provided method on behalf of the granter's account.
+ */
+export interface GenericAuthorizationSDKType {
+ $typeUrl?: "/cosmos.authz.v1beta1.GenericAuthorization";
+ msg: string;
+}
+/**
+ * Grant gives permissions to execute
+ * the provide method with expiration time.
+ */
+export interface Grant {
+ authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | StoreCodeAuthorization | ContractExecutionAuthorization | ContractMigrationAuthorization | TransferAuthorization | Any | undefined;
+ /**
+ * time when the grant will expire and will be pruned. If null, then the grant
+ * doesn't have a time expiration (other conditions in `authorization`
+ * may apply to invalidate the grant)
+ */
+ expiration?: Date;
+}
+export interface GrantProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.Grant";
+ value: Uint8Array;
+}
+export type GrantEncoded = Omit & {
+ authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | StoreCodeAuthorizationProtoMsg | ContractExecutionAuthorizationProtoMsg | ContractMigrationAuthorizationProtoMsg | TransferAuthorizationProtoMsg | AnyProtoMsg | undefined;
+};
+/**
+ * Grant gives permissions to execute
+ * the provide method with expiration time.
+ */
+export interface GrantAmino {
+ authorization?: AnyAmino;
+ /**
+ * time when the grant will expire and will be pruned. If null, then the grant
+ * doesn't have a time expiration (other conditions in `authorization`
+ * may apply to invalidate the grant)
+ */
+ expiration?: string;
+}
+export interface GrantAminoMsg {
+ type: "cosmos-sdk/Grant";
+ value: GrantAmino;
+}
+/**
+ * Grant gives permissions to execute
+ * the provide method with expiration time.
+ */
+export interface GrantSDKType {
+ authorization?: GenericAuthorizationSDKType | SendAuthorizationSDKType | StakeAuthorizationSDKType | StoreCodeAuthorizationSDKType | ContractExecutionAuthorizationSDKType | ContractMigrationAuthorizationSDKType | TransferAuthorizationSDKType | AnySDKType | undefined;
+ expiration?: Date;
+}
+/**
+ * GrantAuthorization extends a grant with both the addresses of the grantee and granter.
+ * It is used in genesis.proto and query.proto
+ */
+export interface GrantAuthorization {
+ granter: string;
+ grantee: string;
+ authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | StoreCodeAuthorization | ContractExecutionAuthorization | ContractMigrationAuthorization | TransferAuthorization | Any | undefined;
+ expiration?: Date;
+}
+export interface GrantAuthorizationProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization";
+ value: Uint8Array;
+}
+export type GrantAuthorizationEncoded = Omit & {
+ authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | StoreCodeAuthorizationProtoMsg | ContractExecutionAuthorizationProtoMsg | ContractMigrationAuthorizationProtoMsg | TransferAuthorizationProtoMsg | AnyProtoMsg | undefined;
+};
+/**
+ * GrantAuthorization extends a grant with both the addresses of the grantee and granter.
+ * It is used in genesis.proto and query.proto
+ */
+export interface GrantAuthorizationAmino {
+ granter?: string;
+ grantee?: string;
+ authorization?: AnyAmino;
+ expiration?: string;
+}
+export interface GrantAuthorizationAminoMsg {
+ type: "cosmos-sdk/GrantAuthorization";
+ value: GrantAuthorizationAmino;
+}
+/**
+ * GrantAuthorization extends a grant with both the addresses of the grantee and granter.
+ * It is used in genesis.proto and query.proto
+ */
+export interface GrantAuthorizationSDKType {
+ granter: string;
+ grantee: string;
+ authorization?: GenericAuthorizationSDKType | SendAuthorizationSDKType | StakeAuthorizationSDKType | StoreCodeAuthorizationSDKType | ContractExecutionAuthorizationSDKType | ContractMigrationAuthorizationSDKType | TransferAuthorizationSDKType | AnySDKType | undefined;
+ expiration?: Date;
+}
+/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */
+export interface GrantQueueItem {
+ /** msg_type_urls contains the list of TypeURL of a sdk.Msg. */
+ msgTypeUrls: string[];
+}
+export interface GrantQueueItemProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem";
+ value: Uint8Array;
+}
+/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */
+export interface GrantQueueItemAmino {
+ /** msg_type_urls contains the list of TypeURL of a sdk.Msg. */
+ msg_type_urls?: string[];
+}
+export interface GrantQueueItemAminoMsg {
+ type: "cosmos-sdk/GrantQueueItem";
+ value: GrantQueueItemAmino;
+}
+/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */
+export interface GrantQueueItemSDKType {
+ msg_type_urls: string[];
+}
+function createBaseGenericAuthorization(): GenericAuthorization {
+ return {
+ $typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization",
+ msg: ""
+ };
+}
+export const GenericAuthorization = {
+ typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization",
+ aminoType: "cosmos-sdk/GenericAuthorization",
+ encode(message: GenericAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.msg !== "") {
+ writer.uint32(10).string(message.msg);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GenericAuthorization {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGenericAuthorization();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ 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 ?? "";
+ return message;
+ },
+ fromAmino(object: GenericAuthorizationAmino): GenericAuthorization {
+ const message = createBaseGenericAuthorization();
+ if (object.msg !== undefined && object.msg !== null) {
+ message.msg = object.msg;
+ }
+ return message;
+ },
+ toAmino(message: GenericAuthorization): GenericAuthorizationAmino {
+ const obj: any = {};
+ obj.msg = message.msg === "" ? undefined : message.msg;
+ return obj;
+ },
+ fromAminoMsg(object: GenericAuthorizationAminoMsg): GenericAuthorization {
+ return GenericAuthorization.fromAmino(object.value);
+ },
+ toAminoMsg(message: GenericAuthorization): GenericAuthorizationAminoMsg {
+ return {
+ type: "cosmos-sdk/GenericAuthorization",
+ value: GenericAuthorization.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GenericAuthorizationProtoMsg): GenericAuthorization {
+ return GenericAuthorization.decode(message.value);
+ },
+ toProto(message: GenericAuthorization): Uint8Array {
+ return GenericAuthorization.encode(message).finish();
+ },
+ toProtoMsg(message: GenericAuthorization): GenericAuthorizationProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization",
+ value: GenericAuthorization.encode(message).finish()
+ };
+ }
+};
+function createBaseGrant(): Grant {
+ return {
+ authorization: undefined,
+ expiration: undefined
+ };
+}
+export const Grant = {
+ typeUrl: "/cosmos.authz.v1beta1.Grant",
+ aminoType: "cosmos-sdk/Grant",
+ encode(message: Grant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.authorization !== undefined) {
+ Any.encode((message.authorization as Any), writer.uint32(10).fork()).ldelim();
+ }
+ if (message.expiration !== undefined) {
+ Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Grant {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGrant();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.authorization = (Cosmos_authzv1beta1Authorization_InterfaceDecoder(reader) as Any);
+ break;
+ case 2:
+ message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Grant {
+ const message = createBaseGrant();
+ message.authorization = object.authorization !== undefined && object.authorization !== null ? Any.fromPartial(object.authorization) : undefined;
+ message.expiration = object.expiration ?? undefined;
+ return message;
+ },
+ fromAmino(object: GrantAmino): Grant {
+ const message = createBaseGrant();
+ if (object.authorization !== undefined && object.authorization !== null) {
+ message.authorization = Cosmos_authzv1beta1Authorization_FromAmino(object.authorization);
+ }
+ if (object.expiration !== undefined && object.expiration !== null) {
+ message.expiration = fromTimestamp(Timestamp.fromAmino(object.expiration));
+ }
+ return message;
+ },
+ toAmino(message: Grant): GrantAmino {
+ const obj: any = {};
+ obj.authorization = message.authorization ? Cosmos_authzv1beta1Authorization_ToAmino((message.authorization as Any)) : undefined;
+ obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: GrantAminoMsg): Grant {
+ return Grant.fromAmino(object.value);
+ },
+ toAminoMsg(message: Grant): GrantAminoMsg {
+ return {
+ type: "cosmos-sdk/Grant",
+ value: Grant.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GrantProtoMsg): Grant {
+ return Grant.decode(message.value);
+ },
+ toProto(message: Grant): Uint8Array {
+ return Grant.encode(message).finish();
+ },
+ toProtoMsg(message: Grant): GrantProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.Grant",
+ value: Grant.encode(message).finish()
+ };
+ }
+};
+function createBaseGrantAuthorization(): GrantAuthorization {
+ return {
+ granter: "",
+ grantee: "",
+ authorization: undefined,
+ expiration: undefined
+ };
+}
+export const GrantAuthorization = {
+ typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization",
+ aminoType: "cosmos-sdk/GrantAuthorization",
+ encode(message: GrantAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(18).string(message.grantee);
+ }
+ if (message.authorization !== undefined) {
+ Any.encode((message.authorization as Any), writer.uint32(26).fork()).ldelim();
+ }
+ if (message.expiration !== undefined) {
+ Timestamp.encode(toTimestamp(message.expiration), writer.uint32(34).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GrantAuthorization {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGrantAuthorization();
+ 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 = (Cosmos_authzv1beta1Authorization_InterfaceDecoder(reader) as Any);
+ 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.authorization = object.authorization !== undefined && object.authorization !== null ? Any.fromPartial(object.authorization) : undefined;
+ message.expiration = object.expiration ?? undefined;
+ return message;
+ },
+ fromAmino(object: GrantAuthorizationAmino): GrantAuthorization {
+ const message = createBaseGrantAuthorization();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.authorization !== undefined && object.authorization !== null) {
+ message.authorization = Cosmos_authzv1beta1Authorization_FromAmino(object.authorization);
+ }
+ if (object.expiration !== undefined && object.expiration !== null) {
+ message.expiration = fromTimestamp(Timestamp.fromAmino(object.expiration));
+ }
+ return message;
+ },
+ toAmino(message: GrantAuthorization): GrantAuthorizationAmino {
+ const obj: any = {};
+ obj.granter = message.granter === "" ? undefined : message.granter;
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ obj.authorization = message.authorization ? Cosmos_authzv1beta1Authorization_ToAmino((message.authorization as Any)) : undefined;
+ obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: GrantAuthorizationAminoMsg): GrantAuthorization {
+ return GrantAuthorization.fromAmino(object.value);
+ },
+ toAminoMsg(message: GrantAuthorization): GrantAuthorizationAminoMsg {
+ return {
+ type: "cosmos-sdk/GrantAuthorization",
+ value: GrantAuthorization.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GrantAuthorizationProtoMsg): GrantAuthorization {
+ return GrantAuthorization.decode(message.value);
+ },
+ toProto(message: GrantAuthorization): Uint8Array {
+ return GrantAuthorization.encode(message).finish();
+ },
+ toProtoMsg(message: GrantAuthorization): GrantAuthorizationProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization",
+ value: GrantAuthorization.encode(message).finish()
+ };
+ }
+};
+function createBaseGrantQueueItem(): GrantQueueItem {
+ return {
+ msgTypeUrls: []
+ };
+}
+export const GrantQueueItem = {
+ typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem",
+ aminoType: "cosmos-sdk/GrantQueueItem",
+ encode(message: GrantQueueItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.msgTypeUrls) {
+ writer.uint32(10).string(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GrantQueueItem {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGrantQueueItem();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): GrantQueueItem {
+ const message = createBaseGrantQueueItem();
+ message.msgTypeUrls = object.msgTypeUrls?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: GrantQueueItemAmino): GrantQueueItem {
+ const message = createBaseGrantQueueItem();
+ message.msgTypeUrls = object.msg_type_urls?.map(e => e) || [];
+ return message;
+ },
+ toAmino(message: GrantQueueItem): GrantQueueItemAmino {
+ const obj: any = {};
+ if (message.msgTypeUrls) {
+ obj.msg_type_urls = message.msgTypeUrls.map(e => e);
+ } else {
+ obj.msg_type_urls = message.msgTypeUrls;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: GrantQueueItemAminoMsg): GrantQueueItem {
+ return GrantQueueItem.fromAmino(object.value);
+ },
+ toAminoMsg(message: GrantQueueItem): GrantQueueItemAminoMsg {
+ return {
+ type: "cosmos-sdk/GrantQueueItem",
+ value: GrantQueueItem.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GrantQueueItemProtoMsg): GrantQueueItem {
+ return GrantQueueItem.decode(message.value);
+ },
+ toProto(message: GrantQueueItem): Uint8Array {
+ return GrantQueueItem.encode(message).finish();
+ },
+ toProtoMsg(message: GrantQueueItem): GrantQueueItemProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem",
+ value: GrantQueueItem.encode(message).finish()
+ };
+ }
+};
+export const Cosmos_authzv1beta1Authorization_InterfaceDecoder = (input: BinaryReader | Uint8Array): GenericAuthorization | SendAuthorization | StakeAuthorization | StoreCodeAuthorization | ContractExecutionAuthorization | ContractMigrationAuthorization | TransferAuthorization | Any => {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const data = Any.decode(reader, reader.uint32());
+ switch (data.typeUrl) {
+ case "/cosmos.authz.v1beta1.GenericAuthorization":
+ return GenericAuthorization.decode(data.value);
+ case "/cosmos.bank.v1beta1.SendAuthorization":
+ return SendAuthorization.decode(data.value);
+ case "/cosmos.staking.v1beta1.StakeAuthorization":
+ return StakeAuthorization.decode(data.value);
+ case "/cosmwasm.wasm.v1.StoreCodeAuthorization":
+ return StoreCodeAuthorization.decode(data.value);
+ case "/cosmwasm.wasm.v1.ContractExecutionAuthorization":
+ return ContractExecutionAuthorization.decode(data.value);
+ case "/cosmwasm.wasm.v1.ContractMigrationAuthorization":
+ return ContractMigrationAuthorization.decode(data.value);
+ case "/ibc.applications.transfer.v1.TransferAuthorization":
+ return TransferAuthorization.decode(data.value);
+ default:
+ return data;
+ }
+};
+export const Cosmos_authzv1beta1Authorization_FromAmino = (content: AnyAmino): Any => {
+ switch (content.type) {
+ case "cosmos-sdk/GenericAuthorization":
+ return Any.fromPartial({
+ typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization",
+ value: GenericAuthorization.encode(GenericAuthorization.fromPartial(GenericAuthorization.fromAmino(content.value))).finish()
+ });
+ case "cosmos-sdk/SendAuthorization":
+ return Any.fromPartial({
+ typeUrl: "/cosmos.bank.v1beta1.SendAuthorization",
+ value: SendAuthorization.encode(SendAuthorization.fromPartial(SendAuthorization.fromAmino(content.value))).finish()
+ });
+ case "cosmos-sdk/StakeAuthorization":
+ return Any.fromPartial({
+ typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization",
+ value: StakeAuthorization.encode(StakeAuthorization.fromPartial(StakeAuthorization.fromAmino(content.value))).finish()
+ });
+ case "wasm/StoreCodeAuthorization":
+ return Any.fromPartial({
+ typeUrl: "/cosmwasm.wasm.v1.StoreCodeAuthorization",
+ value: StoreCodeAuthorization.encode(StoreCodeAuthorization.fromPartial(StoreCodeAuthorization.fromAmino(content.value))).finish()
+ });
+ case "wasm/ContractExecutionAuthorization":
+ return Any.fromPartial({
+ typeUrl: "/cosmwasm.wasm.v1.ContractExecutionAuthorization",
+ value: ContractExecutionAuthorization.encode(ContractExecutionAuthorization.fromPartial(ContractExecutionAuthorization.fromAmino(content.value))).finish()
+ });
+ case "wasm/ContractMigrationAuthorization":
+ return Any.fromPartial({
+ typeUrl: "/cosmwasm.wasm.v1.ContractMigrationAuthorization",
+ value: ContractMigrationAuthorization.encode(ContractMigrationAuthorization.fromPartial(ContractMigrationAuthorization.fromAmino(content.value))).finish()
+ });
+ case "cosmos-sdk/TransferAuthorization":
+ return Any.fromPartial({
+ typeUrl: "/ibc.applications.transfer.v1.TransferAuthorization",
+ value: TransferAuthorization.encode(TransferAuthorization.fromPartial(TransferAuthorization.fromAmino(content.value))).finish()
+ });
+ default:
+ return Any.fromAmino(content);
+ }
+};
+export const Cosmos_authzv1beta1Authorization_ToAmino = (content: Any) => {
+ switch (content.typeUrl) {
+ case "/cosmos.authz.v1beta1.GenericAuthorization":
+ return {
+ type: "cosmos-sdk/GenericAuthorization",
+ value: GenericAuthorization.toAmino(GenericAuthorization.decode(content.value, undefined))
+ };
+ case "/cosmos.bank.v1beta1.SendAuthorization":
+ return {
+ type: "cosmos-sdk/SendAuthorization",
+ value: SendAuthorization.toAmino(SendAuthorization.decode(content.value, undefined))
+ };
+ case "/cosmos.staking.v1beta1.StakeAuthorization":
+ return {
+ type: "cosmos-sdk/StakeAuthorization",
+ value: StakeAuthorization.toAmino(StakeAuthorization.decode(content.value, undefined))
+ };
+ case "/cosmwasm.wasm.v1.StoreCodeAuthorization":
+ return {
+ type: "wasm/StoreCodeAuthorization",
+ value: StoreCodeAuthorization.toAmino(StoreCodeAuthorization.decode(content.value, undefined))
+ };
+ case "/cosmwasm.wasm.v1.ContractExecutionAuthorization":
+ return {
+ type: "wasm/ContractExecutionAuthorization",
+ value: ContractExecutionAuthorization.toAmino(ContractExecutionAuthorization.decode(content.value, undefined))
+ };
+ case "/cosmwasm.wasm.v1.ContractMigrationAuthorization":
+ return {
+ type: "wasm/ContractMigrationAuthorization",
+ value: ContractMigrationAuthorization.toAmino(ContractMigrationAuthorization.decode(content.value, undefined))
+ };
+ case "/ibc.applications.transfer.v1.TransferAuthorization":
+ return {
+ type: "cosmos-sdk/TransferAuthorization",
+ value: TransferAuthorization.toAmino(TransferAuthorization.decode(content.value, undefined))
+ };
+ default:
+ return Any.toAmino(content);
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/event.ts b/util/inj-types/cosmos/authz/v1beta1/event.ts
new file mode 100644
index 00000000..36f940f4
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/event.ts
@@ -0,0 +1,254 @@
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/** EventGrant is emitted on Msg/Grant */
+export interface EventGrant {
+ /** Msg type URL for which an autorization is granted */
+ msgTypeUrl: string;
+ /** Granter account address */
+ granter: string;
+ /** Grantee account address */
+ grantee: string;
+}
+export interface EventGrantProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.EventGrant";
+ value: Uint8Array;
+}
+/** EventGrant is emitted on Msg/Grant */
+export interface EventGrantAmino {
+ /** Msg type URL for which an autorization is granted */
+ msg_type_url?: string;
+ /** Granter account address */
+ granter?: string;
+ /** Grantee account address */
+ grantee?: string;
+}
+export interface EventGrantAminoMsg {
+ type: "cosmos-sdk/EventGrant";
+ value: EventGrantAmino;
+}
+/** EventGrant is emitted on Msg/Grant */
+export interface EventGrantSDKType {
+ msg_type_url: string;
+ granter: string;
+ grantee: string;
+}
+/** EventRevoke is emitted on Msg/Revoke */
+export interface EventRevoke {
+ /** Msg type URL for which an autorization is revoked */
+ msgTypeUrl: string;
+ /** Granter account address */
+ granter: string;
+ /** Grantee account address */
+ grantee: string;
+}
+export interface EventRevokeProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.EventRevoke";
+ value: Uint8Array;
+}
+/** EventRevoke is emitted on Msg/Revoke */
+export interface EventRevokeAmino {
+ /** Msg type URL for which an autorization is revoked */
+ msg_type_url?: string;
+ /** Granter account address */
+ granter?: string;
+ /** Grantee account address */
+ grantee?: string;
+}
+export interface EventRevokeAminoMsg {
+ type: "cosmos-sdk/EventRevoke";
+ value: EventRevokeAmino;
+}
+/** EventRevoke is emitted on Msg/Revoke */
+export interface EventRevokeSDKType {
+ msg_type_url: string;
+ granter: string;
+ grantee: string;
+}
+function createBaseEventGrant(): EventGrant {
+ return {
+ msgTypeUrl: "",
+ granter: "",
+ grantee: ""
+ };
+}
+export const EventGrant = {
+ typeUrl: "/cosmos.authz.v1beta1.EventGrant",
+ aminoType: "cosmos-sdk/EventGrant",
+ encode(message: EventGrant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.msgTypeUrl !== "") {
+ writer.uint32(18).string(message.msgTypeUrl);
+ }
+ if (message.granter !== "") {
+ writer.uint32(26).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(34).string(message.grantee);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): EventGrant {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseEventGrant();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2:
+ message.msgTypeUrl = reader.string();
+ break;
+ case 3:
+ message.granter = reader.string();
+ break;
+ case 4:
+ message.grantee = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): EventGrant {
+ const message = createBaseEventGrant();
+ message.msgTypeUrl = object.msgTypeUrl ?? "";
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ return message;
+ },
+ fromAmino(object: EventGrantAmino): EventGrant {
+ const message = createBaseEventGrant();
+ if (object.msg_type_url !== undefined && object.msg_type_url !== null) {
+ message.msgTypeUrl = object.msg_type_url;
+ }
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ return message;
+ },
+ toAmino(message: EventGrant): EventGrantAmino {
+ const obj: any = {};
+ obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl;
+ obj.granter = message.granter === "" ? undefined : message.granter;
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ return obj;
+ },
+ fromAminoMsg(object: EventGrantAminoMsg): EventGrant {
+ return EventGrant.fromAmino(object.value);
+ },
+ toAminoMsg(message: EventGrant): EventGrantAminoMsg {
+ return {
+ type: "cosmos-sdk/EventGrant",
+ value: EventGrant.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: EventGrantProtoMsg): EventGrant {
+ return EventGrant.decode(message.value);
+ },
+ toProto(message: EventGrant): Uint8Array {
+ return EventGrant.encode(message).finish();
+ },
+ toProtoMsg(message: EventGrant): EventGrantProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.EventGrant",
+ value: EventGrant.encode(message).finish()
+ };
+ }
+};
+function createBaseEventRevoke(): EventRevoke {
+ return {
+ msgTypeUrl: "",
+ granter: "",
+ grantee: ""
+ };
+}
+export const EventRevoke = {
+ typeUrl: "/cosmos.authz.v1beta1.EventRevoke",
+ aminoType: "cosmos-sdk/EventRevoke",
+ encode(message: EventRevoke, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.msgTypeUrl !== "") {
+ writer.uint32(18).string(message.msgTypeUrl);
+ }
+ if (message.granter !== "") {
+ writer.uint32(26).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(34).string(message.grantee);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): EventRevoke {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseEventRevoke();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2:
+ message.msgTypeUrl = reader.string();
+ break;
+ case 3:
+ message.granter = reader.string();
+ break;
+ case 4:
+ message.grantee = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): EventRevoke {
+ const message = createBaseEventRevoke();
+ message.msgTypeUrl = object.msgTypeUrl ?? "";
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ return message;
+ },
+ fromAmino(object: EventRevokeAmino): EventRevoke {
+ const message = createBaseEventRevoke();
+ if (object.msg_type_url !== undefined && object.msg_type_url !== null) {
+ message.msgTypeUrl = object.msg_type_url;
+ }
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ return message;
+ },
+ toAmino(message: EventRevoke): EventRevokeAmino {
+ const obj: any = {};
+ obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl;
+ obj.granter = message.granter === "" ? undefined : message.granter;
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ return obj;
+ },
+ fromAminoMsg(object: EventRevokeAminoMsg): EventRevoke {
+ return EventRevoke.fromAmino(object.value);
+ },
+ toAminoMsg(message: EventRevoke): EventRevokeAminoMsg {
+ return {
+ type: "cosmos-sdk/EventRevoke",
+ value: EventRevoke.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: EventRevokeProtoMsg): EventRevoke {
+ return EventRevoke.decode(message.value);
+ },
+ toProto(message: EventRevoke): Uint8Array {
+ return EventRevoke.encode(message).finish();
+ },
+ toProtoMsg(message: EventRevoke): EventRevokeProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.EventRevoke",
+ value: EventRevoke.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/genesis.ts b/util/inj-types/cosmos/authz/v1beta1/genesis.ts
new file mode 100644
index 00000000..7dc0fd50
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/genesis.ts
@@ -0,0 +1,95 @@
+import { GrantAuthorization, GrantAuthorizationAmino, GrantAuthorizationSDKType } from "./authz";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/** GenesisState defines the authz module's genesis state. */
+export interface GenesisState {
+ authorization: GrantAuthorization[];
+}
+export interface GenesisStateProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.GenesisState";
+ value: Uint8Array;
+}
+/** GenesisState defines the authz module's genesis state. */
+export interface GenesisStateAmino {
+ authorization: GrantAuthorizationAmino[];
+}
+export interface GenesisStateAminoMsg {
+ type: "cosmos-sdk/GenesisState";
+ value: GenesisStateAmino;
+}
+/** GenesisState defines the authz module's genesis state. */
+export interface GenesisStateSDKType {
+ authorization: GrantAuthorizationSDKType[];
+}
+function createBaseGenesisState(): GenesisState {
+ return {
+ authorization: []
+ };
+}
+export const GenesisState = {
+ typeUrl: "/cosmos.authz.v1beta1.GenesisState",
+ aminoType: "cosmos-sdk/GenesisState",
+ encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.authorization) {
+ GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GenesisState {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGenesisState();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.authorization.push(GrantAuthorization.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): GenesisState {
+ const message = createBaseGenesisState();
+ message.authorization = object.authorization?.map(e => GrantAuthorization.fromPartial(e)) || [];
+ return message;
+ },
+ fromAmino(object: GenesisStateAmino): GenesisState {
+ const message = createBaseGenesisState();
+ message.authorization = object.authorization?.map(e => GrantAuthorization.fromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: GenesisState): GenesisStateAmino {
+ const obj: any = {};
+ if (message.authorization) {
+ obj.authorization = message.authorization.map(e => e ? GrantAuthorization.toAmino(e) : undefined);
+ } else {
+ obj.authorization = message.authorization;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: GenesisStateAminoMsg): GenesisState {
+ return GenesisState.fromAmino(object.value);
+ },
+ toAminoMsg(message: GenesisState): GenesisStateAminoMsg {
+ return {
+ type: "cosmos-sdk/GenesisState",
+ value: GenesisState.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GenesisStateProtoMsg): GenesisState {
+ return GenesisState.decode(message.value);
+ },
+ toProto(message: GenesisState): Uint8Array {
+ return GenesisState.encode(message).finish();
+ },
+ toProtoMsg(message: GenesisState): GenesisStateProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.GenesisState",
+ value: GenesisState.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/query.lcd.ts b/util/inj-types/cosmos/authz/v1beta1/query.lcd.ts
new file mode 100644
index 00000000..e30a1aab
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/query.lcd.ts
@@ -0,0 +1,59 @@
+import { setPaginationParams } from "../../../helpers";
+import { LCDClient } from "@cosmology/lcd";
+import { QueryGrantsRequest, QueryGrantsResponseSDKType, QueryGranterGrantsRequest, QueryGranterGrantsResponseSDKType, QueryGranteeGrantsRequest, QueryGranteeGrantsResponseSDKType } from "./query";
+export class LCDQueryClient {
+ req: LCDClient;
+ constructor({
+ requestClient
+ }: {
+ requestClient: LCDClient;
+ }) {
+ this.req = requestClient;
+ }
+ /* Returns list of `Authorization`, granted to the grantee by the granter. */
+ grants = async (params: QueryGrantsRequest): Promise => {
+ const options: any = {
+ params: {}
+ };
+ if (typeof params?.granter !== "undefined") {
+ options.params.granter = params.granter;
+ }
+ if (typeof params?.grantee !== "undefined") {
+ options.params.grantee = params.grantee;
+ }
+ if (typeof params?.msgTypeUrl !== "undefined") {
+ options.params.msg_type_url = params.msgTypeUrl;
+ }
+ if (typeof params?.pagination !== "undefined") {
+ setPaginationParams(options, params.pagination);
+ }
+ const endpoint = `cosmos/authz/v1beta1/grants`;
+ return await this.req.get(endpoint, options);
+ };
+ /* GranterGrants returns list of `GrantAuthorization`, granted by granter.
+
+ Since: cosmos-sdk 0.46 */
+ granterGrants = async (params: QueryGranterGrantsRequest): Promise => {
+ const options: any = {
+ params: {}
+ };
+ if (typeof params?.pagination !== "undefined") {
+ setPaginationParams(options, params.pagination);
+ }
+ const endpoint = `cosmos/authz/v1beta1/grants/granter/${params.granter}`;
+ return await this.req.get(endpoint, options);
+ };
+ /* GranteeGrants returns a list of `GrantAuthorization` by grantee.
+
+ Since: cosmos-sdk 0.46 */
+ granteeGrants = async (params: QueryGranteeGrantsRequest): Promise => {
+ const options: any = {
+ params: {}
+ };
+ if (typeof params?.pagination !== "undefined") {
+ setPaginationParams(options, params.pagination);
+ }
+ const endpoint = `cosmos/authz/v1beta1/grants/grantee/${params.grantee}`;
+ return await this.req.get(endpoint, options);
+ };
+}
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/query.rpc.Query.ts b/util/inj-types/cosmos/authz/v1beta1/query.rpc.Query.ts
new file mode 100644
index 00000000..0802d455
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/query.rpc.Query.ts
@@ -0,0 +1,64 @@
+import { Rpc } from "../../../helpers";
+import { BinaryReader } from "../../../binary";
+import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate";
+import { QueryGrantsRequest, QueryGrantsResponse, QueryGranterGrantsRequest, QueryGranterGrantsResponse, QueryGranteeGrantsRequest, QueryGranteeGrantsResponse } from "./query";
+/** Query defines the gRPC querier service. */
+export interface Query {
+ /** Returns list of `Authorization`, granted to the grantee by the granter. */
+ grants(request: QueryGrantsRequest): Promise;
+ /**
+ * GranterGrants returns list of `GrantAuthorization`, granted by granter.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ granterGrants(request: QueryGranterGrantsRequest): Promise;
+ /**
+ * GranteeGrants returns a list of `GrantAuthorization` by grantee.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ granteeGrants(request: QueryGranteeGrantsRequest): Promise;
+}
+export class QueryClientImpl implements Query {
+ private readonly rpc: Rpc;
+ constructor(rpc: Rpc) {
+ this.rpc = rpc;
+ }
+ /* Returns list of `Authorization`, granted to the grantee by the granter. */
+ grants = async (request: QueryGrantsRequest): Promise => {
+ const data = QueryGrantsRequest.encode(request).finish();
+ const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "Grants", data);
+ return promise.then(data => QueryGrantsResponse.decode(new BinaryReader(data)));
+ };
+ /* GranterGrants returns list of `GrantAuthorization`, granted by granter.
+
+ Since: cosmos-sdk 0.46 */
+ granterGrants = async (request: QueryGranterGrantsRequest): Promise => {
+ const data = QueryGranterGrantsRequest.encode(request).finish();
+ const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranterGrants", data);
+ return promise.then(data => QueryGranterGrantsResponse.decode(new BinaryReader(data)));
+ };
+ /* GranteeGrants returns a list of `GrantAuthorization` by grantee.
+
+ Since: cosmos-sdk 0.46 */
+ granteeGrants = async (request: QueryGranteeGrantsRequest): Promise => {
+ const data = QueryGranteeGrantsRequest.encode(request).finish();
+ const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranteeGrants", data);
+ return promise.then(data => QueryGranteeGrantsResponse.decode(new BinaryReader(data)));
+ };
+}
+export const createRpcQueryExtension = (base: QueryClient) => {
+ const rpc = createProtobufRpcClient(base);
+ const queryService = new QueryClientImpl(rpc);
+ return {
+ grants(request: QueryGrantsRequest): Promise {
+ return queryService.grants(request);
+ },
+ granterGrants(request: QueryGranterGrantsRequest): Promise {
+ return queryService.granterGrants(request);
+ },
+ granteeGrants(request: QueryGranteeGrantsRequest): Promise {
+ return queryService.granteeGrants(request);
+ }
+ };
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/query.ts b/util/inj-types/cosmos/authz/v1beta1/query.ts
new file mode 100644
index 00000000..a374c61b
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/query.ts
@@ -0,0 +1,690 @@
+import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination";
+import { Grant, GrantAmino, GrantSDKType, GrantAuthorization, GrantAuthorizationAmino, GrantAuthorizationSDKType } from "./authz";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */
+export interface QueryGrantsRequest {
+ granter?: string;
+ grantee?: string;
+ /** Optional, msg_type_url, when set, will query only grants matching given msg type. */
+ msgTypeUrl?: string;
+ /** pagination defines an pagination for the request. */
+ pagination?: PageRequest;
+}
+export interface QueryGrantsRequestProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest";
+ value: Uint8Array;
+}
+/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */
+export interface QueryGrantsRequestAmino {
+ granter?: string;
+ grantee?: string;
+ /** Optional, msg_type_url, when set, will query only grants matching given msg type. */
+ msg_type_url?: string;
+ /** pagination defines an pagination for the request. */
+ pagination?: PageRequestAmino;
+}
+export interface QueryGrantsRequestAminoMsg {
+ type: "cosmos-sdk/QueryGrantsRequest";
+ value: QueryGrantsRequestAmino;
+}
+/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */
+export interface QueryGrantsRequestSDKType {
+ granter?: string;
+ grantee?: string;
+ msg_type_url?: string;
+ pagination?: PageRequestSDKType;
+}
+/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */
+export interface QueryGrantsResponse {
+ /** authorizations is a list of grants granted for grantee by granter. */
+ grants: Grant[];
+ /** pagination defines an pagination for the response. */
+ pagination?: PageResponse;
+}
+export interface QueryGrantsResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse";
+ value: Uint8Array;
+}
+/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */
+export interface QueryGrantsResponseAmino {
+ /** authorizations is a list of grants granted for grantee by granter. */
+ grants?: GrantAmino[];
+ /** pagination defines an pagination for the response. */
+ pagination?: PageResponseAmino;
+}
+export interface QueryGrantsResponseAminoMsg {
+ type: "cosmos-sdk/QueryGrantsResponse";
+ value: QueryGrantsResponseAmino;
+}
+/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */
+export interface QueryGrantsResponseSDKType {
+ grants: GrantSDKType[];
+ pagination?: PageResponseSDKType;
+}
+/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */
+export interface QueryGranterGrantsRequest {
+ granter: string;
+ /** pagination defines an pagination for the request. */
+ pagination?: PageRequest;
+}
+export interface QueryGranterGrantsRequestProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest";
+ value: Uint8Array;
+}
+/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */
+export interface QueryGranterGrantsRequestAmino {
+ granter?: string;
+ /** pagination defines an pagination for the request. */
+ pagination?: PageRequestAmino;
+}
+export interface QueryGranterGrantsRequestAminoMsg {
+ type: "cosmos-sdk/QueryGranterGrantsRequest";
+ value: QueryGranterGrantsRequestAmino;
+}
+/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */
+export interface QueryGranterGrantsRequestSDKType {
+ granter: string;
+ pagination?: PageRequestSDKType;
+}
+/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */
+export interface QueryGranterGrantsResponse {
+ /** grants is a list of grants granted by the granter. */
+ grants: GrantAuthorization[];
+ /** pagination defines an pagination for the response. */
+ pagination?: PageResponse;
+}
+export interface QueryGranterGrantsResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse";
+ value: Uint8Array;
+}
+/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */
+export interface QueryGranterGrantsResponseAmino {
+ /** grants is a list of grants granted by the granter. */
+ grants?: GrantAuthorizationAmino[];
+ /** pagination defines an pagination for the response. */
+ pagination?: PageResponseAmino;
+}
+export interface QueryGranterGrantsResponseAminoMsg {
+ type: "cosmos-sdk/QueryGranterGrantsResponse";
+ value: QueryGranterGrantsResponseAmino;
+}
+/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */
+export interface QueryGranterGrantsResponseSDKType {
+ grants: GrantAuthorizationSDKType[];
+ pagination?: PageResponseSDKType;
+}
+/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */
+export interface QueryGranteeGrantsRequest {
+ grantee: string;
+ /** pagination defines an pagination for the request. */
+ pagination?: PageRequest;
+}
+export interface QueryGranteeGrantsRequestProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest";
+ value: Uint8Array;
+}
+/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */
+export interface QueryGranteeGrantsRequestAmino {
+ grantee?: string;
+ /** pagination defines an pagination for the request. */
+ pagination?: PageRequestAmino;
+}
+export interface QueryGranteeGrantsRequestAminoMsg {
+ type: "cosmos-sdk/QueryGranteeGrantsRequest";
+ value: QueryGranteeGrantsRequestAmino;
+}
+/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */
+export interface QueryGranteeGrantsRequestSDKType {
+ grantee: string;
+ pagination?: PageRequestSDKType;
+}
+/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */
+export interface QueryGranteeGrantsResponse {
+ /** grants is a list of grants granted to the grantee. */
+ grants: GrantAuthorization[];
+ /** pagination defines an pagination for the response. */
+ pagination?: PageResponse;
+}
+export interface QueryGranteeGrantsResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse";
+ value: Uint8Array;
+}
+/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */
+export interface QueryGranteeGrantsResponseAmino {
+ /** grants is a list of grants granted to the grantee. */
+ grants?: GrantAuthorizationAmino[];
+ /** pagination defines an pagination for the response. */
+ pagination?: PageResponseAmino;
+}
+export interface QueryGranteeGrantsResponseAminoMsg {
+ type: "cosmos-sdk/QueryGranteeGrantsResponse";
+ value: QueryGranteeGrantsResponseAmino;
+}
+/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */
+export interface QueryGranteeGrantsResponseSDKType {
+ grants: GrantAuthorizationSDKType[];
+ pagination?: PageResponseSDKType;
+}
+function createBaseQueryGrantsRequest(): QueryGrantsRequest {
+ return {
+ granter: "",
+ grantee: "",
+ msgTypeUrl: "",
+ pagination: undefined
+ };
+}
+export const QueryGrantsRequest = {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest",
+ aminoType: "cosmos-sdk/QueryGrantsRequest",
+ encode(message: QueryGrantsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(18).string(message.grantee);
+ }
+ if (message.msgTypeUrl !== "") {
+ writer.uint32(26).string(message.msgTypeUrl);
+ }
+ if (message.pagination !== undefined) {
+ PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryGrantsRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryGrantsRequest();
+ 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;
+ case 4:
+ message.pagination = PageRequest.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryGrantsRequest {
+ const message = createBaseQueryGrantsRequest();
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ message.msgTypeUrl = object.msgTypeUrl ?? "";
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryGrantsRequestAmino): QueryGrantsRequest {
+ const message = createBaseQueryGrantsRequest();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.msg_type_url !== undefined && object.msg_type_url !== null) {
+ message.msgTypeUrl = object.msg_type_url;
+ }
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageRequest.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryGrantsRequest): QueryGrantsRequestAmino {
+ 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.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryGrantsRequestAminoMsg): QueryGrantsRequest {
+ return QueryGrantsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryGrantsRequest): QueryGrantsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryGrantsRequest",
+ value: QueryGrantsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryGrantsRequestProtoMsg): QueryGrantsRequest {
+ return QueryGrantsRequest.decode(message.value);
+ },
+ toProto(message: QueryGrantsRequest): Uint8Array {
+ return QueryGrantsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryGrantsRequest): QueryGrantsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest",
+ value: QueryGrantsRequest.encode(message).finish()
+ };
+ }
+};
+function createBaseQueryGrantsResponse(): QueryGrantsResponse {
+ return {
+ grants: [],
+ pagination: undefined
+ };
+}
+export const QueryGrantsResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse",
+ aminoType: "cosmos-sdk/QueryGrantsResponse",
+ encode(message: QueryGrantsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.grants) {
+ Grant.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): QueryGrantsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryGrantsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.grants.push(Grant.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): QueryGrantsResponse {
+ const message = createBaseQueryGrantsResponse();
+ message.grants = object.grants?.map(e => Grant.fromPartial(e)) || [];
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryGrantsResponseAmino): QueryGrantsResponse {
+ const message = createBaseQueryGrantsResponse();
+ message.grants = object.grants?.map(e => Grant.fromAmino(e)) || [];
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageResponse.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryGrantsResponse): QueryGrantsResponseAmino {
+ const obj: any = {};
+ if (message.grants) {
+ obj.grants = message.grants.map(e => e ? Grant.toAmino(e) : undefined);
+ } else {
+ obj.grants = message.grants;
+ }
+ obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryGrantsResponseAminoMsg): QueryGrantsResponse {
+ return QueryGrantsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryGrantsResponse): QueryGrantsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryGrantsResponse",
+ value: QueryGrantsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryGrantsResponseProtoMsg): QueryGrantsResponse {
+ return QueryGrantsResponse.decode(message.value);
+ },
+ toProto(message: QueryGrantsResponse): Uint8Array {
+ return QueryGrantsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryGrantsResponse): QueryGrantsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse",
+ value: QueryGrantsResponse.encode(message).finish()
+ };
+ }
+};
+function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest {
+ return {
+ granter: "",
+ pagination: undefined
+ };
+}
+export const QueryGranterGrantsRequest = {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest",
+ aminoType: "cosmos-sdk/QueryGranterGrantsRequest",
+ encode(message: QueryGranterGrantsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.pagination !== undefined) {
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryGranterGrantsRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryGranterGrantsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.granter = reader.string();
+ break;
+ case 2:
+ message.pagination = PageRequest.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryGranterGrantsRequest {
+ const message = createBaseQueryGranterGrantsRequest();
+ message.granter = object.granter ?? "";
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryGranterGrantsRequestAmino): QueryGranterGrantsRequest {
+ const message = createBaseQueryGranterGrantsRequest();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageRequest.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryGranterGrantsRequest): QueryGranterGrantsRequestAmino {
+ const obj: any = {};
+ obj.granter = message.granter === "" ? undefined : message.granter;
+ obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryGranterGrantsRequestAminoMsg): QueryGranterGrantsRequest {
+ return QueryGranterGrantsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryGranterGrantsRequest): QueryGranterGrantsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryGranterGrantsRequest",
+ value: QueryGranterGrantsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryGranterGrantsRequestProtoMsg): QueryGranterGrantsRequest {
+ return QueryGranterGrantsRequest.decode(message.value);
+ },
+ toProto(message: QueryGranterGrantsRequest): Uint8Array {
+ return QueryGranterGrantsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryGranterGrantsRequest): QueryGranterGrantsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest",
+ value: QueryGranterGrantsRequest.encode(message).finish()
+ };
+ }
+};
+function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse {
+ return {
+ grants: [],
+ pagination: undefined
+ };
+}
+export const QueryGranterGrantsResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse",
+ aminoType: "cosmos-sdk/QueryGranterGrantsResponse",
+ encode(message: QueryGranterGrantsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.grants) {
+ GrantAuthorization.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): QueryGranterGrantsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryGranterGrantsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.grants.push(GrantAuthorization.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): QueryGranterGrantsResponse {
+ const message = createBaseQueryGranterGrantsResponse();
+ message.grants = object.grants?.map(e => GrantAuthorization.fromPartial(e)) || [];
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryGranterGrantsResponseAmino): QueryGranterGrantsResponse {
+ const message = createBaseQueryGranterGrantsResponse();
+ message.grants = object.grants?.map(e => GrantAuthorization.fromAmino(e)) || [];
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageResponse.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryGranterGrantsResponse): QueryGranterGrantsResponseAmino {
+ const obj: any = {};
+ if (message.grants) {
+ obj.grants = message.grants.map(e => e ? GrantAuthorization.toAmino(e) : undefined);
+ } else {
+ obj.grants = message.grants;
+ }
+ obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryGranterGrantsResponseAminoMsg): QueryGranterGrantsResponse {
+ return QueryGranterGrantsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryGranterGrantsResponse): QueryGranterGrantsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryGranterGrantsResponse",
+ value: QueryGranterGrantsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryGranterGrantsResponseProtoMsg): QueryGranterGrantsResponse {
+ return QueryGranterGrantsResponse.decode(message.value);
+ },
+ toProto(message: QueryGranterGrantsResponse): Uint8Array {
+ return QueryGranterGrantsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryGranterGrantsResponse): QueryGranterGrantsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse",
+ value: QueryGranterGrantsResponse.encode(message).finish()
+ };
+ }
+};
+function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest {
+ return {
+ grantee: "",
+ pagination: undefined
+ };
+}
+export const QueryGranteeGrantsRequest = {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest",
+ aminoType: "cosmos-sdk/QueryGranteeGrantsRequest",
+ encode(message: QueryGranteeGrantsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.grantee !== "") {
+ writer.uint32(10).string(message.grantee);
+ }
+ if (message.pagination !== undefined) {
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryGranteeGrantsRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryGranteeGrantsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.grantee = reader.string();
+ break;
+ case 2:
+ message.pagination = PageRequest.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryGranteeGrantsRequest {
+ const message = createBaseQueryGranteeGrantsRequest();
+ message.grantee = object.grantee ?? "";
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryGranteeGrantsRequestAmino): QueryGranteeGrantsRequest {
+ const message = createBaseQueryGranteeGrantsRequest();
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageRequest.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryGranteeGrantsRequest): QueryGranteeGrantsRequestAmino {
+ const obj: any = {};
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryGranteeGrantsRequestAminoMsg): QueryGranteeGrantsRequest {
+ return QueryGranteeGrantsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryGranteeGrantsRequest): QueryGranteeGrantsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryGranteeGrantsRequest",
+ value: QueryGranteeGrantsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryGranteeGrantsRequestProtoMsg): QueryGranteeGrantsRequest {
+ return QueryGranteeGrantsRequest.decode(message.value);
+ },
+ toProto(message: QueryGranteeGrantsRequest): Uint8Array {
+ return QueryGranteeGrantsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryGranteeGrantsRequest): QueryGranteeGrantsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest",
+ value: QueryGranteeGrantsRequest.encode(message).finish()
+ };
+ }
+};
+function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse {
+ return {
+ grants: [],
+ pagination: undefined
+ };
+}
+export const QueryGranteeGrantsResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse",
+ aminoType: "cosmos-sdk/QueryGranteeGrantsResponse",
+ encode(message: QueryGranteeGrantsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.grants) {
+ GrantAuthorization.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): QueryGranteeGrantsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryGranteeGrantsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.grants.push(GrantAuthorization.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): QueryGranteeGrantsResponse {
+ const message = createBaseQueryGranteeGrantsResponse();
+ message.grants = object.grants?.map(e => GrantAuthorization.fromPartial(e)) || [];
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryGranteeGrantsResponseAmino): QueryGranteeGrantsResponse {
+ const message = createBaseQueryGranteeGrantsResponse();
+ message.grants = object.grants?.map(e => GrantAuthorization.fromAmino(e)) || [];
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageResponse.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryGranteeGrantsResponse): QueryGranteeGrantsResponseAmino {
+ const obj: any = {};
+ if (message.grants) {
+ obj.grants = message.grants.map(e => e ? GrantAuthorization.toAmino(e) : undefined);
+ } else {
+ obj.grants = message.grants;
+ }
+ obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryGranteeGrantsResponseAminoMsg): QueryGranteeGrantsResponse {
+ return QueryGranteeGrantsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryGranteeGrantsResponse): QueryGranteeGrantsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryGranteeGrantsResponse",
+ value: QueryGranteeGrantsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryGranteeGrantsResponseProtoMsg): QueryGranteeGrantsResponse {
+ return QueryGranteeGrantsResponse.decode(message.value);
+ },
+ toProto(message: QueryGranteeGrantsResponse): Uint8Array {
+ return QueryGranteeGrantsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryGranteeGrantsResponse): QueryGranteeGrantsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse",
+ value: QueryGranteeGrantsResponse.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/tx.rpc.msg.ts b/util/inj-types/cosmos/authz/v1beta1/tx.rpc.msg.ts
new file mode 100644
index 00000000..dcdcc524
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/tx.rpc.msg.ts
@@ -0,0 +1,62 @@
+import { Rpc } from "../../../helpers";
+import { BinaryReader } from "../../../binary";
+import { MsgGrant, MsgGrantResponse, MsgExec, MsgExecResponse, MsgRevoke, MsgRevokeResponse, MsgExecCompat, MsgExecCompatResponse } from "./tx";
+/** Msg defines the authz Msg service. */
+export interface Msg {
+ /**
+ * Grant grants the provided authorization to the grantee on the granter's
+ * account with the provided expiration time. If there is already a grant
+ * for the given (granter, grantee, Authorization) triple, then the grant
+ * will be overwritten.
+ */
+ grant(request: MsgGrant): 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(request: MsgExec): Promise;
+ /**
+ * Revoke revokes any authorization corresponding to the provided method name on the
+ * granter's account that has been granted to the grantee.
+ */
+ revoke(request: MsgRevoke): Promise;
+ /** ExecCompat has same functionality as Exec but accepts array of json-encoded message string instead of []*Any */
+ execCompat(request: MsgExecCompat): Promise;
+}
+export class MsgClientImpl implements Msg {
+ private readonly rpc: Rpc;
+ constructor(rpc: Rpc) {
+ this.rpc = rpc;
+ }
+ /* Grant grants the provided authorization to the grantee on the granter's
+ account with the provided expiration time. If there is already a grant
+ for the given (granter, grantee, Authorization) triple, then the grant
+ will be overwritten. */
+ grant = async (request: MsgGrant): Promise => {
+ const data = MsgGrant.encode(request).finish();
+ const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Grant", data);
+ return promise.then(data => MsgGrantResponse.decode(new BinaryReader(data)));
+ };
+ /* 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 (request: MsgExec): Promise => {
+ const data = MsgExec.encode(request).finish();
+ const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Exec", data);
+ return promise.then(data => MsgExecResponse.decode(new BinaryReader(data)));
+ };
+ /* Revoke revokes any authorization corresponding to the provided method name on the
+ granter's account that has been granted to the grantee. */
+ revoke = async (request: MsgRevoke): Promise => {
+ const data = MsgRevoke.encode(request).finish();
+ const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Revoke", data);
+ return promise.then(data => MsgRevokeResponse.decode(new BinaryReader(data)));
+ };
+ /* ExecCompat has same functionality as Exec but accepts array of json-encoded message string instead of []*Any */
+ execCompat = async (request: MsgExecCompat): Promise => {
+ const data = MsgExecCompat.encode(request).finish();
+ const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "ExecCompat", data);
+ return promise.then(data => MsgExecCompatResponse.decode(new BinaryReader(data)));
+ };
+}
\ No newline at end of file
diff --git a/util/inj-types/cosmos/authz/v1beta1/tx.ts b/util/inj-types/cosmos/authz/v1beta1/tx.ts
new file mode 100644
index 00000000..df39b6d2
--- /dev/null
+++ b/util/inj-types/cosmos/authz/v1beta1/tx.ts
@@ -0,0 +1,855 @@
+import { Grant, GrantAmino, GrantSDKType } from "./authz";
+import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
+/**
+ * MsgGrant is a request type for Grant method. It declares authorization to the grantee
+ * on behalf of the granter with the provided expiration time.
+ */
+export interface MsgGrant {
+ granter: string;
+ grantee: string;
+ grant: Grant;
+}
+export interface MsgGrantProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrant";
+ value: Uint8Array;
+}
+/**
+ * MsgGrant is a request type for Grant method. It declares authorization to the grantee
+ * on behalf of the granter with the provided expiration time.
+ */
+export interface MsgGrantAmino {
+ granter?: string;
+ grantee?: string;
+ grant: GrantAmino;
+}
+export interface MsgGrantAminoMsg {
+ type: "cosmos-sdk/MsgGrant";
+ value: MsgGrantAmino;
+}
+/**
+ * MsgGrant is a request type for Grant method. It declares authorization to the grantee
+ * on behalf of the granter with the provided expiration time.
+ */
+export interface MsgGrantSDKType {
+ granter: string;
+ grantee: string;
+ grant: GrantSDKType;
+}
+/** MsgExecResponse defines the Msg/MsgExecResponse response type. */
+export interface MsgExecResponse {
+ results: Uint8Array[];
+}
+export interface MsgExecResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse";
+ value: Uint8Array;
+}
+/** MsgExecResponse defines the Msg/MsgExecResponse response type. */
+export interface MsgExecResponseAmino {
+ results?: string[];
+}
+export interface MsgExecResponseAminoMsg {
+ type: "cosmos-sdk/MsgExecResponse";
+ value: MsgExecResponseAmino;
+}
+/** MsgExecResponse defines the Msg/MsgExecResponse response type. */
+export interface MsgExecResponseSDKType {
+ results: Uint8Array[];
+}
+/**
+ * MsgExec attempts to execute the provided messages using
+ * authorizations granted to the grantee. Each message should have only
+ * one signer corresponding to the granter of the authorization.
+ */
+export interface MsgExec {
+ grantee: string;
+ /**
+ * Execute Msg.
+ * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
+ * triple and validate it.
+ */
+ msgs: (Any)[] | Any[];
+}
+export interface MsgExecProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExec";
+ value: Uint8Array;
+}
+export type MsgExecEncoded = Omit & {
+ /**
+ * Execute Msg.
+ * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
+ * triple and validate it.
+ */
+ msgs: (AnyProtoMsg)[];
+};
+/**
+ * MsgExec attempts to execute the provided messages using
+ * authorizations granted to the grantee. Each message should have only
+ * one signer corresponding to the granter of the authorization.
+ */
+export interface MsgExecAmino {
+ grantee?: string;
+ /**
+ * Execute Msg.
+ * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
+ * triple and validate it.
+ */
+ msgs?: AnyAmino[];
+}
+export interface MsgExecAminoMsg {
+ type: "cosmos-sdk/MsgExec";
+ value: MsgExecAmino;
+}
+/**
+ * MsgExec attempts to execute the provided messages using
+ * authorizations granted to the grantee. Each message should have only
+ * one signer corresponding to the granter of the authorization.
+ */
+export interface MsgExecSDKType {
+ grantee: string;
+ msgs: (AnySDKType)[];
+}
+/** MsgGrantResponse defines the Msg/MsgGrant response type. */
+export interface MsgGrantResponse {}
+export interface MsgGrantResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse";
+ value: Uint8Array;
+}
+/** MsgGrantResponse defines the Msg/MsgGrant response type. */
+export interface MsgGrantResponseAmino {}
+export interface MsgGrantResponseAminoMsg {
+ type: "cosmos-sdk/MsgGrantResponse";
+ value: MsgGrantResponseAmino;
+}
+/** MsgGrantResponse defines the Msg/MsgGrant response type. */
+export interface MsgGrantResponseSDKType {}
+/**
+ * MsgRevoke revokes any authorization with the provided sdk.Msg type on the
+ * granter's account with that has been granted to the grantee.
+ */
+export interface MsgRevoke {
+ granter: string;
+ grantee: string;
+ msgTypeUrl: string;
+}
+export interface MsgRevokeProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke";
+ value: Uint8Array;
+}
+/**
+ * MsgRevoke revokes any authorization with the provided sdk.Msg type on the
+ * granter's account with that has been granted to the grantee.
+ */
+export interface MsgRevokeAmino {
+ granter?: string;
+ grantee?: string;
+ msg_type_url?: string;
+}
+export interface MsgRevokeAminoMsg {
+ type: "cosmos-sdk/MsgRevoke";
+ value: MsgRevokeAmino;
+}
+/**
+ * MsgRevoke revokes any authorization with the provided sdk.Msg type on the
+ * granter's account with that has been granted to the grantee.
+ */
+export interface MsgRevokeSDKType {
+ granter: string;
+ grantee: string;
+ msg_type_url: string;
+}
+/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */
+export interface MsgRevokeResponse {}
+export interface MsgRevokeResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse";
+ value: Uint8Array;
+}
+/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */
+export interface MsgRevokeResponseAmino {}
+export interface MsgRevokeResponseAminoMsg {
+ type: "cosmos-sdk/MsgRevokeResponse";
+ value: MsgRevokeResponseAmino;
+}
+/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */
+export interface MsgRevokeResponseSDKType {}
+/** MsgExecCompatResponse defines the Msg/MsgExecCompatResponse response type. */
+export interface MsgExecCompatResponse {
+ results: Uint8Array[];
+}
+export interface MsgExecCompatResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecCompatResponse";
+ value: Uint8Array;
+}
+/** MsgExecCompatResponse defines the Msg/MsgExecCompatResponse response type. */
+export interface MsgExecCompatResponseAmino {
+ results?: string[];
+}
+export interface MsgExecCompatResponseAminoMsg {
+ type: "cosmos-sdk/MsgExecCompatResponse";
+ value: MsgExecCompatResponseAmino;
+}
+/** MsgExecCompatResponse defines the Msg/MsgExecCompatResponse response type. */
+export interface MsgExecCompatResponseSDKType {
+ results: Uint8Array[];
+}
+/**
+ * MsgExecCompat supports legacy amino codec for frontend metamask signing
+ * Functions are same as MsgExec, but input for msgs is array of strings
+ */
+export interface MsgExecCompat {
+ grantee: string;
+ msgs: string[];
+}
+export interface MsgExecCompatProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecCompat";
+ value: Uint8Array;
+}
+/**
+ * MsgExecCompat supports legacy amino codec for frontend metamask signing
+ * Functions are same as MsgExec, but input for msgs is array of strings
+ */
+export interface MsgExecCompatAmino {
+ grantee?: string;
+ msgs?: string[];
+}
+export interface MsgExecCompatAminoMsg {
+ type: "cosmos-sdk/MsgExec";
+ value: MsgExecCompatAmino;
+}
+/**
+ * MsgExecCompat supports legacy amino codec for frontend metamask signing
+ * Functions are same as MsgExec, but input for msgs is array of strings
+ */
+export interface MsgExecCompatSDKType {
+ grantee: string;
+ msgs: string[];
+}
+function createBaseMsgGrant(): MsgGrant {
+ return {
+ granter: "",
+ grantee: "",
+ grant: Grant.fromPartial({})
+ };
+}
+export const MsgGrant = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
+ aminoType: "cosmos-sdk/MsgGrant",
+ encode(message: MsgGrant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(18).string(message.grantee);
+ }
+ if (message.grant !== undefined) {
+ Grant.encode(message.grant, writer.uint32(26).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgGrant {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgGrant();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgGrant {
+ const message = createBaseMsgGrant();
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ message.grant = object.grant !== undefined && object.grant !== null ? Grant.fromPartial(object.grant) : undefined;
+ return message;
+ },
+ fromAmino(object: MsgGrantAmino): MsgGrant {
+ const message = createBaseMsgGrant();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.grant !== undefined && object.grant !== null) {
+ message.grant = Grant.fromAmino(object.grant);
+ }
+ return message;
+ },
+ toAmino(message: MsgGrant): MsgGrantAmino {
+ const obj: any = {};
+ 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;
+ },
+ fromAminoMsg(object: MsgGrantAminoMsg): MsgGrant {
+ return MsgGrant.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgGrant): MsgGrantAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgGrant",
+ value: MsgGrant.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgGrantProtoMsg): MsgGrant {
+ return MsgGrant.decode(message.value);
+ },
+ toProto(message: MsgGrant): Uint8Array {
+ return MsgGrant.encode(message).finish();
+ },
+ toProtoMsg(message: MsgGrant): MsgGrantProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
+ value: MsgGrant.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgExecResponse(): MsgExecResponse {
+ return {
+ results: []
+ };
+}
+export const MsgExecResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse",
+ aminoType: "cosmos-sdk/MsgExecResponse",
+ encode(message: MsgExecResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.results) {
+ writer.uint32(10).bytes(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgExecResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgExecResponse();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgExecResponse {
+ const message = createBaseMsgExecResponse();
+ message.results = object.results?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: MsgExecResponseAmino): MsgExecResponse {
+ const message = createBaseMsgExecResponse();
+ message.results = object.results?.map(e => bytesFromBase64(e)) || [];
+ return message;
+ },
+ toAmino(message: MsgExecResponse): MsgExecResponseAmino {
+ const obj: any = {};
+ if (message.results) {
+ obj.results = message.results.map(e => base64FromBytes(e));
+ } else {
+ obj.results = message.results;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: MsgExecResponseAminoMsg): MsgExecResponse {
+ return MsgExecResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgExecResponse): MsgExecResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgExecResponse",
+ value: MsgExecResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgExecResponseProtoMsg): MsgExecResponse {
+ return MsgExecResponse.decode(message.value);
+ },
+ toProto(message: MsgExecResponse): Uint8Array {
+ return MsgExecResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgExecResponse): MsgExecResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse",
+ value: MsgExecResponse.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgExec(): MsgExec {
+ return {
+ grantee: "",
+ msgs: []
+ };
+}
+export const MsgExec = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExec",
+ aminoType: "cosmos-sdk/MsgExec",
+ encode(message: MsgExec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.grantee !== "") {
+ writer.uint32(10).string(message.grantee);
+ }
+ for (const v of message.msgs) {
+ Any.encode((v! as Any), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgExec {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgExec();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.grantee = reader.string();
+ break;
+ case 2:
+ message.msgs.push((Any.decode(reader, reader.uint32()) as Any));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgExec {
+ const message = createBaseMsgExec();
+ message.grantee = object.grantee ?? "";
+ message.msgs = object.msgs?.map(e => Any.fromPartial(e)) || [];
+ return message;
+ },
+ fromAmino(object: MsgExecAmino): MsgExec {
+ const message = createBaseMsgExec();
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ message.msgs = object.msgs?.map(e => Cosmos_basev1beta1Msg_FromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: MsgExec): MsgExecAmino {
+ const obj: any = {};
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ if (message.msgs) {
+ obj.msgs = message.msgs.map(e => e ? Cosmos_basev1beta1Msg_ToAmino((e as Any)) : undefined);
+ } else {
+ obj.msgs = message.msgs;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: MsgExecAminoMsg): MsgExec {
+ return MsgExec.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgExec): MsgExecAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgExec",
+ value: MsgExec.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgExecProtoMsg): MsgExec {
+ return MsgExec.decode(message.value);
+ },
+ toProto(message: MsgExec): Uint8Array {
+ return MsgExec.encode(message).finish();
+ },
+ toProtoMsg(message: MsgExec): MsgExecProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExec",
+ value: MsgExec.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgGrantResponse(): MsgGrantResponse {
+ return {};
+}
+export const MsgGrantResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse",
+ aminoType: "cosmos-sdk/MsgGrantResponse",
+ encode(_: MsgGrantResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgGrantResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgGrantResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): MsgGrantResponse {
+ const message = createBaseMsgGrantResponse();
+ return message;
+ },
+ fromAmino(_: MsgGrantResponseAmino): MsgGrantResponse {
+ const message = createBaseMsgGrantResponse();
+ return message;
+ },
+ toAmino(_: MsgGrantResponse): MsgGrantResponseAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: MsgGrantResponseAminoMsg): MsgGrantResponse {
+ return MsgGrantResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgGrantResponse): MsgGrantResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgGrantResponse",
+ value: MsgGrantResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgGrantResponseProtoMsg): MsgGrantResponse {
+ return MsgGrantResponse.decode(message.value);
+ },
+ toProto(message: MsgGrantResponse): Uint8Array {
+ return MsgGrantResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgGrantResponse): MsgGrantResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse",
+ value: MsgGrantResponse.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgRevoke(): MsgRevoke {
+ return {
+ granter: "",
+ grantee: "",
+ msgTypeUrl: ""
+ };
+}
+export const MsgRevoke = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
+ aminoType: "cosmos-sdk/MsgRevoke",
+ encode(message: MsgRevoke, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(18).string(message.grantee);
+ }
+ if (message.msgTypeUrl !== "") {
+ writer.uint32(26).string(message.msgTypeUrl);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgRevoke {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgRevoke();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgRevoke {
+ const message = createBaseMsgRevoke();
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ message.msgTypeUrl = object.msgTypeUrl ?? "";
+ return message;
+ },
+ fromAmino(object: MsgRevokeAmino): MsgRevoke {
+ const message = createBaseMsgRevoke();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.msg_type_url !== undefined && object.msg_type_url !== null) {
+ message.msgTypeUrl = object.msg_type_url;
+ }
+ return message;
+ },
+ 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;
+ return obj;
+ },
+ fromAminoMsg(object: MsgRevokeAminoMsg): MsgRevoke {
+ return MsgRevoke.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgRevoke): MsgRevokeAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgRevoke",
+ value: MsgRevoke.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgRevokeProtoMsg): MsgRevoke {
+ return MsgRevoke.decode(message.value);
+ },
+ toProto(message: MsgRevoke): Uint8Array {
+ return MsgRevoke.encode(message).finish();
+ },
+ toProtoMsg(message: MsgRevoke): MsgRevokeProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
+ value: MsgRevoke.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgRevokeResponse(): MsgRevokeResponse {
+ return {};
+}
+export const MsgRevokeResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse",
+ aminoType: "cosmos-sdk/MsgRevokeResponse",
+ encode(_: MsgRevokeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgRevokeResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgRevokeResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): MsgRevokeResponse {
+ const message = createBaseMsgRevokeResponse();
+ return message;
+ },
+ fromAmino(_: MsgRevokeResponseAmino): MsgRevokeResponse {
+ const message = createBaseMsgRevokeResponse();
+ return message;
+ },
+ toAmino(_: MsgRevokeResponse): MsgRevokeResponseAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: MsgRevokeResponseAminoMsg): MsgRevokeResponse {
+ return MsgRevokeResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgRevokeResponse): MsgRevokeResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgRevokeResponse",
+ value: MsgRevokeResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgRevokeResponseProtoMsg): MsgRevokeResponse {
+ return MsgRevokeResponse.decode(message.value);
+ },
+ toProto(message: MsgRevokeResponse): Uint8Array {
+ return MsgRevokeResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgRevokeResponse): MsgRevokeResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse",
+ value: MsgRevokeResponse.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgExecCompatResponse(): MsgExecCompatResponse {
+ return {
+ results: []
+ };
+}
+export const MsgExecCompatResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecCompatResponse",
+ aminoType: "cosmos-sdk/MsgExecCompatResponse",
+ encode(message: MsgExecCompatResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.results) {
+ writer.uint32(10).bytes(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgExecCompatResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgExecCompatResponse();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgExecCompatResponse {
+ const message = createBaseMsgExecCompatResponse();
+ message.results = object.results?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: MsgExecCompatResponseAmino): MsgExecCompatResponse {
+ const message = createBaseMsgExecCompatResponse();
+ message.results = object.results?.map(e => bytesFromBase64(e)) || [];
+ return message;
+ },
+ toAmino(message: MsgExecCompatResponse): MsgExecCompatResponseAmino {
+ const obj: any = {};
+ if (message.results) {
+ obj.results = message.results.map(e => base64FromBytes(e));
+ } else {
+ obj.results = message.results;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: MsgExecCompatResponseAminoMsg): MsgExecCompatResponse {
+ return MsgExecCompatResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgExecCompatResponse): MsgExecCompatResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgExecCompatResponse",
+ value: MsgExecCompatResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgExecCompatResponseProtoMsg): MsgExecCompatResponse {
+ return MsgExecCompatResponse.decode(message.value);
+ },
+ toProto(message: MsgExecCompatResponse): Uint8Array {
+ return MsgExecCompatResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgExecCompatResponse): MsgExecCompatResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecCompatResponse",
+ value: MsgExecCompatResponse.encode(message).finish()
+ };
+ }
+};
+function createBaseMsgExecCompat(): MsgExecCompat {
+ return {
+ grantee: "",
+ msgs: []
+ };
+}
+export const MsgExecCompat = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecCompat",
+ aminoType: "cosmos-sdk/MsgExec",
+ encode(message: MsgExecCompat, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.grantee !== "") {
+ writer.uint32(10).string(message.grantee);
+ }
+ for (const v of message.msgs) {
+ writer.uint32(18).string(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgExecCompat {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgExecCompat();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.grantee = reader.string();
+ break;
+ case 2:
+ message.msgs.push(reader.string());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgExecCompat {
+ const message = createBaseMsgExecCompat();
+ message.grantee = object.grantee ?? "";
+ message.msgs = object.msgs?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: MsgExecCompatAmino): MsgExecCompat {
+ const message = createBaseMsgExecCompat();
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ message.msgs = object.msgs?.map(e => e) || [];
+ return message;
+ },
+ toAmino(message: MsgExecCompat): MsgExecCompatAmino {
+ const obj: any = {};
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ if (message.msgs) {
+ obj.msgs = message.msgs.map(e => e);
+ } else {
+ obj.msgs = message.msgs;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: MsgExecCompatAminoMsg): MsgExecCompat {
+ return MsgExecCompat.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgExecCompat): MsgExecCompatAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgExec",
+ value: MsgExecCompat.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgExecCompatProtoMsg): MsgExecCompat {
+ return MsgExecCompat.decode(message.value);
+ },
+ toProto(message: MsgExecCompat): Uint8Array {
+ return MsgExecCompat.encode(message).finish();
+ },
+ toProtoMsg(message: MsgExecCompat): MsgExecCompatProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecCompat",
+ value: MsgExecCompat.encode(message).finish()
+ };
+ }
+};
+export const Cosmos_basev1beta1Msg_InterfaceDecoder = (input: BinaryReader | Uint8Array): Any => {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const data = Any.decode(reader, reader.uint32());
+ switch (data.typeUrl) {
+ default:
+ return data;
+ }
+};
+export const Cosmos_basev1beta1Msg_FromAmino = (content: AnyAmino): Any => {
+ return Any.fromAmino(content);
+};
+export const Cosmos_basev1beta1Msg_ToAmino = (content: Any) => {
+ return Any.toAmino(content);
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/bank/module/v1/module.ts b/util/inj-types/cosmos/bank/module/v1/module.ts
new file mode 100644
index 00000000..c0771a6e
--- /dev/null
+++ b/util/inj-types/cosmos/bank/module/v1/module.ts
@@ -0,0 +1,121 @@
+import { BinaryReader, BinaryWriter } from "../../../../binary";
+import { DeepPartial } from "../../../../helpers";
+/** Module is the config object of the bank module. */
+export interface Module {
+ /**
+ * blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds.
+ * If left empty it defaults to the list of account names supplied in the auth module configuration as
+ * module_account_permissions
+ */
+ blockedModuleAccountsOverride: string[];
+ /** authority defines the custom module authority. If not set, defaults to the governance module. */
+ authority: string;
+}
+export interface ModuleProtoMsg {
+ typeUrl: "/cosmos.bank.module.v1.Module";
+ value: Uint8Array;
+}
+/** Module is the config object of the bank module. */
+export interface ModuleAmino {
+ /**
+ * blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds.
+ * If left empty it defaults to the list of account names supplied in the auth module configuration as
+ * module_account_permissions
+ */
+ blocked_module_accounts_override?: string[];
+ /** authority defines the custom module authority. If not set, defaults to the governance module. */
+ authority?: string;
+}
+export interface ModuleAminoMsg {
+ type: "cosmos-sdk/Module";
+ value: ModuleAmino;
+}
+/** Module is the config object of the bank module. */
+export interface ModuleSDKType {
+ blocked_module_accounts_override: string[];
+ authority: string;
+}
+function createBaseModule(): Module {
+ return {
+ blockedModuleAccountsOverride: [],
+ authority: ""
+ };
+}
+export const Module = {
+ typeUrl: "/cosmos.bank.module.v1.Module",
+ aminoType: "cosmos-sdk/Module",
+ encode(message: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.blockedModuleAccountsOverride) {
+ writer.uint32(10).string(v!);
+ }
+ if (message.authority !== "") {
+ writer.uint32(18).string(message.authority);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Module {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModule();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.blockedModuleAccountsOverride.push(reader.string());
+ break;
+ case 2:
+ message.authority = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Module {
+ const message = createBaseModule();
+ message.blockedModuleAccountsOverride = object.blockedModuleAccountsOverride?.map(e => e) || [];
+ message.authority = object.authority ?? "";
+ return message;
+ },
+ fromAmino(object: ModuleAmino): Module {
+ const message = createBaseModule();
+ message.blockedModuleAccountsOverride = object.blocked_module_accounts_override?.map(e => e) || [];
+ if (object.authority !== undefined && object.authority !== null) {
+ message.authority = object.authority;
+ }
+ return message;
+ },
+ toAmino(message: Module): ModuleAmino {
+ const obj: any = {};
+ if (message.blockedModuleAccountsOverride) {
+ obj.blocked_module_accounts_override = message.blockedModuleAccountsOverride.map(e => e);
+ } else {
+ obj.blocked_module_accounts_override = message.blockedModuleAccountsOverride;
+ }
+ obj.authority = message.authority === "" ? undefined : message.authority;
+ return obj;
+ },
+ fromAminoMsg(object: ModuleAminoMsg): Module {
+ return Module.fromAmino(object.value);
+ },
+ toAminoMsg(message: Module): ModuleAminoMsg {
+ return {
+ type: "cosmos-sdk/Module",
+ value: Module.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleProtoMsg): Module {
+ return Module.decode(message.value);
+ },
+ toProto(message: Module): Uint8Array {
+ return Module.encode(message).finish();
+ },
+ toProtoMsg(message: Module): ModuleProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.module.v1.Module",
+ value: Module.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/bank/v1beta1/authz.ts b/util/inj-types/cosmos/bank/v1beta1/authz.ts
new file mode 100644
index 00000000..56195b77
--- /dev/null
+++ b/util/inj-types/cosmos/bank/v1beta1/authz.ts
@@ -0,0 +1,142 @@
+import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/**
+ * SendAuthorization allows the grantee to spend up to spend_limit coins from
+ * the granter's account.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface SendAuthorization {
+ $typeUrl?: "/cosmos.bank.v1beta1.SendAuthorization";
+ spendLimit: Coin[];
+ /**
+ * allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the
+ * granter. If omitted, any recipient is allowed.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+ allowList: string[];
+}
+export interface SendAuthorizationProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.SendAuthorization";
+ value: Uint8Array;
+}
+/**
+ * SendAuthorization allows the grantee to spend up to spend_limit coins from
+ * the granter's account.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface SendAuthorizationAmino {
+ spend_limit: CoinAmino[];
+ /**
+ * allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the
+ * granter. If omitted, any recipient is allowed.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+ allow_list?: string[];
+}
+export interface SendAuthorizationAminoMsg {
+ type: "cosmos-sdk/SendAuthorization";
+ value: SendAuthorizationAmino;
+}
+/**
+ * SendAuthorization allows the grantee to spend up to spend_limit coins from
+ * the granter's account.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface SendAuthorizationSDKType {
+ $typeUrl?: "/cosmos.bank.v1beta1.SendAuthorization";
+ spend_limit: CoinSDKType[];
+ allow_list: string[];
+}
+function createBaseSendAuthorization(): SendAuthorization {
+ return {
+ $typeUrl: "/cosmos.bank.v1beta1.SendAuthorization",
+ spendLimit: [],
+ allowList: []
+ };
+}
+export const SendAuthorization = {
+ typeUrl: "/cosmos.bank.v1beta1.SendAuthorization",
+ aminoType: "cosmos-sdk/SendAuthorization",
+ encode(message: SendAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.spendLimit) {
+ Coin.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ for (const v of message.allowList) {
+ writer.uint32(18).string(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): SendAuthorization {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseSendAuthorization();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.spendLimit.push(Coin.decode(reader, reader.uint32()));
+ break;
+ case 2:
+ message.allowList.push(reader.string());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): SendAuthorization {
+ const message = createBaseSendAuthorization();
+ message.spendLimit = object.spendLimit?.map(e => Coin.fromPartial(e)) || [];
+ message.allowList = object.allowList?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: SendAuthorizationAmino): SendAuthorization {
+ const message = createBaseSendAuthorization();
+ message.spendLimit = object.spend_limit?.map(e => Coin.fromAmino(e)) || [];
+ message.allowList = object.allow_list?.map(e => e) || [];
+ return message;
+ },
+ toAmino(message: SendAuthorization): SendAuthorizationAmino {
+ const obj: any = {};
+ if (message.spendLimit) {
+ obj.spend_limit = message.spendLimit.map(e => e ? Coin.toAmino(e) : undefined);
+ } else {
+ obj.spend_limit = message.spendLimit;
+ }
+ if (message.allowList) {
+ obj.allow_list = message.allowList.map(e => e);
+ } else {
+ obj.allow_list = message.allowList;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: SendAuthorizationAminoMsg): SendAuthorization {
+ return SendAuthorization.fromAmino(object.value);
+ },
+ toAminoMsg(message: SendAuthorization): SendAuthorizationAminoMsg {
+ return {
+ type: "cosmos-sdk/SendAuthorization",
+ value: SendAuthorization.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: SendAuthorizationProtoMsg): SendAuthorization {
+ return SendAuthorization.decode(message.value);
+ },
+ toProto(message: SendAuthorization): Uint8Array {
+ return SendAuthorization.encode(message).finish();
+ },
+ toProtoMsg(message: SendAuthorization): SendAuthorizationProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.v1beta1.SendAuthorization",
+ value: SendAuthorization.encode(message).finish()
+ };
+ }
+};
\ No newline at end of file
diff --git a/util/inj-types/cosmos/bank/v1beta1/bank.ts b/util/inj-types/cosmos/bank/v1beta1/bank.ts
new file mode 100644
index 00000000..fe50fa8e
--- /dev/null
+++ b/util/inj-types/cosmos/bank/v1beta1/bank.ts
@@ -0,0 +1,976 @@
+import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+/** Params defines the parameters for the bank module. */
+export interface Params {
+ /**
+ * Deprecated: Use of SendEnabled in params is deprecated.
+ * For genesis, use the newly added send_enabled field in the genesis object.
+ * Storage, lookup, and manipulation of this information is now in the keeper.
+ *
+ * As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.
+ */
+ /** @deprecated */
+ sendEnabled: SendEnabled[];
+ defaultSendEnabled: boolean;
+}
+export interface ParamsProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Params";
+ value: Uint8Array;
+}
+/** Params defines the parameters for the bank module. */
+export interface ParamsAmino {
+ /**
+ * Deprecated: Use of SendEnabled in params is deprecated.
+ * For genesis, use the newly added send_enabled field in the genesis object.
+ * Storage, lookup, and manipulation of this information is now in the keeper.
+ *
+ * As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.
+ */
+ /** @deprecated */
+ send_enabled?: SendEnabledAmino[];
+ default_send_enabled?: boolean;
+}
+export interface ParamsAminoMsg {
+ type: "cosmos-sdk/x/bank/Params";
+ value: ParamsAmino;
+}
+/** Params defines the parameters for the bank module. */
+export interface ParamsSDKType {
+ /** @deprecated */
+ send_enabled: SendEnabledSDKType[];
+ default_send_enabled: boolean;
+}
+/**
+ * SendEnabled maps coin denom to a send_enabled status (whether a denom is
+ * sendable).
+ */
+export interface SendEnabled {
+ denom: string;
+ enabled: boolean;
+}
+export interface SendEnabledProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.SendEnabled";
+ value: Uint8Array;
+}
+/**
+ * SendEnabled maps coin denom to a send_enabled status (whether a denom is
+ * sendable).
+ */
+export interface SendEnabledAmino {
+ denom?: string;
+ enabled?: boolean;
+}
+export interface SendEnabledAminoMsg {
+ type: "cosmos-sdk/SendEnabled";
+ value: SendEnabledAmino;
+}
+/**
+ * SendEnabled maps coin denom to a send_enabled status (whether a denom is
+ * sendable).
+ */
+export interface SendEnabledSDKType {
+ denom: string;
+ enabled: boolean;
+}
+/** Input models transaction input. */
+export interface Input {
+ address: string;
+ coins: Coin[];
+}
+export interface InputProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Input";
+ value: Uint8Array;
+}
+/** Input models transaction input. */
+export interface InputAmino {
+ address?: string;
+ coins: CoinAmino[];
+}
+export interface InputAminoMsg {
+ type: "cosmos-sdk/Input";
+ value: InputAmino;
+}
+/** Input models transaction input. */
+export interface InputSDKType {
+ address: string;
+ coins: CoinSDKType[];
+}
+/** Output models transaction outputs. */
+export interface Output {
+ address: string;
+ coins: Coin[];
+}
+export interface OutputProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Output";
+ value: Uint8Array;
+}
+/** Output models transaction outputs. */
+export interface OutputAmino {
+ address?: string;
+ coins: CoinAmino[];
+}
+export interface OutputAminoMsg {
+ type: "cosmos-sdk/Output";
+ value: OutputAmino;
+}
+/** Output models transaction outputs. */
+export interface OutputSDKType {
+ address: string;
+ coins: CoinSDKType[];
+}
+/**
+ * Supply represents a struct that passively keeps track of the total supply
+ * amounts in the network.
+ * This message is deprecated now that supply is indexed by denom.
+ */
+/** @deprecated */
+export interface Supply {
+ $typeUrl?: "/cosmos.bank.v1beta1.Supply";
+ total: Coin[];
+}
+export interface SupplyProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Supply";
+ value: Uint8Array;
+}
+/**
+ * Supply represents a struct that passively keeps track of the total supply
+ * amounts in the network.
+ * This message is deprecated now that supply is indexed by denom.
+ */
+/** @deprecated */
+export interface SupplyAmino {
+ total: CoinAmino[];
+}
+export interface SupplyAminoMsg {
+ type: "cosmos-sdk/Supply";
+ value: SupplyAmino;
+}
+/**
+ * Supply represents a struct that passively keeps track of the total supply
+ * amounts in the network.
+ * This message is deprecated now that supply is indexed by denom.
+ */
+/** @deprecated */
+export interface SupplySDKType {
+ $typeUrl?: "/cosmos.bank.v1beta1.Supply";
+ total: CoinSDKType[];
+}
+/**
+ * DenomUnit represents a struct that describes a given
+ * denomination unit of the basic token.
+ */
+export interface DenomUnit {
+ /** denom represents the string name of the given denom unit (e.g uatom). */
+ denom: string;
+ /**
+ * exponent represents power of 10 exponent that one must
+ * raise the base_denom to in order to equal the given DenomUnit's denom
+ * 1 denom = 10^exponent base_denom
+ * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
+ * exponent = 6, thus: 1 atom = 10^6 uatom).
+ */
+ exponent: number;
+ /** aliases is a list of string aliases for the given denom */
+ aliases: string[];
+}
+export interface DenomUnitProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.DenomUnit";
+ value: Uint8Array;
+}
+/**
+ * DenomUnit represents a struct that describes a given
+ * denomination unit of the basic token.
+ */
+export interface DenomUnitAmino {
+ /** denom represents the string name of the given denom unit (e.g uatom). */
+ denom?: string;
+ /**
+ * exponent represents power of 10 exponent that one must
+ * raise the base_denom to in order to equal the given DenomUnit's denom
+ * 1 denom = 10^exponent base_denom
+ * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
+ * exponent = 6, thus: 1 atom = 10^6 uatom).
+ */
+ exponent?: number;
+ /** aliases is a list of string aliases for the given denom */
+ aliases?: string[];
+}
+export interface DenomUnitAminoMsg {
+ type: "cosmos-sdk/DenomUnit";
+ value: DenomUnitAmino;
+}
+/**
+ * DenomUnit represents a struct that describes a given
+ * denomination unit of the basic token.
+ */
+export interface DenomUnitSDKType {
+ denom: string;
+ exponent: number;
+ aliases: string[];
+}
+/**
+ * Metadata represents a struct that describes
+ * a basic token.
+ */
+export interface Metadata {
+ description: string;
+ /** denom_units represents the list of DenomUnit's for a given coin */
+ denomUnits: DenomUnit[];
+ /** base represents the base denom (should be the DenomUnit with exponent = 0). */
+ base: string;
+ /**
+ * display indicates the suggested denom that should be
+ * displayed in clients.
+ */
+ display: string;
+ /**
+ * name defines the name of the token (eg: Cosmos Atom)
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ name: string;
+ /**
+ * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
+ * be the same as the display.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ symbol: string;
+ /**
+ * URI to a document (on or off-chain) that contains additional information. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uri: string;
+ /**
+ * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
+ * the document didn't change. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uriHash: string;
+}
+export interface MetadataProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Metadata";
+ value: Uint8Array;
+}
+/**
+ * Metadata represents a struct that describes
+ * a basic token.
+ */
+export interface MetadataAmino {
+ description?: string;
+ /** denom_units represents the list of DenomUnit's for a given coin */
+ denom_units?: DenomUnitAmino[];
+ /** base represents the base denom (should be the DenomUnit with exponent = 0). */
+ base?: string;
+ /**
+ * display indicates the suggested denom that should be
+ * displayed in clients.
+ */
+ display?: string;
+ /**
+ * name defines the name of the token (eg: Cosmos Atom)
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ name?: string;
+ /**
+ * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
+ * be the same as the display.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ symbol?: string;
+ /**
+ * URI to a document (on or off-chain) that contains additional information. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uri?: string;
+ /**
+ * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
+ * the document didn't change. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uri_hash?: string;
+}
+export interface MetadataAminoMsg {
+ type: "cosmos-sdk/Metadata";
+ value: MetadataAmino;
+}
+/**
+ * Metadata represents a struct that describes
+ * a basic token.
+ */
+export interface MetadataSDKType {
+ description: string;
+ denom_units: DenomUnitSDKType[];
+ base: string;
+ display: string;
+ name: string;
+ symbol: string;
+ uri: string;
+ uri_hash: string;
+}
+function createBaseParams(): Params {
+ return {
+ sendEnabled: [],
+ defaultSendEnabled: false
+ };
+}
+export const Params = {
+ typeUrl: "/cosmos.bank.v1beta1.Params",
+ aminoType: "cosmos-sdk/x/bank/Params",
+ encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.sendEnabled) {
+ SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.defaultSendEnabled === true) {
+ writer.uint32(16).bool(message.defaultSendEnabled);
+ }
+ 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.sendEnabled.push(SendEnabled.decode(reader, reader.uint32()));
+ break;
+ case 2:
+ message.defaultSendEnabled = reader.bool();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Params {
+ const message = createBaseParams();
+ message.sendEnabled = object.sendEnabled?.map(e => SendEnabled.fromPartial(e)) || [];
+ message.defaultSendEnabled = object.defaultSendEnabled ?? false;
+ return message;
+ },
+ fromAmino(object: ParamsAmino): Params {
+ const message = createBaseParams();
+ message.sendEnabled = object.send_enabled?.map(e => SendEnabled.fromAmino(e)) || [];
+ if (object.default_send_enabled !== undefined && object.default_send_enabled !== null) {
+ message.defaultSendEnabled = object.default_send_enabled;
+ }
+ return message;
+ },
+ toAmino(message: Params): ParamsAmino {
+ const obj: any = {};
+ if (message.sendEnabled) {
+ obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e) : undefined);
+ } else {
+ obj.send_enabled = message.sendEnabled;
+ }
+ obj.default_send_enabled = message.defaultSendEnabled === false ? undefined : message.defaultSendEnabled;
+ return obj;
+ },
+ fromAminoMsg(object: ParamsAminoMsg): Params {
+ return Params.fromAmino(object.value);
+ },
+ toAminoMsg(message: Params): ParamsAminoMsg {
+ return {
+ type: "cosmos-sdk/x/bank/Params",
+ value: Params.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ParamsProtoMsg): Params {
+ return Params.decode(message.value);
+ },
+ toProto(message: Params): Uint8Array {
+ return Params.encode(message).finish();
+ },
+ toProtoMsg(message: Params): ParamsProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.v1beta1.Params",
+ value: Params.encode(message).finish()
+ };
+ }
+};
+function createBaseSendEnabled(): SendEnabled {
+ return {
+ denom: "",
+ enabled: false
+ };
+}
+export const SendEnabled = {
+ typeUrl: "/cosmos.bank.v1beta1.SendEnabled",
+ aminoType: "cosmos-sdk/SendEnabled",
+ encode(message: SendEnabled, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.denom !== "") {
+ writer.uint32(10).string(message.denom);
+ }
+ if (message.enabled === true) {
+ writer.uint32(16).bool(message.enabled);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): SendEnabled {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseSendEnabled();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): SendEnabled {
+ const message = createBaseSendEnabled();
+ message.denom = object.denom ?? "";
+ message.enabled = object.enabled ?? false;
+ return message;
+ },
+ fromAmino(object: SendEnabledAmino): SendEnabled {
+ const message = createBaseSendEnabled();
+ if (object.denom !== undefined && object.denom !== null) {
+ message.denom = object.denom;
+ }
+ if (object.enabled !== undefined && object.enabled !== null) {
+ message.enabled = object.enabled;
+ }
+ return message;
+ },
+ toAmino(message: SendEnabled): SendEnabledAmino {
+ const obj: any = {};
+ obj.denom = message.denom === "" ? undefined : message.denom;
+ obj.enabled = message.enabled === false ? undefined : message.enabled;
+ return obj;
+ },
+ fromAminoMsg(object: SendEnabledAminoMsg): SendEnabled {
+ return SendEnabled.fromAmino(object.value);
+ },
+ toAminoMsg(message: SendEnabled): SendEnabledAminoMsg {
+ return {
+ type: "cosmos-sdk/SendEnabled",
+ value: SendEnabled.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: SendEnabledProtoMsg): SendEnabled {
+ return SendEnabled.decode(message.value);
+ },
+ toProto(message: SendEnabled): Uint8Array {
+ return SendEnabled.encode(message).finish();
+ },
+ toProtoMsg(message: SendEnabled): SendEnabledProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.v1beta1.SendEnabled",
+ value: SendEnabled.encode(message).finish()
+ };
+ }
+};
+function createBaseInput(): Input {
+ return {
+ address: "",
+ coins: []
+ };
+}
+export const Input = {
+ typeUrl: "/cosmos.bank.v1beta1.Input",
+ aminoType: "cosmos-sdk/Input",
+ encode(message: Input, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.address !== "") {
+ writer.uint32(10).string(message.address);
+ }
+ for (const v of message.coins) {
+ Coin.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Input {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseInput();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Input {
+ const message = createBaseInput();
+ message.address = object.address ?? "";
+ message.coins = object.coins?.map(e => Coin.fromPartial(e)) || [];
+ return message;
+ },
+ fromAmino(object: InputAmino): Input {
+ const message = createBaseInput();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ message.coins = object.coins?.map(e => Coin.fromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: Input): InputAmino {
+ const obj: any = {};
+ obj.address = message.address === "" ? undefined : message.address;
+ if (message.coins) {
+ obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined);
+ } else {
+ obj.coins = message.coins;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: InputAminoMsg): Input {
+ return Input.fromAmino(object.value);
+ },
+ toAminoMsg(message: Input): InputAminoMsg {
+ return {
+ type: "cosmos-sdk/Input",
+ value: Input.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: InputProtoMsg): Input {
+ return Input.decode(message.value);
+ },
+ toProto(message: Input): Uint8Array {
+ return Input.encode(message).finish();
+ },
+ toProtoMsg(message: Input): InputProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.v1beta1.Input",
+ value: Input.encode(message).finish()
+ };
+ }
+};
+function createBaseOutput(): Output {
+ return {
+ address: "",
+ coins: []
+ };
+}
+export const Output = {
+ typeUrl: "/cosmos.bank.v1beta1.Output",
+ aminoType: "cosmos-sdk/Output",
+ encode(message: Output, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.address !== "") {
+ writer.uint32(10).string(message.address);
+ }
+ for (const v of message.coins) {
+ Coin.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Output {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseOutput();
+ 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;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial