From d8e1bc0b54e5ba6885655c05ab71d3e36163c4a3 Mon Sep 17 00:00:00 2001 From: Zetazzz Date: Thu, 2 Jan 2025 12:03:20 +0800 Subject: [PATCH 1/2] upgrade and regen --- libs/injective-react/src/binary.ts | 2 +- .../src/cosmos/auth/v1beta1/auth.ts | 27 +- .../src/cosmos/auth/v1beta1/query.rpc.func.ts | 30 +- .../src/cosmos/auth/v1beta1/query.ts | 107 ++- .../src/cosmos/authz/v1beta1/authz.ts | 23 +- .../src/cosmos/authz/v1beta1/tx.rpc.func.ts | 11 +- .../src/cosmos/authz/v1beta1/tx.ts | 34 +- .../src/cosmos/bank/v1beta1/bank.ts | 39 +- .../src/cosmos/bank/v1beta1/query.rpc.func.ts | 39 +- .../src/cosmos/bank/v1beta1/query.ts | 145 ++-- .../src/cosmos/bank/v1beta1/tx.rpc.func.ts | 14 +- .../src/cosmos/bank/v1beta1/tx.ts | 44 +- .../src/cosmos/base/abci/v1beta1/abci.ts | 59 +- .../cosmos/base/query/v1beta1/pagination.ts | 13 +- .../src/cosmos/base/v1beta1/coin.ts | 23 +- .../src/cosmos/crypto/ed25519/keys.ts | 13 +- .../crypto/multisig/v1beta1/multisig.ts | 13 +- .../src/cosmos/crypto/secp256k1/keys.ts | 13 +- .../src/cosmos/crypto/secp256r1/keys.ts | 13 +- .../distribution/v1beta1/distribution.ts | 65 +- .../distribution/v1beta1/tx.rpc.func.ts | 23 +- .../src/cosmos/distribution/v1beta1/tx.ts | 73 +- .../cosmos/feegrant/v1beta1/tx.rpc.func.ts | 11 +- .../src/cosmos/feegrant/v1beta1/tx.ts | 34 +- libs/injective-react/src/cosmos/gov/v1/gov.ts | 49 +- .../src/cosmos/gov/v1/tx.rpc.func.ts | 23 +- libs/injective-react/src/cosmos/gov/v1/tx.ts | 124 ++- .../src/cosmos/gov/v1beta1/gov.ts | 102 ++- .../src/cosmos/gov/v1beta1/query.rpc.func.ts | 24 +- .../src/cosmos/gov/v1beta1/query.ts | 88 ++- .../src/cosmos/gov/v1beta1/tx.rpc.func.ts | 14 +- .../src/cosmos/gov/v1beta1/tx.ts | 97 ++- .../src/cosmos/group/v1/tx.rpc.func.ts | 44 +- .../injective-react/src/cosmos/group/v1/tx.ts | 145 ++-- .../src/cosmos/group/v1/types.ts | 62 +- .../src/cosmos/ics23/v1/proofs.ts | 76 +- .../cosmos/staking/v1beta1/query.rpc.func.ts | 42 +- .../src/cosmos/staking/v1beta1/query.ts | 150 ++-- .../src/cosmos/staking/v1beta1/staking.ts | 113 +-- .../src/cosmos/staking/v1beta1/tx.rpc.func.ts | 23 +- .../src/cosmos/staking/v1beta1/tx.ts | 74 +- .../src/cosmos/tx/signing/v1beta1/signing.ts | 30 +- .../src/cosmos/tx/v1beta1/service.rpc.func.ts | 27 +- .../src/cosmos/tx/v1beta1/service.ts | 100 +-- .../src/cosmos/tx/v1beta1/tx.ts | 73 +- .../src/cosmos/upgrade/v1beta1/upgrade.ts | 25 +- .../src/cosmos/vesting/v1beta1/tx.rpc.func.ts | 11 +- .../src/cosmos/vesting/v1beta1/tx.ts | 33 +- .../src/cosmos/vesting/v1beta1/vesting.ts | 35 +- .../src/cosmos_proto/cosmos.ts | 11 +- .../src/cosmwasm/wasm/v1/proposal_legacy.ts | 88 ++- .../src/cosmwasm/wasm/v1/query.rpc.func.ts | 42 +- .../src/cosmwasm/wasm/v1/query.ts | 151 ++-- .../src/cosmwasm/wasm/v1/tx.rpc.func.ts | 53 +- .../src/cosmwasm/wasm/v1/tx.ts | 174 ++--- .../src/cosmwasm/wasm/v1/types.ts | 42 +- libs/injective-react/src/extern.ts | 2 +- libs/injective-react/src/google/api/http.ts | 16 +- .../src/google/protobuf/any.ts | 3 +- .../src/google/protobuf/descriptor.ts | 162 ++-- .../src/google/protobuf/duration.ts | 7 +- .../src/google/protobuf/timestamp.ts | 7 +- libs/injective-react/src/helper-func-types.ts | 17 +- libs/injective-react/src/helpers.ts | 2 +- .../ibc/applications/transfer/v1/transfer.ts | 18 +- .../applications/transfer/v1/tx.rpc.func.ts | 8 +- .../src/ibc/applications/transfer/v1/tx.ts | 25 +- .../src/ibc/core/channel/v1/channel.ts | 48 +- .../src/ibc/core/channel/v1/tx.rpc.func.ts | 59 +- .../src/ibc/core/channel/v1/tx.ts | 203 ++--- .../src/ibc/core/channel/v1/upgrade.ts | 19 +- .../src/ibc/core/client/v1/client.ts | 28 +- .../src/ibc/core/client/v1/tx.rpc.func.ts | 23 +- .../src/ibc/core/client/v1/tx.ts | 73 +- .../src/ibc/core/commitment/v1/commitment.ts | 18 +- .../src/ibc/core/connection/v1/connection.ts | 40 +- .../src/ibc/core/connection/v1/tx.rpc.func.ts | 17 +- .../src/ibc/core/connection/v1/tx.ts | 56 +- .../src/injective/auction/v1beta1/auction.ts | 28 +- .../src/injective/auction/v1beta1/genesis.ts | 9 +- .../auction/v1beta1/query.rpc.func.ts | 12 +- .../src/injective/auction/v1beta1/query.ts | 35 +- .../injective/auction/v1beta1/tx.rpc.func.ts | 8 +- .../src/injective/auction/v1beta1/tx.ts | 21 +- .../crypto/v1beta1/ethsecp256k1/keys.ts | 13 +- .../src/injective/exchange/v1beta1/authz.ts | 68 +- .../src/injective/exchange/v1beta1/events.ts | 153 ++-- .../injective/exchange/v1beta1/exchange.ts | 208 +++-- .../src/injective/exchange/v1beta1/genesis.ts | 100 ++- .../injective/exchange/v1beta1/proposal.ts | 146 ++-- .../exchange/v1beta1/query.rpc.func.ts | 180 +++-- .../src/injective/exchange/v1beta1/query.ts | 536 ++++++++----- .../injective/exchange/v1beta1/tx.rpc.func.ts | 107 ++- .../src/injective/exchange/v1beta1/tx.ts | 349 +++++---- .../src/injective/insurance/v1beta1/events.ts | 24 +- .../injective/insurance/v1beta1/genesis.ts | 9 +- .../injective/insurance/v1beta1/insurance.ts | 16 +- .../insurance/v1beta1/query.rpc.func.ts | 18 +- .../src/injective/insurance/v1beta1/query.ts | 51 +- .../insurance/v1beta1/tx.rpc.func.ts | 14 +- .../src/injective/insurance/v1beta1/tx.ts | 39 +- .../src/injective/ocr/v1beta1/genesis.ts | 42 +- .../src/injective/ocr/v1beta1/ocr.ts | 94 ++- .../injective/ocr/v1beta1/query.rpc.func.ts | 21 +- .../src/injective/ocr/v1beta1/query.ts | 62 +- .../src/injective/ocr/v1beta1/tx.rpc.func.ts | 29 +- .../src/injective/ocr/v1beta1/tx.ts | 84 +- .../src/injective/oracle/v1beta1/events.ts | 47 +- .../src/injective/oracle/v1beta1/genesis.ts | 22 +- .../src/injective/oracle/v1beta1/oracle.ts | 101 ++- .../src/injective/oracle/v1beta1/proposal.ts | 71 +- .../oracle/v1beta1/query.rpc.func.ts | 51 +- .../src/injective/oracle/v1beta1/query.ts | 153 ++-- .../injective/oracle/v1beta1/tx.rpc.func.ts | 26 +- .../src/injective/oracle/v1beta1/tx.ts | 74 +- .../src/injective/peggy/v1/attestation.ts | 11 +- .../src/injective/peggy/v1/batch.ts | 11 +- .../src/injective/peggy/v1/events.ts | 71 +- .../src/injective/peggy/v1/genesis.ts | 15 +- .../src/injective/peggy/v1/msgs.rpc.func.ts | 44 +- .../src/injective/peggy/v1/msgs.ts | 129 ++- .../src/injective/peggy/v1/params.ts | 8 +- .../src/injective/peggy/v1/pool.ts | 11 +- .../src/injective/peggy/v1/proposal.ts | 10 +- .../src/injective/peggy/v1/query.rpc.func.ts | 63 +- .../src/injective/peggy/v1/query.ts | 171 ++-- .../src/injective/peggy/v1/types.ts | 23 +- .../injective/permissions/v1beta1/events.ts | 7 +- .../injective/permissions/v1beta1/genesis.ts | 8 +- .../injective/permissions/v1beta1/params.ts | 8 +- .../permissions/v1beta1/permissions.ts | 28 +- .../permissions/v1beta1/query.rpc.func.ts | 18 +- .../injective/permissions/v1beta1/query.ts | 51 +- .../permissions/v1beta1/tx.rpc.func.ts | 23 +- .../src/injective/permissions/v1beta1/tx.ts | 86 +- .../src/injective/stream/v1beta1/query.ts | 105 ++- .../tokenfactory/v1beta1/authorityMetadata.ts | 7 +- .../injective/tokenfactory/v1beta1/events.ts | 23 +- .../injective/tokenfactory/v1beta1/genesis.ts | 12 +- .../injective/tokenfactory/v1beta1/params.ts | 8 +- .../tokenfactory/v1beta1/query.rpc.func.ts | 12 +- .../injective/tokenfactory/v1beta1/query.ts | 35 +- .../tokenfactory/v1beta1/tx.rpc.func.ts | 20 +- .../src/injective/tokenfactory/v1beta1/tx.ts | 57 +- .../src/injective/types/v1beta1/account.ts | 9 +- .../src/injective/types/v1beta1/tx_ext.ts | 7 +- .../injective/types/v1beta1/tx_response.ts | 11 +- .../src/injective/wasmx/v1/events.ts | 15 +- .../src/injective/wasmx/v1/genesis.ts | 12 +- .../src/injective/wasmx/v1/proposal.ts | 35 +- .../src/injective/wasmx/v1/query.rpc.func.ts | 9 +- .../src/injective/wasmx/v1/query.ts | 27 +- .../src/injective/wasmx/v1/tx.rpc.func.ts | 20 +- .../src/injective/wasmx/v1/tx.ts | 57 +- .../src/injective/wasmx/v1/wasmx.ts | 12 +- libs/injective-react/src/react-query.ts | 2 +- libs/injective-react/src/registry.ts | 2 +- .../src/tendermint/abci/types.ts | 231 ++++-- .../src/tendermint/crypto/keys.ts | 7 +- .../src/tendermint/crypto/proof.ts | 23 +- .../src/tendermint/types/block.ts | 10 +- .../src/tendermint/types/evidence.ts | 21 +- .../src/tendermint/types/params.ts | 35 +- .../src/tendermint/types/types.ts | 69 +- .../src/tendermint/types/validator.ts | 15 +- .../src/tendermint/version/types.ts | 11 +- libs/injective-react/src/types.ts | 3 +- libs/injective-react/src/utf8.ts | 2 +- libs/injective-react/src/varint.ts | 2 +- libs/injective-vue/src/binary.ts | 2 +- .../src/cosmos/auth/v1beta1/auth.ts | 2 +- .../src/cosmos/auth/v1beta1/query.ts | 2 +- .../src/cosmos/authz/v1beta1/tx.ts | 2 +- .../src/cosmos/base/abci/v1beta1/abci.ts | 2 +- .../src/cosmos/feegrant/v1beta1/tx.ts | 2 +- .../src/cosmos/gov/v1beta1/tx.ts | 2 +- .../src/cosmos/ics23/v1/proofs.ts | 2 +- .../src/cosmos/staking/v1beta1/query.ts | 2 +- .../src/cosmos/staking/v1beta1/staking.ts | 2 +- .../src/cosmos/staking/v1beta1/tx.ts | 2 +- .../injective-vue/src/cosmos/tx/v1beta1/tx.ts | 2 +- .../src/cosmos/vesting/v1beta1/vesting.ts | 2 +- .../src/cosmwasm/wasm/v1/proposal_legacy.ts | 2 +- libs/injective-vue/src/cosmwasm/wasm/v1/tx.ts | 2 +- libs/injective-vue/src/extern.ts | 2 +- libs/injective-vue/src/helpers.ts | 2 +- .../src/ibc/applications/transfer/v1/tx.ts | 2 +- .../src/ibc/core/channel/v1/tx.ts | 2 +- .../src/ibc/core/channel/v1/upgrade.ts | 2 +- .../src/ibc/core/client/v1/client.ts | 2 +- .../src/ibc/core/client/v1/tx.ts | 2 +- .../src/ibc/core/connection/v1/tx.ts | 2 +- .../src/injective/auction/v1beta1/genesis.ts | 2 +- .../src/injective/auction/v1beta1/tx.ts | 2 +- .../src/injective/exchange/v1beta1/genesis.ts | 2 +- .../src/injective/insurance/v1beta1/events.ts | 2 +- .../injective/insurance/v1beta1/genesis.ts | 2 +- .../injective/insurance/v1beta1/insurance.ts | 2 +- .../src/injective/ocr/v1beta1/genesis.ts | 2 +- .../src/injective/ocr/v1beta1/tx.ts | 2 +- .../src/injective/oracle/v1beta1/genesis.ts | 2 +- .../src/injective/peggy/v1/attestation.ts | 2 +- .../src/injective/peggy/v1/genesis.ts | 2 +- .../src/injective/peggy/v1/params.ts | 2 +- .../injective/permissions/v1beta1/events.ts | 2 +- .../injective/permissions/v1beta1/genesis.ts | 2 +- .../src/injective/permissions/v1beta1/tx.ts | 2 +- .../src/injective/stream/v1beta1/query.ts | 2 +- .../injective/tokenfactory/v1beta1/genesis.ts | 2 +- .../src/injective/types/v1beta1/account.ts | 2 +- .../src/injective/wasmx/v1/genesis.ts | 2 +- .../src/injective/wasmx/v1/proposal.ts | 2 +- .../src/injective/wasmx/v1/wasmx.ts | 2 +- libs/injective-vue/src/registry.ts | 2 +- .../src/tendermint/abci/types.ts | 2 +- .../src/tendermint/types/block.ts | 2 +- .../src/tendermint/types/evidence.ts | 2 +- .../src/tendermint/types/params.ts | 2 +- .../src/tendermint/types/validator.ts | 2 +- libs/injective-vue/src/types.ts | 3 +- libs/injective-vue/src/utf8.ts | 2 +- libs/injective-vue/src/varint.ts | 2 +- libs/injective-vue/src/vue-query.ts | 2 +- libs/injectivejs/src/binary.ts | 2 +- .../src/cosmos/auth/v1beta1/auth.ts | 27 +- .../src/cosmos/auth/v1beta1/query.rpc.func.ts | 30 +- .../src/cosmos/auth/v1beta1/query.ts | 107 ++- .../src/cosmos/authz/v1beta1/authz.ts | 23 +- .../src/cosmos/authz/v1beta1/tx.rpc.func.ts | 9 +- .../src/cosmos/authz/v1beta1/tx.ts | 34 +- .../src/cosmos/bank/v1beta1/bank.ts | 39 +- .../src/cosmos/bank/v1beta1/query.rpc.func.ts | 39 +- .../src/cosmos/bank/v1beta1/query.ts | 145 ++-- .../src/cosmos/bank/v1beta1/tx.rpc.func.ts | 12 +- .../injectivejs/src/cosmos/bank/v1beta1/tx.ts | 44 +- .../src/cosmos/base/abci/v1beta1/abci.ts | 59 +- .../cosmos/base/query/v1beta1/pagination.ts | 13 +- .../src/cosmos/base/v1beta1/coin.ts | 23 +- .../src/cosmos/crypto/ed25519/keys.ts | 13 +- .../crypto/multisig/v1beta1/multisig.ts | 13 +- .../src/cosmos/crypto/secp256k1/keys.ts | 13 +- .../src/cosmos/crypto/secp256r1/keys.ts | 13 +- .../distribution/v1beta1/distribution.ts | 65 +- .../distribution/v1beta1/tx.rpc.func.ts | 21 +- .../src/cosmos/distribution/v1beta1/tx.ts | 73 +- .../cosmos/feegrant/v1beta1/tx.rpc.func.ts | 9 +- .../src/cosmos/feegrant/v1beta1/tx.ts | 34 +- libs/injectivejs/src/cosmos/gov/v1/gov.ts | 49 +- .../src/cosmos/gov/v1/tx.rpc.func.ts | 21 +- libs/injectivejs/src/cosmos/gov/v1/tx.ts | 124 ++- .../injectivejs/src/cosmos/gov/v1beta1/gov.ts | 102 ++- .../src/cosmos/gov/v1beta1/query.rpc.func.ts | 24 +- .../src/cosmos/gov/v1beta1/query.ts | 88 ++- .../src/cosmos/gov/v1beta1/tx.rpc.func.ts | 12 +- libs/injectivejs/src/cosmos/gov/v1beta1/tx.ts | 97 ++- .../src/cosmos/group/v1/tx.rpc.func.ts | 42 +- libs/injectivejs/src/cosmos/group/v1/tx.ts | 145 ++-- libs/injectivejs/src/cosmos/group/v1/types.ts | 62 +- .../injectivejs/src/cosmos/ics23/v1/proofs.ts | 76 +- .../cosmos/staking/v1beta1/query.rpc.func.ts | 42 +- .../src/cosmos/staking/v1beta1/query.ts | 150 ++-- .../src/cosmos/staking/v1beta1/staking.ts | 113 +-- .../src/cosmos/staking/v1beta1/tx.rpc.func.ts | 21 +- .../src/cosmos/staking/v1beta1/tx.ts | 74 +- .../src/cosmos/tx/signing/v1beta1/signing.ts | 30 +- .../src/cosmos/tx/v1beta1/service.rpc.func.ts | 27 +- .../src/cosmos/tx/v1beta1/service.ts | 100 +-- libs/injectivejs/src/cosmos/tx/v1beta1/tx.ts | 73 +- .../src/cosmos/upgrade/v1beta1/upgrade.ts | 25 +- .../src/cosmos/vesting/v1beta1/tx.rpc.func.ts | 9 +- .../src/cosmos/vesting/v1beta1/tx.ts | 33 +- .../src/cosmos/vesting/v1beta1/vesting.ts | 35 +- libs/injectivejs/src/cosmos_proto/cosmos.ts | 11 +- .../src/cosmwasm/wasm/v1/proposal_legacy.ts | 88 ++- .../src/cosmwasm/wasm/v1/query.rpc.func.ts | 42 +- .../injectivejs/src/cosmwasm/wasm/v1/query.ts | 151 ++-- .../src/cosmwasm/wasm/v1/tx.rpc.func.ts | 51 +- libs/injectivejs/src/cosmwasm/wasm/v1/tx.ts | 174 ++--- .../injectivejs/src/cosmwasm/wasm/v1/types.ts | 42 +- libs/injectivejs/src/extern.ts | 2 +- libs/injectivejs/src/google/api/http.ts | 16 +- libs/injectivejs/src/google/protobuf/any.ts | 3 +- .../src/google/protobuf/descriptor.ts | 162 ++-- .../src/google/protobuf/duration.ts | 7 +- .../src/google/protobuf/timestamp.ts | 7 +- libs/injectivejs/src/helper-func-types.ts | 17 +- libs/injectivejs/src/helpers.ts | 2 +- .../ibc/applications/transfer/v1/transfer.ts | 18 +- .../applications/transfer/v1/tx.rpc.func.ts | 6 +- .../src/ibc/applications/transfer/v1/tx.ts | 25 +- .../src/ibc/core/channel/v1/channel.ts | 48 +- .../src/ibc/core/channel/v1/tx.rpc.func.ts | 57 +- .../injectivejs/src/ibc/core/channel/v1/tx.ts | 203 ++--- .../src/ibc/core/channel/v1/upgrade.ts | 19 +- .../src/ibc/core/client/v1/client.ts | 28 +- .../src/ibc/core/client/v1/tx.rpc.func.ts | 21 +- libs/injectivejs/src/ibc/core/client/v1/tx.ts | 73 +- .../src/ibc/core/commitment/v1/commitment.ts | 18 +- .../src/ibc/core/connection/v1/connection.ts | 40 +- .../src/ibc/core/connection/v1/tx.rpc.func.ts | 15 +- .../src/ibc/core/connection/v1/tx.ts | 56 +- .../src/injective/auction/v1beta1/auction.ts | 28 +- .../src/injective/auction/v1beta1/genesis.ts | 9 +- .../auction/v1beta1/query.rpc.func.ts | 12 +- .../src/injective/auction/v1beta1/query.ts | 35 +- .../injective/auction/v1beta1/tx.rpc.func.ts | 6 +- .../src/injective/auction/v1beta1/tx.ts | 21 +- .../crypto/v1beta1/ethsecp256k1/keys.ts | 13 +- .../src/injective/exchange/v1beta1/authz.ts | 68 +- .../src/injective/exchange/v1beta1/events.ts | 153 ++-- .../injective/exchange/v1beta1/exchange.ts | 208 +++-- .../src/injective/exchange/v1beta1/genesis.ts | 100 ++- .../injective/exchange/v1beta1/proposal.ts | 146 ++-- .../exchange/v1beta1/query.rpc.func.ts | 180 +++-- .../src/injective/exchange/v1beta1/query.ts | 536 ++++++++----- .../injective/exchange/v1beta1/tx.rpc.func.ts | 105 ++- .../src/injective/exchange/v1beta1/tx.ts | 349 +++++---- .../src/injective/insurance/v1beta1/events.ts | 24 +- .../injective/insurance/v1beta1/genesis.ts | 9 +- .../injective/insurance/v1beta1/insurance.ts | 16 +- .../insurance/v1beta1/query.rpc.func.ts | 18 +- .../src/injective/insurance/v1beta1/query.ts | 51 +- .../insurance/v1beta1/tx.rpc.func.ts | 12 +- .../src/injective/insurance/v1beta1/tx.ts | 39 +- .../src/injective/ocr/v1beta1/genesis.ts | 42 +- .../src/injective/ocr/v1beta1/ocr.ts | 94 ++- .../injective/ocr/v1beta1/query.rpc.func.ts | 21 +- .../src/injective/ocr/v1beta1/query.ts | 62 +- .../src/injective/ocr/v1beta1/tx.rpc.func.ts | 27 +- .../src/injective/ocr/v1beta1/tx.ts | 84 +- .../src/injective/oracle/v1beta1/events.ts | 47 +- .../src/injective/oracle/v1beta1/genesis.ts | 22 +- .../src/injective/oracle/v1beta1/oracle.ts | 101 ++- .../src/injective/oracle/v1beta1/proposal.ts | 71 +- .../oracle/v1beta1/query.rpc.func.ts | 51 +- .../src/injective/oracle/v1beta1/query.ts | 153 ++-- .../injective/oracle/v1beta1/tx.rpc.func.ts | 24 +- .../src/injective/oracle/v1beta1/tx.ts | 74 +- .../src/injective/peggy/v1/attestation.ts | 11 +- .../src/injective/peggy/v1/batch.ts | 11 +- .../src/injective/peggy/v1/events.ts | 71 +- .../src/injective/peggy/v1/genesis.ts | 15 +- .../src/injective/peggy/v1/msgs.rpc.func.ts | 42 +- .../src/injective/peggy/v1/msgs.ts | 129 ++- .../src/injective/peggy/v1/params.ts | 8 +- .../src/injective/peggy/v1/pool.ts | 11 +- .../src/injective/peggy/v1/proposal.ts | 10 +- .../src/injective/peggy/v1/query.rpc.func.ts | 63 +- .../src/injective/peggy/v1/query.ts | 171 ++-- .../src/injective/peggy/v1/types.ts | 23 +- .../injective/permissions/v1beta1/events.ts | 7 +- .../injective/permissions/v1beta1/genesis.ts | 8 +- .../injective/permissions/v1beta1/params.ts | 8 +- .../permissions/v1beta1/permissions.ts | 28 +- .../permissions/v1beta1/query.rpc.func.ts | 18 +- .../injective/permissions/v1beta1/query.ts | 51 +- .../permissions/v1beta1/tx.rpc.func.ts | 21 +- .../src/injective/permissions/v1beta1/tx.ts | 86 +- .../src/injective/stream/v1beta1/query.ts | 105 ++- .../tokenfactory/v1beta1/authorityMetadata.ts | 7 +- .../injective/tokenfactory/v1beta1/events.ts | 23 +- .../injective/tokenfactory/v1beta1/genesis.ts | 12 +- .../injective/tokenfactory/v1beta1/params.ts | 8 +- .../tokenfactory/v1beta1/query.rpc.func.ts | 12 +- .../injective/tokenfactory/v1beta1/query.ts | 35 +- .../tokenfactory/v1beta1/tx.rpc.func.ts | 18 +- .../src/injective/tokenfactory/v1beta1/tx.ts | 57 +- .../src/injective/types/v1beta1/account.ts | 9 +- .../src/injective/types/v1beta1/tx_ext.ts | 7 +- .../injective/types/v1beta1/tx_response.ts | 11 +- .../src/injective/wasmx/v1/events.ts | 15 +- .../src/injective/wasmx/v1/genesis.ts | 12 +- .../src/injective/wasmx/v1/proposal.ts | 35 +- .../src/injective/wasmx/v1/query.rpc.func.ts | 9 +- .../src/injective/wasmx/v1/query.ts | 27 +- .../src/injective/wasmx/v1/tx.rpc.func.ts | 18 +- libs/injectivejs/src/injective/wasmx/v1/tx.ts | 57 +- .../src/injective/wasmx/v1/wasmx.ts | 12 +- libs/injectivejs/src/registry.ts | 2 +- libs/injectivejs/src/tendermint/abci/types.ts | 231 ++++-- .../injectivejs/src/tendermint/crypto/keys.ts | 7 +- .../src/tendermint/crypto/proof.ts | 23 +- .../injectivejs/src/tendermint/types/block.ts | 10 +- .../src/tendermint/types/evidence.ts | 21 +- .../src/tendermint/types/params.ts | 35 +- .../injectivejs/src/tendermint/types/types.ts | 69 +- .../src/tendermint/types/validator.ts | 15 +- .../src/tendermint/version/types.ts | 11 +- libs/injectivejs/src/types.ts | 3 +- libs/injectivejs/src/utf8.ts | 2 +- libs/injectivejs/src/varint.ts | 2 +- libs/interchain-react/src/binary.ts | 2 +- .../src/cosmos/auth/v1beta1/auth.ts | 27 +- .../src/cosmos/auth/v1beta1/query.rpc.func.ts | 30 +- .../src/cosmos/auth/v1beta1/query.ts | 107 ++- .../src/cosmos/authz/v1beta1/authz.ts | 37 +- .../cosmos/authz/v1beta1/query.rpc.func.ts | 39 + .../src/cosmos/authz/v1beta1/query.ts | 715 +++++++++++++++++ .../src/cosmos/authz/v1beta1/tx.rpc.func.ts | 11 +- .../src/cosmos/authz/v1beta1/tx.ts | 34 +- .../src/cosmos/bank/v1beta1/authz.ts | 141 ++++ .../src/cosmos/bank/v1beta1/bank.ts | 39 +- .../src/cosmos/bank/v1beta1/query.rpc.func.ts | 39 +- .../src/cosmos/bank/v1beta1/query.ts | 145 ++-- .../src/cosmos/bank/v1beta1/tx.rpc.func.ts | 14 +- .../src/cosmos/bank/v1beta1/tx.ts | 44 +- .../src/cosmos/base/abci/v1beta1/abci.ts | 59 +- .../cosmos/base/query/v1beta1/pagination.ts | 13 +- .../src/cosmos/base/v1beta1/coin.ts | 23 +- .../src/cosmos/crypto/ed25519/keys.ts | 13 +- .../crypto/multisig/v1beta1/multisig.ts | 13 +- .../src/cosmos/crypto/secp256k1/keys.ts | 13 +- .../src/cosmos/crypto/secp256r1/keys.ts | 13 +- .../distribution/v1beta1/distribution.ts | 65 +- .../distribution/v1beta1/tx.rpc.func.ts | 23 +- .../src/cosmos/distribution/v1beta1/tx.ts | 73 +- .../cosmos/feegrant/v1beta1/tx.rpc.func.ts | 11 +- .../src/cosmos/feegrant/v1beta1/tx.ts | 34 +- .../interchain-react/src/cosmos/gov/v1/gov.ts | 49 +- .../src/cosmos/gov/v1/tx.rpc.func.ts | 23 +- libs/interchain-react/src/cosmos/gov/v1/tx.ts | 76 +- .../src/cosmos/gov/v1beta1/gov.ts | 54 +- .../src/cosmos/gov/v1beta1/query.rpc.func.ts | 24 +- .../src/cosmos/gov/v1beta1/query.ts | 88 ++- .../src/cosmos/gov/v1beta1/tx.rpc.func.ts | 14 +- .../src/cosmos/gov/v1beta1/tx.ts | 49 +- .../src/cosmos/group/v1/tx.rpc.func.ts | 44 +- .../src/cosmos/group/v1/tx.ts | 145 ++-- .../src/cosmos/group/v1/types.ts | 62 +- .../src/cosmos/ics23/v1/proofs.ts | 76 +- .../src/cosmos/staking/v1beta1/authz.ts | 326 ++++++++ .../cosmos/staking/v1beta1/query.rpc.func.ts | 42 +- .../src/cosmos/staking/v1beta1/query.ts | 150 ++-- .../src/cosmos/staking/v1beta1/staking.ts | 113 +-- .../src/cosmos/staking/v1beta1/tx.rpc.func.ts | 23 +- .../src/cosmos/staking/v1beta1/tx.ts | 74 +- .../src/cosmos/tx/signing/v1beta1/signing.ts | 30 +- .../src/cosmos/tx/v1beta1/service.rpc.func.ts | 27 +- .../src/cosmos/tx/v1beta1/service.ts | 100 +-- .../src/cosmos/tx/v1beta1/tx.ts | 73 +- .../src/cosmos/upgrade/v1beta1/upgrade.ts | 25 +- .../src/cosmos/vesting/v1beta1/tx.rpc.func.ts | 11 +- .../src/cosmos/vesting/v1beta1/tx.ts | 33 +- .../src/cosmos/vesting/v1beta1/vesting.ts | 35 +- .../src/cosmos_proto/cosmos.ts | 11 +- .../src/cosmwasm/wasm/v1/query.rpc.func.ts | 42 +- .../src/cosmwasm/wasm/v1/query.ts | 151 ++-- .../src/cosmwasm/wasm/v1/tx.rpc.func.ts | 53 +- .../src/cosmwasm/wasm/v1/tx.ts | 174 ++--- .../src/cosmwasm/wasm/v1/types.ts | 42 +- libs/interchain-react/src/extern.ts | 2 +- libs/interchain-react/src/google/api/http.ts | 16 +- .../src/google/protobuf/any.ts | 3 +- .../src/google/protobuf/descriptor.ts | 162 ++-- .../src/google/protobuf/duration.ts | 7 +- .../src/google/protobuf/timestamp.ts | 7 +- .../interchain-react/src/helper-func-types.ts | 17 +- libs/interchain-react/src/helpers.ts | 2 +- .../ibc/applications/transfer/v1/transfer.ts | 18 +- .../applications/transfer/v1/tx.rpc.func.ts | 8 +- .../src/ibc/applications/transfer/v1/tx.ts | 25 +- .../src/ibc/core/channel/v1/channel.ts | 48 +- .../src/ibc/core/channel/v1/tx.rpc.func.ts | 59 +- .../src/ibc/core/channel/v1/tx.ts | 203 ++--- .../src/ibc/core/channel/v1/upgrade.ts | 19 +- .../src/ibc/core/client/v1/client.ts | 28 +- .../src/ibc/core/client/v1/tx.rpc.func.ts | 23 +- .../src/ibc/core/client/v1/tx.ts | 73 +- .../src/ibc/core/commitment/v1/commitment.ts | 18 +- .../src/ibc/core/connection/v1/connection.ts | 40 +- .../src/ibc/core/connection/v1/tx.rpc.func.ts | 17 +- .../src/ibc/core/connection/v1/tx.ts | 56 +- .../src/injective/types/v1beta1/account.ts | 9 +- libs/interchain-react/src/react-query.ts | 2 +- libs/interchain-react/src/registry.ts | 2 +- .../src/tendermint/abci/types.ts | 231 ++++-- .../src/tendermint/crypto/keys.ts | 7 +- .../src/tendermint/crypto/proof.ts | 23 +- .../src/tendermint/types/block.ts | 10 +- .../src/tendermint/types/evidence.ts | 21 +- .../src/tendermint/types/params.ts | 35 +- .../src/tendermint/types/types.ts | 69 +- .../src/tendermint/types/validator.ts | 15 +- .../src/tendermint/version/types.ts | 11 +- libs/interchain-react/src/types.ts | 3 +- libs/interchain-react/src/utf8.ts | 2 +- libs/interchain-react/src/varint.ts | 2 +- libs/interchain-vue/src/binary.ts | 2 +- .../src/cosmos/auth/v1beta1/auth.ts | 2 +- .../src/cosmos/auth/v1beta1/query.ts | 2 +- .../src/cosmos/authz/v1beta1/authz.ts | 14 +- .../cosmos/authz/v1beta1/query.rpc.Query.ts | 182 +++++ .../src/cosmos/authz/v1beta1/query.ts | 734 ++++++++++++++++++ .../src/cosmos/authz/v1beta1/tx.ts | 2 +- .../src/cosmos/bank/v1beta1/authz.ts | 143 ++++ .../src/cosmos/base/abci/v1beta1/abci.ts | 2 +- .../src/cosmos/feegrant/v1beta1/tx.ts | 2 +- .../src/cosmos/gov/v1beta1/tx.ts | 2 +- .../src/cosmos/ics23/v1/proofs.ts | 2 +- libs/interchain-vue/src/cosmos/rpc.query.ts | 3 + .../src/cosmos/staking/v1beta1/authz.ts | 333 ++++++++ .../src/cosmos/staking/v1beta1/query.ts | 2 +- .../src/cosmos/staking/v1beta1/staking.ts | 2 +- .../src/cosmos/staking/v1beta1/tx.ts | 2 +- .../src/cosmos/tx/v1beta1/tx.ts | 2 +- .../src/cosmos/vesting/v1beta1/vesting.ts | 2 +- libs/interchain-vue/src/cosmwasm/rpc.query.ts | 3 + .../interchain-vue/src/cosmwasm/wasm/v1/tx.ts | 2 +- libs/interchain-vue/src/extern.ts | 2 +- libs/interchain-vue/src/helpers.ts | 2 +- .../src/ibc/applications/transfer/v1/tx.ts | 2 +- .../src/ibc/core/channel/v1/tx.ts | 2 +- .../src/ibc/core/channel/v1/upgrade.ts | 2 +- .../src/ibc/core/client/v1/client.ts | 2 +- .../src/ibc/core/client/v1/tx.ts | 2 +- .../src/ibc/core/connection/v1/tx.ts | 2 +- .../src/injective/types/v1beta1/account.ts | 2 +- libs/interchain-vue/src/registry.ts | 2 +- .../src/tendermint/abci/types.ts | 2 +- .../src/tendermint/types/block.ts | 2 +- .../src/tendermint/types/evidence.ts | 2 +- .../src/tendermint/types/params.ts | 2 +- .../src/tendermint/types/validator.ts | 2 +- libs/interchain-vue/src/types.ts | 3 +- libs/interchain-vue/src/utf8.ts | 2 +- libs/interchain-vue/src/varint.ts | 2 +- libs/interchain-vue/src/vue-query.ts | 2 +- libs/interchainjs/src/binary.ts | 2 +- .../src/cosmos/auth/v1beta1/auth.ts | 27 +- .../src/cosmos/auth/v1beta1/query.rpc.func.ts | 30 +- .../src/cosmos/auth/v1beta1/query.ts | 107 ++- .../src/cosmos/authz/v1beta1/authz.ts | 37 +- .../cosmos/authz/v1beta1/query.rpc.func.ts | 26 + .../src/cosmos/authz/v1beta1/query.ts | 715 +++++++++++++++++ .../src/cosmos/authz/v1beta1/tx.rpc.func.ts | 9 +- .../src/cosmos/authz/v1beta1/tx.ts | 34 +- .../src/cosmos/bank/v1beta1/authz.ts | 141 ++++ .../src/cosmos/bank/v1beta1/bank.ts | 39 +- .../src/cosmos/bank/v1beta1/query.rpc.func.ts | 39 +- .../src/cosmos/bank/v1beta1/query.ts | 145 ++-- .../src/cosmos/bank/v1beta1/tx.rpc.func.ts | 12 +- .../src/cosmos/bank/v1beta1/tx.ts | 44 +- .../src/cosmos/base/abci/v1beta1/abci.ts | 59 +- .../cosmos/base/query/v1beta1/pagination.ts | 13 +- .../src/cosmos/base/v1beta1/coin.ts | 23 +- .../src/cosmos/crypto/ed25519/keys.ts | 13 +- .../crypto/multisig/v1beta1/multisig.ts | 13 +- .../src/cosmos/crypto/secp256k1/keys.ts | 13 +- .../src/cosmos/crypto/secp256r1/keys.ts | 13 +- .../distribution/v1beta1/distribution.ts | 65 +- .../distribution/v1beta1/tx.rpc.func.ts | 21 +- .../src/cosmos/distribution/v1beta1/tx.ts | 73 +- .../cosmos/feegrant/v1beta1/tx.rpc.func.ts | 9 +- .../src/cosmos/feegrant/v1beta1/tx.ts | 34 +- libs/interchainjs/src/cosmos/gov/v1/gov.ts | 49 +- .../src/cosmos/gov/v1/tx.rpc.func.ts | 21 +- libs/interchainjs/src/cosmos/gov/v1/tx.ts | 76 +- .../src/cosmos/gov/v1beta1/gov.ts | 54 +- .../src/cosmos/gov/v1beta1/query.rpc.func.ts | 24 +- .../src/cosmos/gov/v1beta1/query.ts | 88 ++- .../src/cosmos/gov/v1beta1/tx.rpc.func.ts | 12 +- .../interchainjs/src/cosmos/gov/v1beta1/tx.ts | 49 +- .../src/cosmos/group/v1/tx.rpc.func.ts | 42 +- libs/interchainjs/src/cosmos/group/v1/tx.ts | 145 ++-- .../interchainjs/src/cosmos/group/v1/types.ts | 62 +- .../src/cosmos/ics23/v1/proofs.ts | 76 +- .../src/cosmos/staking/v1beta1/authz.ts | 326 ++++++++ .../cosmos/staking/v1beta1/query.rpc.func.ts | 42 +- .../src/cosmos/staking/v1beta1/query.ts | 150 ++-- .../src/cosmos/staking/v1beta1/staking.ts | 113 +-- .../src/cosmos/staking/v1beta1/tx.rpc.func.ts | 21 +- .../src/cosmos/staking/v1beta1/tx.ts | 74 +- .../src/cosmos/tx/signing/v1beta1/signing.ts | 30 +- .../src/cosmos/tx/v1beta1/service.rpc.func.ts | 27 +- .../src/cosmos/tx/v1beta1/service.ts | 100 +-- libs/interchainjs/src/cosmos/tx/v1beta1/tx.ts | 73 +- .../src/cosmos/upgrade/v1beta1/upgrade.ts | 25 +- .../src/cosmos/vesting/v1beta1/tx.rpc.func.ts | 9 +- .../src/cosmos/vesting/v1beta1/tx.ts | 33 +- .../src/cosmos/vesting/v1beta1/vesting.ts | 35 +- libs/interchainjs/src/cosmos_proto/cosmos.ts | 11 +- .../src/cosmwasm/wasm/v1/query.rpc.func.ts | 42 +- .../src/cosmwasm/wasm/v1/query.ts | 151 ++-- .../src/cosmwasm/wasm/v1/tx.rpc.func.ts | 51 +- libs/interchainjs/src/cosmwasm/wasm/v1/tx.ts | 174 ++--- .../src/cosmwasm/wasm/v1/types.ts | 42 +- libs/interchainjs/src/extern.ts | 2 +- libs/interchainjs/src/google/api/http.ts | 16 +- libs/interchainjs/src/google/protobuf/any.ts | 3 +- .../src/google/protobuf/descriptor.ts | 162 ++-- .../src/google/protobuf/duration.ts | 7 +- .../src/google/protobuf/timestamp.ts | 7 +- libs/interchainjs/src/helper-func-types.ts | 17 +- libs/interchainjs/src/helpers.ts | 2 +- .../ibc/applications/transfer/v1/transfer.ts | 18 +- .../applications/transfer/v1/tx.rpc.func.ts | 6 +- .../src/ibc/applications/transfer/v1/tx.ts | 25 +- .../src/ibc/core/channel/v1/channel.ts | 48 +- .../src/ibc/core/channel/v1/tx.rpc.func.ts | 57 +- .../src/ibc/core/channel/v1/tx.ts | 203 ++--- .../src/ibc/core/channel/v1/upgrade.ts | 19 +- .../src/ibc/core/client/v1/client.ts | 28 +- .../src/ibc/core/client/v1/tx.rpc.func.ts | 21 +- .../interchainjs/src/ibc/core/client/v1/tx.ts | 73 +- .../src/ibc/core/commitment/v1/commitment.ts | 18 +- .../src/ibc/core/connection/v1/connection.ts | 40 +- .../src/ibc/core/connection/v1/tx.rpc.func.ts | 15 +- .../src/ibc/core/connection/v1/tx.ts | 56 +- .../src/injective/types/v1beta1/account.ts | 9 +- libs/interchainjs/src/registry.ts | 2 +- .../interchainjs/src/tendermint/abci/types.ts | 231 ++++-- .../src/tendermint/crypto/keys.ts | 7 +- .../src/tendermint/crypto/proof.ts | 23 +- .../src/tendermint/types/block.ts | 10 +- .../src/tendermint/types/evidence.ts | 21 +- .../src/tendermint/types/params.ts | 35 +- .../src/tendermint/types/types.ts | 69 +- .../src/tendermint/types/validator.ts | 15 +- .../src/tendermint/version/types.ts | 11 +- libs/interchainjs/src/types.ts | 3 +- libs/interchainjs/src/utf8.ts | 2 +- libs/interchainjs/src/varint.ts | 2 +- .../starship/__tests__/authz.test.ts | 471 +++++++++++ package.json | 2 +- .../cosmos/authz/v1beta1/query.proto | 82 ++ .../cosmos/bank/v1beta1/authz.proto | 31 + .../cosmos/staking/v1beta1/authz.proto | 51 ++ scripts/.protod.config.json | 3 + scripts/inj-react.telescope.json | 6 +- scripts/inj.telescope.json | 6 +- scripts/interchain-react.telescope.json | 6 +- scripts/interchainjs.telescope.json | 6 +- yarn.lock | 58 +- 633 files changed, 19255 insertions(+), 10796 deletions(-) create mode 100644 libs/interchain-react/src/cosmos/authz/v1beta1/query.rpc.func.ts create mode 100644 libs/interchain-react/src/cosmos/authz/v1beta1/query.ts create mode 100644 libs/interchain-react/src/cosmos/bank/v1beta1/authz.ts create mode 100644 libs/interchain-react/src/cosmos/staking/v1beta1/authz.ts create mode 100644 libs/interchain-vue/src/cosmos/authz/v1beta1/query.rpc.Query.ts create mode 100644 libs/interchain-vue/src/cosmos/authz/v1beta1/query.ts create mode 100644 libs/interchain-vue/src/cosmos/bank/v1beta1/authz.ts create mode 100644 libs/interchain-vue/src/cosmos/staking/v1beta1/authz.ts create mode 100644 libs/interchainjs/src/cosmos/authz/v1beta1/query.rpc.func.ts create mode 100644 libs/interchainjs/src/cosmos/authz/v1beta1/query.ts create mode 100644 libs/interchainjs/src/cosmos/bank/v1beta1/authz.ts create mode 100644 libs/interchainjs/src/cosmos/staking/v1beta1/authz.ts create mode 100644 libs/interchainjs/starship/__tests__/authz.test.ts create mode 100644 protos/interchainjs/cosmos/authz/v1beta1/query.proto create mode 100644 protos/interchainjs/cosmos/bank/v1beta1/authz.proto create mode 100644 protos/interchainjs/cosmos/staking/v1beta1/authz.proto diff --git a/libs/injective-react/src/binary.ts b/libs/injective-react/src/binary.ts index 7325addd..f9a515e4 100644 --- a/libs/injective-react/src/binary.ts +++ b/libs/injective-react/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/cosmos/auth/v1beta1/auth.ts b/libs/injective-react/src/cosmos/auth/v1beta1/auth.ts index bd8ed990..85846fa2 100644 --- a/libs/injective-react/src/cosmos/auth/v1beta1/auth.ts +++ b/libs/injective-react/src/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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 @@ -222,10 +222,12 @@ export const BaseAccount = { typeUrl: "/cosmos.auth.v1beta1.BaseAccount", value: BaseAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); } }; -GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); function createBaseModuleAccount(): ModuleAccount { return { baseAccount: undefined, @@ -326,10 +328,13 @@ export const ModuleAccount = { typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", value: ModuleAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); + BaseAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); function createBaseModuleCredential(): ModuleCredential { return { moduleName: "", @@ -418,10 +423,9 @@ export const ModuleCredential = { typeUrl: "/cosmos.auth.v1beta1.ModuleCredential", value: ModuleCredential.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModuleCredential.typeUrl, ModuleCredential); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleCredential.aminoType, ModuleCredential.typeUrl); function createBaseParams(): Params { return { maxMemoCharacters: BigInt(0), @@ -544,7 +548,6 @@ export const Params = { typeUrl: "/cosmos.auth.v1beta1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/auth/v1beta1/query.rpc.func.ts b/libs/injective-react/src/cosmos/auth/v1beta1/query.rpc.func.ts index 55204af9..174472fd 100644 --- a/libs/injective-react/src/cosmos/auth/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/cosmos/auth/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetAccounts = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetAccounts, @@ -17,7 +18,8 @@ export const createGetAccount = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetAccount, @@ -28,7 +30,8 @@ export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => bui decode: QueryAccountAddressByIDResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountAddressByID", - clientResolver + clientResolver, + deps: [QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse] }); export const useGetAccountAddressByID = buildUseQuery({ builderQueryFn: createGetAccountAddressByID, @@ -39,7 +42,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -50,7 +54,8 @@ export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQu decode: QueryModuleAccountsResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccounts", - clientResolver + clientResolver, + deps: [QueryModuleAccountsRequest, QueryModuleAccountsResponse] }); export const useGetModuleAccounts = buildUseQuery({ builderQueryFn: createGetModuleAccounts, @@ -61,7 +66,8 @@ export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => bu decode: QueryModuleAccountByNameResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccountByName", - clientResolver + clientResolver, + deps: [QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse] }); export const useGetModuleAccountByName = buildUseQuery({ builderQueryFn: createGetModuleAccountByName, @@ -72,7 +78,8 @@ export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuer decode: Bech32PrefixResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Bech32Prefix", - clientResolver + clientResolver, + deps: [Bech32PrefixRequest, Bech32PrefixResponse] }); export const useGetBech32Prefix = buildUseQuery({ builderQueryFn: createGetBech32Prefix, @@ -83,7 +90,8 @@ export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => b decode: AddressBytesToStringResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressBytesToString", - clientResolver + clientResolver, + deps: [AddressBytesToStringRequest, AddressBytesToStringResponse] }); export const useGetAddressBytesToString = buildUseQuery({ builderQueryFn: createGetAddressBytesToString, @@ -94,7 +102,8 @@ export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => b decode: AddressStringToBytesResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressStringToBytes", - clientResolver + clientResolver, + deps: [AddressStringToBytesRequest, AddressStringToBytesResponse] }); export const useGetAddressStringToBytes = buildUseQuery({ builderQueryFn: createGetAddressStringToBytes, @@ -105,7 +114,8 @@ export const createGetAccountInfo = (clientResolver?: RpcResolver) => buildQuery decode: QueryAccountInfoResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountInfo", - clientResolver + clientResolver, + deps: [QueryAccountInfoRequest, QueryAccountInfoResponse] }); export const useGetAccountInfo = buildUseQuery({ builderQueryFn: createGetAccountInfo, diff --git a/libs/injective-react/src/cosmos/auth/v1beta1/query.ts b/libs/injective-react/src/cosmos/auth/v1beta1/query.ts index 13eb3d8e..1074a756 100644 --- a/libs/injective-react/src/cosmos/auth/v1beta1/query.ts +++ b/libs/injective-react/src/cosmos/auth/v1beta1/query.ts @@ -3,8 +3,8 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth"; import { EthAccount, EthAccountProtoMsg } from "../../../injective/types/v1beta1/account"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. * @@ -557,10 +557,11 @@ export const QueryAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", value: QueryAccountsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsRequest.typeUrl, QueryAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsRequest.aminoType, QueryAccountsRequest.typeUrl); function createBaseQueryAccountsResponse(): QueryAccountsResponse { return { accounts: [], @@ -649,10 +650,13 @@ export const QueryAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", value: QueryAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsResponse.typeUrl, QueryAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsResponse.aminoType, QueryAccountsResponse.typeUrl); function createBaseQueryAccountRequest(): QueryAccountRequest { return { address: "" @@ -727,10 +731,9 @@ export const QueryAccountRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", value: QueryAccountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountRequest.typeUrl, QueryAccountRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountRequest.aminoType, QueryAccountRequest.typeUrl); function createBaseQueryAccountResponse(): QueryAccountResponse { return { account: undefined @@ -805,10 +808,12 @@ export const QueryAccountResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", value: QueryAccountResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountResponse.typeUrl, QueryAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountResponse.aminoType, QueryAccountResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -870,10 +875,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -948,10 +952,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest { return {}; } @@ -1013,10 +1018,9 @@ export const QueryModuleAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", value: QueryModuleAccountsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountsRequest.typeUrl, QueryModuleAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsRequest.aminoType, QueryModuleAccountsRequest.typeUrl); function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse { return { accounts: [] @@ -1093,10 +1097,11 @@ export const QueryModuleAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", value: QueryModuleAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountsResponse.typeUrl, QueryModuleAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsResponse.aminoType, QueryModuleAccountsResponse.typeUrl); function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRequest { return { name: "" @@ -1171,10 +1176,9 @@ export const QueryModuleAccountByNameRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", value: QueryModuleAccountByNameRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameRequest.typeUrl, QueryModuleAccountByNameRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameRequest.aminoType, QueryModuleAccountByNameRequest.typeUrl); function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameResponse { return { account: undefined @@ -1249,10 +1253,11 @@ export const QueryModuleAccountByNameResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", value: QueryModuleAccountByNameResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameResponse.typeUrl, QueryModuleAccountByNameResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameResponse.aminoType, QueryModuleAccountByNameResponse.typeUrl); function createBaseBech32PrefixRequest(): Bech32PrefixRequest { return {}; } @@ -1314,10 +1319,9 @@ export const Bech32PrefixRequest = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", value: Bech32PrefixRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixRequest.typeUrl, Bech32PrefixRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixRequest.aminoType, Bech32PrefixRequest.typeUrl); function createBaseBech32PrefixResponse(): Bech32PrefixResponse { return { bech32Prefix: "" @@ -1392,10 +1396,9 @@ export const Bech32PrefixResponse = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", value: Bech32PrefixResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixResponse.typeUrl, Bech32PrefixResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixResponse.aminoType, Bech32PrefixResponse.typeUrl); function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest { return { addressBytes: new Uint8Array() @@ -1470,10 +1473,9 @@ export const AddressBytesToStringRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", value: AddressBytesToStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringRequest.typeUrl, AddressBytesToStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringRequest.aminoType, AddressBytesToStringRequest.typeUrl); function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse { return { addressString: "" @@ -1548,10 +1550,9 @@ export const AddressBytesToStringResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", value: AddressBytesToStringResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringResponse.typeUrl, AddressBytesToStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringResponse.aminoType, AddressBytesToStringResponse.typeUrl); function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest { return { addressString: "" @@ -1626,10 +1627,9 @@ export const AddressStringToBytesRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", value: AddressStringToBytesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesRequest.typeUrl, AddressStringToBytesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesRequest.aminoType, AddressStringToBytesRequest.typeUrl); function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse { return { addressBytes: new Uint8Array() @@ -1704,10 +1704,9 @@ export const AddressStringToBytesResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", value: AddressStringToBytesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesResponse.typeUrl, AddressStringToBytesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesResponse.aminoType, AddressStringToBytesResponse.typeUrl); function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequest { return { id: BigInt(0), @@ -1794,10 +1793,9 @@ export const QueryAccountAddressByIDRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", value: QueryAccountAddressByIDRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDRequest.typeUrl, QueryAccountAddressByIDRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDRequest.aminoType, QueryAccountAddressByIDRequest.typeUrl); function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDResponse { return { accountAddress: "" @@ -1872,10 +1870,9 @@ export const QueryAccountAddressByIDResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", value: QueryAccountAddressByIDResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDResponse.typeUrl, QueryAccountAddressByIDResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDResponse.aminoType, QueryAccountAddressByIDResponse.typeUrl); function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest { return { address: "" @@ -1950,10 +1947,9 @@ export const QueryAccountInfoRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest", value: QueryAccountInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountInfoRequest.typeUrl, QueryAccountInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoRequest.aminoType, QueryAccountInfoRequest.typeUrl); function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse { return { info: undefined @@ -2028,7 +2024,8 @@ export const QueryAccountInfoResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse", value: QueryAccountInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryAccountInfoResponse.typeUrl, QueryAccountInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoResponse.aminoType, QueryAccountInfoResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/authz/v1beta1/authz.ts b/libs/injective-react/src/cosmos/authz/v1beta1/authz.ts index e71c3fee..87272802 100644 --- a/libs/injective-react/src/cosmos/authz/v1beta1/authz.ts +++ b/libs/injective-react/src/cosmos/authz/v1beta1/authz.ts @@ -187,10 +187,12 @@ export const GenericAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", value: GenericAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); } }; -GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); function createBaseGrant(): Grant { return { authorization: undefined, @@ -277,10 +279,11 @@ export const Grant = { typeUrl: "/cosmos.authz.v1beta1.Grant", value: Grant.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Grant.typeUrl, Grant); -GlobalDecoderRegistry.registerAminoProtoMapping(Grant.aminoType, Grant.typeUrl); function createBaseGrantAuthorization(): GrantAuthorization { return { granter: "", @@ -391,10 +394,11 @@ export const GrantAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", value: GrantAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GrantAuthorization.typeUrl, GrantAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantAuthorization.aminoType, GrantAuthorization.typeUrl); function createBaseGrantQueueItem(): GrantQueueItem { return { msgTypeUrls: [] @@ -471,7 +475,6 @@ export const GrantQueueItem = { typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", value: GrantQueueItem.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GrantQueueItem.typeUrl, GrantQueueItem); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantQueueItem.aminoType, GrantQueueItem.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts index de818f66..0f34bbad 100644 --- a/libs/injective-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; export const createGrant = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgGrant.typeUrl, encoders: toEncoders(MsgGrant), - converters: toConverters(MsgGrant) + converters: toConverters(MsgGrant), + deps: [MsgGrant] }); export const useGrant = buildUseMutation({ builderMutationFn: createGrant @@ -15,7 +16,8 @@ export const createExec = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createExec @@ -24,7 +26,8 @@ export const createRevoke = (clientResolver?: SigningClientResolver) => buildTx< clientResolver, typeUrl: MsgRevoke.typeUrl, encoders: toEncoders(MsgRevoke), - converters: toConverters(MsgRevoke) + converters: toConverters(MsgRevoke), + deps: [MsgRevoke] }); export const useRevoke = buildUseMutation({ builderMutationFn: createRevoke diff --git a/libs/injective-react/src/cosmos/authz/v1beta1/tx.ts b/libs/injective-react/src/cosmos/authz/v1beta1/tx.ts index 80640ebe..265830cc 100644 --- a/libs/injective-react/src/cosmos/authz/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/authz/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Grant, GrantAmino } from "./authz"; import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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. @@ -237,10 +237,11 @@ export const MsgGrant = { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.encode(message).finish() }; + }, + registerTypeUrl() { + Grant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgGrant.typeUrl, MsgGrant); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrant.aminoType, MsgGrant.typeUrl); function createBaseMsgGrantResponse(): MsgGrantResponse { return {}; } @@ -302,10 +303,9 @@ export const MsgGrantResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", value: MsgGrantResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantResponse.typeUrl, MsgGrantResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantResponse.aminoType, MsgGrantResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { grantee: "", @@ -394,10 +394,9 @@ export const MsgExec = { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { results: [] @@ -474,10 +473,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgRevoke(): MsgRevoke { return { granter: "", @@ -576,10 +574,9 @@ export const MsgRevoke = { typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevoke.typeUrl, MsgRevoke); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevoke.aminoType, MsgRevoke.typeUrl); function createBaseMsgRevokeResponse(): MsgRevokeResponse { return {}; } @@ -641,7 +638,6 @@ export const MsgRevokeResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", value: MsgRevokeResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRevokeResponse.typeUrl, MsgRevokeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeResponse.aminoType, MsgRevokeResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/bank/v1beta1/bank.ts b/libs/injective-react/src/cosmos/bank/v1beta1/bank.ts index 2c115ba3..0deb436b 100644 --- a/libs/injective-react/src/cosmos/bank/v1beta1/bank.ts +++ b/libs/injective-react/src/cosmos/bank/v1beta1/bank.ts @@ -346,10 +346,11 @@ export const Params = { typeUrl: "/cosmos.bank.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseSendEnabled(): SendEnabled { return { denom: "", @@ -436,10 +437,9 @@ export const SendEnabled = { typeUrl: "/cosmos.bank.v1beta1.SendEnabled", value: SendEnabled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SendEnabled.typeUrl, SendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(SendEnabled.aminoType, SendEnabled.typeUrl); function createBaseInput(): Input { return { address: "", @@ -528,10 +528,11 @@ export const Input = { typeUrl: "/cosmos.bank.v1beta1.Input", value: Input.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Input.typeUrl, Input); -GlobalDecoderRegistry.registerAminoProtoMapping(Input.aminoType, Input.typeUrl); function createBaseOutput(): Output { return { address: "", @@ -620,10 +621,11 @@ export const Output = { typeUrl: "/cosmos.bank.v1beta1.Output", value: Output.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Output.typeUrl, Output); -GlobalDecoderRegistry.registerAminoProtoMapping(Output.aminoType, Output.typeUrl); function createBaseSupply(): Supply { return { total: [] @@ -700,10 +702,13 @@ export const Supply = { typeUrl: "/cosmos.bank.v1beta1.Supply", value: Supply.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(Supply.typeUrl, Supply); + GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Supply.typeUrl, Supply); -GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); function createBaseDenomUnit(): DenomUnit { return { denom: "", @@ -804,10 +809,9 @@ export const DenomUnit = { typeUrl: "/cosmos.bank.v1beta1.DenomUnit", value: DenomUnit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DenomUnit.typeUrl, DenomUnit); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomUnit.aminoType, DenomUnit.typeUrl); function createBaseMetadata(): Metadata { return { description: "", @@ -968,7 +972,8 @@ export const Metadata = { typeUrl: "/cosmos.bank.v1beta1.Metadata", value: Metadata.encode(message).finish() }; + }, + registerTypeUrl() { + DenomUnit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Metadata.typeUrl, Metadata); -GlobalDecoderRegistry.registerAminoProtoMapping(Metadata.aminoType, Metadata.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/bank/v1beta1/query.rpc.func.ts b/libs/injective-react/src/cosmos/bank/v1beta1/query.rpc.func.ts index 3ba6a682..024880f8 100644 --- a/libs/injective-react/src/cosmos/bank/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/cosmos/bank/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetBalance = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetBalance, @@ -17,7 +18,8 @@ export const createGetAllBalances = (clientResolver?: RpcResolver) => buildQuery decode: QueryAllBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "AllBalances", - clientResolver + clientResolver, + deps: [QueryAllBalancesRequest, QueryAllBalancesResponse] }); export const useGetAllBalances = buildUseQuery({ builderQueryFn: createGetAllBalances, @@ -28,7 +30,8 @@ export const createGetSpendableBalances = (clientResolver?: RpcResolver) => buil decode: QuerySpendableBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalances", - clientResolver + clientResolver, + deps: [QuerySpendableBalancesRequest, QuerySpendableBalancesResponse] }); export const useGetSpendableBalances = buildUseQuery({ builderQueryFn: createGetSpendableBalances, @@ -39,7 +42,8 @@ export const createGetSpendableBalanceByDenom = (clientResolver?: RpcResolver) = decode: QuerySpendableBalanceByDenomResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalanceByDenom", - clientResolver + clientResolver, + deps: [QuerySpendableBalanceByDenomRequest, QuerySpendableBalanceByDenomResponse] }); export const useGetSpendableBalanceByDenom = buildUseQuery({ builderQueryFn: createGetSpendableBalanceByDenom, @@ -50,7 +54,8 @@ export const createGetTotalSupply = (clientResolver?: RpcResolver) => buildQuery decode: QueryTotalSupplyResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "TotalSupply", - clientResolver + clientResolver, + deps: [QueryTotalSupplyRequest, QueryTotalSupplyResponse] }); export const useGetTotalSupply = buildUseQuery({ builderQueryFn: createGetTotalSupply, @@ -61,7 +66,8 @@ export const createGetSupplyOf = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetSupplyOf, @@ -72,7 +78,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -83,7 +90,8 @@ export const createGetDenomMetadata = (clientResolver?: RpcResolver) => buildQue decode: QueryDenomMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadata", - clientResolver + clientResolver, + deps: [QueryDenomMetadataRequest, QueryDenomMetadataResponse] }); export const useGetDenomMetadata = buildUseQuery({ builderQueryFn: createGetDenomMetadata, @@ -94,7 +102,8 @@ export const createGetDenomMetadataByQueryString = (clientResolver?: RpcResolver decode: QueryDenomMetadataByQueryStringResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadataByQueryString", - clientResolver + clientResolver, + deps: [QueryDenomMetadataByQueryStringRequest, QueryDenomMetadataByQueryStringResponse] }); export const useGetDenomMetadataByQueryString = buildUseQuery({ builderQueryFn: createGetDenomMetadataByQueryString, @@ -105,7 +114,8 @@ export const createGetDenomsMetadata = (clientResolver?: RpcResolver) => buildQu decode: QueryDenomsMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomsMetadata", - clientResolver + clientResolver, + deps: [QueryDenomsMetadataRequest, QueryDenomsMetadataResponse] }); export const useGetDenomsMetadata = buildUseQuery({ builderQueryFn: createGetDenomsMetadata, @@ -116,7 +126,8 @@ export const createGetDenomOwners = (clientResolver?: RpcResolver) => buildQuery decode: QueryDenomOwnersResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwners", - clientResolver + clientResolver, + deps: [QueryDenomOwnersRequest, QueryDenomOwnersResponse] }); export const useGetDenomOwners = buildUseQuery({ builderQueryFn: createGetDenomOwners, @@ -127,7 +138,8 @@ export const createGetDenomOwnersByQuery = (clientResolver?: RpcResolver) => bui decode: QueryDenomOwnersByQueryResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwnersByQuery", - clientResolver + clientResolver, + deps: [QueryDenomOwnersByQueryRequest, QueryDenomOwnersByQueryResponse] }); export const useGetDenomOwnersByQuery = buildUseQuery({ builderQueryFn: createGetDenomOwnersByQuery, @@ -138,7 +150,8 @@ export const createGetSendEnabled = (clientResolver?: RpcResolver) => buildQuery decode: QuerySendEnabledResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SendEnabled", - clientResolver + clientResolver, + deps: [QuerySendEnabledRequest, QuerySendEnabledResponse] }); export const useGetSendEnabled = buildUseQuery({ builderQueryFn: createGetSendEnabled, diff --git a/libs/injective-react/src/cosmos/bank/v1beta1/query.ts b/libs/injective-react/src/cosmos/bank/v1beta1/query.ts index 45f3fa82..f8f232a5 100644 --- a/libs/injective-react/src/cosmos/bank/v1beta1/query.ts +++ b/libs/injective-react/src/cosmos/bank/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino, Metadata, MetadataAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ export interface QueryBalanceRequest { /** address is the address to query balances for. */ @@ -810,10 +809,9 @@ export const QueryBalanceRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", value: QueryBalanceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceRequest.typeUrl, QueryBalanceRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceRequest.aminoType, QueryBalanceRequest.typeUrl); function createBaseQueryBalanceResponse(): QueryBalanceResponse { return { balance: undefined @@ -888,10 +886,11 @@ export const QueryBalanceResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", value: QueryBalanceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceResponse.typeUrl, QueryBalanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceResponse.aminoType, QueryBalanceResponse.typeUrl); function createBaseQueryAllBalancesRequest(): QueryAllBalancesRequest { return { address: "", @@ -990,10 +989,11 @@ export const QueryAllBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", value: QueryAllBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesRequest.typeUrl, QueryAllBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesRequest.aminoType, QueryAllBalancesRequest.typeUrl); function createBaseQueryAllBalancesResponse(): QueryAllBalancesResponse { return { balances: [], @@ -1082,10 +1082,12 @@ export const QueryAllBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", value: QueryAllBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesResponse.typeUrl, QueryAllBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesResponse.aminoType, QueryAllBalancesResponse.typeUrl); function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { return { address: "", @@ -1172,10 +1174,11 @@ export const QuerySpendableBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", value: QuerySpendableBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesRequest.typeUrl, QuerySpendableBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesRequest.aminoType, QuerySpendableBalancesRequest.typeUrl); function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { return { balances: [], @@ -1264,10 +1267,12 @@ export const QuerySpendableBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", value: QuerySpendableBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesResponse.typeUrl, QuerySpendableBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesResponse.aminoType, QuerySpendableBalancesResponse.typeUrl); function createBaseQuerySpendableBalanceByDenomRequest(): QuerySpendableBalanceByDenomRequest { return { address: "", @@ -1354,10 +1359,9 @@ export const QuerySpendableBalanceByDenomRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", value: QuerySpendableBalanceByDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomRequest.typeUrl, QuerySpendableBalanceByDenomRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomRequest.aminoType, QuerySpendableBalanceByDenomRequest.typeUrl); function createBaseQuerySpendableBalanceByDenomResponse(): QuerySpendableBalanceByDenomResponse { return { balance: undefined @@ -1432,10 +1436,11 @@ export const QuerySpendableBalanceByDenomResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", value: QuerySpendableBalanceByDenomResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomResponse.typeUrl, QuerySpendableBalanceByDenomResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomResponse.aminoType, QuerySpendableBalanceByDenomResponse.typeUrl); function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { return { pagination: undefined @@ -1510,10 +1515,11 @@ export const QueryTotalSupplyRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", value: QueryTotalSupplyRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyRequest.typeUrl, QueryTotalSupplyRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyRequest.aminoType, QueryTotalSupplyRequest.typeUrl); function createBaseQueryTotalSupplyResponse(): QueryTotalSupplyResponse { return { supply: [], @@ -1602,10 +1608,12 @@ export const QueryTotalSupplyResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", value: QueryTotalSupplyResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyResponse.typeUrl, QueryTotalSupplyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyResponse.aminoType, QueryTotalSupplyResponse.typeUrl); function createBaseQuerySupplyOfRequest(): QuerySupplyOfRequest { return { denom: "" @@ -1680,10 +1688,9 @@ export const QuerySupplyOfRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", value: QuerySupplyOfRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySupplyOfRequest.typeUrl, QuerySupplyOfRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfRequest.aminoType, QuerySupplyOfRequest.typeUrl); function createBaseQuerySupplyOfResponse(): QuerySupplyOfResponse { return { amount: Coin.fromPartial({}) @@ -1758,10 +1765,11 @@ export const QuerySupplyOfResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", value: QuerySupplyOfResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySupplyOfResponse.typeUrl, QuerySupplyOfResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfResponse.aminoType, QuerySupplyOfResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -1823,10 +1831,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -1901,10 +1908,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDenomsMetadataRequest(): QueryDenomsMetadataRequest { return { pagination: undefined @@ -1979,10 +1987,11 @@ export const QueryDenomsMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", value: QueryDenomsMetadataRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataRequest.typeUrl, QueryDenomsMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataRequest.aminoType, QueryDenomsMetadataRequest.typeUrl); function createBaseQueryDenomsMetadataResponse(): QueryDenomsMetadataResponse { return { metadatas: [], @@ -2071,10 +2080,12 @@ export const QueryDenomsMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", value: QueryDenomsMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataResponse.typeUrl, QueryDenomsMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataResponse.aminoType, QueryDenomsMetadataResponse.typeUrl); function createBaseQueryDenomMetadataRequest(): QueryDenomMetadataRequest { return { denom: "" @@ -2149,10 +2160,9 @@ export const QueryDenomMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", value: QueryDenomMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataRequest.typeUrl, QueryDenomMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataRequest.aminoType, QueryDenomMetadataRequest.typeUrl); function createBaseQueryDenomMetadataResponse(): QueryDenomMetadataResponse { return { metadata: Metadata.fromPartial({}) @@ -2227,10 +2237,11 @@ export const QueryDenomMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", value: QueryDenomMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataResponse.typeUrl, QueryDenomMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataResponse.aminoType, QueryDenomMetadataResponse.typeUrl); function createBaseQueryDenomMetadataByQueryStringRequest(): QueryDenomMetadataByQueryStringRequest { return { denom: "" @@ -2305,10 +2316,9 @@ export const QueryDenomMetadataByQueryStringRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", value: QueryDenomMetadataByQueryStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringRequest.typeUrl, QueryDenomMetadataByQueryStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringRequest.aminoType, QueryDenomMetadataByQueryStringRequest.typeUrl); function createBaseQueryDenomMetadataByQueryStringResponse(): QueryDenomMetadataByQueryStringResponse { return { metadata: Metadata.fromPartial({}) @@ -2383,10 +2393,11 @@ export const QueryDenomMetadataByQueryStringResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", value: QueryDenomMetadataByQueryStringResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringResponse.typeUrl, QueryDenomMetadataByQueryStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringResponse.aminoType, QueryDenomMetadataByQueryStringResponse.typeUrl); function createBaseQueryDenomOwnersRequest(): QueryDenomOwnersRequest { return { denom: "", @@ -2473,10 +2484,11 @@ export const QueryDenomOwnersRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", value: QueryDenomOwnersRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersRequest.typeUrl, QueryDenomOwnersRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersRequest.aminoType, QueryDenomOwnersRequest.typeUrl); function createBaseDenomOwner(): DenomOwner { return { address: "", @@ -2563,10 +2575,11 @@ export const DenomOwner = { typeUrl: "/cosmos.bank.v1beta1.DenomOwner", value: DenomOwner.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DenomOwner.typeUrl, DenomOwner); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomOwner.aminoType, DenomOwner.typeUrl); function createBaseQueryDenomOwnersResponse(): QueryDenomOwnersResponse { return { denomOwners: [], @@ -2655,10 +2668,12 @@ export const QueryDenomOwnersResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", value: QueryDenomOwnersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersResponse.typeUrl, QueryDenomOwnersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersResponse.aminoType, QueryDenomOwnersResponse.typeUrl); function createBaseQueryDenomOwnersByQueryRequest(): QueryDenomOwnersByQueryRequest { return { denom: "", @@ -2745,10 +2760,11 @@ export const QueryDenomOwnersByQueryRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", value: QueryDenomOwnersByQueryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryRequest.typeUrl, QueryDenomOwnersByQueryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryRequest.aminoType, QueryDenomOwnersByQueryRequest.typeUrl); function createBaseQueryDenomOwnersByQueryResponse(): QueryDenomOwnersByQueryResponse { return { denomOwners: [], @@ -2837,10 +2853,12 @@ export const QueryDenomOwnersByQueryResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", value: QueryDenomOwnersByQueryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryResponse.typeUrl, QueryDenomOwnersByQueryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryResponse.aminoType, QueryDenomOwnersByQueryResponse.typeUrl); function createBaseQuerySendEnabledRequest(): QuerySendEnabledRequest { return { denoms: [], @@ -2929,10 +2947,11 @@ export const QuerySendEnabledRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledRequest", value: QuerySendEnabledRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySendEnabledRequest.typeUrl, QuerySendEnabledRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledRequest.aminoType, QuerySendEnabledRequest.typeUrl); function createBaseQuerySendEnabledResponse(): QuerySendEnabledResponse { return { sendEnabled: [], @@ -3021,7 +3040,9 @@ export const QuerySendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledResponse", value: QuerySendEnabledResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); + PageResponse.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QuerySendEnabledResponse.typeUrl, QuerySendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledResponse.aminoType, QuerySendEnabledResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts index aa76bfe3..08715cb8 100644 --- a/libs/injective-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSend, MsgMultiSend, MsgUpdateParams, MsgSetSendEnabled } from "./tx"; export const createSend = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSend.typeUrl, encoders: toEncoders(MsgSend), - converters: toConverters(MsgSend) + converters: toConverters(MsgSend), + deps: [MsgSend] }); export const useSend = buildUseMutation({ builderMutationFn: createSend @@ -15,7 +16,8 @@ export const createMultiSend = (clientResolver?: SigningClientResolver) => build clientResolver, typeUrl: MsgMultiSend.typeUrl, encoders: toEncoders(MsgMultiSend), - converters: toConverters(MsgMultiSend) + converters: toConverters(MsgMultiSend), + deps: [MsgMultiSend] }); export const useMultiSend = buildUseMutation({ builderMutationFn: createMultiSend @@ -24,7 +26,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -33,7 +36,8 @@ export const createSetSendEnabled = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSetSendEnabled.typeUrl, encoders: toEncoders(MsgSetSendEnabled), - converters: toConverters(MsgSetSendEnabled) + converters: toConverters(MsgSetSendEnabled), + deps: [MsgSetSendEnabled] }); export const useSetSendEnabled = buildUseMutation({ builderMutationFn: createSetSendEnabled diff --git a/libs/injective-react/src/cosmos/bank/v1beta1/tx.ts b/libs/injective-react/src/cosmos/bank/v1beta1/tx.ts index afc67365..97a8d819 100644 --- a/libs/injective-react/src/cosmos/bank/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/bank/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Input, InputAmino, Output, OutputAmino, Params, ParamsAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgSend represents a message to send coins from one account to another. */ export interface MsgSend { fromAddress: string; @@ -305,10 +304,11 @@ export const MsgSend = { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSend.typeUrl, MsgSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSend.aminoType, MsgSend.typeUrl); function createBaseMsgSendResponse(): MsgSendResponse { return {}; } @@ -370,10 +370,9 @@ export const MsgSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", value: MsgSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSendResponse.typeUrl, MsgSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSendResponse.aminoType, MsgSendResponse.typeUrl); function createBaseMsgMultiSend(): MsgMultiSend { return { inputs: [], @@ -464,10 +463,12 @@ export const MsgMultiSend = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.encode(message).finish() }; + }, + registerTypeUrl() { + Input.registerTypeUrl(); + Output.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgMultiSend.typeUrl, MsgMultiSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSend.aminoType, MsgMultiSend.typeUrl); function createBaseMsgMultiSendResponse(): MsgMultiSendResponse { return {}; } @@ -529,10 +530,9 @@ export const MsgMultiSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", value: MsgMultiSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMultiSendResponse.typeUrl, MsgMultiSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSendResponse.aminoType, MsgMultiSendResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -619,10 +619,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -684,10 +685,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSetSendEnabled(): MsgSetSendEnabled { return { authority: "", @@ -790,10 +790,11 @@ export const MsgSetSendEnabled = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", value: MsgSetSendEnabled.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSetSendEnabled.typeUrl, MsgSetSendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabled.aminoType, MsgSetSendEnabled.typeUrl); function createBaseMsgSetSendEnabledResponse(): MsgSetSendEnabledResponse { return {}; } @@ -855,7 +856,6 @@ export const MsgSetSendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", value: MsgSetSendEnabledResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgSetSendEnabledResponse.typeUrl, MsgSetSendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabledResponse.aminoType, MsgSetSendEnabledResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/base/abci/v1beta1/abci.ts b/libs/injective-react/src/cosmos/base/abci/v1beta1/abci.ts index 06316ec9..f8346d6a 100644 --- a/libs/injective-react/src/cosmos/base/abci/v1beta1/abci.ts +++ b/libs/injective-react/src/cosmos/base/abci/v1beta1/abci.ts @@ -3,7 +3,6 @@ import { Event, EventAmino } from "../../../../tendermint/abci/types"; import { Block, BlockAmino } from "../../../../tendermint/types/block"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * TxResponse defines a structure containing relevant tx data and metadata. The * tags are stringified and the log is JSON decoded. @@ -644,10 +643,11 @@ export const TxResponse = { typeUrl: "/cosmos.base.abci.v1beta1.TxResponse", value: TxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResponse.typeUrl, TxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxResponse.aminoType, TxResponse.typeUrl); function createBaseABCIMessageLog(): ABCIMessageLog { return { msgIndex: 0, @@ -748,10 +748,11 @@ export const ABCIMessageLog = { typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog", value: ABCIMessageLog.encode(message).finish() }; + }, + registerTypeUrl() { + StringEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ABCIMessageLog.typeUrl, ABCIMessageLog); -GlobalDecoderRegistry.registerAminoProtoMapping(ABCIMessageLog.aminoType, ABCIMessageLog.typeUrl); function createBaseStringEvent(): StringEvent { return { type: "", @@ -840,10 +841,11 @@ export const StringEvent = { typeUrl: "/cosmos.base.abci.v1beta1.StringEvent", value: StringEvent.encode(message).finish() }; + }, + registerTypeUrl() { + Attribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StringEvent.typeUrl, StringEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(StringEvent.aminoType, StringEvent.typeUrl); function createBaseAttribute(): Attribute { return { key: "", @@ -930,10 +932,9 @@ export const Attribute = { typeUrl: "/cosmos.base.abci.v1beta1.Attribute", value: Attribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Attribute.typeUrl, Attribute); -GlobalDecoderRegistry.registerAminoProtoMapping(Attribute.aminoType, Attribute.typeUrl); function createBaseGasInfo(): GasInfo { return { gasWanted: BigInt(0), @@ -1020,10 +1021,9 @@ export const GasInfo = { typeUrl: "/cosmos.base.abci.v1beta1.GasInfo", value: GasInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GasInfo.typeUrl, GasInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GasInfo.aminoType, GasInfo.typeUrl); function createBaseResult(): Result { return { data: new Uint8Array(), @@ -1138,10 +1138,9 @@ export const Result = { typeUrl: "/cosmos.base.abci.v1beta1.Result", value: Result.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Result.typeUrl, Result); -GlobalDecoderRegistry.registerAminoProtoMapping(Result.aminoType, Result.typeUrl); function createBaseSimulationResponse(): SimulationResponse { return { gasInfo: GasInfo.fromPartial({}), @@ -1228,10 +1227,12 @@ export const SimulationResponse = { typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse", value: SimulationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulationResponse.typeUrl, SimulationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulationResponse.aminoType, SimulationResponse.typeUrl); function createBaseMsgData(): MsgData { return { msgType: "", @@ -1318,10 +1319,9 @@ export const MsgData = { typeUrl: "/cosmos.base.abci.v1beta1.MsgData", value: MsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgData.typeUrl, MsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgData.aminoType, MsgData.typeUrl); function createBaseTxMsgData(): TxMsgData { return { data: [], @@ -1412,10 +1412,9 @@ export const TxMsgData = { typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData", value: TxMsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxMsgData.typeUrl, TxMsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(TxMsgData.aminoType, TxMsgData.typeUrl); function createBaseSearchTxsResult(): SearchTxsResult { return { totalCount: BigInt(0), @@ -1552,10 +1551,11 @@ export const SearchTxsResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult", value: SearchTxsResult.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SearchTxsResult.typeUrl, SearchTxsResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchTxsResult.aminoType, SearchTxsResult.typeUrl); function createBaseSearchBlocksResult(): SearchBlocksResult { return { totalCount: BigInt(0), @@ -1692,7 +1692,8 @@ export const SearchBlocksResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchBlocksResult", value: SearchBlocksResult.encode(message).finish() }; + }, + registerTypeUrl() { + Block.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SearchBlocksResult.typeUrl, SearchBlocksResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchBlocksResult.aminoType, SearchBlocksResult.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/base/query/v1beta1/pagination.ts b/libs/injective-react/src/cosmos/base/query/v1beta1/pagination.ts index 35272ec2..c0f45d3f 100644 --- a/libs/injective-react/src/cosmos/base/query/v1beta1/pagination.ts +++ b/libs/injective-react/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * PageRequest is to be embedded in gRPC request messages for efficient * pagination. Ex: @@ -265,10 +264,9 @@ export const PageRequest = { typeUrl: "/cosmos.base.query.v1beta1.PageRequest", value: PageRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PageRequest.typeUrl, PageRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(PageRequest.aminoType, PageRequest.typeUrl); function createBasePageResponse(): PageResponse { return { nextKey: new Uint8Array(), @@ -355,7 +353,6 @@ export const PageResponse = { typeUrl: "/cosmos.base.query.v1beta1.PageResponse", value: PageResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PageResponse.typeUrl, PageResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(PageResponse.aminoType, PageResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/base/v1beta1/coin.ts b/libs/injective-react/src/cosmos/base/v1beta1/coin.ts index 155e8009..1b5f5906 100644 --- a/libs/injective-react/src/cosmos/base/v1beta1/coin.ts +++ b/libs/injective-react/src/cosmos/base/v1beta1/coin.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * Coin defines a token with a denomination and an amount. * @@ -187,10 +186,9 @@ export const Coin = { typeUrl: "/cosmos.base.v1beta1.Coin", value: Coin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Coin.typeUrl, Coin); -GlobalDecoderRegistry.registerAminoProtoMapping(Coin.aminoType, Coin.typeUrl); function createBaseDecCoin(): DecCoin { return { denom: "", @@ -277,10 +275,9 @@ export const DecCoin = { typeUrl: "/cosmos.base.v1beta1.DecCoin", value: DecCoin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecCoin.typeUrl, DecCoin); -GlobalDecoderRegistry.registerAminoProtoMapping(DecCoin.aminoType, DecCoin.typeUrl); function createBaseIntProto(): IntProto { return { int: "" @@ -355,10 +352,9 @@ export const IntProto = { typeUrl: "/cosmos.base.v1beta1.IntProto", value: IntProto.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IntProto.typeUrl, IntProto); -GlobalDecoderRegistry.registerAminoProtoMapping(IntProto.aminoType, IntProto.typeUrl); function createBaseDecProto(): DecProto { return { dec: "" @@ -433,7 +429,6 @@ export const DecProto = { typeUrl: "/cosmos.base.v1beta1.DecProto", value: DecProto.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(DecProto.typeUrl, DecProto); -GlobalDecoderRegistry.registerAminoProtoMapping(DecProto.aminoType, DecProto.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/crypto/ed25519/keys.ts b/libs/injective-react/src/cosmos/crypto/ed25519/keys.ts index 6f544d77..5b8f8515 100644 --- a/libs/injective-react/src/cosmos/crypto/ed25519/keys.ts +++ b/libs/injective-react/src/cosmos/crypto/ed25519/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. * It's needed for Any serialization and SDK compatibility. @@ -125,10 +124,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.ed25519.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -203,7 +201,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.ed25519.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/libs/injective-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 1d46639b..e8a32786 100644 --- a/libs/injective-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/libs/injective-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers @@ -129,10 +128,9 @@ export const MultiSignature = { typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature", value: MultiSignature.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MultiSignature.typeUrl, MultiSignature); -GlobalDecoderRegistry.registerAminoProtoMapping(MultiSignature.aminoType, MultiSignature.typeUrl); function createBaseCompactBitArray(): CompactBitArray { return { extraBitsStored: 0, @@ -219,7 +217,6 @@ export const CompactBitArray = { typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray", value: CompactBitArray.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CompactBitArray.typeUrl, CompactBitArray); -GlobalDecoderRegistry.registerAminoProtoMapping(CompactBitArray.aminoType, CompactBitArray.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/crypto/secp256k1/keys.ts b/libs/injective-react/src/cosmos/crypto/secp256k1/keys.ts index c0fdd0ac..423d256f 100644 --- a/libs/injective-react/src/cosmos/crypto/secp256k1/keys.ts +++ b/libs/injective-react/src/cosmos/crypto/secp256k1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey defines a secp256k1 public key * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte @@ -119,10 +118,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256k1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -197,7 +195,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256k1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/crypto/secp256r1/keys.ts b/libs/injective-react/src/cosmos/crypto/secp256r1/keys.ts index 6b1edf68..15e905e3 100644 --- a/libs/injective-react/src/cosmos/crypto/secp256r1/keys.ts +++ b/libs/injective-react/src/cosmos/crypto/secp256r1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** PubKey defines a secp256r1 ECDSA public key. */ export interface PubKey { /** @@ -117,10 +116,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256r1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { secret: new Uint8Array() @@ -195,7 +193,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256r1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/distribution/v1beta1/distribution.ts b/libs/injective-react/src/cosmos/distribution/v1beta1/distribution.ts index fdf747a5..a9de2203 100644 --- a/libs/injective-react/src/cosmos/distribution/v1beta1/distribution.ts +++ b/libs/injective-react/src/cosmos/distribution/v1beta1/distribution.ts @@ -458,10 +458,9 @@ export const Params = { typeUrl: "/cosmos.distribution.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards { return { cumulativeRewardRatio: [], @@ -550,10 +549,11 @@ export const ValidatorHistoricalRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", value: ValidatorHistoricalRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorHistoricalRewards.typeUrl, ValidatorHistoricalRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorHistoricalRewards.aminoType, ValidatorHistoricalRewards.typeUrl); function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards { return { rewards: [], @@ -642,10 +642,11 @@ export const ValidatorCurrentRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", value: ValidatorCurrentRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorCurrentRewards.typeUrl, ValidatorCurrentRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorCurrentRewards.aminoType, ValidatorCurrentRewards.typeUrl); function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission { return { commission: [] @@ -722,10 +723,11 @@ export const ValidatorAccumulatedCommission = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", value: ValidatorAccumulatedCommission.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorAccumulatedCommission.typeUrl, ValidatorAccumulatedCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorAccumulatedCommission.aminoType, ValidatorAccumulatedCommission.typeUrl); function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards { return { rewards: [] @@ -802,10 +804,11 @@ export const ValidatorOutstandingRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", value: ValidatorOutstandingRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorOutstandingRewards.typeUrl, ValidatorOutstandingRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorOutstandingRewards.aminoType, ValidatorOutstandingRewards.typeUrl); function createBaseValidatorSlashEvent(): ValidatorSlashEvent { return { validatorPeriod: BigInt(0), @@ -892,10 +895,9 @@ export const ValidatorSlashEvent = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", value: ValidatorSlashEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorSlashEvent.typeUrl, ValidatorSlashEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvent.aminoType, ValidatorSlashEvent.typeUrl); function createBaseValidatorSlashEvents(): ValidatorSlashEvents { return { validatorSlashEvents: [] @@ -972,10 +974,11 @@ export const ValidatorSlashEvents = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", value: ValidatorSlashEvents.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorSlashEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSlashEvents.typeUrl, ValidatorSlashEvents); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvents.aminoType, ValidatorSlashEvents.typeUrl); function createBaseFeePool(): FeePool { return { communityPool: [] @@ -1052,10 +1055,11 @@ export const FeePool = { typeUrl: "/cosmos.distribution.v1beta1.FeePool", value: FeePool.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeePool.typeUrl, FeePool); -GlobalDecoderRegistry.registerAminoProtoMapping(FeePool.aminoType, FeePool.typeUrl); function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal { return { title: "", @@ -1168,10 +1172,13 @@ export const CommunityPoolSpendProposal = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", value: CommunityPoolSpendProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); function createBaseDelegatorStartingInfo(): DelegatorStartingInfo { return { previousPeriod: BigInt(0), @@ -1270,10 +1277,9 @@ export const DelegatorStartingInfo = { typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", value: DelegatorStartingInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DelegatorStartingInfo.typeUrl, DelegatorStartingInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegatorStartingInfo.aminoType, DelegatorStartingInfo.typeUrl); function createBaseDelegationDelegatorReward(): DelegationDelegatorReward { return { validatorAddress: "", @@ -1362,10 +1368,11 @@ export const DelegationDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", value: DelegationDelegatorReward.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationDelegatorReward.typeUrl, DelegationDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationDelegatorReward.aminoType, DelegationDelegatorReward.typeUrl); function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit { return { title: "", @@ -1488,7 +1495,9 @@ export const CommunityPoolSpendProposalWithDeposit = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", value: CommunityPoolSpendProposalWithDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); } -}; -GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts index 79204615..026741df 100644 --- a/libs/injective-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgUpdateParams, MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool } from "./tx"; export const createSetWithdrawAddress = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSetWithdrawAddress.typeUrl, encoders: toEncoders(MsgSetWithdrawAddress), - converters: toConverters(MsgSetWithdrawAddress) + converters: toConverters(MsgSetWithdrawAddress), + deps: [MsgSetWithdrawAddress] }); export const useSetWithdrawAddress = buildUseMutation({ builderMutationFn: createSetWithdrawAddress @@ -15,7 +16,8 @@ export const createWithdrawDelegatorReward = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgWithdrawDelegatorReward.typeUrl, encoders: toEncoders(MsgWithdrawDelegatorReward), - converters: toConverters(MsgWithdrawDelegatorReward) + converters: toConverters(MsgWithdrawDelegatorReward), + deps: [MsgWithdrawDelegatorReward] }); export const useWithdrawDelegatorReward = buildUseMutation({ builderMutationFn: createWithdrawDelegatorReward @@ -24,7 +26,8 @@ export const createWithdrawValidatorCommission = (clientResolver?: SigningClient clientResolver, typeUrl: MsgWithdrawValidatorCommission.typeUrl, encoders: toEncoders(MsgWithdrawValidatorCommission), - converters: toConverters(MsgWithdrawValidatorCommission) + converters: toConverters(MsgWithdrawValidatorCommission), + deps: [MsgWithdrawValidatorCommission] }); export const useWithdrawValidatorCommission = buildUseMutation({ builderMutationFn: createWithdrawValidatorCommission @@ -33,7 +36,8 @@ export const createFundCommunityPool = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgFundCommunityPool.typeUrl, encoders: toEncoders(MsgFundCommunityPool), - converters: toConverters(MsgFundCommunityPool) + converters: toConverters(MsgFundCommunityPool), + deps: [MsgFundCommunityPool] }); export const useFundCommunityPool = buildUseMutation({ builderMutationFn: createFundCommunityPool @@ -42,7 +46,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -51,7 +56,8 @@ export const createCommunityPoolSpend = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgCommunityPoolSpend.typeUrl, encoders: toEncoders(MsgCommunityPoolSpend), - converters: toConverters(MsgCommunityPoolSpend) + converters: toConverters(MsgCommunityPoolSpend), + deps: [MsgCommunityPoolSpend] }); export const useCommunityPoolSpend = buildUseMutation({ builderMutationFn: createCommunityPoolSpend @@ -60,7 +66,8 @@ export const createDepositValidatorRewardsPool = (clientResolver?: SigningClient clientResolver, typeUrl: MsgDepositValidatorRewardsPool.typeUrl, encoders: toEncoders(MsgDepositValidatorRewardsPool), - converters: toConverters(MsgDepositValidatorRewardsPool) + converters: toConverters(MsgDepositValidatorRewardsPool), + deps: [MsgDepositValidatorRewardsPool] }); export const useDepositValidatorRewardsPool = buildUseMutation({ builderMutationFn: createDepositValidatorRewardsPool diff --git a/libs/injective-react/src/cosmos/distribution/v1beta1/tx.ts b/libs/injective-react/src/cosmos/distribution/v1beta1/tx.ts index 64517d0b..565af23f 100644 --- a/libs/injective-react/src/cosmos/distribution/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/distribution/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino } from "./distribution"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). @@ -429,10 +428,9 @@ export const MsgSetWithdrawAddress = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddress.typeUrl, MsgSetWithdrawAddress); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddress.aminoType, MsgSetWithdrawAddress.typeUrl); function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse { return {}; } @@ -494,10 +492,9 @@ export const MsgSetWithdrawAddressResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", value: MsgSetWithdrawAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddressResponse.typeUrl, MsgSetWithdrawAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddressResponse.aminoType, MsgSetWithdrawAddressResponse.typeUrl); function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { return { delegatorAddress: "", @@ -584,10 +581,9 @@ export const MsgWithdrawDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorReward.typeUrl, MsgWithdrawDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorReward.aminoType, MsgWithdrawDelegatorReward.typeUrl); function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse { return { amount: [] @@ -664,10 +660,11 @@ export const MsgWithdrawDelegatorRewardResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", value: MsgWithdrawDelegatorRewardResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorRewardResponse.typeUrl, MsgWithdrawDelegatorRewardResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorRewardResponse.aminoType, MsgWithdrawDelegatorRewardResponse.typeUrl); function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { return { validatorAddress: "" @@ -742,10 +739,9 @@ export const MsgWithdrawValidatorCommission = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommission.typeUrl, MsgWithdrawValidatorCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommission.aminoType, MsgWithdrawValidatorCommission.typeUrl); function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse { return { amount: [] @@ -822,10 +818,11 @@ export const MsgWithdrawValidatorCommissionResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", value: MsgWithdrawValidatorCommissionResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommissionResponse.typeUrl, MsgWithdrawValidatorCommissionResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommissionResponse.aminoType, MsgWithdrawValidatorCommissionResponse.typeUrl); function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { return { amount: [], @@ -914,10 +911,11 @@ export const MsgFundCommunityPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgFundCommunityPool.typeUrl, MsgFundCommunityPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPool.aminoType, MsgFundCommunityPool.typeUrl); function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse { return {}; } @@ -979,10 +977,9 @@ export const MsgFundCommunityPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", value: MsgFundCommunityPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgFundCommunityPoolResponse.typeUrl, MsgFundCommunityPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPoolResponse.aminoType, MsgFundCommunityPoolResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1069,10 +1066,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1134,10 +1132,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCommunityPoolSpend(): MsgCommunityPoolSpend { return { authority: "", @@ -1238,10 +1235,11 @@ export const MsgCommunityPoolSpend = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", value: MsgCommunityPoolSpend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpend.typeUrl, MsgCommunityPoolSpend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpend.aminoType, MsgCommunityPoolSpend.typeUrl); function createBaseMsgCommunityPoolSpendResponse(): MsgCommunityPoolSpendResponse { return {}; } @@ -1303,10 +1301,9 @@ export const MsgCommunityPoolSpendResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", value: MsgCommunityPoolSpendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpendResponse.typeUrl, MsgCommunityPoolSpendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpendResponse.aminoType, MsgCommunityPoolSpendResponse.typeUrl); function createBaseMsgDepositValidatorRewardsPool(): MsgDepositValidatorRewardsPool { return { depositor: "", @@ -1407,10 +1404,11 @@ export const MsgDepositValidatorRewardsPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", value: MsgDepositValidatorRewardsPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPool.typeUrl, MsgDepositValidatorRewardsPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPool.aminoType, MsgDepositValidatorRewardsPool.typeUrl); function createBaseMsgDepositValidatorRewardsPoolResponse(): MsgDepositValidatorRewardsPoolResponse { return {}; } @@ -1472,7 +1470,6 @@ export const MsgDepositValidatorRewardsPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", value: MsgDepositValidatorRewardsPoolResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPoolResponse.typeUrl, MsgDepositValidatorRewardsPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPoolResponse.aminoType, MsgDepositValidatorRewardsPoolResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts index 3cfc4271..70353a74 100644 --- a/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgGrantAllowance, MsgRevokeAllowance, MsgPruneAllowances } from "./tx"; export const createGrantAllowance = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgGrantAllowance.typeUrl, encoders: toEncoders(MsgGrantAllowance), - converters: toConverters(MsgGrantAllowance) + converters: toConverters(MsgGrantAllowance), + deps: [MsgGrantAllowance] }); export const useGrantAllowance = buildUseMutation({ builderMutationFn: createGrantAllowance @@ -15,7 +16,8 @@ export const createRevokeAllowance = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgRevokeAllowance.typeUrl, encoders: toEncoders(MsgRevokeAllowance), - converters: toConverters(MsgRevokeAllowance) + converters: toConverters(MsgRevokeAllowance), + deps: [MsgRevokeAllowance] }); export const useRevokeAllowance = buildUseMutation({ builderMutationFn: createRevokeAllowance @@ -24,7 +26,8 @@ export const createPruneAllowances = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgPruneAllowances.typeUrl, encoders: toEncoders(MsgPruneAllowances), - converters: toConverters(MsgPruneAllowances) + converters: toConverters(MsgPruneAllowances), + deps: [MsgPruneAllowances] }); export const usePruneAllowances = buildUseMutation({ builderMutationFn: createPruneAllowances diff --git a/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.ts b/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.ts index 9e674784..e5fd3d32 100644 --- a/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance * of fees from the account of Granter. @@ -227,10 +227,9 @@ export const MsgGrantAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowance.typeUrl, MsgGrantAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowance.aminoType, MsgGrantAllowance.typeUrl); function createBaseMsgGrantAllowanceResponse(): MsgGrantAllowanceResponse { return {}; } @@ -292,10 +291,9 @@ export const MsgGrantAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", value: MsgGrantAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowanceResponse.typeUrl, MsgGrantAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowanceResponse.aminoType, MsgGrantAllowanceResponse.typeUrl); function createBaseMsgRevokeAllowance(): MsgRevokeAllowance { return { granter: "", @@ -382,10 +380,9 @@ export const MsgRevokeAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowance.typeUrl, MsgRevokeAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowance.aminoType, MsgRevokeAllowance.typeUrl); function createBaseMsgRevokeAllowanceResponse(): MsgRevokeAllowanceResponse { return {}; } @@ -447,10 +444,9 @@ export const MsgRevokeAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", value: MsgRevokeAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowanceResponse.typeUrl, MsgRevokeAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowanceResponse.aminoType, MsgRevokeAllowanceResponse.typeUrl); function createBaseMsgPruneAllowances(): MsgPruneAllowances { return { pruner: "" @@ -525,10 +521,9 @@ export const MsgPruneAllowances = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances", value: MsgPruneAllowances.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAllowances.typeUrl, MsgPruneAllowances); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowances.aminoType, MsgPruneAllowances.typeUrl); function createBaseMsgPruneAllowancesResponse(): MsgPruneAllowancesResponse { return {}; } @@ -590,7 +585,6 @@ export const MsgPruneAllowancesResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", value: MsgPruneAllowancesResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAllowancesResponse.typeUrl, MsgPruneAllowancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowancesResponse.aminoType, MsgPruneAllowancesResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/gov/v1/gov.ts b/libs/injective-react/src/cosmos/gov/v1/gov.ts index 434920f3..d762a109 100644 --- a/libs/injective-react/src/cosmos/gov/v1/gov.ts +++ b/libs/injective-react/src/cosmos/gov/v1/gov.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** VoteOption enumerates the valid vote options for a given governance proposal. */ export enum VoteOption { /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ @@ -719,10 +718,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -823,10 +821,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1073,10 +1072,12 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1187,10 +1188,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1303,10 +1303,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1395,10 +1396,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: undefined @@ -1473,10 +1475,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: "", @@ -1575,10 +1576,9 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1.TallyParams", value: TallyParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); function createBaseParams(): Params { return { minDeposit: [], @@ -1837,7 +1837,8 @@ export const Params = { typeUrl: "/cosmos.gov.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/gov/v1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/gov/v1/tx.rpc.func.ts index cb094f2e..1e23e126 100644 --- a/libs/injective-react/src/cosmos/gov/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/gov/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSubmitProposal, MsgExecLegacyContent, MsgVote, MsgVoteWeighted, MsgDeposit, MsgUpdateParams, MsgCancelProposal } from "./tx"; export const createSubmitProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const useSubmitProposal = buildUseMutation({ builderMutationFn: createSubmitProposal @@ -15,7 +16,8 @@ export const createExecLegacyContent = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgExecLegacyContent.typeUrl, encoders: toEncoders(MsgExecLegacyContent), - converters: toConverters(MsgExecLegacyContent) + converters: toConverters(MsgExecLegacyContent), + deps: [MsgExecLegacyContent] }); export const useExecLegacyContent = buildUseMutation({ builderMutationFn: createExecLegacyContent @@ -24,7 +26,8 @@ export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createVote @@ -33,7 +36,8 @@ export const createVoteWeighted = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const useVoteWeighted = buildUseMutation({ builderMutationFn: createVoteWeighted @@ -42,7 +46,8 @@ export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const useDeposit = buildUseMutation({ builderMutationFn: createDeposit @@ -51,7 +56,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -60,7 +66,8 @@ export const createCancelProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgCancelProposal.typeUrl, encoders: toEncoders(MsgCancelProposal), - converters: toConverters(MsgCancelProposal) + converters: toConverters(MsgCancelProposal), + deps: [MsgCancelProposal] }); export const useCancelProposal = buildUseMutation({ builderMutationFn: createCancelProposal diff --git a/libs/injective-react/src/cosmos/gov/v1/tx.ts b/libs/injective-react/src/cosmos/gov/v1/tx.ts index d01c6807..16328bd2 100644 --- a/libs/injective-react/src/cosmos/gov/v1/tx.ts +++ b/libs/injective-react/src/cosmos/gov/v1/tx.ts @@ -545,10 +545,11 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -623,10 +624,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgExecLegacyContent(): MsgExecLegacyContent { return { content: undefined, @@ -713,10 +713,63 @@ export const MsgExecLegacyContent = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", value: MsgExecLegacyContent.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + StoreCodeProposal.registerTypeUrl(); + InstantiateContractProposal.registerTypeUrl(); + InstantiateContract2Proposal.registerTypeUrl(); + MigrateContractProposal.registerTypeUrl(); + SudoContractProposal.registerTypeUrl(); + ExecuteContractProposal.registerTypeUrl(); + UpdateAdminProposal.registerTypeUrl(); + ClearAdminProposal.registerTypeUrl(); + PinCodesProposal.registerTypeUrl(); + UnpinCodesProposal.registerTypeUrl(); + UpdateInstantiateConfigProposal.registerTypeUrl(); + StoreAndInstantiateContractProposal.registerTypeUrl(); + SpotMarketParamUpdateProposal.registerTypeUrl(); + BatchExchangeModificationProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + TradingRewardCampaignLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + TradingRewardPendingPointsUpdateProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + BatchCommunityPoolSpendProposal.registerTypeUrl(); + AtomicMarketOrderFeeMultiplierScheduleProposal.registerTypeUrl(); + SetConfigProposal.registerTypeUrl(); + SetBatchConfigProposal.registerTypeUrl(); + GrantBandOraclePrivilegeProposal.registerTypeUrl(); + RevokeBandOraclePrivilegeProposal.registerTypeUrl(); + GrantPriceFeederPrivilegeProposal.registerTypeUrl(); + GrantProviderPrivilegeProposal.registerTypeUrl(); + RevokeProviderPrivilegeProposal.registerTypeUrl(); + RevokePriceFeederPrivilegeProposal.registerTypeUrl(); + AuthorizeBandOracleRequestProposal.registerTypeUrl(); + UpdateBandOracleRequestProposal.registerTypeUrl(); + EnableBandIBCProposal.registerTypeUrl(); + GrantStorkPublisherPrivilegeProposal.registerTypeUrl(); + RevokeStorkPublisherPrivilegeProposal.registerTypeUrl(); + BlacklistEthereumAddressesProposal.registerTypeUrl(); + RevokeEthereumBlacklistProposal.registerTypeUrl(); + ContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractDeregistrationProposal.registerTypeUrl(); + ContractRegistrationRequest.registerTypeUrl(); + BatchStoreCodeProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecLegacyContent.typeUrl, MsgExecLegacyContent); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContent.aminoType, MsgExecLegacyContent.typeUrl); function createBaseMsgExecLegacyContentResponse(): MsgExecLegacyContentResponse { return {}; } @@ -778,10 +831,9 @@ export const MsgExecLegacyContentResponse = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", value: MsgExecLegacyContentResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecLegacyContentResponse.typeUrl, MsgExecLegacyContentResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContentResponse.aminoType, MsgExecLegacyContentResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -892,10 +944,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -957,10 +1008,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -1073,10 +1123,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -1138,10 +1189,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -1242,10 +1292,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -1307,10 +1358,9 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1397,10 +1447,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.gov.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1462,10 +1513,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.gov.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCancelProposal(): MsgCancelProposal { return { proposalId: BigInt(0), @@ -1552,10 +1602,9 @@ export const MsgCancelProposal = { typeUrl: "/cosmos.gov.v1.MsgCancelProposal", value: MsgCancelProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelProposal.typeUrl, MsgCancelProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposal.aminoType, MsgCancelProposal.typeUrl); function createBaseMsgCancelProposalResponse(): MsgCancelProposalResponse { return { proposalId: BigInt(0), @@ -1654,7 +1703,6 @@ export const MsgCancelProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgCancelProposalResponse", value: MsgCancelProposalResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCancelProposalResponse.typeUrl, MsgCancelProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposalResponse.aminoType, MsgCancelProposalResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/gov/v1beta1/gov.ts b/libs/injective-react/src/cosmos/gov/v1beta1/gov.ts index cf660d2d..cd304181 100644 --- a/libs/injective-react/src/cosmos/gov/v1beta1/gov.ts +++ b/libs/injective-react/src/cosmos/gov/v1beta1/gov.ts @@ -550,10 +550,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseTextProposal(): TextProposal { return { title: "", @@ -640,10 +639,12 @@ export const TextProposal = { typeUrl: "/cosmos.gov.v1beta1.TextProposal", value: TextProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); } }; -GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -744,10 +745,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1beta1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { proposalId: BigInt(0), @@ -920,10 +922,65 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1beta1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TextProposal.registerTypeUrl(); + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + StoreCodeProposal.registerTypeUrl(); + InstantiateContractProposal.registerTypeUrl(); + InstantiateContract2Proposal.registerTypeUrl(); + MigrateContractProposal.registerTypeUrl(); + SudoContractProposal.registerTypeUrl(); + ExecuteContractProposal.registerTypeUrl(); + UpdateAdminProposal.registerTypeUrl(); + ClearAdminProposal.registerTypeUrl(); + PinCodesProposal.registerTypeUrl(); + UnpinCodesProposal.registerTypeUrl(); + UpdateInstantiateConfigProposal.registerTypeUrl(); + StoreAndInstantiateContractProposal.registerTypeUrl(); + SpotMarketParamUpdateProposal.registerTypeUrl(); + BatchExchangeModificationProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + TradingRewardCampaignLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + TradingRewardPendingPointsUpdateProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + BatchCommunityPoolSpendProposal.registerTypeUrl(); + AtomicMarketOrderFeeMultiplierScheduleProposal.registerTypeUrl(); + SetConfigProposal.registerTypeUrl(); + SetBatchConfigProposal.registerTypeUrl(); + GrantBandOraclePrivilegeProposal.registerTypeUrl(); + RevokeBandOraclePrivilegeProposal.registerTypeUrl(); + GrantPriceFeederPrivilegeProposal.registerTypeUrl(); + GrantProviderPrivilegeProposal.registerTypeUrl(); + RevokeProviderPrivilegeProposal.registerTypeUrl(); + RevokePriceFeederPrivilegeProposal.registerTypeUrl(); + AuthorizeBandOracleRequestProposal.registerTypeUrl(); + UpdateBandOracleRequestProposal.registerTypeUrl(); + EnableBandIBCProposal.registerTypeUrl(); + GrantStorkPublisherPrivilegeProposal.registerTypeUrl(); + RevokeStorkPublisherPrivilegeProposal.registerTypeUrl(); + BlacklistEthereumAddressesProposal.registerTypeUrl(); + RevokeEthereumBlacklistProposal.registerTypeUrl(); + ContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractDeregistrationProposal.registerTypeUrl(); + ContractRegistrationRequest.registerTypeUrl(); + BatchStoreCodeProposal.registerTypeUrl(); + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yes: "", @@ -1034,10 +1091,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1beta1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1150,10 +1206,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1beta1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1242,10 +1299,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1beta1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: Duration.fromPartial({}) @@ -1320,10 +1378,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1beta1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: new Uint8Array(), @@ -1422,7 +1479,6 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1beta1.TallyParams", value: TallyParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/gov/v1beta1/query.rpc.func.ts b/libs/injective-react/src/cosmos/gov/v1beta1/query.rpc.func.ts index 5add14c4..fc5de4b2 100644 --- a/libs/injective-react/src/cosmos/gov/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/cosmos/gov/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetProposal = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetProposal, @@ -17,7 +18,8 @@ export const createGetProposals = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetProposals, @@ -28,7 +30,8 @@ export const createGetVote = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetVote, @@ -39,7 +42,8 @@ export const createGetVotes = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetVotes, @@ -50,7 +54,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -61,7 +66,8 @@ export const createGetDeposit = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetDeposit, @@ -72,7 +78,8 @@ export const createGetDeposits = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetDeposits, @@ -83,7 +90,8 @@ export const createGetTallyResult = (clientResolver?: RpcResolver) => buildQuery decode: QueryTallyResultResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "TallyResult", - clientResolver + clientResolver, + deps: [QueryTallyResultRequest, QueryTallyResultResponse] }); export const useGetTallyResult = buildUseQuery({ builderQueryFn: createGetTallyResult, diff --git a/libs/injective-react/src/cosmos/gov/v1beta1/query.ts b/libs/injective-react/src/cosmos/gov/v1beta1/query.ts index 15053043..d4419837 100644 --- a/libs/injective-react/src/cosmos/gov/v1beta1/query.ts +++ b/libs/injective-react/src/cosmos/gov/v1beta1/query.ts @@ -2,7 +2,6 @@ import { ProposalStatus, Proposal, ProposalAmino, Vote, VoteAmino, VotingParams, import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ export interface QueryProposalRequest { /** proposal_id defines the unique id of the proposal. */ @@ -423,10 +422,9 @@ export const QueryProposalRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", value: QueryProposalRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryProposalRequest.typeUrl, QueryProposalRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalRequest.aminoType, QueryProposalRequest.typeUrl); function createBaseQueryProposalResponse(): QueryProposalResponse { return { proposal: Proposal.fromPartial({}) @@ -501,10 +499,11 @@ export const QueryProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", value: QueryProposalResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalResponse.typeUrl, QueryProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalResponse.aminoType, QueryProposalResponse.typeUrl); function createBaseQueryProposalsRequest(): QueryProposalsRequest { return { proposalStatus: 0, @@ -615,10 +614,11 @@ export const QueryProposalsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", value: QueryProposalsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsRequest.typeUrl, QueryProposalsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsRequest.aminoType, QueryProposalsRequest.typeUrl); function createBaseQueryProposalsResponse(): QueryProposalsResponse { return { proposals: [], @@ -707,10 +707,12 @@ export const QueryProposalsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", value: QueryProposalsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsResponse.typeUrl, QueryProposalsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsResponse.aminoType, QueryProposalsResponse.typeUrl); function createBaseQueryVoteRequest(): QueryVoteRequest { return { proposalId: BigInt(0), @@ -797,10 +799,9 @@ export const QueryVoteRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", value: QueryVoteRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryVoteRequest.typeUrl, QueryVoteRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteRequest.aminoType, QueryVoteRequest.typeUrl); function createBaseQueryVoteResponse(): QueryVoteResponse { return { vote: Vote.fromPartial({}) @@ -875,10 +876,11 @@ export const QueryVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", value: QueryVoteResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVoteResponse.typeUrl, QueryVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteResponse.aminoType, QueryVoteResponse.typeUrl); function createBaseQueryVotesRequest(): QueryVotesRequest { return { proposalId: BigInt(0), @@ -965,10 +967,11 @@ export const QueryVotesRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", value: QueryVotesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesRequest.typeUrl, QueryVotesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesRequest.aminoType, QueryVotesRequest.typeUrl); function createBaseQueryVotesResponse(): QueryVotesResponse { return { votes: [], @@ -1057,10 +1060,12 @@ export const QueryVotesResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", value: QueryVotesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesResponse.typeUrl, QueryVotesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesResponse.aminoType, QueryVotesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return { paramsType: "" @@ -1135,10 +1140,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { votingParams: VotingParams.fromPartial({}), @@ -1237,10 +1241,13 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + VotingParams.registerTypeUrl(); + DepositParams.registerTypeUrl(); + TallyParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDepositRequest(): QueryDepositRequest { return { proposalId: BigInt(0), @@ -1327,10 +1334,9 @@ export const QueryDepositRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", value: QueryDepositRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDepositRequest.typeUrl, QueryDepositRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositRequest.aminoType, QueryDepositRequest.typeUrl); function createBaseQueryDepositResponse(): QueryDepositResponse { return { deposit: Deposit.fromPartial({}) @@ -1405,10 +1411,11 @@ export const QueryDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", value: QueryDepositResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositResponse.typeUrl, QueryDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositResponse.aminoType, QueryDepositResponse.typeUrl); function createBaseQueryDepositsRequest(): QueryDepositsRequest { return { proposalId: BigInt(0), @@ -1495,10 +1502,11 @@ export const QueryDepositsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", value: QueryDepositsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsRequest.typeUrl, QueryDepositsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsRequest.aminoType, QueryDepositsRequest.typeUrl); function createBaseQueryDepositsResponse(): QueryDepositsResponse { return { deposits: [], @@ -1587,10 +1595,12 @@ export const QueryDepositsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", value: QueryDepositsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsResponse.typeUrl, QueryDepositsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsResponse.aminoType, QueryDepositsResponse.typeUrl); function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { return { proposalId: BigInt(0) @@ -1665,10 +1675,9 @@ export const QueryTallyResultRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", value: QueryTallyResultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTallyResultRequest.typeUrl, QueryTallyResultRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultRequest.aminoType, QueryTallyResultRequest.typeUrl); function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { return { tally: TallyResult.fromPartial({}) @@ -1743,7 +1752,8 @@ export const QueryTallyResultResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", value: QueryTallyResultResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryTallyResultResponse.typeUrl, QueryTallyResultResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultResponse.aminoType, QueryTallyResultResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts index ff3449ec..3dcafe92 100644 --- a/libs/injective-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; export const createSubmitProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const useSubmitProposal = buildUseMutation({ builderMutationFn: createSubmitProposal @@ -15,7 +16,8 @@ export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createVote @@ -24,7 +26,8 @@ export const createVoteWeighted = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const useVoteWeighted = buildUseMutation({ builderMutationFn: createVoteWeighted @@ -33,7 +36,8 @@ export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const useDeposit = buildUseMutation({ builderMutationFn: createDeposit diff --git a/libs/injective-react/src/cosmos/gov/v1beta1/tx.ts b/libs/injective-react/src/cosmos/gov/v1beta1/tx.ts index 2235f820..9e1b9148 100644 --- a/libs/injective-react/src/cosmos/gov/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/gov/v1beta1/tx.ts @@ -10,8 +10,8 @@ import { GrantBandOraclePrivilegeProposal, GrantBandOraclePrivilegeProposalProto import { BlacklistEthereumAddressesProposal, BlacklistEthereumAddressesProposalProtoMsg, RevokeEthereumBlacklistProposal, RevokeEthereumBlacklistProposalProtoMsg } from "../../../injective/peggy/v1/proposal"; import { ContractRegistrationRequestProposal, ContractRegistrationRequestProposalProtoMsg, BatchContractRegistrationRequestProposal, BatchContractRegistrationRequestProposalProtoMsg, BatchContractDeregistrationProposal, BatchContractDeregistrationProposalProtoMsg, ContractRegistrationRequest, ContractRegistrationRequestProtoMsg, BatchStoreCodeProposal, BatchStoreCodeProposalProtoMsg } from "../../../injective/wasmx/v1/proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary * proposal Content. @@ -295,10 +295,64 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + StoreCodeProposal.registerTypeUrl(); + InstantiateContractProposal.registerTypeUrl(); + InstantiateContract2Proposal.registerTypeUrl(); + MigrateContractProposal.registerTypeUrl(); + SudoContractProposal.registerTypeUrl(); + ExecuteContractProposal.registerTypeUrl(); + UpdateAdminProposal.registerTypeUrl(); + ClearAdminProposal.registerTypeUrl(); + PinCodesProposal.registerTypeUrl(); + UnpinCodesProposal.registerTypeUrl(); + UpdateInstantiateConfigProposal.registerTypeUrl(); + StoreAndInstantiateContractProposal.registerTypeUrl(); + SpotMarketParamUpdateProposal.registerTypeUrl(); + BatchExchangeModificationProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + TradingRewardCampaignLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + TradingRewardPendingPointsUpdateProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + BatchCommunityPoolSpendProposal.registerTypeUrl(); + AtomicMarketOrderFeeMultiplierScheduleProposal.registerTypeUrl(); + SetConfigProposal.registerTypeUrl(); + SetBatchConfigProposal.registerTypeUrl(); + GrantBandOraclePrivilegeProposal.registerTypeUrl(); + RevokeBandOraclePrivilegeProposal.registerTypeUrl(); + GrantPriceFeederPrivilegeProposal.registerTypeUrl(); + GrantProviderPrivilegeProposal.registerTypeUrl(); + RevokeProviderPrivilegeProposal.registerTypeUrl(); + RevokePriceFeederPrivilegeProposal.registerTypeUrl(); + AuthorizeBandOracleRequestProposal.registerTypeUrl(); + UpdateBandOracleRequestProposal.registerTypeUrl(); + EnableBandIBCProposal.registerTypeUrl(); + GrantStorkPublisherPrivilegeProposal.registerTypeUrl(); + RevokeStorkPublisherPrivilegeProposal.registerTypeUrl(); + BlacklistEthereumAddressesProposal.registerTypeUrl(); + RevokeEthereumBlacklistProposal.registerTypeUrl(); + ContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractDeregistrationProposal.registerTypeUrl(); + ContractRegistrationRequest.registerTypeUrl(); + BatchStoreCodeProposal.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -373,10 +427,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -475,10 +528,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -540,10 +592,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -644,10 +695,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -709,10 +761,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -813,10 +864,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -878,7 +930,6 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/group/v1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/group/v1/tx.rpc.func.ts index 95673a00..c580c689 100644 --- a/libs/injective-react/src/cosmos/group/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/group/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup } from "./tx"; export const createCreateGroup = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateGroup.typeUrl, encoders: toEncoders(MsgCreateGroup), - converters: toConverters(MsgCreateGroup) + converters: toConverters(MsgCreateGroup), + deps: [MsgCreateGroup] }); export const useCreateGroup = buildUseMutation({ builderMutationFn: createCreateGroup @@ -15,7 +16,8 @@ export const createUpdateGroupMembers = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgUpdateGroupMembers.typeUrl, encoders: toEncoders(MsgUpdateGroupMembers), - converters: toConverters(MsgUpdateGroupMembers) + converters: toConverters(MsgUpdateGroupMembers), + deps: [MsgUpdateGroupMembers] }); export const useUpdateGroupMembers = buildUseMutation({ builderMutationFn: createUpdateGroupMembers @@ -24,7 +26,8 @@ export const createUpdateGroupAdmin = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgUpdateGroupAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupAdmin), - converters: toConverters(MsgUpdateGroupAdmin) + converters: toConverters(MsgUpdateGroupAdmin), + deps: [MsgUpdateGroupAdmin] }); export const useUpdateGroupAdmin = buildUseMutation({ builderMutationFn: createUpdateGroupAdmin @@ -33,7 +36,8 @@ export const createUpdateGroupMetadata = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgUpdateGroupMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupMetadata), - converters: toConverters(MsgUpdateGroupMetadata) + converters: toConverters(MsgUpdateGroupMetadata), + deps: [MsgUpdateGroupMetadata] }); export const useUpdateGroupMetadata = buildUseMutation({ builderMutationFn: createUpdateGroupMetadata @@ -42,7 +46,8 @@ export const createCreateGroupPolicy = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgCreateGroupPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupPolicy), - converters: toConverters(MsgCreateGroupPolicy) + converters: toConverters(MsgCreateGroupPolicy), + deps: [MsgCreateGroupPolicy] }); export const useCreateGroupPolicy = buildUseMutation({ builderMutationFn: createCreateGroupPolicy @@ -51,7 +56,8 @@ export const createCreateGroupWithPolicy = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgCreateGroupWithPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupWithPolicy), - converters: toConverters(MsgCreateGroupWithPolicy) + converters: toConverters(MsgCreateGroupWithPolicy), + deps: [MsgCreateGroupWithPolicy] }); export const useCreateGroupWithPolicy = buildUseMutation({ builderMutationFn: createCreateGroupWithPolicy @@ -60,7 +66,8 @@ export const createUpdateGroupPolicyAdmin = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgUpdateGroupPolicyAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyAdmin), - converters: toConverters(MsgUpdateGroupPolicyAdmin) + converters: toConverters(MsgUpdateGroupPolicyAdmin), + deps: [MsgUpdateGroupPolicyAdmin] }); export const useUpdateGroupPolicyAdmin = buildUseMutation({ builderMutationFn: createUpdateGroupPolicyAdmin @@ -69,7 +76,8 @@ export const createUpdateGroupPolicyDecisionPolicy = (clientResolver?: SigningCl clientResolver, typeUrl: MsgUpdateGroupPolicyDecisionPolicy.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyDecisionPolicy), - converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy) + converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy), + deps: [MsgUpdateGroupPolicyDecisionPolicy] }); export const useUpdateGroupPolicyDecisionPolicy = buildUseMutation({ builderMutationFn: createUpdateGroupPolicyDecisionPolicy @@ -78,7 +86,8 @@ export const createUpdateGroupPolicyMetadata = (clientResolver?: SigningClientRe clientResolver, typeUrl: MsgUpdateGroupPolicyMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyMetadata), - converters: toConverters(MsgUpdateGroupPolicyMetadata) + converters: toConverters(MsgUpdateGroupPolicyMetadata), + deps: [MsgUpdateGroupPolicyMetadata] }); export const useUpdateGroupPolicyMetadata = buildUseMutation({ builderMutationFn: createUpdateGroupPolicyMetadata @@ -87,7 +96,8 @@ export const createSubmitProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const useSubmitProposal = buildUseMutation({ builderMutationFn: createSubmitProposal @@ -96,7 +106,8 @@ export const createWithdrawProposal = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgWithdrawProposal.typeUrl, encoders: toEncoders(MsgWithdrawProposal), - converters: toConverters(MsgWithdrawProposal) + converters: toConverters(MsgWithdrawProposal), + deps: [MsgWithdrawProposal] }); export const useWithdrawProposal = buildUseMutation({ builderMutationFn: createWithdrawProposal @@ -105,7 +116,8 @@ export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createVote @@ -114,7 +126,8 @@ export const createExec = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createExec @@ -123,7 +136,8 @@ export const createLeaveGroup = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgLeaveGroup.typeUrl, encoders: toEncoders(MsgLeaveGroup), - converters: toConverters(MsgLeaveGroup) + converters: toConverters(MsgLeaveGroup), + deps: [MsgLeaveGroup] }); export const useLeaveGroup = buildUseMutation({ builderMutationFn: createLeaveGroup diff --git a/libs/injective-react/src/cosmos/group/v1/tx.ts b/libs/injective-react/src/cosmos/group/v1/tx.ts index 492b0084..a2e3714f 100644 --- a/libs/injective-react/src/cosmos/group/v1/tx.ts +++ b/libs/injective-react/src/cosmos/group/v1/tx.ts @@ -796,10 +796,11 @@ export const MsgCreateGroup = { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroup.typeUrl, MsgCreateGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroup.aminoType, MsgCreateGroup.typeUrl); function createBaseMsgCreateGroupResponse(): MsgCreateGroupResponse { return { groupId: BigInt(0) @@ -874,10 +875,9 @@ export const MsgCreateGroupResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", value: MsgCreateGroupResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupResponse.typeUrl, MsgCreateGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupResponse.aminoType, MsgCreateGroupResponse.typeUrl); function createBaseMsgUpdateGroupMembers(): MsgUpdateGroupMembers { return { admin: "", @@ -978,10 +978,11 @@ export const MsgUpdateGroupMembers = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembers.typeUrl, MsgUpdateGroupMembers); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembers.aminoType, MsgUpdateGroupMembers.typeUrl); function createBaseMsgUpdateGroupMembersResponse(): MsgUpdateGroupMembersResponse { return {}; } @@ -1043,10 +1044,9 @@ export const MsgUpdateGroupMembersResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", value: MsgUpdateGroupMembersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembersResponse.typeUrl, MsgUpdateGroupMembersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembersResponse.aminoType, MsgUpdateGroupMembersResponse.typeUrl); function createBaseMsgUpdateGroupAdmin(): MsgUpdateGroupAdmin { return { admin: "", @@ -1145,10 +1145,9 @@ export const MsgUpdateGroupAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdmin.typeUrl, MsgUpdateGroupAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdmin.aminoType, MsgUpdateGroupAdmin.typeUrl); function createBaseMsgUpdateGroupAdminResponse(): MsgUpdateGroupAdminResponse { return {}; } @@ -1210,10 +1209,9 @@ export const MsgUpdateGroupAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", value: MsgUpdateGroupAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdminResponse.typeUrl, MsgUpdateGroupAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdminResponse.aminoType, MsgUpdateGroupAdminResponse.typeUrl); function createBaseMsgUpdateGroupMetadata(): MsgUpdateGroupMetadata { return { admin: "", @@ -1312,10 +1310,9 @@ export const MsgUpdateGroupMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadata.typeUrl, MsgUpdateGroupMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadata.aminoType, MsgUpdateGroupMetadata.typeUrl); function createBaseMsgUpdateGroupMetadataResponse(): MsgUpdateGroupMetadataResponse { return {}; } @@ -1377,10 +1374,9 @@ export const MsgUpdateGroupMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", value: MsgUpdateGroupMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadataResponse.typeUrl, MsgUpdateGroupMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadataResponse.aminoType, MsgUpdateGroupMetadataResponse.typeUrl); function createBaseMsgCreateGroupPolicy(): MsgCreateGroupPolicy { return { admin: "", @@ -1491,10 +1487,12 @@ export const MsgCreateGroupPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicy.typeUrl, MsgCreateGroupPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicy.aminoType, MsgCreateGroupPolicy.typeUrl); function createBaseMsgCreateGroupPolicyResponse(): MsgCreateGroupPolicyResponse { return { address: "" @@ -1569,10 +1567,9 @@ export const MsgCreateGroupPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", value: MsgCreateGroupPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicyResponse.typeUrl, MsgCreateGroupPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicyResponse.aminoType, MsgCreateGroupPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyAdmin(): MsgUpdateGroupPolicyAdmin { return { admin: "", @@ -1671,10 +1668,9 @@ export const MsgUpdateGroupPolicyAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdmin.typeUrl, MsgUpdateGroupPolicyAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdmin.aminoType, MsgUpdateGroupPolicyAdmin.typeUrl); function createBaseMsgUpdateGroupPolicyAdminResponse(): MsgUpdateGroupPolicyAdminResponse { return {}; } @@ -1736,10 +1732,9 @@ export const MsgUpdateGroupPolicyAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", value: MsgUpdateGroupPolicyAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdminResponse.typeUrl, MsgUpdateGroupPolicyAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdminResponse.aminoType, MsgUpdateGroupPolicyAdminResponse.typeUrl); function createBaseMsgCreateGroupWithPolicy(): MsgCreateGroupWithPolicy { return { admin: "", @@ -1876,10 +1871,12 @@ export const MsgCreateGroupWithPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicy.typeUrl, MsgCreateGroupWithPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicy.aminoType, MsgCreateGroupWithPolicy.typeUrl); function createBaseMsgCreateGroupWithPolicyResponse(): MsgCreateGroupWithPolicyResponse { return { groupId: BigInt(0), @@ -1966,10 +1963,9 @@ export const MsgCreateGroupWithPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", value: MsgCreateGroupWithPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicyResponse.typeUrl, MsgCreateGroupWithPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicyResponse.aminoType, MsgCreateGroupWithPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicy(): MsgUpdateGroupPolicyDecisionPolicy { return { admin: "", @@ -2068,10 +2064,12 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicy.typeUrl, MsgUpdateGroupPolicyDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicy.aminoType, MsgUpdateGroupPolicyDecisionPolicy.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(): MsgUpdateGroupPolicyDecisionPolicyResponse { return {}; } @@ -2133,10 +2131,9 @@ export const MsgUpdateGroupPolicyDecisionPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", value: MsgUpdateGroupPolicyDecisionPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl, MsgUpdateGroupPolicyDecisionPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicyResponse.aminoType, MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyMetadata(): MsgUpdateGroupPolicyMetadata { return { admin: "", @@ -2235,10 +2232,9 @@ export const MsgUpdateGroupPolicyMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadata.typeUrl, MsgUpdateGroupPolicyMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadata.aminoType, MsgUpdateGroupPolicyMetadata.typeUrl); function createBaseMsgUpdateGroupPolicyMetadataResponse(): MsgUpdateGroupPolicyMetadataResponse { return {}; } @@ -2300,10 +2296,9 @@ export const MsgUpdateGroupPolicyMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", value: MsgUpdateGroupPolicyMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadataResponse.typeUrl, MsgUpdateGroupPolicyMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadataResponse.aminoType, MsgUpdateGroupPolicyMetadataResponse.typeUrl); function createBaseMsgSubmitProposal(): MsgSubmitProposal { return { groupPolicyAddress: "", @@ -2454,10 +2449,9 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -2532,10 +2526,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgWithdrawProposal(): MsgWithdrawProposal { return { proposalId: BigInt(0), @@ -2622,10 +2615,9 @@ export const MsgWithdrawProposal = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposal.typeUrl, MsgWithdrawProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposal.aminoType, MsgWithdrawProposal.typeUrl); function createBaseMsgWithdrawProposalResponse(): MsgWithdrawProposalResponse { return {}; } @@ -2687,10 +2679,9 @@ export const MsgWithdrawProposalResponse = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", value: MsgWithdrawProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposalResponse.typeUrl, MsgWithdrawProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposalResponse.aminoType, MsgWithdrawProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -2813,10 +2804,9 @@ export const MsgVote = { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -2878,10 +2868,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.group.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { proposalId: BigInt(0), @@ -2968,10 +2957,9 @@ export const MsgExec = { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { result: 0 @@ -3046,10 +3034,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.group.v1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgLeaveGroup(): MsgLeaveGroup { return { address: "", @@ -3136,10 +3123,9 @@ export const MsgLeaveGroup = { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgLeaveGroup.typeUrl, MsgLeaveGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroup.aminoType, MsgLeaveGroup.typeUrl); function createBaseMsgLeaveGroupResponse(): MsgLeaveGroupResponse { return {}; } @@ -3201,7 +3187,6 @@ export const MsgLeaveGroupResponse = { typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", value: MsgLeaveGroupResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgLeaveGroupResponse.typeUrl, MsgLeaveGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroupResponse.aminoType, MsgLeaveGroupResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/group/v1/types.ts b/libs/injective-react/src/cosmos/group/v1/types.ts index f8e9c860..802939a6 100644 --- a/libs/injective-react/src/cosmos/group/v1/types.ts +++ b/libs/injective-react/src/cosmos/group/v1/types.ts @@ -847,10 +847,9 @@ export const Member = { typeUrl: "/cosmos.group.v1.Member", value: Member.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Member.typeUrl, Member); -GlobalDecoderRegistry.registerAminoProtoMapping(Member.aminoType, Member.typeUrl); function createBaseMemberRequest(): MemberRequest { return { address: "", @@ -949,10 +948,9 @@ export const MemberRequest = { typeUrl: "/cosmos.group.v1.MemberRequest", value: MemberRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MemberRequest.typeUrl, MemberRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(MemberRequest.aminoType, MemberRequest.typeUrl); function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy { return { threshold: "", @@ -1039,10 +1037,13 @@ export const ThresholdDecisionPolicy = { typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", value: ThresholdDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy { return { percentage: "", @@ -1129,10 +1130,13 @@ export const PercentageDecisionPolicy = { typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", value: PercentageDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); function createBaseDecisionPolicyWindows(): DecisionPolicyWindows { return { votingPeriod: Duration.fromPartial({}), @@ -1219,10 +1223,9 @@ export const DecisionPolicyWindows = { typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", value: DecisionPolicyWindows.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecisionPolicyWindows.typeUrl, DecisionPolicyWindows); -GlobalDecoderRegistry.registerAminoProtoMapping(DecisionPolicyWindows.aminoType, DecisionPolicyWindows.typeUrl); function createBaseGroupInfo(): GroupInfo { return { id: BigInt(0), @@ -1357,10 +1360,9 @@ export const GroupInfo = { typeUrl: "/cosmos.group.v1.GroupInfo", value: GroupInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GroupInfo.typeUrl, GroupInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupInfo.aminoType, GroupInfo.typeUrl); function createBaseGroupMember(): GroupMember { return { groupId: BigInt(0), @@ -1447,10 +1449,11 @@ export const GroupMember = { typeUrl: "/cosmos.group.v1.GroupMember", value: GroupMember.encode(message).finish() }; + }, + registerTypeUrl() { + Member.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupMember.typeUrl, GroupMember); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupMember.aminoType, GroupMember.typeUrl); function createBaseGroupPolicyInfo(): GroupPolicyInfo { return { address: "", @@ -1597,10 +1600,12 @@ export const GroupPolicyInfo = { typeUrl: "/cosmos.group.v1.GroupPolicyInfo", value: GroupPolicyInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupPolicyInfo.typeUrl, GroupPolicyInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupPolicyInfo.aminoType, GroupPolicyInfo.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1835,10 +1840,9 @@ export const Proposal = { typeUrl: "/cosmos.group.v1.Proposal", value: Proposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1949,10 +1953,9 @@ export const TallyResult = { typeUrl: "/cosmos.group.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -2075,7 +2078,6 @@ export const Vote = { typeUrl: "/cosmos.group.v1.Vote", value: Vote.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/ics23/v1/proofs.ts b/libs/injective-react/src/cosmos/ics23/v1/proofs.ts index 27759bde..b02054e7 100644 --- a/libs/injective-react/src/cosmos/ics23/v1/proofs.ts +++ b/libs/injective-react/src/cosmos/ics23/v1/proofs.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum HashOp { /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ NO_HASH = 0, @@ -754,10 +753,12 @@ export const ExistenceProof = { typeUrl: "/cosmos.ics23.v1.ExistenceProof", value: ExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExistenceProof.typeUrl, ExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(ExistenceProof.aminoType, ExistenceProof.typeUrl); function createBaseNonExistenceProof(): NonExistenceProof { return { key: new Uint8Array(), @@ -856,10 +857,11 @@ export const NonExistenceProof = { typeUrl: "/cosmos.ics23.v1.NonExistenceProof", value: NonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(NonExistenceProof.typeUrl, NonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(NonExistenceProof.aminoType, NonExistenceProof.typeUrl); function createBaseCommitmentProof(): CommitmentProof { return { exist: undefined, @@ -970,10 +972,14 @@ export const CommitmentProof = { typeUrl: "/cosmos.ics23.v1.CommitmentProof", value: CommitmentProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); + BatchProof.registerTypeUrl(); + CompressedBatchProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitmentProof.typeUrl, CommitmentProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CommitmentProof.aminoType, CommitmentProof.typeUrl); function createBaseLeafOp(): LeafOp { return { hash: 0, @@ -1096,10 +1102,9 @@ export const LeafOp = { typeUrl: "/cosmos.ics23.v1.LeafOp", value: LeafOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LeafOp.typeUrl, LeafOp); -GlobalDecoderRegistry.registerAminoProtoMapping(LeafOp.aminoType, LeafOp.typeUrl); function createBaseInnerOp(): InnerOp { return { hash: 0, @@ -1198,10 +1203,9 @@ export const InnerOp = { typeUrl: "/cosmos.ics23.v1.InnerOp", value: InnerOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerOp.typeUrl, InnerOp); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerOp.aminoType, InnerOp.typeUrl); function createBaseProofSpec(): ProofSpec { return { leafSpec: undefined, @@ -1324,10 +1328,12 @@ export const ProofSpec = { typeUrl: "/cosmos.ics23.v1.ProofSpec", value: ProofSpec.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerSpec.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProofSpec.typeUrl, ProofSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(ProofSpec.aminoType, ProofSpec.typeUrl); function createBaseInnerSpec(): InnerSpec { return { childOrder: [], @@ -1473,10 +1479,9 @@ export const InnerSpec = { typeUrl: "/cosmos.ics23.v1.InnerSpec", value: InnerSpec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerSpec.typeUrl, InnerSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerSpec.aminoType, InnerSpec.typeUrl); function createBaseBatchProof(): BatchProof { return { entries: [] @@ -1553,10 +1558,11 @@ export const BatchProof = { typeUrl: "/cosmos.ics23.v1.BatchProof", value: BatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + BatchEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchProof.typeUrl, BatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchProof.aminoType, BatchProof.typeUrl); function createBaseBatchEntry(): BatchEntry { return { exist: undefined, @@ -1643,10 +1649,12 @@ export const BatchEntry = { typeUrl: "/cosmos.ics23.v1.BatchEntry", value: BatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchEntry.typeUrl, BatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchEntry.aminoType, BatchEntry.typeUrl); function createBaseCompressedBatchProof(): CompressedBatchProof { return { entries: [], @@ -1737,10 +1745,12 @@ export const CompressedBatchProof = { typeUrl: "/cosmos.ics23.v1.CompressedBatchProof", value: CompressedBatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedBatchEntry.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchProof.typeUrl, CompressedBatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchProof.aminoType, CompressedBatchProof.typeUrl); function createBaseCompressedBatchEntry(): CompressedBatchEntry { return { exist: undefined, @@ -1827,10 +1837,12 @@ export const CompressedBatchEntry = { typeUrl: "/cosmos.ics23.v1.CompressedBatchEntry", value: CompressedBatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); + CompressedNonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchEntry.typeUrl, CompressedBatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchEntry.aminoType, CompressedBatchEntry.typeUrl); function createBaseCompressedExistenceProof(): CompressedExistenceProof { return { key: new Uint8Array(), @@ -1952,10 +1964,11 @@ export const CompressedExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedExistenceProof", value: CompressedExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedExistenceProof.typeUrl, CompressedExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedExistenceProof.aminoType, CompressedExistenceProof.typeUrl); function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { return { key: new Uint8Array(), @@ -2054,7 +2067,8 @@ export const CompressedNonExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedNonExistenceProof", value: CompressedNonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(CompressedNonExistenceProof.typeUrl, CompressedNonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedNonExistenceProof.aminoType, CompressedNonExistenceProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/staking/v1beta1/query.rpc.func.ts b/libs/injective-react/src/cosmos/staking/v1beta1/query.rpc.func.ts index 0d3c0cfc..9673c3d2 100644 --- a/libs/injective-react/src/cosmos/staking/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/cosmos/staking/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetValidators = (clientResolver?: RpcResolver) => buildQuery< decode: QueryValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Validators", - clientResolver + clientResolver, + deps: [QueryValidatorsRequest, QueryValidatorsResponse] }); export const useGetValidators = buildUseQuery({ builderQueryFn: createGetValidators, @@ -17,7 +18,8 @@ export const createGetValidator = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetValidator, @@ -28,7 +30,8 @@ export const createGetValidatorDelegations = (clientResolver?: RpcResolver) => b decode: QueryValidatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse] }); export const useGetValidatorDelegations = buildUseQuery({ builderQueryFn: createGetValidatorDelegations, @@ -39,7 +42,8 @@ export const createGetValidatorUnbondingDelegations = (clientResolver?: RpcResol decode: QueryValidatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse] }); export const useGetValidatorUnbondingDelegations = buildUseQuery({ builderQueryFn: createGetValidatorUnbondingDelegations, @@ -50,7 +54,8 @@ export const createGetDelegation = (clientResolver?: RpcResolver) => buildQuery< decode: QueryDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Delegation", - clientResolver + clientResolver, + deps: [QueryDelegationRequest, QueryDelegationResponse] }); export const useGetDelegation = buildUseQuery({ builderQueryFn: createGetDelegation, @@ -61,7 +66,8 @@ export const createGetUnbondingDelegation = (clientResolver?: RpcResolver) => bu decode: QueryUnbondingDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "UnbondingDelegation", - clientResolver + clientResolver, + deps: [QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse] }); export const useGetUnbondingDelegation = buildUseQuery({ builderQueryFn: createGetUnbondingDelegation, @@ -72,7 +78,8 @@ export const createGetDelegatorDelegations = (clientResolver?: RpcResolver) => b decode: QueryDelegatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse] }); export const useGetDelegatorDelegations = buildUseQuery({ builderQueryFn: createGetDelegatorDelegations, @@ -83,7 +90,8 @@ export const createGetDelegatorUnbondingDelegations = (clientResolver?: RpcResol decode: QueryDelegatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse] }); export const useGetDelegatorUnbondingDelegations = buildUseQuery({ builderQueryFn: createGetDelegatorUnbondingDelegations, @@ -94,7 +102,8 @@ export const createGetRedelegations = (clientResolver?: RpcResolver) => buildQue decode: QueryRedelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Redelegations", - clientResolver + clientResolver, + deps: [QueryRedelegationsRequest, QueryRedelegationsResponse] }); export const useGetRedelegations = buildUseQuery({ builderQueryFn: createGetRedelegations, @@ -105,7 +114,8 @@ export const createGetDelegatorValidators = (clientResolver?: RpcResolver) => bu decode: QueryDelegatorValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidators", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse] }); export const useGetDelegatorValidators = buildUseQuery({ builderQueryFn: createGetDelegatorValidators, @@ -116,7 +126,8 @@ export const createGetDelegatorValidator = (clientResolver?: RpcResolver) => bui decode: QueryDelegatorValidatorResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidator", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse] }); export const useGetDelegatorValidator = buildUseQuery({ builderQueryFn: createGetDelegatorValidator, @@ -127,7 +138,8 @@ export const createGetHistoricalInfo = (clientResolver?: RpcResolver) => buildQu decode: QueryHistoricalInfoResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "HistoricalInfo", - clientResolver + clientResolver, + deps: [QueryHistoricalInfoRequest, QueryHistoricalInfoResponse] }); export const useGetHistoricalInfo = buildUseQuery({ builderQueryFn: createGetHistoricalInfo, @@ -138,7 +150,8 @@ export const createGetPool = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetPool, @@ -149,7 +162,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, diff --git a/libs/injective-react/src/cosmos/staking/v1beta1/query.ts b/libs/injective-react/src/cosmos/staking/v1beta1/query.ts index f4754096..1b267bf2 100644 --- a/libs/injective-react/src/cosmos/staking/v1beta1/query.ts +++ b/libs/injective-react/src/cosmos/staking/v1beta1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { Validator, ValidatorAmino, DelegationResponse, DelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, RedelegationResponse, RedelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Pool, PoolAmino, Params, ParamsAmino } from "./staking"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ export interface QueryValidatorsRequest { /** status enables to query for validators matching a given status. */ @@ -757,10 +756,11 @@ export const QueryValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", value: QueryValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsRequest.typeUrl, QueryValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsRequest.aminoType, QueryValidatorsRequest.typeUrl); function createBaseQueryValidatorsResponse(): QueryValidatorsResponse { return { validators: [], @@ -849,10 +849,12 @@ export const QueryValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", value: QueryValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsResponse.typeUrl, QueryValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsResponse.aminoType, QueryValidatorsResponse.typeUrl); function createBaseQueryValidatorRequest(): QueryValidatorRequest { return { validatorAddr: "" @@ -927,10 +929,9 @@ export const QueryValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", value: QueryValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValidatorRequest.typeUrl, QueryValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorRequest.aminoType, QueryValidatorRequest.typeUrl); function createBaseQueryValidatorResponse(): QueryValidatorResponse { return { validator: Validator.fromPartial({}) @@ -1005,10 +1006,11 @@ export const QueryValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", value: QueryValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorResponse.typeUrl, QueryValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorResponse.aminoType, QueryValidatorResponse.typeUrl); function createBaseQueryValidatorDelegationsRequest(): QueryValidatorDelegationsRequest { return { validatorAddr: "", @@ -1095,10 +1097,11 @@ export const QueryValidatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", value: QueryValidatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsRequest.typeUrl, QueryValidatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsRequest.aminoType, QueryValidatorDelegationsRequest.typeUrl); function createBaseQueryValidatorDelegationsResponse(): QueryValidatorDelegationsResponse { return { delegationResponses: [], @@ -1187,10 +1190,12 @@ export const QueryValidatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", value: QueryValidatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsResponse.typeUrl, QueryValidatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsResponse.aminoType, QueryValidatorDelegationsResponse.typeUrl); function createBaseQueryValidatorUnbondingDelegationsRequest(): QueryValidatorUnbondingDelegationsRequest { return { validatorAddr: "", @@ -1277,10 +1282,11 @@ export const QueryValidatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", value: QueryValidatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsRequest.typeUrl, QueryValidatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsRequest.aminoType, QueryValidatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryValidatorUnbondingDelegationsResponse(): QueryValidatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -1369,10 +1375,12 @@ export const QueryValidatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", value: QueryValidatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsResponse.typeUrl, QueryValidatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsResponse.aminoType, QueryValidatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryDelegationRequest(): QueryDelegationRequest { return { delegatorAddr: "", @@ -1459,10 +1467,9 @@ export const QueryDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", value: QueryDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegationRequest.typeUrl, QueryDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationRequest.aminoType, QueryDelegationRequest.typeUrl); function createBaseQueryDelegationResponse(): QueryDelegationResponse { return { delegationResponse: undefined @@ -1537,10 +1544,11 @@ export const QueryDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", value: QueryDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegationResponse.typeUrl, QueryDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationResponse.aminoType, QueryDelegationResponse.typeUrl); function createBaseQueryUnbondingDelegationRequest(): QueryUnbondingDelegationRequest { return { delegatorAddr: "", @@ -1627,10 +1635,9 @@ export const QueryUnbondingDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", value: QueryUnbondingDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationRequest.typeUrl, QueryUnbondingDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationRequest.aminoType, QueryUnbondingDelegationRequest.typeUrl); function createBaseQueryUnbondingDelegationResponse(): QueryUnbondingDelegationResponse { return { unbond: UnbondingDelegation.fromPartial({}) @@ -1705,10 +1712,11 @@ export const QueryUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", value: QueryUnbondingDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationResponse.typeUrl, QueryUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationResponse.aminoType, QueryUnbondingDelegationResponse.typeUrl); function createBaseQueryDelegatorDelegationsRequest(): QueryDelegatorDelegationsRequest { return { delegatorAddr: "", @@ -1795,10 +1803,11 @@ export const QueryDelegatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", value: QueryDelegatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsRequest.typeUrl, QueryDelegatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsRequest.aminoType, QueryDelegatorDelegationsRequest.typeUrl); function createBaseQueryDelegatorDelegationsResponse(): QueryDelegatorDelegationsResponse { return { delegationResponses: [], @@ -1887,10 +1896,12 @@ export const QueryDelegatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", value: QueryDelegatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsResponse.typeUrl, QueryDelegatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsResponse.aminoType, QueryDelegatorDelegationsResponse.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsRequest(): QueryDelegatorUnbondingDelegationsRequest { return { delegatorAddr: "", @@ -1977,10 +1988,11 @@ export const QueryDelegatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", value: QueryDelegatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsRequest.typeUrl, QueryDelegatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsRequest.aminoType, QueryDelegatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsResponse(): QueryDelegatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -2069,10 +2081,12 @@ export const QueryDelegatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", value: QueryDelegatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsResponse.typeUrl, QueryDelegatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsResponse.aminoType, QueryDelegatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryRedelegationsRequest(): QueryRedelegationsRequest { return { delegatorAddr: "", @@ -2183,10 +2197,11 @@ export const QueryRedelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", value: QueryRedelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsRequest.typeUrl, QueryRedelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsRequest.aminoType, QueryRedelegationsRequest.typeUrl); function createBaseQueryRedelegationsResponse(): QueryRedelegationsResponse { return { redelegationResponses: [], @@ -2275,10 +2290,12 @@ export const QueryRedelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", value: QueryRedelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsResponse.typeUrl, QueryRedelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsResponse.aminoType, QueryRedelegationsResponse.typeUrl); function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { return { delegatorAddr: "", @@ -2365,10 +2382,11 @@ export const QueryDelegatorValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", value: QueryDelegatorValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsRequest.typeUrl, QueryDelegatorValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsRequest.aminoType, QueryDelegatorValidatorsRequest.typeUrl); function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { return { validators: [], @@ -2457,10 +2475,12 @@ export const QueryDelegatorValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", value: QueryDelegatorValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsResponse.typeUrl, QueryDelegatorValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsResponse.aminoType, QueryDelegatorValidatorsResponse.typeUrl); function createBaseQueryDelegatorValidatorRequest(): QueryDelegatorValidatorRequest { return { delegatorAddr: "", @@ -2547,10 +2567,9 @@ export const QueryDelegatorValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", value: QueryDelegatorValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorRequest.typeUrl, QueryDelegatorValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorRequest.aminoType, QueryDelegatorValidatorRequest.typeUrl); function createBaseQueryDelegatorValidatorResponse(): QueryDelegatorValidatorResponse { return { validator: Validator.fromPartial({}) @@ -2625,10 +2644,11 @@ export const QueryDelegatorValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", value: QueryDelegatorValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorResponse.typeUrl, QueryDelegatorValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorResponse.aminoType, QueryDelegatorValidatorResponse.typeUrl); function createBaseQueryHistoricalInfoRequest(): QueryHistoricalInfoRequest { return { height: BigInt(0) @@ -2703,10 +2723,9 @@ export const QueryHistoricalInfoRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", value: QueryHistoricalInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalInfoRequest.typeUrl, QueryHistoricalInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoRequest.aminoType, QueryHistoricalInfoRequest.typeUrl); function createBaseQueryHistoricalInfoResponse(): QueryHistoricalInfoResponse { return { hist: undefined @@ -2781,10 +2800,11 @@ export const QueryHistoricalInfoResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", value: QueryHistoricalInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + HistoricalInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalInfoResponse.typeUrl, QueryHistoricalInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoResponse.aminoType, QueryHistoricalInfoResponse.typeUrl); function createBaseQueryPoolRequest(): QueryPoolRequest { return {}; } @@ -2846,10 +2866,9 @@ export const QueryPoolRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", value: QueryPoolRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPoolRequest.typeUrl, QueryPoolRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolRequest.aminoType, QueryPoolRequest.typeUrl); function createBaseQueryPoolResponse(): QueryPoolResponse { return { pool: Pool.fromPartial({}) @@ -2924,10 +2943,11 @@ export const QueryPoolResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", value: QueryPoolResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Pool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPoolResponse.typeUrl, QueryPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolResponse.aminoType, QueryPoolResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2989,10 +3009,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -3067,7 +3086,8 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/staking/v1beta1/staking.ts b/libs/injective-react/src/cosmos/staking/v1beta1/staking.ts index ab2a299e..1c7ac96e 100644 --- a/libs/injective-react/src/cosmos/staking/v1beta1/staking.ts +++ b/libs/injective-react/src/cosmos/staking/v1beta1/staking.ts @@ -5,8 +5,8 @@ import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; /** BondStatus is the status of a validator. */ export enum BondStatus { @@ -838,10 +838,12 @@ export const HistoricalInfo = { typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", value: HistoricalInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HistoricalInfo.typeUrl, HistoricalInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(HistoricalInfo.aminoType, HistoricalInfo.typeUrl); function createBaseCommissionRates(): CommissionRates { return { rate: "", @@ -940,10 +942,9 @@ export const CommissionRates = { typeUrl: "/cosmos.staking.v1beta1.CommissionRates", value: CommissionRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommissionRates.typeUrl, CommissionRates); -GlobalDecoderRegistry.registerAminoProtoMapping(CommissionRates.aminoType, CommissionRates.typeUrl); function createBaseCommission(): Commission { return { commissionRates: CommissionRates.fromPartial({}), @@ -1030,10 +1031,11 @@ export const Commission = { typeUrl: "/cosmos.staking.v1beta1.Commission", value: Commission.encode(message).finish() }; + }, + registerTypeUrl() { + CommissionRates.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commission.typeUrl, Commission); -GlobalDecoderRegistry.registerAminoProtoMapping(Commission.aminoType, Commission.typeUrl); function createBaseDescription(): Description { return { moniker: "", @@ -1156,10 +1158,9 @@ export const Description = { typeUrl: "/cosmos.staking.v1beta1.Description", value: Description.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Description.typeUrl, Description); -GlobalDecoderRegistry.registerAminoProtoMapping(Description.aminoType, Description.typeUrl); function createBaseValidator(): Validator { return { operatorAddress: "", @@ -1389,10 +1390,12 @@ export const Validator = { typeUrl: "/cosmos.staking.v1beta1.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); + Commission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); -GlobalDecoderRegistry.registerAminoProtoMapping(Validator.aminoType, Validator.typeUrl); function createBaseValAddresses(): ValAddresses { return { addresses: [] @@ -1469,10 +1472,9 @@ export const ValAddresses = { typeUrl: "/cosmos.staking.v1beta1.ValAddresses", value: ValAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValAddresses.typeUrl, ValAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(ValAddresses.aminoType, ValAddresses.typeUrl); function createBaseDVPair(): DVPair { return { delegatorAddress: "", @@ -1559,10 +1561,9 @@ export const DVPair = { typeUrl: "/cosmos.staking.v1beta1.DVPair", value: DVPair.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVPair.typeUrl, DVPair); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPair.aminoType, DVPair.typeUrl); function createBaseDVPairs(): DVPairs { return { pairs: [] @@ -1639,10 +1640,11 @@ export const DVPairs = { typeUrl: "/cosmos.staking.v1beta1.DVPairs", value: DVPairs.encode(message).finish() }; + }, + registerTypeUrl() { + DVPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVPairs.typeUrl, DVPairs); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPairs.aminoType, DVPairs.typeUrl); function createBaseDVVTriplet(): DVVTriplet { return { delegatorAddress: "", @@ -1741,10 +1743,9 @@ export const DVVTriplet = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", value: DVVTriplet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVVTriplet.typeUrl, DVVTriplet); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplet.aminoType, DVVTriplet.typeUrl); function createBaseDVVTriplets(): DVVTriplets { return { triplets: [] @@ -1821,10 +1822,11 @@ export const DVVTriplets = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", value: DVVTriplets.encode(message).finish() }; + }, + registerTypeUrl() { + DVVTriplet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVVTriplets.typeUrl, DVVTriplets); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplets.aminoType, DVVTriplets.typeUrl); function createBaseDelegation(): Delegation { return { delegatorAddress: "", @@ -1923,10 +1925,9 @@ export const Delegation = { typeUrl: "/cosmos.staking.v1beta1.Delegation", value: Delegation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Delegation.typeUrl, Delegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Delegation.aminoType, Delegation.typeUrl); function createBaseUnbondingDelegation(): UnbondingDelegation { return { delegatorAddress: "", @@ -2027,10 +2028,11 @@ export const UnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", value: UnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UnbondingDelegation.typeUrl, UnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegation.aminoType, UnbondingDelegation.typeUrl); function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry { return { creationHeight: BigInt(0), @@ -2165,10 +2167,9 @@ export const UnbondingDelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", value: UnbondingDelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UnbondingDelegationEntry.typeUrl, UnbondingDelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegationEntry.aminoType, UnbondingDelegationEntry.typeUrl); function createBaseRedelegationEntry(): RedelegationEntry { return { creationHeight: BigInt(0), @@ -2303,10 +2304,9 @@ export const RedelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", value: RedelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RedelegationEntry.typeUrl, RedelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntry.aminoType, RedelegationEntry.typeUrl); function createBaseRedelegation(): Redelegation { return { delegatorAddress: "", @@ -2419,10 +2419,11 @@ export const Redelegation = { typeUrl: "/cosmos.staking.v1beta1.Redelegation", value: Redelegation.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Redelegation.typeUrl, Redelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Redelegation.aminoType, Redelegation.typeUrl); function createBaseParams(): Params { return { unbondingTime: Duration.fromPartial({}), @@ -2557,10 +2558,9 @@ export const Params = { typeUrl: "/cosmos.staking.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseDelegationResponse(): DelegationResponse { return { delegation: Delegation.fromPartial({}), @@ -2647,10 +2647,12 @@ export const DelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", value: DelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Delegation.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationResponse.typeUrl, DelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationResponse.aminoType, DelegationResponse.typeUrl); function createBaseRedelegationEntryResponse(): RedelegationEntryResponse { return { redelegationEntry: RedelegationEntry.fromPartial({}), @@ -2737,10 +2739,11 @@ export const RedelegationEntryResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", value: RedelegationEntryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationEntryResponse.typeUrl, RedelegationEntryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntryResponse.aminoType, RedelegationEntryResponse.typeUrl); function createBaseRedelegationResponse(): RedelegationResponse { return { redelegation: Redelegation.fromPartial({}), @@ -2829,10 +2832,12 @@ export const RedelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", value: RedelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Redelegation.registerTypeUrl(); + RedelegationEntryResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationResponse.typeUrl, RedelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationResponse.aminoType, RedelegationResponse.typeUrl); function createBasePool(): Pool { return { notBondedTokens: "", @@ -2919,10 +2924,9 @@ export const Pool = { typeUrl: "/cosmos.staking.v1beta1.Pool", value: Pool.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Pool.typeUrl, Pool); -GlobalDecoderRegistry.registerAminoProtoMapping(Pool.aminoType, Pool.typeUrl); function createBaseValidatorUpdates(): ValidatorUpdates { return { updates: [] @@ -2999,7 +3003,8 @@ export const ValidatorUpdates = { typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates", value: ValidatorUpdates.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorUpdate.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ValidatorUpdates.typeUrl, ValidatorUpdates); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorUpdates.aminoType, ValidatorUpdates.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts index 78bf119c..85f1b7a8 100644 --- a/libs/injective-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation, MsgUpdateParams } from "./tx"; export const createCreateValidator = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateValidator.typeUrl, encoders: toEncoders(MsgCreateValidator), - converters: toConverters(MsgCreateValidator) + converters: toConverters(MsgCreateValidator), + deps: [MsgCreateValidator] }); export const useCreateValidator = buildUseMutation({ builderMutationFn: createCreateValidator @@ -15,7 +16,8 @@ export const createEditValidator = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgEditValidator.typeUrl, encoders: toEncoders(MsgEditValidator), - converters: toConverters(MsgEditValidator) + converters: toConverters(MsgEditValidator), + deps: [MsgEditValidator] }); export const useEditValidator = buildUseMutation({ builderMutationFn: createEditValidator @@ -24,7 +26,8 @@ export const createDelegate = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgDelegate.typeUrl, encoders: toEncoders(MsgDelegate), - converters: toConverters(MsgDelegate) + converters: toConverters(MsgDelegate), + deps: [MsgDelegate] }); export const useDelegate = buildUseMutation({ builderMutationFn: createDelegate @@ -33,7 +36,8 @@ export const createBeginRedelegate = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgBeginRedelegate.typeUrl, encoders: toEncoders(MsgBeginRedelegate), - converters: toConverters(MsgBeginRedelegate) + converters: toConverters(MsgBeginRedelegate), + deps: [MsgBeginRedelegate] }); export const useBeginRedelegate = buildUseMutation({ builderMutationFn: createBeginRedelegate @@ -42,7 +46,8 @@ export const createUndelegate = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgUndelegate.typeUrl, encoders: toEncoders(MsgUndelegate), - converters: toConverters(MsgUndelegate) + converters: toConverters(MsgUndelegate), + deps: [MsgUndelegate] }); export const useUndelegate = buildUseMutation({ builderMutationFn: createUndelegate @@ -51,7 +56,8 @@ export const createCancelUnbondingDelegation = (clientResolver?: SigningClientRe clientResolver, typeUrl: MsgCancelUnbondingDelegation.typeUrl, encoders: toEncoders(MsgCancelUnbondingDelegation), - converters: toConverters(MsgCancelUnbondingDelegation) + converters: toConverters(MsgCancelUnbondingDelegation), + deps: [MsgCancelUnbondingDelegation] }); export const useCancelUnbondingDelegation = buildUseMutation({ builderMutationFn: createCancelUnbondingDelegation @@ -60,7 +66,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/injective-react/src/cosmos/staking/v1beta1/tx.ts b/libs/injective-react/src/cosmos/staking/v1beta1/tx.ts index ef9fba80..d25b942c 100644 --- a/libs/injective-react/src/cosmos/staking/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/staking/v1beta1/tx.ts @@ -3,9 +3,9 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { description: Description; @@ -503,10 +503,11 @@ export const MsgCreateValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateValidator.typeUrl, MsgCreateValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidator.aminoType, MsgCreateValidator.typeUrl); function createBaseMsgCreateValidatorResponse(): MsgCreateValidatorResponse { return {}; } @@ -568,10 +569,9 @@ export const MsgCreateValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", value: MsgCreateValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateValidatorResponse.typeUrl, MsgCreateValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidatorResponse.aminoType, MsgCreateValidatorResponse.typeUrl); function createBaseMsgEditValidator(): MsgEditValidator { return { description: Description.fromPartial({}), @@ -682,10 +682,11 @@ export const MsgEditValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgEditValidator.typeUrl, MsgEditValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidator.aminoType, MsgEditValidator.typeUrl); function createBaseMsgEditValidatorResponse(): MsgEditValidatorResponse { return {}; } @@ -747,10 +748,9 @@ export const MsgEditValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", value: MsgEditValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEditValidatorResponse.typeUrl, MsgEditValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidatorResponse.aminoType, MsgEditValidatorResponse.typeUrl); function createBaseMsgDelegate(): MsgDelegate { return { delegatorAddress: "", @@ -849,10 +849,11 @@ export const MsgDelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDelegate.typeUrl, MsgDelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegate.aminoType, MsgDelegate.typeUrl); function createBaseMsgDelegateResponse(): MsgDelegateResponse { return {}; } @@ -914,10 +915,9 @@ export const MsgDelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", value: MsgDelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDelegateResponse.typeUrl, MsgDelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegateResponse.aminoType, MsgDelegateResponse.typeUrl); function createBaseMsgBeginRedelegate(): MsgBeginRedelegate { return { delegatorAddress: "", @@ -1028,10 +1028,11 @@ export const MsgBeginRedelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBeginRedelegate.typeUrl, MsgBeginRedelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegate.aminoType, MsgBeginRedelegate.typeUrl); function createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse { return { completionTime: new Date() @@ -1106,10 +1107,9 @@ export const MsgBeginRedelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", value: MsgBeginRedelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBeginRedelegateResponse.typeUrl, MsgBeginRedelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegateResponse.aminoType, MsgBeginRedelegateResponse.typeUrl); function createBaseMsgUndelegate(): MsgUndelegate { return { delegatorAddress: "", @@ -1208,10 +1208,11 @@ export const MsgUndelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegate.typeUrl, MsgUndelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegate.aminoType, MsgUndelegate.typeUrl); function createBaseMsgUndelegateResponse(): MsgUndelegateResponse { return { completionTime: new Date(), @@ -1298,10 +1299,11 @@ export const MsgUndelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", value: MsgUndelegateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegateResponse.typeUrl, MsgUndelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegateResponse.aminoType, MsgUndelegateResponse.typeUrl); function createBaseMsgCancelUnbondingDelegation(): MsgCancelUnbondingDelegation { return { delegatorAddress: "", @@ -1412,10 +1414,11 @@ export const MsgCancelUnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegation.typeUrl, MsgCancelUnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegation.aminoType, MsgCancelUnbondingDelegation.typeUrl); function createBaseMsgCancelUnbondingDelegationResponse(): MsgCancelUnbondingDelegationResponse { return {}; } @@ -1477,10 +1480,9 @@ export const MsgCancelUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", value: MsgCancelUnbondingDelegationResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegationResponse.typeUrl, MsgCancelUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegationResponse.aminoType, MsgCancelUnbondingDelegationResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1567,10 +1569,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1632,7 +1635,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/tx/signing/v1beta1/signing.ts b/libs/injective-react/src/cosmos/tx/signing/v1beta1/signing.ts index 8c90655f..de70a246 100644 --- a/libs/injective-react/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/libs/injective-react/src/cosmos/tx/signing/v1beta1/signing.ts @@ -2,7 +2,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../../crypto/multisig/ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * SignMode represents a signing mode with its own security guarantees. * @@ -308,10 +307,11 @@ export const SignatureDescriptors = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors", value: SignatureDescriptors.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptors.typeUrl, SignatureDescriptors); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptors.aminoType, SignatureDescriptors.typeUrl); function createBaseSignatureDescriptor(): SignatureDescriptor { return { publicKey: undefined, @@ -410,10 +410,11 @@ export const SignatureDescriptor = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor", value: SignatureDescriptor.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor.typeUrl, SignatureDescriptor); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor.aminoType, SignatureDescriptor.typeUrl); function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { return { single: undefined, @@ -500,10 +501,12 @@ export const SignatureDescriptor_Data = { typeUrl: "/cosmos.tx.signing.v1beta1.Data", value: SignatureDescriptor_Data.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data_Single.registerTypeUrl(); + SignatureDescriptor_Data_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data.typeUrl, SignatureDescriptor_Data); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data.aminoType, SignatureDescriptor_Data.typeUrl); function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { return { mode: 0, @@ -590,10 +593,9 @@ export const SignatureDescriptor_Data_Single = { typeUrl: "/cosmos.tx.signing.v1beta1.Single", value: SignatureDescriptor_Data_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Single.typeUrl, SignatureDescriptor_Data_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Single.aminoType, SignatureDescriptor_Data_Single.typeUrl); function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { return { bitarray: undefined, @@ -682,7 +684,9 @@ export const SignatureDescriptor_Data_Multi = { typeUrl: "/cosmos.tx.signing.v1beta1.Multi", value: SignatureDescriptor_Data_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + SignatureDescriptor_Data.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Multi.typeUrl, SignatureDescriptor_Data_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Multi.aminoType, SignatureDescriptor_Data_Multi.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/tx/v1beta1/service.rpc.func.ts b/libs/injective-react/src/cosmos/tx/v1beta1/service.rpc.func.ts index 4fb651f5..685a17ba 100644 --- a/libs/injective-react/src/cosmos/tx/v1beta1/service.rpc.func.ts +++ b/libs/injective-react/src/cosmos/tx/v1beta1/service.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetSimulate = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetSimulate, @@ -17,7 +18,8 @@ export const createGetGetTx = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetGetTx, @@ -28,7 +30,8 @@ export const createGetBroadcastTx = (clientResolver?: RpcResolver) => buildQuery decode: BroadcastTxResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "BroadcastTx", - clientResolver + clientResolver, + deps: [BroadcastTxRequest, BroadcastTxResponse] }); export const useGetBroadcastTx = buildUseQuery({ builderQueryFn: createGetBroadcastTx, @@ -39,7 +42,8 @@ export const createGetGetTxsEvent = (clientResolver?: RpcResolver) => buildQuery decode: GetTxsEventResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetTxsEvent", - clientResolver + clientResolver, + deps: [GetTxsEventRequest, GetTxsEventResponse] }); export const useGetGetTxsEvent = buildUseQuery({ builderQueryFn: createGetGetTxsEvent, @@ -50,7 +54,8 @@ export const createGetGetBlockWithTxs = (clientResolver?: RpcResolver) => buildQ decode: GetBlockWithTxsResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetBlockWithTxs", - clientResolver + clientResolver, + deps: [GetBlockWithTxsRequest, GetBlockWithTxsResponse] }); export const useGetGetBlockWithTxs = buildUseQuery({ builderQueryFn: createGetGetBlockWithTxs, @@ -61,7 +66,8 @@ export const createGetTxDecode = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetTxDecode, @@ -72,7 +78,8 @@ export const createGetTxEncode = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetTxEncode, @@ -83,7 +90,8 @@ export const createGetTxEncodeAmino = (clientResolver?: RpcResolver) => buildQue decode: TxEncodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxEncodeAmino", - clientResolver + clientResolver, + deps: [TxEncodeAminoRequest, TxEncodeAminoResponse] }); export const useGetTxEncodeAmino = buildUseQuery({ builderQueryFn: createGetTxEncodeAmino, @@ -94,7 +102,8 @@ export const createGetTxDecodeAmino = (clientResolver?: RpcResolver) => buildQue decode: TxDecodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxDecodeAmino", - clientResolver + clientResolver, + deps: [TxDecodeAminoRequest, TxDecodeAminoResponse] }); export const useGetTxDecodeAmino = buildUseQuery({ builderQueryFn: createGetTxDecodeAmino, diff --git a/libs/injective-react/src/cosmos/tx/v1beta1/service.ts b/libs/injective-react/src/cosmos/tx/v1beta1/service.ts index 9c0eaf31..6a7f7c35 100644 --- a/libs/injective-react/src/cosmos/tx/v1beta1/service.ts +++ b/libs/injective-react/src/cosmos/tx/v1beta1/service.ts @@ -5,7 +5,6 @@ import { BlockID, BlockIDAmino } from "../../../tendermint/types/types"; import { Block, BlockAmino } from "../../../tendermint/types/block"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** OrderBy defines the sorting order */ export enum OrderBy { /** @@ -824,10 +823,11 @@ export const GetTxsEventRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest", value: GetTxsEventRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventRequest.typeUrl, GetTxsEventRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventRequest.aminoType, GetTxsEventRequest.typeUrl); function createBaseGetTxsEventResponse(): GetTxsEventResponse { return { txs: [], @@ -942,10 +942,13 @@ export const GetTxsEventResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse", value: GetTxsEventResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventResponse.typeUrl, GetTxsEventResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventResponse.aminoType, GetTxsEventResponse.typeUrl); function createBaseBroadcastTxRequest(): BroadcastTxRequest { return { txBytes: new Uint8Array(), @@ -1032,10 +1035,9 @@ export const BroadcastTxRequest = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest", value: BroadcastTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BroadcastTxRequest.typeUrl, BroadcastTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxRequest.aminoType, BroadcastTxRequest.typeUrl); function createBaseBroadcastTxResponse(): BroadcastTxResponse { return { txResponse: undefined @@ -1110,10 +1112,11 @@ export const BroadcastTxResponse = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse", value: BroadcastTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BroadcastTxResponse.typeUrl, BroadcastTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxResponse.aminoType, BroadcastTxResponse.typeUrl); function createBaseSimulateRequest(): SimulateRequest { return { tx: undefined, @@ -1200,10 +1203,11 @@ export const SimulateRequest = { typeUrl: "/cosmos.tx.v1beta1.SimulateRequest", value: SimulateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateRequest.typeUrl, SimulateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateRequest.aminoType, SimulateRequest.typeUrl); function createBaseSimulateResponse(): SimulateResponse { return { gasInfo: undefined, @@ -1290,10 +1294,12 @@ export const SimulateResponse = { typeUrl: "/cosmos.tx.v1beta1.SimulateResponse", value: SimulateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateResponse.typeUrl, SimulateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateResponse.aminoType, SimulateResponse.typeUrl); function createBaseGetTxRequest(): GetTxRequest { return { hash: "" @@ -1368,10 +1374,9 @@ export const GetTxRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxRequest", value: GetTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GetTxRequest.typeUrl, GetTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxRequest.aminoType, GetTxRequest.typeUrl); function createBaseGetTxResponse(): GetTxResponse { return { tx: undefined, @@ -1458,10 +1463,12 @@ export const GetTxResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxResponse", value: GetTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxResponse.typeUrl, GetTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxResponse.aminoType, GetTxResponse.typeUrl); function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { return { height: BigInt(0), @@ -1548,10 +1555,11 @@ export const GetBlockWithTxsRequest = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest", value: GetBlockWithTxsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsRequest.typeUrl, GetBlockWithTxsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsRequest.aminoType, GetBlockWithTxsRequest.typeUrl); function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { return { txs: [], @@ -1664,10 +1672,14 @@ export const GetBlockWithTxsResponse = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse", value: GetBlockWithTxsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + BlockID.registerTypeUrl(); + Block.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsResponse.typeUrl, GetBlockWithTxsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsResponse.aminoType, GetBlockWithTxsResponse.typeUrl); function createBaseTxDecodeRequest(): TxDecodeRequest { return { txBytes: new Uint8Array() @@ -1742,10 +1754,9 @@ export const TxDecodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeRequest", value: TxDecodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeRequest.typeUrl, TxDecodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeRequest.aminoType, TxDecodeRequest.typeUrl); function createBaseTxDecodeResponse(): TxDecodeResponse { return { tx: undefined @@ -1820,10 +1831,11 @@ export const TxDecodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeResponse", value: TxDecodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxDecodeResponse.typeUrl, TxDecodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeResponse.aminoType, TxDecodeResponse.typeUrl); function createBaseTxEncodeRequest(): TxEncodeRequest { return { tx: undefined @@ -1898,10 +1910,11 @@ export const TxEncodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeRequest", value: TxEncodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxEncodeRequest.typeUrl, TxEncodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeRequest.aminoType, TxEncodeRequest.typeUrl); function createBaseTxEncodeResponse(): TxEncodeResponse { return { txBytes: new Uint8Array() @@ -1976,10 +1989,9 @@ export const TxEncodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeResponse", value: TxEncodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeResponse.typeUrl, TxEncodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeResponse.aminoType, TxEncodeResponse.typeUrl); function createBaseTxEncodeAminoRequest(): TxEncodeAminoRequest { return { aminoJson: "" @@ -2054,10 +2066,9 @@ export const TxEncodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoRequest", value: TxEncodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoRequest.typeUrl, TxEncodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoRequest.aminoType, TxEncodeAminoRequest.typeUrl); function createBaseTxEncodeAminoResponse(): TxEncodeAminoResponse { return { aminoBinary: new Uint8Array() @@ -2132,10 +2143,9 @@ export const TxEncodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoResponse", value: TxEncodeAminoResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoResponse.typeUrl, TxEncodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoResponse.aminoType, TxEncodeAminoResponse.typeUrl); function createBaseTxDecodeAminoRequest(): TxDecodeAminoRequest { return { aminoBinary: new Uint8Array() @@ -2210,10 +2220,9 @@ export const TxDecodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoRequest", value: TxDecodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeAminoRequest.typeUrl, TxDecodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoRequest.aminoType, TxDecodeAminoRequest.typeUrl); function createBaseTxDecodeAminoResponse(): TxDecodeAminoResponse { return { aminoJson: "" @@ -2288,7 +2297,6 @@ export const TxDecodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoResponse", value: TxDecodeAminoResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TxDecodeAminoResponse.typeUrl, TxDecodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoResponse.aminoType, TxDecodeAminoResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/tx/v1beta1/tx.ts b/libs/injective-react/src/cosmos/tx/v1beta1/tx.ts index 6e8614bb..e0136f83 100644 --- a/libs/injective-react/src/cosmos/tx/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/tx/v1beta1/tx.ts @@ -4,7 +4,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../crypto/multisig/v1b import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Tx is the standard type used for broadcasting transactions. */ export interface Tx { /** body is the processable content of the transaction */ @@ -747,10 +746,12 @@ export const Tx = { typeUrl: "/cosmos.tx.v1beta1.Tx", value: Tx.encode(message).finish() }; + }, + registerTypeUrl() { + TxBody.registerTypeUrl(); + AuthInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tx.typeUrl, Tx); -GlobalDecoderRegistry.registerAminoProtoMapping(Tx.aminoType, Tx.typeUrl); function createBaseTxRaw(): TxRaw { return { bodyBytes: new Uint8Array(), @@ -851,10 +852,9 @@ export const TxRaw = { typeUrl: "/cosmos.tx.v1beta1.TxRaw", value: TxRaw.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxRaw.typeUrl, TxRaw); -GlobalDecoderRegistry.registerAminoProtoMapping(TxRaw.aminoType, TxRaw.typeUrl); function createBaseSignDoc(): SignDoc { return { bodyBytes: new Uint8Array(), @@ -965,10 +965,9 @@ export const SignDoc = { typeUrl: "/cosmos.tx.v1beta1.SignDoc", value: SignDoc.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignDoc.typeUrl, SignDoc); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDoc.aminoType, SignDoc.typeUrl); function createBaseSignDocDirectAux(): SignDocDirectAux { return { bodyBytes: new Uint8Array(), @@ -1103,10 +1102,11 @@ export const SignDocDirectAux = { typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux", value: SignDocDirectAux.encode(message).finish() }; + }, + registerTypeUrl() { + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignDocDirectAux.typeUrl, SignDocDirectAux); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDocDirectAux.aminoType, SignDocDirectAux.typeUrl); function createBaseTxBody(): TxBody { return { messages: [], @@ -1235,10 +1235,9 @@ export const TxBody = { typeUrl: "/cosmos.tx.v1beta1.TxBody", value: TxBody.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxBody.typeUrl, TxBody); -GlobalDecoderRegistry.registerAminoProtoMapping(TxBody.aminoType, TxBody.typeUrl); function createBaseAuthInfo(): AuthInfo { return { signerInfos: [], @@ -1339,10 +1338,13 @@ export const AuthInfo = { typeUrl: "/cosmos.tx.v1beta1.AuthInfo", value: AuthInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SignerInfo.registerTypeUrl(); + Fee.registerTypeUrl(); + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AuthInfo.typeUrl, AuthInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(AuthInfo.aminoType, AuthInfo.typeUrl); function createBaseSignerInfo(): SignerInfo { return { publicKey: undefined, @@ -1441,10 +1443,11 @@ export const SignerInfo = { typeUrl: "/cosmos.tx.v1beta1.SignerInfo", value: SignerInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignerInfo.typeUrl, SignerInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(SignerInfo.aminoType, SignerInfo.typeUrl); function createBaseModeInfo(): ModeInfo { return { single: undefined, @@ -1531,10 +1534,12 @@ export const ModeInfo = { typeUrl: "/cosmos.tx.v1beta1.ModeInfo", value: ModeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo_Single.registerTypeUrl(); + ModeInfo_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo.typeUrl, ModeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo.aminoType, ModeInfo.typeUrl); function createBaseModeInfo_Single(): ModeInfo_Single { return { mode: 0 @@ -1609,10 +1614,9 @@ export const ModeInfo_Single = { typeUrl: "/cosmos.tx.v1beta1.Single", value: ModeInfo_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModeInfo_Single.typeUrl, ModeInfo_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Single.aminoType, ModeInfo_Single.typeUrl); function createBaseModeInfo_Multi(): ModeInfo_Multi { return { bitarray: undefined, @@ -1701,10 +1705,12 @@ export const ModeInfo_Multi = { typeUrl: "/cosmos.tx.v1beta1.Multi", value: ModeInfo_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo_Multi.typeUrl, ModeInfo_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Multi.aminoType, ModeInfo_Multi.typeUrl); function createBaseFee(): Fee { return { amount: [], @@ -1817,10 +1823,11 @@ export const Fee = { typeUrl: "/cosmos.tx.v1beta1.Fee", value: Fee.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Fee.typeUrl, Fee); -GlobalDecoderRegistry.registerAminoProtoMapping(Fee.aminoType, Fee.typeUrl); function createBaseTip(): Tip { return { amount: [], @@ -1909,10 +1916,11 @@ export const Tip = { typeUrl: "/cosmos.tx.v1beta1.Tip", value: Tip.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tip.typeUrl, Tip); -GlobalDecoderRegistry.registerAminoProtoMapping(Tip.aminoType, Tip.typeUrl); function createBaseAuxSignerData(): AuxSignerData { return { address: "", @@ -2023,7 +2031,8 @@ export const AuxSignerData = { typeUrl: "/cosmos.tx.v1beta1.AuxSignerData", value: AuxSignerData.encode(message).finish() }; + }, + registerTypeUrl() { + SignDocDirectAux.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AuxSignerData.typeUrl, AuxSignerData); -GlobalDecoderRegistry.registerAminoProtoMapping(AuxSignerData.aminoType, AuxSignerData.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/upgrade/v1beta1/upgrade.ts b/libs/injective-react/src/cosmos/upgrade/v1beta1/upgrade.ts index c2adfcb7..add35514 100644 --- a/libs/injective-react/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/libs/injective-react/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -303,10 +303,9 @@ export const Plan = { typeUrl: "/cosmos.upgrade.v1beta1.Plan", value: Plan.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Plan.typeUrl, Plan); -GlobalDecoderRegistry.registerAminoProtoMapping(Plan.aminoType, Plan.typeUrl); function createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal { return { title: "", @@ -405,10 +404,13 @@ export const SoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", value: SoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); + Plan.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); function createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal { return { title: "", @@ -495,10 +497,12 @@ export const CancelSoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", value: CancelSoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); function createBaseModuleVersion(): ModuleVersion { return { name: "", @@ -585,7 +589,6 @@ export const ModuleVersion = { typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", value: ModuleVersion.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ModuleVersion.typeUrl, ModuleVersion); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleVersion.aminoType, ModuleVersion.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts index a0043688..d73007c6 100644 --- a/libs/injective-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount } from "./tx"; export const createCreateVestingAccount = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateVestingAccount.typeUrl, encoders: toEncoders(MsgCreateVestingAccount), - converters: toConverters(MsgCreateVestingAccount) + converters: toConverters(MsgCreateVestingAccount), + deps: [MsgCreateVestingAccount] }); export const useCreateVestingAccount = buildUseMutation({ builderMutationFn: createCreateVestingAccount @@ -15,7 +16,8 @@ export const createCreatePermanentLockedAccount = (clientResolver?: SigningClien clientResolver, typeUrl: MsgCreatePermanentLockedAccount.typeUrl, encoders: toEncoders(MsgCreatePermanentLockedAccount), - converters: toConverters(MsgCreatePermanentLockedAccount) + converters: toConverters(MsgCreatePermanentLockedAccount), + deps: [MsgCreatePermanentLockedAccount] }); export const useCreatePermanentLockedAccount = buildUseMutation({ builderMutationFn: createCreatePermanentLockedAccount @@ -24,7 +26,8 @@ export const createCreatePeriodicVestingAccount = (clientResolver?: SigningClien clientResolver, typeUrl: MsgCreatePeriodicVestingAccount.typeUrl, encoders: toEncoders(MsgCreatePeriodicVestingAccount), - converters: toConverters(MsgCreatePeriodicVestingAccount) + converters: toConverters(MsgCreatePeriodicVestingAccount), + deps: [MsgCreatePeriodicVestingAccount] }); export const useCreatePeriodicVestingAccount = buildUseMutation({ builderMutationFn: createCreatePeriodicVestingAccount diff --git a/libs/injective-react/src/cosmos/vesting/v1beta1/tx.ts b/libs/injective-react/src/cosmos/vesting/v1beta1/tx.ts index 4e9fcb3f..5354ddff 100644 --- a/libs/injective-react/src/cosmos/vesting/v1beta1/tx.ts +++ b/libs/injective-react/src/cosmos/vesting/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Period, PeriodAmino } from "./vesting"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateVestingAccount defines a message that enables creating a vesting * account. @@ -277,10 +276,11 @@ export const MsgCreateVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateVestingAccount.typeUrl, MsgCreateVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccount.aminoType, MsgCreateVestingAccount.typeUrl); function createBaseMsgCreateVestingAccountResponse(): MsgCreateVestingAccountResponse { return {}; } @@ -342,10 +342,9 @@ export const MsgCreateVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", value: MsgCreateVestingAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateVestingAccountResponse.typeUrl, MsgCreateVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccountResponse.aminoType, MsgCreateVestingAccountResponse.typeUrl); function createBaseMsgCreatePermanentLockedAccount(): MsgCreatePermanentLockedAccount { return { fromAddress: "", @@ -446,10 +445,11 @@ export const MsgCreatePermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccount.typeUrl, MsgCreatePermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccount.aminoType, MsgCreatePermanentLockedAccount.typeUrl); function createBaseMsgCreatePermanentLockedAccountResponse(): MsgCreatePermanentLockedAccountResponse { return {}; } @@ -511,10 +511,9 @@ export const MsgCreatePermanentLockedAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", value: MsgCreatePermanentLockedAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccountResponse.typeUrl, MsgCreatePermanentLockedAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccountResponse.aminoType, MsgCreatePermanentLockedAccountResponse.typeUrl); function createBaseMsgCreatePeriodicVestingAccount(): MsgCreatePeriodicVestingAccount { return { fromAddress: "", @@ -627,10 +626,11 @@ export const MsgCreatePeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", value: MsgCreatePeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccount.typeUrl, MsgCreatePeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccount.aminoType, MsgCreatePeriodicVestingAccount.typeUrl); function createBaseMsgCreatePeriodicVestingAccountResponse(): MsgCreatePeriodicVestingAccountResponse { return {}; } @@ -692,7 +692,6 @@ export const MsgCreatePeriodicVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", value: MsgCreatePeriodicVestingAccountResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccountResponse.typeUrl, MsgCreatePeriodicVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccountResponse.aminoType, MsgCreatePeriodicVestingAccountResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos/vesting/v1beta1/vesting.ts b/libs/injective-react/src/cosmos/vesting/v1beta1/vesting.ts index 91f05562..f886cac4 100644 --- a/libs/injective-react/src/cosmos/vesting/v1beta1/vesting.ts +++ b/libs/injective-react/src/cosmos/vesting/v1beta1/vesting.ts @@ -2,7 +2,6 @@ import { BaseAccount, BaseAccountAmino } from "../../auth/v1beta1/auth"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all * the necessary fields needed for any vesting account implementation. @@ -287,10 +286,12 @@ export const BaseVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", value: BaseVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BaseVestingAccount.typeUrl, BaseVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseVestingAccount.aminoType, BaseVestingAccount.typeUrl); function createBaseContinuousVestingAccount(): ContinuousVestingAccount { return { baseVestingAccount: undefined, @@ -377,10 +378,11 @@ export const ContinuousVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", value: ContinuousVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContinuousVestingAccount.typeUrl, ContinuousVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ContinuousVestingAccount.aminoType, ContinuousVestingAccount.typeUrl); function createBaseDelayedVestingAccount(): DelayedVestingAccount { return { baseVestingAccount: undefined @@ -455,10 +457,11 @@ export const DelayedVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", value: DelayedVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelayedVestingAccount.typeUrl, DelayedVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(DelayedVestingAccount.aminoType, DelayedVestingAccount.typeUrl); function createBasePeriod(): Period { return { length: BigInt(0), @@ -547,10 +550,11 @@ export const Period = { typeUrl: "/cosmos.vesting.v1beta1.Period", value: Period.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Period.typeUrl, Period); -GlobalDecoderRegistry.registerAminoProtoMapping(Period.aminoType, Period.typeUrl); function createBasePeriodicVestingAccount(): PeriodicVestingAccount { return { baseVestingAccount: undefined, @@ -651,10 +655,12 @@ export const PeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", value: PeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PeriodicVestingAccount.typeUrl, PeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PeriodicVestingAccount.aminoType, PeriodicVestingAccount.typeUrl); function createBasePermanentLockedAccount(): PermanentLockedAccount { return { baseVestingAccount: undefined @@ -729,7 +735,8 @@ export const PermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", value: PermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(PermanentLockedAccount.typeUrl, PermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PermanentLockedAccount.aminoType, PermanentLockedAccount.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmos_proto/cosmos.ts b/libs/injective-react/src/cosmos_proto/cosmos.ts index 0a97877f..9c5ace2a 100644 --- a/libs/injective-react/src/cosmos_proto/cosmos.ts +++ b/libs/injective-react/src/cosmos_proto/cosmos.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../binary"; import { DeepPartial } from "../helpers"; -import { GlobalDecoderRegistry } from "../registry"; export enum ScalarType { SCALAR_TYPE_UNSPECIFIED = 0, SCALAR_TYPE_STRING = 1, @@ -231,9 +230,9 @@ export const InterfaceDescriptor = { typeUrl: "/cosmos_proto.InterfaceDescriptor", value: InterfaceDescriptor.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InterfaceDescriptor.typeUrl, InterfaceDescriptor); function createBaseScalarDescriptor(): ScalarDescriptor { return { name: "", @@ -336,6 +335,6 @@ export const ScalarDescriptor = { typeUrl: "/cosmos_proto.ScalarDescriptor", value: ScalarDescriptor.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ScalarDescriptor.typeUrl, ScalarDescriptor); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmwasm/wasm/v1/proposal_legacy.ts b/libs/injective-react/src/cosmwasm/wasm/v1/proposal_legacy.ts index 0a986632..614900e7 100644 --- a/libs/injective-react/src/cosmwasm/wasm/v1/proposal_legacy.ts +++ b/libs/injective-react/src/cosmwasm/wasm/v1/proposal_legacy.ts @@ -1,9 +1,9 @@ import { AccessConfig, AccessConfigAmino } from "./types"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for * an explicit StoreCodeProposal. To submit WASM code to the system, @@ -834,10 +834,13 @@ export const StoreCodeProposal = { typeUrl: "/cosmwasm.wasm.v1.StoreCodeProposal", value: StoreCodeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(StoreCodeProposal.typeUrl, StoreCodeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(StoreCodeProposal.aminoType, StoreCodeProposal.typeUrl); + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StoreCodeProposal.typeUrl, StoreCodeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(StoreCodeProposal.aminoType, StoreCodeProposal.typeUrl); function createBaseInstantiateContractProposal(): InstantiateContractProposal { return { title: "", @@ -998,10 +1001,13 @@ export const InstantiateContractProposal = { typeUrl: "/cosmwasm.wasm.v1.InstantiateContractProposal", value: InstantiateContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(InstantiateContractProposal.typeUrl, InstantiateContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContractProposal.aminoType, InstantiateContractProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(InstantiateContractProposal.typeUrl, InstantiateContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContractProposal.aminoType, InstantiateContractProposal.typeUrl); function createBaseInstantiateContract2Proposal(): InstantiateContract2Proposal { return { title: "", @@ -1186,10 +1192,13 @@ export const InstantiateContract2Proposal = { typeUrl: "/cosmwasm.wasm.v1.InstantiateContract2Proposal", value: InstantiateContract2Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(InstantiateContract2Proposal.typeUrl, InstantiateContract2Proposal); + GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContract2Proposal.aminoType, InstantiateContract2Proposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(InstantiateContract2Proposal.typeUrl, InstantiateContract2Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContract2Proposal.aminoType, InstantiateContract2Proposal.typeUrl); function createBaseMigrateContractProposal(): MigrateContractProposal { return { title: "", @@ -1312,10 +1321,12 @@ export const MigrateContractProposal = { typeUrl: "/cosmwasm.wasm.v1.MigrateContractProposal", value: MigrateContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(MigrateContractProposal.typeUrl, MigrateContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(MigrateContractProposal.aminoType, MigrateContractProposal.typeUrl); } }; -GlobalDecoderRegistry.register(MigrateContractProposal.typeUrl, MigrateContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MigrateContractProposal.aminoType, MigrateContractProposal.typeUrl); function createBaseSudoContractProposal(): SudoContractProposal { return { title: "", @@ -1426,10 +1437,12 @@ export const SudoContractProposal = { typeUrl: "/cosmwasm.wasm.v1.SudoContractProposal", value: SudoContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SudoContractProposal.typeUrl, SudoContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SudoContractProposal.aminoType, SudoContractProposal.typeUrl); } }; -GlobalDecoderRegistry.register(SudoContractProposal.typeUrl, SudoContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SudoContractProposal.aminoType, SudoContractProposal.typeUrl); function createBaseExecuteContractProposal(): ExecuteContractProposal { return { title: "", @@ -1566,10 +1579,13 @@ export const ExecuteContractProposal = { typeUrl: "/cosmwasm.wasm.v1.ExecuteContractProposal", value: ExecuteContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ExecuteContractProposal.typeUrl, ExecuteContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ExecuteContractProposal.aminoType, ExecuteContractProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExecuteContractProposal.typeUrl, ExecuteContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ExecuteContractProposal.aminoType, ExecuteContractProposal.typeUrl); function createBaseUpdateAdminProposal(): UpdateAdminProposal { return { title: "", @@ -1680,10 +1696,12 @@ export const UpdateAdminProposal = { typeUrl: "/cosmwasm.wasm.v1.UpdateAdminProposal", value: UpdateAdminProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateAdminProposal.typeUrl, UpdateAdminProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateAdminProposal.aminoType, UpdateAdminProposal.typeUrl); } }; -GlobalDecoderRegistry.register(UpdateAdminProposal.typeUrl, UpdateAdminProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateAdminProposal.aminoType, UpdateAdminProposal.typeUrl); function createBaseClearAdminProposal(): ClearAdminProposal { return { title: "", @@ -1782,10 +1800,12 @@ export const ClearAdminProposal = { typeUrl: "/cosmwasm.wasm.v1.ClearAdminProposal", value: ClearAdminProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ClearAdminProposal.typeUrl, ClearAdminProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ClearAdminProposal.aminoType, ClearAdminProposal.typeUrl); } }; -GlobalDecoderRegistry.register(ClearAdminProposal.typeUrl, ClearAdminProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ClearAdminProposal.aminoType, ClearAdminProposal.typeUrl); function createBasePinCodesProposal(): PinCodesProposal { return { title: "", @@ -1895,10 +1915,12 @@ export const PinCodesProposal = { typeUrl: "/cosmwasm.wasm.v1.PinCodesProposal", value: PinCodesProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PinCodesProposal.typeUrl, PinCodesProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(PinCodesProposal.aminoType, PinCodesProposal.typeUrl); } }; -GlobalDecoderRegistry.register(PinCodesProposal.typeUrl, PinCodesProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(PinCodesProposal.aminoType, PinCodesProposal.typeUrl); function createBaseUnpinCodesProposal(): UnpinCodesProposal { return { title: "", @@ -2008,10 +2030,12 @@ export const UnpinCodesProposal = { typeUrl: "/cosmwasm.wasm.v1.UnpinCodesProposal", value: UnpinCodesProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UnpinCodesProposal.typeUrl, UnpinCodesProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UnpinCodesProposal.aminoType, UnpinCodesProposal.typeUrl); } }; -GlobalDecoderRegistry.register(UnpinCodesProposal.typeUrl, UnpinCodesProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UnpinCodesProposal.aminoType, UnpinCodesProposal.typeUrl); function createBaseAccessConfigUpdate(): AccessConfigUpdate { return { codeId: BigInt(0), @@ -2098,10 +2122,11 @@ export const AccessConfigUpdate = { typeUrl: "/cosmwasm.wasm.v1.AccessConfigUpdate", value: AccessConfigUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AccessConfigUpdate.typeUrl, AccessConfigUpdate); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessConfigUpdate.aminoType, AccessConfigUpdate.typeUrl); function createBaseUpdateInstantiateConfigProposal(): UpdateInstantiateConfigProposal { return { title: "", @@ -2202,10 +2227,13 @@ export const UpdateInstantiateConfigProposal = { typeUrl: "/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal", value: UpdateInstantiateConfigProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateInstantiateConfigProposal.typeUrl, UpdateInstantiateConfigProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateInstantiateConfigProposal.aminoType, UpdateInstantiateConfigProposal.typeUrl); + AccessConfigUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UpdateInstantiateConfigProposal.typeUrl, UpdateInstantiateConfigProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateInstantiateConfigProposal.aminoType, UpdateInstantiateConfigProposal.typeUrl); function createBaseStoreAndInstantiateContractProposal(): StoreAndInstantiateContractProposal { return { title: "", @@ -2426,7 +2454,11 @@ export const StoreAndInstantiateContractProposal = { typeUrl: "/cosmwasm.wasm.v1.StoreAndInstantiateContractProposal", value: StoreAndInstantiateContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(StoreAndInstantiateContractProposal.typeUrl, StoreAndInstantiateContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(StoreAndInstantiateContractProposal.aminoType, StoreAndInstantiateContractProposal.typeUrl); + AccessConfig.registerTypeUrl(); + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(StoreAndInstantiateContractProposal.typeUrl, StoreAndInstantiateContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(StoreAndInstantiateContractProposal.aminoType, StoreAndInstantiateContractProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmwasm/wasm/v1/query.rpc.func.ts b/libs/injective-react/src/cosmwasm/wasm/v1/query.rpc.func.ts index 19541ee4..32e4b695 100644 --- a/libs/injective-react/src/cosmwasm/wasm/v1/query.rpc.func.ts +++ b/libs/injective-react/src/cosmwasm/wasm/v1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetContractInfo = (clientResolver?: RpcResolver) => buildQuer decode: QueryContractInfoResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractInfo", - clientResolver + clientResolver, + deps: [QueryContractInfoRequest, QueryContractInfoResponse] }); export const useGetContractInfo = buildUseQuery({ builderQueryFn: createGetContractInfo, @@ -17,7 +18,8 @@ export const createGetContractHistory = (clientResolver?: RpcResolver) => buildQ decode: QueryContractHistoryResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractHistory", - clientResolver + clientResolver, + deps: [QueryContractHistoryRequest, QueryContractHistoryResponse] }); export const useGetContractHistory = buildUseQuery({ builderQueryFn: createGetContractHistory, @@ -28,7 +30,8 @@ export const createGetContractsByCode = (clientResolver?: RpcResolver) => buildQ decode: QueryContractsByCodeResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCode", - clientResolver + clientResolver, + deps: [QueryContractsByCodeRequest, QueryContractsByCodeResponse] }); export const useGetContractsByCode = buildUseQuery({ builderQueryFn: createGetContractsByCode, @@ -39,7 +42,8 @@ export const createGetAllContractState = (clientResolver?: RpcResolver) => build decode: QueryAllContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "AllContractState", - clientResolver + clientResolver, + deps: [QueryAllContractStateRequest, QueryAllContractStateResponse] }); export const useGetAllContractState = buildUseQuery({ builderQueryFn: createGetAllContractState, @@ -50,7 +54,8 @@ export const createGetRawContractState = (clientResolver?: RpcResolver) => build decode: QueryRawContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "RawContractState", - clientResolver + clientResolver, + deps: [QueryRawContractStateRequest, QueryRawContractStateResponse] }); export const useGetRawContractState = buildUseQuery({ builderQueryFn: createGetRawContractState, @@ -61,7 +66,8 @@ export const createGetSmartContractState = (clientResolver?: RpcResolver) => bui decode: QuerySmartContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "SmartContractState", - clientResolver + clientResolver, + deps: [QuerySmartContractStateRequest, QuerySmartContractStateResponse] }); export const useGetSmartContractState = buildUseQuery({ builderQueryFn: createGetSmartContractState, @@ -72,7 +78,8 @@ export const createGetCode = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetCode, @@ -83,7 +90,8 @@ export const createGetCodes = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetCodes, @@ -94,7 +102,8 @@ export const createGetCodeInfo = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetCodeInfo, @@ -105,7 +114,8 @@ export const createGetPinnedCodes = (clientResolver?: RpcResolver) => buildQuery decode: QueryPinnedCodesResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "PinnedCodes", - clientResolver + clientResolver, + deps: [QueryPinnedCodesRequest, QueryPinnedCodesResponse] }); export const useGetPinnedCodes = buildUseQuery({ builderQueryFn: createGetPinnedCodes, @@ -116,7 +126,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -127,7 +138,8 @@ export const createGetContractsByCreator = (clientResolver?: RpcResolver) => bui decode: QueryContractsByCreatorResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCreator", - clientResolver + clientResolver, + deps: [QueryContractsByCreatorRequest, QueryContractsByCreatorResponse] }); export const useGetContractsByCreator = buildUseQuery({ builderQueryFn: createGetContractsByCreator, @@ -138,7 +150,8 @@ export const createGetWasmLimitsConfig = (clientResolver?: RpcResolver) => build decode: QueryWasmLimitsConfigResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "WasmLimitsConfig", - clientResolver + clientResolver, + deps: [QueryWasmLimitsConfigRequest, QueryWasmLimitsConfigResponse] }); export const useGetWasmLimitsConfig = buildUseQuery({ builderQueryFn: createGetWasmLimitsConfig, @@ -149,7 +162,8 @@ export const createGetBuildAddress = (clientResolver?: RpcResolver) => buildQuer decode: QueryBuildAddressResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "BuildAddress", - clientResolver + clientResolver, + deps: [QueryBuildAddressRequest, QueryBuildAddressResponse] }); export const useGetBuildAddress = buildUseQuery({ builderQueryFn: createGetBuildAddress, diff --git a/libs/injective-react/src/cosmwasm/wasm/v1/query.ts b/libs/injective-react/src/cosmwasm/wasm/v1/query.ts index cd8c0b8e..4352cce0 100644 --- a/libs/injective-react/src/cosmwasm/wasm/v1/query.ts +++ b/libs/injective-react/src/cosmwasm/wasm/v1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { ContractInfo, ContractInfoAmino, ContractCodeHistoryEntry, ContractCodeHistoryEntryAmino, Model, ModelAmino, AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -774,10 +773,9 @@ export const QueryContractInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", value: QueryContractInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryContractInfoRequest.typeUrl, QueryContractInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoRequest.aminoType, QueryContractInfoRequest.typeUrl); function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { return { address: "", @@ -864,10 +862,11 @@ export const QueryContractInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", value: QueryContractInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractInfoResponse.typeUrl, QueryContractInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoResponse.aminoType, QueryContractInfoResponse.typeUrl); function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { return { address: "", @@ -954,10 +953,11 @@ export const QueryContractHistoryRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", value: QueryContractHistoryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryRequest.typeUrl, QueryContractHistoryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryRequest.aminoType, QueryContractHistoryRequest.typeUrl); function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse { return { entries: [], @@ -1046,10 +1046,12 @@ export const QueryContractHistoryResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", value: QueryContractHistoryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractCodeHistoryEntry.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryResponse.typeUrl, QueryContractHistoryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryResponse.aminoType, QueryContractHistoryResponse.typeUrl); function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { return { codeId: BigInt(0), @@ -1136,10 +1138,11 @@ export const QueryContractsByCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", value: QueryContractsByCodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeRequest.typeUrl, QueryContractsByCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeRequest.aminoType, QueryContractsByCodeRequest.typeUrl); function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse { return { contracts: [], @@ -1228,10 +1231,11 @@ export const QueryContractsByCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", value: QueryContractsByCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeResponse.typeUrl, QueryContractsByCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeResponse.aminoType, QueryContractsByCodeResponse.typeUrl); function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { return { address: "", @@ -1318,10 +1322,11 @@ export const QueryAllContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", value: QueryAllContractStateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateRequest.typeUrl, QueryAllContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateRequest.aminoType, QueryAllContractStateRequest.typeUrl); function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse { return { models: [], @@ -1410,10 +1415,12 @@ export const QueryAllContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", value: QueryAllContractStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Model.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateResponse.typeUrl, QueryAllContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateResponse.aminoType, QueryAllContractStateResponse.typeUrl); function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { return { address: "", @@ -1500,10 +1507,9 @@ export const QueryRawContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", value: QueryRawContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateRequest.typeUrl, QueryRawContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateRequest.aminoType, QueryRawContractStateRequest.typeUrl); function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse { return { data: new Uint8Array() @@ -1578,10 +1584,9 @@ export const QueryRawContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", value: QueryRawContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateResponse.typeUrl, QueryRawContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateResponse.aminoType, QueryRawContractStateResponse.typeUrl); function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { return { address: "", @@ -1668,10 +1673,9 @@ export const QuerySmartContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", value: QuerySmartContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateRequest.typeUrl, QuerySmartContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateRequest.aminoType, QuerySmartContractStateRequest.typeUrl); function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse { return { data: new Uint8Array() @@ -1746,10 +1750,9 @@ export const QuerySmartContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", value: QuerySmartContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateResponse.typeUrl, QuerySmartContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateResponse.aminoType, QuerySmartContractStateResponse.typeUrl); function createBaseQueryCodeRequest(): QueryCodeRequest { return { codeId: BigInt(0) @@ -1824,10 +1827,9 @@ export const QueryCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", value: QueryCodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeRequest.typeUrl, QueryCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeRequest.aminoType, QueryCodeRequest.typeUrl); function createBaseQueryCodeInfoRequest(): QueryCodeInfoRequest { return { codeId: BigInt(0) @@ -1902,10 +1904,9 @@ export const QueryCodeInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoRequest", value: QueryCodeInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeInfoRequest.typeUrl, QueryCodeInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoRequest.aminoType, QueryCodeInfoRequest.typeUrl); function createBaseQueryCodeInfoResponse(): QueryCodeInfoResponse { return { codeId: BigInt(0), @@ -2016,10 +2017,11 @@ export const QueryCodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoResponse", value: QueryCodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeInfoResponse.typeUrl, QueryCodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoResponse.aminoType, QueryCodeInfoResponse.typeUrl); function createBaseCodeInfoResponse(): CodeInfoResponse { return { codeId: BigInt(0), @@ -2130,10 +2132,11 @@ export const CodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", value: CodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfoResponse.typeUrl, CodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfoResponse.aminoType, CodeInfoResponse.typeUrl); function createBaseQueryCodeResponse(): QueryCodeResponse { return { codeInfo: undefined, @@ -2220,10 +2223,11 @@ export const QueryCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", value: QueryCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeResponse.typeUrl, QueryCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeResponse.aminoType, QueryCodeResponse.typeUrl); function createBaseQueryCodesRequest(): QueryCodesRequest { return { pagination: undefined @@ -2298,10 +2302,11 @@ export const QueryCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", value: QueryCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesRequest.typeUrl, QueryCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesRequest.aminoType, QueryCodesRequest.typeUrl); function createBaseQueryCodesResponse(): QueryCodesResponse { return { codeInfos: [], @@ -2390,10 +2395,12 @@ export const QueryCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", value: QueryCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesResponse.typeUrl, QueryCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesResponse.aminoType, QueryCodesResponse.typeUrl); function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { return { pagination: undefined @@ -2468,10 +2475,11 @@ export const QueryPinnedCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", value: QueryPinnedCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesRequest.typeUrl, QueryPinnedCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesRequest.aminoType, QueryPinnedCodesRequest.typeUrl); function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { return { codeIds: [], @@ -2569,10 +2577,11 @@ export const QueryPinnedCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", value: QueryPinnedCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesResponse.typeUrl, QueryPinnedCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesResponse.aminoType, QueryPinnedCodesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2634,10 +2643,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -2712,10 +2720,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest { return { creatorAddress: "", @@ -2802,10 +2811,11 @@ export const QueryContractsByCreatorRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest", value: QueryContractsByCreatorRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorRequest.typeUrl, QueryContractsByCreatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorRequest.aminoType, QueryContractsByCreatorRequest.typeUrl); function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorResponse { return { contractAddresses: [], @@ -2894,10 +2904,11 @@ export const QueryContractsByCreatorResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse", value: QueryContractsByCreatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorResponse.typeUrl, QueryContractsByCreatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorResponse.aminoType, QueryContractsByCreatorResponse.typeUrl); function createBaseQueryWasmLimitsConfigRequest(): QueryWasmLimitsConfigRequest { return {}; } @@ -2959,10 +2970,9 @@ export const QueryWasmLimitsConfigRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigRequest", value: QueryWasmLimitsConfigRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigRequest.typeUrl, QueryWasmLimitsConfigRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigRequest.aminoType, QueryWasmLimitsConfigRequest.typeUrl); function createBaseQueryWasmLimitsConfigResponse(): QueryWasmLimitsConfigResponse { return { config: "" @@ -3037,10 +3047,9 @@ export const QueryWasmLimitsConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigResponse", value: QueryWasmLimitsConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigResponse.typeUrl, QueryWasmLimitsConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigResponse.aminoType, QueryWasmLimitsConfigResponse.typeUrl); function createBaseQueryBuildAddressRequest(): QueryBuildAddressRequest { return { codeHash: "", @@ -3151,10 +3160,9 @@ export const QueryBuildAddressRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressRequest", value: QueryBuildAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBuildAddressRequest.typeUrl, QueryBuildAddressRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressRequest.aminoType, QueryBuildAddressRequest.typeUrl); function createBaseQueryBuildAddressResponse(): QueryBuildAddressResponse { return { address: "" @@ -3229,7 +3237,6 @@ export const QueryBuildAddressResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressResponse", value: QueryBuildAddressResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(QueryBuildAddressResponse.typeUrl, QueryBuildAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressResponse.aminoType, QueryBuildAddressResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts b/libs/injective-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts index 82a34fc7..db479ca4 100644 --- a/libs/injective-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract, MsgRemoveCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddresses, MsgStoreAndMigrateContract, MsgUpdateContractLabel } from "./tx"; export const createStoreCode = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgStoreCode.typeUrl, encoders: toEncoders(MsgStoreCode), - converters: toConverters(MsgStoreCode) + converters: toConverters(MsgStoreCode), + deps: [MsgStoreCode] }); export const useStoreCode = buildUseMutation({ builderMutationFn: createStoreCode @@ -15,7 +16,8 @@ export const createInstantiateContract = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgInstantiateContract.typeUrl, encoders: toEncoders(MsgInstantiateContract), - converters: toConverters(MsgInstantiateContract) + converters: toConverters(MsgInstantiateContract), + deps: [MsgInstantiateContract] }); export const useInstantiateContract = buildUseMutation({ builderMutationFn: createInstantiateContract @@ -24,7 +26,8 @@ export const createInstantiateContract2 = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgInstantiateContract2.typeUrl, encoders: toEncoders(MsgInstantiateContract2), - converters: toConverters(MsgInstantiateContract2) + converters: toConverters(MsgInstantiateContract2), + deps: [MsgInstantiateContract2] }); export const useInstantiateContract2 = buildUseMutation({ builderMutationFn: createInstantiateContract2 @@ -33,7 +36,8 @@ export const createExecuteContract = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgExecuteContract.typeUrl, encoders: toEncoders(MsgExecuteContract), - converters: toConverters(MsgExecuteContract) + converters: toConverters(MsgExecuteContract), + deps: [MsgExecuteContract] }); export const useExecuteContract = buildUseMutation({ builderMutationFn: createExecuteContract @@ -42,7 +46,8 @@ export const createMigrateContract = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgMigrateContract.typeUrl, encoders: toEncoders(MsgMigrateContract), - converters: toConverters(MsgMigrateContract) + converters: toConverters(MsgMigrateContract), + deps: [MsgMigrateContract] }); export const useMigrateContract = buildUseMutation({ builderMutationFn: createMigrateContract @@ -51,7 +56,8 @@ export const createUpdateAdmin = (clientResolver?: SigningClientResolver) => bui clientResolver, typeUrl: MsgUpdateAdmin.typeUrl, encoders: toEncoders(MsgUpdateAdmin), - converters: toConverters(MsgUpdateAdmin) + converters: toConverters(MsgUpdateAdmin), + deps: [MsgUpdateAdmin] }); export const useUpdateAdmin = buildUseMutation({ builderMutationFn: createUpdateAdmin @@ -60,7 +66,8 @@ export const createClearAdmin = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgClearAdmin.typeUrl, encoders: toEncoders(MsgClearAdmin), - converters: toConverters(MsgClearAdmin) + converters: toConverters(MsgClearAdmin), + deps: [MsgClearAdmin] }); export const useClearAdmin = buildUseMutation({ builderMutationFn: createClearAdmin @@ -69,7 +76,8 @@ export const createUpdateInstantiateConfig = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgUpdateInstantiateConfig.typeUrl, encoders: toEncoders(MsgUpdateInstantiateConfig), - converters: toConverters(MsgUpdateInstantiateConfig) + converters: toConverters(MsgUpdateInstantiateConfig), + deps: [MsgUpdateInstantiateConfig] }); export const useUpdateInstantiateConfig = buildUseMutation({ builderMutationFn: createUpdateInstantiateConfig @@ -78,7 +86,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -87,7 +96,8 @@ export const createSudoContract = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgSudoContract.typeUrl, encoders: toEncoders(MsgSudoContract), - converters: toConverters(MsgSudoContract) + converters: toConverters(MsgSudoContract), + deps: [MsgSudoContract] }); export const useSudoContract = buildUseMutation({ builderMutationFn: createSudoContract @@ -96,7 +106,8 @@ export const createPinCodes = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgPinCodes.typeUrl, encoders: toEncoders(MsgPinCodes), - converters: toConverters(MsgPinCodes) + converters: toConverters(MsgPinCodes), + deps: [MsgPinCodes] }); export const usePinCodes = buildUseMutation({ builderMutationFn: createPinCodes @@ -105,7 +116,8 @@ export const createUnpinCodes = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgUnpinCodes.typeUrl, encoders: toEncoders(MsgUnpinCodes), - converters: toConverters(MsgUnpinCodes) + converters: toConverters(MsgUnpinCodes), + deps: [MsgUnpinCodes] }); export const useUnpinCodes = buildUseMutation({ builderMutationFn: createUnpinCodes @@ -114,7 +126,8 @@ export const createStoreAndInstantiateContract = (clientResolver?: SigningClient clientResolver, typeUrl: MsgStoreAndInstantiateContract.typeUrl, encoders: toEncoders(MsgStoreAndInstantiateContract), - converters: toConverters(MsgStoreAndInstantiateContract) + converters: toConverters(MsgStoreAndInstantiateContract), + deps: [MsgStoreAndInstantiateContract] }); export const useStoreAndInstantiateContract = buildUseMutation({ builderMutationFn: createStoreAndInstantiateContract @@ -123,7 +136,8 @@ export const createRemoveCodeUploadParamsAddresses = (clientResolver?: SigningCl clientResolver, typeUrl: MsgRemoveCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgRemoveCodeUploadParamsAddresses), - converters: toConverters(MsgRemoveCodeUploadParamsAddresses) + converters: toConverters(MsgRemoveCodeUploadParamsAddresses), + deps: [MsgRemoveCodeUploadParamsAddresses] }); export const useRemoveCodeUploadParamsAddresses = buildUseMutation({ builderMutationFn: createRemoveCodeUploadParamsAddresses @@ -132,7 +146,8 @@ export const createAddCodeUploadParamsAddresses = (clientResolver?: SigningClien clientResolver, typeUrl: MsgAddCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgAddCodeUploadParamsAddresses), - converters: toConverters(MsgAddCodeUploadParamsAddresses) + converters: toConverters(MsgAddCodeUploadParamsAddresses), + deps: [MsgAddCodeUploadParamsAddresses] }); export const useAddCodeUploadParamsAddresses = buildUseMutation({ builderMutationFn: createAddCodeUploadParamsAddresses @@ -141,7 +156,8 @@ export const createStoreAndMigrateContract = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgStoreAndMigrateContract.typeUrl, encoders: toEncoders(MsgStoreAndMigrateContract), - converters: toConverters(MsgStoreAndMigrateContract) + converters: toConverters(MsgStoreAndMigrateContract), + deps: [MsgStoreAndMigrateContract] }); export const useStoreAndMigrateContract = buildUseMutation({ builderMutationFn: createStoreAndMigrateContract @@ -150,7 +166,8 @@ export const createUpdateContractLabel = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgUpdateContractLabel.typeUrl, encoders: toEncoders(MsgUpdateContractLabel), - converters: toConverters(MsgUpdateContractLabel) + converters: toConverters(MsgUpdateContractLabel), + deps: [MsgUpdateContractLabel] }); export const useUpdateContractLabel = buildUseMutation({ builderMutationFn: createUpdateContractLabel diff --git a/libs/injective-react/src/cosmwasm/wasm/v1/tx.ts b/libs/injective-react/src/cosmwasm/wasm/v1/tx.ts index c97c9907..4d1c7288 100644 --- a/libs/injective-react/src/cosmwasm/wasm/v1/tx.ts +++ b/libs/injective-react/src/cosmwasm/wasm/v1/tx.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { /** Sender is the actor that signed the messages */ @@ -1070,10 +1069,11 @@ export const MsgStoreCode = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreCode.typeUrl, MsgStoreCode); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCode.aminoType, MsgStoreCode.typeUrl); function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { return { codeId: BigInt(0), @@ -1160,10 +1160,9 @@ export const MsgStoreCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", value: MsgStoreCodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreCodeResponse.typeUrl, MsgStoreCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCodeResponse.aminoType, MsgStoreCodeResponse.typeUrl); function createBaseMsgInstantiateContract(): MsgInstantiateContract { return { sender: "", @@ -1300,10 +1299,11 @@ export const MsgInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract.typeUrl, MsgInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract.aminoType, MsgInstantiateContract.typeUrl); function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { return { address: "", @@ -1390,10 +1390,9 @@ export const MsgInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", value: MsgInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContractResponse.typeUrl, MsgInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContractResponse.aminoType, MsgInstantiateContractResponse.typeUrl); function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { return { sender: "", @@ -1554,10 +1553,11 @@ export const MsgInstantiateContract2 = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", value: MsgInstantiateContract2.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract2.typeUrl, MsgInstantiateContract2); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2.aminoType, MsgInstantiateContract2.typeUrl); function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { return { address: "", @@ -1644,10 +1644,9 @@ export const MsgInstantiateContract2Response = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", value: MsgInstantiateContract2Response.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContract2Response.typeUrl, MsgInstantiateContract2Response); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2Response.aminoType, MsgInstantiateContract2Response.typeUrl); function createBaseMsgExecuteContract(): MsgExecuteContract { return { sender: "", @@ -1760,10 +1759,11 @@ export const MsgExecuteContract = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecuteContract.typeUrl, MsgExecuteContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContract.aminoType, MsgExecuteContract.typeUrl); function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { return { data: new Uint8Array() @@ -1838,10 +1838,9 @@ export const MsgExecuteContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", value: MsgExecuteContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractResponse.typeUrl, MsgExecuteContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContractResponse.aminoType, MsgExecuteContractResponse.typeUrl); function createBaseMsgMigrateContract(): MsgMigrateContract { return { sender: "", @@ -1952,10 +1951,9 @@ export const MsgMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContract.typeUrl, MsgMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContract.aminoType, MsgMigrateContract.typeUrl); function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { return { data: new Uint8Array() @@ -2030,10 +2028,9 @@ export const MsgMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", value: MsgMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContractResponse.typeUrl, MsgMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContractResponse.aminoType, MsgMigrateContractResponse.typeUrl); function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { return { sender: "", @@ -2132,10 +2129,9 @@ export const MsgUpdateAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", value: MsgUpdateAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdmin.typeUrl, MsgUpdateAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdmin.aminoType, MsgUpdateAdmin.typeUrl); function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { return {}; } @@ -2197,10 +2193,9 @@ export const MsgUpdateAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", value: MsgUpdateAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdminResponse.typeUrl, MsgUpdateAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdminResponse.aminoType, MsgUpdateAdminResponse.typeUrl); function createBaseMsgClearAdmin(): MsgClearAdmin { return { sender: "", @@ -2287,10 +2282,9 @@ export const MsgClearAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdmin.typeUrl, MsgClearAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdmin.aminoType, MsgClearAdmin.typeUrl); function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { return {}; } @@ -2352,10 +2346,9 @@ export const MsgClearAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", value: MsgClearAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdminResponse.typeUrl, MsgClearAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdminResponse.aminoType, MsgClearAdminResponse.typeUrl); function createBaseMsgUpdateInstantiateConfig(): MsgUpdateInstantiateConfig { return { sender: "", @@ -2454,10 +2447,11 @@ export const MsgUpdateInstantiateConfig = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", value: MsgUpdateInstantiateConfig.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfig.typeUrl, MsgUpdateInstantiateConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfig.aminoType, MsgUpdateInstantiateConfig.typeUrl); function createBaseMsgUpdateInstantiateConfigResponse(): MsgUpdateInstantiateConfigResponse { return {}; } @@ -2519,10 +2513,9 @@ export const MsgUpdateInstantiateConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", value: MsgUpdateInstantiateConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfigResponse.typeUrl, MsgUpdateInstantiateConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfigResponse.aminoType, MsgUpdateInstantiateConfigResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2609,10 +2602,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2674,10 +2668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSudoContract(): MsgSudoContract { return { authority: "", @@ -2776,10 +2769,9 @@ export const MsgSudoContract = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", value: MsgSudoContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContract.typeUrl, MsgSudoContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContract.aminoType, MsgSudoContract.typeUrl); function createBaseMsgSudoContractResponse(): MsgSudoContractResponse { return { data: new Uint8Array() @@ -2854,10 +2846,9 @@ export const MsgSudoContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", value: MsgSudoContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContractResponse.typeUrl, MsgSudoContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContractResponse.aminoType, MsgSudoContractResponse.typeUrl); function createBaseMsgPinCodes(): MsgPinCodes { return { authority: "", @@ -2955,10 +2946,9 @@ export const MsgPinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", value: MsgPinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodes.typeUrl, MsgPinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodes.aminoType, MsgPinCodes.typeUrl); function createBaseMsgPinCodesResponse(): MsgPinCodesResponse { return {}; } @@ -3020,10 +3010,9 @@ export const MsgPinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", value: MsgPinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodesResponse.typeUrl, MsgPinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodesResponse.aminoType, MsgPinCodesResponse.typeUrl); function createBaseMsgUnpinCodes(): MsgUnpinCodes { return { authority: "", @@ -3121,10 +3110,9 @@ export const MsgUnpinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", value: MsgUnpinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodes.typeUrl, MsgUnpinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodes.aminoType, MsgUnpinCodes.typeUrl); function createBaseMsgUnpinCodesResponse(): MsgUnpinCodesResponse { return {}; } @@ -3186,10 +3174,9 @@ export const MsgUnpinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", value: MsgUnpinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodesResponse.typeUrl, MsgUnpinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodesResponse.aminoType, MsgUnpinCodesResponse.typeUrl); function createBaseMsgStoreAndInstantiateContract(): MsgStoreAndInstantiateContract { return { authority: "", @@ -3386,10 +3373,12 @@ export const MsgStoreAndInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", value: MsgStoreAndInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContract.typeUrl, MsgStoreAndInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContract.aminoType, MsgStoreAndInstantiateContract.typeUrl); function createBaseMsgStoreAndInstantiateContractResponse(): MsgStoreAndInstantiateContractResponse { return { address: "", @@ -3476,10 +3465,9 @@ export const MsgStoreAndInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", value: MsgStoreAndInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContractResponse.typeUrl, MsgStoreAndInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContractResponse.aminoType, MsgStoreAndInstantiateContractResponse.typeUrl); function createBaseMsgAddCodeUploadParamsAddresses(): MsgAddCodeUploadParamsAddresses { return { authority: "", @@ -3568,10 +3556,9 @@ export const MsgAddCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", value: MsgAddCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddresses.typeUrl, MsgAddCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddresses.aminoType, MsgAddCodeUploadParamsAddresses.typeUrl); function createBaseMsgAddCodeUploadParamsAddressesResponse(): MsgAddCodeUploadParamsAddressesResponse { return {}; } @@ -3633,10 +3620,9 @@ export const MsgAddCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", value: MsgAddCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddressesResponse.typeUrl, MsgAddCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddressesResponse.aminoType, MsgAddCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddresses(): MsgRemoveCodeUploadParamsAddresses { return { authority: "", @@ -3725,10 +3711,9 @@ export const MsgRemoveCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", value: MsgRemoveCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddresses.typeUrl, MsgRemoveCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddresses.aminoType, MsgRemoveCodeUploadParamsAddresses.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddressesResponse(): MsgRemoveCodeUploadParamsAddressesResponse { return {}; } @@ -3790,10 +3775,9 @@ export const MsgRemoveCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", value: MsgRemoveCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddressesResponse.typeUrl, MsgRemoveCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddressesResponse.aminoType, MsgRemoveCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgStoreAndMigrateContract(): MsgStoreAndMigrateContract { return { authority: "", @@ -3916,10 +3900,11 @@ export const MsgStoreAndMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", value: MsgStoreAndMigrateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContract.typeUrl, MsgStoreAndMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContract.aminoType, MsgStoreAndMigrateContract.typeUrl); function createBaseMsgStoreAndMigrateContractResponse(): MsgStoreAndMigrateContractResponse { return { codeId: BigInt(0), @@ -4018,10 +4003,9 @@ export const MsgStoreAndMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", value: MsgStoreAndMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContractResponse.typeUrl, MsgStoreAndMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContractResponse.aminoType, MsgStoreAndMigrateContractResponse.typeUrl); function createBaseMsgUpdateContractLabel(): MsgUpdateContractLabel { return { sender: "", @@ -4120,10 +4104,9 @@ export const MsgUpdateContractLabel = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", value: MsgUpdateContractLabel.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContractLabel.typeUrl, MsgUpdateContractLabel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabel.aminoType, MsgUpdateContractLabel.typeUrl); function createBaseMsgUpdateContractLabelResponse(): MsgUpdateContractLabelResponse { return {}; } @@ -4185,7 +4168,6 @@ export const MsgUpdateContractLabelResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", value: MsgUpdateContractLabelResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateContractLabelResponse.typeUrl, MsgUpdateContractLabelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabelResponse.aminoType, MsgUpdateContractLabelResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/cosmwasm/wasm/v1/types.ts b/libs/injective-react/src/cosmwasm/wasm/v1/types.ts index 3dccb816..16d3b488 100644 --- a/libs/injective-react/src/cosmwasm/wasm/v1/types.ts +++ b/libs/injective-react/src/cosmwasm/wasm/v1/types.ts @@ -386,10 +386,9 @@ export const AccessTypeParam = { typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", value: AccessTypeParam.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessTypeParam.typeUrl, AccessTypeParam); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessTypeParam.aminoType, AccessTypeParam.typeUrl); function createBaseAccessConfig(): AccessConfig { return { permission: 0, @@ -478,10 +477,9 @@ export const AccessConfig = { typeUrl: "/cosmwasm.wasm.v1.AccessConfig", value: AccessConfig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessConfig.typeUrl, AccessConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessConfig.aminoType, AccessConfig.typeUrl); function createBaseParams(): Params { return { codeUploadAccess: AccessConfig.fromPartial({}), @@ -568,10 +566,11 @@ export const Params = { typeUrl: "/cosmwasm.wasm.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseCodeInfo(): CodeInfo { return { codeHash: new Uint8Array(), @@ -670,10 +669,11 @@ export const CodeInfo = { typeUrl: "/cosmwasm.wasm.v1.CodeInfo", value: CodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfo.typeUrl, CodeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfo.aminoType, CodeInfo.typeUrl); function createBaseContractInfo(): ContractInfo { return { codeId: BigInt(0), @@ -820,10 +820,9 @@ export const ContractInfo = { typeUrl: "/cosmwasm.wasm.v1.ContractInfo", value: ContractInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ContractInfo.typeUrl, ContractInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractInfo.aminoType, ContractInfo.typeUrl); function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { return { operation: 0, @@ -934,10 +933,11 @@ export const ContractCodeHistoryEntry = { typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", value: ContractCodeHistoryEntry.encode(message).finish() }; + }, + registerTypeUrl() { + AbsoluteTxPosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContractCodeHistoryEntry.typeUrl, ContractCodeHistoryEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractCodeHistoryEntry.aminoType, ContractCodeHistoryEntry.typeUrl); function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { return { blockHeight: BigInt(0), @@ -1024,10 +1024,9 @@ export const AbsoluteTxPosition = { typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", value: AbsoluteTxPosition.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AbsoluteTxPosition.typeUrl, AbsoluteTxPosition); -GlobalDecoderRegistry.registerAminoProtoMapping(AbsoluteTxPosition.aminoType, AbsoluteTxPosition.typeUrl); function createBaseModel(): Model { return { key: new Uint8Array(), @@ -1114,7 +1113,6 @@ export const Model = { typeUrl: "/cosmwasm.wasm.v1.Model", value: Model.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Model.typeUrl, Model); -GlobalDecoderRegistry.registerAminoProtoMapping(Model.aminoType, Model.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/extern.ts b/libs/injective-react/src/extern.ts index c7325c58..7cbe4e00 100644 --- a/libs/injective-react/src/extern.ts +++ b/libs/injective-react/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/google/api/http.ts b/libs/injective-react/src/google/api/http.ts index 3fd3a11b..92221c2c 100644 --- a/libs/injective-react/src/google/api/http.ts +++ b/libs/injective-react/src/google/api/http.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * Defines the HTTP configuration for an API service. It contains a list of * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method @@ -802,9 +801,11 @@ export const Http = { typeUrl: "/google.api.Http", value: Http.encode(message).finish() }; + }, + registerTypeUrl() { + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Http.typeUrl, Http); function createBaseHttpRule(): HttpRule { return { selector: "", @@ -982,9 +983,12 @@ export const HttpRule = { typeUrl: "/google.api.HttpRule", value: HttpRule.encode(message).finish() }; + }, + registerTypeUrl() { + CustomHttpPattern.registerTypeUrl(); + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HttpRule.typeUrl, HttpRule); function createBaseCustomHttpPattern(): CustomHttpPattern { return { kind: "", @@ -1064,6 +1068,6 @@ export const CustomHttpPattern = { typeUrl: "/google.api.CustomHttpPattern", value: CustomHttpPattern.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CustomHttpPattern.typeUrl, CustomHttpPattern); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/google/protobuf/any.ts b/libs/injective-react/src/google/protobuf/any.ts index bbae1be1..ee7f0ff9 100644 --- a/libs/injective-react/src/google/protobuf/any.ts +++ b/libs/injective-react/src/google/protobuf/any.ts @@ -327,5 +327,6 @@ export const Any = { typeUrl: "/google.protobuf.Any", value: Any.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; \ No newline at end of file diff --git a/libs/injective-react/src/google/protobuf/descriptor.ts b/libs/injective-react/src/google/protobuf/descriptor.ts index 53b60923..486eb527 100644 --- a/libs/injective-react/src/google/protobuf/descriptor.ts +++ b/libs/injective-react/src/google/protobuf/descriptor.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** The full set of known editions. */ export enum Edition { /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ @@ -3156,9 +3155,11 @@ export const FileDescriptorSet = { typeUrl: "/google.protobuf.FileDescriptorSet", value: FileDescriptorSet.encode(message).finish() }; + }, + registerTypeUrl() { + FileDescriptorProto.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorSet.typeUrl, FileDescriptorSet); function createBaseFileDescriptorProto(): FileDescriptorProto { return { name: "", @@ -3402,9 +3403,16 @@ export const FileDescriptorProto = { typeUrl: "/google.protobuf.FileDescriptorProto", value: FileDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + ServiceDescriptorProto.registerTypeUrl(); + FieldDescriptorProto.registerTypeUrl(); + FileOptions.registerTypeUrl(); + SourceCodeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorProto.typeUrl, FileDescriptorProto); function createBaseDescriptorProto(): DescriptorProto { return { name: "", @@ -3596,9 +3604,17 @@ export const DescriptorProto = { typeUrl: "/google.protobuf.DescriptorProto", value: DescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldDescriptorProto.registerTypeUrl(); + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + DescriptorProto_ExtensionRange.registerTypeUrl(); + OneofDescriptorProto.registerTypeUrl(); + MessageOptions.registerTypeUrl(); + DescriptorProto_ReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto.typeUrl, DescriptorProto); function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { return { start: 0, @@ -3690,9 +3706,11 @@ export const DescriptorProto_ExtensionRange = { typeUrl: "/google.protobuf.ExtensionRange", value: DescriptorProto_ExtensionRange.encode(message).finish() }; + }, + registerTypeUrl() { + ExtensionRangeOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto_ExtensionRange.typeUrl, DescriptorProto_ExtensionRange); function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { return { start: 0, @@ -3772,9 +3790,9 @@ export const DescriptorProto_ReservedRange = { typeUrl: "/google.protobuf.ReservedRange", value: DescriptorProto_ReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DescriptorProto_ReservedRange.typeUrl, DescriptorProto_ReservedRange); function createBaseExtensionRangeOptions(): ExtensionRangeOptions { return { uninterpretedOption: [], @@ -3882,9 +3900,13 @@ export const ExtensionRangeOptions = { typeUrl: "/google.protobuf.ExtensionRangeOptions", value: ExtensionRangeOptions.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption.registerTypeUrl(); + ExtensionRangeOptions_Declaration.registerTypeUrl(); + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtensionRangeOptions.typeUrl, ExtensionRangeOptions); function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration { return { number: 0, @@ -4000,9 +4022,9 @@ export const ExtensionRangeOptions_Declaration = { typeUrl: "/google.protobuf.Declaration", value: ExtensionRangeOptions_Declaration.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtensionRangeOptions_Declaration.typeUrl, ExtensionRangeOptions_Declaration); function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { name: "", @@ -4190,9 +4212,11 @@ export const FieldDescriptorProto = { typeUrl: "/google.protobuf.FieldDescriptorProto", value: FieldDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldDescriptorProto.typeUrl, FieldDescriptorProto); function createBaseOneofDescriptorProto(): OneofDescriptorProto { return { name: "", @@ -4272,9 +4296,11 @@ export const OneofDescriptorProto = { typeUrl: "/google.protobuf.OneofDescriptorProto", value: OneofDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + OneofOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofDescriptorProto.typeUrl, OneofDescriptorProto); function createBaseEnumDescriptorProto(): EnumDescriptorProto { return { name: "", @@ -4396,9 +4422,13 @@ export const EnumDescriptorProto = { typeUrl: "/google.protobuf.EnumDescriptorProto", value: EnumDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueDescriptorProto.registerTypeUrl(); + EnumOptions.registerTypeUrl(); + EnumDescriptorProto_EnumReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumDescriptorProto.typeUrl, EnumDescriptorProto); function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { return { start: 0, @@ -4478,9 +4508,9 @@ export const EnumDescriptorProto_EnumReservedRange = { typeUrl: "/google.protobuf.EnumReservedRange", value: EnumDescriptorProto_EnumReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EnumDescriptorProto_EnumReservedRange.typeUrl, EnumDescriptorProto_EnumReservedRange); function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { return { name: "", @@ -4572,9 +4602,11 @@ export const EnumValueDescriptorProto = { typeUrl: "/google.protobuf.EnumValueDescriptorProto", value: EnumValueDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueDescriptorProto.typeUrl, EnumValueDescriptorProto); function createBaseServiceDescriptorProto(): ServiceDescriptorProto { return { name: "", @@ -4668,9 +4700,12 @@ export const ServiceDescriptorProto = { typeUrl: "/google.protobuf.ServiceDescriptorProto", value: ServiceDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodDescriptorProto.registerTypeUrl(); + ServiceOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceDescriptorProto.typeUrl, ServiceDescriptorProto); function createBaseMethodDescriptorProto(): MethodDescriptorProto { return { name: "", @@ -4798,9 +4833,11 @@ export const MethodDescriptorProto = { typeUrl: "/google.protobuf.MethodDescriptorProto", value: MethodDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodDescriptorProto.typeUrl, MethodDescriptorProto); function createBaseFileOptions(): FileOptions { return { javaPackage: "", @@ -5110,9 +5147,12 @@ export const FileOptions = { typeUrl: "/google.protobuf.FileOptions", value: FileOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileOptions.typeUrl, FileOptions); function createBaseMessageOptions(): MessageOptions { return { messageSetWireFormat: false, @@ -5254,9 +5294,12 @@ export const MessageOptions = { typeUrl: "/google.protobuf.MessageOptions", value: MessageOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MessageOptions.typeUrl, MessageOptions); function createBaseFieldOptions(): FieldOptions { return { ctype: 1, @@ -5495,9 +5538,14 @@ export const FieldOptions = { typeUrl: "/google.protobuf.FieldOptions", value: FieldOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions_EditionDefault.registerTypeUrl(); + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldOptions.typeUrl, FieldOptions); function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault { return { edition: 1, @@ -5577,9 +5625,9 @@ export const FieldOptions_EditionDefault = { typeUrl: "/google.protobuf.EditionDefault", value: FieldOptions_EditionDefault.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_EditionDefault.typeUrl, FieldOptions_EditionDefault); function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport { return { editionIntroduced: 1, @@ -5683,9 +5731,9 @@ export const FieldOptions_FeatureSupport = { typeUrl: "/google.protobuf.FeatureSupport", value: FieldOptions_FeatureSupport.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_FeatureSupport.typeUrl, FieldOptions_FeatureSupport); function createBaseOneofOptions(): OneofOptions { return { features: undefined, @@ -5767,9 +5815,12 @@ export const OneofOptions = { typeUrl: "/google.protobuf.OneofOptions", value: OneofOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofOptions.typeUrl, OneofOptions); function createBaseEnumOptions(): EnumOptions { return { allowAlias: false, @@ -5887,9 +5938,12 @@ export const EnumOptions = { typeUrl: "/google.protobuf.EnumOptions", value: EnumOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumOptions.typeUrl, EnumOptions); function createBaseEnumValueOptions(): EnumValueOptions { return { deprecated: false, @@ -6007,9 +6061,13 @@ export const EnumValueOptions = { typeUrl: "/google.protobuf.EnumValueOptions", value: EnumValueOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueOptions.typeUrl, EnumValueOptions); function createBaseServiceOptions(): ServiceOptions { return { features: undefined, @@ -6103,9 +6161,12 @@ export const ServiceOptions = { typeUrl: "/google.protobuf.ServiceOptions", value: ServiceOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceOptions.typeUrl, ServiceOptions); function createBaseMethodOptions(): MethodOptions { return { deprecated: false, @@ -6211,9 +6272,12 @@ export const MethodOptions = { typeUrl: "/google.protobuf.MethodOptions", value: MethodOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodOptions.typeUrl, MethodOptions); function createBaseUninterpretedOption(): UninterpretedOption { return { name: [], @@ -6355,9 +6419,11 @@ export const UninterpretedOption = { typeUrl: "/google.protobuf.UninterpretedOption", value: UninterpretedOption.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption_NamePart.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UninterpretedOption.typeUrl, UninterpretedOption); function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { return { namePart: "", @@ -6437,9 +6503,9 @@ export const UninterpretedOption_NamePart = { typeUrl: "/google.protobuf.NamePart", value: UninterpretedOption_NamePart.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UninterpretedOption_NamePart.typeUrl, UninterpretedOption_NamePart); function createBaseFeatureSet(): FeatureSet { return { fieldPresence: 1, @@ -6567,9 +6633,9 @@ export const FeatureSet = { typeUrl: "/google.protobuf.FeatureSet", value: FeatureSet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeatureSet.typeUrl, FeatureSet); function createBaseFeatureSetDefaults(): FeatureSetDefaults { return { defaults: [], @@ -6663,9 +6729,11 @@ export const FeatureSetDefaults = { typeUrl: "/google.protobuf.FeatureSetDefaults", value: FeatureSetDefaults.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSetDefaults_FeatureSetEditionDefault.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults.typeUrl, FeatureSetDefaults); function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault { return { edition: 1, @@ -6757,9 +6825,11 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = { typeUrl: "/google.protobuf.FeatureSetEditionDefault", value: FeatureSetDefaults_FeatureSetEditionDefault.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults_FeatureSetEditionDefault.typeUrl, FeatureSetDefaults_FeatureSetEditionDefault); function createBaseSourceCodeInfo(): SourceCodeInfo { return { location: [] @@ -6829,9 +6899,11 @@ export const SourceCodeInfo = { typeUrl: "/google.protobuf.SourceCodeInfo", value: SourceCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SourceCodeInfo_Location.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SourceCodeInfo.typeUrl, SourceCodeInfo); function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { return { path: [], @@ -6971,9 +7043,9 @@ export const SourceCodeInfo_Location = { typeUrl: "/google.protobuf.Location", value: SourceCodeInfo_Location.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SourceCodeInfo_Location.typeUrl, SourceCodeInfo_Location); function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { return { annotation: [] @@ -7043,9 +7115,11 @@ export const GeneratedCodeInfo = { typeUrl: "/google.protobuf.GeneratedCodeInfo", value: GeneratedCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + GeneratedCodeInfo_Annotation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GeneratedCodeInfo.typeUrl, GeneratedCodeInfo); function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { return { path: [], @@ -7172,6 +7246,6 @@ export const GeneratedCodeInfo_Annotation = { typeUrl: "/google.protobuf.Annotation", value: GeneratedCodeInfo_Annotation.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GeneratedCodeInfo_Annotation.typeUrl, GeneratedCodeInfo_Annotation); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/google/protobuf/duration.ts b/libs/injective-react/src/google/protobuf/duration.ts index 6e3e301a..d7d60874 100644 --- a/libs/injective-react/src/google/protobuf/duration.ts +++ b/libs/injective-react/src/google/protobuf/duration.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Duration represents a signed, fixed-length span of time represented * as a count of seconds and fractions of seconds at nanosecond @@ -220,6 +219,6 @@ export const Duration = { typeUrl: "/google.protobuf.Duration", value: Duration.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Duration.typeUrl, Duration); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/google/protobuf/timestamp.ts b/libs/injective-react/src/google/protobuf/timestamp.ts index d4d255b3..9e9baefe 100644 --- a/libs/injective-react/src/google/protobuf/timestamp.ts +++ b/libs/injective-react/src/google/protobuf/timestamp.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Timestamp represents a point in time independent of any time zone or local * calendar, encoded as a count of seconds and fractions of seconds at @@ -276,6 +275,6 @@ export const Timestamp = { typeUrl: "/google.protobuf.Timestamp", value: Timestamp.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Timestamp.typeUrl, Timestamp); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/helper-func-types.ts b/libs/injective-react/src/helper-func-types.ts index 7c3f8421..a78ed1bc 100644 --- a/libs/injective-react/src/helper-func-types.ts +++ b/libs/injective-react/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -9,13 +9,16 @@ import { HttpEndpoint } from "@interchainjs/types"; import { BinaryReader, BinaryWriter } from "./binary"; import { getRpcClient } from "./extern"; import { isRpc, Rpc } from "./helpers"; +import { TelescopeGeneratedCodec } from "./types"; +import { GlobalDecoderRegistry } from "./registry"; export interface QueryBuilderOptions { encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter decode: (input: BinaryReader | Uint8Array, length?: number) => TRes service: string, method: string, - clientResolver?: RpcResolver + clientResolver?: RpcResolver, + deps?: TelescopeGeneratedCodec[], } export function buildQuery(opts: QueryBuilderOptions) { @@ -30,6 +33,8 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); + registerDependencies(opts.deps ?? []); + const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -73,6 +78,7 @@ export interface TxBuilderOptions { typeUrl: string, encoders?: Encoder[], converters?: AminoConverter[], + deps?: TelescopeGeneratedCodec[], } export function buildTx(opts: TxBuilderOptions) { @@ -94,6 +100,7 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); + registerDependencies(opts.deps ?? []); const data = [ { @@ -189,3 +196,9 @@ export interface AminoConverter { export type SigningClientResolver = string | HttpEndpoint | ISigningClient; export type RpcResolver = string | HttpEndpoint | Rpc ; + +function registerDependencies(deps: TelescopeGeneratedCodec[]) { + for (const dep of deps) { + dep.registerTypeUrl?.(); + } +} diff --git a/libs/injective-react/src/helpers.ts b/libs/injective-react/src/helpers.ts index 1f19575b..ab170adb 100644 --- a/libs/injective-react/src/helpers.ts +++ b/libs/injective-react/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/ibc/applications/transfer/v1/transfer.ts b/libs/injective-react/src/ibc/applications/transfer/v1/transfer.ts index 12d6526c..8c1ecaaf 100644 --- a/libs/injective-react/src/ibc/applications/transfer/v1/transfer.ts +++ b/libs/injective-react/src/ibc/applications/transfer/v1/transfer.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Params defines the set of IBC transfer parameters. * NOTE: To prevent a single token from being transferred, set the @@ -185,10 +184,9 @@ export const Params = { typeUrl: "/ibc.applications.transfer.v1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseForwarding(): Forwarding { return { unwind: false, @@ -277,10 +275,11 @@ export const Forwarding = { typeUrl: "/ibc.applications.transfer.v1.Forwarding", value: Forwarding.encode(message).finish() }; + }, + registerTypeUrl() { + Hop.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Forwarding.typeUrl, Forwarding); -GlobalDecoderRegistry.registerAminoProtoMapping(Forwarding.aminoType, Forwarding.typeUrl); function createBaseHop(): Hop { return { portId: "", @@ -367,7 +366,6 @@ export const Hop = { typeUrl: "/ibc.applications.transfer.v1.Hop", value: Hop.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Hop.typeUrl, Hop); -GlobalDecoderRegistry.registerAminoProtoMapping(Hop.aminoType, Hop.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts b/libs/injective-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts index 2e888d2c..cab032ea 100644 --- a/libs/injective-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgTransfer, MsgUpdateParams } from "./tx"; export const createTransfer = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTransfer.typeUrl, encoders: toEncoders(MsgTransfer), - converters: toConverters(MsgTransfer) + converters: toConverters(MsgTransfer), + deps: [MsgTransfer] }); export const useTransfer = buildUseMutation({ builderMutationFn: createTransfer @@ -15,7 +16,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/injective-react/src/ibc/applications/transfer/v1/tx.ts b/libs/injective-react/src/ibc/applications/transfer/v1/tx.ts index f4fb581c..4a5d9355 100644 --- a/libs/injective-react/src/ibc/applications/transfer/v1/tx.ts +++ b/libs/injective-react/src/ibc/applications/transfer/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v import { Forwarding, ForwardingAmino } from "./transfer"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between * ICS20 enabled chains. See ICS Spec here: @@ -330,10 +329,13 @@ export const MsgTransfer = { typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + Height.registerTypeUrl(); + Forwarding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTransfer.typeUrl, MsgTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransfer.aminoType, MsgTransfer.typeUrl); function createBaseMsgTransferResponse(): MsgTransferResponse { return { sequence: BigInt(0) @@ -408,10 +410,9 @@ export const MsgTransferResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", value: MsgTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferResponse.typeUrl, MsgTransferResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransferResponse.aminoType, MsgTransferResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -498,10 +499,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -563,7 +565,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/channel/v1/channel.ts b/libs/injective-react/src/ibc/core/channel/v1/channel.ts index 6965c083..aa87842c 100644 --- a/libs/injective-react/src/ibc/core/channel/v1/channel.ts +++ b/libs/injective-react/src/ibc/core/channel/v1/channel.ts @@ -1,7 +1,6 @@ import { Height, HeightAmino } from "../../client/v1/client"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a channel is in one of the following states: * CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED. @@ -614,10 +613,11 @@ export const Channel = { typeUrl: "/ibc.core.channel.v1.Channel", value: Channel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Channel.typeUrl, Channel); -GlobalDecoderRegistry.registerAminoProtoMapping(Channel.aminoType, Channel.typeUrl); function createBaseIdentifiedChannel(): IdentifiedChannel { return { state: 0, @@ -778,10 +778,11 @@ export const IdentifiedChannel = { typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", value: IdentifiedChannel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedChannel.typeUrl, IdentifiedChannel); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedChannel.aminoType, IdentifiedChannel.typeUrl); function createBaseCounterparty(): Counterparty { return { portId: "", @@ -868,10 +869,9 @@ export const Counterparty = { typeUrl: "/ibc.core.channel.v1.Counterparty", value: Counterparty.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBasePacket(): Packet { return { sequence: BigInt(0), @@ -1030,10 +1030,11 @@ export const Packet = { typeUrl: "/ibc.core.channel.v1.Packet", value: Packet.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Packet.typeUrl, Packet); -GlobalDecoderRegistry.registerAminoProtoMapping(Packet.aminoType, Packet.typeUrl); function createBasePacketState(): PacketState { return { portId: "", @@ -1144,10 +1145,9 @@ export const PacketState = { typeUrl: "/ibc.core.channel.v1.PacketState", value: PacketState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketState.typeUrl, PacketState); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketState.aminoType, PacketState.typeUrl); function createBasePacketId(): PacketId { return { portId: "", @@ -1246,10 +1246,9 @@ export const PacketId = { typeUrl: "/ibc.core.channel.v1.PacketId", value: PacketId.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketId.typeUrl, PacketId); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketId.aminoType, PacketId.typeUrl); function createBaseAcknowledgement(): Acknowledgement { return { result: undefined, @@ -1336,10 +1335,9 @@ export const Acknowledgement = { typeUrl: "/ibc.core.channel.v1.Acknowledgement", value: Acknowledgement.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Acknowledgement.typeUrl, Acknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(Acknowledgement.aminoType, Acknowledgement.typeUrl); function createBaseTimeout(): Timeout { return { height: Height.fromPartial({}), @@ -1426,10 +1424,11 @@ export const Timeout = { typeUrl: "/ibc.core.channel.v1.Timeout", value: Timeout.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Timeout.typeUrl, Timeout); -GlobalDecoderRegistry.registerAminoProtoMapping(Timeout.aminoType, Timeout.typeUrl); function createBaseParams(): Params { return { upgradeTimeout: Timeout.fromPartial({}) @@ -1504,7 +1503,8 @@ export const Params = { typeUrl: "/ibc.core.channel.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Timeout.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/channel/v1/tx.rpc.func.ts b/libs/injective-react/src/ibc/core/channel/v1/tx.rpc.func.ts index a7fc06c2..a47e53ee 100644 --- a/libs/injective-react/src/ibc/core/channel/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/ibc/core/channel/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement, MsgChannelUpgradeInit, MsgChannelUpgradeTry, MsgChannelUpgradeAck, MsgChannelUpgradeConfirm, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeCancel, MsgUpdateParams, MsgPruneAcknowledgements } from "./tx"; export const createChannelOpenInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenInit.typeUrl, encoders: toEncoders(MsgChannelOpenInit), - converters: toConverters(MsgChannelOpenInit) + converters: toConverters(MsgChannelOpenInit), + deps: [MsgChannelOpenInit] }); export const useChannelOpenInit = buildUseMutation({ builderMutationFn: createChannelOpenInit @@ -15,7 +16,8 @@ export const createChannelOpenTry = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgChannelOpenTry.typeUrl, encoders: toEncoders(MsgChannelOpenTry), - converters: toConverters(MsgChannelOpenTry) + converters: toConverters(MsgChannelOpenTry), + deps: [MsgChannelOpenTry] }); export const useChannelOpenTry = buildUseMutation({ builderMutationFn: createChannelOpenTry @@ -24,7 +26,8 @@ export const createChannelOpenAck = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgChannelOpenAck.typeUrl, encoders: toEncoders(MsgChannelOpenAck), - converters: toConverters(MsgChannelOpenAck) + converters: toConverters(MsgChannelOpenAck), + deps: [MsgChannelOpenAck] }); export const useChannelOpenAck = buildUseMutation({ builderMutationFn: createChannelOpenAck @@ -33,7 +36,8 @@ export const createChannelOpenConfirm = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelOpenConfirm.typeUrl, encoders: toEncoders(MsgChannelOpenConfirm), - converters: toConverters(MsgChannelOpenConfirm) + converters: toConverters(MsgChannelOpenConfirm), + deps: [MsgChannelOpenConfirm] }); export const useChannelOpenConfirm = buildUseMutation({ builderMutationFn: createChannelOpenConfirm @@ -42,7 +46,8 @@ export const createChannelCloseInit = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgChannelCloseInit.typeUrl, encoders: toEncoders(MsgChannelCloseInit), - converters: toConverters(MsgChannelCloseInit) + converters: toConverters(MsgChannelCloseInit), + deps: [MsgChannelCloseInit] }); export const useChannelCloseInit = buildUseMutation({ builderMutationFn: createChannelCloseInit @@ -51,7 +56,8 @@ export const createChannelCloseConfirm = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgChannelCloseConfirm.typeUrl, encoders: toEncoders(MsgChannelCloseConfirm), - converters: toConverters(MsgChannelCloseConfirm) + converters: toConverters(MsgChannelCloseConfirm), + deps: [MsgChannelCloseConfirm] }); export const useChannelCloseConfirm = buildUseMutation({ builderMutationFn: createChannelCloseConfirm @@ -60,7 +66,8 @@ export const createRecvPacket = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgRecvPacket.typeUrl, encoders: toEncoders(MsgRecvPacket), - converters: toConverters(MsgRecvPacket) + converters: toConverters(MsgRecvPacket), + deps: [MsgRecvPacket] }); export const useRecvPacket = buildUseMutation({ builderMutationFn: createRecvPacket @@ -69,7 +76,8 @@ export const createTimeout = (clientResolver?: SigningClientResolver) => buildTx clientResolver, typeUrl: MsgTimeout.typeUrl, encoders: toEncoders(MsgTimeout), - converters: toConverters(MsgTimeout) + converters: toConverters(MsgTimeout), + deps: [MsgTimeout] }); export const useTimeout = buildUseMutation({ builderMutationFn: createTimeout @@ -78,7 +86,8 @@ export const createTimeoutOnClose = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgTimeoutOnClose.typeUrl, encoders: toEncoders(MsgTimeoutOnClose), - converters: toConverters(MsgTimeoutOnClose) + converters: toConverters(MsgTimeoutOnClose), + deps: [MsgTimeoutOnClose] }); export const useTimeoutOnClose = buildUseMutation({ builderMutationFn: createTimeoutOnClose @@ -87,7 +96,8 @@ export const createAcknowledgement = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgAcknowledgement.typeUrl, encoders: toEncoders(MsgAcknowledgement), - converters: toConverters(MsgAcknowledgement) + converters: toConverters(MsgAcknowledgement), + deps: [MsgAcknowledgement] }); export const useAcknowledgement = buildUseMutation({ builderMutationFn: createAcknowledgement @@ -96,7 +106,8 @@ export const createChannelUpgradeInit = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeInit.typeUrl, encoders: toEncoders(MsgChannelUpgradeInit), - converters: toConverters(MsgChannelUpgradeInit) + converters: toConverters(MsgChannelUpgradeInit), + deps: [MsgChannelUpgradeInit] }); export const useChannelUpgradeInit = buildUseMutation({ builderMutationFn: createChannelUpgradeInit @@ -105,7 +116,8 @@ export const createChannelUpgradeTry = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeTry.typeUrl, encoders: toEncoders(MsgChannelUpgradeTry), - converters: toConverters(MsgChannelUpgradeTry) + converters: toConverters(MsgChannelUpgradeTry), + deps: [MsgChannelUpgradeTry] }); export const useChannelUpgradeTry = buildUseMutation({ builderMutationFn: createChannelUpgradeTry @@ -114,7 +126,8 @@ export const createChannelUpgradeAck = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeAck.typeUrl, encoders: toEncoders(MsgChannelUpgradeAck), - converters: toConverters(MsgChannelUpgradeAck) + converters: toConverters(MsgChannelUpgradeAck), + deps: [MsgChannelUpgradeAck] }); export const useChannelUpgradeAck = buildUseMutation({ builderMutationFn: createChannelUpgradeAck @@ -123,7 +136,8 @@ export const createChannelUpgradeConfirm = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgChannelUpgradeConfirm.typeUrl, encoders: toEncoders(MsgChannelUpgradeConfirm), - converters: toConverters(MsgChannelUpgradeConfirm) + converters: toConverters(MsgChannelUpgradeConfirm), + deps: [MsgChannelUpgradeConfirm] }); export const useChannelUpgradeConfirm = buildUseMutation({ builderMutationFn: createChannelUpgradeConfirm @@ -132,7 +146,8 @@ export const createChannelUpgradeOpen = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeOpen.typeUrl, encoders: toEncoders(MsgChannelUpgradeOpen), - converters: toConverters(MsgChannelUpgradeOpen) + converters: toConverters(MsgChannelUpgradeOpen), + deps: [MsgChannelUpgradeOpen] }); export const useChannelUpgradeOpen = buildUseMutation({ builderMutationFn: createChannelUpgradeOpen @@ -141,7 +156,8 @@ export const createChannelUpgradeTimeout = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgChannelUpgradeTimeout.typeUrl, encoders: toEncoders(MsgChannelUpgradeTimeout), - converters: toConverters(MsgChannelUpgradeTimeout) + converters: toConverters(MsgChannelUpgradeTimeout), + deps: [MsgChannelUpgradeTimeout] }); export const useChannelUpgradeTimeout = buildUseMutation({ builderMutationFn: createChannelUpgradeTimeout @@ -150,7 +166,8 @@ export const createChannelUpgradeCancel = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgChannelUpgradeCancel.typeUrl, encoders: toEncoders(MsgChannelUpgradeCancel), - converters: toConverters(MsgChannelUpgradeCancel) + converters: toConverters(MsgChannelUpgradeCancel), + deps: [MsgChannelUpgradeCancel] }); export const useChannelUpgradeCancel = buildUseMutation({ builderMutationFn: createChannelUpgradeCancel @@ -159,7 +176,8 @@ export const createUpdateChannelParams = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateChannelParams = buildUseMutation({ builderMutationFn: createUpdateChannelParams @@ -168,7 +186,8 @@ export const createPruneAcknowledgements = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgPruneAcknowledgements.typeUrl, encoders: toEncoders(MsgPruneAcknowledgements), - converters: toConverters(MsgPruneAcknowledgements) + converters: toConverters(MsgPruneAcknowledgements), + deps: [MsgPruneAcknowledgements] }); export const usePruneAcknowledgements = buildUseMutation({ builderMutationFn: createPruneAcknowledgements diff --git a/libs/injective-react/src/ibc/core/channel/v1/tx.ts b/libs/injective-react/src/ibc/core/channel/v1/tx.ts index b7023355..b0ecaf62 100644 --- a/libs/injective-react/src/ibc/core/channel/v1/tx.ts +++ b/libs/injective-react/src/ibc/core/channel/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client import { UpgradeFields, UpgradeFieldsAmino, Upgrade, UpgradeAmino, ErrorReceipt, ErrorReceiptAmino } from "./upgrade"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** ResponseResultType defines the possible outcomes of the execution of a message */ export enum ResponseResultType { /** RESPONSE_RESULT_TYPE_UNSPECIFIED - Default zero value enumeration */ @@ -996,10 +995,11 @@ export const MsgChannelOpenInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", value: MsgChannelOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenInit.typeUrl, MsgChannelOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInit.aminoType, MsgChannelOpenInit.typeUrl); function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { return { channelId: "", @@ -1086,10 +1086,9 @@ export const MsgChannelOpenInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", value: MsgChannelOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenInitResponse.typeUrl, MsgChannelOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInitResponse.aminoType, MsgChannelOpenInitResponse.typeUrl); function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { return { portId: "", @@ -1236,10 +1235,12 @@ export const MsgChannelOpenTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", value: MsgChannelOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenTry.typeUrl, MsgChannelOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTry.aminoType, MsgChannelOpenTry.typeUrl); function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { return { version: "", @@ -1326,10 +1327,9 @@ export const MsgChannelOpenTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", value: MsgChannelOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenTryResponse.typeUrl, MsgChannelOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTryResponse.aminoType, MsgChannelOpenTryResponse.typeUrl); function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { return { portId: "", @@ -1476,10 +1476,11 @@ export const MsgChannelOpenAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", value: MsgChannelOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenAck.typeUrl, MsgChannelOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAck.aminoType, MsgChannelOpenAck.typeUrl); function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { return {}; } @@ -1541,10 +1542,9 @@ export const MsgChannelOpenAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", value: MsgChannelOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenAckResponse.typeUrl, MsgChannelOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAckResponse.aminoType, MsgChannelOpenAckResponse.typeUrl); function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { return { portId: "", @@ -1667,10 +1667,11 @@ export const MsgChannelOpenConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", value: MsgChannelOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirm.typeUrl, MsgChannelOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirm.aminoType, MsgChannelOpenConfirm.typeUrl); function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse { return {}; } @@ -1732,10 +1733,9 @@ export const MsgChannelOpenConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", value: MsgChannelOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirmResponse.typeUrl, MsgChannelOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirmResponse.aminoType, MsgChannelOpenConfirmResponse.typeUrl); function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { return { portId: "", @@ -1834,10 +1834,9 @@ export const MsgChannelCloseInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", value: MsgChannelCloseInit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInit.typeUrl, MsgChannelCloseInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInit.aminoType, MsgChannelCloseInit.typeUrl); function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { return {}; } @@ -1899,10 +1898,9 @@ export const MsgChannelCloseInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", value: MsgChannelCloseInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInitResponse.typeUrl, MsgChannelCloseInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInitResponse.aminoType, MsgChannelCloseInitResponse.typeUrl); function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { return { portId: "", @@ -2037,10 +2035,11 @@ export const MsgChannelCloseConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", value: MsgChannelCloseConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirm.typeUrl, MsgChannelCloseConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirm.aminoType, MsgChannelCloseConfirm.typeUrl); function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse { return {}; } @@ -2102,10 +2101,9 @@ export const MsgChannelCloseConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", value: MsgChannelCloseConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirmResponse.typeUrl, MsgChannelCloseConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirmResponse.aminoType, MsgChannelCloseConfirmResponse.typeUrl); function createBaseMsgRecvPacket(): MsgRecvPacket { return { packet: Packet.fromPartial({}), @@ -2216,10 +2214,12 @@ export const MsgRecvPacket = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", value: MsgRecvPacket.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRecvPacket.typeUrl, MsgRecvPacket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacket.aminoType, MsgRecvPacket.typeUrl); function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { return { result: 0 @@ -2294,10 +2294,9 @@ export const MsgRecvPacketResponse = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", value: MsgRecvPacketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecvPacketResponse.typeUrl, MsgRecvPacketResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacketResponse.aminoType, MsgRecvPacketResponse.typeUrl); function createBaseMsgTimeout(): MsgTimeout { return { packet: Packet.fromPartial({}), @@ -2420,10 +2419,12 @@ export const MsgTimeout = { typeUrl: "/ibc.core.channel.v1.MsgTimeout", value: MsgTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeout.typeUrl, MsgTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeout.aminoType, MsgTimeout.typeUrl); function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { return { result: 0 @@ -2498,10 +2499,9 @@ export const MsgTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", value: MsgTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutResponse.typeUrl, MsgTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutResponse.aminoType, MsgTimeoutResponse.typeUrl); function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { return { packet: Packet.fromPartial({}), @@ -2648,10 +2648,12 @@ export const MsgTimeoutOnClose = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", value: MsgTimeoutOnClose.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeoutOnClose.typeUrl, MsgTimeoutOnClose); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnClose.aminoType, MsgTimeoutOnClose.typeUrl); function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { return { result: 0 @@ -2726,10 +2728,9 @@ export const MsgTimeoutOnCloseResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", value: MsgTimeoutOnCloseResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutOnCloseResponse.typeUrl, MsgTimeoutOnCloseResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnCloseResponse.aminoType, MsgTimeoutOnCloseResponse.typeUrl); function createBaseMsgAcknowledgement(): MsgAcknowledgement { return { packet: Packet.fromPartial({}), @@ -2852,10 +2853,12 @@ export const MsgAcknowledgement = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", value: MsgAcknowledgement.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgAcknowledgement.typeUrl, MsgAcknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgement.aminoType, MsgAcknowledgement.typeUrl); function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { return { result: 0 @@ -2930,10 +2933,9 @@ export const MsgAcknowledgementResponse = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", value: MsgAcknowledgementResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcknowledgementResponse.typeUrl, MsgAcknowledgementResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgementResponse.aminoType, MsgAcknowledgementResponse.typeUrl); function createBaseMsgChannelUpgradeInit(): MsgChannelUpgradeInit { return { portId: "", @@ -3044,10 +3046,11 @@ export const MsgChannelUpgradeInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInit", value: MsgChannelUpgradeInit.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInit.typeUrl, MsgChannelUpgradeInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInit.aminoType, MsgChannelUpgradeInit.typeUrl); function createBaseMsgChannelUpgradeInitResponse(): MsgChannelUpgradeInitResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3134,10 +3137,11 @@ export const MsgChannelUpgradeInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse", value: MsgChannelUpgradeInitResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInitResponse.typeUrl, MsgChannelUpgradeInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInitResponse.aminoType, MsgChannelUpgradeInitResponse.typeUrl); function createBaseMsgChannelUpgradeTry(): MsgChannelUpgradeTry { return { portId: "", @@ -3310,10 +3314,12 @@ export const MsgChannelUpgradeTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTry", value: MsgChannelUpgradeTry.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTry.typeUrl, MsgChannelUpgradeTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTry.aminoType, MsgChannelUpgradeTry.typeUrl); function createBaseMsgChannelUpgradeTryResponse(): MsgChannelUpgradeTryResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3412,10 +3418,11 @@ export const MsgChannelUpgradeTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse", value: MsgChannelUpgradeTryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTryResponse.typeUrl, MsgChannelUpgradeTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTryResponse.aminoType, MsgChannelUpgradeTryResponse.typeUrl); function createBaseMsgChannelUpgradeAck(): MsgChannelUpgradeAck { return { portId: "", @@ -3562,10 +3569,12 @@ export const MsgChannelUpgradeAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAck", value: MsgChannelUpgradeAck.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAck.typeUrl, MsgChannelUpgradeAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAck.aminoType, MsgChannelUpgradeAck.typeUrl); function createBaseMsgChannelUpgradeAckResponse(): MsgChannelUpgradeAckResponse { return { result: 0 @@ -3640,10 +3649,9 @@ export const MsgChannelUpgradeAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse", value: MsgChannelUpgradeAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAckResponse.typeUrl, MsgChannelUpgradeAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAckResponse.aminoType, MsgChannelUpgradeAckResponse.typeUrl); function createBaseMsgChannelUpgradeConfirm(): MsgChannelUpgradeConfirm { return { portId: "", @@ -3802,10 +3810,12 @@ export const MsgChannelUpgradeConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirm", value: MsgChannelUpgradeConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirm.typeUrl, MsgChannelUpgradeConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirm.aminoType, MsgChannelUpgradeConfirm.typeUrl); function createBaseMsgChannelUpgradeConfirmResponse(): MsgChannelUpgradeConfirmResponse { return { result: 0 @@ -3880,10 +3890,9 @@ export const MsgChannelUpgradeConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", value: MsgChannelUpgradeConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirmResponse.typeUrl, MsgChannelUpgradeConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirmResponse.aminoType, MsgChannelUpgradeConfirmResponse.typeUrl); function createBaseMsgChannelUpgradeOpen(): MsgChannelUpgradeOpen { return { portId: "", @@ -4030,10 +4039,11 @@ export const MsgChannelUpgradeOpen = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpen", value: MsgChannelUpgradeOpen.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpen.typeUrl, MsgChannelUpgradeOpen); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpen.aminoType, MsgChannelUpgradeOpen.typeUrl); function createBaseMsgChannelUpgradeOpenResponse(): MsgChannelUpgradeOpenResponse { return {}; } @@ -4095,10 +4105,9 @@ export const MsgChannelUpgradeOpenResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", value: MsgChannelUpgradeOpenResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpenResponse.typeUrl, MsgChannelUpgradeOpenResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpenResponse.aminoType, MsgChannelUpgradeOpenResponse.typeUrl); function createBaseMsgChannelUpgradeTimeout(): MsgChannelUpgradeTimeout { return { portId: "", @@ -4233,10 +4242,12 @@ export const MsgChannelUpgradeTimeout = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeout", value: MsgChannelUpgradeTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeout.typeUrl, MsgChannelUpgradeTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeout.aminoType, MsgChannelUpgradeTimeout.typeUrl); function createBaseMsgChannelUpgradeTimeoutResponse(): MsgChannelUpgradeTimeoutResponse { return {}; } @@ -4298,10 +4309,9 @@ export const MsgChannelUpgradeTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", value: MsgChannelUpgradeTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeoutResponse.typeUrl, MsgChannelUpgradeTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeoutResponse.aminoType, MsgChannelUpgradeTimeoutResponse.typeUrl); function createBaseMsgChannelUpgradeCancel(): MsgChannelUpgradeCancel { return { portId: "", @@ -4436,10 +4446,12 @@ export const MsgChannelUpgradeCancel = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancel", value: MsgChannelUpgradeCancel.encode(message).finish() }; + }, + registerTypeUrl() { + ErrorReceipt.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancel.typeUrl, MsgChannelUpgradeCancel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancel.aminoType, MsgChannelUpgradeCancel.typeUrl); function createBaseMsgChannelUpgradeCancelResponse(): MsgChannelUpgradeCancelResponse { return {}; } @@ -4501,10 +4513,9 @@ export const MsgChannelUpgradeCancelResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", value: MsgChannelUpgradeCancelResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancelResponse.typeUrl, MsgChannelUpgradeCancelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancelResponse.aminoType, MsgChannelUpgradeCancelResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -4591,10 +4602,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -4656,10 +4668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgPruneAcknowledgements(): MsgPruneAcknowledgements { return { portId: "", @@ -4770,10 +4781,9 @@ export const MsgPruneAcknowledgements = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgements", value: MsgPruneAcknowledgements.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAcknowledgements.typeUrl, MsgPruneAcknowledgements); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgements.aminoType, MsgPruneAcknowledgements.typeUrl); function createBaseMsgPruneAcknowledgementsResponse(): MsgPruneAcknowledgementsResponse { return { totalPrunedSequences: BigInt(0), @@ -4860,7 +4870,6 @@ export const MsgPruneAcknowledgementsResponse = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", value: MsgPruneAcknowledgementsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAcknowledgementsResponse.typeUrl, MsgPruneAcknowledgementsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgementsResponse.aminoType, MsgPruneAcknowledgementsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/channel/v1/upgrade.ts b/libs/injective-react/src/ibc/core/channel/v1/upgrade.ts index 8ce98e36..4b7a4477 100644 --- a/libs/injective-react/src/ibc/core/channel/v1/upgrade.ts +++ b/libs/injective-react/src/ibc/core/channel/v1/upgrade.ts @@ -1,7 +1,6 @@ import { Timeout, TimeoutAmino, Order } from "./channel"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Upgrade is a verifiable type which contains the relevant information * for an attempted upgrade. It provides the proposed changes to the channel @@ -188,10 +187,12 @@ export const Upgrade = { typeUrl: "/ibc.core.channel.v1.Upgrade", value: Upgrade.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Timeout.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Upgrade.typeUrl, Upgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(Upgrade.aminoType, Upgrade.typeUrl); function createBaseUpgradeFields(): UpgradeFields { return { ordering: 0, @@ -292,10 +293,9 @@ export const UpgradeFields = { typeUrl: "/ibc.core.channel.v1.UpgradeFields", value: UpgradeFields.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UpgradeFields.typeUrl, UpgradeFields); -GlobalDecoderRegistry.registerAminoProtoMapping(UpgradeFields.aminoType, UpgradeFields.typeUrl); function createBaseErrorReceipt(): ErrorReceipt { return { sequence: BigInt(0), @@ -382,7 +382,6 @@ export const ErrorReceipt = { typeUrl: "/ibc.core.channel.v1.ErrorReceipt", value: ErrorReceipt.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ErrorReceipt.typeUrl, ErrorReceipt); -GlobalDecoderRegistry.registerAminoProtoMapping(ErrorReceipt.aminoType, ErrorReceipt.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/client/v1/client.ts b/libs/injective-react/src/ibc/core/client/v1/client.ts index f6c36539..326bb611 100644 --- a/libs/injective-react/src/ibc/core/client/v1/client.ts +++ b/libs/injective-react/src/ibc/core/client/v1/client.ts @@ -1,7 +1,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * IdentifiedClientState defines a client state with an additional client * identifier field. @@ -248,10 +247,9 @@ export const IdentifiedClientState = { typeUrl: "/ibc.core.client.v1.IdentifiedClientState", value: IdentifiedClientState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IdentifiedClientState.typeUrl, IdentifiedClientState); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedClientState.aminoType, IdentifiedClientState.typeUrl); function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { return { height: Height.fromPartial({}), @@ -338,10 +336,9 @@ export const ConsensusStateWithHeight = { typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", value: ConsensusStateWithHeight.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConsensusStateWithHeight.typeUrl, ConsensusStateWithHeight); -GlobalDecoderRegistry.registerAminoProtoMapping(ConsensusStateWithHeight.aminoType, ConsensusStateWithHeight.typeUrl); function createBaseClientConsensusStates(): ClientConsensusStates { return { clientId: "", @@ -430,10 +427,11 @@ export const ClientConsensusStates = { typeUrl: "/ibc.core.client.v1.ClientConsensusStates", value: ClientConsensusStates.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusStateWithHeight.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ClientConsensusStates.typeUrl, ClientConsensusStates); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientConsensusStates.aminoType, ClientConsensusStates.typeUrl); function createBaseHeight(): Height { return { revisionNumber: BigInt(0), @@ -516,10 +514,9 @@ export const Height = { typeUrl: "/ibc.core.client.v1.Height", value: Height.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Height.typeUrl, Height); -GlobalDecoderRegistry.registerAminoProtoMapping(Height.aminoType, Height.typeUrl); function createBaseParams(): Params { return { allowedClients: [] @@ -596,7 +593,6 @@ export const Params = { typeUrl: "/ibc.core.client.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/client/v1/tx.rpc.func.ts b/libs/injective-react/src/ibc/core/client/v1/tx.rpc.func.ts index cf8b181c..7a754add 100644 --- a/libs/injective-react/src/ibc/core/client/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/ibc/core/client/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour, MsgRecoverClient, MsgIBCSoftwareUpgrade, MsgUpdateParams } from "./tx"; export const createCreateClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateClient.typeUrl, encoders: toEncoders(MsgCreateClient), - converters: toConverters(MsgCreateClient) + converters: toConverters(MsgCreateClient), + deps: [MsgCreateClient] }); export const useCreateClient = buildUseMutation({ builderMutationFn: createCreateClient @@ -15,7 +16,8 @@ export const createUpdateClient = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateClient.typeUrl, encoders: toEncoders(MsgUpdateClient), - converters: toConverters(MsgUpdateClient) + converters: toConverters(MsgUpdateClient), + deps: [MsgUpdateClient] }); export const useUpdateClient = buildUseMutation({ builderMutationFn: createUpdateClient @@ -24,7 +26,8 @@ export const createUpgradeClient = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgUpgradeClient.typeUrl, encoders: toEncoders(MsgUpgradeClient), - converters: toConverters(MsgUpgradeClient) + converters: toConverters(MsgUpgradeClient), + deps: [MsgUpgradeClient] }); export const useUpgradeClient = buildUseMutation({ builderMutationFn: createUpgradeClient @@ -33,7 +36,8 @@ export const createSubmitMisbehaviour = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgSubmitMisbehaviour.typeUrl, encoders: toEncoders(MsgSubmitMisbehaviour), - converters: toConverters(MsgSubmitMisbehaviour) + converters: toConverters(MsgSubmitMisbehaviour), + deps: [MsgSubmitMisbehaviour] }); export const useSubmitMisbehaviour = buildUseMutation({ builderMutationFn: createSubmitMisbehaviour @@ -42,7 +46,8 @@ export const createRecoverClient = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgRecoverClient.typeUrl, encoders: toEncoders(MsgRecoverClient), - converters: toConverters(MsgRecoverClient) + converters: toConverters(MsgRecoverClient), + deps: [MsgRecoverClient] }); export const useRecoverClient = buildUseMutation({ builderMutationFn: createRecoverClient @@ -51,7 +56,8 @@ export const createIBCSoftwareUpgrade = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgIBCSoftwareUpgrade.typeUrl, encoders: toEncoders(MsgIBCSoftwareUpgrade), - converters: toConverters(MsgIBCSoftwareUpgrade) + converters: toConverters(MsgIBCSoftwareUpgrade), + deps: [MsgIBCSoftwareUpgrade] }); export const useIBCSoftwareUpgrade = buildUseMutation({ builderMutationFn: createIBCSoftwareUpgrade @@ -60,7 +66,8 @@ export const createUpdateClientParams = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateClientParams = buildUseMutation({ builderMutationFn: createUpdateClientParams diff --git a/libs/injective-react/src/ibc/core/client/v1/tx.ts b/libs/injective-react/src/ibc/core/client/v1/tx.ts index c0281aac..99b3dca1 100644 --- a/libs/injective-react/src/ibc/core/client/v1/tx.ts +++ b/libs/injective-react/src/ibc/core/client/v1/tx.ts @@ -3,7 +3,6 @@ import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import { Params, ParamsAmino } from "./client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** MsgCreateClient defines a message to create an IBC client */ export interface MsgCreateClient { /** light client state */ @@ -450,10 +449,9 @@ export const MsgCreateClient = { typeUrl: "/ibc.core.client.v1.MsgCreateClient", value: MsgCreateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClient.typeUrl, MsgCreateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClient.aminoType, MsgCreateClient.typeUrl); function createBaseMsgCreateClientResponse(): MsgCreateClientResponse { return { clientId: "" @@ -528,10 +526,9 @@ export const MsgCreateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", value: MsgCreateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClientResponse.typeUrl, MsgCreateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClientResponse.aminoType, MsgCreateClientResponse.typeUrl); function createBaseMsgUpdateClient(): MsgUpdateClient { return { clientId: "", @@ -630,10 +627,9 @@ export const MsgUpdateClient = { typeUrl: "/ibc.core.client.v1.MsgUpdateClient", value: MsgUpdateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClient.typeUrl, MsgUpdateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClient.aminoType, MsgUpdateClient.typeUrl); function createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse { return {}; } @@ -695,10 +691,9 @@ export const MsgUpdateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", value: MsgUpdateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClientResponse.typeUrl, MsgUpdateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClientResponse.aminoType, MsgUpdateClientResponse.typeUrl); function createBaseMsgUpgradeClient(): MsgUpgradeClient { return { clientId: "", @@ -833,10 +828,9 @@ export const MsgUpgradeClient = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", value: MsgUpgradeClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClient.typeUrl, MsgUpgradeClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClient.aminoType, MsgUpgradeClient.typeUrl); function createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse { return {}; } @@ -898,10 +892,9 @@ export const MsgUpgradeClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", value: MsgUpgradeClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClientResponse.typeUrl, MsgUpgradeClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClientResponse.aminoType, MsgUpgradeClientResponse.typeUrl); function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { return { clientId: "", @@ -1000,10 +993,9 @@ export const MsgSubmitMisbehaviour = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", value: MsgSubmitMisbehaviour.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviour.typeUrl, MsgSubmitMisbehaviour); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviour.aminoType, MsgSubmitMisbehaviour.typeUrl); function createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourResponse { return {}; } @@ -1065,10 +1057,9 @@ export const MsgSubmitMisbehaviourResponse = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", value: MsgSubmitMisbehaviourResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviourResponse.typeUrl, MsgSubmitMisbehaviourResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviourResponse.aminoType, MsgSubmitMisbehaviourResponse.typeUrl); function createBaseMsgRecoverClient(): MsgRecoverClient { return { subjectClientId: "", @@ -1167,10 +1158,9 @@ export const MsgRecoverClient = { typeUrl: "/ibc.core.client.v1.MsgRecoverClient", value: MsgRecoverClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClient.typeUrl, MsgRecoverClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClient.aminoType, MsgRecoverClient.typeUrl); function createBaseMsgRecoverClientResponse(): MsgRecoverClientResponse { return {}; } @@ -1232,10 +1222,9 @@ export const MsgRecoverClientResponse = { typeUrl: "/ibc.core.client.v1.MsgRecoverClientResponse", value: MsgRecoverClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClientResponse.typeUrl, MsgRecoverClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClientResponse.aminoType, MsgRecoverClientResponse.typeUrl); function createBaseMsgIBCSoftwareUpgrade(): MsgIBCSoftwareUpgrade { return { plan: Plan.fromPartial({}), @@ -1334,10 +1323,9 @@ export const MsgIBCSoftwareUpgrade = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgrade", value: MsgIBCSoftwareUpgrade.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgrade.typeUrl, MsgIBCSoftwareUpgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgrade.aminoType, MsgIBCSoftwareUpgrade.typeUrl); function createBaseMsgIBCSoftwareUpgradeResponse(): MsgIBCSoftwareUpgradeResponse { return {}; } @@ -1399,10 +1387,9 @@ export const MsgIBCSoftwareUpgradeResponse = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse", value: MsgIBCSoftwareUpgradeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgradeResponse.typeUrl, MsgIBCSoftwareUpgradeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgradeResponse.aminoType, MsgIBCSoftwareUpgradeResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1489,10 +1476,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.client.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1554,7 +1542,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/commitment/v1/commitment.ts b/libs/injective-react/src/ibc/core/commitment/v1/commitment.ts index 051efcdf..b66229f3 100644 --- a/libs/injective-react/src/ibc/core/commitment/v1/commitment.ts +++ b/libs/injective-react/src/ibc/core/commitment/v1/commitment.ts @@ -1,7 +1,6 @@ import { CommitmentProof, CommitmentProofAmino } from "../../../../cosmos/ics23/v1/proofs"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MerkleRoot defines a merkle root hash. * In the Cosmos SDK, the AppHash of a block header becomes the root. @@ -150,10 +149,9 @@ export const MerkleRoot = { typeUrl: "/ibc.core.commitment.v1.MerkleRoot", value: MerkleRoot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerkleRoot.typeUrl, MerkleRoot); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleRoot.aminoType, MerkleRoot.typeUrl); function createBaseMerklePrefix(): MerklePrefix { return { keyPrefix: new Uint8Array() @@ -228,10 +226,9 @@ export const MerklePrefix = { typeUrl: "/ibc.core.commitment.v1.MerklePrefix", value: MerklePrefix.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerklePrefix.typeUrl, MerklePrefix); -GlobalDecoderRegistry.registerAminoProtoMapping(MerklePrefix.aminoType, MerklePrefix.typeUrl); function createBaseMerkleProof(): MerkleProof { return { proofs: [] @@ -308,7 +305,8 @@ export const MerkleProof = { typeUrl: "/ibc.core.commitment.v1.MerkleProof", value: MerkleProof.encode(message).finish() }; + }, + registerTypeUrl() { + CommitmentProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(MerkleProof.typeUrl, MerkleProof); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleProof.aminoType, MerkleProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/connection/v1/connection.ts b/libs/injective-react/src/ibc/core/connection/v1/connection.ts index 1791709d..ed473558 100644 --- a/libs/injective-react/src/ibc/core/connection/v1/connection.ts +++ b/libs/injective-react/src/ibc/core/connection/v1/connection.ts @@ -1,7 +1,6 @@ import { MerklePrefix, MerklePrefixAmino } from "../../commitment/v1/commitment"; import { isSet, DeepPartial } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a connection is in one of the following states: * INIT, TRYOPEN, OPEN or UNINITIALIZED. @@ -420,10 +419,12 @@ export const ConnectionEnd = { typeUrl: "/ibc.core.connection.v1.ConnectionEnd", value: ConnectionEnd.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConnectionEnd.typeUrl, ConnectionEnd); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionEnd.aminoType, ConnectionEnd.typeUrl); function createBaseIdentifiedConnection(): IdentifiedConnection { return { id: "", @@ -560,10 +561,12 @@ export const IdentifiedConnection = { typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", value: IdentifiedConnection.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedConnection.typeUrl, IdentifiedConnection); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedConnection.aminoType, IdentifiedConnection.typeUrl); function createBaseCounterparty(): Counterparty { return { clientId: "", @@ -662,10 +665,11 @@ export const Counterparty = { typeUrl: "/ibc.core.connection.v1.Counterparty", value: Counterparty.encode(message).finish() }; + }, + registerTypeUrl() { + MerklePrefix.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBaseClientPaths(): ClientPaths { return { paths: [] @@ -742,10 +746,9 @@ export const ClientPaths = { typeUrl: "/ibc.core.connection.v1.ClientPaths", value: ClientPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ClientPaths.typeUrl, ClientPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientPaths.aminoType, ClientPaths.typeUrl); function createBaseConnectionPaths(): ConnectionPaths { return { clientId: "", @@ -834,10 +837,9 @@ export const ConnectionPaths = { typeUrl: "/ibc.core.connection.v1.ConnectionPaths", value: ConnectionPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConnectionPaths.typeUrl, ConnectionPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionPaths.aminoType, ConnectionPaths.typeUrl); function createBaseVersion(): Version { return { identifier: "", @@ -926,10 +928,9 @@ export const Version = { typeUrl: "/ibc.core.connection.v1.Version", value: Version.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Version.typeUrl, Version); -GlobalDecoderRegistry.registerAminoProtoMapping(Version.aminoType, Version.typeUrl); function createBaseParams(): Params { return { maxExpectedTimePerBlock: BigInt(0) @@ -1004,7 +1005,6 @@ export const Params = { typeUrl: "/ibc.core.connection.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/ibc/core/connection/v1/tx.rpc.func.ts b/libs/injective-react/src/ibc/core/connection/v1/tx.rpc.func.ts index 2c81e862..7d58334e 100644 --- a/libs/injective-react/src/ibc/core/connection/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/ibc/core/connection/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgUpdateParams } from "./tx"; export const createConnectionOpenInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenInit.typeUrl, encoders: toEncoders(MsgConnectionOpenInit), - converters: toConverters(MsgConnectionOpenInit) + converters: toConverters(MsgConnectionOpenInit), + deps: [MsgConnectionOpenInit] }); export const useConnectionOpenInit = buildUseMutation({ builderMutationFn: createConnectionOpenInit @@ -15,7 +16,8 @@ export const createConnectionOpenTry = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgConnectionOpenTry.typeUrl, encoders: toEncoders(MsgConnectionOpenTry), - converters: toConverters(MsgConnectionOpenTry) + converters: toConverters(MsgConnectionOpenTry), + deps: [MsgConnectionOpenTry] }); export const useConnectionOpenTry = buildUseMutation({ builderMutationFn: createConnectionOpenTry @@ -24,7 +26,8 @@ export const createConnectionOpenAck = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgConnectionOpenAck.typeUrl, encoders: toEncoders(MsgConnectionOpenAck), - converters: toConverters(MsgConnectionOpenAck) + converters: toConverters(MsgConnectionOpenAck), + deps: [MsgConnectionOpenAck] }); export const useConnectionOpenAck = buildUseMutation({ builderMutationFn: createConnectionOpenAck @@ -33,7 +36,8 @@ export const createConnectionOpenConfirm = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgConnectionOpenConfirm.typeUrl, encoders: toEncoders(MsgConnectionOpenConfirm), - converters: toConverters(MsgConnectionOpenConfirm) + converters: toConverters(MsgConnectionOpenConfirm), + deps: [MsgConnectionOpenConfirm] }); export const useConnectionOpenConfirm = buildUseMutation({ builderMutationFn: createConnectionOpenConfirm @@ -42,7 +46,8 @@ export const createUpdateConnectionParams = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateConnectionParams = buildUseMutation({ builderMutationFn: createUpdateConnectionParams diff --git a/libs/injective-react/src/ibc/core/connection/v1/tx.ts b/libs/injective-react/src/ibc/core/connection/v1/tx.ts index fd194d48..82afa89d 100644 --- a/libs/injective-react/src/ibc/core/connection/v1/tx.ts +++ b/libs/injective-react/src/ibc/core/connection/v1/tx.ts @@ -3,7 +3,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to * initialize a connection with Chain B. @@ -436,10 +435,12 @@ export const MsgConnectionOpenInit = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", value: MsgConnectionOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenInit.typeUrl, MsgConnectionOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInit.aminoType, MsgConnectionOpenInit.typeUrl); function createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitResponse { return {}; } @@ -501,10 +502,9 @@ export const MsgConnectionOpenInitResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", value: MsgConnectionOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenInitResponse.typeUrl, MsgConnectionOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInitResponse.aminoType, MsgConnectionOpenInitResponse.typeUrl); function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { return { clientId: "", @@ -725,10 +725,13 @@ export const MsgConnectionOpenTry = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", value: MsgConnectionOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenTry.typeUrl, MsgConnectionOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTry.aminoType, MsgConnectionOpenTry.typeUrl); function createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse { return {}; } @@ -790,10 +793,9 @@ export const MsgConnectionOpenTryResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", value: MsgConnectionOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenTryResponse.typeUrl, MsgConnectionOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTryResponse.aminoType, MsgConnectionOpenTryResponse.typeUrl); function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { return { connectionId: "", @@ -988,10 +990,11 @@ export const MsgConnectionOpenAck = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", value: MsgConnectionOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenAck.typeUrl, MsgConnectionOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAck.aminoType, MsgConnectionOpenAck.typeUrl); function createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse { return {}; } @@ -1053,10 +1056,9 @@ export const MsgConnectionOpenAckResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", value: MsgConnectionOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenAckResponse.typeUrl, MsgConnectionOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAckResponse.aminoType, MsgConnectionOpenAckResponse.typeUrl); function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { return { connectionId: "", @@ -1167,10 +1169,11 @@ export const MsgConnectionOpenConfirm = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", value: MsgConnectionOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirm.typeUrl, MsgConnectionOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirm.aminoType, MsgConnectionOpenConfirm.typeUrl); function createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmResponse { return {}; } @@ -1232,10 +1235,9 @@ export const MsgConnectionOpenConfirmResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", value: MsgConnectionOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirmResponse.typeUrl, MsgConnectionOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirmResponse.aminoType, MsgConnectionOpenConfirmResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1322,10 +1324,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1387,7 +1390,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/auction/v1beta1/auction.ts b/libs/injective-react/src/injective/auction/v1beta1/auction.ts index 7fd1367f..6251b329 100644 --- a/libs/injective-react/src/injective/auction/v1beta1/auction.ts +++ b/libs/injective-react/src/injective/auction/v1beta1/auction.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { /** auction_period_duration defines the auction period duration */ auctionPeriod: bigint; @@ -226,10 +225,9 @@ export const Params = { typeUrl: "/injective.auction.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseBid(): Bid { return { bidder: "", @@ -309,9 +307,9 @@ export const Bid = { typeUrl: "/injective.auction.v1beta1.Bid", value: Bid.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bid.typeUrl, Bid); function createBaseLastAuctionResult(): LastAuctionResult { return { winner: "", @@ -403,9 +401,9 @@ export const LastAuctionResult = { typeUrl: "/injective.auction.v1beta1.LastAuctionResult", value: LastAuctionResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LastAuctionResult.typeUrl, LastAuctionResult); function createBaseEventBid(): EventBid { return { bidder: "", @@ -497,9 +495,9 @@ export const EventBid = { typeUrl: "/injective.auction.v1beta1.EventBid", value: EventBid.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBid.typeUrl, EventBid); function createBaseEventAuctionResult(): EventAuctionResult { return { winner: "", @@ -591,9 +589,9 @@ export const EventAuctionResult = { typeUrl: "/injective.auction.v1beta1.EventAuctionResult", value: EventAuctionResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAuctionResult.typeUrl, EventAuctionResult); function createBaseEventAuctionStart(): EventAuctionStart { return { round: BigInt(0), @@ -687,6 +685,8 @@ export const EventAuctionStart = { typeUrl: "/injective.auction.v1beta1.EventAuctionStart", value: EventAuctionStart.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventAuctionStart.typeUrl, EventAuctionStart); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/auction/v1beta1/genesis.ts b/libs/injective-react/src/injective/auction/v1beta1/genesis.ts index 6ea94963..25c77c67 100644 --- a/libs/injective-react/src/injective/auction/v1beta1/genesis.ts +++ b/libs/injective-react/src/injective/auction/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, Bid, BidAmino, LastAuctionResult, LastAuctionResultAmino } from "./auction"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the auction module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to auction. */ @@ -151,6 +150,10 @@ export const GenesisState = { typeUrl: "/injective.auction.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + Bid.registerTypeUrl(); + LastAuctionResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/auction/v1beta1/query.rpc.func.ts b/libs/injective-react/src/injective/auction/v1beta1/query.rpc.func.ts index 09c769a9..3870d57f 100644 --- a/libs/injective-react/src/injective/auction/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/auction/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetAuctionParams = (clientResolver?: RpcResolver) => buildQue decode: QueryAuctionParamsResponse.decode, service: "injective.auction.v1beta1.Query", method: "AuctionParams", - clientResolver + clientResolver, + deps: [QueryAuctionParamsRequest, QueryAuctionParamsResponse] }); export const useGetAuctionParams = buildUseQuery({ builderQueryFn: createGetAuctionParams, @@ -17,7 +18,8 @@ export const createGetCurrentAuctionBasket = (clientResolver?: RpcResolver) => b decode: QueryCurrentAuctionBasketResponse.decode, service: "injective.auction.v1beta1.Query", method: "CurrentAuctionBasket", - clientResolver + clientResolver, + deps: [QueryCurrentAuctionBasketRequest, QueryCurrentAuctionBasketResponse] }); export const useGetCurrentAuctionBasket = buildUseQuery({ builderQueryFn: createGetCurrentAuctionBasket, @@ -28,7 +30,8 @@ export const createGetAuctionModuleState = (clientResolver?: RpcResolver) => bui decode: QueryModuleStateResponse.decode, service: "injective.auction.v1beta1.Query", method: "AuctionModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetAuctionModuleState = buildUseQuery({ builderQueryFn: createGetAuctionModuleState, @@ -39,7 +42,8 @@ export const createGetLastAuctionResult = (clientResolver?: RpcResolver) => buil decode: QueryLastAuctionResultResponse.decode, service: "injective.auction.v1beta1.Query", method: "LastAuctionResult", - clientResolver + clientResolver, + deps: [QueryLastAuctionResultRequest, QueryLastAuctionResultResponse] }); export const useGetLastAuctionResult = buildUseQuery({ builderQueryFn: createGetLastAuctionResult, diff --git a/libs/injective-react/src/injective/auction/v1beta1/query.ts b/libs/injective-react/src/injective/auction/v1beta1/query.ts index 723f9496..131df2e4 100644 --- a/libs/injective-react/src/injective/auction/v1beta1/query.ts +++ b/libs/injective-react/src/injective/auction/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * QueryAuctionParamsRequest is the request type for the Query/AuctionParams RPC * method. @@ -220,9 +219,9 @@ export const QueryAuctionParamsRequest = { typeUrl: "/injective.auction.v1beta1.QueryAuctionParamsRequest", value: QueryAuctionParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAuctionParamsRequest.typeUrl, QueryAuctionParamsRequest); function createBaseQueryAuctionParamsResponse(): QueryAuctionParamsResponse { return { params: Params.fromPartial({}) @@ -290,9 +289,11 @@ export const QueryAuctionParamsResponse = { typeUrl: "/injective.auction.v1beta1.QueryAuctionParamsResponse", value: QueryAuctionParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAuctionParamsResponse.typeUrl, QueryAuctionParamsResponse); function createBaseQueryCurrentAuctionBasketRequest(): QueryCurrentAuctionBasketRequest { return {}; } @@ -347,9 +348,9 @@ export const QueryCurrentAuctionBasketRequest = { typeUrl: "/injective.auction.v1beta1.QueryCurrentAuctionBasketRequest", value: QueryCurrentAuctionBasketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCurrentAuctionBasketRequest.typeUrl, QueryCurrentAuctionBasketRequest); function createBaseQueryCurrentAuctionBasketResponse(): QueryCurrentAuctionBasketResponse { return { amount: [], @@ -467,9 +468,11 @@ export const QueryCurrentAuctionBasketResponse = { typeUrl: "/injective.auction.v1beta1.QueryCurrentAuctionBasketResponse", value: QueryCurrentAuctionBasketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCurrentAuctionBasketResponse.typeUrl, QueryCurrentAuctionBasketResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -524,9 +527,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.auction.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -594,9 +597,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.auction.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryLastAuctionResultRequest(): QueryLastAuctionResultRequest { return {}; } @@ -651,9 +656,9 @@ export const QueryLastAuctionResultRequest = { typeUrl: "/injective.auction.v1beta1.QueryLastAuctionResultRequest", value: QueryLastAuctionResultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastAuctionResultRequest.typeUrl, QueryLastAuctionResultRequest); function createBaseQueryLastAuctionResultResponse(): QueryLastAuctionResultResponse { return { lastAuctionResult: undefined @@ -721,6 +726,8 @@ export const QueryLastAuctionResultResponse = { typeUrl: "/injective.auction.v1beta1.QueryLastAuctionResultResponse", value: QueryLastAuctionResultResponse.encode(message).finish() }; + }, + registerTypeUrl() { + LastAuctionResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryLastAuctionResultResponse.typeUrl, QueryLastAuctionResultResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/auction/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/injective/auction/v1beta1/tx.rpc.func.ts index ae16ff91..e8919581 100644 --- a/libs/injective-react/src/injective/auction/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/auction/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgBid, MsgUpdateParams } from "./tx"; export const createBid = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBid.typeUrl, encoders: toEncoders(MsgBid), - converters: toConverters(MsgBid) + converters: toConverters(MsgBid), + deps: [MsgBid] }); export const useBid = buildUseMutation({ builderMutationFn: createBid @@ -15,7 +16,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/injective-react/src/injective/auction/v1beta1/tx.ts b/libs/injective-react/src/injective/auction/v1beta1/tx.ts index 9905ad0e..dff99f56 100644 --- a/libs/injective-react/src/injective/auction/v1beta1/tx.ts +++ b/libs/injective-react/src/injective/auction/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Params, ParamsAmino } from "./auction"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Bid defines a SDK message for placing a bid for an auction */ export interface MsgBid { sender: string; @@ -173,10 +172,11 @@ export const MsgBid = { typeUrl: "/injective.auction.v1beta1.MsgBid", value: MsgBid.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBid.typeUrl, MsgBid); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBid.aminoType, MsgBid.typeUrl); function createBaseMsgBidResponse(): MsgBidResponse { return {}; } @@ -231,9 +231,9 @@ export const MsgBidResponse = { typeUrl: "/injective.auction.v1beta1.MsgBidResponse", value: MsgBidResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBidResponse.typeUrl, MsgBidResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -320,10 +320,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.auction.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -378,6 +379,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.auction.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts b/libs/injective-react/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts index 0017ec6a..353000d2 100644 --- a/libs/injective-react/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts +++ b/libs/injective-react/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * PubKey defines a type alias for an ecdsa.PublicKey that implements * Tendermint's PubKey interface. It represents the 33-byte compressed public @@ -121,10 +120,9 @@ export const PubKey = { typeUrl: "/injective.crypto.v1beta1.ethsecp256k1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -199,7 +197,6 @@ export const PrivKey = { typeUrl: "/injective.crypto.v1beta1.ethsecp256k1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/exchange/v1beta1/authz.ts b/libs/injective-react/src/injective/exchange/v1beta1/authz.ts index 96f2d111..88521344 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/authz.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/authz.ts @@ -273,10 +273,12 @@ export const CreateSpotLimitOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateSpotLimitOrderAuthz", value: CreateSpotLimitOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateSpotLimitOrderAuthz.typeUrl, CreateSpotLimitOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotLimitOrderAuthz.aminoType, CreateSpotLimitOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateSpotLimitOrderAuthz.typeUrl, CreateSpotLimitOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotLimitOrderAuthz.aminoType, CreateSpotLimitOrderAuthz.typeUrl); function createBaseCreateSpotMarketOrderAuthz(): CreateSpotMarketOrderAuthz { return { subaccountId: "", @@ -365,10 +367,12 @@ export const CreateSpotMarketOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateSpotMarketOrderAuthz", value: CreateSpotMarketOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateSpotMarketOrderAuthz.typeUrl, CreateSpotMarketOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotMarketOrderAuthz.aminoType, CreateSpotMarketOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateSpotMarketOrderAuthz.typeUrl, CreateSpotMarketOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotMarketOrderAuthz.aminoType, CreateSpotMarketOrderAuthz.typeUrl); function createBaseBatchCreateSpotLimitOrdersAuthz(): BatchCreateSpotLimitOrdersAuthz { return { subaccountId: "", @@ -457,10 +461,12 @@ export const BatchCreateSpotLimitOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCreateSpotLimitOrdersAuthz", value: BatchCreateSpotLimitOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCreateSpotLimitOrdersAuthz.typeUrl, BatchCreateSpotLimitOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateSpotLimitOrdersAuthz.aminoType, BatchCreateSpotLimitOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCreateSpotLimitOrdersAuthz.typeUrl, BatchCreateSpotLimitOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateSpotLimitOrdersAuthz.aminoType, BatchCreateSpotLimitOrdersAuthz.typeUrl); function createBaseCancelSpotOrderAuthz(): CancelSpotOrderAuthz { return { subaccountId: "", @@ -549,10 +555,12 @@ export const CancelSpotOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CancelSpotOrderAuthz", value: CancelSpotOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelSpotOrderAuthz.typeUrl, CancelSpotOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelSpotOrderAuthz.aminoType, CancelSpotOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CancelSpotOrderAuthz.typeUrl, CancelSpotOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelSpotOrderAuthz.aminoType, CancelSpotOrderAuthz.typeUrl); function createBaseBatchCancelSpotOrdersAuthz(): BatchCancelSpotOrdersAuthz { return { subaccountId: "", @@ -641,10 +649,12 @@ export const BatchCancelSpotOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCancelSpotOrdersAuthz", value: BatchCancelSpotOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCancelSpotOrdersAuthz.typeUrl, BatchCancelSpotOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelSpotOrdersAuthz.aminoType, BatchCancelSpotOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCancelSpotOrdersAuthz.typeUrl, BatchCancelSpotOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelSpotOrdersAuthz.aminoType, BatchCancelSpotOrdersAuthz.typeUrl); function createBaseCreateDerivativeLimitOrderAuthz(): CreateDerivativeLimitOrderAuthz { return { subaccountId: "", @@ -733,10 +743,12 @@ export const CreateDerivativeLimitOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateDerivativeLimitOrderAuthz", value: CreateDerivativeLimitOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateDerivativeLimitOrderAuthz.typeUrl, CreateDerivativeLimitOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeLimitOrderAuthz.aminoType, CreateDerivativeLimitOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateDerivativeLimitOrderAuthz.typeUrl, CreateDerivativeLimitOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeLimitOrderAuthz.aminoType, CreateDerivativeLimitOrderAuthz.typeUrl); function createBaseCreateDerivativeMarketOrderAuthz(): CreateDerivativeMarketOrderAuthz { return { subaccountId: "", @@ -825,10 +837,12 @@ export const CreateDerivativeMarketOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateDerivativeMarketOrderAuthz", value: CreateDerivativeMarketOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateDerivativeMarketOrderAuthz.typeUrl, CreateDerivativeMarketOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeMarketOrderAuthz.aminoType, CreateDerivativeMarketOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateDerivativeMarketOrderAuthz.typeUrl, CreateDerivativeMarketOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeMarketOrderAuthz.aminoType, CreateDerivativeMarketOrderAuthz.typeUrl); function createBaseBatchCreateDerivativeLimitOrdersAuthz(): BatchCreateDerivativeLimitOrdersAuthz { return { subaccountId: "", @@ -917,10 +931,12 @@ export const BatchCreateDerivativeLimitOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCreateDerivativeLimitOrdersAuthz", value: BatchCreateDerivativeLimitOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCreateDerivativeLimitOrdersAuthz.typeUrl, BatchCreateDerivativeLimitOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateDerivativeLimitOrdersAuthz.aminoType, BatchCreateDerivativeLimitOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCreateDerivativeLimitOrdersAuthz.typeUrl, BatchCreateDerivativeLimitOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateDerivativeLimitOrdersAuthz.aminoType, BatchCreateDerivativeLimitOrdersAuthz.typeUrl); function createBaseCancelDerivativeOrderAuthz(): CancelDerivativeOrderAuthz { return { subaccountId: "", @@ -1009,10 +1025,12 @@ export const CancelDerivativeOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CancelDerivativeOrderAuthz", value: CancelDerivativeOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelDerivativeOrderAuthz.typeUrl, CancelDerivativeOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelDerivativeOrderAuthz.aminoType, CancelDerivativeOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CancelDerivativeOrderAuthz.typeUrl, CancelDerivativeOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelDerivativeOrderAuthz.aminoType, CancelDerivativeOrderAuthz.typeUrl); function createBaseBatchCancelDerivativeOrdersAuthz(): BatchCancelDerivativeOrdersAuthz { return { subaccountId: "", @@ -1101,10 +1119,12 @@ export const BatchCancelDerivativeOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCancelDerivativeOrdersAuthz", value: BatchCancelDerivativeOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCancelDerivativeOrdersAuthz.typeUrl, BatchCancelDerivativeOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelDerivativeOrdersAuthz.aminoType, BatchCancelDerivativeOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCancelDerivativeOrdersAuthz.typeUrl, BatchCancelDerivativeOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelDerivativeOrdersAuthz.aminoType, BatchCancelDerivativeOrdersAuthz.typeUrl); function createBaseBatchUpdateOrdersAuthz(): BatchUpdateOrdersAuthz { return { subaccountId: "", @@ -1207,7 +1227,9 @@ export const BatchUpdateOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchUpdateOrdersAuthz", value: BatchUpdateOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchUpdateOrdersAuthz.typeUrl, BatchUpdateOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchUpdateOrdersAuthz.aminoType, BatchUpdateOrdersAuthz.typeUrl); } -}; -GlobalDecoderRegistry.register(BatchUpdateOrdersAuthz.typeUrl, BatchUpdateOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchUpdateOrdersAuthz.aminoType, BatchUpdateOrdersAuthz.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/exchange/v1beta1/events.ts b/libs/injective-react/src/injective/exchange/v1beta1/events.ts index 133514d5..ee7baca9 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/events.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/events.ts @@ -2,7 +2,6 @@ import { ExecutionType, TradeLog, TradeLogAmino, DerivativeTradeLog, DerivativeT import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventBatchSpotExecution { marketId: string; isBuy: boolean; @@ -748,9 +747,11 @@ export const EventBatchSpotExecution = { typeUrl: "/injective.exchange.v1beta1.EventBatchSpotExecution", value: EventBatchSpotExecution.encode(message).finish() }; + }, + registerTypeUrl() { + TradeLog.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchSpotExecution.typeUrl, EventBatchSpotExecution); function createBaseEventBatchDerivativeExecution(): EventBatchDerivativeExecution { return { marketId: "", @@ -880,9 +881,11 @@ export const EventBatchDerivativeExecution = { typeUrl: "/injective.exchange.v1beta1.EventBatchDerivativeExecution", value: EventBatchDerivativeExecution.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeTradeLog.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchDerivativeExecution.typeUrl, EventBatchDerivativeExecution); function createBaseEventLostFundsFromLiquidation(): EventLostFundsFromLiquidation { return { marketId: "", @@ -986,9 +989,9 @@ export const EventLostFundsFromLiquidation = { typeUrl: "/injective.exchange.v1beta1.EventLostFundsFromLiquidation", value: EventLostFundsFromLiquidation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventLostFundsFromLiquidation.typeUrl, EventLostFundsFromLiquidation); function createBaseEventBatchDerivativePosition(): EventBatchDerivativePosition { return { marketId: "", @@ -1070,9 +1073,11 @@ export const EventBatchDerivativePosition = { typeUrl: "/injective.exchange.v1beta1.EventBatchDerivativePosition", value: EventBatchDerivativePosition.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountPosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchDerivativePosition.typeUrl, EventBatchDerivativePosition); function createBaseEventDerivativeMarketPaused(): EventDerivativeMarketPaused { return { marketId: "", @@ -1176,9 +1181,9 @@ export const EventDerivativeMarketPaused = { typeUrl: "/injective.exchange.v1beta1.EventDerivativeMarketPaused", value: EventDerivativeMarketPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventDerivativeMarketPaused.typeUrl, EventDerivativeMarketPaused); function createBaseEventMarketBeyondBankruptcy(): EventMarketBeyondBankruptcy { return { marketId: "", @@ -1270,9 +1275,9 @@ export const EventMarketBeyondBankruptcy = { typeUrl: "/injective.exchange.v1beta1.EventMarketBeyondBankruptcy", value: EventMarketBeyondBankruptcy.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventMarketBeyondBankruptcy.typeUrl, EventMarketBeyondBankruptcy); function createBaseEventAllPositionsHaircut(): EventAllPositionsHaircut { return { marketId: "", @@ -1364,9 +1369,9 @@ export const EventAllPositionsHaircut = { typeUrl: "/injective.exchange.v1beta1.EventAllPositionsHaircut", value: EventAllPositionsHaircut.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAllPositionsHaircut.typeUrl, EventAllPositionsHaircut); function createBaseEventBinaryOptionsMarketUpdate(): EventBinaryOptionsMarketUpdate { return { market: BinaryOptionsMarket.fromPartial({}) @@ -1434,9 +1439,11 @@ export const EventBinaryOptionsMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventBinaryOptionsMarketUpdate", value: EventBinaryOptionsMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + BinaryOptionsMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBinaryOptionsMarketUpdate.typeUrl, EventBinaryOptionsMarketUpdate); function createBaseEventNewSpotOrders(): EventNewSpotOrders { return { marketId: "", @@ -1532,9 +1539,11 @@ export const EventNewSpotOrders = { typeUrl: "/injective.exchange.v1beta1.EventNewSpotOrders", value: EventNewSpotOrders.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewSpotOrders.typeUrl, EventNewSpotOrders); function createBaseEventNewDerivativeOrders(): EventNewDerivativeOrders { return { marketId: "", @@ -1630,9 +1639,11 @@ export const EventNewDerivativeOrders = { typeUrl: "/injective.exchange.v1beta1.EventNewDerivativeOrders", value: EventNewDerivativeOrders.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewDerivativeOrders.typeUrl, EventNewDerivativeOrders); function createBaseEventCancelSpotOrder(): EventCancelSpotOrder { return { marketId: "", @@ -1712,9 +1723,11 @@ export const EventCancelSpotOrder = { typeUrl: "/injective.exchange.v1beta1.EventCancelSpotOrder", value: EventCancelSpotOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventCancelSpotOrder.typeUrl, EventCancelSpotOrder); function createBaseEventSpotMarketUpdate(): EventSpotMarketUpdate { return { market: SpotMarket.fromPartial({}) @@ -1782,9 +1795,11 @@ export const EventSpotMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventSpotMarketUpdate", value: EventSpotMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSpotMarketUpdate.typeUrl, EventSpotMarketUpdate); function createBaseEventPerpetualMarketUpdate(): EventPerpetualMarketUpdate { return { market: DerivativeMarket.fromPartial({}), @@ -1876,9 +1891,13 @@ export const EventPerpetualMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventPerpetualMarketUpdate", value: EventPerpetualMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarket.registerTypeUrl(); + PerpetualMarketInfo.registerTypeUrl(); + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventPerpetualMarketUpdate.typeUrl, EventPerpetualMarketUpdate); function createBaseEventExpiryFuturesMarketUpdate(): EventExpiryFuturesMarketUpdate { return { market: DerivativeMarket.fromPartial({}), @@ -1958,9 +1977,12 @@ export const EventExpiryFuturesMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventExpiryFuturesMarketUpdate", value: EventExpiryFuturesMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarket.registerTypeUrl(); + ExpiryFuturesMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventExpiryFuturesMarketUpdate.typeUrl, EventExpiryFuturesMarketUpdate); function createBaseEventPerpetualMarketFundingUpdate(): EventPerpetualMarketFundingUpdate { return { marketId: "", @@ -2076,9 +2098,11 @@ export const EventPerpetualMarketFundingUpdate = { typeUrl: "/injective.exchange.v1beta1.EventPerpetualMarketFundingUpdate", value: EventPerpetualMarketFundingUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventPerpetualMarketFundingUpdate.typeUrl, EventPerpetualMarketFundingUpdate); function createBaseEventSubaccountDeposit(): EventSubaccountDeposit { return { srcAddress: "", @@ -2170,9 +2194,11 @@ export const EventSubaccountDeposit = { typeUrl: "/injective.exchange.v1beta1.EventSubaccountDeposit", value: EventSubaccountDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSubaccountDeposit.typeUrl, EventSubaccountDeposit); function createBaseEventSubaccountWithdraw(): EventSubaccountWithdraw { return { subaccountId: new Uint8Array(), @@ -2264,9 +2290,11 @@ export const EventSubaccountWithdraw = { typeUrl: "/injective.exchange.v1beta1.EventSubaccountWithdraw", value: EventSubaccountWithdraw.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSubaccountWithdraw.typeUrl, EventSubaccountWithdraw); function createBaseEventSubaccountBalanceTransfer(): EventSubaccountBalanceTransfer { return { srcSubaccountId: "", @@ -2358,9 +2386,11 @@ export const EventSubaccountBalanceTransfer = { typeUrl: "/injective.exchange.v1beta1.EventSubaccountBalanceTransfer", value: EventSubaccountBalanceTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSubaccountBalanceTransfer.typeUrl, EventSubaccountBalanceTransfer); function createBaseEventBatchDepositUpdate(): EventBatchDepositUpdate { return { depositUpdates: [] @@ -2430,9 +2460,11 @@ export const EventBatchDepositUpdate = { typeUrl: "/injective.exchange.v1beta1.EventBatchDepositUpdate", value: EventBatchDepositUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DepositUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchDepositUpdate.typeUrl, EventBatchDepositUpdate); function createBaseDerivativeMarketOrderCancel(): DerivativeMarketOrderCancel { return { marketOrder: undefined, @@ -2512,9 +2544,11 @@ export const DerivativeMarketOrderCancel = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketOrderCancel", value: DerivativeMarketOrderCancel.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarketOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketOrderCancel.typeUrl, DerivativeMarketOrderCancel); function createBaseEventCancelDerivativeOrder(): EventCancelDerivativeOrder { return { marketId: "", @@ -2618,9 +2652,12 @@ export const EventCancelDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.EventCancelDerivativeOrder", value: EventCancelDerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); + DerivativeMarketOrderCancel.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventCancelDerivativeOrder.typeUrl, EventCancelDerivativeOrder); function createBaseEventFeeDiscountSchedule(): EventFeeDiscountSchedule { return { schedule: undefined @@ -2688,9 +2725,11 @@ export const EventFeeDiscountSchedule = { typeUrl: "/injective.exchange.v1beta1.EventFeeDiscountSchedule", value: EventFeeDiscountSchedule.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventFeeDiscountSchedule.typeUrl, EventFeeDiscountSchedule); function createBaseEventTradingRewardCampaignUpdate(): EventTradingRewardCampaignUpdate { return { campaignInfo: undefined, @@ -2772,9 +2811,12 @@ export const EventTradingRewardCampaignUpdate = { typeUrl: "/injective.exchange.v1beta1.EventTradingRewardCampaignUpdate", value: EventTradingRewardCampaignUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventTradingRewardCampaignUpdate.typeUrl, EventTradingRewardCampaignUpdate); function createBaseEventTradingRewardDistribution(): EventTradingRewardDistribution { return { accountRewards: [] @@ -2844,9 +2886,11 @@ export const EventTradingRewardDistribution = { typeUrl: "/injective.exchange.v1beta1.EventTradingRewardDistribution", value: EventTradingRewardDistribution.encode(message).finish() }; + }, + registerTypeUrl() { + AccountRewards.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventTradingRewardDistribution.typeUrl, EventTradingRewardDistribution); function createBaseEventNewConditionalDerivativeOrder(): EventNewConditionalDerivativeOrder { return { marketId: "", @@ -2950,9 +2994,11 @@ export const EventNewConditionalDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.EventNewConditionalDerivativeOrder", value: EventNewConditionalDerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewConditionalDerivativeOrder.typeUrl, EventNewConditionalDerivativeOrder); function createBaseEventCancelConditionalDerivativeOrder(): EventCancelConditionalDerivativeOrder { return { marketId: "", @@ -3056,9 +3102,12 @@ export const EventCancelConditionalDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.EventCancelConditionalDerivativeOrder", value: EventCancelConditionalDerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); + DerivativeMarketOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventCancelConditionalDerivativeOrder.typeUrl, EventCancelConditionalDerivativeOrder); function createBaseEventConditionalDerivativeOrderTrigger(): EventConditionalDerivativeOrderTrigger { return { marketId: new Uint8Array(), @@ -3174,9 +3223,9 @@ export const EventConditionalDerivativeOrderTrigger = { typeUrl: "/injective.exchange.v1beta1.EventConditionalDerivativeOrderTrigger", value: EventConditionalDerivativeOrderTrigger.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventConditionalDerivativeOrderTrigger.typeUrl, EventConditionalDerivativeOrderTrigger); function createBaseEventOrderFail(): EventOrderFail { return { account: new Uint8Array(), @@ -3295,9 +3344,9 @@ export const EventOrderFail = { typeUrl: "/injective.exchange.v1beta1.EventOrderFail", value: EventOrderFail.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventOrderFail.typeUrl, EventOrderFail); function createBaseEventAtomicMarketOrderFeeMultipliersUpdated(): EventAtomicMarketOrderFeeMultipliersUpdated { return { marketFeeMultipliers: [] @@ -3367,9 +3416,11 @@ export const EventAtomicMarketOrderFeeMultipliersUpdated = { typeUrl: "/injective.exchange.v1beta1.EventAtomicMarketOrderFeeMultipliersUpdated", value: EventAtomicMarketOrderFeeMultipliersUpdated.encode(message).finish() }; + }, + registerTypeUrl() { + MarketFeeMultiplier.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventAtomicMarketOrderFeeMultipliersUpdated.typeUrl, EventAtomicMarketOrderFeeMultipliersUpdated); function createBaseEventOrderbookUpdate(): EventOrderbookUpdate { return { spotUpdates: [], @@ -3453,9 +3504,11 @@ export const EventOrderbookUpdate = { typeUrl: "/injective.exchange.v1beta1.EventOrderbookUpdate", value: EventOrderbookUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + OrderbookUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventOrderbookUpdate.typeUrl, EventOrderbookUpdate); function createBaseOrderbookUpdate(): OrderbookUpdate { return { seq: BigInt(0), @@ -3535,9 +3588,11 @@ export const OrderbookUpdate = { typeUrl: "/injective.exchange.v1beta1.OrderbookUpdate", value: OrderbookUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + Orderbook.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OrderbookUpdate.typeUrl, OrderbookUpdate); function createBaseOrderbook(): Orderbook { return { marketId: new Uint8Array(), @@ -3633,9 +3688,11 @@ export const Orderbook = { typeUrl: "/injective.exchange.v1beta1.Orderbook", value: Orderbook.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Orderbook.typeUrl, Orderbook); function createBaseEventGrantAuthorizations(): EventGrantAuthorizations { return { granter: "", @@ -3717,9 +3774,11 @@ export const EventGrantAuthorizations = { typeUrl: "/injective.exchange.v1beta1.EventGrantAuthorizations", value: EventGrantAuthorizations.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventGrantAuthorizations.typeUrl, EventGrantAuthorizations); function createBaseEventGrantActivation(): EventGrantActivation { return { grantee: "", @@ -3811,9 +3870,9 @@ export const EventGrantActivation = { typeUrl: "/injective.exchange.v1beta1.EventGrantActivation", value: EventGrantActivation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventGrantActivation.typeUrl, EventGrantActivation); function createBaseEventInvalidGrant(): EventInvalidGrant { return { grantee: "", @@ -3893,9 +3952,9 @@ export const EventInvalidGrant = { typeUrl: "/injective.exchange.v1beta1.EventInvalidGrant", value: EventInvalidGrant.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventInvalidGrant.typeUrl, EventInvalidGrant); function createBaseEventOrderCancelFail(): EventOrderCancelFail { return { marketId: "", @@ -4011,6 +4070,6 @@ export const EventOrderCancelFail = { typeUrl: "/injective.exchange.v1beta1.EventOrderCancelFail", value: EventOrderCancelFail.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EventOrderCancelFail.typeUrl, EventOrderCancelFail); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/exchange/v1beta1/exchange.ts b/libs/injective-react/src/injective/exchange/v1beta1/exchange.ts index a91677d5..8e19e678 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/exchange.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/exchange.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { OracleType } from "../../oracle/v1beta1/oracle"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum AtomicMarketOrderAccessLevel { Nobody = 0, /** BeginBlockerSmartContractsOnly - currently unsupported */ @@ -2391,10 +2390,11 @@ export const Params = { typeUrl: "/injective.exchange.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseMarketFeeMultiplier(): MarketFeeMultiplier { return { marketId: "", @@ -2474,9 +2474,9 @@ export const MarketFeeMultiplier = { typeUrl: "/injective.exchange.v1beta1.MarketFeeMultiplier", value: MarketFeeMultiplier.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MarketFeeMultiplier.typeUrl, MarketFeeMultiplier); function createBaseDerivativeMarket(): DerivativeMarket { return { ticker: "", @@ -2760,9 +2760,9 @@ export const DerivativeMarket = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarket", value: DerivativeMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DerivativeMarket.typeUrl, DerivativeMarket); function createBaseBinaryOptionsMarket(): BinaryOptionsMarket { return { ticker: "", @@ -3046,9 +3046,9 @@ export const BinaryOptionsMarket = { typeUrl: "/injective.exchange.v1beta1.BinaryOptionsMarket", value: BinaryOptionsMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BinaryOptionsMarket.typeUrl, BinaryOptionsMarket); function createBaseExpiryFuturesMarketInfo(): ExpiryFuturesMarketInfo { return { marketId: "", @@ -3164,9 +3164,9 @@ export const ExpiryFuturesMarketInfo = { typeUrl: "/injective.exchange.v1beta1.ExpiryFuturesMarketInfo", value: ExpiryFuturesMarketInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExpiryFuturesMarketInfo.typeUrl, ExpiryFuturesMarketInfo); function createBasePerpetualMarketInfo(): PerpetualMarketInfo { return { marketId: "", @@ -3282,9 +3282,9 @@ export const PerpetualMarketInfo = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketInfo", value: PerpetualMarketInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PerpetualMarketInfo.typeUrl, PerpetualMarketInfo); function createBasePerpetualMarketFunding(): PerpetualMarketFunding { return { cumulativeFunding: "", @@ -3376,9 +3376,9 @@ export const PerpetualMarketFunding = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketFunding", value: PerpetualMarketFunding.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PerpetualMarketFunding.typeUrl, PerpetualMarketFunding); function createBaseDerivativeMarketSettlementInfo(): DerivativeMarketSettlementInfo { return { marketId: "", @@ -3458,9 +3458,9 @@ export const DerivativeMarketSettlementInfo = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketSettlementInfo", value: DerivativeMarketSettlementInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DerivativeMarketSettlementInfo.typeUrl, DerivativeMarketSettlementInfo); function createBaseNextFundingTimestamp(): NextFundingTimestamp { return { nextTimestamp: BigInt(0) @@ -3528,9 +3528,9 @@ export const NextFundingTimestamp = { typeUrl: "/injective.exchange.v1beta1.NextFundingTimestamp", value: NextFundingTimestamp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(NextFundingTimestamp.typeUrl, NextFundingTimestamp); function createBaseMidPriceAndTOB(): MidPriceAndTOB { return { midPrice: undefined, @@ -3622,9 +3622,9 @@ export const MidPriceAndTOB = { typeUrl: "/injective.exchange.v1beta1.MidPriceAndTOB", value: MidPriceAndTOB.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MidPriceAndTOB.typeUrl, MidPriceAndTOB); function createBaseSpotMarket(): SpotMarket { return { ticker: "", @@ -3836,9 +3836,9 @@ export const SpotMarket = { typeUrl: "/injective.exchange.v1beta1.SpotMarket", value: SpotMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SpotMarket.typeUrl, SpotMarket); function createBaseDeposit(): Deposit { return { availableBalance: "", @@ -3918,9 +3918,9 @@ export const Deposit = { typeUrl: "/injective.exchange.v1beta1.Deposit", value: Deposit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); function createBaseSubaccountTradeNonce(): SubaccountTradeNonce { return { nonce: 0 @@ -3988,9 +3988,9 @@ export const SubaccountTradeNonce = { typeUrl: "/injective.exchange.v1beta1.SubaccountTradeNonce", value: SubaccountTradeNonce.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountTradeNonce.typeUrl, SubaccountTradeNonce); function createBaseOrderInfo(): OrderInfo { return { subaccountId: "", @@ -4106,9 +4106,9 @@ export const OrderInfo = { typeUrl: "/injective.exchange.v1beta1.OrderInfo", value: OrderInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderInfo.typeUrl, OrderInfo); function createBaseSpotOrder(): SpotOrder { return { marketId: "", @@ -4212,9 +4212,11 @@ export const SpotOrder = { typeUrl: "/injective.exchange.v1beta1.SpotOrder", value: SpotOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrder.typeUrl, SpotOrder); function createBaseSpotLimitOrder(): SpotLimitOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -4330,9 +4332,11 @@ export const SpotLimitOrder = { typeUrl: "/injective.exchange.v1beta1.SpotLimitOrder", value: SpotLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotLimitOrder.typeUrl, SpotLimitOrder); function createBaseSpotMarketOrder(): SpotMarketOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -4448,9 +4452,11 @@ export const SpotMarketOrder = { typeUrl: "/injective.exchange.v1beta1.SpotMarketOrder", value: SpotMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotMarketOrder.typeUrl, SpotMarketOrder); function createBaseDerivativeOrder(): DerivativeOrder { return { marketId: "", @@ -4566,9 +4572,11 @@ export const DerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.DerivativeOrder", value: DerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrder.typeUrl, DerivativeOrder); function createBaseSubaccountOrderbookMetadata(): SubaccountOrderbookMetadata { return { vanillaLimitOrderCount: 0, @@ -4696,9 +4704,9 @@ export const SubaccountOrderbookMetadata = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrderbookMetadata", value: SubaccountOrderbookMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountOrderbookMetadata.typeUrl, SubaccountOrderbookMetadata); function createBaseSubaccountOrder(): SubaccountOrder { return { price: "", @@ -4802,9 +4810,9 @@ export const SubaccountOrder = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrder", value: SubaccountOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountOrder.typeUrl, SubaccountOrder); function createBaseSubaccountOrderData(): SubaccountOrderData { return { order: undefined, @@ -4884,9 +4892,11 @@ export const SubaccountOrderData = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrderData", value: SubaccountOrderData.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountOrderData.typeUrl, SubaccountOrderData); function createBaseDerivativeLimitOrder(): DerivativeLimitOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -5014,9 +5024,11 @@ export const DerivativeLimitOrder = { typeUrl: "/injective.exchange.v1beta1.DerivativeLimitOrder", value: DerivativeLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeLimitOrder.typeUrl, DerivativeLimitOrder); function createBaseDerivativeMarketOrder(): DerivativeMarketOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -5144,9 +5156,11 @@ export const DerivativeMarketOrder = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketOrder", value: DerivativeMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketOrder.typeUrl, DerivativeMarketOrder); function createBasePosition(): Position { return { isLong: false, @@ -5262,9 +5276,9 @@ export const Position = { typeUrl: "/injective.exchange.v1beta1.Position", value: Position.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Position.typeUrl, Position); function createBaseMarketOrderIndicator(): MarketOrderIndicator { return { marketId: "", @@ -5344,9 +5358,9 @@ export const MarketOrderIndicator = { typeUrl: "/injective.exchange.v1beta1.MarketOrderIndicator", value: MarketOrderIndicator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MarketOrderIndicator.typeUrl, MarketOrderIndicator); function createBaseTradeLog(): TradeLog { return { quantity: "", @@ -5486,9 +5500,9 @@ export const TradeLog = { typeUrl: "/injective.exchange.v1beta1.TradeLog", value: TradeLog.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradeLog.typeUrl, TradeLog); function createBasePositionDelta(): PositionDelta { return { isLong: false, @@ -5592,9 +5606,9 @@ export const PositionDelta = { typeUrl: "/injective.exchange.v1beta1.PositionDelta", value: PositionDelta.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PositionDelta.typeUrl, PositionDelta); function createBaseDerivativeTradeLog(): DerivativeTradeLog { return { subaccountId: new Uint8Array(), @@ -5746,9 +5760,11 @@ export const DerivativeTradeLog = { typeUrl: "/injective.exchange.v1beta1.DerivativeTradeLog", value: DerivativeTradeLog.encode(message).finish() }; + }, + registerTypeUrl() { + PositionDelta.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeTradeLog.typeUrl, DerivativeTradeLog); function createBaseSubaccountPosition(): SubaccountPosition { return { position: undefined, @@ -5828,9 +5844,11 @@ export const SubaccountPosition = { typeUrl: "/injective.exchange.v1beta1.SubaccountPosition", value: SubaccountPosition.encode(message).finish() }; + }, + registerTypeUrl() { + Position.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountPosition.typeUrl, SubaccountPosition); function createBaseSubaccountDeposit(): SubaccountDeposit { return { subaccountId: new Uint8Array(), @@ -5910,9 +5928,11 @@ export const SubaccountDeposit = { typeUrl: "/injective.exchange.v1beta1.SubaccountDeposit", value: SubaccountDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountDeposit.typeUrl, SubaccountDeposit); function createBaseDepositUpdate(): DepositUpdate { return { denom: "", @@ -5994,9 +6014,11 @@ export const DepositUpdate = { typeUrl: "/injective.exchange.v1beta1.DepositUpdate", value: DepositUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountDeposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositUpdate.typeUrl, DepositUpdate); function createBasePointsMultiplier(): PointsMultiplier { return { makerPointsMultiplier: "", @@ -6076,9 +6098,9 @@ export const PointsMultiplier = { typeUrl: "/injective.exchange.v1beta1.PointsMultiplier", value: PointsMultiplier.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PointsMultiplier.typeUrl, PointsMultiplier); function createBaseTradingRewardCampaignBoostInfo(): TradingRewardCampaignBoostInfo { return { boostedSpotMarketIds: [], @@ -6190,9 +6212,11 @@ export const TradingRewardCampaignBoostInfo = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignBoostInfo", value: TradingRewardCampaignBoostInfo.encode(message).finish() }; + }, + registerTypeUrl() { + PointsMultiplier.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignBoostInfo.typeUrl, TradingRewardCampaignBoostInfo); function createBaseCampaignRewardPool(): CampaignRewardPool { return { startTimestamp: BigInt(0), @@ -6274,9 +6298,11 @@ export const CampaignRewardPool = { typeUrl: "/injective.exchange.v1beta1.CampaignRewardPool", value: CampaignRewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CampaignRewardPool.typeUrl, CampaignRewardPool); function createBaseTradingRewardCampaignInfo(): TradingRewardCampaignInfo { return { campaignDurationSeconds: BigInt(0), @@ -6384,9 +6410,11 @@ export const TradingRewardCampaignInfo = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignInfo", value: TradingRewardCampaignInfo.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignBoostInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignInfo.typeUrl, TradingRewardCampaignInfo); function createBaseFeeDiscountTierInfo(): FeeDiscountTierInfo { return { makerDiscountRate: "", @@ -6490,9 +6518,9 @@ export const FeeDiscountTierInfo = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountTierInfo", value: FeeDiscountTierInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeeDiscountTierInfo.typeUrl, FeeDiscountTierInfo); function createBaseFeeDiscountSchedule(): FeeDiscountSchedule { return { bucketCount: BigInt(0), @@ -6614,9 +6642,11 @@ export const FeeDiscountSchedule = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountSchedule", value: FeeDiscountSchedule.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountTierInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountSchedule.typeUrl, FeeDiscountSchedule); function createBaseFeeDiscountTierTTL(): FeeDiscountTierTTL { return { tier: BigInt(0), @@ -6696,9 +6726,9 @@ export const FeeDiscountTierTTL = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountTierTTL", value: FeeDiscountTierTTL.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeeDiscountTierTTL.typeUrl, FeeDiscountTierTTL); function createBaseVolumeRecord(): VolumeRecord { return { makerVolume: "", @@ -6778,9 +6808,9 @@ export const VolumeRecord = { typeUrl: "/injective.exchange.v1beta1.VolumeRecord", value: VolumeRecord.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VolumeRecord.typeUrl, VolumeRecord); function createBaseAccountRewards(): AccountRewards { return { account: "", @@ -6862,9 +6892,11 @@ export const AccountRewards = { typeUrl: "/injective.exchange.v1beta1.AccountRewards", value: AccountRewards.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AccountRewards.typeUrl, AccountRewards); function createBaseTradeRecords(): TradeRecords { return { marketId: "", @@ -6946,9 +6978,11 @@ export const TradeRecords = { typeUrl: "/injective.exchange.v1beta1.TradeRecords", value: TradeRecords.encode(message).finish() }; + }, + registerTypeUrl() { + TradeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradeRecords.typeUrl, TradeRecords); function createBaseSubaccountIDs(): SubaccountIDs { return { subaccountIds: [] @@ -7018,9 +7052,9 @@ export const SubaccountIDs = { typeUrl: "/injective.exchange.v1beta1.SubaccountIDs", value: SubaccountIDs.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountIDs.typeUrl, SubaccountIDs); function createBaseTradeRecord(): TradeRecord { return { timestamp: BigInt(0), @@ -7112,9 +7146,9 @@ export const TradeRecord = { typeUrl: "/injective.exchange.v1beta1.TradeRecord", value: TradeRecord.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradeRecord.typeUrl, TradeRecord); function createBaseLevel(): Level { return { p: "", @@ -7194,9 +7228,9 @@ export const Level = { typeUrl: "/injective.exchange.v1beta1.Level", value: Level.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Level.typeUrl, Level); function createBaseAggregateSubaccountVolumeRecord(): AggregateSubaccountVolumeRecord { return { subaccountId: "", @@ -7278,9 +7312,11 @@ export const AggregateSubaccountVolumeRecord = { typeUrl: "/injective.exchange.v1beta1.AggregateSubaccountVolumeRecord", value: AggregateSubaccountVolumeRecord.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AggregateSubaccountVolumeRecord.typeUrl, AggregateSubaccountVolumeRecord); function createBaseAggregateAccountVolumeRecord(): AggregateAccountVolumeRecord { return { account: "", @@ -7362,9 +7398,11 @@ export const AggregateAccountVolumeRecord = { typeUrl: "/injective.exchange.v1beta1.AggregateAccountVolumeRecord", value: AggregateAccountVolumeRecord.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AggregateAccountVolumeRecord.typeUrl, AggregateAccountVolumeRecord); function createBaseMarketVolume(): MarketVolume { return { marketId: "", @@ -7444,9 +7482,11 @@ export const MarketVolume = { typeUrl: "/injective.exchange.v1beta1.MarketVolume", value: MarketVolume.encode(message).finish() }; + }, + registerTypeUrl() { + VolumeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MarketVolume.typeUrl, MarketVolume); function createBaseDenomDecimals(): DenomDecimals { return { denom: "", @@ -7526,9 +7566,9 @@ export const DenomDecimals = { typeUrl: "/injective.exchange.v1beta1.DenomDecimals", value: DenomDecimals.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DenomDecimals.typeUrl, DenomDecimals); function createBaseGrantAuthorization(): GrantAuthorization { return { grantee: "", @@ -7608,9 +7648,9 @@ export const GrantAuthorization = { typeUrl: "/injective.exchange.v1beta1.GrantAuthorization", value: GrantAuthorization.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GrantAuthorization.typeUrl, GrantAuthorization); function createBaseActiveGrant(): ActiveGrant { return { granter: "", @@ -7690,9 +7730,9 @@ export const ActiveGrant = { typeUrl: "/injective.exchange.v1beta1.ActiveGrant", value: ActiveGrant.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ActiveGrant.typeUrl, ActiveGrant); function createBaseEffectiveGrant(): EffectiveGrant { return { granter: "", @@ -7784,6 +7824,6 @@ export const EffectiveGrant = { typeUrl: "/injective.exchange.v1beta1.EffectiveGrant", value: EffectiveGrant.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EffectiveGrant.typeUrl, EffectiveGrant); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/exchange/v1beta1/genesis.ts b/libs/injective-react/src/injective/exchange/v1beta1/genesis.ts index 9e4a2e86..9c196ea6 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/genesis.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, SpotMarket, SpotMarketAmino, DerivativeMarket, DerivativeMarketAmino, PerpetualMarketInfo, PerpetualMarketInfoAmino, DerivativeMarketSettlementInfo, DerivativeMarketSettlementInfoAmino, TradingRewardCampaignInfo, TradingRewardCampaignInfoAmino, CampaignRewardPool, CampaignRewardPoolAmino, FeeDiscountSchedule, FeeDiscountScheduleAmino, TradeRecords, TradeRecordsAmino, BinaryOptionsMarket, BinaryOptionsMarketAmino, DenomDecimals, DenomDecimalsAmino, MarketFeeMultiplier, MarketFeeMultiplierAmino, AggregateSubaccountVolumeRecord, AggregateSubaccountVolumeRecordAmino, MarketVolume, MarketVolumeAmino, FeeDiscountTierTTL, FeeDiscountTierTTLAmino, SpotLimitOrder, SpotLimitOrderAmino, DerivativeLimitOrder, DerivativeLimitOrderAmino, DerivativeMarketOrder, DerivativeMarketOrderAmino, Deposit, DepositAmino, Position, PositionAmino, SubaccountTradeNonce, SubaccountTradeNonceAmino, ExpiryFuturesMarketInfo, ExpiryFuturesMarketInfoAmino, PerpetualMarketFunding, PerpetualMarketFundingAmino, GrantAuthorization, GrantAuthorizationAmino, ActiveGrant, ActiveGrantAmino } from "./exchange"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the exchange module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to exchange. */ @@ -1017,9 +1016,39 @@ export const GenesisState = { typeUrl: "/injective.exchange.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + SpotMarket.registerTypeUrl(); + DerivativeMarket.registerTypeUrl(); + SpotOrderBook.registerTypeUrl(); + DerivativeOrderBook.registerTypeUrl(); + Balance.registerTypeUrl(); + DerivativePosition.registerTypeUrl(); + SubaccountNonce.registerTypeUrl(); + ExpiryFuturesMarketInfoState.registerTypeUrl(); + PerpetualMarketInfo.registerTypeUrl(); + PerpetualMarketFundingState.registerTypeUrl(); + DerivativeMarketSettlementInfo.registerTypeUrl(); + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); + TradingRewardCampaignAccountPoints.registerTypeUrl(); + FeeDiscountSchedule.registerTypeUrl(); + FeeDiscountAccountTierTTL.registerTypeUrl(); + FeeDiscountBucketVolumeAccounts.registerTypeUrl(); + TradingRewardCampaignAccountPendingPoints.registerTypeUrl(); + TradeRecords.registerTypeUrl(); + BinaryOptionsMarket.registerTypeUrl(); + DenomDecimals.registerTypeUrl(); + ConditionalDerivativeOrderBook.registerTypeUrl(); + MarketFeeMultiplier.registerTypeUrl(); + OrderbookSequence.registerTypeUrl(); + AggregateSubaccountVolumeRecord.registerTypeUrl(); + MarketVolume.registerTypeUrl(); + FullGrantAuthorizations.registerTypeUrl(); + FullActiveGrant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseOrderbookSequence(): OrderbookSequence { return { sequence: BigInt(0), @@ -1099,9 +1128,9 @@ export const OrderbookSequence = { typeUrl: "/injective.exchange.v1beta1.OrderbookSequence", value: OrderbookSequence.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderbookSequence.typeUrl, OrderbookSequence); function createBaseFeeDiscountAccountTierTTL(): FeeDiscountAccountTierTTL { return { account: "", @@ -1181,9 +1210,11 @@ export const FeeDiscountAccountTierTTL = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountAccountTierTTL", value: FeeDiscountAccountTierTTL.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountTierTTL.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountAccountTierTTL.typeUrl, FeeDiscountAccountTierTTL); function createBaseFeeDiscountBucketVolumeAccounts(): FeeDiscountBucketVolumeAccounts { return { bucketStartTimestamp: BigInt(0), @@ -1265,9 +1296,11 @@ export const FeeDiscountBucketVolumeAccounts = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountBucketVolumeAccounts", value: FeeDiscountBucketVolumeAccounts.encode(message).finish() }; + }, + registerTypeUrl() { + AccountVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountBucketVolumeAccounts.typeUrl, FeeDiscountBucketVolumeAccounts); function createBaseAccountVolume(): AccountVolume { return { account: "", @@ -1347,9 +1380,9 @@ export const AccountVolume = { typeUrl: "/injective.exchange.v1beta1.AccountVolume", value: AccountVolume.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccountVolume.typeUrl, AccountVolume); function createBaseTradingRewardCampaignAccountPoints(): TradingRewardCampaignAccountPoints { return { account: "", @@ -1429,9 +1462,9 @@ export const TradingRewardCampaignAccountPoints = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignAccountPoints", value: TradingRewardCampaignAccountPoints.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradingRewardCampaignAccountPoints.typeUrl, TradingRewardCampaignAccountPoints); function createBaseTradingRewardCampaignAccountPendingPoints(): TradingRewardCampaignAccountPendingPoints { return { rewardPoolStartTimestamp: BigInt(0), @@ -1513,9 +1546,11 @@ export const TradingRewardCampaignAccountPendingPoints = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignAccountPendingPoints", value: TradingRewardCampaignAccountPendingPoints.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignAccountPoints.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignAccountPendingPoints.typeUrl, TradingRewardCampaignAccountPendingPoints); function createBaseSpotOrderBook(): SpotOrderBook { return { marketId: "", @@ -1609,9 +1644,11 @@ export const SpotOrderBook = { typeUrl: "/injective.exchange.v1beta1.SpotOrderBook", value: SpotOrderBook.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrderBook.typeUrl, SpotOrderBook); function createBaseDerivativeOrderBook(): DerivativeOrderBook { return { marketId: "", @@ -1705,9 +1742,11 @@ export const DerivativeOrderBook = { typeUrl: "/injective.exchange.v1beta1.DerivativeOrderBook", value: DerivativeOrderBook.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrderBook.typeUrl, DerivativeOrderBook); function createBaseConditionalDerivativeOrderBook(): ConditionalDerivativeOrderBook { return { marketId: "", @@ -1831,9 +1870,12 @@ export const ConditionalDerivativeOrderBook = { typeUrl: "/injective.exchange.v1beta1.ConditionalDerivativeOrderBook", value: ConditionalDerivativeOrderBook.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); + DerivativeMarketOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConditionalDerivativeOrderBook.typeUrl, ConditionalDerivativeOrderBook); function createBaseBalance(): Balance { return { subaccountId: "", @@ -1925,9 +1967,11 @@ export const Balance = { typeUrl: "/injective.exchange.v1beta1.Balance", value: Balance.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Balance.typeUrl, Balance); function createBaseDerivativePosition(): DerivativePosition { return { subaccountId: "", @@ -2019,9 +2063,11 @@ export const DerivativePosition = { typeUrl: "/injective.exchange.v1beta1.DerivativePosition", value: DerivativePosition.encode(message).finish() }; + }, + registerTypeUrl() { + Position.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativePosition.typeUrl, DerivativePosition); function createBaseSubaccountNonce(): SubaccountNonce { return { subaccountId: "", @@ -2101,9 +2147,11 @@ export const SubaccountNonce = { typeUrl: "/injective.exchange.v1beta1.SubaccountNonce", value: SubaccountNonce.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountTradeNonce.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountNonce.typeUrl, SubaccountNonce); function createBaseExpiryFuturesMarketInfoState(): ExpiryFuturesMarketInfoState { return { marketId: "", @@ -2183,9 +2231,11 @@ export const ExpiryFuturesMarketInfoState = { typeUrl: "/injective.exchange.v1beta1.ExpiryFuturesMarketInfoState", value: ExpiryFuturesMarketInfoState.encode(message).finish() }; + }, + registerTypeUrl() { + ExpiryFuturesMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExpiryFuturesMarketInfoState.typeUrl, ExpiryFuturesMarketInfoState); function createBasePerpetualMarketFundingState(): PerpetualMarketFundingState { return { marketId: "", @@ -2265,9 +2315,11 @@ export const PerpetualMarketFundingState = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketFundingState", value: PerpetualMarketFundingState.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PerpetualMarketFundingState.typeUrl, PerpetualMarketFundingState); function createBaseFullGrantAuthorizations(): FullGrantAuthorizations { return { granter: "", @@ -2373,9 +2425,11 @@ export const FullGrantAuthorizations = { typeUrl: "/injective.exchange.v1beta1.FullGrantAuthorizations", value: FullGrantAuthorizations.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FullGrantAuthorizations.typeUrl, FullGrantAuthorizations); function createBaseFullActiveGrant(): FullActiveGrant { return { grantee: "", @@ -2455,6 +2509,8 @@ export const FullActiveGrant = { typeUrl: "/injective.exchange.v1beta1.FullActiveGrant", value: FullActiveGrant.encode(message).finish() }; + }, + registerTypeUrl() { + ActiveGrant.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(FullActiveGrant.typeUrl, FullActiveGrant); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/exchange/v1beta1/proposal.ts b/libs/injective-react/src/injective/exchange/v1beta1/proposal.ts index 320d2ad9..98f3707d 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/proposal.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/proposal.ts @@ -1247,10 +1247,13 @@ export const SpotMarketParamUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.SpotMarketParamUpdateProposal", value: SpotMarketParamUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SpotMarketParamUpdateProposal.typeUrl, SpotMarketParamUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketParamUpdateProposal.aminoType, SpotMarketParamUpdateProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotMarketParamUpdateProposal.typeUrl, SpotMarketParamUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketParamUpdateProposal.aminoType, SpotMarketParamUpdateProposal.typeUrl); function createBaseExchangeEnableProposal(): ExchangeEnableProposal { return { title: "", @@ -1349,10 +1352,9 @@ export const ExchangeEnableProposal = { typeUrl: "/injective.exchange.v1beta1.ExchangeEnableProposal", value: ExchangeEnableProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExchangeEnableProposal.typeUrl, ExchangeEnableProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ExchangeEnableProposal.aminoType, ExchangeEnableProposal.typeUrl); function createBaseBatchExchangeModificationProposal(): BatchExchangeModificationProposal { return { title: "", @@ -1587,10 +1589,23 @@ export const BatchExchangeModificationProposal = { typeUrl: "/injective.exchange.v1beta1.BatchExchangeModificationProposal", value: BatchExchangeModificationProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchExchangeModificationProposal.typeUrl, BatchExchangeModificationProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchExchangeModificationProposal.aminoType, BatchExchangeModificationProposal.typeUrl); + SpotMarketParamUpdateProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchExchangeModificationProposal.typeUrl, BatchExchangeModificationProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchExchangeModificationProposal.aminoType, BatchExchangeModificationProposal.typeUrl); function createBaseSpotMarketLaunchProposal(): SpotMarketLaunchProposal { return { title: "", @@ -1785,10 +1800,13 @@ export const SpotMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.SpotMarketLaunchProposal", value: SpotMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SpotMarketLaunchProposal.typeUrl, SpotMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketLaunchProposal.aminoType, SpotMarketLaunchProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotMarketLaunchProposal.typeUrl, SpotMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketLaunchProposal.aminoType, SpotMarketLaunchProposal.typeUrl); function createBasePerpetualMarketLaunchProposal(): PerpetualMarketLaunchProposal { return { title: "", @@ -2043,10 +2061,13 @@ export const PerpetualMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketLaunchProposal", value: PerpetualMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PerpetualMarketLaunchProposal.typeUrl, PerpetualMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(PerpetualMarketLaunchProposal.aminoType, PerpetualMarketLaunchProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PerpetualMarketLaunchProposal.typeUrl, PerpetualMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(PerpetualMarketLaunchProposal.aminoType, PerpetualMarketLaunchProposal.typeUrl); function createBaseBinaryOptionsMarketLaunchProposal(): BinaryOptionsMarketLaunchProposal { return { title: "", @@ -2313,10 +2334,12 @@ export const BinaryOptionsMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.BinaryOptionsMarketLaunchProposal", value: BinaryOptionsMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BinaryOptionsMarketLaunchProposal.typeUrl, BinaryOptionsMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketLaunchProposal.aminoType, BinaryOptionsMarketLaunchProposal.typeUrl); } }; -GlobalDecoderRegistry.register(BinaryOptionsMarketLaunchProposal.typeUrl, BinaryOptionsMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketLaunchProposal.aminoType, BinaryOptionsMarketLaunchProposal.typeUrl); function createBaseExpiryFuturesMarketLaunchProposal(): ExpiryFuturesMarketLaunchProposal { return { title: "", @@ -2583,10 +2606,13 @@ export const ExpiryFuturesMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.ExpiryFuturesMarketLaunchProposal", value: ExpiryFuturesMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ExpiryFuturesMarketLaunchProposal.typeUrl, ExpiryFuturesMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ExpiryFuturesMarketLaunchProposal.aminoType, ExpiryFuturesMarketLaunchProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExpiryFuturesMarketLaunchProposal.typeUrl, ExpiryFuturesMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ExpiryFuturesMarketLaunchProposal.aminoType, ExpiryFuturesMarketLaunchProposal.typeUrl); function createBaseDerivativeMarketParamUpdateProposal(): DerivativeMarketParamUpdateProposal { return { title: "", @@ -2853,10 +2879,14 @@ export const DerivativeMarketParamUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketParamUpdateProposal", value: DerivativeMarketParamUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(DerivativeMarketParamUpdateProposal.typeUrl, DerivativeMarketParamUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(DerivativeMarketParamUpdateProposal.aminoType, DerivativeMarketParamUpdateProposal.typeUrl); + OracleParams.registerTypeUrl(); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketParamUpdateProposal.typeUrl, DerivativeMarketParamUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(DerivativeMarketParamUpdateProposal.aminoType, DerivativeMarketParamUpdateProposal.typeUrl); function createBaseAdminInfo(): AdminInfo { return { admin: "", @@ -2936,9 +2966,9 @@ export const AdminInfo = { typeUrl: "/injective.exchange.v1beta1.AdminInfo", value: AdminInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AdminInfo.typeUrl, AdminInfo); function createBaseMarketForcedSettlementProposal(): MarketForcedSettlementProposal { return { title: "", @@ -3049,10 +3079,12 @@ export const MarketForcedSettlementProposal = { typeUrl: "/injective.exchange.v1beta1.MarketForcedSettlementProposal", value: MarketForcedSettlementProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(MarketForcedSettlementProposal.typeUrl, MarketForcedSettlementProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(MarketForcedSettlementProposal.aminoType, MarketForcedSettlementProposal.typeUrl); } }; -GlobalDecoderRegistry.register(MarketForcedSettlementProposal.typeUrl, MarketForcedSettlementProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MarketForcedSettlementProposal.aminoType, MarketForcedSettlementProposal.typeUrl); function createBaseUpdateDenomDecimalsProposal(): UpdateDenomDecimalsProposal { return { title: "", @@ -3153,10 +3185,13 @@ export const UpdateDenomDecimalsProposal = { typeUrl: "/injective.exchange.v1beta1.UpdateDenomDecimalsProposal", value: UpdateDenomDecimalsProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateDenomDecimalsProposal.typeUrl, UpdateDenomDecimalsProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateDenomDecimalsProposal.aminoType, UpdateDenomDecimalsProposal.typeUrl); + DenomDecimals.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UpdateDenomDecimalsProposal.typeUrl, UpdateDenomDecimalsProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateDenomDecimalsProposal.aminoType, UpdateDenomDecimalsProposal.typeUrl); function createBaseBinaryOptionsMarketParamUpdateProposal(): BinaryOptionsMarketParamUpdateProposal { return { title: "", @@ -3411,10 +3446,13 @@ export const BinaryOptionsMarketParamUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.BinaryOptionsMarketParamUpdateProposal", value: BinaryOptionsMarketParamUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BinaryOptionsMarketParamUpdateProposal.typeUrl, BinaryOptionsMarketParamUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketParamUpdateProposal.aminoType, BinaryOptionsMarketParamUpdateProposal.typeUrl); + ProviderOracleParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BinaryOptionsMarketParamUpdateProposal.typeUrl, BinaryOptionsMarketParamUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketParamUpdateProposal.aminoType, BinaryOptionsMarketParamUpdateProposal.typeUrl); function createBaseProviderOracleParams(): ProviderOracleParams { return { symbol: "", @@ -3518,9 +3556,9 @@ export const ProviderOracleParams = { typeUrl: "/injective.exchange.v1beta1.ProviderOracleParams", value: ProviderOracleParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProviderOracleParams.typeUrl, ProviderOracleParams); function createBaseOracleParams(): OracleParams { return { oracleBase: "", @@ -3624,9 +3662,9 @@ export const OracleParams = { typeUrl: "/injective.exchange.v1beta1.OracleParams", value: OracleParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleParams.typeUrl, OracleParams); function createBaseTradingRewardCampaignLaunchProposal(): TradingRewardCampaignLaunchProposal { return { title: "", @@ -3739,10 +3777,14 @@ export const TradingRewardCampaignLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignLaunchProposal", value: TradingRewardCampaignLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TradingRewardCampaignLaunchProposal.typeUrl, TradingRewardCampaignLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignLaunchProposal.aminoType, TradingRewardCampaignLaunchProposal.typeUrl); + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignLaunchProposal.typeUrl, TradingRewardCampaignLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignLaunchProposal.aminoType, TradingRewardCampaignLaunchProposal.typeUrl); function createBaseTradingRewardCampaignUpdateProposal(): TradingRewardCampaignUpdateProposal { return { title: "", @@ -3869,10 +3911,14 @@ export const TradingRewardCampaignUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignUpdateProposal", value: TradingRewardCampaignUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TradingRewardCampaignUpdateProposal.typeUrl, TradingRewardCampaignUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignUpdateProposal.aminoType, TradingRewardCampaignUpdateProposal.typeUrl); + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignUpdateProposal.typeUrl, TradingRewardCampaignUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignUpdateProposal.aminoType, TradingRewardCampaignUpdateProposal.typeUrl); function createBaseRewardPointUpdate(): RewardPointUpdate { return { accountAddress: "", @@ -3952,9 +3998,9 @@ export const RewardPointUpdate = { typeUrl: "/injective.exchange.v1beta1.RewardPointUpdate", value: RewardPointUpdate.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RewardPointUpdate.typeUrl, RewardPointUpdate); function createBaseTradingRewardPendingPointsUpdateProposal(): TradingRewardPendingPointsUpdateProposal { return { title: "", @@ -4067,10 +4113,13 @@ export const TradingRewardPendingPointsUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.TradingRewardPendingPointsUpdateProposal", value: TradingRewardPendingPointsUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TradingRewardPendingPointsUpdateProposal.typeUrl, TradingRewardPendingPointsUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardPendingPointsUpdateProposal.aminoType, TradingRewardPendingPointsUpdateProposal.typeUrl); + RewardPointUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardPendingPointsUpdateProposal.typeUrl, TradingRewardPendingPointsUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardPendingPointsUpdateProposal.aminoType, TradingRewardPendingPointsUpdateProposal.typeUrl); function createBaseFeeDiscountProposal(): FeeDiscountProposal { return { title: "", @@ -4169,10 +4218,13 @@ export const FeeDiscountProposal = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountProposal", value: FeeDiscountProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(FeeDiscountProposal.typeUrl, FeeDiscountProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(FeeDiscountProposal.aminoType, FeeDiscountProposal.typeUrl); + FeeDiscountSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountProposal.typeUrl, FeeDiscountProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(FeeDiscountProposal.aminoType, FeeDiscountProposal.typeUrl); function createBaseBatchCommunityPoolSpendProposal(): BatchCommunityPoolSpendProposal { return { title: "", @@ -4273,10 +4325,13 @@ export const BatchCommunityPoolSpendProposal = { typeUrl: "/injective.exchange.v1beta1.BatchCommunityPoolSpendProposal", value: BatchCommunityPoolSpendProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCommunityPoolSpendProposal.typeUrl, BatchCommunityPoolSpendProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCommunityPoolSpendProposal.aminoType, BatchCommunityPoolSpendProposal.typeUrl); + CommunityPoolSpendProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchCommunityPoolSpendProposal.typeUrl, BatchCommunityPoolSpendProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCommunityPoolSpendProposal.aminoType, BatchCommunityPoolSpendProposal.typeUrl); function createBaseAtomicMarketOrderFeeMultiplierScheduleProposal(): AtomicMarketOrderFeeMultiplierScheduleProposal { return { title: "", @@ -4377,7 +4432,10 @@ export const AtomicMarketOrderFeeMultiplierScheduleProposal = { typeUrl: "/injective.exchange.v1beta1.AtomicMarketOrderFeeMultiplierScheduleProposal", value: AtomicMarketOrderFeeMultiplierScheduleProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl, AtomicMarketOrderFeeMultiplierScheduleProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(AtomicMarketOrderFeeMultiplierScheduleProposal.aminoType, AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl); + MarketFeeMultiplier.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl, AtomicMarketOrderFeeMultiplierScheduleProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(AtomicMarketOrderFeeMultiplierScheduleProposal.aminoType, AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/exchange/v1beta1/query.rpc.func.ts b/libs/injective-react/src/injective/exchange/v1beta1/query.rpc.func.ts index f8974bc3..3a1ce265 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetQueryExchangeParams = (clientResolver?: RpcResolver) => bu decode: QueryExchangeParamsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "QueryExchangeParams", - clientResolver + clientResolver, + deps: [QueryExchangeParamsRequest, QueryExchangeParamsResponse] }); export const useGetQueryExchangeParams = buildUseQuery({ builderQueryFn: createGetQueryExchangeParams, @@ -17,7 +18,8 @@ export const createGetSubaccountDeposits = (clientResolver?: RpcResolver) => bui decode: QuerySubaccountDepositsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountDeposits", - clientResolver + clientResolver, + deps: [QuerySubaccountDepositsRequest, QuerySubaccountDepositsResponse] }); export const useGetSubaccountDeposits = buildUseQuery({ builderQueryFn: createGetSubaccountDeposits, @@ -28,7 +30,8 @@ export const createGetSubaccountDeposit = (clientResolver?: RpcResolver) => buil decode: QuerySubaccountDepositResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountDeposit", - clientResolver + clientResolver, + deps: [QuerySubaccountDepositRequest, QuerySubaccountDepositResponse] }); export const useGetSubaccountDeposit = buildUseQuery({ builderQueryFn: createGetSubaccountDeposit, @@ -39,7 +42,8 @@ export const createGetExchangeBalances = (clientResolver?: RpcResolver) => build decode: QueryExchangeBalancesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ExchangeBalances", - clientResolver + clientResolver, + deps: [QueryExchangeBalancesRequest, QueryExchangeBalancesResponse] }); export const useGetExchangeBalances = buildUseQuery({ builderQueryFn: createGetExchangeBalances, @@ -50,7 +54,8 @@ export const createGetAggregateVolume = (clientResolver?: RpcResolver) => buildQ decode: QueryAggregateVolumeResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateVolume", - clientResolver + clientResolver, + deps: [QueryAggregateVolumeRequest, QueryAggregateVolumeResponse] }); export const useGetAggregateVolume = buildUseQuery({ builderQueryFn: createGetAggregateVolume, @@ -61,7 +66,8 @@ export const createGetAggregateVolumes = (clientResolver?: RpcResolver) => build decode: QueryAggregateVolumesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateVolumes", - clientResolver + clientResolver, + deps: [QueryAggregateVolumesRequest, QueryAggregateVolumesResponse] }); export const useGetAggregateVolumes = buildUseQuery({ builderQueryFn: createGetAggregateVolumes, @@ -72,7 +78,8 @@ export const createGetAggregateMarketVolume = (clientResolver?: RpcResolver) => decode: QueryAggregateMarketVolumeResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateMarketVolume", - clientResolver + clientResolver, + deps: [QueryAggregateMarketVolumeRequest, QueryAggregateMarketVolumeResponse] }); export const useGetAggregateMarketVolume = buildUseQuery({ builderQueryFn: createGetAggregateMarketVolume, @@ -83,7 +90,8 @@ export const createGetAggregateMarketVolumes = (clientResolver?: RpcResolver) => decode: QueryAggregateMarketVolumesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateMarketVolumes", - clientResolver + clientResolver, + deps: [QueryAggregateMarketVolumesRequest, QueryAggregateMarketVolumesResponse] }); export const useGetAggregateMarketVolumes = buildUseQuery({ builderQueryFn: createGetAggregateMarketVolumes, @@ -94,7 +102,8 @@ export const createGetDenomDecimal = (clientResolver?: RpcResolver) => buildQuer decode: QueryDenomDecimalResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DenomDecimal", - clientResolver + clientResolver, + deps: [QueryDenomDecimalRequest, QueryDenomDecimalResponse] }); export const useGetDenomDecimal = buildUseQuery({ builderQueryFn: createGetDenomDecimal, @@ -105,7 +114,8 @@ export const createGetDenomDecimals = (clientResolver?: RpcResolver) => buildQue decode: QueryDenomDecimalsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DenomDecimals", - clientResolver + clientResolver, + deps: [QueryDenomDecimalsRequest, QueryDenomDecimalsResponse] }); export const useGetDenomDecimals = buildUseQuery({ builderQueryFn: createGetDenomDecimals, @@ -116,7 +126,8 @@ export const createGetSpotMarkets = (clientResolver?: RpcResolver) => buildQuery decode: QuerySpotMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotMarkets", - clientResolver + clientResolver, + deps: [QuerySpotMarketsRequest, QuerySpotMarketsResponse] }); export const useGetSpotMarkets = buildUseQuery({ builderQueryFn: createGetSpotMarkets, @@ -127,7 +138,8 @@ export const createGetSpotMarket = (clientResolver?: RpcResolver) => buildQuery< decode: QuerySpotMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotMarket", - clientResolver + clientResolver, + deps: [QuerySpotMarketRequest, QuerySpotMarketResponse] }); export const useGetSpotMarket = buildUseQuery({ builderQueryFn: createGetSpotMarket, @@ -138,7 +150,8 @@ export const createGetFullSpotMarkets = (clientResolver?: RpcResolver) => buildQ decode: QueryFullSpotMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FullSpotMarkets", - clientResolver + clientResolver, + deps: [QueryFullSpotMarketsRequest, QueryFullSpotMarketsResponse] }); export const useGetFullSpotMarkets = buildUseQuery({ builderQueryFn: createGetFullSpotMarkets, @@ -149,7 +162,8 @@ export const createGetFullSpotMarket = (clientResolver?: RpcResolver) => buildQu decode: QueryFullSpotMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FullSpotMarket", - clientResolver + clientResolver, + deps: [QueryFullSpotMarketRequest, QueryFullSpotMarketResponse] }); export const useGetFullSpotMarket = buildUseQuery({ builderQueryFn: createGetFullSpotMarket, @@ -160,7 +174,8 @@ export const createGetSpotOrderbook = (clientResolver?: RpcResolver) => buildQue decode: QuerySpotOrderbookResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotOrderbook", - clientResolver + clientResolver, + deps: [QuerySpotOrderbookRequest, QuerySpotOrderbookResponse] }); export const useGetSpotOrderbook = buildUseQuery({ builderQueryFn: createGetSpotOrderbook, @@ -171,7 +186,8 @@ export const createGetTraderSpotOrders = (clientResolver?: RpcResolver) => build decode: QueryTraderSpotOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderSpotOrders", - clientResolver + clientResolver, + deps: [QueryTraderSpotOrdersRequest, QueryTraderSpotOrdersResponse] }); export const useGetTraderSpotOrders = buildUseQuery({ builderQueryFn: createGetTraderSpotOrders, @@ -182,7 +198,8 @@ export const createGetAccountAddressSpotOrders = (clientResolver?: RpcResolver) decode: QueryAccountAddressSpotOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AccountAddressSpotOrders", - clientResolver + clientResolver, + deps: [QueryAccountAddressSpotOrdersRequest, QueryAccountAddressSpotOrdersResponse] }); export const useGetAccountAddressSpotOrders = buildUseQuery({ builderQueryFn: createGetAccountAddressSpotOrders, @@ -193,7 +210,8 @@ export const createGetSpotOrdersByHashes = (clientResolver?: RpcResolver) => bui decode: QuerySpotOrdersByHashesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotOrdersByHashes", - clientResolver + clientResolver, + deps: [QuerySpotOrdersByHashesRequest, QuerySpotOrdersByHashesResponse] }); export const useGetSpotOrdersByHashes = buildUseQuery({ builderQueryFn: createGetSpotOrdersByHashes, @@ -204,7 +222,8 @@ export const createGetSubaccountOrders = (clientResolver?: RpcResolver) => build decode: QuerySubaccountOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountOrders", - clientResolver + clientResolver, + deps: [QuerySubaccountOrdersRequest, QuerySubaccountOrdersResponse] }); export const useGetSubaccountOrders = buildUseQuery({ builderQueryFn: createGetSubaccountOrders, @@ -215,7 +234,8 @@ export const createGetTraderSpotTransientOrders = (clientResolver?: RpcResolver) decode: QueryTraderSpotOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderSpotTransientOrders", - clientResolver + clientResolver, + deps: [QueryTraderSpotOrdersRequest, QueryTraderSpotOrdersResponse] }); export const useGetTraderSpotTransientOrders = buildUseQuery({ builderQueryFn: createGetTraderSpotTransientOrders, @@ -226,7 +246,8 @@ export const createGetSpotMidPriceAndTOB = (clientResolver?: RpcResolver) => bui decode: QuerySpotMidPriceAndTOBResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotMidPriceAndTOB", - clientResolver + clientResolver, + deps: [QuerySpotMidPriceAndTOBRequest, QuerySpotMidPriceAndTOBResponse] }); export const useGetSpotMidPriceAndTOB = buildUseQuery({ builderQueryFn: createGetSpotMidPriceAndTOB, @@ -237,7 +258,8 @@ export const createGetDerivativeMidPriceAndTOB = (clientResolver?: RpcResolver) decode: QueryDerivativeMidPriceAndTOBResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMidPriceAndTOB", - clientResolver + clientResolver, + deps: [QueryDerivativeMidPriceAndTOBRequest, QueryDerivativeMidPriceAndTOBResponse] }); export const useGetDerivativeMidPriceAndTOB = buildUseQuery({ builderQueryFn: createGetDerivativeMidPriceAndTOB, @@ -248,7 +270,8 @@ export const createGetDerivativeOrderbook = (clientResolver?: RpcResolver) => bu decode: QueryDerivativeOrderbookResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeOrderbook", - clientResolver + clientResolver, + deps: [QueryDerivativeOrderbookRequest, QueryDerivativeOrderbookResponse] }); export const useGetDerivativeOrderbook = buildUseQuery({ builderQueryFn: createGetDerivativeOrderbook, @@ -259,7 +282,8 @@ export const createGetTraderDerivativeOrders = (clientResolver?: RpcResolver) => decode: QueryTraderDerivativeOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderDerivativeOrders", - clientResolver + clientResolver, + deps: [QueryTraderDerivativeOrdersRequest, QueryTraderDerivativeOrdersResponse] }); export const useGetTraderDerivativeOrders = buildUseQuery({ builderQueryFn: createGetTraderDerivativeOrders, @@ -270,7 +294,8 @@ export const createGetAccountAddressDerivativeOrders = (clientResolver?: RpcReso decode: QueryAccountAddressDerivativeOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AccountAddressDerivativeOrders", - clientResolver + clientResolver, + deps: [QueryAccountAddressDerivativeOrdersRequest, QueryAccountAddressDerivativeOrdersResponse] }); export const useGetAccountAddressDerivativeOrders = buildUseQuery({ builderQueryFn: createGetAccountAddressDerivativeOrders, @@ -281,7 +306,8 @@ export const createGetDerivativeOrdersByHashes = (clientResolver?: RpcResolver) decode: QueryDerivativeOrdersByHashesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeOrdersByHashes", - clientResolver + clientResolver, + deps: [QueryDerivativeOrdersByHashesRequest, QueryDerivativeOrdersByHashesResponse] }); export const useGetDerivativeOrdersByHashes = buildUseQuery({ builderQueryFn: createGetDerivativeOrdersByHashes, @@ -292,7 +318,8 @@ export const createGetTraderDerivativeTransientOrders = (clientResolver?: RpcRes decode: QueryTraderDerivativeOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderDerivativeTransientOrders", - clientResolver + clientResolver, + deps: [QueryTraderDerivativeOrdersRequest, QueryTraderDerivativeOrdersResponse] }); export const useGetTraderDerivativeTransientOrders = buildUseQuery({ builderQueryFn: createGetTraderDerivativeTransientOrders, @@ -303,7 +330,8 @@ export const createGetDerivativeMarkets = (clientResolver?: RpcResolver) => buil decode: QueryDerivativeMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMarkets", - clientResolver + clientResolver, + deps: [QueryDerivativeMarketsRequest, QueryDerivativeMarketsResponse] }); export const useGetDerivativeMarkets = buildUseQuery({ builderQueryFn: createGetDerivativeMarkets, @@ -314,7 +342,8 @@ export const createGetDerivativeMarket = (clientResolver?: RpcResolver) => build decode: QueryDerivativeMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMarket", - clientResolver + clientResolver, + deps: [QueryDerivativeMarketRequest, QueryDerivativeMarketResponse] }); export const useGetDerivativeMarket = buildUseQuery({ builderQueryFn: createGetDerivativeMarket, @@ -325,7 +354,8 @@ export const createGetDerivativeMarketAddress = (clientResolver?: RpcResolver) = decode: QueryDerivativeMarketAddressResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMarketAddress", - clientResolver + clientResolver, + deps: [QueryDerivativeMarketAddressRequest, QueryDerivativeMarketAddressResponse] }); export const useGetDerivativeMarketAddress = buildUseQuery({ builderQueryFn: createGetDerivativeMarketAddress, @@ -336,7 +366,8 @@ export const createGetSubaccountTradeNonce = (clientResolver?: RpcResolver) => b decode: QuerySubaccountTradeNonceResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountTradeNonce", - clientResolver + clientResolver, + deps: [QuerySubaccountTradeNonceRequest, QuerySubaccountTradeNonceResponse] }); export const useGetSubaccountTradeNonce = buildUseQuery({ builderQueryFn: createGetSubaccountTradeNonce, @@ -347,7 +378,8 @@ export const createGetExchangeModuleState = (clientResolver?: RpcResolver) => bu decode: QueryModuleStateResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ExchangeModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetExchangeModuleState = buildUseQuery({ builderQueryFn: createGetExchangeModuleState, @@ -358,7 +390,8 @@ export const createGetPositions = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetPositions, @@ -369,7 +402,8 @@ export const createGetSubaccountPositions = (clientResolver?: RpcResolver) => bu decode: QuerySubaccountPositionsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountPositions", - clientResolver + clientResolver, + deps: [QuerySubaccountPositionsRequest, QuerySubaccountPositionsResponse] }); export const useGetSubaccountPositions = buildUseQuery({ builderQueryFn: createGetSubaccountPositions, @@ -380,7 +414,8 @@ export const createGetSubaccountPositionInMarket = (clientResolver?: RpcResolver decode: QuerySubaccountPositionInMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountPositionInMarket", - clientResolver + clientResolver, + deps: [QuerySubaccountPositionInMarketRequest, QuerySubaccountPositionInMarketResponse] }); export const useGetSubaccountPositionInMarket = buildUseQuery({ builderQueryFn: createGetSubaccountPositionInMarket, @@ -391,7 +426,8 @@ export const createGetSubaccountEffectivePositionInMarket = (clientResolver?: Rp decode: QuerySubaccountEffectivePositionInMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountEffectivePositionInMarket", - clientResolver + clientResolver, + deps: [QuerySubaccountEffectivePositionInMarketRequest, QuerySubaccountEffectivePositionInMarketResponse] }); export const useGetSubaccountEffectivePositionInMarket = buildUseQuery({ builderQueryFn: createGetSubaccountEffectivePositionInMarket, @@ -402,7 +438,8 @@ export const createGetPerpetualMarketInfo = (clientResolver?: RpcResolver) => bu decode: QueryPerpetualMarketInfoResponse.decode, service: "injective.exchange.v1beta1.Query", method: "PerpetualMarketInfo", - clientResolver + clientResolver, + deps: [QueryPerpetualMarketInfoRequest, QueryPerpetualMarketInfoResponse] }); export const useGetPerpetualMarketInfo = buildUseQuery({ builderQueryFn: createGetPerpetualMarketInfo, @@ -413,7 +450,8 @@ export const createGetExpiryFuturesMarketInfo = (clientResolver?: RpcResolver) = decode: QueryExpiryFuturesMarketInfoResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ExpiryFuturesMarketInfo", - clientResolver + clientResolver, + deps: [QueryExpiryFuturesMarketInfoRequest, QueryExpiryFuturesMarketInfoResponse] }); export const useGetExpiryFuturesMarketInfo = buildUseQuery({ builderQueryFn: createGetExpiryFuturesMarketInfo, @@ -424,7 +462,8 @@ export const createGetPerpetualMarketFunding = (clientResolver?: RpcResolver) => decode: QueryPerpetualMarketFundingResponse.decode, service: "injective.exchange.v1beta1.Query", method: "PerpetualMarketFunding", - clientResolver + clientResolver, + deps: [QueryPerpetualMarketFundingRequest, QueryPerpetualMarketFundingResponse] }); export const useGetPerpetualMarketFunding = buildUseQuery({ builderQueryFn: createGetPerpetualMarketFunding, @@ -435,7 +474,8 @@ export const createGetSubaccountOrderMetadata = (clientResolver?: RpcResolver) = decode: QuerySubaccountOrderMetadataResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountOrderMetadata", - clientResolver + clientResolver, + deps: [QuerySubaccountOrderMetadataRequest, QuerySubaccountOrderMetadataResponse] }); export const useGetSubaccountOrderMetadata = buildUseQuery({ builderQueryFn: createGetSubaccountOrderMetadata, @@ -446,7 +486,8 @@ export const createGetTradeRewardPoints = (clientResolver?: RpcResolver) => buil decode: QueryTradeRewardPointsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TradeRewardPoints", - clientResolver + clientResolver, + deps: [QueryTradeRewardPointsRequest, QueryTradeRewardPointsResponse] }); export const useGetTradeRewardPoints = buildUseQuery({ builderQueryFn: createGetTradeRewardPoints, @@ -457,7 +498,8 @@ export const createGetPendingTradeRewardPoints = (clientResolver?: RpcResolver) decode: QueryTradeRewardPointsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "PendingTradeRewardPoints", - clientResolver + clientResolver, + deps: [QueryTradeRewardPointsRequest, QueryTradeRewardPointsResponse] }); export const useGetPendingTradeRewardPoints = buildUseQuery({ builderQueryFn: createGetPendingTradeRewardPoints, @@ -468,7 +510,8 @@ export const createGetTradeRewardCampaign = (clientResolver?: RpcResolver) => bu decode: QueryTradeRewardCampaignResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TradeRewardCampaign", - clientResolver + clientResolver, + deps: [QueryTradeRewardCampaignRequest, QueryTradeRewardCampaignResponse] }); export const useGetTradeRewardCampaign = buildUseQuery({ builderQueryFn: createGetTradeRewardCampaign, @@ -479,7 +522,8 @@ export const createGetFeeDiscountAccountInfo = (clientResolver?: RpcResolver) => decode: QueryFeeDiscountAccountInfoResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FeeDiscountAccountInfo", - clientResolver + clientResolver, + deps: [QueryFeeDiscountAccountInfoRequest, QueryFeeDiscountAccountInfoResponse] }); export const useGetFeeDiscountAccountInfo = buildUseQuery({ builderQueryFn: createGetFeeDiscountAccountInfo, @@ -490,7 +534,8 @@ export const createGetFeeDiscountSchedule = (clientResolver?: RpcResolver) => bu decode: QueryFeeDiscountScheduleResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FeeDiscountSchedule", - clientResolver + clientResolver, + deps: [QueryFeeDiscountScheduleRequest, QueryFeeDiscountScheduleResponse] }); export const useGetFeeDiscountSchedule = buildUseQuery({ builderQueryFn: createGetFeeDiscountSchedule, @@ -501,7 +546,8 @@ export const createGetBalanceMismatches = (clientResolver?: RpcResolver) => buil decode: QueryBalanceMismatchesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "BalanceMismatches", - clientResolver + clientResolver, + deps: [QueryBalanceMismatchesRequest, QueryBalanceMismatchesResponse] }); export const useGetBalanceMismatches = buildUseQuery({ builderQueryFn: createGetBalanceMismatches, @@ -512,7 +558,8 @@ export const createGetBalanceWithBalanceHolds = (clientResolver?: RpcResolver) = decode: QueryBalanceWithBalanceHoldsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "BalanceWithBalanceHolds", - clientResolver + clientResolver, + deps: [QueryBalanceWithBalanceHoldsRequest, QueryBalanceWithBalanceHoldsResponse] }); export const useGetBalanceWithBalanceHolds = buildUseQuery({ builderQueryFn: createGetBalanceWithBalanceHolds, @@ -523,7 +570,8 @@ export const createGetFeeDiscountTierStatistics = (clientResolver?: RpcResolver) decode: QueryFeeDiscountTierStatisticsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FeeDiscountTierStatistics", - clientResolver + clientResolver, + deps: [QueryFeeDiscountTierStatisticsRequest, QueryFeeDiscountTierStatisticsResponse] }); export const useGetFeeDiscountTierStatistics = buildUseQuery({ builderQueryFn: createGetFeeDiscountTierStatistics, @@ -534,7 +582,8 @@ export const createGetMitoVaultInfos = (clientResolver?: RpcResolver) => buildQu decode: MitoVaultInfosResponse.decode, service: "injective.exchange.v1beta1.Query", method: "MitoVaultInfos", - clientResolver + clientResolver, + deps: [MitoVaultInfosRequest, MitoVaultInfosResponse] }); export const useGetMitoVaultInfos = buildUseQuery({ builderQueryFn: createGetMitoVaultInfos, @@ -545,7 +594,8 @@ export const createGetQueryMarketIDFromVault = (clientResolver?: RpcResolver) => decode: QueryMarketIDFromVaultResponse.decode, service: "injective.exchange.v1beta1.Query", method: "QueryMarketIDFromVault", - clientResolver + clientResolver, + deps: [QueryMarketIDFromVaultRequest, QueryMarketIDFromVaultResponse] }); export const useGetQueryMarketIDFromVault = buildUseQuery({ builderQueryFn: createGetQueryMarketIDFromVault, @@ -556,7 +606,8 @@ export const createGetHistoricalTradeRecords = (clientResolver?: RpcResolver) => decode: QueryHistoricalTradeRecordsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "HistoricalTradeRecords", - clientResolver + clientResolver, + deps: [QueryHistoricalTradeRecordsRequest, QueryHistoricalTradeRecordsResponse] }); export const useGetHistoricalTradeRecords = buildUseQuery({ builderQueryFn: createGetHistoricalTradeRecords, @@ -567,7 +618,8 @@ export const createGetIsOptedOutOfRewards = (clientResolver?: RpcResolver) => bu decode: QueryIsOptedOutOfRewardsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "IsOptedOutOfRewards", - clientResolver + clientResolver, + deps: [QueryIsOptedOutOfRewardsRequest, QueryIsOptedOutOfRewardsResponse] }); export const useGetIsOptedOutOfRewards = buildUseQuery({ builderQueryFn: createGetIsOptedOutOfRewards, @@ -578,7 +630,8 @@ export const createGetOptedOutOfRewardsAccounts = (clientResolver?: RpcResolver) decode: QueryOptedOutOfRewardsAccountsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "OptedOutOfRewardsAccounts", - clientResolver + clientResolver, + deps: [QueryOptedOutOfRewardsAccountsRequest, QueryOptedOutOfRewardsAccountsResponse] }); export const useGetOptedOutOfRewardsAccounts = buildUseQuery({ builderQueryFn: createGetOptedOutOfRewardsAccounts, @@ -589,7 +642,8 @@ export const createGetMarketVolatility = (clientResolver?: RpcResolver) => build decode: QueryMarketVolatilityResponse.decode, service: "injective.exchange.v1beta1.Query", method: "MarketVolatility", - clientResolver + clientResolver, + deps: [QueryMarketVolatilityRequest, QueryMarketVolatilityResponse] }); export const useGetMarketVolatility = buildUseQuery({ builderQueryFn: createGetMarketVolatility, @@ -600,7 +654,8 @@ export const createGetBinaryOptionsMarkets = (clientResolver?: RpcResolver) => b decode: QueryBinaryMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "BinaryOptionsMarkets", - clientResolver + clientResolver, + deps: [QueryBinaryMarketsRequest, QueryBinaryMarketsResponse] }); export const useGetBinaryOptionsMarkets = buildUseQuery({ builderQueryFn: createGetBinaryOptionsMarkets, @@ -611,7 +666,8 @@ export const createGetTraderDerivativeConditionalOrders = (clientResolver?: RpcR decode: QueryTraderDerivativeConditionalOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderDerivativeConditionalOrders", - clientResolver + clientResolver, + deps: [QueryTraderDerivativeConditionalOrdersRequest, QueryTraderDerivativeConditionalOrdersResponse] }); export const useGetTraderDerivativeConditionalOrders = buildUseQuery({ builderQueryFn: createGetTraderDerivativeConditionalOrders, @@ -622,7 +678,8 @@ export const createGetMarketAtomicExecutionFeeMultiplier = (clientResolver?: Rpc decode: QueryMarketAtomicExecutionFeeMultiplierResponse.decode, service: "injective.exchange.v1beta1.Query", method: "MarketAtomicExecutionFeeMultiplier", - clientResolver + clientResolver, + deps: [QueryMarketAtomicExecutionFeeMultiplierRequest, QueryMarketAtomicExecutionFeeMultiplierResponse] }); export const useGetMarketAtomicExecutionFeeMultiplier = buildUseQuery({ builderQueryFn: createGetMarketAtomicExecutionFeeMultiplier, @@ -633,7 +690,8 @@ export const createGetActiveStakeGrant = (clientResolver?: RpcResolver) => build decode: QueryActiveStakeGrantResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ActiveStakeGrant", - clientResolver + clientResolver, + deps: [QueryActiveStakeGrantRequest, QueryActiveStakeGrantResponse] }); export const useGetActiveStakeGrant = buildUseQuery({ builderQueryFn: createGetActiveStakeGrant, @@ -644,7 +702,8 @@ export const createGetGrantAuthorization = (clientResolver?: RpcResolver) => bui decode: QueryGrantAuthorizationResponse.decode, service: "injective.exchange.v1beta1.Query", method: "GrantAuthorization", - clientResolver + clientResolver, + deps: [QueryGrantAuthorizationRequest, QueryGrantAuthorizationResponse] }); export const useGetGrantAuthorization = buildUseQuery({ builderQueryFn: createGetGrantAuthorization, @@ -655,7 +714,8 @@ export const createGetGrantAuthorizations = (clientResolver?: RpcResolver) => bu decode: QueryGrantAuthorizationsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "GrantAuthorizations", - clientResolver + clientResolver, + deps: [QueryGrantAuthorizationsRequest, QueryGrantAuthorizationsResponse] }); export const useGetGrantAuthorizations = buildUseQuery({ builderQueryFn: createGetGrantAuthorizations, diff --git a/libs/injective-react/src/injective/exchange/v1beta1/query.ts b/libs/injective-react/src/injective/exchange/v1beta1/query.ts index a03e3cd0..d8ebc81b 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/query.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Balance, BalanceAmino, DerivativePosition, DerivativePositionAmino, Gen import { MetadataStatistics, MetadataStatisticsAmino } from "../../oracle/v1beta1/oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum OrderSide { /** Side_Unspecified - will return both */ Side_Unspecified = 0, @@ -3232,9 +3231,9 @@ export const Subaccount = { typeUrl: "/injective.exchange.v1beta1.Subaccount", value: Subaccount.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Subaccount.typeUrl, Subaccount); function createBaseQuerySubaccountOrdersRequest(): QuerySubaccountOrdersRequest { return { subaccountId: "", @@ -3314,9 +3313,9 @@ export const QuerySubaccountOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrdersRequest", value: QuerySubaccountOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountOrdersRequest.typeUrl, QuerySubaccountOrdersRequest); function createBaseQuerySubaccountOrdersResponse(): QuerySubaccountOrdersResponse { return { buyOrders: [], @@ -3400,9 +3399,11 @@ export const QuerySubaccountOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrdersResponse", value: QuerySubaccountOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountOrdersResponse.typeUrl, QuerySubaccountOrdersResponse); function createBaseSubaccountOrderbookMetadataWithMarket(): SubaccountOrderbookMetadataWithMarket { return { metadata: undefined, @@ -3494,9 +3495,11 @@ export const SubaccountOrderbookMetadataWithMarket = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrderbookMetadataWithMarket", value: SubaccountOrderbookMetadataWithMarket.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrderbookMetadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountOrderbookMetadataWithMarket.typeUrl, SubaccountOrderbookMetadataWithMarket); function createBaseQueryExchangeParamsRequest(): QueryExchangeParamsRequest { return {}; } @@ -3551,9 +3554,9 @@ export const QueryExchangeParamsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeParamsRequest", value: QueryExchangeParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryExchangeParamsRequest.typeUrl, QueryExchangeParamsRequest); function createBaseQueryExchangeParamsResponse(): QueryExchangeParamsResponse { return { params: Params.fromPartial({}) @@ -3621,9 +3624,11 @@ export const QueryExchangeParamsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeParamsResponse", value: QueryExchangeParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryExchangeParamsResponse.typeUrl, QueryExchangeParamsResponse); function createBaseQuerySubaccountDepositsRequest(): QuerySubaccountDepositsRequest { return { subaccountId: "", @@ -3703,9 +3708,11 @@ export const QuerySubaccountDepositsRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositsRequest", value: QuerySubaccountDepositsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Subaccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountDepositsRequest.typeUrl, QuerySubaccountDepositsRequest); function createBaseQuerySubaccountDepositsResponse_DepositsEntry(): QuerySubaccountDepositsResponse_DepositsEntry { return { key: "", @@ -3772,6 +3779,9 @@ export const QuerySubaccountDepositsResponse_DepositsEntry = { }, toProto(message: QuerySubaccountDepositsResponse_DepositsEntry): Uint8Array { return QuerySubaccountDepositsResponse_DepositsEntry.encode(message).finish(); + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; function createBaseQuerySubaccountDepositsResponse(): QuerySubaccountDepositsResponse { @@ -3864,9 +3874,11 @@ export const QuerySubaccountDepositsResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositsResponse", value: QuerySubaccountDepositsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountDepositsResponse.typeUrl, QuerySubaccountDepositsResponse); function createBaseQueryExchangeBalancesRequest(): QueryExchangeBalancesRequest { return {}; } @@ -3921,9 +3933,9 @@ export const QueryExchangeBalancesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeBalancesRequest", value: QueryExchangeBalancesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryExchangeBalancesRequest.typeUrl, QueryExchangeBalancesRequest); function createBaseQueryExchangeBalancesResponse(): QueryExchangeBalancesResponse { return { balances: [] @@ -3993,9 +4005,11 @@ export const QueryExchangeBalancesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeBalancesResponse", value: QueryExchangeBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Balance.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryExchangeBalancesResponse.typeUrl, QueryExchangeBalancesResponse); function createBaseQueryAggregateVolumeRequest(): QueryAggregateVolumeRequest { return { account: "" @@ -4063,9 +4077,9 @@ export const QueryAggregateVolumeRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumeRequest", value: QueryAggregateVolumeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateVolumeRequest.typeUrl, QueryAggregateVolumeRequest); function createBaseQueryAggregateVolumeResponse(): QueryAggregateVolumeResponse { return { aggregateVolumes: [] @@ -4135,9 +4149,11 @@ export const QueryAggregateVolumeResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumeResponse", value: QueryAggregateVolumeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateVolumeResponse.typeUrl, QueryAggregateVolumeResponse); function createBaseQueryAggregateVolumesRequest(): QueryAggregateVolumesRequest { return { accounts: [], @@ -4221,9 +4237,9 @@ export const QueryAggregateVolumesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumesRequest", value: QueryAggregateVolumesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateVolumesRequest.typeUrl, QueryAggregateVolumesRequest); function createBaseQueryAggregateVolumesResponse(): QueryAggregateVolumesResponse { return { aggregateAccountVolumes: [], @@ -4307,9 +4323,12 @@ export const QueryAggregateVolumesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumesResponse", value: QueryAggregateVolumesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AggregateAccountVolumeRecord.registerTypeUrl(); + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateVolumesResponse.typeUrl, QueryAggregateVolumesResponse); function createBaseQueryAggregateMarketVolumeRequest(): QueryAggregateMarketVolumeRequest { return { marketId: "" @@ -4377,9 +4396,9 @@ export const QueryAggregateMarketVolumeRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumeRequest", value: QueryAggregateMarketVolumeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumeRequest.typeUrl, QueryAggregateMarketVolumeRequest); function createBaseQueryAggregateMarketVolumeResponse(): QueryAggregateMarketVolumeResponse { return { volume: VolumeRecord.fromPartial({}) @@ -4447,9 +4466,11 @@ export const QueryAggregateMarketVolumeResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumeResponse", value: QueryAggregateMarketVolumeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + VolumeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumeResponse.typeUrl, QueryAggregateMarketVolumeResponse); function createBaseQueryDenomDecimalRequest(): QueryDenomDecimalRequest { return { denom: "" @@ -4517,9 +4538,9 @@ export const QueryDenomDecimalRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalRequest", value: QueryDenomDecimalRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomDecimalRequest.typeUrl, QueryDenomDecimalRequest); function createBaseQueryDenomDecimalResponse(): QueryDenomDecimalResponse { return { decimal: BigInt(0) @@ -4587,9 +4608,9 @@ export const QueryDenomDecimalResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalResponse", value: QueryDenomDecimalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomDecimalResponse.typeUrl, QueryDenomDecimalResponse); function createBaseQueryDenomDecimalsRequest(): QueryDenomDecimalsRequest { return { denoms: [] @@ -4659,9 +4680,9 @@ export const QueryDenomDecimalsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalsRequest", value: QueryDenomDecimalsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomDecimalsRequest.typeUrl, QueryDenomDecimalsRequest); function createBaseQueryDenomDecimalsResponse(): QueryDenomDecimalsResponse { return { denomDecimals: [] @@ -4731,9 +4752,11 @@ export const QueryDenomDecimalsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalsResponse", value: QueryDenomDecimalsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomDecimals.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomDecimalsResponse.typeUrl, QueryDenomDecimalsResponse); function createBaseQueryAggregateMarketVolumesRequest(): QueryAggregateMarketVolumesRequest { return { marketIds: [] @@ -4803,9 +4826,9 @@ export const QueryAggregateMarketVolumesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumesRequest", value: QueryAggregateMarketVolumesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumesRequest.typeUrl, QueryAggregateMarketVolumesRequest); function createBaseQueryAggregateMarketVolumesResponse(): QueryAggregateMarketVolumesResponse { return { volumes: [] @@ -4875,9 +4898,11 @@ export const QueryAggregateMarketVolumesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumesResponse", value: QueryAggregateMarketVolumesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumesResponse.typeUrl, QueryAggregateMarketVolumesResponse); function createBaseQuerySubaccountDepositRequest(): QuerySubaccountDepositRequest { return { subaccountId: "", @@ -4957,9 +4982,9 @@ export const QuerySubaccountDepositRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositRequest", value: QuerySubaccountDepositRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountDepositRequest.typeUrl, QuerySubaccountDepositRequest); function createBaseQuerySubaccountDepositResponse(): QuerySubaccountDepositResponse { return { deposits: undefined @@ -5027,9 +5052,11 @@ export const QuerySubaccountDepositResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositResponse", value: QuerySubaccountDepositResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountDepositResponse.typeUrl, QuerySubaccountDepositResponse); function createBaseQuerySpotMarketsRequest(): QuerySpotMarketsRequest { return { status: "", @@ -5111,9 +5138,9 @@ export const QuerySpotMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketsRequest", value: QuerySpotMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMarketsRequest.typeUrl, QuerySpotMarketsRequest); function createBaseQuerySpotMarketsResponse(): QuerySpotMarketsResponse { return { markets: [] @@ -5183,9 +5210,11 @@ export const QuerySpotMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketsResponse", value: QuerySpotMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotMarketsResponse.typeUrl, QuerySpotMarketsResponse); function createBaseQuerySpotMarketRequest(): QuerySpotMarketRequest { return { marketId: "" @@ -5253,9 +5282,9 @@ export const QuerySpotMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketRequest", value: QuerySpotMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMarketRequest.typeUrl, QuerySpotMarketRequest); function createBaseQuerySpotMarketResponse(): QuerySpotMarketResponse { return { market: undefined @@ -5323,9 +5352,11 @@ export const QuerySpotMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketResponse", value: QuerySpotMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotMarketResponse.typeUrl, QuerySpotMarketResponse); function createBaseQuerySpotOrderbookRequest(): QuerySpotOrderbookRequest { return { marketId: "", @@ -5441,9 +5472,9 @@ export const QuerySpotOrderbookRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrderbookRequest", value: QuerySpotOrderbookRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotOrderbookRequest.typeUrl, QuerySpotOrderbookRequest); function createBaseQuerySpotOrderbookResponse(): QuerySpotOrderbookResponse { return { buysPriceLevel: [], @@ -5527,9 +5558,11 @@ export const QuerySpotOrderbookResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrderbookResponse", value: QuerySpotOrderbookResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotOrderbookResponse.typeUrl, QuerySpotOrderbookResponse); function createBaseFullSpotMarket(): FullSpotMarket { return { market: undefined, @@ -5609,9 +5642,12 @@ export const FullSpotMarket = { typeUrl: "/injective.exchange.v1beta1.FullSpotMarket", value: FullSpotMarket.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); + MidPriceAndTOB.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FullSpotMarket.typeUrl, FullSpotMarket); function createBaseQueryFullSpotMarketsRequest(): QueryFullSpotMarketsRequest { return { status: "", @@ -5705,9 +5741,9 @@ export const QueryFullSpotMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketsRequest", value: QueryFullSpotMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFullSpotMarketsRequest.typeUrl, QueryFullSpotMarketsRequest); function createBaseQueryFullSpotMarketsResponse(): QueryFullSpotMarketsResponse { return { markets: [] @@ -5777,9 +5813,11 @@ export const QueryFullSpotMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketsResponse", value: QueryFullSpotMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullSpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFullSpotMarketsResponse.typeUrl, QueryFullSpotMarketsResponse); function createBaseQueryFullSpotMarketRequest(): QueryFullSpotMarketRequest { return { marketId: "", @@ -5859,9 +5897,9 @@ export const QueryFullSpotMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketRequest", value: QueryFullSpotMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFullSpotMarketRequest.typeUrl, QueryFullSpotMarketRequest); function createBaseQueryFullSpotMarketResponse(): QueryFullSpotMarketResponse { return { market: undefined @@ -5929,9 +5967,11 @@ export const QueryFullSpotMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketResponse", value: QueryFullSpotMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullSpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFullSpotMarketResponse.typeUrl, QueryFullSpotMarketResponse); function createBaseQuerySpotOrdersByHashesRequest(): QuerySpotOrdersByHashesRequest { return { marketId: "", @@ -6025,9 +6065,9 @@ export const QuerySpotOrdersByHashesRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrdersByHashesRequest", value: QuerySpotOrdersByHashesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotOrdersByHashesRequest.typeUrl, QuerySpotOrdersByHashesRequest); function createBaseQuerySpotOrdersByHashesResponse(): QuerySpotOrdersByHashesResponse { return { orders: [] @@ -6097,9 +6137,11 @@ export const QuerySpotOrdersByHashesResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrdersByHashesResponse", value: QuerySpotOrdersByHashesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedSpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotOrdersByHashesResponse.typeUrl, QuerySpotOrdersByHashesResponse); function createBaseQueryTraderSpotOrdersRequest(): QueryTraderSpotOrdersRequest { return { marketId: "", @@ -6179,9 +6221,9 @@ export const QueryTraderSpotOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderSpotOrdersRequest", value: QueryTraderSpotOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderSpotOrdersRequest.typeUrl, QueryTraderSpotOrdersRequest); function createBaseQueryAccountAddressSpotOrdersRequest(): QueryAccountAddressSpotOrdersRequest { return { marketId: "", @@ -6261,9 +6303,9 @@ export const QueryAccountAddressSpotOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressSpotOrdersRequest", value: QueryAccountAddressSpotOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressSpotOrdersRequest.typeUrl, QueryAccountAddressSpotOrdersRequest); function createBaseTrimmedSpotLimitOrder(): TrimmedSpotLimitOrder { return { price: "", @@ -6391,9 +6433,9 @@ export const TrimmedSpotLimitOrder = { typeUrl: "/injective.exchange.v1beta1.TrimmedSpotLimitOrder", value: TrimmedSpotLimitOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TrimmedSpotLimitOrder.typeUrl, TrimmedSpotLimitOrder); function createBaseQueryTraderSpotOrdersResponse(): QueryTraderSpotOrdersResponse { return { orders: [] @@ -6463,9 +6505,11 @@ export const QueryTraderSpotOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTraderSpotOrdersResponse", value: QueryTraderSpotOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedSpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTraderSpotOrdersResponse.typeUrl, QueryTraderSpotOrdersResponse); function createBaseQueryAccountAddressSpotOrdersResponse(): QueryAccountAddressSpotOrdersResponse { return { orders: [] @@ -6535,9 +6579,11 @@ export const QueryAccountAddressSpotOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressSpotOrdersResponse", value: QueryAccountAddressSpotOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedSpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountAddressSpotOrdersResponse.typeUrl, QueryAccountAddressSpotOrdersResponse); function createBaseQuerySpotMidPriceAndTOBRequest(): QuerySpotMidPriceAndTOBRequest { return { marketId: "" @@ -6605,9 +6651,9 @@ export const QuerySpotMidPriceAndTOBRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMidPriceAndTOBRequest", value: QuerySpotMidPriceAndTOBRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMidPriceAndTOBRequest.typeUrl, QuerySpotMidPriceAndTOBRequest); function createBaseQuerySpotMidPriceAndTOBResponse(): QuerySpotMidPriceAndTOBResponse { return { midPrice: undefined, @@ -6699,9 +6745,9 @@ export const QuerySpotMidPriceAndTOBResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMidPriceAndTOBResponse", value: QuerySpotMidPriceAndTOBResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMidPriceAndTOBResponse.typeUrl, QuerySpotMidPriceAndTOBResponse); function createBaseQueryDerivativeMidPriceAndTOBRequest(): QueryDerivativeMidPriceAndTOBRequest { return { marketId: "" @@ -6769,9 +6815,9 @@ export const QueryDerivativeMidPriceAndTOBRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMidPriceAndTOBRequest", value: QueryDerivativeMidPriceAndTOBRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMidPriceAndTOBRequest.typeUrl, QueryDerivativeMidPriceAndTOBRequest); function createBaseQueryDerivativeMidPriceAndTOBResponse(): QueryDerivativeMidPriceAndTOBResponse { return { midPrice: undefined, @@ -6863,9 +6909,9 @@ export const QueryDerivativeMidPriceAndTOBResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMidPriceAndTOBResponse", value: QueryDerivativeMidPriceAndTOBResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMidPriceAndTOBResponse.typeUrl, QueryDerivativeMidPriceAndTOBResponse); function createBaseQueryDerivativeOrderbookRequest(): QueryDerivativeOrderbookRequest { return { marketId: "", @@ -6957,9 +7003,9 @@ export const QueryDerivativeOrderbookRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrderbookRequest", value: QueryDerivativeOrderbookRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeOrderbookRequest.typeUrl, QueryDerivativeOrderbookRequest); function createBaseQueryDerivativeOrderbookResponse(): QueryDerivativeOrderbookResponse { return { buysPriceLevel: [], @@ -7043,9 +7089,11 @@ export const QueryDerivativeOrderbookResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrderbookResponse", value: QueryDerivativeOrderbookResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeOrderbookResponse.typeUrl, QueryDerivativeOrderbookResponse); function createBaseQueryTraderSpotOrdersToCancelUpToAmountRequest(): QueryTraderSpotOrdersToCancelUpToAmountRequest { return { marketId: "", @@ -7173,9 +7221,9 @@ export const QueryTraderSpotOrdersToCancelUpToAmountRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderSpotOrdersToCancelUpToAmountRequest", value: QueryTraderSpotOrdersToCancelUpToAmountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderSpotOrdersToCancelUpToAmountRequest.typeUrl, QueryTraderSpotOrdersToCancelUpToAmountRequest); function createBaseQueryTraderDerivativeOrdersToCancelUpToAmountRequest(): QueryTraderDerivativeOrdersToCancelUpToAmountRequest { return { marketId: "", @@ -7291,9 +7339,9 @@ export const QueryTraderDerivativeOrdersToCancelUpToAmountRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeOrdersToCancelUpToAmountRequest", value: QueryTraderDerivativeOrdersToCancelUpToAmountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderDerivativeOrdersToCancelUpToAmountRequest.typeUrl, QueryTraderDerivativeOrdersToCancelUpToAmountRequest); function createBaseQueryTraderDerivativeOrdersRequest(): QueryTraderDerivativeOrdersRequest { return { marketId: "", @@ -7373,9 +7421,9 @@ export const QueryTraderDerivativeOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeOrdersRequest", value: QueryTraderDerivativeOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderDerivativeOrdersRequest.typeUrl, QueryTraderDerivativeOrdersRequest); function createBaseQueryAccountAddressDerivativeOrdersRequest(): QueryAccountAddressDerivativeOrdersRequest { return { marketId: "", @@ -7455,9 +7503,9 @@ export const QueryAccountAddressDerivativeOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressDerivativeOrdersRequest", value: QueryAccountAddressDerivativeOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressDerivativeOrdersRequest.typeUrl, QueryAccountAddressDerivativeOrdersRequest); function createBaseTrimmedDerivativeLimitOrder(): TrimmedDerivativeLimitOrder { return { price: "", @@ -7597,9 +7645,9 @@ export const TrimmedDerivativeLimitOrder = { typeUrl: "/injective.exchange.v1beta1.TrimmedDerivativeLimitOrder", value: TrimmedDerivativeLimitOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TrimmedDerivativeLimitOrder.typeUrl, TrimmedDerivativeLimitOrder); function createBaseQueryTraderDerivativeOrdersResponse(): QueryTraderDerivativeOrdersResponse { return { orders: [] @@ -7669,9 +7717,11 @@ export const QueryTraderDerivativeOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeOrdersResponse", value: QueryTraderDerivativeOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTraderDerivativeOrdersResponse.typeUrl, QueryTraderDerivativeOrdersResponse); function createBaseQueryAccountAddressDerivativeOrdersResponse(): QueryAccountAddressDerivativeOrdersResponse { return { orders: [] @@ -7741,9 +7791,11 @@ export const QueryAccountAddressDerivativeOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressDerivativeOrdersResponse", value: QueryAccountAddressDerivativeOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountAddressDerivativeOrdersResponse.typeUrl, QueryAccountAddressDerivativeOrdersResponse); function createBaseQueryDerivativeOrdersByHashesRequest(): QueryDerivativeOrdersByHashesRequest { return { marketId: "", @@ -7837,9 +7889,9 @@ export const QueryDerivativeOrdersByHashesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrdersByHashesRequest", value: QueryDerivativeOrdersByHashesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeOrdersByHashesRequest.typeUrl, QueryDerivativeOrdersByHashesRequest); function createBaseQueryDerivativeOrdersByHashesResponse(): QueryDerivativeOrdersByHashesResponse { return { orders: [] @@ -7909,9 +7961,11 @@ export const QueryDerivativeOrdersByHashesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrdersByHashesResponse", value: QueryDerivativeOrdersByHashesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeOrdersByHashesResponse.typeUrl, QueryDerivativeOrdersByHashesResponse); function createBaseQueryDerivativeMarketsRequest(): QueryDerivativeMarketsRequest { return { status: "", @@ -8005,9 +8059,9 @@ export const QueryDerivativeMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketsRequest", value: QueryDerivativeMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketsRequest.typeUrl, QueryDerivativeMarketsRequest); function createBasePriceLevel(): PriceLevel { return { price: "", @@ -8087,9 +8141,9 @@ export const PriceLevel = { typeUrl: "/injective.exchange.v1beta1.PriceLevel", value: PriceLevel.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceLevel.typeUrl, PriceLevel); function createBasePerpetualMarketState(): PerpetualMarketState { return { marketInfo: undefined, @@ -8169,9 +8223,12 @@ export const PerpetualMarketState = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketState", value: PerpetualMarketState.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketInfo.registerTypeUrl(); + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PerpetualMarketState.typeUrl, PerpetualMarketState); function createBaseFullDerivativeMarket(): FullDerivativeMarket { return { market: undefined, @@ -8287,9 +8344,14 @@ export const FullDerivativeMarket = { typeUrl: "/injective.exchange.v1beta1.FullDerivativeMarket", value: FullDerivativeMarket.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarket.registerTypeUrl(); + PerpetualMarketState.registerTypeUrl(); + ExpiryFuturesMarketInfo.registerTypeUrl(); + MidPriceAndTOB.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FullDerivativeMarket.typeUrl, FullDerivativeMarket); function createBaseQueryDerivativeMarketsResponse(): QueryDerivativeMarketsResponse { return { markets: [] @@ -8359,9 +8421,11 @@ export const QueryDerivativeMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketsResponse", value: QueryDerivativeMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullDerivativeMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeMarketsResponse.typeUrl, QueryDerivativeMarketsResponse); function createBaseQueryDerivativeMarketRequest(): QueryDerivativeMarketRequest { return { marketId: "" @@ -8429,9 +8493,9 @@ export const QueryDerivativeMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketRequest", value: QueryDerivativeMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketRequest.typeUrl, QueryDerivativeMarketRequest); function createBaseQueryDerivativeMarketResponse(): QueryDerivativeMarketResponse { return { market: undefined @@ -8499,9 +8563,11 @@ export const QueryDerivativeMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketResponse", value: QueryDerivativeMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullDerivativeMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeMarketResponse.typeUrl, QueryDerivativeMarketResponse); function createBaseQueryDerivativeMarketAddressRequest(): QueryDerivativeMarketAddressRequest { return { marketId: "" @@ -8569,9 +8635,9 @@ export const QueryDerivativeMarketAddressRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketAddressRequest", value: QueryDerivativeMarketAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketAddressRequest.typeUrl, QueryDerivativeMarketAddressRequest); function createBaseQueryDerivativeMarketAddressResponse(): QueryDerivativeMarketAddressResponse { return { address: "", @@ -8651,9 +8717,9 @@ export const QueryDerivativeMarketAddressResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketAddressResponse", value: QueryDerivativeMarketAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketAddressResponse.typeUrl, QueryDerivativeMarketAddressResponse); function createBaseQuerySubaccountTradeNonceRequest(): QuerySubaccountTradeNonceRequest { return { subaccountId: "" @@ -8721,9 +8787,9 @@ export const QuerySubaccountTradeNonceRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountTradeNonceRequest", value: QuerySubaccountTradeNonceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountTradeNonceRequest.typeUrl, QuerySubaccountTradeNonceRequest); function createBaseQuerySubaccountPositionsRequest(): QuerySubaccountPositionsRequest { return { subaccountId: "" @@ -8791,9 +8857,9 @@ export const QuerySubaccountPositionsRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionsRequest", value: QuerySubaccountPositionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountPositionsRequest.typeUrl, QuerySubaccountPositionsRequest); function createBaseQuerySubaccountPositionInMarketRequest(): QuerySubaccountPositionInMarketRequest { return { subaccountId: "", @@ -8873,9 +8939,9 @@ export const QuerySubaccountPositionInMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionInMarketRequest", value: QuerySubaccountPositionInMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountPositionInMarketRequest.typeUrl, QuerySubaccountPositionInMarketRequest); function createBaseQuerySubaccountEffectivePositionInMarketRequest(): QuerySubaccountEffectivePositionInMarketRequest { return { subaccountId: "", @@ -8955,9 +9021,9 @@ export const QuerySubaccountEffectivePositionInMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountEffectivePositionInMarketRequest", value: QuerySubaccountEffectivePositionInMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountEffectivePositionInMarketRequest.typeUrl, QuerySubaccountEffectivePositionInMarketRequest); function createBaseQuerySubaccountOrderMetadataRequest(): QuerySubaccountOrderMetadataRequest { return { subaccountId: "" @@ -9025,9 +9091,9 @@ export const QuerySubaccountOrderMetadataRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrderMetadataRequest", value: QuerySubaccountOrderMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountOrderMetadataRequest.typeUrl, QuerySubaccountOrderMetadataRequest); function createBaseQuerySubaccountPositionsResponse(): QuerySubaccountPositionsResponse { return { state: [] @@ -9097,9 +9163,11 @@ export const QuerySubaccountPositionsResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionsResponse", value: QuerySubaccountPositionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativePosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountPositionsResponse.typeUrl, QuerySubaccountPositionsResponse); function createBaseQuerySubaccountPositionInMarketResponse(): QuerySubaccountPositionInMarketResponse { return { state: undefined @@ -9167,9 +9235,11 @@ export const QuerySubaccountPositionInMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionInMarketResponse", value: QuerySubaccountPositionInMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Position.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountPositionInMarketResponse.typeUrl, QuerySubaccountPositionInMarketResponse); function createBaseEffectivePosition(): EffectivePosition { return { isLong: false, @@ -9273,9 +9343,9 @@ export const EffectivePosition = { typeUrl: "/injective.exchange.v1beta1.EffectivePosition", value: EffectivePosition.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EffectivePosition.typeUrl, EffectivePosition); function createBaseQuerySubaccountEffectivePositionInMarketResponse(): QuerySubaccountEffectivePositionInMarketResponse { return { state: undefined @@ -9343,9 +9413,11 @@ export const QuerySubaccountEffectivePositionInMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountEffectivePositionInMarketResponse", value: QuerySubaccountEffectivePositionInMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + EffectivePosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountEffectivePositionInMarketResponse.typeUrl, QuerySubaccountEffectivePositionInMarketResponse); function createBaseQueryPerpetualMarketInfoRequest(): QueryPerpetualMarketInfoRequest { return { marketId: "" @@ -9413,9 +9485,9 @@ export const QueryPerpetualMarketInfoRequest = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketInfoRequest", value: QueryPerpetualMarketInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPerpetualMarketInfoRequest.typeUrl, QueryPerpetualMarketInfoRequest); function createBaseQueryPerpetualMarketInfoResponse(): QueryPerpetualMarketInfoResponse { return { info: PerpetualMarketInfo.fromPartial({}) @@ -9483,9 +9555,11 @@ export const QueryPerpetualMarketInfoResponse = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketInfoResponse", value: QueryPerpetualMarketInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPerpetualMarketInfoResponse.typeUrl, QueryPerpetualMarketInfoResponse); function createBaseQueryExpiryFuturesMarketInfoRequest(): QueryExpiryFuturesMarketInfoRequest { return { marketId: "" @@ -9553,9 +9627,9 @@ export const QueryExpiryFuturesMarketInfoRequest = { typeUrl: "/injective.exchange.v1beta1.QueryExpiryFuturesMarketInfoRequest", value: QueryExpiryFuturesMarketInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryExpiryFuturesMarketInfoRequest.typeUrl, QueryExpiryFuturesMarketInfoRequest); function createBaseQueryExpiryFuturesMarketInfoResponse(): QueryExpiryFuturesMarketInfoResponse { return { info: ExpiryFuturesMarketInfo.fromPartial({}) @@ -9623,9 +9697,11 @@ export const QueryExpiryFuturesMarketInfoResponse = { typeUrl: "/injective.exchange.v1beta1.QueryExpiryFuturesMarketInfoResponse", value: QueryExpiryFuturesMarketInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ExpiryFuturesMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryExpiryFuturesMarketInfoResponse.typeUrl, QueryExpiryFuturesMarketInfoResponse); function createBaseQueryPerpetualMarketFundingRequest(): QueryPerpetualMarketFundingRequest { return { marketId: "" @@ -9693,9 +9769,9 @@ export const QueryPerpetualMarketFundingRequest = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketFundingRequest", value: QueryPerpetualMarketFundingRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPerpetualMarketFundingRequest.typeUrl, QueryPerpetualMarketFundingRequest); function createBaseQueryPerpetualMarketFundingResponse(): QueryPerpetualMarketFundingResponse { return { state: PerpetualMarketFunding.fromPartial({}) @@ -9763,9 +9839,11 @@ export const QueryPerpetualMarketFundingResponse = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketFundingResponse", value: QueryPerpetualMarketFundingResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPerpetualMarketFundingResponse.typeUrl, QueryPerpetualMarketFundingResponse); function createBaseQuerySubaccountOrderMetadataResponse(): QuerySubaccountOrderMetadataResponse { return { metadata: [] @@ -9835,9 +9913,11 @@ export const QuerySubaccountOrderMetadataResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrderMetadataResponse", value: QuerySubaccountOrderMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrderbookMetadataWithMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountOrderMetadataResponse.typeUrl, QuerySubaccountOrderMetadataResponse); function createBaseQuerySubaccountTradeNonceResponse(): QuerySubaccountTradeNonceResponse { return { nonce: 0 @@ -9905,9 +9985,9 @@ export const QuerySubaccountTradeNonceResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountTradeNonceResponse", value: QuerySubaccountTradeNonceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountTradeNonceResponse.typeUrl, QuerySubaccountTradeNonceResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -9962,9 +10042,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.exchange.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -10032,9 +10112,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.exchange.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryPositionsRequest(): QueryPositionsRequest { return {}; } @@ -10089,9 +10171,9 @@ export const QueryPositionsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryPositionsRequest", value: QueryPositionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPositionsRequest.typeUrl, QueryPositionsRequest); function createBaseQueryPositionsResponse(): QueryPositionsResponse { return { state: [] @@ -10161,9 +10243,11 @@ export const QueryPositionsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryPositionsResponse", value: QueryPositionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativePosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPositionsResponse.typeUrl, QueryPositionsResponse); function createBaseQueryTradeRewardPointsRequest(): QueryTradeRewardPointsRequest { return { accounts: [], @@ -10245,9 +10329,9 @@ export const QueryTradeRewardPointsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardPointsRequest", value: QueryTradeRewardPointsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTradeRewardPointsRequest.typeUrl, QueryTradeRewardPointsRequest); function createBaseQueryTradeRewardPointsResponse(): QueryTradeRewardPointsResponse { return { accountTradeRewardPoints: [] @@ -10317,9 +10401,9 @@ export const QueryTradeRewardPointsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardPointsResponse", value: QueryTradeRewardPointsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTradeRewardPointsResponse.typeUrl, QueryTradeRewardPointsResponse); function createBaseQueryTradeRewardCampaignRequest(): QueryTradeRewardCampaignRequest { return {}; } @@ -10374,9 +10458,9 @@ export const QueryTradeRewardCampaignRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardCampaignRequest", value: QueryTradeRewardCampaignRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTradeRewardCampaignRequest.typeUrl, QueryTradeRewardCampaignRequest); function createBaseQueryTradeRewardCampaignResponse(): QueryTradeRewardCampaignResponse { return { tradingRewardCampaignInfo: undefined, @@ -10498,9 +10582,12 @@ export const QueryTradeRewardCampaignResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardCampaignResponse", value: QueryTradeRewardCampaignResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTradeRewardCampaignResponse.typeUrl, QueryTradeRewardCampaignResponse); function createBaseQueryIsOptedOutOfRewardsRequest(): QueryIsOptedOutOfRewardsRequest { return { account: "" @@ -10568,9 +10655,9 @@ export const QueryIsOptedOutOfRewardsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryIsOptedOutOfRewardsRequest", value: QueryIsOptedOutOfRewardsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryIsOptedOutOfRewardsRequest.typeUrl, QueryIsOptedOutOfRewardsRequest); function createBaseQueryIsOptedOutOfRewardsResponse(): QueryIsOptedOutOfRewardsResponse { return { isOptedOut: false @@ -10638,9 +10725,9 @@ export const QueryIsOptedOutOfRewardsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryIsOptedOutOfRewardsResponse", value: QueryIsOptedOutOfRewardsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryIsOptedOutOfRewardsResponse.typeUrl, QueryIsOptedOutOfRewardsResponse); function createBaseQueryOptedOutOfRewardsAccountsRequest(): QueryOptedOutOfRewardsAccountsRequest { return {}; } @@ -10695,9 +10782,9 @@ export const QueryOptedOutOfRewardsAccountsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryOptedOutOfRewardsAccountsRequest", value: QueryOptedOutOfRewardsAccountsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOptedOutOfRewardsAccountsRequest.typeUrl, QueryOptedOutOfRewardsAccountsRequest); function createBaseQueryOptedOutOfRewardsAccountsResponse(): QueryOptedOutOfRewardsAccountsResponse { return { accounts: [] @@ -10767,9 +10854,9 @@ export const QueryOptedOutOfRewardsAccountsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryOptedOutOfRewardsAccountsResponse", value: QueryOptedOutOfRewardsAccountsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOptedOutOfRewardsAccountsResponse.typeUrl, QueryOptedOutOfRewardsAccountsResponse); function createBaseQueryFeeDiscountAccountInfoRequest(): QueryFeeDiscountAccountInfoRequest { return { account: "" @@ -10837,9 +10924,9 @@ export const QueryFeeDiscountAccountInfoRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountAccountInfoRequest", value: QueryFeeDiscountAccountInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeeDiscountAccountInfoRequest.typeUrl, QueryFeeDiscountAccountInfoRequest); function createBaseQueryFeeDiscountAccountInfoResponse(): QueryFeeDiscountAccountInfoResponse { return { tierLevel: BigInt(0), @@ -10931,9 +11018,12 @@ export const QueryFeeDiscountAccountInfoResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountAccountInfoResponse", value: QueryFeeDiscountAccountInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountTierInfo.registerTypeUrl(); + FeeDiscountTierTTL.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeeDiscountAccountInfoResponse.typeUrl, QueryFeeDiscountAccountInfoResponse); function createBaseQueryFeeDiscountScheduleRequest(): QueryFeeDiscountScheduleRequest { return {}; } @@ -10988,9 +11078,9 @@ export const QueryFeeDiscountScheduleRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountScheduleRequest", value: QueryFeeDiscountScheduleRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeeDiscountScheduleRequest.typeUrl, QueryFeeDiscountScheduleRequest); function createBaseQueryFeeDiscountScheduleResponse(): QueryFeeDiscountScheduleResponse { return { feeDiscountSchedule: undefined @@ -11058,9 +11148,11 @@ export const QueryFeeDiscountScheduleResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountScheduleResponse", value: QueryFeeDiscountScheduleResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeeDiscountScheduleResponse.typeUrl, QueryFeeDiscountScheduleResponse); function createBaseQueryBalanceMismatchesRequest(): QueryBalanceMismatchesRequest { return { dustFactor: BigInt(0) @@ -11128,9 +11220,9 @@ export const QueryBalanceMismatchesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceMismatchesRequest", value: QueryBalanceMismatchesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceMismatchesRequest.typeUrl, QueryBalanceMismatchesRequest); function createBaseBalanceMismatch(): BalanceMismatch { return { subaccountId: "", @@ -11270,9 +11362,9 @@ export const BalanceMismatch = { typeUrl: "/injective.exchange.v1beta1.BalanceMismatch", value: BalanceMismatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BalanceMismatch.typeUrl, BalanceMismatch); function createBaseQueryBalanceMismatchesResponse(): QueryBalanceMismatchesResponse { return { balanceMismatches: [] @@ -11342,9 +11434,11 @@ export const QueryBalanceMismatchesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceMismatchesResponse", value: QueryBalanceMismatchesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BalanceMismatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceMismatchesResponse.typeUrl, QueryBalanceMismatchesResponse); function createBaseQueryBalanceWithBalanceHoldsRequest(): QueryBalanceWithBalanceHoldsRequest { return {}; } @@ -11399,9 +11493,9 @@ export const QueryBalanceWithBalanceHoldsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceWithBalanceHoldsRequest", value: QueryBalanceWithBalanceHoldsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceWithBalanceHoldsRequest.typeUrl, QueryBalanceWithBalanceHoldsRequest); function createBaseBalanceWithMarginHold(): BalanceWithMarginHold { return { subaccountId: "", @@ -11517,9 +11611,9 @@ export const BalanceWithMarginHold = { typeUrl: "/injective.exchange.v1beta1.BalanceWithMarginHold", value: BalanceWithMarginHold.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BalanceWithMarginHold.typeUrl, BalanceWithMarginHold); function createBaseQueryBalanceWithBalanceHoldsResponse(): QueryBalanceWithBalanceHoldsResponse { return { balanceWithBalanceHolds: [] @@ -11589,9 +11683,11 @@ export const QueryBalanceWithBalanceHoldsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceWithBalanceHoldsResponse", value: QueryBalanceWithBalanceHoldsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BalanceWithMarginHold.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceWithBalanceHoldsResponse.typeUrl, QueryBalanceWithBalanceHoldsResponse); function createBaseQueryFeeDiscountTierStatisticsRequest(): QueryFeeDiscountTierStatisticsRequest { return {}; } @@ -11646,9 +11742,9 @@ export const QueryFeeDiscountTierStatisticsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountTierStatisticsRequest", value: QueryFeeDiscountTierStatisticsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeeDiscountTierStatisticsRequest.typeUrl, QueryFeeDiscountTierStatisticsRequest); function createBaseTierStatistic(): TierStatistic { return { tier: BigInt(0), @@ -11728,9 +11824,9 @@ export const TierStatistic = { typeUrl: "/injective.exchange.v1beta1.TierStatistic", value: TierStatistic.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TierStatistic.typeUrl, TierStatistic); function createBaseQueryFeeDiscountTierStatisticsResponse(): QueryFeeDiscountTierStatisticsResponse { return { statistics: [] @@ -11800,9 +11896,11 @@ export const QueryFeeDiscountTierStatisticsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountTierStatisticsResponse", value: QueryFeeDiscountTierStatisticsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TierStatistic.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeeDiscountTierStatisticsResponse.typeUrl, QueryFeeDiscountTierStatisticsResponse); function createBaseMitoVaultInfosRequest(): MitoVaultInfosRequest { return {}; } @@ -11857,9 +11955,9 @@ export const MitoVaultInfosRequest = { typeUrl: "/injective.exchange.v1beta1.MitoVaultInfosRequest", value: MitoVaultInfosRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MitoVaultInfosRequest.typeUrl, MitoVaultInfosRequest); function createBaseMitoVaultInfosResponse(): MitoVaultInfosResponse { return { masterAddresses: [], @@ -11971,9 +12069,9 @@ export const MitoVaultInfosResponse = { typeUrl: "/injective.exchange.v1beta1.MitoVaultInfosResponse", value: MitoVaultInfosResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MitoVaultInfosResponse.typeUrl, MitoVaultInfosResponse); function createBaseQueryMarketIDFromVaultRequest(): QueryMarketIDFromVaultRequest { return { vaultAddress: "" @@ -12041,9 +12139,9 @@ export const QueryMarketIDFromVaultRequest = { typeUrl: "/injective.exchange.v1beta1.QueryMarketIDFromVaultRequest", value: QueryMarketIDFromVaultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketIDFromVaultRequest.typeUrl, QueryMarketIDFromVaultRequest); function createBaseQueryMarketIDFromVaultResponse(): QueryMarketIDFromVaultResponse { return { marketId: "" @@ -12111,9 +12209,9 @@ export const QueryMarketIDFromVaultResponse = { typeUrl: "/injective.exchange.v1beta1.QueryMarketIDFromVaultResponse", value: QueryMarketIDFromVaultResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketIDFromVaultResponse.typeUrl, QueryMarketIDFromVaultResponse); function createBaseQueryHistoricalTradeRecordsRequest(): QueryHistoricalTradeRecordsRequest { return { marketId: "" @@ -12181,9 +12279,9 @@ export const QueryHistoricalTradeRecordsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryHistoricalTradeRecordsRequest", value: QueryHistoricalTradeRecordsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalTradeRecordsRequest.typeUrl, QueryHistoricalTradeRecordsRequest); function createBaseQueryHistoricalTradeRecordsResponse(): QueryHistoricalTradeRecordsResponse { return { tradeRecords: [] @@ -12253,9 +12351,11 @@ export const QueryHistoricalTradeRecordsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryHistoricalTradeRecordsResponse", value: QueryHistoricalTradeRecordsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TradeRecords.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalTradeRecordsResponse.typeUrl, QueryHistoricalTradeRecordsResponse); function createBaseTradeHistoryOptions(): TradeHistoryOptions { return { tradeGroupingSec: BigInt(0), @@ -12359,9 +12459,9 @@ export const TradeHistoryOptions = { typeUrl: "/injective.exchange.v1beta1.TradeHistoryOptions", value: TradeHistoryOptions.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradeHistoryOptions.typeUrl, TradeHistoryOptions); function createBaseQueryMarketVolatilityRequest(): QueryMarketVolatilityRequest { return { marketId: "", @@ -12441,9 +12541,11 @@ export const QueryMarketVolatilityRequest = { typeUrl: "/injective.exchange.v1beta1.QueryMarketVolatilityRequest", value: QueryMarketVolatilityRequest.encode(message).finish() }; + }, + registerTypeUrl() { + TradeHistoryOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryMarketVolatilityRequest.typeUrl, QueryMarketVolatilityRequest); function createBaseQueryMarketVolatilityResponse(): QueryMarketVolatilityResponse { return { volatility: "", @@ -12537,9 +12639,12 @@ export const QueryMarketVolatilityResponse = { typeUrl: "/injective.exchange.v1beta1.QueryMarketVolatilityResponse", value: QueryMarketVolatilityResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MetadataStatistics.registerTypeUrl(); + TradeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryMarketVolatilityResponse.typeUrl, QueryMarketVolatilityResponse); function createBaseQueryBinaryMarketsRequest(): QueryBinaryMarketsRequest { return { status: "" @@ -12607,9 +12712,9 @@ export const QueryBinaryMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryBinaryMarketsRequest", value: QueryBinaryMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBinaryMarketsRequest.typeUrl, QueryBinaryMarketsRequest); function createBaseQueryBinaryMarketsResponse(): QueryBinaryMarketsResponse { return { markets: [] @@ -12679,9 +12784,11 @@ export const QueryBinaryMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryBinaryMarketsResponse", value: QueryBinaryMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BinaryOptionsMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBinaryMarketsResponse.typeUrl, QueryBinaryMarketsResponse); function createBaseQueryTraderDerivativeConditionalOrdersRequest(): QueryTraderDerivativeConditionalOrdersRequest { return { subaccountId: "", @@ -12761,9 +12868,9 @@ export const QueryTraderDerivativeConditionalOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeConditionalOrdersRequest", value: QueryTraderDerivativeConditionalOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderDerivativeConditionalOrdersRequest.typeUrl, QueryTraderDerivativeConditionalOrdersRequest); function createBaseTrimmedDerivativeConditionalOrder(): TrimmedDerivativeConditionalOrder { return { price: "", @@ -12915,9 +13022,9 @@ export const TrimmedDerivativeConditionalOrder = { typeUrl: "/injective.exchange.v1beta1.TrimmedDerivativeConditionalOrder", value: TrimmedDerivativeConditionalOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TrimmedDerivativeConditionalOrder.typeUrl, TrimmedDerivativeConditionalOrder); function createBaseQueryTraderDerivativeConditionalOrdersResponse(): QueryTraderDerivativeConditionalOrdersResponse { return { orders: [] @@ -12987,9 +13094,11 @@ export const QueryTraderDerivativeConditionalOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeConditionalOrdersResponse", value: QueryTraderDerivativeConditionalOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeConditionalOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTraderDerivativeConditionalOrdersResponse.typeUrl, QueryTraderDerivativeConditionalOrdersResponse); function createBaseQueryMarketAtomicExecutionFeeMultiplierRequest(): QueryMarketAtomicExecutionFeeMultiplierRequest { return { marketId: "" @@ -13057,9 +13166,9 @@ export const QueryMarketAtomicExecutionFeeMultiplierRequest = { typeUrl: "/injective.exchange.v1beta1.QueryMarketAtomicExecutionFeeMultiplierRequest", value: QueryMarketAtomicExecutionFeeMultiplierRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketAtomicExecutionFeeMultiplierRequest.typeUrl, QueryMarketAtomicExecutionFeeMultiplierRequest); function createBaseQueryMarketAtomicExecutionFeeMultiplierResponse(): QueryMarketAtomicExecutionFeeMultiplierResponse { return { multiplier: "" @@ -13127,9 +13236,9 @@ export const QueryMarketAtomicExecutionFeeMultiplierResponse = { typeUrl: "/injective.exchange.v1beta1.QueryMarketAtomicExecutionFeeMultiplierResponse", value: QueryMarketAtomicExecutionFeeMultiplierResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketAtomicExecutionFeeMultiplierResponse.typeUrl, QueryMarketAtomicExecutionFeeMultiplierResponse); function createBaseQueryActiveStakeGrantRequest(): QueryActiveStakeGrantRequest { return { grantee: "" @@ -13197,9 +13306,9 @@ export const QueryActiveStakeGrantRequest = { typeUrl: "/injective.exchange.v1beta1.QueryActiveStakeGrantRequest", value: QueryActiveStakeGrantRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryActiveStakeGrantRequest.typeUrl, QueryActiveStakeGrantRequest); function createBaseQueryActiveStakeGrantResponse(): QueryActiveStakeGrantResponse { return { grant: undefined, @@ -13279,9 +13388,12 @@ export const QueryActiveStakeGrantResponse = { typeUrl: "/injective.exchange.v1beta1.QueryActiveStakeGrantResponse", value: QueryActiveStakeGrantResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ActiveGrant.registerTypeUrl(); + EffectiveGrant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryActiveStakeGrantResponse.typeUrl, QueryActiveStakeGrantResponse); function createBaseQueryGrantAuthorizationRequest(): QueryGrantAuthorizationRequest { return { granter: "", @@ -13361,9 +13473,9 @@ export const QueryGrantAuthorizationRequest = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationRequest", value: QueryGrantAuthorizationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryGrantAuthorizationRequest.typeUrl, QueryGrantAuthorizationRequest); function createBaseQueryGrantAuthorizationResponse(): QueryGrantAuthorizationResponse { return { amount: "" @@ -13431,9 +13543,9 @@ export const QueryGrantAuthorizationResponse = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationResponse", value: QueryGrantAuthorizationResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryGrantAuthorizationResponse.typeUrl, QueryGrantAuthorizationResponse); function createBaseQueryGrantAuthorizationsRequest(): QueryGrantAuthorizationsRequest { return { granter: "" @@ -13501,9 +13613,9 @@ export const QueryGrantAuthorizationsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationsRequest", value: QueryGrantAuthorizationsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryGrantAuthorizationsRequest.typeUrl, QueryGrantAuthorizationsRequest); function createBaseQueryGrantAuthorizationsResponse(): QueryGrantAuthorizationsResponse { return { totalGrantAmount: "", @@ -13585,6 +13697,8 @@ export const QueryGrantAuthorizationsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationsResponse", value: QueryGrantAuthorizationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryGrantAuthorizationsResponse.typeUrl, QueryGrantAuthorizationsResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/exchange/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/injective/exchange/v1beta1/tx.rpc.func.ts index 9bbb917c..b8b7b4be 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgDeposit, MsgWithdraw, MsgInstantSpotMarketLaunch, MsgInstantPerpetualMarketLaunch, MsgInstantExpiryFuturesMarketLaunch, MsgCreateSpotLimitOrder, MsgBatchCreateSpotLimitOrders, MsgCreateSpotMarketOrder, MsgCancelSpotOrder, MsgBatchCancelSpotOrders, MsgBatchUpdateOrders, MsgPrivilegedExecuteContract, MsgCreateDerivativeLimitOrder, MsgBatchCreateDerivativeLimitOrders, MsgCreateDerivativeMarketOrder, MsgCancelDerivativeOrder, MsgBatchCancelDerivativeOrders, MsgInstantBinaryOptionsMarketLaunch, MsgCreateBinaryOptionsLimitOrder, MsgCreateBinaryOptionsMarketOrder, MsgCancelBinaryOptionsOrder, MsgBatchCancelBinaryOptionsOrders, MsgSubaccountTransfer, MsgExternalTransfer, MsgLiquidatePosition, MsgEmergencySettleMarket, MsgIncreasePositionMargin, MsgDecreasePositionMargin, MsgRewardsOptOut, MsgAdminUpdateBinaryOptionsMarket, MsgUpdateParams, MsgUpdateSpotMarket, MsgUpdateDerivativeMarket, MsgAuthorizeStakeGrants, MsgActivateStakeGrant } from "./tx"; export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const useDeposit = buildUseMutation({ builderMutationFn: createDeposit @@ -15,7 +16,8 @@ export const createWithdraw = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgWithdraw.typeUrl, encoders: toEncoders(MsgWithdraw), - converters: toConverters(MsgWithdraw) + converters: toConverters(MsgWithdraw), + deps: [MsgWithdraw] }); export const useWithdraw = buildUseMutation({ builderMutationFn: createWithdraw @@ -24,7 +26,8 @@ export const createInstantSpotMarketLaunch = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgInstantSpotMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantSpotMarketLaunch), - converters: toConverters(MsgInstantSpotMarketLaunch) + converters: toConverters(MsgInstantSpotMarketLaunch), + deps: [MsgInstantSpotMarketLaunch] }); export const useInstantSpotMarketLaunch = buildUseMutation({ builderMutationFn: createInstantSpotMarketLaunch @@ -33,7 +36,8 @@ export const createInstantPerpetualMarketLaunch = (clientResolver?: SigningClien clientResolver, typeUrl: MsgInstantPerpetualMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantPerpetualMarketLaunch), - converters: toConverters(MsgInstantPerpetualMarketLaunch) + converters: toConverters(MsgInstantPerpetualMarketLaunch), + deps: [MsgInstantPerpetualMarketLaunch] }); export const useInstantPerpetualMarketLaunch = buildUseMutation({ builderMutationFn: createInstantPerpetualMarketLaunch @@ -42,7 +46,8 @@ export const createInstantExpiryFuturesMarketLaunch = (clientResolver?: SigningC clientResolver, typeUrl: MsgInstantExpiryFuturesMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantExpiryFuturesMarketLaunch), - converters: toConverters(MsgInstantExpiryFuturesMarketLaunch) + converters: toConverters(MsgInstantExpiryFuturesMarketLaunch), + deps: [MsgInstantExpiryFuturesMarketLaunch] }); export const useInstantExpiryFuturesMarketLaunch = buildUseMutation({ builderMutationFn: createInstantExpiryFuturesMarketLaunch @@ -51,7 +56,8 @@ export const createCreateSpotLimitOrder = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgCreateSpotLimitOrder.typeUrl, encoders: toEncoders(MsgCreateSpotLimitOrder), - converters: toConverters(MsgCreateSpotLimitOrder) + converters: toConverters(MsgCreateSpotLimitOrder), + deps: [MsgCreateSpotLimitOrder] }); export const useCreateSpotLimitOrder = buildUseMutation({ builderMutationFn: createCreateSpotLimitOrder @@ -60,7 +66,8 @@ export const createBatchCreateSpotLimitOrders = (clientResolver?: SigningClientR clientResolver, typeUrl: MsgBatchCreateSpotLimitOrders.typeUrl, encoders: toEncoders(MsgBatchCreateSpotLimitOrders), - converters: toConverters(MsgBatchCreateSpotLimitOrders) + converters: toConverters(MsgBatchCreateSpotLimitOrders), + deps: [MsgBatchCreateSpotLimitOrders] }); export const useBatchCreateSpotLimitOrders = buildUseMutation({ builderMutationFn: createBatchCreateSpotLimitOrders @@ -69,7 +76,8 @@ export const createCreateSpotMarketOrder = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgCreateSpotMarketOrder.typeUrl, encoders: toEncoders(MsgCreateSpotMarketOrder), - converters: toConverters(MsgCreateSpotMarketOrder) + converters: toConverters(MsgCreateSpotMarketOrder), + deps: [MsgCreateSpotMarketOrder] }); export const useCreateSpotMarketOrder = buildUseMutation({ builderMutationFn: createCreateSpotMarketOrder @@ -78,7 +86,8 @@ export const createCancelSpotOrder = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgCancelSpotOrder.typeUrl, encoders: toEncoders(MsgCancelSpotOrder), - converters: toConverters(MsgCancelSpotOrder) + converters: toConverters(MsgCancelSpotOrder), + deps: [MsgCancelSpotOrder] }); export const useCancelSpotOrder = buildUseMutation({ builderMutationFn: createCancelSpotOrder @@ -87,7 +96,8 @@ export const createBatchCancelSpotOrders = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgBatchCancelSpotOrders.typeUrl, encoders: toEncoders(MsgBatchCancelSpotOrders), - converters: toConverters(MsgBatchCancelSpotOrders) + converters: toConverters(MsgBatchCancelSpotOrders), + deps: [MsgBatchCancelSpotOrders] }); export const useBatchCancelSpotOrders = buildUseMutation({ builderMutationFn: createBatchCancelSpotOrders @@ -96,7 +106,8 @@ export const createBatchUpdateOrders = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgBatchUpdateOrders.typeUrl, encoders: toEncoders(MsgBatchUpdateOrders), - converters: toConverters(MsgBatchUpdateOrders) + converters: toConverters(MsgBatchUpdateOrders), + deps: [MsgBatchUpdateOrders] }); export const useBatchUpdateOrders = buildUseMutation({ builderMutationFn: createBatchUpdateOrders @@ -105,7 +116,8 @@ export const createPrivilegedExecuteContract = (clientResolver?: SigningClientRe clientResolver, typeUrl: MsgPrivilegedExecuteContract.typeUrl, encoders: toEncoders(MsgPrivilegedExecuteContract), - converters: toConverters(MsgPrivilegedExecuteContract) + converters: toConverters(MsgPrivilegedExecuteContract), + deps: [MsgPrivilegedExecuteContract] }); export const usePrivilegedExecuteContract = buildUseMutation({ builderMutationFn: createPrivilegedExecuteContract @@ -114,7 +126,8 @@ export const createCreateDerivativeLimitOrder = (clientResolver?: SigningClientR clientResolver, typeUrl: MsgCreateDerivativeLimitOrder.typeUrl, encoders: toEncoders(MsgCreateDerivativeLimitOrder), - converters: toConverters(MsgCreateDerivativeLimitOrder) + converters: toConverters(MsgCreateDerivativeLimitOrder), + deps: [MsgCreateDerivativeLimitOrder] }); export const useCreateDerivativeLimitOrder = buildUseMutation({ builderMutationFn: createCreateDerivativeLimitOrder @@ -123,7 +136,8 @@ export const createBatchCreateDerivativeLimitOrders = (clientResolver?: SigningC clientResolver, typeUrl: MsgBatchCreateDerivativeLimitOrders.typeUrl, encoders: toEncoders(MsgBatchCreateDerivativeLimitOrders), - converters: toConverters(MsgBatchCreateDerivativeLimitOrders) + converters: toConverters(MsgBatchCreateDerivativeLimitOrders), + deps: [MsgBatchCreateDerivativeLimitOrders] }); export const useBatchCreateDerivativeLimitOrders = buildUseMutation({ builderMutationFn: createBatchCreateDerivativeLimitOrders @@ -132,7 +146,8 @@ export const createCreateDerivativeMarketOrder = (clientResolver?: SigningClient clientResolver, typeUrl: MsgCreateDerivativeMarketOrder.typeUrl, encoders: toEncoders(MsgCreateDerivativeMarketOrder), - converters: toConverters(MsgCreateDerivativeMarketOrder) + converters: toConverters(MsgCreateDerivativeMarketOrder), + deps: [MsgCreateDerivativeMarketOrder] }); export const useCreateDerivativeMarketOrder = buildUseMutation({ builderMutationFn: createCreateDerivativeMarketOrder @@ -141,7 +156,8 @@ export const createCancelDerivativeOrder = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgCancelDerivativeOrder.typeUrl, encoders: toEncoders(MsgCancelDerivativeOrder), - converters: toConverters(MsgCancelDerivativeOrder) + converters: toConverters(MsgCancelDerivativeOrder), + deps: [MsgCancelDerivativeOrder] }); export const useCancelDerivativeOrder = buildUseMutation({ builderMutationFn: createCancelDerivativeOrder @@ -150,7 +166,8 @@ export const createBatchCancelDerivativeOrders = (clientResolver?: SigningClient clientResolver, typeUrl: MsgBatchCancelDerivativeOrders.typeUrl, encoders: toEncoders(MsgBatchCancelDerivativeOrders), - converters: toConverters(MsgBatchCancelDerivativeOrders) + converters: toConverters(MsgBatchCancelDerivativeOrders), + deps: [MsgBatchCancelDerivativeOrders] }); export const useBatchCancelDerivativeOrders = buildUseMutation({ builderMutationFn: createBatchCancelDerivativeOrders @@ -159,7 +176,8 @@ export const createInstantBinaryOptionsMarketLaunch = (clientResolver?: SigningC clientResolver, typeUrl: MsgInstantBinaryOptionsMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantBinaryOptionsMarketLaunch), - converters: toConverters(MsgInstantBinaryOptionsMarketLaunch) + converters: toConverters(MsgInstantBinaryOptionsMarketLaunch), + deps: [MsgInstantBinaryOptionsMarketLaunch] }); export const useInstantBinaryOptionsMarketLaunch = buildUseMutation({ builderMutationFn: createInstantBinaryOptionsMarketLaunch @@ -168,7 +186,8 @@ export const createCreateBinaryOptionsLimitOrder = (clientResolver?: SigningClie clientResolver, typeUrl: MsgCreateBinaryOptionsLimitOrder.typeUrl, encoders: toEncoders(MsgCreateBinaryOptionsLimitOrder), - converters: toConverters(MsgCreateBinaryOptionsLimitOrder) + converters: toConverters(MsgCreateBinaryOptionsLimitOrder), + deps: [MsgCreateBinaryOptionsLimitOrder] }); export const useCreateBinaryOptionsLimitOrder = buildUseMutation({ builderMutationFn: createCreateBinaryOptionsLimitOrder @@ -177,7 +196,8 @@ export const createCreateBinaryOptionsMarketOrder = (clientResolver?: SigningCli clientResolver, typeUrl: MsgCreateBinaryOptionsMarketOrder.typeUrl, encoders: toEncoders(MsgCreateBinaryOptionsMarketOrder), - converters: toConverters(MsgCreateBinaryOptionsMarketOrder) + converters: toConverters(MsgCreateBinaryOptionsMarketOrder), + deps: [MsgCreateBinaryOptionsMarketOrder] }); export const useCreateBinaryOptionsMarketOrder = buildUseMutation({ builderMutationFn: createCreateBinaryOptionsMarketOrder @@ -186,7 +206,8 @@ export const createCancelBinaryOptionsOrder = (clientResolver?: SigningClientRes clientResolver, typeUrl: MsgCancelBinaryOptionsOrder.typeUrl, encoders: toEncoders(MsgCancelBinaryOptionsOrder), - converters: toConverters(MsgCancelBinaryOptionsOrder) + converters: toConverters(MsgCancelBinaryOptionsOrder), + deps: [MsgCancelBinaryOptionsOrder] }); export const useCancelBinaryOptionsOrder = buildUseMutation({ builderMutationFn: createCancelBinaryOptionsOrder @@ -195,7 +216,8 @@ export const createBatchCancelBinaryOptionsOrders = (clientResolver?: SigningCli clientResolver, typeUrl: MsgBatchCancelBinaryOptionsOrders.typeUrl, encoders: toEncoders(MsgBatchCancelBinaryOptionsOrders), - converters: toConverters(MsgBatchCancelBinaryOptionsOrders) + converters: toConverters(MsgBatchCancelBinaryOptionsOrders), + deps: [MsgBatchCancelBinaryOptionsOrders] }); export const useBatchCancelBinaryOptionsOrders = buildUseMutation({ builderMutationFn: createBatchCancelBinaryOptionsOrders @@ -204,7 +226,8 @@ export const createSubaccountTransfer = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgSubaccountTransfer.typeUrl, encoders: toEncoders(MsgSubaccountTransfer), - converters: toConverters(MsgSubaccountTransfer) + converters: toConverters(MsgSubaccountTransfer), + deps: [MsgSubaccountTransfer] }); export const useSubaccountTransfer = buildUseMutation({ builderMutationFn: createSubaccountTransfer @@ -213,7 +236,8 @@ export const createExternalTransfer = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgExternalTransfer.typeUrl, encoders: toEncoders(MsgExternalTransfer), - converters: toConverters(MsgExternalTransfer) + converters: toConverters(MsgExternalTransfer), + deps: [MsgExternalTransfer] }); export const useExternalTransfer = buildUseMutation({ builderMutationFn: createExternalTransfer @@ -222,7 +246,8 @@ export const createLiquidatePosition = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgLiquidatePosition.typeUrl, encoders: toEncoders(MsgLiquidatePosition), - converters: toConverters(MsgLiquidatePosition) + converters: toConverters(MsgLiquidatePosition), + deps: [MsgLiquidatePosition] }); export const useLiquidatePosition = buildUseMutation({ builderMutationFn: createLiquidatePosition @@ -231,7 +256,8 @@ export const createEmergencySettleMarket = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgEmergencySettleMarket.typeUrl, encoders: toEncoders(MsgEmergencySettleMarket), - converters: toConverters(MsgEmergencySettleMarket) + converters: toConverters(MsgEmergencySettleMarket), + deps: [MsgEmergencySettleMarket] }); export const useEmergencySettleMarket = buildUseMutation({ builderMutationFn: createEmergencySettleMarket @@ -240,7 +266,8 @@ export const createIncreasePositionMargin = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgIncreasePositionMargin.typeUrl, encoders: toEncoders(MsgIncreasePositionMargin), - converters: toConverters(MsgIncreasePositionMargin) + converters: toConverters(MsgIncreasePositionMargin), + deps: [MsgIncreasePositionMargin] }); export const useIncreasePositionMargin = buildUseMutation({ builderMutationFn: createIncreasePositionMargin @@ -249,7 +276,8 @@ export const createDecreasePositionMargin = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgDecreasePositionMargin.typeUrl, encoders: toEncoders(MsgDecreasePositionMargin), - converters: toConverters(MsgDecreasePositionMargin) + converters: toConverters(MsgDecreasePositionMargin), + deps: [MsgDecreasePositionMargin] }); export const useDecreasePositionMargin = buildUseMutation({ builderMutationFn: createDecreasePositionMargin @@ -258,7 +286,8 @@ export const createRewardsOptOut = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgRewardsOptOut.typeUrl, encoders: toEncoders(MsgRewardsOptOut), - converters: toConverters(MsgRewardsOptOut) + converters: toConverters(MsgRewardsOptOut), + deps: [MsgRewardsOptOut] }); export const useRewardsOptOut = buildUseMutation({ builderMutationFn: createRewardsOptOut @@ -267,7 +296,8 @@ export const createAdminUpdateBinaryOptionsMarket = (clientResolver?: SigningCli clientResolver, typeUrl: MsgAdminUpdateBinaryOptionsMarket.typeUrl, encoders: toEncoders(MsgAdminUpdateBinaryOptionsMarket), - converters: toConverters(MsgAdminUpdateBinaryOptionsMarket) + converters: toConverters(MsgAdminUpdateBinaryOptionsMarket), + deps: [MsgAdminUpdateBinaryOptionsMarket] }); export const useAdminUpdateBinaryOptionsMarket = buildUseMutation({ builderMutationFn: createAdminUpdateBinaryOptionsMarket @@ -276,7 +306,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -285,7 +316,8 @@ export const createUpdateSpotMarket = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgUpdateSpotMarket.typeUrl, encoders: toEncoders(MsgUpdateSpotMarket), - converters: toConverters(MsgUpdateSpotMarket) + converters: toConverters(MsgUpdateSpotMarket), + deps: [MsgUpdateSpotMarket] }); export const useUpdateSpotMarket = buildUseMutation({ builderMutationFn: createUpdateSpotMarket @@ -294,7 +326,8 @@ export const createUpdateDerivativeMarket = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgUpdateDerivativeMarket.typeUrl, encoders: toEncoders(MsgUpdateDerivativeMarket), - converters: toConverters(MsgUpdateDerivativeMarket) + converters: toConverters(MsgUpdateDerivativeMarket), + deps: [MsgUpdateDerivativeMarket] }); export const useUpdateDerivativeMarket = buildUseMutation({ builderMutationFn: createUpdateDerivativeMarket @@ -303,7 +336,8 @@ export const createAuthorizeStakeGrants = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgAuthorizeStakeGrants.typeUrl, encoders: toEncoders(MsgAuthorizeStakeGrants), - converters: toConverters(MsgAuthorizeStakeGrants) + converters: toConverters(MsgAuthorizeStakeGrants), + deps: [MsgAuthorizeStakeGrants] }); export const useAuthorizeStakeGrants = buildUseMutation({ builderMutationFn: createAuthorizeStakeGrants @@ -312,7 +346,8 @@ export const createActivateStakeGrant = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgActivateStakeGrant.typeUrl, encoders: toEncoders(MsgActivateStakeGrant), - converters: toConverters(MsgActivateStakeGrant) + converters: toConverters(MsgActivateStakeGrant), + deps: [MsgActivateStakeGrant] }); export const useActivateStakeGrant = buildUseMutation({ builderMutationFn: createActivateStakeGrant diff --git a/libs/injective-react/src/injective/exchange/v1beta1/tx.ts b/libs/injective-react/src/injective/exchange/v1beta1/tx.ts index 5508578a..208197e1 100644 --- a/libs/injective-react/src/injective/exchange/v1beta1/tx.ts +++ b/libs/injective-react/src/injective/exchange/v1beta1/tx.ts @@ -4,7 +4,6 @@ import { SpotOrder, SpotOrderAmino, DerivativeOrder, DerivativeOrderAmino, Marke import { Params, ParamsAmino } from "../../../cosmos/distribution/v1beta1/distribution"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface MsgUpdateSpotMarket { /** current admin address of the associated market */ admin: string; @@ -2125,10 +2124,9 @@ export const MsgUpdateSpotMarket = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateSpotMarket", value: MsgUpdateSpotMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateSpotMarket.typeUrl, MsgUpdateSpotMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateSpotMarket.aminoType, MsgUpdateSpotMarket.typeUrl); function createBaseMsgUpdateSpotMarketResponse(): MsgUpdateSpotMarketResponse { return {}; } @@ -2183,9 +2181,9 @@ export const MsgUpdateSpotMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateSpotMarketResponse", value: MsgUpdateSpotMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateSpotMarketResponse.typeUrl, MsgUpdateSpotMarketResponse); function createBaseMsgUpdateDerivativeMarket(): MsgUpdateDerivativeMarket { return { admin: "", @@ -2344,10 +2342,9 @@ export const MsgUpdateDerivativeMarket = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateDerivativeMarket", value: MsgUpdateDerivativeMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateDerivativeMarket.typeUrl, MsgUpdateDerivativeMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateDerivativeMarket.aminoType, MsgUpdateDerivativeMarket.typeUrl); function createBaseMsgUpdateDerivativeMarketResponse(): MsgUpdateDerivativeMarketResponse { return {}; } @@ -2402,9 +2399,9 @@ export const MsgUpdateDerivativeMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateDerivativeMarketResponse", value: MsgUpdateDerivativeMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateDerivativeMarketResponse.typeUrl, MsgUpdateDerivativeMarketResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2491,10 +2488,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2549,9 +2547,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgDeposit(): MsgDeposit { return { sender: "", @@ -2650,10 +2648,11 @@ export const MsgDeposit = { typeUrl: "/injective.exchange.v1beta1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -2708,9 +2707,9 @@ export const MsgDepositResponse = { typeUrl: "/injective.exchange.v1beta1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); function createBaseMsgWithdraw(): MsgWithdraw { return { sender: "", @@ -2809,10 +2808,11 @@ export const MsgWithdraw = { typeUrl: "/injective.exchange.v1beta1.MsgWithdraw", value: MsgWithdraw.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdraw.typeUrl, MsgWithdraw); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdraw.aminoType, MsgWithdraw.typeUrl); function createBaseMsgWithdrawResponse(): MsgWithdrawResponse { return {}; } @@ -2867,9 +2867,9 @@ export const MsgWithdrawResponse = { typeUrl: "/injective.exchange.v1beta1.MsgWithdrawResponse", value: MsgWithdrawResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawResponse.typeUrl, MsgWithdrawResponse); function createBaseMsgCreateSpotLimitOrder(): MsgCreateSpotLimitOrder { return { sender: "", @@ -2956,10 +2956,11 @@ export const MsgCreateSpotLimitOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder", value: MsgCreateSpotLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateSpotLimitOrder.typeUrl, MsgCreateSpotLimitOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateSpotLimitOrder.aminoType, MsgCreateSpotLimitOrder.typeUrl); function createBaseMsgCreateSpotLimitOrderResponse(): MsgCreateSpotLimitOrderResponse { return { orderHash: "", @@ -3039,9 +3040,9 @@ export const MsgCreateSpotLimitOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotLimitOrderResponse", value: MsgCreateSpotLimitOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateSpotLimitOrderResponse.typeUrl, MsgCreateSpotLimitOrderResponse); function createBaseMsgBatchCreateSpotLimitOrders(): MsgBatchCreateSpotLimitOrders { return { sender: "", @@ -3130,10 +3131,11 @@ export const MsgBatchCreateSpotLimitOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrders", value: MsgBatchCreateSpotLimitOrders.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCreateSpotLimitOrders.typeUrl, MsgBatchCreateSpotLimitOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCreateSpotLimitOrders.aminoType, MsgBatchCreateSpotLimitOrders.typeUrl); function createBaseMsgBatchCreateSpotLimitOrdersResponse(): MsgBatchCreateSpotLimitOrdersResponse { return { orderHashes: [], @@ -3231,9 +3233,9 @@ export const MsgBatchCreateSpotLimitOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrdersResponse", value: MsgBatchCreateSpotLimitOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCreateSpotLimitOrdersResponse.typeUrl, MsgBatchCreateSpotLimitOrdersResponse); function createBaseMsgInstantSpotMarketLaunch(): MsgInstantSpotMarketLaunch { return { sender: "", @@ -3380,10 +3382,9 @@ export const MsgInstantSpotMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch", value: MsgInstantSpotMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantSpotMarketLaunch.typeUrl, MsgInstantSpotMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantSpotMarketLaunch.aminoType, MsgInstantSpotMarketLaunch.typeUrl); function createBaseMsgInstantSpotMarketLaunchResponse(): MsgInstantSpotMarketLaunchResponse { return {}; } @@ -3438,9 +3439,9 @@ export const MsgInstantSpotMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunchResponse", value: MsgInstantSpotMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantSpotMarketLaunchResponse.typeUrl, MsgInstantSpotMarketLaunchResponse); function createBaseMsgInstantPerpetualMarketLaunch(): MsgInstantPerpetualMarketLaunch { return { sender: "", @@ -3671,10 +3672,9 @@ export const MsgInstantPerpetualMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantPerpetualMarketLaunch", value: MsgInstantPerpetualMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantPerpetualMarketLaunch.typeUrl, MsgInstantPerpetualMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantPerpetualMarketLaunch.aminoType, MsgInstantPerpetualMarketLaunch.typeUrl); function createBaseMsgInstantPerpetualMarketLaunchResponse(): MsgInstantPerpetualMarketLaunchResponse { return {}; } @@ -3729,9 +3729,9 @@ export const MsgInstantPerpetualMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantPerpetualMarketLaunchResponse", value: MsgInstantPerpetualMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantPerpetualMarketLaunchResponse.typeUrl, MsgInstantPerpetualMarketLaunchResponse); function createBaseMsgInstantBinaryOptionsMarketLaunch(): MsgInstantBinaryOptionsMarketLaunch { return { sender: "", @@ -3974,10 +3974,9 @@ export const MsgInstantBinaryOptionsMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch", value: MsgInstantBinaryOptionsMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantBinaryOptionsMarketLaunch.typeUrl, MsgInstantBinaryOptionsMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantBinaryOptionsMarketLaunch.aminoType, MsgInstantBinaryOptionsMarketLaunch.typeUrl); function createBaseMsgInstantBinaryOptionsMarketLaunchResponse(): MsgInstantBinaryOptionsMarketLaunchResponse { return {}; } @@ -4032,9 +4031,9 @@ export const MsgInstantBinaryOptionsMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunchResponse", value: MsgInstantBinaryOptionsMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantBinaryOptionsMarketLaunchResponse.typeUrl, MsgInstantBinaryOptionsMarketLaunchResponse); function createBaseMsgInstantExpiryFuturesMarketLaunch(): MsgInstantExpiryFuturesMarketLaunch { return { sender: "", @@ -4277,10 +4276,9 @@ export const MsgInstantExpiryFuturesMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantExpiryFuturesMarketLaunch", value: MsgInstantExpiryFuturesMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantExpiryFuturesMarketLaunch.typeUrl, MsgInstantExpiryFuturesMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantExpiryFuturesMarketLaunch.aminoType, MsgInstantExpiryFuturesMarketLaunch.typeUrl); function createBaseMsgInstantExpiryFuturesMarketLaunchResponse(): MsgInstantExpiryFuturesMarketLaunchResponse { return {}; } @@ -4335,9 +4333,9 @@ export const MsgInstantExpiryFuturesMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantExpiryFuturesMarketLaunchResponse", value: MsgInstantExpiryFuturesMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantExpiryFuturesMarketLaunchResponse.typeUrl, MsgInstantExpiryFuturesMarketLaunchResponse); function createBaseMsgCreateSpotMarketOrder(): MsgCreateSpotMarketOrder { return { sender: "", @@ -4424,10 +4422,11 @@ export const MsgCreateSpotMarketOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder", value: MsgCreateSpotMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateSpotMarketOrder.typeUrl, MsgCreateSpotMarketOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateSpotMarketOrder.aminoType, MsgCreateSpotMarketOrder.typeUrl); function createBaseMsgCreateSpotMarketOrderResponse(): MsgCreateSpotMarketOrderResponse { return { orderHash: "", @@ -4519,9 +4518,11 @@ export const MsgCreateSpotMarketOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotMarketOrderResponse", value: MsgCreateSpotMarketOrderResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarketOrderResults.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateSpotMarketOrderResponse.typeUrl, MsgCreateSpotMarketOrderResponse); function createBaseSpotMarketOrderResults(): SpotMarketOrderResults { return { quantity: "", @@ -4613,9 +4614,9 @@ export const SpotMarketOrderResults = { typeUrl: "/injective.exchange.v1beta1.SpotMarketOrderResults", value: SpotMarketOrderResults.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SpotMarketOrderResults.typeUrl, SpotMarketOrderResults); function createBaseMsgCreateDerivativeLimitOrder(): MsgCreateDerivativeLimitOrder { return { sender: "", @@ -4702,10 +4703,11 @@ export const MsgCreateDerivativeLimitOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder", value: MsgCreateDerivativeLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateDerivativeLimitOrder.typeUrl, MsgCreateDerivativeLimitOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateDerivativeLimitOrder.aminoType, MsgCreateDerivativeLimitOrder.typeUrl); function createBaseMsgCreateDerivativeLimitOrderResponse(): MsgCreateDerivativeLimitOrderResponse { return { orderHash: "", @@ -4785,9 +4787,9 @@ export const MsgCreateDerivativeLimitOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrderResponse", value: MsgCreateDerivativeLimitOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateDerivativeLimitOrderResponse.typeUrl, MsgCreateDerivativeLimitOrderResponse); function createBaseMsgCreateBinaryOptionsLimitOrder(): MsgCreateBinaryOptionsLimitOrder { return { sender: "", @@ -4874,10 +4876,11 @@ export const MsgCreateBinaryOptionsLimitOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder", value: MsgCreateBinaryOptionsLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsLimitOrder.typeUrl, MsgCreateBinaryOptionsLimitOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateBinaryOptionsLimitOrder.aminoType, MsgCreateBinaryOptionsLimitOrder.typeUrl); function createBaseMsgCreateBinaryOptionsLimitOrderResponse(): MsgCreateBinaryOptionsLimitOrderResponse { return { orderHash: "", @@ -4957,9 +4960,9 @@ export const MsgCreateBinaryOptionsLimitOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrderResponse", value: MsgCreateBinaryOptionsLimitOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsLimitOrderResponse.typeUrl, MsgCreateBinaryOptionsLimitOrderResponse); function createBaseMsgBatchCreateDerivativeLimitOrders(): MsgBatchCreateDerivativeLimitOrders { return { sender: "", @@ -5048,10 +5051,11 @@ export const MsgBatchCreateDerivativeLimitOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrders", value: MsgBatchCreateDerivativeLimitOrders.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCreateDerivativeLimitOrders.typeUrl, MsgBatchCreateDerivativeLimitOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCreateDerivativeLimitOrders.aminoType, MsgBatchCreateDerivativeLimitOrders.typeUrl); function createBaseMsgBatchCreateDerivativeLimitOrdersResponse(): MsgBatchCreateDerivativeLimitOrdersResponse { return { orderHashes: [], @@ -5149,9 +5153,9 @@ export const MsgBatchCreateDerivativeLimitOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrdersResponse", value: MsgBatchCreateDerivativeLimitOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCreateDerivativeLimitOrdersResponse.typeUrl, MsgBatchCreateDerivativeLimitOrdersResponse); function createBaseMsgCancelSpotOrder(): MsgCancelSpotOrder { return { sender: "", @@ -5274,10 +5278,9 @@ export const MsgCancelSpotOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCancelSpotOrder", value: MsgCancelSpotOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSpotOrder.typeUrl, MsgCancelSpotOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelSpotOrder.aminoType, MsgCancelSpotOrder.typeUrl); function createBaseMsgCancelSpotOrderResponse(): MsgCancelSpotOrderResponse { return {}; } @@ -5332,9 +5335,9 @@ export const MsgCancelSpotOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCancelSpotOrderResponse", value: MsgCancelSpotOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSpotOrderResponse.typeUrl, MsgCancelSpotOrderResponse); function createBaseMsgBatchCancelSpotOrders(): MsgBatchCancelSpotOrders { return { sender: "", @@ -5423,10 +5426,11 @@ export const MsgBatchCancelSpotOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders", value: MsgBatchCancelSpotOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCancelSpotOrders.typeUrl, MsgBatchCancelSpotOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCancelSpotOrders.aminoType, MsgBatchCancelSpotOrders.typeUrl); function createBaseMsgBatchCancelSpotOrdersResponse(): MsgBatchCancelSpotOrdersResponse { return { success: [] @@ -5505,9 +5509,9 @@ export const MsgBatchCancelSpotOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelSpotOrdersResponse", value: MsgBatchCancelSpotOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCancelSpotOrdersResponse.typeUrl, MsgBatchCancelSpotOrdersResponse); function createBaseMsgBatchCancelBinaryOptionsOrders(): MsgBatchCancelBinaryOptionsOrders { return { sender: "", @@ -5596,10 +5600,11 @@ export const MsgBatchCancelBinaryOptionsOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders", value: MsgBatchCancelBinaryOptionsOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCancelBinaryOptionsOrders.typeUrl, MsgBatchCancelBinaryOptionsOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCancelBinaryOptionsOrders.aminoType, MsgBatchCancelBinaryOptionsOrders.typeUrl); function createBaseMsgBatchCancelBinaryOptionsOrdersResponse(): MsgBatchCancelBinaryOptionsOrdersResponse { return { success: [] @@ -5678,9 +5683,9 @@ export const MsgBatchCancelBinaryOptionsOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrdersResponse", value: MsgBatchCancelBinaryOptionsOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCancelBinaryOptionsOrdersResponse.typeUrl, MsgBatchCancelBinaryOptionsOrdersResponse); function createBaseMsgBatchUpdateOrders(): MsgBatchUpdateOrders { return { sender: "", @@ -5893,10 +5898,13 @@ export const MsgBatchUpdateOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchUpdateOrders", value: MsgBatchUpdateOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); + SpotOrder.registerTypeUrl(); + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchUpdateOrders.typeUrl, MsgBatchUpdateOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchUpdateOrders.aminoType, MsgBatchUpdateOrders.typeUrl); function createBaseMsgBatchUpdateOrdersResponse(): MsgBatchUpdateOrdersResponse { return { spotCancelSuccess: [], @@ -6147,9 +6155,9 @@ export const MsgBatchUpdateOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchUpdateOrdersResponse", value: MsgBatchUpdateOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchUpdateOrdersResponse.typeUrl, MsgBatchUpdateOrdersResponse); function createBaseMsgCreateDerivativeMarketOrder(): MsgCreateDerivativeMarketOrder { return { sender: "", @@ -6236,10 +6244,11 @@ export const MsgCreateDerivativeMarketOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder", value: MsgCreateDerivativeMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateDerivativeMarketOrder.typeUrl, MsgCreateDerivativeMarketOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateDerivativeMarketOrder.aminoType, MsgCreateDerivativeMarketOrder.typeUrl); function createBaseMsgCreateDerivativeMarketOrderResponse(): MsgCreateDerivativeMarketOrderResponse { return { orderHash: "", @@ -6331,9 +6340,11 @@ export const MsgCreateDerivativeMarketOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrderResponse", value: MsgCreateDerivativeMarketOrderResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarketOrderResults.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateDerivativeMarketOrderResponse.typeUrl, MsgCreateDerivativeMarketOrderResponse); function createBaseDerivativeMarketOrderResults(): DerivativeMarketOrderResults { return { quantity: "", @@ -6449,9 +6460,11 @@ export const DerivativeMarketOrderResults = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketOrderResults", value: DerivativeMarketOrderResults.encode(message).finish() }; + }, + registerTypeUrl() { + PositionDelta.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketOrderResults.typeUrl, DerivativeMarketOrderResults); function createBaseMsgCreateBinaryOptionsMarketOrder(): MsgCreateBinaryOptionsMarketOrder { return { sender: "", @@ -6538,10 +6551,11 @@ export const MsgCreateBinaryOptionsMarketOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder", value: MsgCreateBinaryOptionsMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsMarketOrder.typeUrl, MsgCreateBinaryOptionsMarketOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateBinaryOptionsMarketOrder.aminoType, MsgCreateBinaryOptionsMarketOrder.typeUrl); function createBaseMsgCreateBinaryOptionsMarketOrderResponse(): MsgCreateBinaryOptionsMarketOrderResponse { return { orderHash: "", @@ -6633,9 +6647,11 @@ export const MsgCreateBinaryOptionsMarketOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrderResponse", value: MsgCreateBinaryOptionsMarketOrderResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarketOrderResults.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsMarketOrderResponse.typeUrl, MsgCreateBinaryOptionsMarketOrderResponse); function createBaseMsgCancelDerivativeOrder(): MsgCancelDerivativeOrder { return { sender: "", @@ -6770,10 +6786,9 @@ export const MsgCancelDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCancelDerivativeOrder", value: MsgCancelDerivativeOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelDerivativeOrder.typeUrl, MsgCancelDerivativeOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelDerivativeOrder.aminoType, MsgCancelDerivativeOrder.typeUrl); function createBaseMsgCancelDerivativeOrderResponse(): MsgCancelDerivativeOrderResponse { return {}; } @@ -6828,9 +6843,9 @@ export const MsgCancelDerivativeOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCancelDerivativeOrderResponse", value: MsgCancelDerivativeOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelDerivativeOrderResponse.typeUrl, MsgCancelDerivativeOrderResponse); function createBaseMsgCancelBinaryOptionsOrder(): MsgCancelBinaryOptionsOrder { return { sender: "", @@ -6965,10 +6980,9 @@ export const MsgCancelBinaryOptionsOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder", value: MsgCancelBinaryOptionsOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelBinaryOptionsOrder.typeUrl, MsgCancelBinaryOptionsOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelBinaryOptionsOrder.aminoType, MsgCancelBinaryOptionsOrder.typeUrl); function createBaseMsgCancelBinaryOptionsOrderResponse(): MsgCancelBinaryOptionsOrderResponse { return {}; } @@ -7023,9 +7037,9 @@ export const MsgCancelBinaryOptionsOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrderResponse", value: MsgCancelBinaryOptionsOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelBinaryOptionsOrderResponse.typeUrl, MsgCancelBinaryOptionsOrderResponse); function createBaseOrderData(): OrderData { return { marketId: "", @@ -7141,9 +7155,9 @@ export const OrderData = { typeUrl: "/injective.exchange.v1beta1.OrderData", value: OrderData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderData.typeUrl, OrderData); function createBaseMsgBatchCancelDerivativeOrders(): MsgBatchCancelDerivativeOrders { return { sender: "", @@ -7232,10 +7246,11 @@ export const MsgBatchCancelDerivativeOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders", value: MsgBatchCancelDerivativeOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCancelDerivativeOrders.typeUrl, MsgBatchCancelDerivativeOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCancelDerivativeOrders.aminoType, MsgBatchCancelDerivativeOrders.typeUrl); function createBaseMsgBatchCancelDerivativeOrdersResponse(): MsgBatchCancelDerivativeOrdersResponse { return { success: [] @@ -7314,9 +7329,9 @@ export const MsgBatchCancelDerivativeOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrdersResponse", value: MsgBatchCancelDerivativeOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCancelDerivativeOrdersResponse.typeUrl, MsgBatchCancelDerivativeOrdersResponse); function createBaseMsgSubaccountTransfer(): MsgSubaccountTransfer { return { sender: "", @@ -7427,10 +7442,11 @@ export const MsgSubaccountTransfer = { typeUrl: "/injective.exchange.v1beta1.MsgSubaccountTransfer", value: MsgSubaccountTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubaccountTransfer.typeUrl, MsgSubaccountTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubaccountTransfer.aminoType, MsgSubaccountTransfer.typeUrl); function createBaseMsgSubaccountTransferResponse(): MsgSubaccountTransferResponse { return {}; } @@ -7485,9 +7501,9 @@ export const MsgSubaccountTransferResponse = { typeUrl: "/injective.exchange.v1beta1.MsgSubaccountTransferResponse", value: MsgSubaccountTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubaccountTransferResponse.typeUrl, MsgSubaccountTransferResponse); function createBaseMsgExternalTransfer(): MsgExternalTransfer { return { sender: "", @@ -7598,10 +7614,11 @@ export const MsgExternalTransfer = { typeUrl: "/injective.exchange.v1beta1.MsgExternalTransfer", value: MsgExternalTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExternalTransfer.typeUrl, MsgExternalTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExternalTransfer.aminoType, MsgExternalTransfer.typeUrl); function createBaseMsgExternalTransferResponse(): MsgExternalTransferResponse { return {}; } @@ -7656,9 +7673,9 @@ export const MsgExternalTransferResponse = { typeUrl: "/injective.exchange.v1beta1.MsgExternalTransferResponse", value: MsgExternalTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExternalTransferResponse.typeUrl, MsgExternalTransferResponse); function createBaseMsgLiquidatePosition(): MsgLiquidatePosition { return { sender: "", @@ -7769,10 +7786,11 @@ export const MsgLiquidatePosition = { typeUrl: "/injective.exchange.v1beta1.MsgLiquidatePosition", value: MsgLiquidatePosition.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgLiquidatePosition.typeUrl, MsgLiquidatePosition); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLiquidatePosition.aminoType, MsgLiquidatePosition.typeUrl); function createBaseMsgLiquidatePositionResponse(): MsgLiquidatePositionResponse { return {}; } @@ -7827,9 +7845,9 @@ export const MsgLiquidatePositionResponse = { typeUrl: "/injective.exchange.v1beta1.MsgLiquidatePositionResponse", value: MsgLiquidatePositionResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgLiquidatePositionResponse.typeUrl, MsgLiquidatePositionResponse); function createBaseMsgEmergencySettleMarket(): MsgEmergencySettleMarket { return { sender: "", @@ -7928,10 +7946,9 @@ export const MsgEmergencySettleMarket = { typeUrl: "/injective.exchange.v1beta1.MsgEmergencySettleMarket", value: MsgEmergencySettleMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEmergencySettleMarket.typeUrl, MsgEmergencySettleMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEmergencySettleMarket.aminoType, MsgEmergencySettleMarket.typeUrl); function createBaseMsgEmergencySettleMarketResponse(): MsgEmergencySettleMarketResponse { return {}; } @@ -7986,9 +8003,9 @@ export const MsgEmergencySettleMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgEmergencySettleMarketResponse", value: MsgEmergencySettleMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEmergencySettleMarketResponse.typeUrl, MsgEmergencySettleMarketResponse); function createBaseMsgIncreasePositionMargin(): MsgIncreasePositionMargin { return { sender: "", @@ -8111,10 +8128,9 @@ export const MsgIncreasePositionMargin = { typeUrl: "/injective.exchange.v1beta1.MsgIncreasePositionMargin", value: MsgIncreasePositionMargin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIncreasePositionMargin.typeUrl, MsgIncreasePositionMargin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIncreasePositionMargin.aminoType, MsgIncreasePositionMargin.typeUrl); function createBaseMsgIncreasePositionMarginResponse(): MsgIncreasePositionMarginResponse { return {}; } @@ -8169,9 +8185,9 @@ export const MsgIncreasePositionMarginResponse = { typeUrl: "/injective.exchange.v1beta1.MsgIncreasePositionMarginResponse", value: MsgIncreasePositionMarginResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIncreasePositionMarginResponse.typeUrl, MsgIncreasePositionMarginResponse); function createBaseMsgDecreasePositionMargin(): MsgDecreasePositionMargin { return { sender: "", @@ -8294,10 +8310,9 @@ export const MsgDecreasePositionMargin = { typeUrl: "/injective.exchange.v1beta1.MsgDecreasePositionMargin", value: MsgDecreasePositionMargin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDecreasePositionMargin.typeUrl, MsgDecreasePositionMargin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDecreasePositionMargin.aminoType, MsgDecreasePositionMargin.typeUrl); function createBaseMsgDecreasePositionMarginResponse(): MsgDecreasePositionMarginResponse { return {}; } @@ -8352,9 +8367,9 @@ export const MsgDecreasePositionMarginResponse = { typeUrl: "/injective.exchange.v1beta1.MsgDecreasePositionMarginResponse", value: MsgDecreasePositionMarginResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDecreasePositionMarginResponse.typeUrl, MsgDecreasePositionMarginResponse); function createBaseMsgPrivilegedExecuteContract(): MsgPrivilegedExecuteContract { return { sender: "", @@ -8465,10 +8480,9 @@ export const MsgPrivilegedExecuteContract = { typeUrl: "/injective.exchange.v1beta1.MsgPrivilegedExecuteContract", value: MsgPrivilegedExecuteContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPrivilegedExecuteContract.typeUrl, MsgPrivilegedExecuteContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPrivilegedExecuteContract.aminoType, MsgPrivilegedExecuteContract.typeUrl); function createBaseMsgPrivilegedExecuteContractResponse(): MsgPrivilegedExecuteContractResponse { return { fundsDiff: [] @@ -8538,9 +8552,11 @@ export const MsgPrivilegedExecuteContractResponse = { typeUrl: "/injective.exchange.v1beta1.MsgPrivilegedExecuteContractResponse", value: MsgPrivilegedExecuteContractResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgPrivilegedExecuteContractResponse.typeUrl, MsgPrivilegedExecuteContractResponse); function createBaseMsgRewardsOptOut(): MsgRewardsOptOut { return { sender: "" @@ -8615,10 +8631,9 @@ export const MsgRewardsOptOut = { typeUrl: "/injective.exchange.v1beta1.MsgRewardsOptOut", value: MsgRewardsOptOut.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRewardsOptOut.typeUrl, MsgRewardsOptOut); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRewardsOptOut.aminoType, MsgRewardsOptOut.typeUrl); function createBaseMsgRewardsOptOutResponse(): MsgRewardsOptOutResponse { return {}; } @@ -8673,9 +8688,9 @@ export const MsgRewardsOptOutResponse = { typeUrl: "/injective.exchange.v1beta1.MsgRewardsOptOutResponse", value: MsgRewardsOptOutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRewardsOptOutResponse.typeUrl, MsgRewardsOptOutResponse); function createBaseMsgReclaimLockedFunds(): MsgReclaimLockedFunds { return { sender: "", @@ -8774,10 +8789,9 @@ export const MsgReclaimLockedFunds = { typeUrl: "/injective.exchange.v1beta1.MsgReclaimLockedFunds", value: MsgReclaimLockedFunds.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgReclaimLockedFunds.typeUrl, MsgReclaimLockedFunds); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgReclaimLockedFunds.aminoType, MsgReclaimLockedFunds.typeUrl); function createBaseMsgReclaimLockedFundsResponse(): MsgReclaimLockedFundsResponse { return {}; } @@ -8832,9 +8846,9 @@ export const MsgReclaimLockedFundsResponse = { typeUrl: "/injective.exchange.v1beta1.MsgReclaimLockedFundsResponse", value: MsgReclaimLockedFundsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgReclaimLockedFundsResponse.typeUrl, MsgReclaimLockedFundsResponse); function createBaseMsgSignData(): MsgSignData { return { signer: new Uint8Array(), @@ -8914,9 +8928,9 @@ export const MsgSignData = { typeUrl: "/injective.exchange.v1beta1.MsgSignData", value: MsgSignData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSignData.typeUrl, MsgSignData); function createBaseMsgSignDoc(): MsgSignDoc { return { signType: "", @@ -8996,9 +9010,11 @@ export const MsgSignDoc = { typeUrl: "/injective.exchange.v1beta1.MsgSignDoc", value: MsgSignDoc.encode(message).finish() }; + }, + registerTypeUrl() { + MsgSignData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSignDoc.typeUrl, MsgSignDoc); function createBaseMsgAdminUpdateBinaryOptionsMarket(): MsgAdminUpdateBinaryOptionsMarket { return { sender: "", @@ -9133,10 +9149,9 @@ export const MsgAdminUpdateBinaryOptionsMarket = { typeUrl: "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket", value: MsgAdminUpdateBinaryOptionsMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAdminUpdateBinaryOptionsMarket.typeUrl, MsgAdminUpdateBinaryOptionsMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAdminUpdateBinaryOptionsMarket.aminoType, MsgAdminUpdateBinaryOptionsMarket.typeUrl); function createBaseMsgAdminUpdateBinaryOptionsMarketResponse(): MsgAdminUpdateBinaryOptionsMarketResponse { return {}; } @@ -9191,9 +9206,9 @@ export const MsgAdminUpdateBinaryOptionsMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarketResponse", value: MsgAdminUpdateBinaryOptionsMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAdminUpdateBinaryOptionsMarketResponse.typeUrl, MsgAdminUpdateBinaryOptionsMarketResponse); function createBaseMsgAuthorizeStakeGrants(): MsgAuthorizeStakeGrants { return { sender: "", @@ -9282,10 +9297,11 @@ export const MsgAuthorizeStakeGrants = { typeUrl: "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants", value: MsgAuthorizeStakeGrants.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgAuthorizeStakeGrants.typeUrl, MsgAuthorizeStakeGrants); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAuthorizeStakeGrants.aminoType, MsgAuthorizeStakeGrants.typeUrl); function createBaseMsgAuthorizeStakeGrantsResponse(): MsgAuthorizeStakeGrantsResponse { return {}; } @@ -9340,9 +9356,9 @@ export const MsgAuthorizeStakeGrantsResponse = { typeUrl: "/injective.exchange.v1beta1.MsgAuthorizeStakeGrantsResponse", value: MsgAuthorizeStakeGrantsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAuthorizeStakeGrantsResponse.typeUrl, MsgAuthorizeStakeGrantsResponse); function createBaseMsgActivateStakeGrant(): MsgActivateStakeGrant { return { sender: "", @@ -9429,10 +9445,9 @@ export const MsgActivateStakeGrant = { typeUrl: "/injective.exchange.v1beta1.MsgActivateStakeGrant", value: MsgActivateStakeGrant.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgActivateStakeGrant.typeUrl, MsgActivateStakeGrant); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgActivateStakeGrant.aminoType, MsgActivateStakeGrant.typeUrl); function createBaseMsgActivateStakeGrantResponse(): MsgActivateStakeGrantResponse { return {}; } @@ -9487,6 +9502,6 @@ export const MsgActivateStakeGrantResponse = { typeUrl: "/injective.exchange.v1beta1.MsgActivateStakeGrantResponse", value: MsgActivateStakeGrantResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgActivateStakeGrantResponse.typeUrl, MsgActivateStakeGrantResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/insurance/v1beta1/events.ts b/libs/injective-react/src/injective/insurance/v1beta1/events.ts index b4bca225..c605ca91 100644 --- a/libs/injective-react/src/injective/insurance/v1beta1/events.ts +++ b/libs/injective-react/src/injective/insurance/v1beta1/events.ts @@ -2,7 +2,6 @@ import { InsuranceFund, InsuranceFundAmino, RedemptionSchedule, RedemptionSchedu import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventInsuranceFundUpdate { fund?: InsuranceFund; } @@ -164,9 +163,11 @@ export const EventInsuranceFundUpdate = { typeUrl: "/injective.insurance.v1beta1.EventInsuranceFundUpdate", value: EventInsuranceFundUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + InsuranceFund.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventInsuranceFundUpdate.typeUrl, EventInsuranceFundUpdate); function createBaseEventRequestRedemption(): EventRequestRedemption { return { schedule: undefined @@ -234,9 +235,11 @@ export const EventRequestRedemption = { typeUrl: "/injective.insurance.v1beta1.EventRequestRedemption", value: EventRequestRedemption.encode(message).finish() }; + }, + registerTypeUrl() { + RedemptionSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventRequestRedemption.typeUrl, EventRequestRedemption); function createBaseEventWithdrawRedemption(): EventWithdrawRedemption { return { schedule: undefined, @@ -316,9 +319,12 @@ export const EventWithdrawRedemption = { typeUrl: "/injective.insurance.v1beta1.EventWithdrawRedemption", value: EventWithdrawRedemption.encode(message).finish() }; + }, + registerTypeUrl() { + RedemptionSchedule.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventWithdrawRedemption.typeUrl, EventWithdrawRedemption); function createBaseEventUnderwrite(): EventUnderwrite { return { underwriter: "", @@ -422,9 +428,11 @@ export const EventUnderwrite = { typeUrl: "/injective.insurance.v1beta1.EventUnderwrite", value: EventUnderwrite.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventUnderwrite.typeUrl, EventUnderwrite); function createBaseEventInsuranceWithdraw(): EventInsuranceWithdraw { return { marketId: "", @@ -516,6 +524,8 @@ export const EventInsuranceWithdraw = { typeUrl: "/injective.insurance.v1beta1.EventInsuranceWithdraw", value: EventInsuranceWithdraw.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventInsuranceWithdraw.typeUrl, EventInsuranceWithdraw); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/insurance/v1beta1/genesis.ts b/libs/injective-react/src/injective/insurance/v1beta1/genesis.ts index ee8fb73c..e2356ea9 100644 --- a/libs/injective-react/src/injective/insurance/v1beta1/genesis.ts +++ b/libs/injective-react/src/injective/insurance/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, InsuranceFund, InsuranceFundAmino, RedemptionSchedule, RedemptionScheduleAmino } from "./insurance"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the insurance module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to insurance. */ @@ -173,6 +172,10 @@ export const GenesisState = { typeUrl: "/injective.insurance.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + InsuranceFund.registerTypeUrl(); + RedemptionSchedule.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/insurance/v1beta1/insurance.ts b/libs/injective-react/src/injective/insurance/v1beta1/insurance.ts index ac3a0186..7f8b0d53 100644 --- a/libs/injective-react/src/injective/insurance/v1beta1/insurance.ts +++ b/libs/injective-react/src/injective/insurance/v1beta1/insurance.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, toTimestamp, fromTimestamp } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { /** * default_redemption_notice_period_duration defines the default minimum @@ -217,10 +216,9 @@ export const Params = { typeUrl: "/injective.insurance.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseInsuranceFund(): InsuranceFund { return { depositDenom: "", @@ -408,9 +406,9 @@ export const InsuranceFund = { typeUrl: "/injective.insurance.v1beta1.InsuranceFund", value: InsuranceFund.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InsuranceFund.typeUrl, InsuranceFund); function createBaseRedemptionSchedule(): RedemptionSchedule { return { id: BigInt(0), @@ -526,6 +524,8 @@ export const RedemptionSchedule = { typeUrl: "/injective.insurance.v1beta1.RedemptionSchedule", value: RedemptionSchedule.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(RedemptionSchedule.typeUrl, RedemptionSchedule); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/insurance/v1beta1/query.rpc.func.ts b/libs/injective-react/src/injective/insurance/v1beta1/query.rpc.func.ts index 7097c72b..f17f2e46 100644 --- a/libs/injective-react/src/injective/insurance/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/insurance/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetInsuranceParams = (clientResolver?: RpcResolver) => buildQ decode: QueryInsuranceParamsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceParams", - clientResolver + clientResolver, + deps: [QueryInsuranceParamsRequest, QueryInsuranceParamsResponse] }); export const useGetInsuranceParams = buildUseQuery({ builderQueryFn: createGetInsuranceParams, @@ -17,7 +18,8 @@ export const createGetInsuranceFund = (clientResolver?: RpcResolver) => buildQue decode: QueryInsuranceFundResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceFund", - clientResolver + clientResolver, + deps: [QueryInsuranceFundRequest, QueryInsuranceFundResponse] }); export const useGetInsuranceFund = buildUseQuery({ builderQueryFn: createGetInsuranceFund, @@ -28,7 +30,8 @@ export const createGetInsuranceFunds = (clientResolver?: RpcResolver) => buildQu decode: QueryInsuranceFundsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceFunds", - clientResolver + clientResolver, + deps: [QueryInsuranceFundsRequest, QueryInsuranceFundsResponse] }); export const useGetInsuranceFunds = buildUseQuery({ builderQueryFn: createGetInsuranceFunds, @@ -39,7 +42,8 @@ export const createGetEstimatedRedemptions = (clientResolver?: RpcResolver) => b decode: QueryEstimatedRedemptionsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "EstimatedRedemptions", - clientResolver + clientResolver, + deps: [QueryEstimatedRedemptionsRequest, QueryEstimatedRedemptionsResponse] }); export const useGetEstimatedRedemptions = buildUseQuery({ builderQueryFn: createGetEstimatedRedemptions, @@ -50,7 +54,8 @@ export const createGetPendingRedemptions = (clientResolver?: RpcResolver) => bui decode: QueryPendingRedemptionsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "PendingRedemptions", - clientResolver + clientResolver, + deps: [QueryPendingRedemptionsRequest, QueryPendingRedemptionsResponse] }); export const useGetPendingRedemptions = buildUseQuery({ builderQueryFn: createGetPendingRedemptions, @@ -61,7 +66,8 @@ export const createGetInsuranceModuleState = (clientResolver?: RpcResolver) => b decode: QueryModuleStateResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetInsuranceModuleState = buildUseQuery({ builderQueryFn: createGetInsuranceModuleState, diff --git a/libs/injective-react/src/injective/insurance/v1beta1/query.ts b/libs/injective-react/src/injective/insurance/v1beta1/query.ts index f8ee7aae..ea1cd75d 100644 --- a/libs/injective-react/src/injective/insurance/v1beta1/query.ts +++ b/libs/injective-react/src/injective/insurance/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * QueryInsuranceParamsRequest is the request type for the Query/InsuranceParams * RPC method. @@ -316,9 +315,9 @@ export const QueryInsuranceParamsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceParamsRequest", value: QueryInsuranceParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryInsuranceParamsRequest.typeUrl, QueryInsuranceParamsRequest); function createBaseQueryInsuranceParamsResponse(): QueryInsuranceParamsResponse { return { params: Params.fromPartial({}) @@ -386,9 +385,11 @@ export const QueryInsuranceParamsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceParamsResponse", value: QueryInsuranceParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryInsuranceParamsResponse.typeUrl, QueryInsuranceParamsResponse); function createBaseQueryInsuranceFundRequest(): QueryInsuranceFundRequest { return { marketId: "" @@ -456,9 +457,9 @@ export const QueryInsuranceFundRequest = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundRequest", value: QueryInsuranceFundRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryInsuranceFundRequest.typeUrl, QueryInsuranceFundRequest); function createBaseQueryInsuranceFundResponse(): QueryInsuranceFundResponse { return { fund: undefined @@ -526,9 +527,11 @@ export const QueryInsuranceFundResponse = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundResponse", value: QueryInsuranceFundResponse.encode(message).finish() }; + }, + registerTypeUrl() { + InsuranceFund.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryInsuranceFundResponse.typeUrl, QueryInsuranceFundResponse); function createBaseQueryInsuranceFundsRequest(): QueryInsuranceFundsRequest { return {}; } @@ -583,9 +586,9 @@ export const QueryInsuranceFundsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundsRequest", value: QueryInsuranceFundsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryInsuranceFundsRequest.typeUrl, QueryInsuranceFundsRequest); function createBaseQueryInsuranceFundsResponse(): QueryInsuranceFundsResponse { return { funds: [] @@ -655,9 +658,11 @@ export const QueryInsuranceFundsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundsResponse", value: QueryInsuranceFundsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + InsuranceFund.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryInsuranceFundsResponse.typeUrl, QueryInsuranceFundsResponse); function createBaseQueryEstimatedRedemptionsRequest(): QueryEstimatedRedemptionsRequest { return { marketId: "", @@ -737,9 +742,9 @@ export const QueryEstimatedRedemptionsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryEstimatedRedemptionsRequest", value: QueryEstimatedRedemptionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryEstimatedRedemptionsRequest.typeUrl, QueryEstimatedRedemptionsRequest); function createBaseQueryEstimatedRedemptionsResponse(): QueryEstimatedRedemptionsResponse { return { amount: [] @@ -809,9 +814,11 @@ export const QueryEstimatedRedemptionsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryEstimatedRedemptionsResponse", value: QueryEstimatedRedemptionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryEstimatedRedemptionsResponse.typeUrl, QueryEstimatedRedemptionsResponse); function createBaseQueryPendingRedemptionsRequest(): QueryPendingRedemptionsRequest { return { marketId: "", @@ -891,9 +898,9 @@ export const QueryPendingRedemptionsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryPendingRedemptionsRequest", value: QueryPendingRedemptionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPendingRedemptionsRequest.typeUrl, QueryPendingRedemptionsRequest); function createBaseQueryPendingRedemptionsResponse(): QueryPendingRedemptionsResponse { return { amount: [] @@ -963,9 +970,11 @@ export const QueryPendingRedemptionsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryPendingRedemptionsResponse", value: QueryPendingRedemptionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPendingRedemptionsResponse.typeUrl, QueryPendingRedemptionsResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -1020,9 +1029,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.insurance.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -1090,6 +1099,8 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.insurance.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/insurance/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/injective/insurance/v1beta1/tx.rpc.func.ts index d4525d1e..506cf94a 100644 --- a/libs/injective-react/src/injective/insurance/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/insurance/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateInsuranceFund, MsgUnderwrite, MsgRequestRedemption, MsgUpdateParams } from "./tx"; export const createCreateInsuranceFund = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateInsuranceFund.typeUrl, encoders: toEncoders(MsgCreateInsuranceFund), - converters: toConverters(MsgCreateInsuranceFund) + converters: toConverters(MsgCreateInsuranceFund), + deps: [MsgCreateInsuranceFund] }); export const useCreateInsuranceFund = buildUseMutation({ builderMutationFn: createCreateInsuranceFund @@ -15,7 +16,8 @@ export const createUnderwrite = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgUnderwrite.typeUrl, encoders: toEncoders(MsgUnderwrite), - converters: toConverters(MsgUnderwrite) + converters: toConverters(MsgUnderwrite), + deps: [MsgUnderwrite] }); export const useUnderwrite = buildUseMutation({ builderMutationFn: createUnderwrite @@ -24,7 +26,8 @@ export const createRequestRedemption = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgRequestRedemption.typeUrl, encoders: toEncoders(MsgRequestRedemption), - converters: toConverters(MsgRequestRedemption) + converters: toConverters(MsgRequestRedemption), + deps: [MsgRequestRedemption] }); export const useRequestRedemption = buildUseMutation({ builderMutationFn: createRequestRedemption @@ -33,7 +36,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/injective-react/src/injective/insurance/v1beta1/tx.ts b/libs/injective-react/src/injective/insurance/v1beta1/tx.ts index 1965e15c..c3d6e361 100644 --- a/libs/injective-react/src/injective/insurance/v1beta1/tx.ts +++ b/libs/injective-react/src/injective/insurance/v1beta1/tx.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Params, ParamsAmino } from "./insurance"; import { isSet, DeepPartial } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateInsuranceFund a message to create an insurance fund for a derivative * market. @@ -364,10 +363,11 @@ export const MsgCreateInsuranceFund = { typeUrl: "/injective.insurance.v1beta1.MsgCreateInsuranceFund", value: MsgCreateInsuranceFund.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateInsuranceFund.typeUrl, MsgCreateInsuranceFund); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateInsuranceFund.aminoType, MsgCreateInsuranceFund.typeUrl); function createBaseMsgCreateInsuranceFundResponse(): MsgCreateInsuranceFundResponse { return {}; } @@ -422,9 +422,9 @@ export const MsgCreateInsuranceFundResponse = { typeUrl: "/injective.insurance.v1beta1.MsgCreateInsuranceFundResponse", value: MsgCreateInsuranceFundResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateInsuranceFundResponse.typeUrl, MsgCreateInsuranceFundResponse); function createBaseMsgUnderwrite(): MsgUnderwrite { return { sender: "", @@ -523,10 +523,11 @@ export const MsgUnderwrite = { typeUrl: "/injective.insurance.v1beta1.MsgUnderwrite", value: MsgUnderwrite.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUnderwrite.typeUrl, MsgUnderwrite); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnderwrite.aminoType, MsgUnderwrite.typeUrl); function createBaseMsgUnderwriteResponse(): MsgUnderwriteResponse { return {}; } @@ -581,9 +582,9 @@ export const MsgUnderwriteResponse = { typeUrl: "/injective.insurance.v1beta1.MsgUnderwriteResponse", value: MsgUnderwriteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnderwriteResponse.typeUrl, MsgUnderwriteResponse); function createBaseMsgRequestRedemption(): MsgRequestRedemption { return { sender: "", @@ -682,10 +683,11 @@ export const MsgRequestRedemption = { typeUrl: "/injective.insurance.v1beta1.MsgRequestRedemption", value: MsgRequestRedemption.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRequestRedemption.typeUrl, MsgRequestRedemption); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRequestRedemption.aminoType, MsgRequestRedemption.typeUrl); function createBaseMsgRequestRedemptionResponse(): MsgRequestRedemptionResponse { return {}; } @@ -740,9 +742,9 @@ export const MsgRequestRedemptionResponse = { typeUrl: "/injective.insurance.v1beta1.MsgRequestRedemptionResponse", value: MsgRequestRedemptionResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestRedemptionResponse.typeUrl, MsgRequestRedemptionResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -829,10 +831,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.insurance.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -887,6 +890,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.insurance.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/ocr/v1beta1/genesis.ts b/libs/injective-react/src/injective/ocr/v1beta1/genesis.ts index 2fd0d991..e502849a 100644 --- a/libs/injective-react/src/injective/ocr/v1beta1/genesis.ts +++ b/libs/injective-react/src/injective/ocr/v1beta1/genesis.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino, FeedConfig, FeedConfigAmino, Transmission, Transmi import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the OCR module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to OCR. */ @@ -352,9 +351,18 @@ export const GenesisState = { typeUrl: "/injective.ocr.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + FeedConfig.registerTypeUrl(); + FeedEpochAndRound.registerTypeUrl(); + FeedTransmission.registerTypeUrl(); + FeedLatestAggregatorRoundIDs.registerTypeUrl(); + RewardPool.registerTypeUrl(); + FeedCounts.registerTypeUrl(); + PendingPayeeship.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseFeedTransmission(): FeedTransmission { return { feedId: "", @@ -434,9 +442,11 @@ export const FeedTransmission = { typeUrl: "/injective.ocr.v1beta1.FeedTransmission", value: FeedTransmission.encode(message).finish() }; + }, + registerTypeUrl() { + Transmission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedTransmission.typeUrl, FeedTransmission); function createBaseFeedEpochAndRound(): FeedEpochAndRound { return { feedId: "", @@ -516,9 +526,11 @@ export const FeedEpochAndRound = { typeUrl: "/injective.ocr.v1beta1.FeedEpochAndRound", value: FeedEpochAndRound.encode(message).finish() }; + }, + registerTypeUrl() { + EpochAndRound.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedEpochAndRound.typeUrl, FeedEpochAndRound); function createBaseFeedLatestAggregatorRoundIDs(): FeedLatestAggregatorRoundIDs { return { feedId: "", @@ -598,9 +610,9 @@ export const FeedLatestAggregatorRoundIDs = { typeUrl: "/injective.ocr.v1beta1.FeedLatestAggregatorRoundIDs", value: FeedLatestAggregatorRoundIDs.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeedLatestAggregatorRoundIDs.typeUrl, FeedLatestAggregatorRoundIDs); function createBaseRewardPool(): RewardPool { return { feedId: "", @@ -680,9 +692,11 @@ export const RewardPool = { typeUrl: "/injective.ocr.v1beta1.RewardPool", value: RewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RewardPool.typeUrl, RewardPool); function createBaseFeedCounts(): FeedCounts { return { feedId: "", @@ -764,9 +778,11 @@ export const FeedCounts = { typeUrl: "/injective.ocr.v1beta1.FeedCounts", value: FeedCounts.encode(message).finish() }; + }, + registerTypeUrl() { + Count.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedCounts.typeUrl, FeedCounts); function createBaseCount(): Count { return { address: "", @@ -846,9 +862,9 @@ export const Count = { typeUrl: "/injective.ocr.v1beta1.Count", value: Count.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Count.typeUrl, Count); function createBasePendingPayeeship(): PendingPayeeship { return { feedId: "", @@ -940,6 +956,6 @@ export const PendingPayeeship = { typeUrl: "/injective.ocr.v1beta1.PendingPayeeship", value: PendingPayeeship.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PendingPayeeship.typeUrl, PendingPayeeship); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/ocr/v1beta1/ocr.ts b/libs/injective-react/src/injective/ocr/v1beta1/ocr.ts index 6a93f048..30f397df 100644 --- a/libs/injective-react/src/injective/ocr/v1beta1/ocr.ts +++ b/libs/injective-react/src/injective/ocr/v1beta1/ocr.ts @@ -751,10 +751,9 @@ export const Params = { typeUrl: "/injective.ocr.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseFeedConfig(): FeedConfig { return { signers: [], @@ -898,9 +897,11 @@ export const FeedConfig = { typeUrl: "/injective.ocr.v1beta1.FeedConfig", value: FeedConfig.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedConfig.typeUrl, FeedConfig); function createBaseFeedConfigInfo(): FeedConfigInfo { return { latestConfigDigest: new Uint8Array(), @@ -1016,9 +1017,9 @@ export const FeedConfigInfo = { typeUrl: "/injective.ocr.v1beta1.FeedConfigInfo", value: FeedConfigInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeedConfigInfo.typeUrl, FeedConfigInfo); function createBaseModuleParams(): ModuleParams { return { feedId: "", @@ -1194,9 +1195,9 @@ export const ModuleParams = { typeUrl: "/injective.ocr.v1beta1.ModuleParams", value: ModuleParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModuleParams.typeUrl, ModuleParams); function createBaseContractConfig(): ContractConfig { return { configCount: BigInt(0), @@ -1340,9 +1341,9 @@ export const ContractConfig = { typeUrl: "/injective.ocr.v1beta1.ContractConfig", value: ContractConfig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ContractConfig.typeUrl, ContractConfig); function createBaseSetConfigProposal(): SetConfigProposal { return { title: "", @@ -1441,10 +1442,13 @@ export const SetConfigProposal = { typeUrl: "/injective.ocr.v1beta1.SetConfigProposal", value: SetConfigProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SetConfigProposal.typeUrl, SetConfigProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SetConfigProposal.aminoType, SetConfigProposal.typeUrl); + FeedConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SetConfigProposal.typeUrl, SetConfigProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SetConfigProposal.aminoType, SetConfigProposal.typeUrl); function createBaseFeedProperties(): FeedProperties { return { feedId: "", @@ -1632,9 +1636,9 @@ export const FeedProperties = { typeUrl: "/injective.ocr.v1beta1.FeedProperties", value: FeedProperties.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeedProperties.typeUrl, FeedProperties); function createBaseSetBatchConfigProposal(): SetBatchConfigProposal { return { title: "", @@ -1775,10 +1779,13 @@ export const SetBatchConfigProposal = { typeUrl: "/injective.ocr.v1beta1.SetBatchConfigProposal", value: SetBatchConfigProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SetBatchConfigProposal.typeUrl, SetBatchConfigProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SetBatchConfigProposal.aminoType, SetBatchConfigProposal.typeUrl); + FeedProperties.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SetBatchConfigProposal.typeUrl, SetBatchConfigProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SetBatchConfigProposal.aminoType, SetBatchConfigProposal.typeUrl); function createBaseOracleObservationsCounts(): OracleObservationsCounts { return { counts: [] @@ -1857,9 +1864,9 @@ export const OracleObservationsCounts = { typeUrl: "/injective.ocr.v1beta1.OracleObservationsCounts", value: OracleObservationsCounts.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleObservationsCounts.typeUrl, OracleObservationsCounts); function createBaseGasReimbursements(): GasReimbursements { return { reimbursements: [] @@ -1929,9 +1936,11 @@ export const GasReimbursements = { typeUrl: "/injective.ocr.v1beta1.GasReimbursements", value: GasReimbursements.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GasReimbursements.typeUrl, GasReimbursements); function createBasePayee(): Payee { return { transmitterAddr: "", @@ -2011,9 +2020,9 @@ export const Payee = { typeUrl: "/injective.ocr.v1beta1.Payee", value: Payee.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Payee.typeUrl, Payee); function createBaseTransmission(): Transmission { return { answer: "", @@ -2105,9 +2114,9 @@ export const Transmission = { typeUrl: "/injective.ocr.v1beta1.Transmission", value: Transmission.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Transmission.typeUrl, Transmission); function createBaseEpochAndRound(): EpochAndRound { return { epoch: BigInt(0), @@ -2187,9 +2196,9 @@ export const EpochAndRound = { typeUrl: "/injective.ocr.v1beta1.EpochAndRound", value: EpochAndRound.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EpochAndRound.typeUrl, EpochAndRound); function createBaseReport(): Report { return { observationsTimestamp: BigInt(0), @@ -2283,9 +2292,9 @@ export const Report = { typeUrl: "/injective.ocr.v1beta1.Report", value: Report.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Report.typeUrl, Report); function createBaseReportToSign(): ReportToSign { return { configDigest: new Uint8Array(), @@ -2401,9 +2410,9 @@ export const ReportToSign = { typeUrl: "/injective.ocr.v1beta1.ReportToSign", value: ReportToSign.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ReportToSign.typeUrl, ReportToSign); function createBaseEventOraclePaid(): EventOraclePaid { return { transmitterAddr: "", @@ -2495,9 +2504,11 @@ export const EventOraclePaid = { typeUrl: "/injective.ocr.v1beta1.EventOraclePaid", value: EventOraclePaid.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventOraclePaid.typeUrl, EventOraclePaid); function createBaseEventAnswerUpdated(): EventAnswerUpdated { return { current: "", @@ -2589,9 +2600,9 @@ export const EventAnswerUpdated = { typeUrl: "/injective.ocr.v1beta1.EventAnswerUpdated", value: EventAnswerUpdated.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAnswerUpdated.typeUrl, EventAnswerUpdated); function createBaseEventNewRound(): EventNewRound { return { roundId: "", @@ -2683,9 +2694,9 @@ export const EventNewRound = { typeUrl: "/injective.ocr.v1beta1.EventNewRound", value: EventNewRound.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventNewRound.typeUrl, EventNewRound); function createBaseEventTransmitted(): EventTransmitted { return { configDigest: new Uint8Array(), @@ -2765,9 +2776,9 @@ export const EventTransmitted = { typeUrl: "/injective.ocr.v1beta1.EventTransmitted", value: EventTransmitted.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventTransmitted.typeUrl, EventTransmitted); function createBaseEventNewTransmission(): EventNewTransmission { return { feedId: "", @@ -2933,9 +2944,11 @@ export const EventNewTransmission = { typeUrl: "/injective.ocr.v1beta1.EventNewTransmission", value: EventNewTransmission.encode(message).finish() }; + }, + registerTypeUrl() { + EpochAndRound.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewTransmission.typeUrl, EventNewTransmission); function createBaseEventConfigSet(): EventConfigSet { return { configDigest: new Uint8Array(), @@ -3039,6 +3052,9 @@ export const EventConfigSet = { typeUrl: "/injective.ocr.v1beta1.EventConfigSet", value: EventConfigSet.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfig.registerTypeUrl(); + FeedConfigInfo.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventConfigSet.typeUrl, EventConfigSet); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/ocr/v1beta1/query.rpc.func.ts b/libs/injective-react/src/injective/ocr/v1beta1/query.rpc.func.ts index 4532c505..cbad00a5 100644 --- a/libs/injective-react/src/injective/ocr/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/ocr/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -17,7 +18,8 @@ export const createGetFeedConfig = (clientResolver?: RpcResolver) => buildQuery< decode: QueryFeedConfigResponse.decode, service: "injective.ocr.v1beta1.Query", method: "FeedConfig", - clientResolver + clientResolver, + deps: [QueryFeedConfigRequest, QueryFeedConfigResponse] }); export const useGetFeedConfig = buildUseQuery({ builderQueryFn: createGetFeedConfig, @@ -28,7 +30,8 @@ export const createGetFeedConfigInfo = (clientResolver?: RpcResolver) => buildQu decode: QueryFeedConfigInfoResponse.decode, service: "injective.ocr.v1beta1.Query", method: "FeedConfigInfo", - clientResolver + clientResolver, + deps: [QueryFeedConfigInfoRequest, QueryFeedConfigInfoResponse] }); export const useGetFeedConfigInfo = buildUseQuery({ builderQueryFn: createGetFeedConfigInfo, @@ -39,7 +42,8 @@ export const createGetLatestRound = (clientResolver?: RpcResolver) => buildQuery decode: QueryLatestRoundResponse.decode, service: "injective.ocr.v1beta1.Query", method: "LatestRound", - clientResolver + clientResolver, + deps: [QueryLatestRoundRequest, QueryLatestRoundResponse] }); export const useGetLatestRound = buildUseQuery({ builderQueryFn: createGetLatestRound, @@ -50,7 +54,8 @@ export const createGetLatestTransmissionDetails = (clientResolver?: RpcResolver) decode: QueryLatestTransmissionDetailsResponse.decode, service: "injective.ocr.v1beta1.Query", method: "LatestTransmissionDetails", - clientResolver + clientResolver, + deps: [QueryLatestTransmissionDetailsRequest, QueryLatestTransmissionDetailsResponse] }); export const useGetLatestTransmissionDetails = buildUseQuery({ builderQueryFn: createGetLatestTransmissionDetails, @@ -61,7 +66,8 @@ export const createGetOwedAmount = (clientResolver?: RpcResolver) => buildQuery< decode: QueryOwedAmountResponse.decode, service: "injective.ocr.v1beta1.Query", method: "OwedAmount", - clientResolver + clientResolver, + deps: [QueryOwedAmountRequest, QueryOwedAmountResponse] }); export const useGetOwedAmount = buildUseQuery({ builderQueryFn: createGetOwedAmount, @@ -72,7 +78,8 @@ export const createGetOcrModuleState = (clientResolver?: RpcResolver) => buildQu decode: QueryModuleStateResponse.decode, service: "injective.ocr.v1beta1.Query", method: "OcrModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetOcrModuleState = buildUseQuery({ builderQueryFn: createGetOcrModuleState, diff --git a/libs/injective-react/src/injective/ocr/v1beta1/query.ts b/libs/injective-react/src/injective/ocr/v1beta1/query.ts index d4dbcdb8..874cc026 100644 --- a/libs/injective-react/src/injective/ocr/v1beta1/query.ts +++ b/libs/injective-react/src/injective/ocr/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { typeUrl: "/injective.ocr.v1beta1.QueryParamsRequest"; @@ -256,9 +255,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.ocr.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -326,9 +325,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.ocr.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryFeedConfigRequest(): QueryFeedConfigRequest { return { feedId: "" @@ -396,9 +397,9 @@ export const QueryFeedConfigRequest = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigRequest", value: QueryFeedConfigRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeedConfigRequest.typeUrl, QueryFeedConfigRequest); function createBaseQueryFeedConfigResponse(): QueryFeedConfigResponse { return { feedConfigInfo: undefined, @@ -478,9 +479,12 @@ export const QueryFeedConfigResponse = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigResponse", value: QueryFeedConfigResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfigInfo.registerTypeUrl(); + FeedConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeedConfigResponse.typeUrl, QueryFeedConfigResponse); function createBaseQueryFeedConfigInfoRequest(): QueryFeedConfigInfoRequest { return { feedId: "" @@ -548,9 +552,9 @@ export const QueryFeedConfigInfoRequest = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigInfoRequest", value: QueryFeedConfigInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeedConfigInfoRequest.typeUrl, QueryFeedConfigInfoRequest); function createBaseQueryFeedConfigInfoResponse(): QueryFeedConfigInfoResponse { return { feedConfigInfo: undefined, @@ -630,9 +634,12 @@ export const QueryFeedConfigInfoResponse = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigInfoResponse", value: QueryFeedConfigInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfigInfo.registerTypeUrl(); + EpochAndRound.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeedConfigInfoResponse.typeUrl, QueryFeedConfigInfoResponse); function createBaseQueryLatestRoundRequest(): QueryLatestRoundRequest { return { feedId: "" @@ -700,9 +707,9 @@ export const QueryLatestRoundRequest = { typeUrl: "/injective.ocr.v1beta1.QueryLatestRoundRequest", value: QueryLatestRoundRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLatestRoundRequest.typeUrl, QueryLatestRoundRequest); function createBaseQueryLatestRoundResponse(): QueryLatestRoundResponse { return { latestRoundId: BigInt(0), @@ -782,9 +789,11 @@ export const QueryLatestRoundResponse = { typeUrl: "/injective.ocr.v1beta1.QueryLatestRoundResponse", value: QueryLatestRoundResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Transmission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLatestRoundResponse.typeUrl, QueryLatestRoundResponse); function createBaseQueryLatestTransmissionDetailsRequest(): QueryLatestTransmissionDetailsRequest { return { feedId: "" @@ -852,9 +861,9 @@ export const QueryLatestTransmissionDetailsRequest = { typeUrl: "/injective.ocr.v1beta1.QueryLatestTransmissionDetailsRequest", value: QueryLatestTransmissionDetailsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLatestTransmissionDetailsRequest.typeUrl, QueryLatestTransmissionDetailsRequest); function createBaseQueryLatestTransmissionDetailsResponse(): QueryLatestTransmissionDetailsResponse { return { configDigest: new Uint8Array(), @@ -946,9 +955,12 @@ export const QueryLatestTransmissionDetailsResponse = { typeUrl: "/injective.ocr.v1beta1.QueryLatestTransmissionDetailsResponse", value: QueryLatestTransmissionDetailsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + EpochAndRound.registerTypeUrl(); + Transmission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLatestTransmissionDetailsResponse.typeUrl, QueryLatestTransmissionDetailsResponse); function createBaseQueryOwedAmountRequest(): QueryOwedAmountRequest { return { transmitter: "" @@ -1016,9 +1028,9 @@ export const QueryOwedAmountRequest = { typeUrl: "/injective.ocr.v1beta1.QueryOwedAmountRequest", value: QueryOwedAmountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOwedAmountRequest.typeUrl, QueryOwedAmountRequest); function createBaseQueryOwedAmountResponse(): QueryOwedAmountResponse { return { amount: Coin.fromPartial({}) @@ -1086,9 +1098,11 @@ export const QueryOwedAmountResponse = { typeUrl: "/injective.ocr.v1beta1.QueryOwedAmountResponse", value: QueryOwedAmountResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOwedAmountResponse.typeUrl, QueryOwedAmountResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -1143,9 +1157,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.ocr.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -1213,6 +1227,8 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.ocr.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/ocr/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/injective/ocr/v1beta1/tx.rpc.func.ts index adda4af6..233e39a2 100644 --- a/libs/injective-react/src/injective/ocr/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/ocr/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateFeed, MsgUpdateFeed, MsgTransmit, MsgFundFeedRewardPool, MsgWithdrawFeedRewardPool, MsgSetPayees, MsgTransferPayeeship, MsgAcceptPayeeship, MsgUpdateParams } from "./tx"; export const createCreateFeed = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateFeed.typeUrl, encoders: toEncoders(MsgCreateFeed), - converters: toConverters(MsgCreateFeed) + converters: toConverters(MsgCreateFeed), + deps: [MsgCreateFeed] }); export const useCreateFeed = buildUseMutation({ builderMutationFn: createCreateFeed @@ -15,7 +16,8 @@ export const createUpdateFeed = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgUpdateFeed.typeUrl, encoders: toEncoders(MsgUpdateFeed), - converters: toConverters(MsgUpdateFeed) + converters: toConverters(MsgUpdateFeed), + deps: [MsgUpdateFeed] }); export const useUpdateFeed = buildUseMutation({ builderMutationFn: createUpdateFeed @@ -24,7 +26,8 @@ export const createTransmit = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgTransmit.typeUrl, encoders: toEncoders(MsgTransmit), - converters: toConverters(MsgTransmit) + converters: toConverters(MsgTransmit), + deps: [MsgTransmit] }); export const useTransmit = buildUseMutation({ builderMutationFn: createTransmit @@ -33,7 +36,8 @@ export const createFundFeedRewardPool = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgFundFeedRewardPool.typeUrl, encoders: toEncoders(MsgFundFeedRewardPool), - converters: toConverters(MsgFundFeedRewardPool) + converters: toConverters(MsgFundFeedRewardPool), + deps: [MsgFundFeedRewardPool] }); export const useFundFeedRewardPool = buildUseMutation({ builderMutationFn: createFundFeedRewardPool @@ -42,7 +46,8 @@ export const createWithdrawFeedRewardPool = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgWithdrawFeedRewardPool.typeUrl, encoders: toEncoders(MsgWithdrawFeedRewardPool), - converters: toConverters(MsgWithdrawFeedRewardPool) + converters: toConverters(MsgWithdrawFeedRewardPool), + deps: [MsgWithdrawFeedRewardPool] }); export const useWithdrawFeedRewardPool = buildUseMutation({ builderMutationFn: createWithdrawFeedRewardPool @@ -51,7 +56,8 @@ export const createSetPayees = (clientResolver?: SigningClientResolver) => build clientResolver, typeUrl: MsgSetPayees.typeUrl, encoders: toEncoders(MsgSetPayees), - converters: toConverters(MsgSetPayees) + converters: toConverters(MsgSetPayees), + deps: [MsgSetPayees] }); export const useSetPayees = buildUseMutation({ builderMutationFn: createSetPayees @@ -60,7 +66,8 @@ export const createTransferPayeeship = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgTransferPayeeship.typeUrl, encoders: toEncoders(MsgTransferPayeeship), - converters: toConverters(MsgTransferPayeeship) + converters: toConverters(MsgTransferPayeeship), + deps: [MsgTransferPayeeship] }); export const useTransferPayeeship = buildUseMutation({ builderMutationFn: createTransferPayeeship @@ -69,7 +76,8 @@ export const createAcceptPayeeship = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgAcceptPayeeship.typeUrl, encoders: toEncoders(MsgAcceptPayeeship), - converters: toConverters(MsgAcceptPayeeship) + converters: toConverters(MsgAcceptPayeeship), + deps: [MsgAcceptPayeeship] }); export const useAcceptPayeeship = buildUseMutation({ builderMutationFn: createAcceptPayeeship @@ -78,7 +86,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/injective-react/src/injective/ocr/v1beta1/tx.ts b/libs/injective-react/src/injective/ocr/v1beta1/tx.ts index d26b2a17..bb298f08 100644 --- a/libs/injective-react/src/injective/ocr/v1beta1/tx.ts +++ b/libs/injective-react/src/injective/ocr/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { FeedConfig, FeedConfigAmino, Report, ReportAmino, Params, ParamsAmino } import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface MsgCreateFeed { sender: string; config?: FeedConfig; @@ -411,10 +410,11 @@ export const MsgCreateFeed = { typeUrl: "/injective.ocr.v1beta1.MsgCreateFeed", value: MsgCreateFeed.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateFeed.typeUrl, MsgCreateFeed); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateFeed.aminoType, MsgCreateFeed.typeUrl); function createBaseMsgCreateFeedResponse(): MsgCreateFeedResponse { return {}; } @@ -469,9 +469,9 @@ export const MsgCreateFeedResponse = { typeUrl: "/injective.ocr.v1beta1.MsgCreateFeedResponse", value: MsgCreateFeedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateFeedResponse.typeUrl, MsgCreateFeedResponse); function createBaseMsgUpdateFeed(): MsgUpdateFeed { return { sender: "", @@ -646,10 +646,9 @@ export const MsgUpdateFeed = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateFeed", value: MsgUpdateFeed.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateFeed.typeUrl, MsgUpdateFeed); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateFeed.aminoType, MsgUpdateFeed.typeUrl); function createBaseMsgUpdateFeedResponse(): MsgUpdateFeedResponse { return {}; } @@ -704,9 +703,9 @@ export const MsgUpdateFeedResponse = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateFeedResponse", value: MsgUpdateFeedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateFeedResponse.typeUrl, MsgUpdateFeedResponse); function createBaseMsgTransmit(): MsgTransmit { return { transmitter: "", @@ -867,10 +866,11 @@ export const MsgTransmit = { typeUrl: "/injective.ocr.v1beta1.MsgTransmit", value: MsgTransmit.encode(message).finish() }; + }, + registerTypeUrl() { + Report.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTransmit.typeUrl, MsgTransmit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransmit.aminoType, MsgTransmit.typeUrl); function createBaseMsgTransmitResponse(): MsgTransmitResponse { return {}; } @@ -925,9 +925,9 @@ export const MsgTransmitResponse = { typeUrl: "/injective.ocr.v1beta1.MsgTransmitResponse", value: MsgTransmitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransmitResponse.typeUrl, MsgTransmitResponse); function createBaseMsgFundFeedRewardPool(): MsgFundFeedRewardPool { return { sender: "", @@ -1026,10 +1026,11 @@ export const MsgFundFeedRewardPool = { typeUrl: "/injective.ocr.v1beta1.MsgFundFeedRewardPool", value: MsgFundFeedRewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgFundFeedRewardPool.typeUrl, MsgFundFeedRewardPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundFeedRewardPool.aminoType, MsgFundFeedRewardPool.typeUrl); function createBaseMsgFundFeedRewardPoolResponse(): MsgFundFeedRewardPoolResponse { return {}; } @@ -1084,9 +1085,9 @@ export const MsgFundFeedRewardPoolResponse = { typeUrl: "/injective.ocr.v1beta1.MsgFundFeedRewardPoolResponse", value: MsgFundFeedRewardPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgFundFeedRewardPoolResponse.typeUrl, MsgFundFeedRewardPoolResponse); function createBaseMsgWithdrawFeedRewardPool(): MsgWithdrawFeedRewardPool { return { sender: "", @@ -1185,10 +1186,11 @@ export const MsgWithdrawFeedRewardPool = { typeUrl: "/injective.ocr.v1beta1.MsgWithdrawFeedRewardPool", value: MsgWithdrawFeedRewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawFeedRewardPool.typeUrl, MsgWithdrawFeedRewardPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawFeedRewardPool.aminoType, MsgWithdrawFeedRewardPool.typeUrl); function createBaseMsgWithdrawFeedRewardPoolResponse(): MsgWithdrawFeedRewardPoolResponse { return {}; } @@ -1243,9 +1245,9 @@ export const MsgWithdrawFeedRewardPoolResponse = { typeUrl: "/injective.ocr.v1beta1.MsgWithdrawFeedRewardPoolResponse", value: MsgWithdrawFeedRewardPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawFeedRewardPoolResponse.typeUrl, MsgWithdrawFeedRewardPoolResponse); function createBaseMsgSetPayees(): MsgSetPayees { return { sender: "", @@ -1360,10 +1362,9 @@ export const MsgSetPayees = { typeUrl: "/injective.ocr.v1beta1.MsgSetPayees", value: MsgSetPayees.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetPayees.typeUrl, MsgSetPayees); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetPayees.aminoType, MsgSetPayees.typeUrl); function createBaseMsgSetPayeesResponse(): MsgSetPayeesResponse { return {}; } @@ -1418,9 +1419,9 @@ export const MsgSetPayeesResponse = { typeUrl: "/injective.ocr.v1beta1.MsgSetPayeesResponse", value: MsgSetPayeesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetPayeesResponse.typeUrl, MsgSetPayeesResponse); function createBaseMsgTransferPayeeship(): MsgTransferPayeeship { return { sender: "", @@ -1531,10 +1532,9 @@ export const MsgTransferPayeeship = { typeUrl: "/injective.ocr.v1beta1.MsgTransferPayeeship", value: MsgTransferPayeeship.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferPayeeship.typeUrl, MsgTransferPayeeship); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransferPayeeship.aminoType, MsgTransferPayeeship.typeUrl); function createBaseMsgTransferPayeeshipResponse(): MsgTransferPayeeshipResponse { return {}; } @@ -1589,9 +1589,9 @@ export const MsgTransferPayeeshipResponse = { typeUrl: "/injective.ocr.v1beta1.MsgTransferPayeeshipResponse", value: MsgTransferPayeeshipResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferPayeeshipResponse.typeUrl, MsgTransferPayeeshipResponse); function createBaseMsgAcceptPayeeship(): MsgAcceptPayeeship { return { payee: "", @@ -1690,10 +1690,9 @@ export const MsgAcceptPayeeship = { typeUrl: "/injective.ocr.v1beta1.MsgAcceptPayeeship", value: MsgAcceptPayeeship.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcceptPayeeship.typeUrl, MsgAcceptPayeeship); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcceptPayeeship.aminoType, MsgAcceptPayeeship.typeUrl); function createBaseMsgAcceptPayeeshipResponse(): MsgAcceptPayeeshipResponse { return {}; } @@ -1748,9 +1747,9 @@ export const MsgAcceptPayeeshipResponse = { typeUrl: "/injective.ocr.v1beta1.MsgAcceptPayeeshipResponse", value: MsgAcceptPayeeshipResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcceptPayeeshipResponse.typeUrl, MsgAcceptPayeeshipResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1837,10 +1836,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1895,6 +1895,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/oracle/v1beta1/events.ts b/libs/injective-react/src/injective/oracle/v1beta1/events.ts index e78a07bd..29516152 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/events.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/events.ts @@ -1,7 +1,6 @@ import { StorkPriceState, StorkPriceStateAmino, PythPriceState, PythPriceStateAmino } from "./oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface SetChainlinkPriceEvent { feedId: string; answer: string; @@ -293,9 +292,9 @@ export const SetChainlinkPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetChainlinkPriceEvent", value: SetChainlinkPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetChainlinkPriceEvent.typeUrl, SetChainlinkPriceEvent); function createBaseSetBandPriceEvent(): SetBandPriceEvent { return { relayer: "", @@ -411,9 +410,9 @@ export const SetBandPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetBandPriceEvent", value: SetBandPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetBandPriceEvent.typeUrl, SetBandPriceEvent); function createBaseSetBandIBCPriceEvent(): SetBandIBCPriceEvent { return { relayer: "", @@ -545,9 +544,9 @@ export const SetBandIBCPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetBandIBCPriceEvent", value: SetBandIBCPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetBandIBCPriceEvent.typeUrl, SetBandIBCPriceEvent); function createBaseEventBandIBCAckSuccess(): EventBandIBCAckSuccess { return { ackResult: "", @@ -627,9 +626,9 @@ export const EventBandIBCAckSuccess = { typeUrl: "/injective.oracle.v1beta1.EventBandIBCAckSuccess", value: EventBandIBCAckSuccess.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBandIBCAckSuccess.typeUrl, EventBandIBCAckSuccess); function createBaseEventBandIBCAckError(): EventBandIBCAckError { return { ackError: "", @@ -709,9 +708,9 @@ export const EventBandIBCAckError = { typeUrl: "/injective.oracle.v1beta1.EventBandIBCAckError", value: EventBandIBCAckError.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBandIBCAckError.typeUrl, EventBandIBCAckError); function createBaseEventBandIBCResponseTimeout(): EventBandIBCResponseTimeout { return { clientId: BigInt(0) @@ -779,9 +778,9 @@ export const EventBandIBCResponseTimeout = { typeUrl: "/injective.oracle.v1beta1.EventBandIBCResponseTimeout", value: EventBandIBCResponseTimeout.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBandIBCResponseTimeout.typeUrl, EventBandIBCResponseTimeout); function createBaseSetPriceFeedPriceEvent(): SetPriceFeedPriceEvent { return { relayer: "", @@ -885,9 +884,9 @@ export const SetPriceFeedPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetPriceFeedPriceEvent", value: SetPriceFeedPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetPriceFeedPriceEvent.typeUrl, SetPriceFeedPriceEvent); function createBaseSetProviderPriceEvent(): SetProviderPriceEvent { return { provider: "", @@ -991,9 +990,9 @@ export const SetProviderPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetProviderPriceEvent", value: SetProviderPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetProviderPriceEvent.typeUrl, SetProviderPriceEvent); function createBaseSetCoinbasePriceEvent(): SetCoinbasePriceEvent { return { symbol: "", @@ -1085,9 +1084,9 @@ export const SetCoinbasePriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetCoinbasePriceEvent", value: SetCoinbasePriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetCoinbasePriceEvent.typeUrl, SetCoinbasePriceEvent); function createBaseEventSetStorkPrices(): EventSetStorkPrices { return { prices: [] @@ -1157,9 +1156,11 @@ export const EventSetStorkPrices = { typeUrl: "/injective.oracle.v1beta1.EventSetStorkPrices", value: EventSetStorkPrices.encode(message).finish() }; + }, + registerTypeUrl() { + StorkPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSetStorkPrices.typeUrl, EventSetStorkPrices); function createBaseEventSetPythPrices(): EventSetPythPrices { return { prices: [] @@ -1229,6 +1230,8 @@ export const EventSetPythPrices = { typeUrl: "/injective.oracle.v1beta1.EventSetPythPrices", value: EventSetPythPrices.encode(message).finish() }; + }, + registerTypeUrl() { + PythPriceState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventSetPythPrices.typeUrl, EventSetPythPrices); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/oracle/v1beta1/genesis.ts b/libs/injective-react/src/injective/oracle/v1beta1/genesis.ts index de88f8a9..a36e6b87 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/genesis.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, BandPriceState, BandPriceStateAmino, PriceFeedState, PriceFeedStateAmino, CoinbasePriceState, CoinbasePriceStateAmino, BandOracleRequest, BandOracleRequestAmino, BandIBCParams, BandIBCParamsAmino, ChainlinkPriceState, ChainlinkPriceStateAmino, PriceRecords, PriceRecordsAmino, ProviderState, ProviderStateAmino, PythPriceState, PythPriceStateAmino, StorkPriceState, StorkPriceStateAmino } from "./oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the oracle module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to oracle. */ @@ -353,9 +352,22 @@ export const GenesisState = { typeUrl: "/injective.oracle.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + BandPriceState.registerTypeUrl(); + PriceFeedState.registerTypeUrl(); + CoinbasePriceState.registerTypeUrl(); + BandOracleRequest.registerTypeUrl(); + BandIBCParams.registerTypeUrl(); + CalldataRecord.registerTypeUrl(); + ChainlinkPriceState.registerTypeUrl(); + PriceRecords.registerTypeUrl(); + ProviderState.registerTypeUrl(); + PythPriceState.registerTypeUrl(); + StorkPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseCalldataRecord(): CalldataRecord { return { clientId: BigInt(0), @@ -435,6 +447,6 @@ export const CalldataRecord = { typeUrl: "/injective.oracle.v1beta1.CalldataRecord", value: CalldataRecord.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CalldataRecord.typeUrl, CalldataRecord); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/oracle/v1beta1/oracle.ts b/libs/injective-react/src/injective/oracle/v1beta1/oracle.ts index 36616d68..85d2302a 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/oracle.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/oracle.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum OracleType { Unspecified = 0, Band = 1, @@ -771,10 +770,9 @@ export const Params = { typeUrl: "/injective.oracle.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseOracleInfo(): OracleInfo { return { symbol: "", @@ -854,9 +852,9 @@ export const OracleInfo = { typeUrl: "/injective.oracle.v1beta1.OracleInfo", value: OracleInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleInfo.typeUrl, OracleInfo); function createBaseChainlinkPriceState(): ChainlinkPriceState { return { feedId: "", @@ -960,9 +958,11 @@ export const ChainlinkPriceState = { typeUrl: "/injective.oracle.v1beta1.ChainlinkPriceState", value: ChainlinkPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ChainlinkPriceState.typeUrl, ChainlinkPriceState); function createBaseBandPriceState(): BandPriceState { return { symbol: "", @@ -1078,9 +1078,11 @@ export const BandPriceState = { typeUrl: "/injective.oracle.v1beta1.BandPriceState", value: BandPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BandPriceState.typeUrl, BandPriceState); function createBasePriceFeedState(): PriceFeedState { return { base: "", @@ -1186,9 +1188,11 @@ export const PriceFeedState = { typeUrl: "/injective.oracle.v1beta1.PriceFeedState", value: PriceFeedState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PriceFeedState.typeUrl, PriceFeedState); function createBaseProviderInfo(): ProviderInfo { return { provider: "", @@ -1270,9 +1274,9 @@ export const ProviderInfo = { typeUrl: "/injective.oracle.v1beta1.ProviderInfo", value: ProviderInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProviderInfo.typeUrl, ProviderInfo); function createBaseProviderState(): ProviderState { return { providerInfo: undefined, @@ -1354,9 +1358,12 @@ export const ProviderState = { typeUrl: "/injective.oracle.v1beta1.ProviderState", value: ProviderState.encode(message).finish() }; + }, + registerTypeUrl() { + ProviderInfo.registerTypeUrl(); + ProviderPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProviderState.typeUrl, ProviderState); function createBaseProviderPriceState(): ProviderPriceState { return { symbol: "", @@ -1436,9 +1443,11 @@ export const ProviderPriceState = { typeUrl: "/injective.oracle.v1beta1.ProviderPriceState", value: ProviderPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProviderPriceState.typeUrl, ProviderPriceState); function createBasePriceFeedInfo(): PriceFeedInfo { return { base: "", @@ -1518,9 +1527,9 @@ export const PriceFeedInfo = { typeUrl: "/injective.oracle.v1beta1.PriceFeedInfo", value: PriceFeedInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceFeedInfo.typeUrl, PriceFeedInfo); function createBasePriceFeedPrice(): PriceFeedPrice { return { price: "" @@ -1588,9 +1597,9 @@ export const PriceFeedPrice = { typeUrl: "/injective.oracle.v1beta1.PriceFeedPrice", value: PriceFeedPrice.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceFeedPrice.typeUrl, PriceFeedPrice); function createBaseCoinbasePriceState(): CoinbasePriceState { return { kind: "", @@ -1706,9 +1715,11 @@ export const CoinbasePriceState = { typeUrl: "/injective.oracle.v1beta1.CoinbasePriceState", value: CoinbasePriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CoinbasePriceState.typeUrl, CoinbasePriceState); function createBaseStorkPriceState(): StorkPriceState { return { timestamp: BigInt(0), @@ -1812,9 +1823,11 @@ export const StorkPriceState = { typeUrl: "/injective.oracle.v1beta1.StorkPriceState", value: StorkPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StorkPriceState.typeUrl, StorkPriceState); function createBasePriceState(): PriceState { return { price: "", @@ -1906,9 +1919,9 @@ export const PriceState = { typeUrl: "/injective.oracle.v1beta1.PriceState", value: PriceState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceState.typeUrl, PriceState); function createBasePythPriceState(): PythPriceState { return { priceId: "", @@ -2036,9 +2049,11 @@ export const PythPriceState = { typeUrl: "/injective.oracle.v1beta1.PythPriceState", value: PythPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PythPriceState.typeUrl, PythPriceState); function createBaseBandOracleRequest(): BandOracleRequest { return { requestId: BigInt(0), @@ -2206,9 +2221,11 @@ export const BandOracleRequest = { typeUrl: "/injective.oracle.v1beta1.BandOracleRequest", value: BandOracleRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BandOracleRequest.typeUrl, BandOracleRequest); function createBaseBandIBCParams(): BandIBCParams { return { bandIbcEnabled: false, @@ -2347,9 +2364,9 @@ export const BandIBCParams = { typeUrl: "/injective.oracle.v1beta1.BandIBCParams", value: BandIBCParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BandIBCParams.typeUrl, BandIBCParams); function createBaseSymbolPriceTimestamp(): SymbolPriceTimestamp { return { oracle: 0, @@ -2441,9 +2458,9 @@ export const SymbolPriceTimestamp = { typeUrl: "/injective.oracle.v1beta1.SymbolPriceTimestamp", value: SymbolPriceTimestamp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SymbolPriceTimestamp.typeUrl, SymbolPriceTimestamp); function createBaseLastPriceTimestamps(): LastPriceTimestamps { return { lastPriceTimestamps: [] @@ -2513,9 +2530,11 @@ export const LastPriceTimestamps = { typeUrl: "/injective.oracle.v1beta1.LastPriceTimestamps", value: LastPriceTimestamps.encode(message).finish() }; + }, + registerTypeUrl() { + SymbolPriceTimestamp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LastPriceTimestamps.typeUrl, LastPriceTimestamps); function createBasePriceRecords(): PriceRecords { return { oracle: 0, @@ -2609,9 +2628,11 @@ export const PriceRecords = { typeUrl: "/injective.oracle.v1beta1.PriceRecords", value: PriceRecords.encode(message).finish() }; + }, + registerTypeUrl() { + PriceRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PriceRecords.typeUrl, PriceRecords); function createBasePriceRecord(): PriceRecord { return { timestamp: BigInt(0), @@ -2691,9 +2712,9 @@ export const PriceRecord = { typeUrl: "/injective.oracle.v1beta1.PriceRecord", value: PriceRecord.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceRecord.typeUrl, PriceRecord); function createBaseMetadataStatistics(): MetadataStatistics { return { groupCount: 0, @@ -2857,9 +2878,9 @@ export const MetadataStatistics = { typeUrl: "/injective.oracle.v1beta1.MetadataStatistics", value: MetadataStatistics.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MetadataStatistics.typeUrl, MetadataStatistics); function createBasePriceAttestation(): PriceAttestation { return { priceId: "", @@ -3011,9 +3032,9 @@ export const PriceAttestation = { typeUrl: "/injective.oracle.v1beta1.PriceAttestation", value: PriceAttestation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceAttestation.typeUrl, PriceAttestation); function createBaseAssetPair(): AssetPair { return { assetId: "", @@ -3095,9 +3116,11 @@ export const AssetPair = { typeUrl: "/injective.oracle.v1beta1.AssetPair", value: AssetPair.encode(message).finish() }; + }, + registerTypeUrl() { + SignedPriceOfAssetPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AssetPair.typeUrl, AssetPair); function createBaseSignedPriceOfAssetPair(): SignedPriceOfAssetPair { return { publisherKey: "", @@ -3201,6 +3224,6 @@ export const SignedPriceOfAssetPair = { typeUrl: "/injective.oracle.v1beta1.SignedPriceOfAssetPair", value: SignedPriceOfAssetPair.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(SignedPriceOfAssetPair.typeUrl, SignedPriceOfAssetPair); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/oracle/v1beta1/proposal.ts b/libs/injective-react/src/injective/oracle/v1beta1/proposal.ts index 453fdef3..1c00592d 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/proposal.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/proposal.ts @@ -314,10 +314,12 @@ export const GrantBandOraclePrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantBandOraclePrivilegeProposal", value: GrantBandOraclePrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantBandOraclePrivilegeProposal.typeUrl, GrantBandOraclePrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantBandOraclePrivilegeProposal.aminoType, GrantBandOraclePrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantBandOraclePrivilegeProposal.typeUrl, GrantBandOraclePrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantBandOraclePrivilegeProposal.aminoType, GrantBandOraclePrivilegeProposal.typeUrl); function createBaseRevokeBandOraclePrivilegeProposal(): RevokeBandOraclePrivilegeProposal { return { title: "", @@ -418,10 +420,12 @@ export const RevokeBandOraclePrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokeBandOraclePrivilegeProposal", value: RevokeBandOraclePrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeBandOraclePrivilegeProposal.typeUrl, RevokeBandOraclePrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokeBandOraclePrivilegeProposal.aminoType, RevokeBandOraclePrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(RevokeBandOraclePrivilegeProposal.typeUrl, RevokeBandOraclePrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokeBandOraclePrivilegeProposal.aminoType, RevokeBandOraclePrivilegeProposal.typeUrl); function createBaseGrantPriceFeederPrivilegeProposal(): GrantPriceFeederPrivilegeProposal { return { title: "", @@ -546,10 +550,12 @@ export const GrantPriceFeederPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantPriceFeederPrivilegeProposal", value: GrantPriceFeederPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantPriceFeederPrivilegeProposal.typeUrl, GrantPriceFeederPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantPriceFeederPrivilegeProposal.aminoType, GrantPriceFeederPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantPriceFeederPrivilegeProposal.typeUrl, GrantPriceFeederPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantPriceFeederPrivilegeProposal.aminoType, GrantPriceFeederPrivilegeProposal.typeUrl); function createBaseGrantProviderPrivilegeProposal(): GrantProviderPrivilegeProposal { return { title: "", @@ -662,10 +668,12 @@ export const GrantProviderPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantProviderPrivilegeProposal", value: GrantProviderPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantProviderPrivilegeProposal.typeUrl, GrantProviderPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantProviderPrivilegeProposal.aminoType, GrantProviderPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantProviderPrivilegeProposal.typeUrl, GrantProviderPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantProviderPrivilegeProposal.aminoType, GrantProviderPrivilegeProposal.typeUrl); function createBaseRevokeProviderPrivilegeProposal(): RevokeProviderPrivilegeProposal { return { title: "", @@ -778,10 +786,12 @@ export const RevokeProviderPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokeProviderPrivilegeProposal", value: RevokeProviderPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeProviderPrivilegeProposal.typeUrl, RevokeProviderPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokeProviderPrivilegeProposal.aminoType, RevokeProviderPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(RevokeProviderPrivilegeProposal.typeUrl, RevokeProviderPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokeProviderPrivilegeProposal.aminoType, RevokeProviderPrivilegeProposal.typeUrl); function createBaseRevokePriceFeederPrivilegeProposal(): RevokePriceFeederPrivilegeProposal { return { title: "", @@ -906,10 +916,12 @@ export const RevokePriceFeederPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokePriceFeederPrivilegeProposal", value: RevokePriceFeederPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokePriceFeederPrivilegeProposal.typeUrl, RevokePriceFeederPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokePriceFeederPrivilegeProposal.aminoType, RevokePriceFeederPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(RevokePriceFeederPrivilegeProposal.typeUrl, RevokePriceFeederPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokePriceFeederPrivilegeProposal.aminoType, RevokePriceFeederPrivilegeProposal.typeUrl); function createBaseAuthorizeBandOracleRequestProposal(): AuthorizeBandOracleRequestProposal { return { title: "", @@ -1008,10 +1020,13 @@ export const AuthorizeBandOracleRequestProposal = { typeUrl: "/injective.oracle.v1beta1.AuthorizeBandOracleRequestProposal", value: AuthorizeBandOracleRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(AuthorizeBandOracleRequestProposal.typeUrl, AuthorizeBandOracleRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(AuthorizeBandOracleRequestProposal.aminoType, AuthorizeBandOracleRequestProposal.typeUrl); + BandOracleRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AuthorizeBandOracleRequestProposal.typeUrl, AuthorizeBandOracleRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(AuthorizeBandOracleRequestProposal.aminoType, AuthorizeBandOracleRequestProposal.typeUrl); function createBaseUpdateBandOracleRequestProposal(): UpdateBandOracleRequestProposal { return { title: "", @@ -1133,10 +1148,13 @@ export const UpdateBandOracleRequestProposal = { typeUrl: "/injective.oracle.v1beta1.UpdateBandOracleRequestProposal", value: UpdateBandOracleRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateBandOracleRequestProposal.typeUrl, UpdateBandOracleRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateBandOracleRequestProposal.aminoType, UpdateBandOracleRequestProposal.typeUrl); + BandOracleRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UpdateBandOracleRequestProposal.typeUrl, UpdateBandOracleRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateBandOracleRequestProposal.aminoType, UpdateBandOracleRequestProposal.typeUrl); function createBaseEnableBandIBCProposal(): EnableBandIBCProposal { return { title: "", @@ -1235,10 +1253,13 @@ export const EnableBandIBCProposal = { typeUrl: "/injective.oracle.v1beta1.EnableBandIBCProposal", value: EnableBandIBCProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(EnableBandIBCProposal.typeUrl, EnableBandIBCProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(EnableBandIBCProposal.aminoType, EnableBandIBCProposal.typeUrl); + BandIBCParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnableBandIBCProposal.typeUrl, EnableBandIBCProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(EnableBandIBCProposal.aminoType, EnableBandIBCProposal.typeUrl); function createBaseGrantStorkPublisherPrivilegeProposal(): GrantStorkPublisherPrivilegeProposal { return { title: "", @@ -1339,10 +1360,12 @@ export const GrantStorkPublisherPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantStorkPublisherPrivilegeProposal", value: GrantStorkPublisherPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantStorkPublisherPrivilegeProposal.typeUrl, GrantStorkPublisherPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantStorkPublisherPrivilegeProposal.aminoType, GrantStorkPublisherPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantStorkPublisherPrivilegeProposal.typeUrl, GrantStorkPublisherPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantStorkPublisherPrivilegeProposal.aminoType, GrantStorkPublisherPrivilegeProposal.typeUrl); function createBaseRevokeStorkPublisherPrivilegeProposal(): RevokeStorkPublisherPrivilegeProposal { return { title: "", @@ -1443,7 +1466,9 @@ export const RevokeStorkPublisherPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokeStorkPublisherPrivilegeProposal", value: RevokeStorkPublisherPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeStorkPublisherPrivilegeProposal.typeUrl, RevokeStorkPublisherPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokeStorkPublisherPrivilegeProposal.aminoType, RevokeStorkPublisherPrivilegeProposal.typeUrl); } -}; -GlobalDecoderRegistry.register(RevokeStorkPublisherPrivilegeProposal.typeUrl, RevokeStorkPublisherPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokeStorkPublisherPrivilegeProposal.aminoType, RevokeStorkPublisherPrivilegeProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/oracle/v1beta1/query.rpc.func.ts b/libs/injective-react/src/injective/oracle/v1beta1/query.rpc.func.ts index 195cd3f4..6aa4fb2f 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -17,7 +18,8 @@ export const createGetBandRelayers = (clientResolver?: RpcResolver) => buildQuer decode: QueryBandRelayersResponse.decode, service: "injective.oracle.v1beta1.Query", method: "BandRelayers", - clientResolver + clientResolver, + deps: [QueryBandRelayersRequest, QueryBandRelayersResponse] }); export const useGetBandRelayers = buildUseQuery({ builderQueryFn: createGetBandRelayers, @@ -28,7 +30,8 @@ export const createGetBandPriceStates = (clientResolver?: RpcResolver) => buildQ decode: QueryBandPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "BandPriceStates", - clientResolver + clientResolver, + deps: [QueryBandPriceStatesRequest, QueryBandPriceStatesResponse] }); export const useGetBandPriceStates = buildUseQuery({ builderQueryFn: createGetBandPriceStates, @@ -39,7 +42,8 @@ export const createGetBandIBCPriceStates = (clientResolver?: RpcResolver) => bui decode: QueryBandIBCPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "BandIBCPriceStates", - clientResolver + clientResolver, + deps: [QueryBandIBCPriceStatesRequest, QueryBandIBCPriceStatesResponse] }); export const useGetBandIBCPriceStates = buildUseQuery({ builderQueryFn: createGetBandIBCPriceStates, @@ -50,7 +54,8 @@ export const createGetPriceFeedPriceStates = (clientResolver?: RpcResolver) => b decode: QueryPriceFeedPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "PriceFeedPriceStates", - clientResolver + clientResolver, + deps: [QueryPriceFeedPriceStatesRequest, QueryPriceFeedPriceStatesResponse] }); export const useGetPriceFeedPriceStates = buildUseQuery({ builderQueryFn: createGetPriceFeedPriceStates, @@ -61,7 +66,8 @@ export const createGetCoinbasePriceStates = (clientResolver?: RpcResolver) => bu decode: QueryCoinbasePriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "CoinbasePriceStates", - clientResolver + clientResolver, + deps: [QueryCoinbasePriceStatesRequest, QueryCoinbasePriceStatesResponse] }); export const useGetCoinbasePriceStates = buildUseQuery({ builderQueryFn: createGetCoinbasePriceStates, @@ -72,7 +78,8 @@ export const createGetPythPriceStates = (clientResolver?: RpcResolver) => buildQ decode: QueryPythPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "PythPriceStates", - clientResolver + clientResolver, + deps: [QueryPythPriceStatesRequest, QueryPythPriceStatesResponse] }); export const useGetPythPriceStates = buildUseQuery({ builderQueryFn: createGetPythPriceStates, @@ -83,7 +90,8 @@ export const createGetStorkPriceStates = (clientResolver?: RpcResolver) => build decode: QueryStorkPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "StorkPriceStates", - clientResolver + clientResolver, + deps: [QueryStorkPriceStatesRequest, QueryStorkPriceStatesResponse] }); export const useGetStorkPriceStates = buildUseQuery({ builderQueryFn: createGetStorkPriceStates, @@ -94,7 +102,8 @@ export const createGetStorkPublishers = (clientResolver?: RpcResolver) => buildQ decode: QueryStorkPublishersResponse.decode, service: "injective.oracle.v1beta1.Query", method: "StorkPublishers", - clientResolver + clientResolver, + deps: [QueryStorkPublishersRequest, QueryStorkPublishersResponse] }); export const useGetStorkPublishers = buildUseQuery({ builderQueryFn: createGetStorkPublishers, @@ -105,7 +114,8 @@ export const createGetProviderPriceState = (clientResolver?: RpcResolver) => bui decode: QueryProviderPriceStateResponse.decode, service: "injective.oracle.v1beta1.Query", method: "ProviderPriceState", - clientResolver + clientResolver, + deps: [QueryProviderPriceStateRequest, QueryProviderPriceStateResponse] }); export const useGetProviderPriceState = buildUseQuery({ builderQueryFn: createGetProviderPriceState, @@ -116,7 +126,8 @@ export const createGetOracleModuleState = (clientResolver?: RpcResolver) => buil decode: QueryModuleStateResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetOracleModuleState = buildUseQuery({ builderQueryFn: createGetOracleModuleState, @@ -127,7 +138,8 @@ export const createGetHistoricalPriceRecords = (clientResolver?: RpcResolver) => decode: QueryHistoricalPriceRecordsResponse.decode, service: "injective.oracle.v1beta1.Query", method: "HistoricalPriceRecords", - clientResolver + clientResolver, + deps: [QueryHistoricalPriceRecordsRequest, QueryHistoricalPriceRecordsResponse] }); export const useGetHistoricalPriceRecords = buildUseQuery({ builderQueryFn: createGetHistoricalPriceRecords, @@ -138,7 +150,8 @@ export const createGetOracleVolatility = (clientResolver?: RpcResolver) => build decode: QueryOracleVolatilityResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleVolatility", - clientResolver + clientResolver, + deps: [QueryOracleVolatilityRequest, QueryOracleVolatilityResponse] }); export const useGetOracleVolatility = buildUseQuery({ builderQueryFn: createGetOracleVolatility, @@ -149,7 +162,8 @@ export const createGetOracleProvidersInfo = (clientResolver?: RpcResolver) => bu decode: QueryOracleProvidersInfoResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleProvidersInfo", - clientResolver + clientResolver, + deps: [QueryOracleProvidersInfoRequest, QueryOracleProvidersInfoResponse] }); export const useGetOracleProvidersInfo = buildUseQuery({ builderQueryFn: createGetOracleProvidersInfo, @@ -160,7 +174,8 @@ export const createGetOracleProviderPrices = (clientResolver?: RpcResolver) => b decode: QueryOracleProviderPricesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleProviderPrices", - clientResolver + clientResolver, + deps: [QueryOracleProviderPricesRequest, QueryOracleProviderPricesResponse] }); export const useGetOracleProviderPrices = buildUseQuery({ builderQueryFn: createGetOracleProviderPrices, @@ -171,7 +186,8 @@ export const createGetOraclePrice = (clientResolver?: RpcResolver) => buildQuery decode: QueryOraclePriceResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OraclePrice", - clientResolver + clientResolver, + deps: [QueryOraclePriceRequest, QueryOraclePriceResponse] }); export const useGetOraclePrice = buildUseQuery({ builderQueryFn: createGetOraclePrice, @@ -182,7 +198,8 @@ export const createGetPythPrice = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetPythPrice, diff --git a/libs/injective-react/src/injective/oracle/v1beta1/query.ts b/libs/injective-react/src/injective/oracle/v1beta1/query.ts index e44832a4..e87024e9 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/query.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/query.ts @@ -2,7 +2,6 @@ import { OracleType, OracleInfo, OracleInfoAmino, PythPriceState, PythPriceState import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface QueryPythPriceRequest { priceId: string; } @@ -824,9 +823,9 @@ export const QueryPythPriceRequest = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceRequest", value: QueryPythPriceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPythPriceRequest.typeUrl, QueryPythPriceRequest); function createBaseQueryPythPriceResponse(): QueryPythPriceResponse { return { priceState: undefined @@ -894,9 +893,11 @@ export const QueryPythPriceResponse = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceResponse", value: QueryPythPriceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PythPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPythPriceResponse.typeUrl, QueryPythPriceResponse); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -951,9 +952,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.oracle.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -1021,9 +1022,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.oracle.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryBandRelayersRequest(): QueryBandRelayersRequest { return {}; } @@ -1078,9 +1081,9 @@ export const QueryBandRelayersRequest = { typeUrl: "/injective.oracle.v1beta1.QueryBandRelayersRequest", value: QueryBandRelayersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandRelayersRequest.typeUrl, QueryBandRelayersRequest); function createBaseQueryBandRelayersResponse(): QueryBandRelayersResponse { return { relayers: [] @@ -1150,9 +1153,9 @@ export const QueryBandRelayersResponse = { typeUrl: "/injective.oracle.v1beta1.QueryBandRelayersResponse", value: QueryBandRelayersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandRelayersResponse.typeUrl, QueryBandRelayersResponse); function createBaseQueryBandPriceStatesRequest(): QueryBandPriceStatesRequest { return {}; } @@ -1207,9 +1210,9 @@ export const QueryBandPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryBandPriceStatesRequest", value: QueryBandPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandPriceStatesRequest.typeUrl, QueryBandPriceStatesRequest); function createBaseQueryBandPriceStatesResponse(): QueryBandPriceStatesResponse { return { priceStates: [] @@ -1279,9 +1282,11 @@ export const QueryBandPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryBandPriceStatesResponse", value: QueryBandPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BandPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBandPriceStatesResponse.typeUrl, QueryBandPriceStatesResponse); function createBaseQueryBandIBCPriceStatesRequest(): QueryBandIBCPriceStatesRequest { return {}; } @@ -1336,9 +1341,9 @@ export const QueryBandIBCPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryBandIBCPriceStatesRequest", value: QueryBandIBCPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandIBCPriceStatesRequest.typeUrl, QueryBandIBCPriceStatesRequest); function createBaseQueryBandIBCPriceStatesResponse(): QueryBandIBCPriceStatesResponse { return { priceStates: [] @@ -1408,9 +1413,11 @@ export const QueryBandIBCPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryBandIBCPriceStatesResponse", value: QueryBandIBCPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BandPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBandIBCPriceStatesResponse.typeUrl, QueryBandIBCPriceStatesResponse); function createBaseQueryPriceFeedPriceStatesRequest(): QueryPriceFeedPriceStatesRequest { return {}; } @@ -1465,9 +1472,9 @@ export const QueryPriceFeedPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryPriceFeedPriceStatesRequest", value: QueryPriceFeedPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPriceFeedPriceStatesRequest.typeUrl, QueryPriceFeedPriceStatesRequest); function createBaseQueryPriceFeedPriceStatesResponse(): QueryPriceFeedPriceStatesResponse { return { priceStates: [] @@ -1537,9 +1544,11 @@ export const QueryPriceFeedPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryPriceFeedPriceStatesResponse", value: QueryPriceFeedPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PriceFeedState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPriceFeedPriceStatesResponse.typeUrl, QueryPriceFeedPriceStatesResponse); function createBaseQueryCoinbasePriceStatesRequest(): QueryCoinbasePriceStatesRequest { return {}; } @@ -1594,9 +1603,9 @@ export const QueryCoinbasePriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryCoinbasePriceStatesRequest", value: QueryCoinbasePriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCoinbasePriceStatesRequest.typeUrl, QueryCoinbasePriceStatesRequest); function createBaseQueryCoinbasePriceStatesResponse(): QueryCoinbasePriceStatesResponse { return { priceStates: [] @@ -1666,9 +1675,11 @@ export const QueryCoinbasePriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryCoinbasePriceStatesResponse", value: QueryCoinbasePriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CoinbasePriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCoinbasePriceStatesResponse.typeUrl, QueryCoinbasePriceStatesResponse); function createBaseQueryPythPriceStatesRequest(): QueryPythPriceStatesRequest { return {}; } @@ -1723,9 +1734,9 @@ export const QueryPythPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceStatesRequest", value: QueryPythPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPythPriceStatesRequest.typeUrl, QueryPythPriceStatesRequest); function createBaseQueryPythPriceStatesResponse(): QueryPythPriceStatesResponse { return { priceStates: [] @@ -1795,9 +1806,11 @@ export const QueryPythPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceStatesResponse", value: QueryPythPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PythPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPythPriceStatesResponse.typeUrl, QueryPythPriceStatesResponse); function createBaseQueryStorkPriceStatesRequest(): QueryStorkPriceStatesRequest { return {}; } @@ -1852,9 +1865,9 @@ export const QueryStorkPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPriceStatesRequest", value: QueryStorkPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryStorkPriceStatesRequest.typeUrl, QueryStorkPriceStatesRequest); function createBaseQueryStorkPriceStatesResponse(): QueryStorkPriceStatesResponse { return { priceStates: [] @@ -1924,9 +1937,11 @@ export const QueryStorkPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPriceStatesResponse", value: QueryStorkPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + StorkPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryStorkPriceStatesResponse.typeUrl, QueryStorkPriceStatesResponse); function createBaseQueryStorkPublishersRequest(): QueryStorkPublishersRequest { return {}; } @@ -1981,9 +1996,9 @@ export const QueryStorkPublishersRequest = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPublishersRequest", value: QueryStorkPublishersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryStorkPublishersRequest.typeUrl, QueryStorkPublishersRequest); function createBaseQueryStorkPublishersResponse(): QueryStorkPublishersResponse { return { publishers: [] @@ -2053,9 +2068,9 @@ export const QueryStorkPublishersResponse = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPublishersResponse", value: QueryStorkPublishersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryStorkPublishersResponse.typeUrl, QueryStorkPublishersResponse); function createBaseQueryProviderPriceStateRequest(): QueryProviderPriceStateRequest { return { provider: "", @@ -2135,9 +2150,9 @@ export const QueryProviderPriceStateRequest = { typeUrl: "/injective.oracle.v1beta1.QueryProviderPriceStateRequest", value: QueryProviderPriceStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryProviderPriceStateRequest.typeUrl, QueryProviderPriceStateRequest); function createBaseQueryProviderPriceStateResponse(): QueryProviderPriceStateResponse { return { priceState: undefined @@ -2205,9 +2220,11 @@ export const QueryProviderPriceStateResponse = { typeUrl: "/injective.oracle.v1beta1.QueryProviderPriceStateResponse", value: QueryProviderPriceStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProviderPriceStateResponse.typeUrl, QueryProviderPriceStateResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -2262,9 +2279,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.oracle.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -2332,9 +2349,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.oracle.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryHistoricalPriceRecordsRequest(): QueryHistoricalPriceRecordsRequest { return { oracle: 0, @@ -2414,9 +2433,9 @@ export const QueryHistoricalPriceRecordsRequest = { typeUrl: "/injective.oracle.v1beta1.QueryHistoricalPriceRecordsRequest", value: QueryHistoricalPriceRecordsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalPriceRecordsRequest.typeUrl, QueryHistoricalPriceRecordsRequest); function createBaseQueryHistoricalPriceRecordsResponse(): QueryHistoricalPriceRecordsResponse { return { priceRecords: [] @@ -2486,9 +2505,11 @@ export const QueryHistoricalPriceRecordsResponse = { typeUrl: "/injective.oracle.v1beta1.QueryHistoricalPriceRecordsResponse", value: QueryHistoricalPriceRecordsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PriceRecords.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalPriceRecordsResponse.typeUrl, QueryHistoricalPriceRecordsResponse); function createBaseOracleHistoryOptions(): OracleHistoryOptions { return { maxAge: BigInt(0), @@ -2580,9 +2601,9 @@ export const OracleHistoryOptions = { typeUrl: "/injective.oracle.v1beta1.OracleHistoryOptions", value: OracleHistoryOptions.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleHistoryOptions.typeUrl, OracleHistoryOptions); function createBaseQueryOracleVolatilityRequest(): QueryOracleVolatilityRequest { return { baseInfo: undefined, @@ -2674,9 +2695,12 @@ export const QueryOracleVolatilityRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOracleVolatilityRequest", value: QueryOracleVolatilityRequest.encode(message).finish() }; + }, + registerTypeUrl() { + OracleInfo.registerTypeUrl(); + OracleHistoryOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleVolatilityRequest.typeUrl, QueryOracleVolatilityRequest); function createBaseQueryOracleVolatilityResponse(): QueryOracleVolatilityResponse { return { volatility: "", @@ -2770,9 +2794,12 @@ export const QueryOracleVolatilityResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOracleVolatilityResponse", value: QueryOracleVolatilityResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MetadataStatistics.registerTypeUrl(); + PriceRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleVolatilityResponse.typeUrl, QueryOracleVolatilityResponse); function createBaseQueryOracleProvidersInfoRequest(): QueryOracleProvidersInfoRequest { return {}; } @@ -2827,9 +2854,9 @@ export const QueryOracleProvidersInfoRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProvidersInfoRequest", value: QueryOracleProvidersInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOracleProvidersInfoRequest.typeUrl, QueryOracleProvidersInfoRequest); function createBaseQueryOracleProvidersInfoResponse(): QueryOracleProvidersInfoResponse { return { providers: [] @@ -2899,9 +2926,11 @@ export const QueryOracleProvidersInfoResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProvidersInfoResponse", value: QueryOracleProvidersInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ProviderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleProvidersInfoResponse.typeUrl, QueryOracleProvidersInfoResponse); function createBaseQueryOracleProviderPricesRequest(): QueryOracleProviderPricesRequest { return { provider: "" @@ -2969,9 +2998,9 @@ export const QueryOracleProviderPricesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProviderPricesRequest", value: QueryOracleProviderPricesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOracleProviderPricesRequest.typeUrl, QueryOracleProviderPricesRequest); function createBaseQueryOracleProviderPricesResponse(): QueryOracleProviderPricesResponse { return { providerState: [] @@ -3041,9 +3070,11 @@ export const QueryOracleProviderPricesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProviderPricesResponse", value: QueryOracleProviderPricesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ProviderState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleProviderPricesResponse.typeUrl, QueryOracleProviderPricesResponse); function createBaseScalingOptions(): ScalingOptions { return { baseDecimals: 0, @@ -3123,9 +3154,9 @@ export const ScalingOptions = { typeUrl: "/injective.oracle.v1beta1.ScalingOptions", value: ScalingOptions.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ScalingOptions.typeUrl, ScalingOptions); function createBaseQueryOraclePriceRequest(): QueryOraclePriceRequest { return { oracleType: 0, @@ -3229,9 +3260,11 @@ export const QueryOraclePriceRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOraclePriceRequest", value: QueryOraclePriceRequest.encode(message).finish() }; + }, + registerTypeUrl() { + ScalingOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOraclePriceRequest.typeUrl, QueryOraclePriceRequest); function createBasePricePairState(): PricePairState { return { pairPrice: "", @@ -3371,9 +3404,9 @@ export const PricePairState = { typeUrl: "/injective.oracle.v1beta1.PricePairState", value: PricePairState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PricePairState.typeUrl, PricePairState); function createBaseQueryOraclePriceResponse(): QueryOraclePriceResponse { return { pricePairState: undefined @@ -3441,6 +3474,8 @@ export const QueryOraclePriceResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOraclePriceResponse", value: QueryOraclePriceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PricePairState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryOraclePriceResponse.typeUrl, QueryOraclePriceResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/oracle/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/injective/oracle/v1beta1/tx.rpc.func.ts index b832c86a..f94e7d54 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgRelayProviderPrices, MsgRelayPriceFeedPrice, MsgRelayBandRates, MsgRequestBandIBCRates, MsgRelayCoinbaseMessages, MsgRelayStorkPrices, MsgRelayPythPrices, MsgUpdateParams } from "./tx"; export const createRelayProviderPrices = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRelayProviderPrices.typeUrl, encoders: toEncoders(MsgRelayProviderPrices), - converters: toConverters(MsgRelayProviderPrices) + converters: toConverters(MsgRelayProviderPrices), + deps: [MsgRelayProviderPrices] }); export const useRelayProviderPrices = buildUseMutation({ builderMutationFn: createRelayProviderPrices @@ -15,7 +16,8 @@ export const createRelayPriceFeedPrice = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgRelayPriceFeedPrice.typeUrl, encoders: toEncoders(MsgRelayPriceFeedPrice), - converters: toConverters(MsgRelayPriceFeedPrice) + converters: toConverters(MsgRelayPriceFeedPrice), + deps: [MsgRelayPriceFeedPrice] }); export const useRelayPriceFeedPrice = buildUseMutation({ builderMutationFn: createRelayPriceFeedPrice @@ -24,7 +26,8 @@ export const createRelayBandRates = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgRelayBandRates.typeUrl, encoders: toEncoders(MsgRelayBandRates), - converters: toConverters(MsgRelayBandRates) + converters: toConverters(MsgRelayBandRates), + deps: [MsgRelayBandRates] }); export const useRelayBandRates = buildUseMutation({ builderMutationFn: createRelayBandRates @@ -33,7 +36,8 @@ export const createRequestBandIBCRates = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgRequestBandIBCRates.typeUrl, encoders: toEncoders(MsgRequestBandIBCRates), - converters: toConverters(MsgRequestBandIBCRates) + converters: toConverters(MsgRequestBandIBCRates), + deps: [MsgRequestBandIBCRates] }); export const useRequestBandIBCRates = buildUseMutation({ builderMutationFn: createRequestBandIBCRates @@ -42,7 +46,8 @@ export const createRelayCoinbaseMessages = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgRelayCoinbaseMessages.typeUrl, encoders: toEncoders(MsgRelayCoinbaseMessages), - converters: toConverters(MsgRelayCoinbaseMessages) + converters: toConverters(MsgRelayCoinbaseMessages), + deps: [MsgRelayCoinbaseMessages] }); export const useRelayCoinbaseMessages = buildUseMutation({ builderMutationFn: createRelayCoinbaseMessages @@ -51,7 +56,8 @@ export const createRelayStorkMessage = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgRelayStorkPrices.typeUrl, encoders: toEncoders(MsgRelayStorkPrices), - converters: toConverters(MsgRelayStorkPrices) + converters: toConverters(MsgRelayStorkPrices), + deps: [MsgRelayStorkPrices] }); export const useRelayStorkMessage = buildUseMutation({ builderMutationFn: createRelayStorkMessage @@ -60,7 +66,8 @@ export const createRelayPythPrices = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgRelayPythPrices.typeUrl, encoders: toEncoders(MsgRelayPythPrices), - converters: toConverters(MsgRelayPythPrices) + converters: toConverters(MsgRelayPythPrices), + deps: [MsgRelayPythPrices] }); export const useRelayPythPrices = buildUseMutation({ builderMutationFn: createRelayPythPrices @@ -69,7 +76,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/injective-react/src/injective/oracle/v1beta1/tx.ts b/libs/injective-react/src/injective/oracle/v1beta1/tx.ts index d87e3df4..4dc5fc6f 100644 --- a/libs/injective-react/src/injective/oracle/v1beta1/tx.ts +++ b/libs/injective-react/src/injective/oracle/v1beta1/tx.ts @@ -1,7 +1,6 @@ import { AssetPair, AssetPairAmino, PriceAttestation, PriceAttestationAmino, Params, ParamsAmino } from "./oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgRelayProviderPrice defines a SDK message for setting a price through the * provider oracle. @@ -400,10 +399,9 @@ export const MsgRelayProviderPrices = { typeUrl: "/injective.oracle.v1beta1.MsgRelayProviderPrices", value: MsgRelayProviderPrices.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayProviderPrices.typeUrl, MsgRelayProviderPrices); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayProviderPrices.aminoType, MsgRelayProviderPrices.typeUrl); function createBaseMsgRelayProviderPricesResponse(): MsgRelayProviderPricesResponse { return {}; } @@ -458,9 +456,9 @@ export const MsgRelayProviderPricesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayProviderPricesResponse", value: MsgRelayProviderPricesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayProviderPricesResponse.typeUrl, MsgRelayProviderPricesResponse); function createBaseMsgRelayPriceFeedPrice(): MsgRelayPriceFeedPrice { return { sender: "", @@ -577,10 +575,9 @@ export const MsgRelayPriceFeedPrice = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPriceFeedPrice", value: MsgRelayPriceFeedPrice.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayPriceFeedPrice.typeUrl, MsgRelayPriceFeedPrice); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayPriceFeedPrice.aminoType, MsgRelayPriceFeedPrice.typeUrl); function createBaseMsgRelayPriceFeedPriceResponse(): MsgRelayPriceFeedPriceResponse { return {}; } @@ -635,9 +632,9 @@ export const MsgRelayPriceFeedPriceResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPriceFeedPriceResponse", value: MsgRelayPriceFeedPriceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayPriceFeedPriceResponse.typeUrl, MsgRelayPriceFeedPriceResponse); function createBaseMsgRelayBandRates(): MsgRelayBandRates { return { relayer: "", @@ -795,10 +792,9 @@ export const MsgRelayBandRates = { typeUrl: "/injective.oracle.v1beta1.MsgRelayBandRates", value: MsgRelayBandRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayBandRates.typeUrl, MsgRelayBandRates); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayBandRates.aminoType, MsgRelayBandRates.typeUrl); function createBaseMsgRelayBandRatesResponse(): MsgRelayBandRatesResponse { return {}; } @@ -853,9 +849,9 @@ export const MsgRelayBandRatesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayBandRatesResponse", value: MsgRelayBandRatesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayBandRatesResponse.typeUrl, MsgRelayBandRatesResponse); function createBaseMsgRelayCoinbaseMessages(): MsgRelayCoinbaseMessages { return { sender: "", @@ -958,10 +954,9 @@ export const MsgRelayCoinbaseMessages = { typeUrl: "/injective.oracle.v1beta1.MsgRelayCoinbaseMessages", value: MsgRelayCoinbaseMessages.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayCoinbaseMessages.typeUrl, MsgRelayCoinbaseMessages); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayCoinbaseMessages.aminoType, MsgRelayCoinbaseMessages.typeUrl); function createBaseMsgRelayCoinbaseMessagesResponse(): MsgRelayCoinbaseMessagesResponse { return {}; } @@ -1016,9 +1011,9 @@ export const MsgRelayCoinbaseMessagesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayCoinbaseMessagesResponse", value: MsgRelayCoinbaseMessagesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayCoinbaseMessagesResponse.typeUrl, MsgRelayCoinbaseMessagesResponse); function createBaseMsgRelayStorkPrices(): MsgRelayStorkPrices { return { sender: "", @@ -1100,9 +1095,11 @@ export const MsgRelayStorkPrices = { typeUrl: "/injective.oracle.v1beta1.MsgRelayStorkPrices", value: MsgRelayStorkPrices.encode(message).finish() }; + }, + registerTypeUrl() { + AssetPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRelayStorkPrices.typeUrl, MsgRelayStorkPrices); function createBaseMsgRelayStorkPricesResponse(): MsgRelayStorkPricesResponse { return {}; } @@ -1157,9 +1154,9 @@ export const MsgRelayStorkPricesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayStorkPricesResponse", value: MsgRelayStorkPricesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayStorkPricesResponse.typeUrl, MsgRelayStorkPricesResponse); function createBaseMsgRequestBandIBCRates(): MsgRequestBandIBCRates { return { sender: "", @@ -1246,10 +1243,9 @@ export const MsgRequestBandIBCRates = { typeUrl: "/injective.oracle.v1beta1.MsgRequestBandIBCRates", value: MsgRequestBandIBCRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBandIBCRates.typeUrl, MsgRequestBandIBCRates); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRequestBandIBCRates.aminoType, MsgRequestBandIBCRates.typeUrl); function createBaseMsgRequestBandIBCRatesResponse(): MsgRequestBandIBCRatesResponse { return {}; } @@ -1304,9 +1300,9 @@ export const MsgRequestBandIBCRatesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRequestBandIBCRatesResponse", value: MsgRequestBandIBCRatesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBandIBCRatesResponse.typeUrl, MsgRequestBandIBCRatesResponse); function createBaseMsgRelayPythPrices(): MsgRelayPythPrices { return { sender: "", @@ -1395,10 +1391,11 @@ export const MsgRelayPythPrices = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPythPrices", value: MsgRelayPythPrices.encode(message).finish() }; + }, + registerTypeUrl() { + PriceAttestation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRelayPythPrices.typeUrl, MsgRelayPythPrices); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayPythPrices.aminoType, MsgRelayPythPrices.typeUrl); function createBaseMsgRelayPythPricesResponse(): MsgRelayPythPricesResponse { return {}; } @@ -1453,9 +1450,9 @@ export const MsgRelayPythPricesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPythPricesResponse", value: MsgRelayPythPricesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayPythPricesResponse.typeUrl, MsgRelayPythPricesResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1542,10 +1539,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.oracle.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1600,6 +1598,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.oracle.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/attestation.ts b/libs/injective-react/src/injective/peggy/v1/attestation.ts index 2b00c1ac..16f0c388 100644 --- a/libs/injective-react/src/injective/peggy/v1/attestation.ts +++ b/libs/injective-react/src/injective/peggy/v1/attestation.ts @@ -1,7 +1,6 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * ClaimType is the cosmos type of an event from the counterpart chain that can * be handled @@ -246,9 +245,9 @@ export const Attestation = { typeUrl: "/injective.peggy.v1.Attestation", value: Attestation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Attestation.typeUrl, Attestation); function createBaseERC20Token(): ERC20Token { return { contract: "", @@ -328,6 +327,6 @@ export const ERC20Token = { typeUrl: "/injective.peggy.v1.ERC20Token", value: ERC20Token.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ERC20Token.typeUrl, ERC20Token); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/batch.ts b/libs/injective-react/src/injective/peggy/v1/batch.ts index c4bc396f..a0ba24c9 100644 --- a/libs/injective-react/src/injective/peggy/v1/batch.ts +++ b/libs/injective-react/src/injective/peggy/v1/batch.ts @@ -1,7 +1,6 @@ import { ERC20Token, ERC20TokenAmino } from "./attestation"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** OutgoingTxBatch represents a batch of transactions going from Peggy to ETH */ export interface OutgoingTxBatch { batchNonce: bigint; @@ -167,9 +166,11 @@ export const OutgoingTxBatch = { typeUrl: "/injective.peggy.v1.OutgoingTxBatch", value: OutgoingTxBatch.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTransferTx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OutgoingTxBatch.typeUrl, OutgoingTxBatch); function createBaseOutgoingTransferTx(): OutgoingTransferTx { return { id: BigInt(0), @@ -285,6 +286,8 @@ export const OutgoingTransferTx = { typeUrl: "/injective.peggy.v1.OutgoingTransferTx", value: OutgoingTransferTx.encode(message).finish() }; + }, + registerTypeUrl() { + ERC20Token.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(OutgoingTransferTx.typeUrl, OutgoingTransferTx); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/events.ts b/libs/injective-react/src/injective/peggy/v1/events.ts index bb0b7095..049b6c57 100644 --- a/libs/injective-react/src/injective/peggy/v1/events.ts +++ b/libs/injective-react/src/injective/peggy/v1/events.ts @@ -2,7 +2,6 @@ import { ClaimType } from "./attestation"; import { BridgeValidator, BridgeValidatorAmino } from "./types"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventAttestationObserved { attestationType: ClaimType; bridgeContract: string; @@ -474,9 +473,9 @@ export const EventAttestationObserved = { typeUrl: "/injective.peggy.v1.EventAttestationObserved", value: EventAttestationObserved.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttestationObserved.typeUrl, EventAttestationObserved); function createBaseEventBridgeWithdrawCanceled(): EventBridgeWithdrawCanceled { return { bridgeContract: "", @@ -556,9 +555,9 @@ export const EventBridgeWithdrawCanceled = { typeUrl: "/injective.peggy.v1.EventBridgeWithdrawCanceled", value: EventBridgeWithdrawCanceled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBridgeWithdrawCanceled.typeUrl, EventBridgeWithdrawCanceled); function createBaseEventOutgoingBatch(): EventOutgoingBatch { return { denom: "", @@ -685,9 +684,9 @@ export const EventOutgoingBatch = { typeUrl: "/injective.peggy.v1.EventOutgoingBatch", value: EventOutgoingBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventOutgoingBatch.typeUrl, EventOutgoingBatch); function createBaseEventOutgoingBatchCanceled(): EventOutgoingBatchCanceled { return { bridgeContract: "", @@ -791,9 +790,9 @@ export const EventOutgoingBatchCanceled = { typeUrl: "/injective.peggy.v1.EventOutgoingBatchCanceled", value: EventOutgoingBatchCanceled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventOutgoingBatchCanceled.typeUrl, EventOutgoingBatchCanceled); function createBaseEventValsetUpdateRequest(): EventValsetUpdateRequest { return { valsetNonce: BigInt(0), @@ -911,9 +910,11 @@ export const EventValsetUpdateRequest = { typeUrl: "/injective.peggy.v1.EventValsetUpdateRequest", value: EventValsetUpdateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventValsetUpdateRequest.typeUrl, EventValsetUpdateRequest); function createBaseEventSetOrchestratorAddresses(): EventSetOrchestratorAddresses { return { validatorAddress: "", @@ -1005,9 +1006,9 @@ export const EventSetOrchestratorAddresses = { typeUrl: "/injective.peggy.v1.EventSetOrchestratorAddresses", value: EventSetOrchestratorAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventSetOrchestratorAddresses.typeUrl, EventSetOrchestratorAddresses); function createBaseEventValsetConfirm(): EventValsetConfirm { return { valsetNonce: BigInt(0), @@ -1087,9 +1088,9 @@ export const EventValsetConfirm = { typeUrl: "/injective.peggy.v1.EventValsetConfirm", value: EventValsetConfirm.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventValsetConfirm.typeUrl, EventValsetConfirm); function createBaseEventSendToEth(): EventSendToEth { return { outgoingTxId: BigInt(0), @@ -1205,9 +1206,9 @@ export const EventSendToEth = { typeUrl: "/injective.peggy.v1.EventSendToEth", value: EventSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventSendToEth.typeUrl, EventSendToEth); function createBaseEventConfirmBatch(): EventConfirmBatch { return { batchNonce: BigInt(0), @@ -1287,9 +1288,9 @@ export const EventConfirmBatch = { typeUrl: "/injective.peggy.v1.EventConfirmBatch", value: EventConfirmBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventConfirmBatch.typeUrl, EventConfirmBatch); function createBaseEventAttestationVote(): EventAttestationVote { return { eventNonce: BigInt(0), @@ -1381,9 +1382,9 @@ export const EventAttestationVote = { typeUrl: "/injective.peggy.v1.EventAttestationVote", value: EventAttestationVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttestationVote.typeUrl, EventAttestationVote); function createBaseEventDepositClaim(): EventDepositClaim { return { eventNonce: BigInt(0), @@ -1547,9 +1548,9 @@ export const EventDepositClaim = { typeUrl: "/injective.peggy.v1.EventDepositClaim", value: EventDepositClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventDepositClaim.typeUrl, EventDepositClaim); function createBaseEventWithdrawClaim(): EventWithdrawClaim { return { eventNonce: BigInt(0), @@ -1677,9 +1678,9 @@ export const EventWithdrawClaim = { typeUrl: "/injective.peggy.v1.EventWithdrawClaim", value: EventWithdrawClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventWithdrawClaim.typeUrl, EventWithdrawClaim); function createBaseEventERC20DeployedClaim(): EventERC20DeployedClaim { return { eventNonce: BigInt(0), @@ -1843,9 +1844,9 @@ export const EventERC20DeployedClaim = { typeUrl: "/injective.peggy.v1.EventERC20DeployedClaim", value: EventERC20DeployedClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventERC20DeployedClaim.typeUrl, EventERC20DeployedClaim); function createBaseEventValsetUpdateClaim(): EventValsetUpdateClaim { return { eventNonce: BigInt(0), @@ -1999,9 +2000,11 @@ export const EventValsetUpdateClaim = { typeUrl: "/injective.peggy.v1.EventValsetUpdateClaim", value: EventValsetUpdateClaim.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventValsetUpdateClaim.typeUrl, EventValsetUpdateClaim); function createBaseEventCancelSendToEth(): EventCancelSendToEth { return { outgoingTxId: BigInt(0) @@ -2069,9 +2072,9 @@ export const EventCancelSendToEth = { typeUrl: "/injective.peggy.v1.EventCancelSendToEth", value: EventCancelSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventCancelSendToEth.typeUrl, EventCancelSendToEth); function createBaseEventSubmitBadSignatureEvidence(): EventSubmitBadSignatureEvidence { return { badEthSignature: "", @@ -2151,9 +2154,9 @@ export const EventSubmitBadSignatureEvidence = { typeUrl: "/injective.peggy.v1.EventSubmitBadSignatureEvidence", value: EventSubmitBadSignatureEvidence.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventSubmitBadSignatureEvidence.typeUrl, EventSubmitBadSignatureEvidence); function createBaseEventValidatorSlash(): EventValidatorSlash { return { power: BigInt(0), @@ -2269,6 +2272,6 @@ export const EventValidatorSlash = { typeUrl: "/injective.peggy.v1.EventValidatorSlash", value: EventValidatorSlash.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EventValidatorSlash.typeUrl, EventValidatorSlash); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/genesis.ts b/libs/injective-react/src/injective/peggy/v1/genesis.ts index d26c2e15..7d60b442 100644 --- a/libs/injective-react/src/injective/peggy/v1/genesis.ts +++ b/libs/injective-react/src/injective/peggy/v1/genesis.ts @@ -5,7 +5,6 @@ import { OutgoingTxBatch, OutgoingTxBatchAmino, OutgoingTransferTx, OutgoingTran import { Attestation, AttestationAmino } from "./attestation"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState struct */ export interface GenesisState { params?: Params; @@ -303,6 +302,16 @@ export const GenesisState = { typeUrl: "/injective.peggy.v1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + Valset.registerTypeUrl(); + MsgValsetConfirm.registerTypeUrl(); + OutgoingTxBatch.registerTypeUrl(); + MsgConfirmBatch.registerTypeUrl(); + Attestation.registerTypeUrl(); + MsgSetOrchestratorAddresses.registerTypeUrl(); + ERC20ToDenom.registerTypeUrl(); + OutgoingTransferTx.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/msgs.rpc.func.ts b/libs/injective-react/src/injective/peggy/v1/msgs.rpc.func.ts index 6137afa4..bc9d6ab5 100644 --- a/libs/injective-react/src/injective/peggy/v1/msgs.rpc.func.ts +++ b/libs/injective-react/src/injective/peggy/v1/msgs.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgValsetConfirm, MsgSendToEth, MsgRequestBatch, MsgConfirmBatch, MsgDepositClaim, MsgWithdrawClaim, MsgValsetUpdatedClaim, MsgERC20DeployedClaim, MsgSetOrchestratorAddresses, MsgCancelSendToEth, MsgSubmitBadSignatureEvidence, MsgUpdateParams, MsgBlacklistEthereumAddresses, MsgRevokeEthereumBlacklist } from "./msgs"; export const createValsetConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgValsetConfirm.typeUrl, encoders: toEncoders(MsgValsetConfirm), - converters: toConverters(MsgValsetConfirm) + converters: toConverters(MsgValsetConfirm), + deps: [MsgValsetConfirm] }); export const useValsetConfirm = buildUseMutation({ builderMutationFn: createValsetConfirm @@ -15,7 +16,8 @@ export const createSendToEth = (clientResolver?: SigningClientResolver) => build clientResolver, typeUrl: MsgSendToEth.typeUrl, encoders: toEncoders(MsgSendToEth), - converters: toConverters(MsgSendToEth) + converters: toConverters(MsgSendToEth), + deps: [MsgSendToEth] }); export const useSendToEth = buildUseMutation({ builderMutationFn: createSendToEth @@ -24,7 +26,8 @@ export const createRequestBatch = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgRequestBatch.typeUrl, encoders: toEncoders(MsgRequestBatch), - converters: toConverters(MsgRequestBatch) + converters: toConverters(MsgRequestBatch), + deps: [MsgRequestBatch] }); export const useRequestBatch = buildUseMutation({ builderMutationFn: createRequestBatch @@ -33,7 +36,8 @@ export const createConfirmBatch = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgConfirmBatch.typeUrl, encoders: toEncoders(MsgConfirmBatch), - converters: toConverters(MsgConfirmBatch) + converters: toConverters(MsgConfirmBatch), + deps: [MsgConfirmBatch] }); export const useConfirmBatch = buildUseMutation({ builderMutationFn: createConfirmBatch @@ -42,7 +46,8 @@ export const createDepositClaim = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgDepositClaim.typeUrl, encoders: toEncoders(MsgDepositClaim), - converters: toConverters(MsgDepositClaim) + converters: toConverters(MsgDepositClaim), + deps: [MsgDepositClaim] }); export const useDepositClaim = buildUseMutation({ builderMutationFn: createDepositClaim @@ -51,7 +56,8 @@ export const createWithdrawClaim = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgWithdrawClaim.typeUrl, encoders: toEncoders(MsgWithdrawClaim), - converters: toConverters(MsgWithdrawClaim) + converters: toConverters(MsgWithdrawClaim), + deps: [MsgWithdrawClaim] }); export const useWithdrawClaim = buildUseMutation({ builderMutationFn: createWithdrawClaim @@ -60,7 +66,8 @@ export const createValsetUpdateClaim = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgValsetUpdatedClaim.typeUrl, encoders: toEncoders(MsgValsetUpdatedClaim), - converters: toConverters(MsgValsetUpdatedClaim) + converters: toConverters(MsgValsetUpdatedClaim), + deps: [MsgValsetUpdatedClaim] }); export const useValsetUpdateClaim = buildUseMutation({ builderMutationFn: createValsetUpdateClaim @@ -69,7 +76,8 @@ export const createERC20DeployedClaim = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgERC20DeployedClaim.typeUrl, encoders: toEncoders(MsgERC20DeployedClaim), - converters: toConverters(MsgERC20DeployedClaim) + converters: toConverters(MsgERC20DeployedClaim), + deps: [MsgERC20DeployedClaim] }); export const useERC20DeployedClaim = buildUseMutation({ builderMutationFn: createERC20DeployedClaim @@ -78,7 +86,8 @@ export const createSetOrchestratorAddresses = (clientResolver?: SigningClientRes clientResolver, typeUrl: MsgSetOrchestratorAddresses.typeUrl, encoders: toEncoders(MsgSetOrchestratorAddresses), - converters: toConverters(MsgSetOrchestratorAddresses) + converters: toConverters(MsgSetOrchestratorAddresses), + deps: [MsgSetOrchestratorAddresses] }); export const useSetOrchestratorAddresses = buildUseMutation({ builderMutationFn: createSetOrchestratorAddresses @@ -87,7 +96,8 @@ export const createCancelSendToEth = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgCancelSendToEth.typeUrl, encoders: toEncoders(MsgCancelSendToEth), - converters: toConverters(MsgCancelSendToEth) + converters: toConverters(MsgCancelSendToEth), + deps: [MsgCancelSendToEth] }); export const useCancelSendToEth = buildUseMutation({ builderMutationFn: createCancelSendToEth @@ -96,7 +106,8 @@ export const createSubmitBadSignatureEvidence = (clientResolver?: SigningClientR clientResolver, typeUrl: MsgSubmitBadSignatureEvidence.typeUrl, encoders: toEncoders(MsgSubmitBadSignatureEvidence), - converters: toConverters(MsgSubmitBadSignatureEvidence) + converters: toConverters(MsgSubmitBadSignatureEvidence), + deps: [MsgSubmitBadSignatureEvidence] }); export const useSubmitBadSignatureEvidence = buildUseMutation({ builderMutationFn: createSubmitBadSignatureEvidence @@ -105,7 +116,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -114,7 +126,8 @@ export const createBlacklistEthereumAddresses = (clientResolver?: SigningClientR clientResolver, typeUrl: MsgBlacklistEthereumAddresses.typeUrl, encoders: toEncoders(MsgBlacklistEthereumAddresses), - converters: toConverters(MsgBlacklistEthereumAddresses) + converters: toConverters(MsgBlacklistEthereumAddresses), + deps: [MsgBlacklistEthereumAddresses] }); export const useBlacklistEthereumAddresses = buildUseMutation({ builderMutationFn: createBlacklistEthereumAddresses @@ -123,7 +136,8 @@ export const createRevokeEthereumBlacklist = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgRevokeEthereumBlacklist.typeUrl, encoders: toEncoders(MsgRevokeEthereumBlacklist), - converters: toConverters(MsgRevokeEthereumBlacklist) + converters: toConverters(MsgRevokeEthereumBlacklist), + deps: [MsgRevokeEthereumBlacklist] }); export const useRevokeEthereumBlacklist = buildUseMutation({ builderMutationFn: createRevokeEthereumBlacklist diff --git a/libs/injective-react/src/injective/peggy/v1/msgs.ts b/libs/injective-react/src/injective/peggy/v1/msgs.ts index 32e90531..d4efbcf3 100644 --- a/libs/injective-react/src/injective/peggy/v1/msgs.ts +++ b/libs/injective-react/src/injective/peggy/v1/msgs.ts @@ -4,7 +4,6 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino } from "./params"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgSetOrchestratorAddresses * this message allows validators to delegate their voting responsibilities @@ -771,10 +770,9 @@ export const MsgSetOrchestratorAddresses = { typeUrl: "/injective.peggy.v1.MsgSetOrchestratorAddresses", value: MsgSetOrchestratorAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetOrchestratorAddresses.typeUrl, MsgSetOrchestratorAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetOrchestratorAddresses.aminoType, MsgSetOrchestratorAddresses.typeUrl); function createBaseMsgSetOrchestratorAddressesResponse(): MsgSetOrchestratorAddressesResponse { return {}; } @@ -829,9 +827,9 @@ export const MsgSetOrchestratorAddressesResponse = { typeUrl: "/injective.peggy.v1.MsgSetOrchestratorAddressesResponse", value: MsgSetOrchestratorAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetOrchestratorAddressesResponse.typeUrl, MsgSetOrchestratorAddressesResponse); function createBaseMsgValsetConfirm(): MsgValsetConfirm { return { nonce: BigInt(0), @@ -942,10 +940,9 @@ export const MsgValsetConfirm = { typeUrl: "/injective.peggy.v1.MsgValsetConfirm", value: MsgValsetConfirm.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgValsetConfirm.typeUrl, MsgValsetConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgValsetConfirm.aminoType, MsgValsetConfirm.typeUrl); function createBaseMsgValsetConfirmResponse(): MsgValsetConfirmResponse { return {}; } @@ -1000,9 +997,9 @@ export const MsgValsetConfirmResponse = { typeUrl: "/injective.peggy.v1.MsgValsetConfirmResponse", value: MsgValsetConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgValsetConfirmResponse.typeUrl, MsgValsetConfirmResponse); function createBaseMsgSendToEth(): MsgSendToEth { return { sender: "", @@ -1113,10 +1110,11 @@ export const MsgSendToEth = { typeUrl: "/injective.peggy.v1.MsgSendToEth", value: MsgSendToEth.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSendToEth.typeUrl, MsgSendToEth); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSendToEth.aminoType, MsgSendToEth.typeUrl); function createBaseMsgSendToEthResponse(): MsgSendToEthResponse { return {}; } @@ -1171,9 +1169,9 @@ export const MsgSendToEthResponse = { typeUrl: "/injective.peggy.v1.MsgSendToEthResponse", value: MsgSendToEthResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSendToEthResponse.typeUrl, MsgSendToEthResponse); function createBaseMsgRequestBatch(): MsgRequestBatch { return { orchestrator: "", @@ -1260,10 +1258,9 @@ export const MsgRequestBatch = { typeUrl: "/injective.peggy.v1.MsgRequestBatch", value: MsgRequestBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBatch.typeUrl, MsgRequestBatch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRequestBatch.aminoType, MsgRequestBatch.typeUrl); function createBaseMsgRequestBatchResponse(): MsgRequestBatchResponse { return {}; } @@ -1318,9 +1315,9 @@ export const MsgRequestBatchResponse = { typeUrl: "/injective.peggy.v1.MsgRequestBatchResponse", value: MsgRequestBatchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBatchResponse.typeUrl, MsgRequestBatchResponse); function createBaseMsgConfirmBatch(): MsgConfirmBatch { return { nonce: BigInt(0), @@ -1443,10 +1440,9 @@ export const MsgConfirmBatch = { typeUrl: "/injective.peggy.v1.MsgConfirmBatch", value: MsgConfirmBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConfirmBatch.typeUrl, MsgConfirmBatch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConfirmBatch.aminoType, MsgConfirmBatch.typeUrl); function createBaseMsgConfirmBatchResponse(): MsgConfirmBatchResponse { return {}; } @@ -1501,9 +1497,9 @@ export const MsgConfirmBatchResponse = { typeUrl: "/injective.peggy.v1.MsgConfirmBatchResponse", value: MsgConfirmBatchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConfirmBatchResponse.typeUrl, MsgConfirmBatchResponse); function createBaseMsgDepositClaim(): MsgDepositClaim { return { eventNonce: BigInt(0), @@ -1662,10 +1658,9 @@ export const MsgDepositClaim = { typeUrl: "/injective.peggy.v1.MsgDepositClaim", value: MsgDepositClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositClaim.typeUrl, MsgDepositClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositClaim.aminoType, MsgDepositClaim.typeUrl); function createBaseMsgDepositClaimResponse(): MsgDepositClaimResponse { return {}; } @@ -1720,9 +1715,9 @@ export const MsgDepositClaimResponse = { typeUrl: "/injective.peggy.v1.MsgDepositClaimResponse", value: MsgDepositClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositClaimResponse.typeUrl, MsgDepositClaimResponse); function createBaseMsgWithdrawClaim(): MsgWithdrawClaim { return { eventNonce: BigInt(0), @@ -1845,10 +1840,9 @@ export const MsgWithdrawClaim = { typeUrl: "/injective.peggy.v1.MsgWithdrawClaim", value: MsgWithdrawClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawClaim.typeUrl, MsgWithdrawClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawClaim.aminoType, MsgWithdrawClaim.typeUrl); function createBaseMsgWithdrawClaimResponse(): MsgWithdrawClaimResponse { return {}; } @@ -1903,9 +1897,9 @@ export const MsgWithdrawClaimResponse = { typeUrl: "/injective.peggy.v1.MsgWithdrawClaimResponse", value: MsgWithdrawClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawClaimResponse.typeUrl, MsgWithdrawClaimResponse); function createBaseMsgERC20DeployedClaim(): MsgERC20DeployedClaim { return { eventNonce: BigInt(0), @@ -2064,10 +2058,9 @@ export const MsgERC20DeployedClaim = { typeUrl: "/injective.peggy.v1.MsgERC20DeployedClaim", value: MsgERC20DeployedClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgERC20DeployedClaim.typeUrl, MsgERC20DeployedClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgERC20DeployedClaim.aminoType, MsgERC20DeployedClaim.typeUrl); function createBaseMsgERC20DeployedClaimResponse(): MsgERC20DeployedClaimResponse { return {}; } @@ -2122,9 +2115,9 @@ export const MsgERC20DeployedClaimResponse = { typeUrl: "/injective.peggy.v1.MsgERC20DeployedClaimResponse", value: MsgERC20DeployedClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgERC20DeployedClaimResponse.typeUrl, MsgERC20DeployedClaimResponse); function createBaseMsgCancelSendToEth(): MsgCancelSendToEth { return { transactionId: BigInt(0), @@ -2211,10 +2204,9 @@ export const MsgCancelSendToEth = { typeUrl: "/injective.peggy.v1.MsgCancelSendToEth", value: MsgCancelSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSendToEth.typeUrl, MsgCancelSendToEth); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelSendToEth.aminoType, MsgCancelSendToEth.typeUrl); function createBaseMsgCancelSendToEthResponse(): MsgCancelSendToEthResponse { return {}; } @@ -2269,9 +2261,9 @@ export const MsgCancelSendToEthResponse = { typeUrl: "/injective.peggy.v1.MsgCancelSendToEthResponse", value: MsgCancelSendToEthResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSendToEthResponse.typeUrl, MsgCancelSendToEthResponse); function createBaseMsgSubmitBadSignatureEvidence(): MsgSubmitBadSignatureEvidence { return { subject: undefined, @@ -2370,10 +2362,9 @@ export const MsgSubmitBadSignatureEvidence = { typeUrl: "/injective.peggy.v1.MsgSubmitBadSignatureEvidence", value: MsgSubmitBadSignatureEvidence.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitBadSignatureEvidence.typeUrl, MsgSubmitBadSignatureEvidence); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitBadSignatureEvidence.aminoType, MsgSubmitBadSignatureEvidence.typeUrl); function createBaseMsgSubmitBadSignatureEvidenceResponse(): MsgSubmitBadSignatureEvidenceResponse { return {}; } @@ -2428,9 +2419,9 @@ export const MsgSubmitBadSignatureEvidenceResponse = { typeUrl: "/injective.peggy.v1.MsgSubmitBadSignatureEvidenceResponse", value: MsgSubmitBadSignatureEvidenceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitBadSignatureEvidenceResponse.typeUrl, MsgSubmitBadSignatureEvidenceResponse); function createBaseMsgValsetUpdatedClaim(): MsgValsetUpdatedClaim { return { eventNonce: BigInt(0), @@ -2579,10 +2570,11 @@ export const MsgValsetUpdatedClaim = { typeUrl: "/injective.peggy.v1.MsgValsetUpdatedClaim", value: MsgValsetUpdatedClaim.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgValsetUpdatedClaim.typeUrl, MsgValsetUpdatedClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgValsetUpdatedClaim.aminoType, MsgValsetUpdatedClaim.typeUrl); function createBaseMsgValsetUpdatedClaimResponse(): MsgValsetUpdatedClaimResponse { return {}; } @@ -2637,9 +2629,9 @@ export const MsgValsetUpdatedClaimResponse = { typeUrl: "/injective.peggy.v1.MsgValsetUpdatedClaimResponse", value: MsgValsetUpdatedClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgValsetUpdatedClaimResponse.typeUrl, MsgValsetUpdatedClaimResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2726,10 +2718,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.peggy.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2784,9 +2777,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.peggy.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgBlacklistEthereumAddresses(): MsgBlacklistEthereumAddresses { return { signer: "", @@ -2875,10 +2868,9 @@ export const MsgBlacklistEthereumAddresses = { typeUrl: "/injective.peggy.v1.MsgBlacklistEthereumAddresses", value: MsgBlacklistEthereumAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBlacklistEthereumAddresses.typeUrl, MsgBlacklistEthereumAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBlacklistEthereumAddresses.aminoType, MsgBlacklistEthereumAddresses.typeUrl); function createBaseMsgBlacklistEthereumAddressesResponse(): MsgBlacklistEthereumAddressesResponse { return {}; } @@ -2933,9 +2925,9 @@ export const MsgBlacklistEthereumAddressesResponse = { typeUrl: "/injective.peggy.v1.MsgBlacklistEthereumAddressesResponse", value: MsgBlacklistEthereumAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBlacklistEthereumAddressesResponse.typeUrl, MsgBlacklistEthereumAddressesResponse); function createBaseMsgRevokeEthereumBlacklist(): MsgRevokeEthereumBlacklist { return { signer: "", @@ -3024,10 +3016,9 @@ export const MsgRevokeEthereumBlacklist = { typeUrl: "/injective.peggy.v1.MsgRevokeEthereumBlacklist", value: MsgRevokeEthereumBlacklist.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeEthereumBlacklist.typeUrl, MsgRevokeEthereumBlacklist); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeEthereumBlacklist.aminoType, MsgRevokeEthereumBlacklist.typeUrl); function createBaseMsgRevokeEthereumBlacklistResponse(): MsgRevokeEthereumBlacklistResponse { return {}; } @@ -3082,6 +3073,6 @@ export const MsgRevokeEthereumBlacklistResponse = { typeUrl: "/injective.peggy.v1.MsgRevokeEthereumBlacklistResponse", value: MsgRevokeEthereumBlacklistResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRevokeEthereumBlacklistResponse.typeUrl, MsgRevokeEthereumBlacklistResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/params.ts b/libs/injective-react/src/injective/peggy/v1/params.ts index 8925790d..b329604b 100644 --- a/libs/injective-react/src/injective/peggy/v1/params.ts +++ b/libs/injective-react/src/injective/peggy/v1/params.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { peggyId: string; contractSourceHash: string; @@ -386,7 +385,8 @@ export const Params = { typeUrl: "/injective.peggy.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/pool.ts b/libs/injective-react/src/injective/peggy/v1/pool.ts index 3b46adc4..59a59d58 100644 --- a/libs/injective-react/src/injective/peggy/v1/pool.ts +++ b/libs/injective-react/src/injective/peggy/v1/pool.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** IDSet represents a set of IDs */ export interface IDSet { ids: bigint[]; @@ -111,9 +110,9 @@ export const IDSet = { typeUrl: "/injective.peggy.v1.IDSet", value: IDSet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IDSet.typeUrl, IDSet); function createBaseBatchFees(): BatchFees { return { token: "", @@ -193,6 +192,6 @@ export const BatchFees = { typeUrl: "/injective.peggy.v1.BatchFees", value: BatchFees.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(BatchFees.typeUrl, BatchFees); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/proposal.ts b/libs/injective-react/src/injective/peggy/v1/proposal.ts index cf60d937..1368cbdb 100644 --- a/libs/injective-react/src/injective/peggy/v1/proposal.ts +++ b/libs/injective-react/src/injective/peggy/v1/proposal.ts @@ -130,9 +130,11 @@ export const BlacklistEthereumAddressesProposal = { typeUrl: "/injective.peggy.v1.BlacklistEthereumAddressesProposal", value: BlacklistEthereumAddressesProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BlacklistEthereumAddressesProposal.typeUrl, BlacklistEthereumAddressesProposal); } }; -GlobalDecoderRegistry.register(BlacklistEthereumAddressesProposal.typeUrl, BlacklistEthereumAddressesProposal); function createBaseRevokeEthereumBlacklistProposal(): RevokeEthereumBlacklistProposal { return { title: "", @@ -226,6 +228,8 @@ export const RevokeEthereumBlacklistProposal = { typeUrl: "/injective.peggy.v1.RevokeEthereumBlacklistProposal", value: RevokeEthereumBlacklistProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeEthereumBlacklistProposal.typeUrl, RevokeEthereumBlacklistProposal); } -}; -GlobalDecoderRegistry.register(RevokeEthereumBlacklistProposal.typeUrl, RevokeEthereumBlacklistProposal); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/query.rpc.func.ts b/libs/injective-react/src/injective/peggy/v1/query.rpc.func.ts index 80f72ba1..320e4fe3 100644 --- a/libs/injective-react/src/injective/peggy/v1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/peggy/v1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -17,7 +18,8 @@ export const createGetCurrentValset = (clientResolver?: RpcResolver) => buildQue decode: QueryCurrentValsetResponse.decode, service: "injective.peggy.v1.Query", method: "CurrentValset", - clientResolver + clientResolver, + deps: [QueryCurrentValsetRequest, QueryCurrentValsetResponse] }); export const useGetCurrentValset = buildUseQuery({ builderQueryFn: createGetCurrentValset, @@ -28,7 +30,8 @@ export const createGetValsetRequest = (clientResolver?: RpcResolver) => buildQue decode: QueryValsetRequestResponse.decode, service: "injective.peggy.v1.Query", method: "ValsetRequest", - clientResolver + clientResolver, + deps: [QueryValsetRequestRequest, QueryValsetRequestResponse] }); export const useGetValsetRequest = buildUseQuery({ builderQueryFn: createGetValsetRequest, @@ -39,7 +42,8 @@ export const createGetValsetConfirm = (clientResolver?: RpcResolver) => buildQue decode: QueryValsetConfirmResponse.decode, service: "injective.peggy.v1.Query", method: "ValsetConfirm", - clientResolver + clientResolver, + deps: [QueryValsetConfirmRequest, QueryValsetConfirmResponse] }); export const useGetValsetConfirm = buildUseQuery({ builderQueryFn: createGetValsetConfirm, @@ -50,7 +54,8 @@ export const createGetValsetConfirmsByNonce = (clientResolver?: RpcResolver) => decode: QueryValsetConfirmsByNonceResponse.decode, service: "injective.peggy.v1.Query", method: "ValsetConfirmsByNonce", - clientResolver + clientResolver, + deps: [QueryValsetConfirmsByNonceRequest, QueryValsetConfirmsByNonceResponse] }); export const useGetValsetConfirmsByNonce = buildUseQuery({ builderQueryFn: createGetValsetConfirmsByNonce, @@ -61,7 +66,8 @@ export const createGetLastValsetRequests = (clientResolver?: RpcResolver) => bui decode: QueryLastValsetRequestsResponse.decode, service: "injective.peggy.v1.Query", method: "LastValsetRequests", - clientResolver + clientResolver, + deps: [QueryLastValsetRequestsRequest, QueryLastValsetRequestsResponse] }); export const useGetLastValsetRequests = buildUseQuery({ builderQueryFn: createGetLastValsetRequests, @@ -72,7 +78,8 @@ export const createGetLastPendingValsetRequestByAddr = (clientResolver?: RpcReso decode: QueryLastPendingValsetRequestByAddrResponse.decode, service: "injective.peggy.v1.Query", method: "LastPendingValsetRequestByAddr", - clientResolver + clientResolver, + deps: [QueryLastPendingValsetRequestByAddrRequest, QueryLastPendingValsetRequestByAddrResponse] }); export const useGetLastPendingValsetRequestByAddr = buildUseQuery({ builderQueryFn: createGetLastPendingValsetRequestByAddr, @@ -83,7 +90,8 @@ export const createGetLastEventByAddr = (clientResolver?: RpcResolver) => buildQ decode: QueryLastEventByAddrResponse.decode, service: "injective.peggy.v1.Query", method: "LastEventByAddr", - clientResolver + clientResolver, + deps: [QueryLastEventByAddrRequest, QueryLastEventByAddrResponse] }); export const useGetLastEventByAddr = buildUseQuery({ builderQueryFn: createGetLastEventByAddr, @@ -94,7 +102,8 @@ export const createGetGetPendingSendToEth = (clientResolver?: RpcResolver) => bu decode: QueryPendingSendToEthResponse.decode, service: "injective.peggy.v1.Query", method: "GetPendingSendToEth", - clientResolver + clientResolver, + deps: [QueryPendingSendToEth, QueryPendingSendToEthResponse] }); export const useGetGetPendingSendToEth = buildUseQuery({ builderQueryFn: createGetGetPendingSendToEth, @@ -105,7 +114,8 @@ export const createGetBatchFees = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetBatchFees, @@ -116,7 +126,8 @@ export const createGetOutgoingTxBatches = (clientResolver?: RpcResolver) => buil decode: QueryOutgoingTxBatchesResponse.decode, service: "injective.peggy.v1.Query", method: "OutgoingTxBatches", - clientResolver + clientResolver, + deps: [QueryOutgoingTxBatchesRequest, QueryOutgoingTxBatchesResponse] }); export const useGetOutgoingTxBatches = buildUseQuery({ builderQueryFn: createGetOutgoingTxBatches, @@ -127,7 +138,8 @@ export const createGetLastPendingBatchRequestByAddr = (clientResolver?: RpcResol decode: QueryLastPendingBatchRequestByAddrResponse.decode, service: "injective.peggy.v1.Query", method: "LastPendingBatchRequestByAddr", - clientResolver + clientResolver, + deps: [QueryLastPendingBatchRequestByAddrRequest, QueryLastPendingBatchRequestByAddrResponse] }); export const useGetLastPendingBatchRequestByAddr = buildUseQuery({ builderQueryFn: createGetLastPendingBatchRequestByAddr, @@ -138,7 +150,8 @@ export const createGetBatchRequestByNonce = (clientResolver?: RpcResolver) => bu decode: QueryBatchRequestByNonceResponse.decode, service: "injective.peggy.v1.Query", method: "BatchRequestByNonce", - clientResolver + clientResolver, + deps: [QueryBatchRequestByNonceRequest, QueryBatchRequestByNonceResponse] }); export const useGetBatchRequestByNonce = buildUseQuery({ builderQueryFn: createGetBatchRequestByNonce, @@ -149,7 +162,8 @@ export const createGetBatchConfirms = (clientResolver?: RpcResolver) => buildQue decode: QueryBatchConfirmsResponse.decode, service: "injective.peggy.v1.Query", method: "BatchConfirms", - clientResolver + clientResolver, + deps: [QueryBatchConfirmsRequest, QueryBatchConfirmsResponse] }); export const useGetBatchConfirms = buildUseQuery({ builderQueryFn: createGetBatchConfirms, @@ -160,7 +174,8 @@ export const createGetERC20ToDenom = (clientResolver?: RpcResolver) => buildQuer decode: QueryERC20ToDenomResponse.decode, service: "injective.peggy.v1.Query", method: "ERC20ToDenom", - clientResolver + clientResolver, + deps: [QueryERC20ToDenomRequest, QueryERC20ToDenomResponse] }); export const useGetERC20ToDenom = buildUseQuery({ builderQueryFn: createGetERC20ToDenom, @@ -171,7 +186,8 @@ export const createGetDenomToERC20 = (clientResolver?: RpcResolver) => buildQuer decode: QueryDenomToERC20Response.decode, service: "injective.peggy.v1.Query", method: "DenomToERC20", - clientResolver + clientResolver, + deps: [QueryDenomToERC20Request, QueryDenomToERC20Response] }); export const useGetDenomToERC20 = buildUseQuery({ builderQueryFn: createGetDenomToERC20, @@ -182,7 +198,8 @@ export const createGetGetDelegateKeyByValidator = (clientResolver?: RpcResolver) decode: QueryDelegateKeysByValidatorAddressResponse.decode, service: "injective.peggy.v1.Query", method: "GetDelegateKeyByValidator", - clientResolver + clientResolver, + deps: [QueryDelegateKeysByValidatorAddress, QueryDelegateKeysByValidatorAddressResponse] }); export const useGetGetDelegateKeyByValidator = buildUseQuery({ builderQueryFn: createGetGetDelegateKeyByValidator, @@ -193,7 +210,8 @@ export const createGetGetDelegateKeyByEth = (clientResolver?: RpcResolver) => bu decode: QueryDelegateKeysByEthAddressResponse.decode, service: "injective.peggy.v1.Query", method: "GetDelegateKeyByEth", - clientResolver + clientResolver, + deps: [QueryDelegateKeysByEthAddress, QueryDelegateKeysByEthAddressResponse] }); export const useGetGetDelegateKeyByEth = buildUseQuery({ builderQueryFn: createGetGetDelegateKeyByEth, @@ -204,7 +222,8 @@ export const createGetGetDelegateKeyByOrchestrator = (clientResolver?: RpcResolv decode: QueryDelegateKeysByOrchestratorAddressResponse.decode, service: "injective.peggy.v1.Query", method: "GetDelegateKeyByOrchestrator", - clientResolver + clientResolver, + deps: [QueryDelegateKeysByOrchestratorAddress, QueryDelegateKeysByOrchestratorAddressResponse] }); export const useGetGetDelegateKeyByOrchestrator = buildUseQuery({ builderQueryFn: createGetGetDelegateKeyByOrchestrator, @@ -215,7 +234,8 @@ export const createGetPeggyModuleState = (clientResolver?: RpcResolver) => build decode: QueryModuleStateResponse.decode, service: "injective.peggy.v1.Query", method: "PeggyModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetPeggyModuleState = buildUseQuery({ builderQueryFn: createGetPeggyModuleState, @@ -226,7 +246,8 @@ export const createGetMissingPeggoNonces = (clientResolver?: RpcResolver) => bui decode: MissingNoncesResponse.decode, service: "injective.peggy.v1.Query", method: "MissingPeggoNonces", - clientResolver + clientResolver, + deps: [MissingNoncesRequest, MissingNoncesResponse] }); export const useGetMissingPeggoNonces = buildUseQuery({ builderQueryFn: createGetMissingPeggoNonces, diff --git a/libs/injective-react/src/injective/peggy/v1/query.ts b/libs/injective-react/src/injective/peggy/v1/query.ts index f325d5d4..763baece 100644 --- a/libs/injective-react/src/injective/peggy/v1/query.ts +++ b/libs/injective-react/src/injective/peggy/v1/query.ts @@ -6,7 +6,6 @@ import { OutgoingTxBatch, OutgoingTxBatchAmino, OutgoingTransferTx, OutgoingTran import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { typeUrl: "/injective.peggy.v1.QueryParamsRequest"; @@ -655,9 +654,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.peggy.v1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -725,9 +724,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.peggy.v1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryCurrentValsetRequest(): QueryCurrentValsetRequest { return {}; } @@ -782,9 +783,9 @@ export const QueryCurrentValsetRequest = { typeUrl: "/injective.peggy.v1.QueryCurrentValsetRequest", value: QueryCurrentValsetRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCurrentValsetRequest.typeUrl, QueryCurrentValsetRequest); function createBaseQueryCurrentValsetResponse(): QueryCurrentValsetResponse { return { valset: undefined @@ -852,9 +853,11 @@ export const QueryCurrentValsetResponse = { typeUrl: "/injective.peggy.v1.QueryCurrentValsetResponse", value: QueryCurrentValsetResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCurrentValsetResponse.typeUrl, QueryCurrentValsetResponse); function createBaseQueryValsetRequestRequest(): QueryValsetRequestRequest { return { nonce: BigInt(0) @@ -922,9 +925,9 @@ export const QueryValsetRequestRequest = { typeUrl: "/injective.peggy.v1.QueryValsetRequestRequest", value: QueryValsetRequestRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValsetRequestRequest.typeUrl, QueryValsetRequestRequest); function createBaseQueryValsetRequestResponse(): QueryValsetRequestResponse { return { valset: undefined @@ -992,9 +995,11 @@ export const QueryValsetRequestResponse = { typeUrl: "/injective.peggy.v1.QueryValsetRequestResponse", value: QueryValsetRequestResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValsetRequestResponse.typeUrl, QueryValsetRequestResponse); function createBaseQueryValsetConfirmRequest(): QueryValsetConfirmRequest { return { nonce: BigInt(0), @@ -1074,9 +1079,9 @@ export const QueryValsetConfirmRequest = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmRequest", value: QueryValsetConfirmRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValsetConfirmRequest.typeUrl, QueryValsetConfirmRequest); function createBaseQueryValsetConfirmResponse(): QueryValsetConfirmResponse { return { confirm: undefined @@ -1144,9 +1149,11 @@ export const QueryValsetConfirmResponse = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmResponse", value: QueryValsetConfirmResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MsgValsetConfirm.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValsetConfirmResponse.typeUrl, QueryValsetConfirmResponse); function createBaseQueryValsetConfirmsByNonceRequest(): QueryValsetConfirmsByNonceRequest { return { nonce: BigInt(0) @@ -1214,9 +1221,9 @@ export const QueryValsetConfirmsByNonceRequest = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmsByNonceRequest", value: QueryValsetConfirmsByNonceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValsetConfirmsByNonceRequest.typeUrl, QueryValsetConfirmsByNonceRequest); function createBaseQueryValsetConfirmsByNonceResponse(): QueryValsetConfirmsByNonceResponse { return { confirms: [] @@ -1286,9 +1293,11 @@ export const QueryValsetConfirmsByNonceResponse = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmsByNonceResponse", value: QueryValsetConfirmsByNonceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MsgValsetConfirm.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValsetConfirmsByNonceResponse.typeUrl, QueryValsetConfirmsByNonceResponse); function createBaseQueryLastValsetRequestsRequest(): QueryLastValsetRequestsRequest { return {}; } @@ -1343,9 +1352,9 @@ export const QueryLastValsetRequestsRequest = { typeUrl: "/injective.peggy.v1.QueryLastValsetRequestsRequest", value: QueryLastValsetRequestsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastValsetRequestsRequest.typeUrl, QueryLastValsetRequestsRequest); function createBaseQueryLastValsetRequestsResponse(): QueryLastValsetRequestsResponse { return { valsets: [] @@ -1415,9 +1424,11 @@ export const QueryLastValsetRequestsResponse = { typeUrl: "/injective.peggy.v1.QueryLastValsetRequestsResponse", value: QueryLastValsetRequestsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastValsetRequestsResponse.typeUrl, QueryLastValsetRequestsResponse); function createBaseQueryLastPendingValsetRequestByAddrRequest(): QueryLastPendingValsetRequestByAddrRequest { return { address: "" @@ -1485,9 +1496,9 @@ export const QueryLastPendingValsetRequestByAddrRequest = { typeUrl: "/injective.peggy.v1.QueryLastPendingValsetRequestByAddrRequest", value: QueryLastPendingValsetRequestByAddrRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastPendingValsetRequestByAddrRequest.typeUrl, QueryLastPendingValsetRequestByAddrRequest); function createBaseQueryLastPendingValsetRequestByAddrResponse(): QueryLastPendingValsetRequestByAddrResponse { return { valsets: [] @@ -1557,9 +1568,11 @@ export const QueryLastPendingValsetRequestByAddrResponse = { typeUrl: "/injective.peggy.v1.QueryLastPendingValsetRequestByAddrResponse", value: QueryLastPendingValsetRequestByAddrResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastPendingValsetRequestByAddrResponse.typeUrl, QueryLastPendingValsetRequestByAddrResponse); function createBaseQueryBatchFeeRequest(): QueryBatchFeeRequest { return {}; } @@ -1614,9 +1627,9 @@ export const QueryBatchFeeRequest = { typeUrl: "/injective.peggy.v1.QueryBatchFeeRequest", value: QueryBatchFeeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBatchFeeRequest.typeUrl, QueryBatchFeeRequest); function createBaseQueryBatchFeeResponse(): QueryBatchFeeResponse { return { batchFees: [] @@ -1686,9 +1699,11 @@ export const QueryBatchFeeResponse = { typeUrl: "/injective.peggy.v1.QueryBatchFeeResponse", value: QueryBatchFeeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BatchFees.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBatchFeeResponse.typeUrl, QueryBatchFeeResponse); function createBaseQueryLastPendingBatchRequestByAddrRequest(): QueryLastPendingBatchRequestByAddrRequest { return { address: "" @@ -1756,9 +1771,9 @@ export const QueryLastPendingBatchRequestByAddrRequest = { typeUrl: "/injective.peggy.v1.QueryLastPendingBatchRequestByAddrRequest", value: QueryLastPendingBatchRequestByAddrRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastPendingBatchRequestByAddrRequest.typeUrl, QueryLastPendingBatchRequestByAddrRequest); function createBaseQueryLastPendingBatchRequestByAddrResponse(): QueryLastPendingBatchRequestByAddrResponse { return { batch: undefined @@ -1826,9 +1841,11 @@ export const QueryLastPendingBatchRequestByAddrResponse = { typeUrl: "/injective.peggy.v1.QueryLastPendingBatchRequestByAddrResponse", value: QueryLastPendingBatchRequestByAddrResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTxBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastPendingBatchRequestByAddrResponse.typeUrl, QueryLastPendingBatchRequestByAddrResponse); function createBaseQueryOutgoingTxBatchesRequest(): QueryOutgoingTxBatchesRequest { return {}; } @@ -1883,9 +1900,9 @@ export const QueryOutgoingTxBatchesRequest = { typeUrl: "/injective.peggy.v1.QueryOutgoingTxBatchesRequest", value: QueryOutgoingTxBatchesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOutgoingTxBatchesRequest.typeUrl, QueryOutgoingTxBatchesRequest); function createBaseQueryOutgoingTxBatchesResponse(): QueryOutgoingTxBatchesResponse { return { batches: [] @@ -1955,9 +1972,11 @@ export const QueryOutgoingTxBatchesResponse = { typeUrl: "/injective.peggy.v1.QueryOutgoingTxBatchesResponse", value: QueryOutgoingTxBatchesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTxBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOutgoingTxBatchesResponse.typeUrl, QueryOutgoingTxBatchesResponse); function createBaseQueryBatchRequestByNonceRequest(): QueryBatchRequestByNonceRequest { return { nonce: BigInt(0), @@ -2037,9 +2056,9 @@ export const QueryBatchRequestByNonceRequest = { typeUrl: "/injective.peggy.v1.QueryBatchRequestByNonceRequest", value: QueryBatchRequestByNonceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBatchRequestByNonceRequest.typeUrl, QueryBatchRequestByNonceRequest); function createBaseQueryBatchRequestByNonceResponse(): QueryBatchRequestByNonceResponse { return { batch: undefined @@ -2107,9 +2126,11 @@ export const QueryBatchRequestByNonceResponse = { typeUrl: "/injective.peggy.v1.QueryBatchRequestByNonceResponse", value: QueryBatchRequestByNonceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTxBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBatchRequestByNonceResponse.typeUrl, QueryBatchRequestByNonceResponse); function createBaseQueryBatchConfirmsRequest(): QueryBatchConfirmsRequest { return { nonce: BigInt(0), @@ -2189,9 +2210,9 @@ export const QueryBatchConfirmsRequest = { typeUrl: "/injective.peggy.v1.QueryBatchConfirmsRequest", value: QueryBatchConfirmsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBatchConfirmsRequest.typeUrl, QueryBatchConfirmsRequest); function createBaseQueryBatchConfirmsResponse(): QueryBatchConfirmsResponse { return { confirms: [] @@ -2261,9 +2282,11 @@ export const QueryBatchConfirmsResponse = { typeUrl: "/injective.peggy.v1.QueryBatchConfirmsResponse", value: QueryBatchConfirmsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MsgConfirmBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBatchConfirmsResponse.typeUrl, QueryBatchConfirmsResponse); function createBaseQueryLastEventByAddrRequest(): QueryLastEventByAddrRequest { return { address: "" @@ -2331,9 +2354,9 @@ export const QueryLastEventByAddrRequest = { typeUrl: "/injective.peggy.v1.QueryLastEventByAddrRequest", value: QueryLastEventByAddrRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastEventByAddrRequest.typeUrl, QueryLastEventByAddrRequest); function createBaseQueryLastEventByAddrResponse(): QueryLastEventByAddrResponse { return { lastClaimEvent: undefined @@ -2401,9 +2424,11 @@ export const QueryLastEventByAddrResponse = { typeUrl: "/injective.peggy.v1.QueryLastEventByAddrResponse", value: QueryLastEventByAddrResponse.encode(message).finish() }; + }, + registerTypeUrl() { + LastClaimEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastEventByAddrResponse.typeUrl, QueryLastEventByAddrResponse); function createBaseQueryERC20ToDenomRequest(): QueryERC20ToDenomRequest { return { erc20: "" @@ -2471,9 +2496,9 @@ export const QueryERC20ToDenomRequest = { typeUrl: "/injective.peggy.v1.QueryERC20ToDenomRequest", value: QueryERC20ToDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryERC20ToDenomRequest.typeUrl, QueryERC20ToDenomRequest); function createBaseQueryERC20ToDenomResponse(): QueryERC20ToDenomResponse { return { denom: "", @@ -2553,9 +2578,9 @@ export const QueryERC20ToDenomResponse = { typeUrl: "/injective.peggy.v1.QueryERC20ToDenomResponse", value: QueryERC20ToDenomResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryERC20ToDenomResponse.typeUrl, QueryERC20ToDenomResponse); function createBaseQueryDenomToERC20Request(): QueryDenomToERC20Request { return { denom: "" @@ -2623,9 +2648,9 @@ export const QueryDenomToERC20Request = { typeUrl: "/injective.peggy.v1.QueryDenomToERC20Request", value: QueryDenomToERC20Request.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomToERC20Request.typeUrl, QueryDenomToERC20Request); function createBaseQueryDenomToERC20Response(): QueryDenomToERC20Response { return { erc20: "", @@ -2705,9 +2730,9 @@ export const QueryDenomToERC20Response = { typeUrl: "/injective.peggy.v1.QueryDenomToERC20Response", value: QueryDenomToERC20Response.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomToERC20Response.typeUrl, QueryDenomToERC20Response); function createBaseQueryDelegateKeysByValidatorAddress(): QueryDelegateKeysByValidatorAddress { return { validatorAddress: "" @@ -2775,9 +2800,9 @@ export const QueryDelegateKeysByValidatorAddress = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByValidatorAddress", value: QueryDelegateKeysByValidatorAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByValidatorAddress.typeUrl, QueryDelegateKeysByValidatorAddress); function createBaseQueryDelegateKeysByValidatorAddressResponse(): QueryDelegateKeysByValidatorAddressResponse { return { ethAddress: "", @@ -2857,9 +2882,9 @@ export const QueryDelegateKeysByValidatorAddressResponse = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByValidatorAddressResponse", value: QueryDelegateKeysByValidatorAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByValidatorAddressResponse.typeUrl, QueryDelegateKeysByValidatorAddressResponse); function createBaseQueryDelegateKeysByEthAddress(): QueryDelegateKeysByEthAddress { return { ethAddress: "" @@ -2927,9 +2952,9 @@ export const QueryDelegateKeysByEthAddress = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByEthAddress", value: QueryDelegateKeysByEthAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByEthAddress.typeUrl, QueryDelegateKeysByEthAddress); function createBaseQueryDelegateKeysByEthAddressResponse(): QueryDelegateKeysByEthAddressResponse { return { validatorAddress: "", @@ -3009,9 +3034,9 @@ export const QueryDelegateKeysByEthAddressResponse = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByEthAddressResponse", value: QueryDelegateKeysByEthAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByEthAddressResponse.typeUrl, QueryDelegateKeysByEthAddressResponse); function createBaseQueryDelegateKeysByOrchestratorAddress(): QueryDelegateKeysByOrchestratorAddress { return { orchestratorAddress: "" @@ -3079,9 +3104,9 @@ export const QueryDelegateKeysByOrchestratorAddress = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByOrchestratorAddress", value: QueryDelegateKeysByOrchestratorAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByOrchestratorAddress.typeUrl, QueryDelegateKeysByOrchestratorAddress); function createBaseQueryDelegateKeysByOrchestratorAddressResponse(): QueryDelegateKeysByOrchestratorAddressResponse { return { validatorAddress: "", @@ -3161,9 +3186,9 @@ export const QueryDelegateKeysByOrchestratorAddressResponse = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByOrchestratorAddressResponse", value: QueryDelegateKeysByOrchestratorAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByOrchestratorAddressResponse.typeUrl, QueryDelegateKeysByOrchestratorAddressResponse); function createBaseQueryPendingSendToEth(): QueryPendingSendToEth { return { senderAddress: "" @@ -3231,9 +3256,9 @@ export const QueryPendingSendToEth = { typeUrl: "/injective.peggy.v1.QueryPendingSendToEth", value: QueryPendingSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPendingSendToEth.typeUrl, QueryPendingSendToEth); function createBaseQueryPendingSendToEthResponse(): QueryPendingSendToEthResponse { return { transfersInBatches: [], @@ -3317,9 +3342,11 @@ export const QueryPendingSendToEthResponse = { typeUrl: "/injective.peggy.v1.QueryPendingSendToEthResponse", value: QueryPendingSendToEthResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTransferTx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPendingSendToEthResponse.typeUrl, QueryPendingSendToEthResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -3374,9 +3401,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.peggy.v1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -3444,9 +3471,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.peggy.v1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseMissingNoncesRequest(): MissingNoncesRequest { return {}; } @@ -3501,9 +3530,9 @@ export const MissingNoncesRequest = { typeUrl: "/injective.peggy.v1.MissingNoncesRequest", value: MissingNoncesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MissingNoncesRequest.typeUrl, MissingNoncesRequest); function createBaseMissingNoncesResponse(): MissingNoncesResponse { return { operatorAddresses: [] @@ -3573,6 +3602,6 @@ export const MissingNoncesResponse = { typeUrl: "/injective.peggy.v1.MissingNoncesResponse", value: MissingNoncesResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MissingNoncesResponse.typeUrl, MissingNoncesResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/peggy/v1/types.ts b/libs/injective-react/src/injective/peggy/v1/types.ts index 37fbe06a..b3d27b6c 100644 --- a/libs/injective-react/src/injective/peggy/v1/types.ts +++ b/libs/injective-react/src/injective/peggy/v1/types.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** BridgeValidator represents a validator's ETH address and its power */ export interface BridgeValidator { power: bigint; @@ -204,9 +203,9 @@ export const BridgeValidator = { typeUrl: "/injective.peggy.v1.BridgeValidator", value: BridgeValidator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BridgeValidator.typeUrl, BridgeValidator); function createBaseValset(): Valset { return { nonce: BigInt(0), @@ -324,9 +323,11 @@ export const Valset = { typeUrl: "/injective.peggy.v1.Valset", value: Valset.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Valset.typeUrl, Valset); function createBaseLastObservedEthereumBlockHeight(): LastObservedEthereumBlockHeight { return { cosmosBlockHeight: BigInt(0), @@ -406,9 +407,9 @@ export const LastObservedEthereumBlockHeight = { typeUrl: "/injective.peggy.v1.LastObservedEthereumBlockHeight", value: LastObservedEthereumBlockHeight.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LastObservedEthereumBlockHeight.typeUrl, LastObservedEthereumBlockHeight); function createBaseLastClaimEvent(): LastClaimEvent { return { ethereumEventNonce: BigInt(0), @@ -488,9 +489,9 @@ export const LastClaimEvent = { typeUrl: "/injective.peggy.v1.LastClaimEvent", value: LastClaimEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LastClaimEvent.typeUrl, LastClaimEvent); function createBaseERC20ToDenom(): ERC20ToDenom { return { erc20: "", @@ -570,6 +571,6 @@ export const ERC20ToDenom = { typeUrl: "/injective.peggy.v1.ERC20ToDenom", value: ERC20ToDenom.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ERC20ToDenom.typeUrl, ERC20ToDenom); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/permissions/v1beta1/events.ts b/libs/injective-react/src/injective/permissions/v1beta1/events.ts index 0b4fbba0..3f249c24 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/events.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/events.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventSetVoucher { addr: string; voucher: Coin; @@ -97,6 +96,8 @@ export const EventSetVoucher = { typeUrl: "/injective.permissions.v1beta1.EventSetVoucher", value: EventSetVoucher.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventSetVoucher.typeUrl, EventSetVoucher); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/permissions/v1beta1/genesis.ts b/libs/injective-react/src/injective/permissions/v1beta1/genesis.ts index 3920fd81..5961dd5c 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/genesis.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/genesis.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "./params"; import { Namespace, NamespaceAmino } from "./permissions"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the permissions module's genesis state. */ export interface GenesisState { /** params defines the parameters of the module. */ @@ -104,6 +103,9 @@ export const GenesisState = { typeUrl: "/injective.permissions.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + Namespace.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/permissions/v1beta1/params.ts b/libs/injective-react/src/injective/permissions/v1beta1/params.ts index 24aa6bb5..2af60295 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/params.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/params.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Params defines the parameters for the permissions module. */ export interface Params { wasmHookQueryMaxGas: bigint; @@ -91,7 +90,6 @@ export const Params = { typeUrl: "/injective.permissions.v1beta1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/permissions/v1beta1/permissions.ts b/libs/injective-react/src/injective/permissions/v1beta1/permissions.ts index 6cd42f27..4b5c411b 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/permissions.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/permissions.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** each Action enum value should be a power of two */ export enum Action { UNSPECIFIED = 0, @@ -303,9 +302,12 @@ export const Namespace = { typeUrl: "/injective.permissions.v1beta1.Namespace", value: Namespace.encode(message).finish() }; + }, + registerTypeUrl() { + Role.registerTypeUrl(); + AddressRoles.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Namespace.typeUrl, Namespace); function createBaseAddressRoles(): AddressRoles { return { address: "", @@ -387,9 +389,9 @@ export const AddressRoles = { typeUrl: "/injective.permissions.v1beta1.AddressRoles", value: AddressRoles.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressRoles.typeUrl, AddressRoles); function createBaseRole(): Role { return { role: "", @@ -469,9 +471,9 @@ export const Role = { typeUrl: "/injective.permissions.v1beta1.Role", value: Role.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Role.typeUrl, Role); function createBaseRoleIDs(): RoleIDs { return { roleIds: [] @@ -550,9 +552,9 @@ export const RoleIDs = { typeUrl: "/injective.permissions.v1beta1.RoleIDs", value: RoleIDs.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RoleIDs.typeUrl, RoleIDs); function createBaseVoucher(): Voucher { return { coins: [] @@ -622,9 +624,11 @@ export const Voucher = { typeUrl: "/injective.permissions.v1beta1.Voucher", value: Voucher.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Voucher.typeUrl, Voucher); function createBaseAddressVoucher(): AddressVoucher { return { address: "", @@ -704,6 +708,8 @@ export const AddressVoucher = { typeUrl: "/injective.permissions.v1beta1.AddressVoucher", value: AddressVoucher.encode(message).finish() }; + }, + registerTypeUrl() { + Voucher.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AddressVoucher.typeUrl, AddressVoucher); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/permissions/v1beta1/query.rpc.func.ts b/libs/injective-react/src/injective/permissions/v1beta1/query.rpc.func.ts index 39ccc3f6..ef93a703 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -17,7 +18,8 @@ export const createGetAllNamespaces = (clientResolver?: RpcResolver) => buildQue decode: QueryAllNamespacesResponse.decode, service: "injective.permissions.v1beta1.Query", method: "AllNamespaces", - clientResolver + clientResolver, + deps: [QueryAllNamespacesRequest, QueryAllNamespacesResponse] }); export const useGetAllNamespaces = buildUseQuery({ builderQueryFn: createGetAllNamespaces, @@ -28,7 +30,8 @@ export const createGetNamespaceByDenom = (clientResolver?: RpcResolver) => build decode: QueryNamespaceByDenomResponse.decode, service: "injective.permissions.v1beta1.Query", method: "NamespaceByDenom", - clientResolver + clientResolver, + deps: [QueryNamespaceByDenomRequest, QueryNamespaceByDenomResponse] }); export const useGetNamespaceByDenom = buildUseQuery({ builderQueryFn: createGetNamespaceByDenom, @@ -39,7 +42,8 @@ export const createGetAddressRoles = (clientResolver?: RpcResolver) => buildQuer decode: QueryAddressRolesResponse.decode, service: "injective.permissions.v1beta1.Query", method: "AddressRoles", - clientResolver + clientResolver, + deps: [QueryAddressRolesRequest, QueryAddressRolesResponse] }); export const useGetAddressRoles = buildUseQuery({ builderQueryFn: createGetAddressRoles, @@ -50,7 +54,8 @@ export const createGetAddressesByRole = (clientResolver?: RpcResolver) => buildQ decode: QueryAddressesByRoleResponse.decode, service: "injective.permissions.v1beta1.Query", method: "AddressesByRole", - clientResolver + clientResolver, + deps: [QueryAddressesByRoleRequest, QueryAddressesByRoleResponse] }); export const useGetAddressesByRole = buildUseQuery({ builderQueryFn: createGetAddressesByRole, @@ -61,7 +66,8 @@ export const createGetVouchersForAddress = (clientResolver?: RpcResolver) => bui decode: QueryVouchersForAddressResponse.decode, service: "injective.permissions.v1beta1.Query", method: "VouchersForAddress", - clientResolver + clientResolver, + deps: [QueryVouchersForAddressRequest, QueryVouchersForAddressResponse] }); export const useGetVouchersForAddress = buildUseQuery({ builderQueryFn: createGetVouchersForAddress, diff --git a/libs/injective-react/src/injective/permissions/v1beta1/query.ts b/libs/injective-react/src/injective/permissions/v1beta1/query.ts index adce6867..550e8235 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/query.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Namespace, NamespaceAmino } from "./permissions"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { @@ -278,9 +277,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.permissions.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -348,9 +347,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.permissions.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryAllNamespacesRequest(): QueryAllNamespacesRequest { return {}; } @@ -405,9 +406,9 @@ export const QueryAllNamespacesRequest = { typeUrl: "/injective.permissions.v1beta1.QueryAllNamespacesRequest", value: QueryAllNamespacesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAllNamespacesRequest.typeUrl, QueryAllNamespacesRequest); function createBaseQueryAllNamespacesResponse(): QueryAllNamespacesResponse { return { namespaces: [] @@ -477,9 +478,11 @@ export const QueryAllNamespacesResponse = { typeUrl: "/injective.permissions.v1beta1.QueryAllNamespacesResponse", value: QueryAllNamespacesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Namespace.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllNamespacesResponse.typeUrl, QueryAllNamespacesResponse); function createBaseQueryNamespaceByDenomRequest(): QueryNamespaceByDenomRequest { return { denom: "", @@ -559,9 +562,9 @@ export const QueryNamespaceByDenomRequest = { typeUrl: "/injective.permissions.v1beta1.QueryNamespaceByDenomRequest", value: QueryNamespaceByDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryNamespaceByDenomRequest.typeUrl, QueryNamespaceByDenomRequest); function createBaseQueryNamespaceByDenomResponse(): QueryNamespaceByDenomResponse { return { namespace: undefined @@ -629,9 +632,11 @@ export const QueryNamespaceByDenomResponse = { typeUrl: "/injective.permissions.v1beta1.QueryNamespaceByDenomResponse", value: QueryNamespaceByDenomResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Namespace.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryNamespaceByDenomResponse.typeUrl, QueryNamespaceByDenomResponse); function createBaseQueryAddressesByRoleRequest(): QueryAddressesByRoleRequest { return { denom: "", @@ -711,9 +716,9 @@ export const QueryAddressesByRoleRequest = { typeUrl: "/injective.permissions.v1beta1.QueryAddressesByRoleRequest", value: QueryAddressesByRoleRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressesByRoleRequest.typeUrl, QueryAddressesByRoleRequest); function createBaseQueryAddressesByRoleResponse(): QueryAddressesByRoleResponse { return { addresses: [] @@ -783,9 +788,9 @@ export const QueryAddressesByRoleResponse = { typeUrl: "/injective.permissions.v1beta1.QueryAddressesByRoleResponse", value: QueryAddressesByRoleResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressesByRoleResponse.typeUrl, QueryAddressesByRoleResponse); function createBaseQueryAddressRolesRequest(): QueryAddressRolesRequest { return { denom: "", @@ -865,9 +870,9 @@ export const QueryAddressRolesRequest = { typeUrl: "/injective.permissions.v1beta1.QueryAddressRolesRequest", value: QueryAddressRolesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressRolesRequest.typeUrl, QueryAddressRolesRequest); function createBaseQueryAddressRolesResponse(): QueryAddressRolesResponse { return { roles: [] @@ -937,9 +942,9 @@ export const QueryAddressRolesResponse = { typeUrl: "/injective.permissions.v1beta1.QueryAddressRolesResponse", value: QueryAddressRolesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressRolesResponse.typeUrl, QueryAddressRolesResponse); function createBaseQueryVouchersForAddressRequest(): QueryVouchersForAddressRequest { return { address: "" @@ -1007,9 +1012,9 @@ export const QueryVouchersForAddressRequest = { typeUrl: "/injective.permissions.v1beta1.QueryVouchersForAddressRequest", value: QueryVouchersForAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryVouchersForAddressRequest.typeUrl, QueryVouchersForAddressRequest); function createBaseQueryVouchersForAddressResponse(): QueryVouchersForAddressResponse { return { vouchers: [] @@ -1079,6 +1084,8 @@ export const QueryVouchersForAddressResponse = { typeUrl: "/injective.permissions.v1beta1.QueryVouchersForAddressResponse", value: QueryVouchersForAddressResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryVouchersForAddressResponse.typeUrl, QueryVouchersForAddressResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/permissions/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/injective/permissions/v1beta1/tx.rpc.func.ts index 982223c8..5d767842 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgUpdateParams, MsgCreateNamespace, MsgDeleteNamespace, MsgUpdateNamespace, MsgUpdateNamespaceRoles, MsgRevokeNamespaceRoles, MsgClaimVoucher } from "./tx"; export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -15,7 +16,8 @@ export const createCreateNamespace = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgCreateNamespace.typeUrl, encoders: toEncoders(MsgCreateNamespace), - converters: toConverters(MsgCreateNamespace) + converters: toConverters(MsgCreateNamespace), + deps: [MsgCreateNamespace] }); export const useCreateNamespace = buildUseMutation({ builderMutationFn: createCreateNamespace @@ -24,7 +26,8 @@ export const createDeleteNamespace = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgDeleteNamespace.typeUrl, encoders: toEncoders(MsgDeleteNamespace), - converters: toConverters(MsgDeleteNamespace) + converters: toConverters(MsgDeleteNamespace), + deps: [MsgDeleteNamespace] }); export const useDeleteNamespace = buildUseMutation({ builderMutationFn: createDeleteNamespace @@ -33,7 +36,8 @@ export const createUpdateNamespace = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgUpdateNamespace.typeUrl, encoders: toEncoders(MsgUpdateNamespace), - converters: toConverters(MsgUpdateNamespace) + converters: toConverters(MsgUpdateNamespace), + deps: [MsgUpdateNamespace] }); export const useUpdateNamespace = buildUseMutation({ builderMutationFn: createUpdateNamespace @@ -42,7 +46,8 @@ export const createUpdateNamespaceRoles = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgUpdateNamespaceRoles.typeUrl, encoders: toEncoders(MsgUpdateNamespaceRoles), - converters: toConverters(MsgUpdateNamespaceRoles) + converters: toConverters(MsgUpdateNamespaceRoles), + deps: [MsgUpdateNamespaceRoles] }); export const useUpdateNamespaceRoles = buildUseMutation({ builderMutationFn: createUpdateNamespaceRoles @@ -51,7 +56,8 @@ export const createRevokeNamespaceRoles = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgRevokeNamespaceRoles.typeUrl, encoders: toEncoders(MsgRevokeNamespaceRoles), - converters: toConverters(MsgRevokeNamespaceRoles) + converters: toConverters(MsgRevokeNamespaceRoles), + deps: [MsgRevokeNamespaceRoles] }); export const useRevokeNamespaceRoles = buildUseMutation({ builderMutationFn: createRevokeNamespaceRoles @@ -60,7 +66,8 @@ export const createClaimVoucher = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgClaimVoucher.typeUrl, encoders: toEncoders(MsgClaimVoucher), - converters: toConverters(MsgClaimVoucher) + converters: toConverters(MsgClaimVoucher), + deps: [MsgClaimVoucher] }); export const useClaimVoucher = buildUseMutation({ builderMutationFn: createClaimVoucher diff --git a/libs/injective-react/src/injective/permissions/v1beta1/tx.ts b/libs/injective-react/src/injective/permissions/v1beta1/tx.ts index e3dc4630..d2f26a5e 100644 --- a/libs/injective-react/src/injective/permissions/v1beta1/tx.ts +++ b/libs/injective-react/src/injective/permissions/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "../../../cosmos/bank/v1beta1/bank"; import { Namespace, NamespaceAmino, Role, RoleAmino, AddressRoles, AddressRolesAmino } from "./permissions"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface MsgUpdateParams { /** authority is the address of the governance account. */ authority: string; @@ -367,10 +366,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -425,9 +425,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgCreateNamespace(): MsgCreateNamespace { return { sender: "", @@ -514,10 +514,11 @@ export const MsgCreateNamespace = { typeUrl: "/injective.permissions.v1beta1.MsgCreateNamespace", value: MsgCreateNamespace.encode(message).finish() }; + }, + registerTypeUrl() { + Namespace.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateNamespace.typeUrl, MsgCreateNamespace); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateNamespace.aminoType, MsgCreateNamespace.typeUrl); function createBaseMsgCreateNamespaceResponse(): MsgCreateNamespaceResponse { return {}; } @@ -572,9 +573,9 @@ export const MsgCreateNamespaceResponse = { typeUrl: "/injective.permissions.v1beta1.MsgCreateNamespaceResponse", value: MsgCreateNamespaceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateNamespaceResponse.typeUrl, MsgCreateNamespaceResponse); function createBaseMsgDeleteNamespace(): MsgDeleteNamespace { return { sender: "", @@ -661,10 +662,9 @@ export const MsgDeleteNamespace = { typeUrl: "/injective.permissions.v1beta1.MsgDeleteNamespace", value: MsgDeleteNamespace.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeleteNamespace.typeUrl, MsgDeleteNamespace); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeleteNamespace.aminoType, MsgDeleteNamespace.typeUrl); function createBaseMsgDeleteNamespaceResponse(): MsgDeleteNamespaceResponse { return {}; } @@ -719,9 +719,9 @@ export const MsgDeleteNamespaceResponse = { typeUrl: "/injective.permissions.v1beta1.MsgDeleteNamespaceResponse", value: MsgDeleteNamespaceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeleteNamespaceResponse.typeUrl, MsgDeleteNamespaceResponse); function createBaseMsgUpdateNamespace(): MsgUpdateNamespace { return { sender: "", @@ -856,10 +856,14 @@ export const MsgUpdateNamespace = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespace", value: MsgUpdateNamespace.encode(message).finish() }; + }, + registerTypeUrl() { + MsgUpdateNamespace_MsgSetWasmHook.registerTypeUrl(); + MsgUpdateNamespace_MsgSetMintsPaused.registerTypeUrl(); + MsgUpdateNamespace_MsgSetSendsPaused.registerTypeUrl(); + MsgUpdateNamespace_MsgSetBurnsPaused.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateNamespace.typeUrl, MsgUpdateNamespace); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateNamespace.aminoType, MsgUpdateNamespace.typeUrl); function createBaseMsgUpdateNamespace_MsgSetWasmHook(): MsgUpdateNamespace_MsgSetWasmHook { return { newValue: "" @@ -927,9 +931,9 @@ export const MsgUpdateNamespace_MsgSetWasmHook = { typeUrl: "/injective.permissions.v1beta1.MsgSetWasmHook", value: MsgUpdateNamespace_MsgSetWasmHook.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetWasmHook.typeUrl, MsgUpdateNamespace_MsgSetWasmHook); function createBaseMsgUpdateNamespace_MsgSetMintsPaused(): MsgUpdateNamespace_MsgSetMintsPaused { return { newValue: false @@ -997,9 +1001,9 @@ export const MsgUpdateNamespace_MsgSetMintsPaused = { typeUrl: "/injective.permissions.v1beta1.MsgSetMintsPaused", value: MsgUpdateNamespace_MsgSetMintsPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetMintsPaused.typeUrl, MsgUpdateNamespace_MsgSetMintsPaused); function createBaseMsgUpdateNamespace_MsgSetSendsPaused(): MsgUpdateNamespace_MsgSetSendsPaused { return { newValue: false @@ -1067,9 +1071,9 @@ export const MsgUpdateNamespace_MsgSetSendsPaused = { typeUrl: "/injective.permissions.v1beta1.MsgSetSendsPaused", value: MsgUpdateNamespace_MsgSetSendsPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetSendsPaused.typeUrl, MsgUpdateNamespace_MsgSetSendsPaused); function createBaseMsgUpdateNamespace_MsgSetBurnsPaused(): MsgUpdateNamespace_MsgSetBurnsPaused { return { newValue: false @@ -1137,9 +1141,9 @@ export const MsgUpdateNamespace_MsgSetBurnsPaused = { typeUrl: "/injective.permissions.v1beta1.MsgSetBurnsPaused", value: MsgUpdateNamespace_MsgSetBurnsPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetBurnsPaused.typeUrl, MsgUpdateNamespace_MsgSetBurnsPaused); function createBaseMsgUpdateNamespaceResponse(): MsgUpdateNamespaceResponse { return {}; } @@ -1194,9 +1198,9 @@ export const MsgUpdateNamespaceResponse = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespaceResponse", value: MsgUpdateNamespaceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespaceResponse.typeUrl, MsgUpdateNamespaceResponse); function createBaseMsgUpdateNamespaceRoles(): MsgUpdateNamespaceRoles { return { sender: "", @@ -1311,10 +1315,12 @@ export const MsgUpdateNamespaceRoles = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespaceRoles", value: MsgUpdateNamespaceRoles.encode(message).finish() }; + }, + registerTypeUrl() { + Role.registerTypeUrl(); + AddressRoles.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateNamespaceRoles.typeUrl, MsgUpdateNamespaceRoles); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateNamespaceRoles.aminoType, MsgUpdateNamespaceRoles.typeUrl); function createBaseMsgUpdateNamespaceRolesResponse(): MsgUpdateNamespaceRolesResponse { return {}; } @@ -1369,9 +1375,9 @@ export const MsgUpdateNamespaceRolesResponse = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespaceRolesResponse", value: MsgUpdateNamespaceRolesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespaceRolesResponse.typeUrl, MsgUpdateNamespaceRolesResponse); function createBaseMsgRevokeNamespaceRoles(): MsgRevokeNamespaceRoles { return { sender: "", @@ -1472,10 +1478,11 @@ export const MsgRevokeNamespaceRoles = { typeUrl: "/injective.permissions.v1beta1.MsgRevokeNamespaceRoles", value: MsgRevokeNamespaceRoles.encode(message).finish() }; + }, + registerTypeUrl() { + AddressRoles.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRevokeNamespaceRoles.typeUrl, MsgRevokeNamespaceRoles); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeNamespaceRoles.aminoType, MsgRevokeNamespaceRoles.typeUrl); function createBaseMsgRevokeNamespaceRolesResponse(): MsgRevokeNamespaceRolesResponse { return {}; } @@ -1530,9 +1537,9 @@ export const MsgRevokeNamespaceRolesResponse = { typeUrl: "/injective.permissions.v1beta1.MsgRevokeNamespaceRolesResponse", value: MsgRevokeNamespaceRolesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeNamespaceRolesResponse.typeUrl, MsgRevokeNamespaceRolesResponse); function createBaseMsgClaimVoucher(): MsgClaimVoucher { return { sender: "", @@ -1619,10 +1626,9 @@ export const MsgClaimVoucher = { typeUrl: "/injective.permissions.v1beta1.MsgClaimVoucher", value: MsgClaimVoucher.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClaimVoucher.typeUrl, MsgClaimVoucher); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClaimVoucher.aminoType, MsgClaimVoucher.typeUrl); function createBaseMsgClaimVoucherResponse(): MsgClaimVoucherResponse { return {}; } @@ -1677,6 +1683,6 @@ export const MsgClaimVoucherResponse = { typeUrl: "/injective.permissions.v1beta1.MsgClaimVoucherResponse", value: MsgClaimVoucherResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgClaimVoucherResponse.typeUrl, MsgClaimVoucherResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/stream/v1beta1/query.ts b/libs/injective-react/src/injective/stream/v1beta1/query.ts index 9bdabccf..c5f63535 100644 --- a/libs/injective-react/src/injective/stream/v1beta1/query.ts +++ b/libs/injective-react/src/injective/stream/v1beta1/query.ts @@ -2,7 +2,6 @@ import { Level, LevelAmino, Deposit, DepositAmino, SpotLimitOrder, SpotLimitOrde import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum OrderUpdateStatus { Unspecified = 0, Booked = 1, @@ -663,9 +662,17 @@ export const StreamRequest = { typeUrl: "/injective.stream.v1beta1.StreamRequest", value: StreamRequest.encode(message).finish() }; + }, + registerTypeUrl() { + BankBalancesFilter.registerTypeUrl(); + SubaccountDepositsFilter.registerTypeUrl(); + TradesFilter.registerTypeUrl(); + OrdersFilter.registerTypeUrl(); + OrderbookFilter.registerTypeUrl(); + PositionsFilter.registerTypeUrl(); + OraclePriceFilter.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StreamRequest.typeUrl, StreamRequest); function createBaseStreamResponse(): StreamResponse { return { blockHeight: BigInt(0), @@ -885,9 +892,19 @@ export const StreamResponse = { typeUrl: "/injective.stream.v1beta1.StreamResponse", value: StreamResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BankBalance.registerTypeUrl(); + SubaccountDeposits.registerTypeUrl(); + SpotTrade.registerTypeUrl(); + DerivativeTrade.registerTypeUrl(); + SpotOrderUpdate.registerTypeUrl(); + DerivativeOrderUpdate.registerTypeUrl(); + OrderbookUpdate.registerTypeUrl(); + Position.registerTypeUrl(); + OraclePrice.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StreamResponse.typeUrl, StreamResponse); function createBaseOrderbookUpdate(): OrderbookUpdate { return { seq: BigInt(0), @@ -967,9 +984,11 @@ export const OrderbookUpdate = { typeUrl: "/injective.stream.v1beta1.OrderbookUpdate", value: OrderbookUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + Orderbook.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OrderbookUpdate.typeUrl, OrderbookUpdate); function createBaseOrderbook(): Orderbook { return { marketId: "", @@ -1065,9 +1084,11 @@ export const Orderbook = { typeUrl: "/injective.stream.v1beta1.Orderbook", value: Orderbook.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Orderbook.typeUrl, Orderbook); function createBaseBankBalance(): BankBalance { return { account: "", @@ -1149,9 +1170,11 @@ export const BankBalance = { typeUrl: "/injective.stream.v1beta1.BankBalance", value: BankBalance.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BankBalance.typeUrl, BankBalance); function createBaseSubaccountDeposits(): SubaccountDeposits { return { subaccountId: "", @@ -1233,9 +1256,11 @@ export const SubaccountDeposits = { typeUrl: "/injective.stream.v1beta1.SubaccountDeposits", value: SubaccountDeposits.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountDeposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountDeposits.typeUrl, SubaccountDeposits); function createBaseSubaccountDeposit(): SubaccountDeposit { return { denom: "", @@ -1315,9 +1340,11 @@ export const SubaccountDeposit = { typeUrl: "/injective.stream.v1beta1.SubaccountDeposit", value: SubaccountDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountDeposit.typeUrl, SubaccountDeposit); function createBaseSpotOrderUpdate(): SpotOrderUpdate { return { status: 0, @@ -1421,9 +1448,11 @@ export const SpotOrderUpdate = { typeUrl: "/injective.stream.v1beta1.SpotOrderUpdate", value: SpotOrderUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrderUpdate.typeUrl, SpotOrderUpdate); function createBaseSpotOrder(): SpotOrder { return { marketId: "", @@ -1503,9 +1532,11 @@ export const SpotOrder = { typeUrl: "/injective.stream.v1beta1.SpotOrder", value: SpotOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrder.typeUrl, SpotOrder); function createBaseDerivativeOrderUpdate(): DerivativeOrderUpdate { return { status: 0, @@ -1609,9 +1640,11 @@ export const DerivativeOrderUpdate = { typeUrl: "/injective.stream.v1beta1.DerivativeOrderUpdate", value: DerivativeOrderUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrderUpdate.typeUrl, DerivativeOrderUpdate); function createBaseDerivativeOrder(): DerivativeOrder { return { marketId: "", @@ -1703,9 +1736,11 @@ export const DerivativeOrder = { typeUrl: "/injective.stream.v1beta1.DerivativeOrder", value: DerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrder.typeUrl, DerivativeOrder); function createBasePosition(): Position { return { marketId: "", @@ -1845,9 +1880,9 @@ export const Position = { typeUrl: "/injective.stream.v1beta1.Position", value: Position.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Position.typeUrl, Position); function createBaseOraclePrice(): OraclePrice { return { symbol: "", @@ -1939,9 +1974,9 @@ export const OraclePrice = { typeUrl: "/injective.stream.v1beta1.OraclePrice", value: OraclePrice.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OraclePrice.typeUrl, OraclePrice); function createBaseSpotTrade(): SpotTrade { return { marketId: "", @@ -2129,9 +2164,9 @@ export const SpotTrade = { typeUrl: "/injective.stream.v1beta1.SpotTrade", value: SpotTrade.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SpotTrade.typeUrl, SpotTrade); function createBaseDerivativeTrade(): DerivativeTrade { return { marketId: "", @@ -2319,9 +2354,11 @@ export const DerivativeTrade = { typeUrl: "/injective.stream.v1beta1.DerivativeTrade", value: DerivativeTrade.encode(message).finish() }; + }, + registerTypeUrl() { + PositionDelta.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeTrade.typeUrl, DerivativeTrade); function createBaseTradesFilter(): TradesFilter { return { subaccountIds: [], @@ -2405,9 +2442,9 @@ export const TradesFilter = { typeUrl: "/injective.stream.v1beta1.TradesFilter", value: TradesFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradesFilter.typeUrl, TradesFilter); function createBasePositionsFilter(): PositionsFilter { return { subaccountIds: [], @@ -2491,9 +2528,9 @@ export const PositionsFilter = { typeUrl: "/injective.stream.v1beta1.PositionsFilter", value: PositionsFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PositionsFilter.typeUrl, PositionsFilter); function createBaseOrdersFilter(): OrdersFilter { return { subaccountIds: [], @@ -2577,9 +2614,9 @@ export const OrdersFilter = { typeUrl: "/injective.stream.v1beta1.OrdersFilter", value: OrdersFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrdersFilter.typeUrl, OrdersFilter); function createBaseOrderbookFilter(): OrderbookFilter { return { marketIds: [] @@ -2649,9 +2686,9 @@ export const OrderbookFilter = { typeUrl: "/injective.stream.v1beta1.OrderbookFilter", value: OrderbookFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderbookFilter.typeUrl, OrderbookFilter); function createBaseBankBalancesFilter(): BankBalancesFilter { return { accounts: [] @@ -2721,9 +2758,9 @@ export const BankBalancesFilter = { typeUrl: "/injective.stream.v1beta1.BankBalancesFilter", value: BankBalancesFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BankBalancesFilter.typeUrl, BankBalancesFilter); function createBaseSubaccountDepositsFilter(): SubaccountDepositsFilter { return { subaccountIds: [] @@ -2793,9 +2830,9 @@ export const SubaccountDepositsFilter = { typeUrl: "/injective.stream.v1beta1.SubaccountDepositsFilter", value: SubaccountDepositsFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountDepositsFilter.typeUrl, SubaccountDepositsFilter); function createBaseOraclePriceFilter(): OraclePriceFilter { return { symbol: [] @@ -2865,6 +2902,6 @@ export const OraclePriceFilter = { typeUrl: "/injective.stream.v1beta1.OraclePriceFilter", value: OraclePriceFilter.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(OraclePriceFilter.typeUrl, OraclePriceFilter); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/authorityMetadata.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/authorityMetadata.ts index 4497aa5e..3eb2cc32 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/authorityMetadata.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/authorityMetadata.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * DenomAuthorityMetadata specifies metadata for addresses that have specific * capabilities over a token factory denom. Right now there is only one Admin @@ -94,6 +93,6 @@ export const DenomAuthorityMetadata = { typeUrl: "/injective.tokenfactory.v1beta1.DenomAuthorityMetadata", value: DenomAuthorityMetadata.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(DenomAuthorityMetadata.typeUrl, DenomAuthorityMetadata); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/events.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/events.ts index 38852b9d..6e562ec8 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/events.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/events.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Metadata, MetadataAmino } from "../../../cosmos/bank/v1beta1/bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventCreateTFDenom { account: string; denom: string; @@ -162,9 +161,9 @@ export const EventCreateTFDenom = { typeUrl: "/injective.tokenfactory.v1beta1.EventCreateTFDenom", value: EventCreateTFDenom.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventCreateTFDenom.typeUrl, EventCreateTFDenom); function createBaseEventMintTFDenom(): EventMintTFDenom { return { recipientAddress: "", @@ -244,9 +243,11 @@ export const EventMintTFDenom = { typeUrl: "/injective.tokenfactory.v1beta1.EventMintTFDenom", value: EventMintTFDenom.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventMintTFDenom.typeUrl, EventMintTFDenom); function createBaseEventBurnDenom(): EventBurnDenom { return { burnerAddress: "", @@ -326,9 +327,11 @@ export const EventBurnDenom = { typeUrl: "/injective.tokenfactory.v1beta1.EventBurnDenom", value: EventBurnDenom.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBurnDenom.typeUrl, EventBurnDenom); function createBaseEventChangeTFAdmin(): EventChangeTFAdmin { return { denom: "", @@ -408,9 +411,9 @@ export const EventChangeTFAdmin = { typeUrl: "/injective.tokenfactory.v1beta1.EventChangeTFAdmin", value: EventChangeTFAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventChangeTFAdmin.typeUrl, EventChangeTFAdmin); function createBaseEventSetTFDenomMetadata(): EventSetTFDenomMetadata { return { denom: "", @@ -490,6 +493,8 @@ export const EventSetTFDenomMetadata = { typeUrl: "/injective.tokenfactory.v1beta1.EventSetTFDenomMetadata", value: EventSetTFDenomMetadata.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventSetTFDenomMetadata.typeUrl, EventSetTFDenomMetadata); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/genesis.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/genesis.ts index 13aeef22..1a851b73 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/genesis.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/genesis.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "./params"; import { DenomAuthorityMetadata, DenomAuthorityMetadataAmino } from "./authorityMetadata"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the tokenfactory module's genesis state. */ export interface GenesisState { /** params defines the parameters of the module. */ @@ -136,9 +135,12 @@ export const GenesisState = { typeUrl: "/injective.tokenfactory.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + GenesisDenom.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseGenesisDenom(): GenesisDenom { return { denom: "", @@ -254,6 +256,8 @@ export const GenesisDenom = { typeUrl: "/injective.tokenfactory.v1beta1.GenesisDenom", value: GenesisDenom.encode(message).finish() }; + }, + registerTypeUrl() { + DenomAuthorityMetadata.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisDenom.typeUrl, GenesisDenom); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/params.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/params.ts index bb4a1ef3..2093d2ef 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/params.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/params.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Params defines the parameters for the tokenfactory module. */ export interface Params { denomCreationFee: Coin[]; @@ -94,7 +93,8 @@ export const Params = { typeUrl: "/injective.tokenfactory.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/query.rpc.func.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/query.rpc.func.ts index ee166ccb..3edeb77c 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -17,7 +18,8 @@ export const createGetDenomAuthorityMetadata = (clientResolver?: RpcResolver) => decode: QueryDenomAuthorityMetadataResponse.decode, service: "injective.tokenfactory.v1beta1.Query", method: "DenomAuthorityMetadata", - clientResolver + clientResolver, + deps: [QueryDenomAuthorityMetadataRequest, QueryDenomAuthorityMetadataResponse] }); export const useGetDenomAuthorityMetadata = buildUseQuery({ builderQueryFn: createGetDenomAuthorityMetadata, @@ -28,7 +30,8 @@ export const createGetDenomsFromCreator = (clientResolver?: RpcResolver) => buil decode: QueryDenomsFromCreatorResponse.decode, service: "injective.tokenfactory.v1beta1.Query", method: "DenomsFromCreator", - clientResolver + clientResolver, + deps: [QueryDenomsFromCreatorRequest, QueryDenomsFromCreatorResponse] }); export const useGetDenomsFromCreator = buildUseQuery({ builderQueryFn: createGetDenomsFromCreator, @@ -39,7 +42,8 @@ export const createGetTokenfactoryModuleState = (clientResolver?: RpcResolver) = decode: QueryModuleStateResponse.decode, service: "injective.tokenfactory.v1beta1.Query", method: "TokenfactoryModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetTokenfactoryModuleState = buildUseQuery({ builderQueryFn: createGetTokenfactoryModuleState, diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/query.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/query.ts index 3a0d5408..3788f31c 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/query.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/query.ts @@ -3,7 +3,6 @@ import { DenomAuthorityMetadata, DenomAuthorityMetadataAmino } from "./authority import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { @@ -218,9 +217,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -288,9 +287,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryDenomAuthorityMetadataRequest(): QueryDenomAuthorityMetadataRequest { return { creator: "", @@ -370,9 +371,9 @@ export const QueryDenomAuthorityMetadataRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest", value: QueryDenomAuthorityMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomAuthorityMetadataRequest.typeUrl, QueryDenomAuthorityMetadataRequest); function createBaseQueryDenomAuthorityMetadataResponse(): QueryDenomAuthorityMetadataResponse { return { authorityMetadata: DenomAuthorityMetadata.fromPartial({}) @@ -440,9 +441,11 @@ export const QueryDenomAuthorityMetadataResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse", value: QueryDenomAuthorityMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomAuthorityMetadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomAuthorityMetadataResponse.typeUrl, QueryDenomAuthorityMetadataResponse); function createBaseQueryDenomsFromCreatorRequest(): QueryDenomsFromCreatorRequest { return { creator: "" @@ -510,9 +513,9 @@ export const QueryDenomsFromCreatorRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest", value: QueryDenomsFromCreatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomsFromCreatorRequest.typeUrl, QueryDenomsFromCreatorRequest); function createBaseQueryDenomsFromCreatorResponse(): QueryDenomsFromCreatorResponse { return { denoms: [] @@ -582,9 +585,9 @@ export const QueryDenomsFromCreatorResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse", value: QueryDenomsFromCreatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomsFromCreatorResponse.typeUrl, QueryDenomsFromCreatorResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -639,9 +642,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -709,6 +712,8 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts index c2807829..3a20b01c 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateDenom, MsgMint, MsgBurn, MsgChangeAdmin, MsgSetDenomMetadata, MsgUpdateParams } from "./tx"; export const createCreateDenom = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateDenom.typeUrl, encoders: toEncoders(MsgCreateDenom), - converters: toConverters(MsgCreateDenom) + converters: toConverters(MsgCreateDenom), + deps: [MsgCreateDenom] }); export const useCreateDenom = buildUseMutation({ builderMutationFn: createCreateDenom @@ -15,7 +16,8 @@ export const createMint = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createMint @@ -24,7 +26,8 @@ export const createBurn = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createBurn @@ -33,7 +36,8 @@ export const createChangeAdmin = (clientResolver?: SigningClientResolver) => bui clientResolver, typeUrl: MsgChangeAdmin.typeUrl, encoders: toEncoders(MsgChangeAdmin), - converters: toConverters(MsgChangeAdmin) + converters: toConverters(MsgChangeAdmin), + deps: [MsgChangeAdmin] }); export const useChangeAdmin = buildUseMutation({ builderMutationFn: createChangeAdmin @@ -42,7 +46,8 @@ export const createSetDenomMetadata = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgSetDenomMetadata.typeUrl, encoders: toEncoders(MsgSetDenomMetadata), - converters: toConverters(MsgSetDenomMetadata) + converters: toConverters(MsgSetDenomMetadata), + deps: [MsgSetDenomMetadata] }); export const useSetDenomMetadata = buildUseMutation({ builderMutationFn: createSetDenomMetadata @@ -51,7 +56,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.ts b/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.ts index 707eeec0..147e66c8 100644 --- a/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.ts +++ b/libs/injective-react/src/injective/tokenfactory/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Metadata, MetadataAmino, Params, ParamsAmino } from "../../../cosmos/bank/v1beta1/bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateDenom defines the message structure for the CreateDenom gRPC service * method. It allows an account to create a new denom. It requires a sender @@ -385,10 +384,9 @@ export const MsgCreateDenom = { typeUrl: "/injective.tokenfactory.v1beta1.MsgCreateDenom", value: MsgCreateDenom.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateDenom.typeUrl, MsgCreateDenom); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateDenom.aminoType, MsgCreateDenom.typeUrl); function createBaseMsgCreateDenomResponse(): MsgCreateDenomResponse { return { newTokenDenom: "" @@ -456,9 +454,9 @@ export const MsgCreateDenomResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgCreateDenomResponse", value: MsgCreateDenomResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateDenomResponse.typeUrl, MsgCreateDenomResponse); function createBaseMsgMint(): MsgMint { return { sender: "", @@ -545,10 +543,11 @@ export const MsgMint = { typeUrl: "/injective.tokenfactory.v1beta1.MsgMint", value: MsgMint.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgMint.typeUrl, MsgMint); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMint.aminoType, MsgMint.typeUrl); function createBaseMsgMintResponse(): MsgMintResponse { return {}; } @@ -603,9 +602,9 @@ export const MsgMintResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgMintResponse", value: MsgMintResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMintResponse.typeUrl, MsgMintResponse); function createBaseMsgBurn(): MsgBurn { return { sender: "", @@ -692,10 +691,11 @@ export const MsgBurn = { typeUrl: "/injective.tokenfactory.v1beta1.MsgBurn", value: MsgBurn.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBurn.typeUrl, MsgBurn); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBurn.aminoType, MsgBurn.typeUrl); function createBaseMsgBurnResponse(): MsgBurnResponse { return {}; } @@ -750,9 +750,9 @@ export const MsgBurnResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgBurnResponse", value: MsgBurnResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBurnResponse.typeUrl, MsgBurnResponse); function createBaseMsgChangeAdmin(): MsgChangeAdmin { return { sender: "", @@ -851,10 +851,9 @@ export const MsgChangeAdmin = { typeUrl: "/injective.tokenfactory.v1beta1.MsgChangeAdmin", value: MsgChangeAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChangeAdmin.typeUrl, MsgChangeAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChangeAdmin.aminoType, MsgChangeAdmin.typeUrl); function createBaseMsgChangeAdminResponse(): MsgChangeAdminResponse { return {}; } @@ -909,9 +908,9 @@ export const MsgChangeAdminResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgChangeAdminResponse", value: MsgChangeAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChangeAdminResponse.typeUrl, MsgChangeAdminResponse); function createBaseMsgSetDenomMetadata(): MsgSetDenomMetadata { return { sender: "", @@ -998,10 +997,11 @@ export const MsgSetDenomMetadata = { typeUrl: "/injective.tokenfactory.v1beta1.MsgSetDenomMetadata", value: MsgSetDenomMetadata.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSetDenomMetadata.typeUrl, MsgSetDenomMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetDenomMetadata.aminoType, MsgSetDenomMetadata.typeUrl); function createBaseMsgSetDenomMetadataResponse(): MsgSetDenomMetadataResponse { return {}; } @@ -1056,9 +1056,9 @@ export const MsgSetDenomMetadataResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgSetDenomMetadataResponse", value: MsgSetDenomMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetDenomMetadataResponse.typeUrl, MsgSetDenomMetadataResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1145,10 +1145,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.tokenfactory.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1203,6 +1204,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/types/v1beta1/account.ts b/libs/injective-react/src/injective/types/v1beta1/account.ts index 08000833..a16b528f 100644 --- a/libs/injective-react/src/injective/types/v1beta1/account.ts +++ b/libs/injective-react/src/injective/types/v1beta1/account.ts @@ -1,7 +1,7 @@ import { BaseAccount, BaseAccountAmino } from "../../../cosmos/auth/v1beta1/auth"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * EthAccount implements the authtypes.AccountI interface and embeds an * authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. @@ -105,6 +105,9 @@ export const EthAccount = { typeUrl: "/injective.types.v1beta1.EthAccount", value: EthAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/types/v1beta1/tx_ext.ts b/libs/injective-react/src/injective/types/v1beta1/tx_ext.ts index ac7f44f2..0a49d341 100644 --- a/libs/injective-react/src/injective/types/v1beta1/tx_ext.ts +++ b/libs/injective-react/src/injective/types/v1beta1/tx_ext.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface ExtensionOptionsWeb3Tx { /** * typedDataChainID used only in EIP712 Domain and should match @@ -134,6 +133,6 @@ export const ExtensionOptionsWeb3Tx = { typeUrl: "/injective.types.v1beta1.ExtensionOptionsWeb3Tx", value: ExtensionOptionsWeb3Tx.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ExtensionOptionsWeb3Tx.typeUrl, ExtensionOptionsWeb3Tx); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/types/v1beta1/tx_response.ts b/libs/injective-react/src/injective/types/v1beta1/tx_response.ts index 14002e46..e872639e 100644 --- a/libs/injective-react/src/injective/types/v1beta1/tx_response.ts +++ b/libs/injective-react/src/injective/types/v1beta1/tx_response.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * base header ak message type, we can cast the bytes into corresponding message * response type @@ -120,9 +119,9 @@ export const TxResponseGenericMessage = { typeUrl: "/injective.types.v1beta1.TxResponseGenericMessage", value: TxResponseGenericMessage.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxResponseGenericMessage.typeUrl, TxResponseGenericMessage); function createBaseTxResponseData(): TxResponseData { return { messages: [] @@ -192,6 +191,8 @@ export const TxResponseData = { typeUrl: "/injective.types.v1beta1.TxResponseData", value: TxResponseData.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponseGenericMessage.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(TxResponseData.typeUrl, TxResponseData); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/wasmx/v1/events.ts b/libs/injective-react/src/injective/wasmx/v1/events.ts index b579a219..c0f177b6 100644 --- a/libs/injective-react/src/injective/wasmx/v1/events.ts +++ b/libs/injective-react/src/injective/wasmx/v1/events.ts @@ -1,7 +1,6 @@ import { FundingMode } from "./proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventContractExecution { contractAddress: string; response: Uint8Array; @@ -167,9 +166,9 @@ export const EventContractExecution = { typeUrl: "/injective.wasmx.v1.EventContractExecution", value: EventContractExecution.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventContractExecution.typeUrl, EventContractExecution); function createBaseEventContractRegistered(): EventContractRegistered { return { contractAddress: "", @@ -321,9 +320,9 @@ export const EventContractRegistered = { typeUrl: "/injective.wasmx.v1.EventContractRegistered", value: EventContractRegistered.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventContractRegistered.typeUrl, EventContractRegistered); function createBaseEventContractDeregistered(): EventContractDeregistered { return { contractAddress: "" @@ -391,6 +390,6 @@ export const EventContractDeregistered = { typeUrl: "/injective.wasmx.v1.EventContractDeregistered", value: EventContractDeregistered.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EventContractDeregistered.typeUrl, EventContractDeregistered); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/wasmx/v1/genesis.ts b/libs/injective-react/src/injective/wasmx/v1/genesis.ts index ffe48f34..04f698c5 100644 --- a/libs/injective-react/src/injective/wasmx/v1/genesis.ts +++ b/libs/injective-react/src/injective/wasmx/v1/genesis.ts @@ -1,7 +1,6 @@ import { RegisteredContract, RegisteredContractAmino, Params, ParamsAmino } from "./wasmx"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface RegisteredContractWithAddress { address: string; registeredContract?: RegisteredContract; @@ -125,9 +124,11 @@ export const RegisteredContractWithAddress = { typeUrl: "/injective.wasmx.v1.RegisteredContractWithAddress", value: RegisteredContractWithAddress.encode(message).finish() }; + }, + registerTypeUrl() { + RegisteredContract.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RegisteredContractWithAddress.typeUrl, RegisteredContractWithAddress); function createBaseGenesisState(): GenesisState { return { params: Params.fromPartial({}), @@ -209,6 +210,9 @@ export const GenesisState = { typeUrl: "/injective.wasmx.v1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + RegisteredContractWithAddress.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/wasmx/v1/proposal.ts b/libs/injective-react/src/injective/wasmx/v1/proposal.ts index 7b8680f3..33f8d89d 100644 --- a/libs/injective-react/src/injective/wasmx/v1/proposal.ts +++ b/libs/injective-react/src/injective/wasmx/v1/proposal.ts @@ -1,7 +1,7 @@ import { StoreCodeProposal, StoreCodeProposalAmino } from "../../../cosmwasm/wasm/v1/proposal_legacy"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; export enum FundingMode { Unspecified = 0, SelfFunded = 1, @@ -285,10 +285,13 @@ export const ContractRegistrationRequestProposal = { typeUrl: "/injective.wasmx.v1.ContractRegistrationRequestProposal", value: ContractRegistrationRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ContractRegistrationRequestProposal.typeUrl, ContractRegistrationRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ContractRegistrationRequestProposal.aminoType, ContractRegistrationRequestProposal.typeUrl); + ContractRegistrationRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContractRegistrationRequestProposal.typeUrl, ContractRegistrationRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractRegistrationRequestProposal.aminoType, ContractRegistrationRequestProposal.typeUrl); function createBaseBatchContractRegistrationRequestProposal(): BatchContractRegistrationRequestProposal { return { title: "", @@ -389,10 +392,13 @@ export const BatchContractRegistrationRequestProposal = { typeUrl: "/injective.wasmx.v1.BatchContractRegistrationRequestProposal", value: BatchContractRegistrationRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchContractRegistrationRequestProposal.typeUrl, BatchContractRegistrationRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractRegistrationRequestProposal.aminoType, BatchContractRegistrationRequestProposal.typeUrl); + ContractRegistrationRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchContractRegistrationRequestProposal.typeUrl, BatchContractRegistrationRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractRegistrationRequestProposal.aminoType, BatchContractRegistrationRequestProposal.typeUrl); function createBaseBatchContractDeregistrationProposal(): BatchContractDeregistrationProposal { return { title: "", @@ -493,10 +499,12 @@ export const BatchContractDeregistrationProposal = { typeUrl: "/injective.wasmx.v1.BatchContractDeregistrationProposal", value: BatchContractDeregistrationProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchContractDeregistrationProposal.typeUrl, BatchContractDeregistrationProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractDeregistrationProposal.aminoType, BatchContractDeregistrationProposal.typeUrl); } }; -GlobalDecoderRegistry.register(BatchContractDeregistrationProposal.typeUrl, BatchContractDeregistrationProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractDeregistrationProposal.aminoType, BatchContractDeregistrationProposal.typeUrl); function createBaseContractRegistrationRequest(): ContractRegistrationRequest { return { contractAddress: "", @@ -660,9 +668,11 @@ export const ContractRegistrationRequest = { typeUrl: "/injective.wasmx.v1.ContractRegistrationRequest", value: ContractRegistrationRequest.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ContractRegistrationRequest.typeUrl, ContractRegistrationRequest); } }; -GlobalDecoderRegistry.register(ContractRegistrationRequest.typeUrl, ContractRegistrationRequest); function createBaseBatchStoreCodeProposal(): BatchStoreCodeProposal { return { title: "", @@ -763,7 +773,10 @@ export const BatchStoreCodeProposal = { typeUrl: "/injective.wasmx.v1.BatchStoreCodeProposal", value: BatchStoreCodeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchStoreCodeProposal.typeUrl, BatchStoreCodeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchStoreCodeProposal.aminoType, BatchStoreCodeProposal.typeUrl); + StoreCodeProposal.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(BatchStoreCodeProposal.typeUrl, BatchStoreCodeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchStoreCodeProposal.aminoType, BatchStoreCodeProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/wasmx/v1/query.rpc.func.ts b/libs/injective-react/src/injective/wasmx/v1/query.rpc.func.ts index 4063059e..0a24db06 100644 --- a/libs/injective-react/src/injective/wasmx/v1/query.rpc.func.ts +++ b/libs/injective-react/src/injective/wasmx/v1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetWasmxParams = (clientResolver?: RpcResolver) => buildQuery decode: QueryWasmxParamsResponse.decode, service: "injective.wasmx.v1.Query", method: "WasmxParams", - clientResolver + clientResolver, + deps: [QueryWasmxParamsRequest, QueryWasmxParamsResponse] }); export const useGetWasmxParams = buildUseQuery({ builderQueryFn: createGetWasmxParams, @@ -17,7 +18,8 @@ export const createGetContractRegistrationInfo = (clientResolver?: RpcResolver) decode: QueryContractRegistrationInfoResponse.decode, service: "injective.wasmx.v1.Query", method: "ContractRegistrationInfo", - clientResolver + clientResolver, + deps: [QueryContractRegistrationInfoRequest, QueryContractRegistrationInfoResponse] }); export const useGetContractRegistrationInfo = buildUseQuery({ builderQueryFn: createGetContractRegistrationInfo, @@ -28,7 +30,8 @@ export const createGetWasmxModuleState = (clientResolver?: RpcResolver) => build decode: QueryModuleStateResponse.decode, service: "injective.wasmx.v1.Query", method: "WasmxModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const useGetWasmxModuleState = buildUseQuery({ builderQueryFn: createGetWasmxModuleState, diff --git a/libs/injective-react/src/injective/wasmx/v1/query.ts b/libs/injective-react/src/injective/wasmx/v1/query.ts index 002a060c..8fd5bf17 100644 --- a/libs/injective-react/src/injective/wasmx/v1/query.ts +++ b/libs/injective-react/src/injective/wasmx/v1/query.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino, RegisteredContract, RegisteredContractAmino } from import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * QueryWasmxParamsRequest is the request type for the Query/WasmxParams RPC * method. @@ -167,9 +166,9 @@ export const QueryWasmxParamsRequest = { typeUrl: "/injective.wasmx.v1.QueryWasmxParamsRequest", value: QueryWasmxParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmxParamsRequest.typeUrl, QueryWasmxParamsRequest); function createBaseQueryWasmxParamsResponse(): QueryWasmxParamsResponse { return { params: Params.fromPartial({}) @@ -237,9 +236,11 @@ export const QueryWasmxParamsResponse = { typeUrl: "/injective.wasmx.v1.QueryWasmxParamsResponse", value: QueryWasmxParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryWasmxParamsResponse.typeUrl, QueryWasmxParamsResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -294,9 +295,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.wasmx.v1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -364,9 +365,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.wasmx.v1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryContractRegistrationInfoRequest(): QueryContractRegistrationInfoRequest { return { contractAddress: "" @@ -434,9 +437,9 @@ export const QueryContractRegistrationInfoRequest = { typeUrl: "/injective.wasmx.v1.QueryContractRegistrationInfoRequest", value: QueryContractRegistrationInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryContractRegistrationInfoRequest.typeUrl, QueryContractRegistrationInfoRequest); function createBaseQueryContractRegistrationInfoResponse(): QueryContractRegistrationInfoResponse { return { contract: undefined @@ -504,6 +507,8 @@ export const QueryContractRegistrationInfoResponse = { typeUrl: "/injective.wasmx.v1.QueryContractRegistrationInfoResponse", value: QueryContractRegistrationInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RegisteredContract.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryContractRegistrationInfoResponse.typeUrl, QueryContractRegistrationInfoResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/wasmx/v1/tx.rpc.func.ts b/libs/injective-react/src/injective/wasmx/v1/tx.rpc.func.ts index 2769640d..d6f5c2ee 100644 --- a/libs/injective-react/src/injective/wasmx/v1/tx.rpc.func.ts +++ b/libs/injective-react/src/injective/wasmx/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgUpdateContract, MsgActivateContract, MsgDeactivateContract, MsgExecuteContractCompat, MsgUpdateParams, MsgRegisterContract } from "./tx"; export const createUpdateRegistryContractParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateContract.typeUrl, encoders: toEncoders(MsgUpdateContract), - converters: toConverters(MsgUpdateContract) + converters: toConverters(MsgUpdateContract), + deps: [MsgUpdateContract] }); export const useUpdateRegistryContractParams = buildUseMutation({ builderMutationFn: createUpdateRegistryContractParams @@ -15,7 +16,8 @@ export const createActivateRegistryContract = (clientResolver?: SigningClientRes clientResolver, typeUrl: MsgActivateContract.typeUrl, encoders: toEncoders(MsgActivateContract), - converters: toConverters(MsgActivateContract) + converters: toConverters(MsgActivateContract), + deps: [MsgActivateContract] }); export const useActivateRegistryContract = buildUseMutation({ builderMutationFn: createActivateRegistryContract @@ -24,7 +26,8 @@ export const createDeactivateRegistryContract = (clientResolver?: SigningClientR clientResolver, typeUrl: MsgDeactivateContract.typeUrl, encoders: toEncoders(MsgDeactivateContract), - converters: toConverters(MsgDeactivateContract) + converters: toConverters(MsgDeactivateContract), + deps: [MsgDeactivateContract] }); export const useDeactivateRegistryContract = buildUseMutation({ builderMutationFn: createDeactivateRegistryContract @@ -33,7 +36,8 @@ export const createExecuteContractCompat = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgExecuteContractCompat.typeUrl, encoders: toEncoders(MsgExecuteContractCompat), - converters: toConverters(MsgExecuteContractCompat) + converters: toConverters(MsgExecuteContractCompat), + deps: [MsgExecuteContractCompat] }); export const useExecuteContractCompat = buildUseMutation({ builderMutationFn: createExecuteContractCompat @@ -42,7 +46,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -51,7 +56,8 @@ export const createRegisterContract = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgRegisterContract.typeUrl, encoders: toEncoders(MsgRegisterContract), - converters: toConverters(MsgRegisterContract) + converters: toConverters(MsgRegisterContract), + deps: [MsgRegisterContract] }); export const useRegisterContract = buildUseMutation({ builderMutationFn: createRegisterContract diff --git a/libs/injective-react/src/injective/wasmx/v1/tx.ts b/libs/injective-react/src/injective/wasmx/v1/tx.ts index a8b9a574..0ae1f9d1 100644 --- a/libs/injective-react/src/injective/wasmx/v1/tx.ts +++ b/libs/injective-react/src/injective/wasmx/v1/tx.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "./wasmx"; import { ContractRegistrationRequest, ContractRegistrationRequestAmino } from "./proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgExecuteContractCompat submits the given message data to a smart contract, * compatible with EIP712 @@ -327,10 +326,9 @@ export const MsgExecuteContractCompat = { typeUrl: "/injective.wasmx.v1.MsgExecuteContractCompat", value: MsgExecuteContractCompat.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractCompat.typeUrl, MsgExecuteContractCompat); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContractCompat.aminoType, MsgExecuteContractCompat.typeUrl); function createBaseMsgExecuteContractCompatResponse(): MsgExecuteContractCompatResponse { return { data: new Uint8Array() @@ -398,9 +396,9 @@ export const MsgExecuteContractCompatResponse = { typeUrl: "/injective.wasmx.v1.MsgExecuteContractCompatResponse", value: MsgExecuteContractCompatResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractCompatResponse.typeUrl, MsgExecuteContractCompatResponse); function createBaseMsgUpdateContract(): MsgUpdateContract { return { sender: "", @@ -523,10 +521,9 @@ export const MsgUpdateContract = { typeUrl: "/injective.wasmx.v1.MsgUpdateContract", value: MsgUpdateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContract.typeUrl, MsgUpdateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContract.aminoType, MsgUpdateContract.typeUrl); function createBaseMsgUpdateContractResponse(): MsgUpdateContractResponse { return {}; } @@ -581,9 +578,9 @@ export const MsgUpdateContractResponse = { typeUrl: "/injective.wasmx.v1.MsgUpdateContractResponse", value: MsgUpdateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContractResponse.typeUrl, MsgUpdateContractResponse); function createBaseMsgActivateContract(): MsgActivateContract { return { sender: "", @@ -670,10 +667,9 @@ export const MsgActivateContract = { typeUrl: "/injective.wasmx.v1.MsgActivateContract", value: MsgActivateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgActivateContract.typeUrl, MsgActivateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgActivateContract.aminoType, MsgActivateContract.typeUrl); function createBaseMsgActivateContractResponse(): MsgActivateContractResponse { return {}; } @@ -728,9 +724,9 @@ export const MsgActivateContractResponse = { typeUrl: "/injective.wasmx.v1.MsgActivateContractResponse", value: MsgActivateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgActivateContractResponse.typeUrl, MsgActivateContractResponse); function createBaseMsgDeactivateContract(): MsgDeactivateContract { return { sender: "", @@ -817,10 +813,9 @@ export const MsgDeactivateContract = { typeUrl: "/injective.wasmx.v1.MsgDeactivateContract", value: MsgDeactivateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeactivateContract.typeUrl, MsgDeactivateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeactivateContract.aminoType, MsgDeactivateContract.typeUrl); function createBaseMsgDeactivateContractResponse(): MsgDeactivateContractResponse { return {}; } @@ -875,9 +870,9 @@ export const MsgDeactivateContractResponse = { typeUrl: "/injective.wasmx.v1.MsgDeactivateContractResponse", value: MsgDeactivateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeactivateContractResponse.typeUrl, MsgDeactivateContractResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -964,10 +959,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.wasmx.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1022,9 +1018,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.wasmx.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgRegisterContract(): MsgRegisterContract { return { sender: "", @@ -1111,10 +1107,11 @@ export const MsgRegisterContract = { typeUrl: "/injective.wasmx.v1.MsgRegisterContract", value: MsgRegisterContract.encode(message).finish() }; + }, + registerTypeUrl() { + ContractRegistrationRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRegisterContract.typeUrl, MsgRegisterContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRegisterContract.aminoType, MsgRegisterContract.typeUrl); function createBaseMsgRegisterContractResponse(): MsgRegisterContractResponse { return {}; } @@ -1169,6 +1166,6 @@ export const MsgRegisterContractResponse = { typeUrl: "/injective.wasmx.v1.MsgRegisterContractResponse", value: MsgRegisterContractResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRegisterContractResponse.typeUrl, MsgRegisterContractResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/injective/wasmx/v1/wasmx.ts b/libs/injective-react/src/injective/wasmx/v1/wasmx.ts index 3cb66691..02d6bef7 100644 --- a/libs/injective-react/src/injective/wasmx/v1/wasmx.ts +++ b/libs/injective-react/src/injective/wasmx/v1/wasmx.ts @@ -2,7 +2,6 @@ import { AccessConfig, AccessConfigAmino } from "../../../cosmwasm/wasm/v1/types import { FundingMode } from "./proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { /** * Set the status to active to indicate that contracts can be executed in @@ -231,10 +230,11 @@ export const Params = { typeUrl: "/injective.wasmx.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseRegisteredContract(): RegisteredContract { return { gasLimit: BigInt(0), @@ -374,6 +374,6 @@ export const RegisteredContract = { typeUrl: "/injective.wasmx.v1.RegisteredContract", value: RegisteredContract.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(RegisteredContract.typeUrl, RegisteredContract); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/react-query.ts b/libs/injective-react/src/react-query.ts index 3c9ccabd..8b7f8844 100644 --- a/libs/injective-react/src/react-query.ts +++ b/libs/injective-react/src/react-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/registry.ts b/libs/injective-react/src/registry.ts index dee026ae..e7f6497f 100644 --- a/libs/injective-react/src/registry.ts +++ b/libs/injective-react/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/tendermint/abci/types.ts b/libs/injective-react/src/tendermint/abci/types.ts index 4759afd1..812f015a 100644 --- a/libs/injective-react/src/tendermint/abci/types.ts +++ b/libs/injective-react/src/tendermint/abci/types.ts @@ -5,7 +5,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BlockIDFlag } from "../types/validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export enum CheckTxType { NEW = 0, RECHECK = 1, @@ -1617,9 +1616,26 @@ export const Request = { typeUrl: "/tendermint.abci.Request", value: Request.encode(message).finish() }; + }, + registerTypeUrl() { + RequestEcho.registerTypeUrl(); + RequestFlush.registerTypeUrl(); + RequestInfo.registerTypeUrl(); + RequestInitChain.registerTypeUrl(); + RequestQuery.registerTypeUrl(); + RequestCheckTx.registerTypeUrl(); + RequestCommit.registerTypeUrl(); + RequestListSnapshots.registerTypeUrl(); + RequestOfferSnapshot.registerTypeUrl(); + RequestLoadSnapshotChunk.registerTypeUrl(); + RequestApplySnapshotChunk.registerTypeUrl(); + RequestPrepareProposal.registerTypeUrl(); + RequestProcessProposal.registerTypeUrl(); + RequestExtendVote.registerTypeUrl(); + RequestVerifyVoteExtension.registerTypeUrl(); + RequestFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Request.typeUrl, Request); function createBaseRequestEcho(): RequestEcho { return { message: "" @@ -1687,9 +1703,9 @@ export const RequestEcho = { typeUrl: "/tendermint.abci.RequestEcho", value: RequestEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestEcho.typeUrl, RequestEcho); function createBaseRequestFlush(): RequestFlush { return {}; } @@ -1744,9 +1760,9 @@ export const RequestFlush = { typeUrl: "/tendermint.abci.RequestFlush", value: RequestFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestFlush.typeUrl, RequestFlush); function createBaseRequestInfo(): RequestInfo { return { version: "", @@ -1850,9 +1866,9 @@ export const RequestInfo = { typeUrl: "/tendermint.abci.RequestInfo", value: RequestInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestInfo.typeUrl, RequestInfo); function createBaseRequestInitChain(): RequestInitChain { return { time: new Date(), @@ -1982,9 +1998,12 @@ export const RequestInitChain = { typeUrl: "/tendermint.abci.RequestInitChain", value: RequestInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestInitChain.typeUrl, RequestInitChain); function createBaseRequestQuery(): RequestQuery { return { data: new Uint8Array(), @@ -2088,9 +2107,9 @@ export const RequestQuery = { typeUrl: "/tendermint.abci.RequestQuery", value: RequestQuery.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestQuery.typeUrl, RequestQuery); function createBaseRequestCheckTx(): RequestCheckTx { return { tx: new Uint8Array(), @@ -2170,9 +2189,9 @@ export const RequestCheckTx = { typeUrl: "/tendermint.abci.RequestCheckTx", value: RequestCheckTx.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCheckTx.typeUrl, RequestCheckTx); function createBaseRequestCommit(): RequestCommit { return {}; } @@ -2227,9 +2246,9 @@ export const RequestCommit = { typeUrl: "/tendermint.abci.RequestCommit", value: RequestCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCommit.typeUrl, RequestCommit); function createBaseRequestListSnapshots(): RequestListSnapshots { return {}; } @@ -2284,9 +2303,9 @@ export const RequestListSnapshots = { typeUrl: "/tendermint.abci.RequestListSnapshots", value: RequestListSnapshots.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestListSnapshots.typeUrl, RequestListSnapshots); function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { return { snapshot: undefined, @@ -2366,9 +2385,11 @@ export const RequestOfferSnapshot = { typeUrl: "/tendermint.abci.RequestOfferSnapshot", value: RequestOfferSnapshot.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestOfferSnapshot.typeUrl, RequestOfferSnapshot); function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { return { height: BigInt(0), @@ -2460,9 +2481,9 @@ export const RequestLoadSnapshotChunk = { typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", value: RequestLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestLoadSnapshotChunk.typeUrl, RequestLoadSnapshotChunk); function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { return { index: 0, @@ -2554,9 +2575,9 @@ export const RequestApplySnapshotChunk = { typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", value: RequestApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestApplySnapshotChunk.typeUrl, RequestApplySnapshotChunk); function createBaseRequestPrepareProposal(): RequestPrepareProposal { return { maxTxBytes: BigInt(0), @@ -2712,9 +2733,12 @@ export const RequestPrepareProposal = { typeUrl: "/tendermint.abci.RequestPrepareProposal", value: RequestPrepareProposal.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedCommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestPrepareProposal.typeUrl, RequestPrepareProposal); function createBaseRequestProcessProposal(): RequestProcessProposal { return { txs: [], @@ -2870,9 +2894,12 @@ export const RequestProcessProposal = { typeUrl: "/tendermint.abci.RequestProcessProposal", value: RequestProcessProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestProcessProposal.typeUrl, RequestProcessProposal); function createBaseRequestExtendVote(): RequestExtendVote { return { hash: new Uint8Array(), @@ -3028,9 +3055,12 @@ export const RequestExtendVote = { typeUrl: "/tendermint.abci.RequestExtendVote", value: RequestExtendVote.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestExtendVote.typeUrl, RequestExtendVote); function createBaseRequestVerifyVoteExtension(): RequestVerifyVoteExtension { return { hash: new Uint8Array(), @@ -3134,9 +3164,9 @@ export const RequestVerifyVoteExtension = { typeUrl: "/tendermint.abci.RequestVerifyVoteExtension", value: RequestVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestVerifyVoteExtension.typeUrl, RequestVerifyVoteExtension); function createBaseRequestFinalizeBlock(): RequestFinalizeBlock { return { txs: [], @@ -3292,9 +3322,12 @@ export const RequestFinalizeBlock = { typeUrl: "/tendermint.abci.RequestFinalizeBlock", value: RequestFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestFinalizeBlock.typeUrl, RequestFinalizeBlock); function createBaseResponse(): Response { return { exception: undefined, @@ -3554,9 +3587,27 @@ export const Response = { typeUrl: "/tendermint.abci.Response", value: Response.encode(message).finish() }; + }, + registerTypeUrl() { + ResponseException.registerTypeUrl(); + ResponseEcho.registerTypeUrl(); + ResponseFlush.registerTypeUrl(); + ResponseInfo.registerTypeUrl(); + ResponseInitChain.registerTypeUrl(); + ResponseQuery.registerTypeUrl(); + ResponseCheckTx.registerTypeUrl(); + ResponseCommit.registerTypeUrl(); + ResponseListSnapshots.registerTypeUrl(); + ResponseOfferSnapshot.registerTypeUrl(); + ResponseLoadSnapshotChunk.registerTypeUrl(); + ResponseApplySnapshotChunk.registerTypeUrl(); + ResponsePrepareProposal.registerTypeUrl(); + ResponseProcessProposal.registerTypeUrl(); + ResponseExtendVote.registerTypeUrl(); + ResponseVerifyVoteExtension.registerTypeUrl(); + ResponseFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Response.typeUrl, Response); function createBaseResponseException(): ResponseException { return { error: "" @@ -3624,9 +3675,9 @@ export const ResponseException = { typeUrl: "/tendermint.abci.ResponseException", value: ResponseException.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseException.typeUrl, ResponseException); function createBaseResponseEcho(): ResponseEcho { return { message: "" @@ -3694,9 +3745,9 @@ export const ResponseEcho = { typeUrl: "/tendermint.abci.ResponseEcho", value: ResponseEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseEcho.typeUrl, ResponseEcho); function createBaseResponseFlush(): ResponseFlush { return {}; } @@ -3751,9 +3802,9 @@ export const ResponseFlush = { typeUrl: "/tendermint.abci.ResponseFlush", value: ResponseFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseFlush.typeUrl, ResponseFlush); function createBaseResponseInfo(): ResponseInfo { return { data: "", @@ -3869,9 +3920,9 @@ export const ResponseInfo = { typeUrl: "/tendermint.abci.ResponseInfo", value: ResponseInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseInfo.typeUrl, ResponseInfo); function createBaseResponseInitChain(): ResponseInitChain { return { consensusParams: undefined, @@ -3965,9 +4016,12 @@ export const ResponseInitChain = { typeUrl: "/tendermint.abci.ResponseInitChain", value: ResponseInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseInitChain.typeUrl, ResponseInitChain); function createBaseResponseQuery(): ResponseQuery { return { code: 0, @@ -4131,9 +4185,11 @@ export const ResponseQuery = { typeUrl: "/tendermint.abci.ResponseQuery", value: ResponseQuery.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOps.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseQuery.typeUrl, ResponseQuery); function createBaseResponseCheckTx(): ResponseCheckTx { return { code: 0, @@ -4287,9 +4343,11 @@ export const ResponseCheckTx = { typeUrl: "/tendermint.abci.ResponseCheckTx", value: ResponseCheckTx.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseCheckTx.typeUrl, ResponseCheckTx); function createBaseResponseCommit(): ResponseCommit { return { retainHeight: BigInt(0) @@ -4357,9 +4415,9 @@ export const ResponseCommit = { typeUrl: "/tendermint.abci.ResponseCommit", value: ResponseCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseCommit.typeUrl, ResponseCommit); function createBaseResponseListSnapshots(): ResponseListSnapshots { return { snapshots: [] @@ -4429,9 +4487,11 @@ export const ResponseListSnapshots = { typeUrl: "/tendermint.abci.ResponseListSnapshots", value: ResponseListSnapshots.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseListSnapshots.typeUrl, ResponseListSnapshots); function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { return { result: 0 @@ -4499,9 +4559,9 @@ export const ResponseOfferSnapshot = { typeUrl: "/tendermint.abci.ResponseOfferSnapshot", value: ResponseOfferSnapshot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseOfferSnapshot.typeUrl, ResponseOfferSnapshot); function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { return { chunk: new Uint8Array() @@ -4569,9 +4629,9 @@ export const ResponseLoadSnapshotChunk = { typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", value: ResponseLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseLoadSnapshotChunk.typeUrl, ResponseLoadSnapshotChunk); function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { return { result: 0, @@ -4676,9 +4736,9 @@ export const ResponseApplySnapshotChunk = { typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", value: ResponseApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseApplySnapshotChunk.typeUrl, ResponseApplySnapshotChunk); function createBaseResponsePrepareProposal(): ResponsePrepareProposal { return { txs: [] @@ -4748,9 +4808,9 @@ export const ResponsePrepareProposal = { typeUrl: "/tendermint.abci.ResponsePrepareProposal", value: ResponsePrepareProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponsePrepareProposal.typeUrl, ResponsePrepareProposal); function createBaseResponseProcessProposal(): ResponseProcessProposal { return { status: 0 @@ -4818,9 +4878,9 @@ export const ResponseProcessProposal = { typeUrl: "/tendermint.abci.ResponseProcessProposal", value: ResponseProcessProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseProcessProposal.typeUrl, ResponseProcessProposal); function createBaseResponseExtendVote(): ResponseExtendVote { return { voteExtension: new Uint8Array() @@ -4888,9 +4948,9 @@ export const ResponseExtendVote = { typeUrl: "/tendermint.abci.ResponseExtendVote", value: ResponseExtendVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseExtendVote.typeUrl, ResponseExtendVote); function createBaseResponseVerifyVoteExtension(): ResponseVerifyVoteExtension { return { status: 0 @@ -4958,9 +5018,9 @@ export const ResponseVerifyVoteExtension = { typeUrl: "/tendermint.abci.ResponseVerifyVoteExtension", value: ResponseVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseVerifyVoteExtension.typeUrl, ResponseVerifyVoteExtension); function createBaseResponseFinalizeBlock(): ResponseFinalizeBlock { return { events: [], @@ -5082,9 +5142,14 @@ export const ResponseFinalizeBlock = { typeUrl: "/tendermint.abci.ResponseFinalizeBlock", value: ResponseFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); + ExecTxResult.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); + ConsensusParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseFinalizeBlock.typeUrl, ResponseFinalizeBlock); function createBaseCommitInfo(): CommitInfo { return { round: 0, @@ -5166,9 +5231,11 @@ export const CommitInfo = { typeUrl: "/tendermint.abci.CommitInfo", value: CommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + VoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitInfo.typeUrl, CommitInfo); function createBaseExtendedCommitInfo(): ExtendedCommitInfo { return { round: 0, @@ -5250,9 +5317,11 @@ export const ExtendedCommitInfo = { typeUrl: "/tendermint.abci.ExtendedCommitInfo", value: ExtendedCommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedVoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommitInfo.typeUrl, ExtendedCommitInfo); function createBaseEvent(): Event { return { type: "", @@ -5334,9 +5403,11 @@ export const Event = { typeUrl: "/tendermint.abci.Event", value: Event.encode(message).finish() }; + }, + registerTypeUrl() { + EventAttribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Event.typeUrl, Event); function createBaseEventAttribute(): EventAttribute { return { key: "", @@ -5428,9 +5499,9 @@ export const EventAttribute = { typeUrl: "/tendermint.abci.EventAttribute", value: EventAttribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttribute.typeUrl, EventAttribute); function createBaseExecTxResult(): ExecTxResult { return { code: 0, @@ -5584,9 +5655,11 @@ export const ExecTxResult = { typeUrl: "/tendermint.abci.ExecTxResult", value: ExecTxResult.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExecTxResult.typeUrl, ExecTxResult); function createBaseTxResult(): TxResult { return { height: BigInt(0), @@ -5690,9 +5763,11 @@ export const TxResult = { typeUrl: "/tendermint.abci.TxResult", value: TxResult.encode(message).finish() }; + }, + registerTypeUrl() { + ExecTxResult.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResult.typeUrl, TxResult); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -5772,9 +5847,9 @@ export const Validator = { typeUrl: "/tendermint.abci.Validator", value: Validator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseValidatorUpdate(): ValidatorUpdate { return { pubKey: PublicKey.fromPartial({}), @@ -5854,9 +5929,11 @@ export const ValidatorUpdate = { typeUrl: "/tendermint.abci.ValidatorUpdate", value: ValidatorUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorUpdate.typeUrl, ValidatorUpdate); function createBaseVoteInfo(): VoteInfo { return { validator: Validator.fromPartial({}), @@ -5936,9 +6013,11 @@ export const VoteInfo = { typeUrl: "/tendermint.abci.VoteInfo", value: VoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(VoteInfo.typeUrl, VoteInfo); function createBaseExtendedVoteInfo(): ExtendedVoteInfo { return { validator: Validator.fromPartial({}), @@ -6042,9 +6121,11 @@ export const ExtendedVoteInfo = { typeUrl: "/tendermint.abci.ExtendedVoteInfo", value: ExtendedVoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedVoteInfo.typeUrl, ExtendedVoteInfo); function createBaseMisbehavior(): Misbehavior { return { type: 0, @@ -6160,9 +6241,11 @@ export const Misbehavior = { typeUrl: "/tendermint.abci.Misbehavior", value: Misbehavior.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Misbehavior.typeUrl, Misbehavior); function createBaseSnapshot(): Snapshot { return { height: BigInt(0), @@ -6278,6 +6361,6 @@ export const Snapshot = { typeUrl: "/tendermint.abci.Snapshot", value: Snapshot.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Snapshot.typeUrl, Snapshot); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/crypto/keys.ts b/libs/injective-react/src/tendermint/crypto/keys.ts index 9dc8476b..c58639e4 100644 --- a/libs/injective-react/src/tendermint/crypto/keys.ts +++ b/libs/injective-react/src/tendermint/crypto/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** PublicKey defines the keys available for use with Validators */ export interface PublicKey { ed25519?: Uint8Array; @@ -98,6 +97,6 @@ export const PublicKey = { typeUrl: "/tendermint.crypto.PublicKey", value: PublicKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PublicKey.typeUrl, PublicKey); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/crypto/proof.ts b/libs/injective-react/src/tendermint/crypto/proof.ts index 5f372fcf..b3eea7ae 100644 --- a/libs/injective-react/src/tendermint/crypto/proof.ts +++ b/libs/injective-react/src/tendermint/crypto/proof.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Proof { total: bigint; index: bigint; @@ -208,9 +207,9 @@ export const Proof = { typeUrl: "/tendermint.crypto.Proof", value: Proof.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proof.typeUrl, Proof); function createBaseValueOp(): ValueOp { return { key: new Uint8Array(), @@ -290,9 +289,11 @@ export const ValueOp = { typeUrl: "/tendermint.crypto.ValueOp", value: ValueOp.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValueOp.typeUrl, ValueOp); function createBaseDominoOp(): DominoOp { return { key: "", @@ -384,9 +385,9 @@ export const DominoOp = { typeUrl: "/tendermint.crypto.DominoOp", value: DominoOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DominoOp.typeUrl, DominoOp); function createBaseProofOp(): ProofOp { return { type: "", @@ -478,9 +479,9 @@ export const ProofOp = { typeUrl: "/tendermint.crypto.ProofOp", value: ProofOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProofOp.typeUrl, ProofOp); function createBaseProofOps(): ProofOps { return { ops: [] @@ -550,6 +551,8 @@ export const ProofOps = { typeUrl: "/tendermint.crypto.ProofOps", value: ProofOps.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOp.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ProofOps.typeUrl, ProofOps); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/types/block.ts b/libs/injective-react/src/tendermint/types/block.ts index 16763b51..20ae4856 100644 --- a/libs/injective-react/src/tendermint/types/block.ts +++ b/libs/injective-react/src/tendermint/types/block.ts @@ -2,7 +2,6 @@ import { Header, HeaderAmino, Data, DataAmino, Commit, CommitAmino } from "./typ import { EvidenceList, EvidenceListAmino } from "./evidence"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Block { header: Header; data: Data; @@ -126,6 +125,11 @@ export const Block = { typeUrl: "/tendermint.types.Block", value: Block.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Data.registerTypeUrl(); + EvidenceList.registerTypeUrl(); + Commit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Block.typeUrl, Block); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/types/evidence.ts b/libs/injective-react/src/tendermint/types/evidence.ts index 696b6c8a..bf7dd661 100644 --- a/libs/injective-react/src/tendermint/types/evidence.ts +++ b/libs/injective-react/src/tendermint/types/evidence.ts @@ -3,7 +3,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator, ValidatorAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; lightClientAttackEvidence?: LightClientAttackEvidence; @@ -161,9 +160,12 @@ export const Evidence = { typeUrl: "/tendermint.types.Evidence", value: Evidence.encode(message).finish() }; + }, + registerTypeUrl() { + DuplicateVoteEvidence.registerTypeUrl(); + LightClientAttackEvidence.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Evidence.typeUrl, Evidence); function createBaseDuplicateVoteEvidence(): DuplicateVoteEvidence { return { voteA: undefined, @@ -279,9 +281,11 @@ export const DuplicateVoteEvidence = { typeUrl: "/tendermint.types.DuplicateVoteEvidence", value: DuplicateVoteEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DuplicateVoteEvidence.typeUrl, DuplicateVoteEvidence); function createBaseLightClientAttackEvidence(): LightClientAttackEvidence { return { conflictingBlock: undefined, @@ -399,9 +403,12 @@ export const LightClientAttackEvidence = { typeUrl: "/tendermint.types.LightClientAttackEvidence", value: LightClientAttackEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + LightBlock.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightClientAttackEvidence.typeUrl, LightClientAttackEvidence); function createBaseEvidenceList(): EvidenceList { return { evidence: [] @@ -471,6 +478,8 @@ export const EvidenceList = { typeUrl: "/tendermint.types.EvidenceList", value: EvidenceList.encode(message).finish() }; + }, + registerTypeUrl() { + Evidence.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EvidenceList.typeUrl, EvidenceList); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/types/params.ts b/libs/injective-react/src/tendermint/types/params.ts index 0b15190e..8f9291e4 100644 --- a/libs/injective-react/src/tendermint/types/params.ts +++ b/libs/injective-react/src/tendermint/types/params.ts @@ -1,7 +1,6 @@ import { Duration, DurationAmino } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. @@ -339,9 +338,15 @@ export const ConsensusParams = { typeUrl: "/tendermint.types.ConsensusParams", value: ConsensusParams.encode(message).finish() }; + }, + registerTypeUrl() { + BlockParams.registerTypeUrl(); + EvidenceParams.registerTypeUrl(); + ValidatorParams.registerTypeUrl(); + VersionParams.registerTypeUrl(); + ABCIParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConsensusParams.typeUrl, ConsensusParams); function createBaseBlockParams(): BlockParams { return { maxBytes: BigInt(0), @@ -421,9 +426,9 @@ export const BlockParams = { typeUrl: "/tendermint.types.BlockParams", value: BlockParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BlockParams.typeUrl, BlockParams); function createBaseEvidenceParams(): EvidenceParams { return { maxAgeNumBlocks: BigInt(0), @@ -515,9 +520,9 @@ export const EvidenceParams = { typeUrl: "/tendermint.types.EvidenceParams", value: EvidenceParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EvidenceParams.typeUrl, EvidenceParams); function createBaseValidatorParams(): ValidatorParams { return { pubKeyTypes: [] @@ -587,9 +592,9 @@ export const ValidatorParams = { typeUrl: "/tendermint.types.ValidatorParams", value: ValidatorParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorParams.typeUrl, ValidatorParams); function createBaseVersionParams(): VersionParams { return { app: BigInt(0) @@ -657,9 +662,9 @@ export const VersionParams = { typeUrl: "/tendermint.types.VersionParams", value: VersionParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VersionParams.typeUrl, VersionParams); function createBaseHashedParams(): HashedParams { return { blockMaxBytes: BigInt(0), @@ -739,9 +744,9 @@ export const HashedParams = { typeUrl: "/tendermint.types.HashedParams", value: HashedParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(HashedParams.typeUrl, HashedParams); function createBaseABCIParams(): ABCIParams { return { voteExtensionsEnableHeight: BigInt(0) @@ -809,6 +814,6 @@ export const ABCIParams = { typeUrl: "/tendermint.types.ABCIParams", value: ABCIParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ABCIParams.typeUrl, ABCIParams); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/types/types.ts b/libs/injective-react/src/tendermint/types/types.ts index c44fd8af..2762a429 100644 --- a/libs/injective-react/src/tendermint/types/types.ts +++ b/libs/injective-react/src/tendermint/types/types.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { BlockIDFlag, ValidatorSet, ValidatorSetAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, toTimestamp, fromTimestamp, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** SignedMsgType is a type of signed message in the consensus. */ export enum SignedMsgType { SIGNED_MSG_TYPE_UNKNOWN = 0, @@ -542,9 +541,9 @@ export const PartSetHeader = { typeUrl: "/tendermint.types.PartSetHeader", value: PartSetHeader.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PartSetHeader.typeUrl, PartSetHeader); function createBasePart(): Part { return { index: 0, @@ -636,9 +635,11 @@ export const Part = { typeUrl: "/tendermint.types.Part", value: Part.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Part.typeUrl, Part); function createBaseBlockID(): BlockID { return { hash: new Uint8Array(), @@ -718,9 +719,11 @@ export const BlockID = { typeUrl: "/tendermint.types.BlockID", value: BlockID.encode(message).finish() }; + }, + registerTypeUrl() { + PartSetHeader.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockID.typeUrl, BlockID); function createBaseHeader(): Header { return { version: Consensus.fromPartial({}), @@ -944,9 +947,12 @@ export const Header = { typeUrl: "/tendermint.types.Header", value: Header.encode(message).finish() }; + }, + registerTypeUrl() { + Consensus.registerTypeUrl(); + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Header.typeUrl, Header); function createBaseData(): Data { return { txs: [] @@ -1016,9 +1022,9 @@ export const Data = { typeUrl: "/tendermint.types.Data", value: Data.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Data.typeUrl, Data); function createBaseVote(): Vote { return { type: 0, @@ -1194,9 +1200,11 @@ export const Vote = { typeUrl: "/tendermint.types.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); function createBaseCommit(): Commit { return { height: BigInt(0), @@ -1302,9 +1310,12 @@ export const Commit = { typeUrl: "/tendermint.types.Commit", value: Commit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + CommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commit.typeUrl, Commit); function createBaseCommitSig(): CommitSig { return { blockIdFlag: 0, @@ -1408,9 +1419,9 @@ export const CommitSig = { typeUrl: "/tendermint.types.CommitSig", value: CommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommitSig.typeUrl, CommitSig); function createBaseExtendedCommit(): ExtendedCommit { return { height: BigInt(0), @@ -1516,9 +1527,12 @@ export const ExtendedCommit = { typeUrl: "/tendermint.types.ExtendedCommit", value: ExtendedCommit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + ExtendedCommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommit.typeUrl, ExtendedCommit); function createBaseExtendedCommitSig(): ExtendedCommitSig { return { blockIdFlag: 0, @@ -1646,9 +1660,9 @@ export const ExtendedCommitSig = { typeUrl: "/tendermint.types.ExtendedCommitSig", value: ExtendedCommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtendedCommitSig.typeUrl, ExtendedCommitSig); function createBaseProposal(): Proposal { return { type: 0, @@ -1788,9 +1802,11 @@ export const Proposal = { typeUrl: "/tendermint.types.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); function createBaseSignedHeader(): SignedHeader { return { header: undefined, @@ -1870,9 +1886,12 @@ export const SignedHeader = { typeUrl: "/tendermint.types.SignedHeader", value: SignedHeader.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Commit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignedHeader.typeUrl, SignedHeader); function createBaseLightBlock(): LightBlock { return { signedHeader: undefined, @@ -1952,9 +1971,12 @@ export const LightBlock = { typeUrl: "/tendermint.types.LightBlock", value: LightBlock.encode(message).finish() }; + }, + registerTypeUrl() { + SignedHeader.registerTypeUrl(); + ValidatorSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightBlock.typeUrl, LightBlock); function createBaseBlockMeta(): BlockMeta { return { blockId: BlockID.fromPartial({}), @@ -2058,9 +2080,12 @@ export const BlockMeta = { typeUrl: "/tendermint.types.BlockMeta", value: BlockMeta.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + Header.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockMeta.typeUrl, BlockMeta); function createBaseTxProof(): TxProof { return { rootHash: new Uint8Array(), @@ -2152,6 +2177,8 @@ export const TxProof = { typeUrl: "/tendermint.types.TxProof", value: TxProof.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(TxProof.typeUrl, TxProof); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/types/validator.ts b/libs/injective-react/src/tendermint/types/validator.ts index 0c652786..8a52ff10 100644 --- a/libs/injective-react/src/tendermint/types/validator.ts +++ b/libs/injective-react/src/tendermint/types/validator.ts @@ -1,7 +1,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** BlockIdFlag indicates which BlockID the signature is for */ export enum BlockIDFlag { /** BLOCK_ID_FLAG_UNKNOWN - indicates an error condition */ @@ -196,9 +195,11 @@ export const ValidatorSet = { typeUrl: "/tendermint.types.ValidatorSet", value: ValidatorSet.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSet.typeUrl, ValidatorSet); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -302,9 +303,11 @@ export const Validator = { typeUrl: "/tendermint.types.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseSimpleValidator(): SimpleValidator { return { pubKey: undefined, @@ -384,6 +387,8 @@ export const SimpleValidator = { typeUrl: "/tendermint.types.SimpleValidator", value: SimpleValidator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SimpleValidator.typeUrl, SimpleValidator); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injective-react/src/tendermint/version/types.ts b/libs/injective-react/src/tendermint/version/types.ts index 824f3644..36154b74 100644 --- a/libs/injective-react/src/tendermint/version/types.ts +++ b/libs/injective-react/src/tendermint/version/types.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * App includes the protocol and software version for the application. * This information is included in ResponseInfo. The App.Protocol can be @@ -132,9 +131,9 @@ export const App = { typeUrl: "/tendermint.version.App", value: App.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(App.typeUrl, App); function createBaseConsensus(): Consensus { return { block: BigInt(0), @@ -214,6 +213,6 @@ export const Consensus = { typeUrl: "/tendermint.version.Consensus", value: Consensus.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Consensus.typeUrl, Consensus); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injective-react/src/types.ts b/libs/injective-react/src/types.ts index 6983e34a..e44c8a75 100644 --- a/libs/injective-react/src/types.ts +++ b/libs/injective-react/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -48,6 +48,7 @@ export interface TelescopeGeneratedCodec< toProto?: (message: T) => Uint8Array; fromProtoMsg?: (message: ProtoMsg) => T; toProtoMsg?: (message: T) => Any; + registerTypeUrl?: () => void; } export type TelescopeGeneratedType< diff --git a/libs/injective-react/src/utf8.ts b/libs/injective-react/src/utf8.ts index 56735515..5fef278b 100644 --- a/libs/injective-react/src/utf8.ts +++ b/libs/injective-react/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/varint.ts b/libs/injective-react/src/varint.ts index e06f5977..cab33130 100644 --- a/libs/injective-react/src/varint.ts +++ b/libs/injective-react/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/binary.ts b/libs/injective-vue/src/binary.ts index 7325addd..f9a515e4 100644 --- a/libs/injective-vue/src/binary.ts +++ b/libs/injective-vue/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/cosmos/auth/v1beta1/auth.ts b/libs/injective-vue/src/cosmos/auth/v1beta1/auth.ts index 1511165c..236320b9 100644 --- a/libs/injective-vue/src/cosmos/auth/v1beta1/auth.ts +++ b/libs/injective-vue/src/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * BaseAccount defines a base account type. It contains all the necessary fields diff --git a/libs/injective-vue/src/cosmos/auth/v1beta1/query.ts b/libs/injective-vue/src/cosmos/auth/v1beta1/query.ts index d4cd8225..50544a50 100644 --- a/libs/injective-vue/src/cosmos/auth/v1beta1/query.ts +++ b/libs/injective-vue/src/cosmos/auth/v1beta1/query.ts @@ -3,8 +3,8 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth"; import { EthAccount, EthAccountProtoMsg } from "../../../injective/types/v1beta1/account"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. diff --git a/libs/injective-vue/src/cosmos/authz/v1beta1/tx.ts b/libs/injective-vue/src/cosmos/authz/v1beta1/tx.ts index 58031666..375f7350 100644 --- a/libs/injective-vue/src/cosmos/authz/v1beta1/tx.ts +++ b/libs/injective-vue/src/cosmos/authz/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Grant, GrantAmino } from "./authz"; import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * MsgGrant is a request type for Grant method. It declares authorization to the grantee diff --git a/libs/injective-vue/src/cosmos/base/abci/v1beta1/abci.ts b/libs/injective-vue/src/cosmos/base/abci/v1beta1/abci.ts index 6678eb87..4477c71f 100644 --- a/libs/injective-vue/src/cosmos/base/abci/v1beta1/abci.ts +++ b/libs/injective-vue/src/cosmos/base/abci/v1beta1/abci.ts @@ -2,8 +2,8 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Event, EventAmino } from "../../../../tendermint/abci/types"; import { Block, BlockAmino } from "../../../../tendermint/types/block"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * TxResponse defines a structure containing relevant tx data and metadata. The diff --git a/libs/injective-vue/src/cosmos/feegrant/v1beta1/tx.ts b/libs/injective-vue/src/cosmos/feegrant/v1beta1/tx.ts index b4af7499..249479d9 100644 --- a/libs/injective-vue/src/cosmos/feegrant/v1beta1/tx.ts +++ b/libs/injective-vue/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance diff --git a/libs/injective-vue/src/cosmos/gov/v1beta1/tx.ts b/libs/injective-vue/src/cosmos/gov/v1beta1/tx.ts index 21886ea4..ac0d0b07 100644 --- a/libs/injective-vue/src/cosmos/gov/v1beta1/tx.ts +++ b/libs/injective-vue/src/cosmos/gov/v1beta1/tx.ts @@ -10,8 +10,8 @@ import { GrantBandOraclePrivilegeProposal, GrantBandOraclePrivilegeProposalProto import { BlacklistEthereumAddressesProposal, BlacklistEthereumAddressesProposalProtoMsg, RevokeEthereumBlacklistProposal, RevokeEthereumBlacklistProposalProtoMsg } from "../../../injective/peggy/v1/proposal"; import { ContractRegistrationRequestProposal, ContractRegistrationRequestProposalProtoMsg, BatchContractRegistrationRequestProposal, BatchContractRegistrationRequestProposalProtoMsg, BatchContractDeregistrationProposal, BatchContractDeregistrationProposalProtoMsg, ContractRegistrationRequest, ContractRegistrationRequestProtoMsg, BatchStoreCodeProposal, BatchStoreCodeProposalProtoMsg } from "../../../injective/wasmx/v1/proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary diff --git a/libs/injective-vue/src/cosmos/ics23/v1/proofs.ts b/libs/injective-vue/src/cosmos/ics23/v1/proofs.ts index 48f0412a..bdefd7f7 100644 --- a/libs/injective-vue/src/cosmos/ics23/v1/proofs.ts +++ b/libs/injective-vue/src/cosmos/ics23/v1/proofs.ts @@ -1,6 +1,6 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; export enum HashOp { /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ diff --git a/libs/injective-vue/src/cosmos/staking/v1beta1/query.ts b/libs/injective-vue/src/cosmos/staking/v1beta1/query.ts index a995580b..e81b1e3e 100644 --- a/libs/injective-vue/src/cosmos/staking/v1beta1/query.ts +++ b/libs/injective-vue/src/cosmos/staking/v1beta1/query.ts @@ -1,8 +1,8 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; import { Validator, ValidatorAmino, DelegationResponse, DelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, RedelegationResponse, RedelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Pool, PoolAmino, Params, ParamsAmino } from "./staking"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ export interface QueryValidatorsRequest { diff --git a/libs/injective-vue/src/cosmos/staking/v1beta1/staking.ts b/libs/injective-vue/src/cosmos/staking/v1beta1/staking.ts index 0b2f164a..d99e2c80 100644 --- a/libs/injective-vue/src/cosmos/staking/v1beta1/staking.ts +++ b/libs/injective-vue/src/cosmos/staking/v1beta1/staking.ts @@ -5,8 +5,8 @@ import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; import { ComputedRef } from "vue"; /** BondStatus is the status of a validator. */ diff --git a/libs/injective-vue/src/cosmos/staking/v1beta1/tx.ts b/libs/injective-vue/src/cosmos/staking/v1beta1/tx.ts index d397d34b..02daad17 100644 --- a/libs/injective-vue/src/cosmos/staking/v1beta1/tx.ts +++ b/libs/injective-vue/src/cosmos/staking/v1beta1/tx.ts @@ -3,9 +3,9 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { GlobalDecoderRegistry } from "../../../registry"; import { ComputedRef } from "vue"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { diff --git a/libs/injective-vue/src/cosmos/tx/v1beta1/tx.ts b/libs/injective-vue/src/cosmos/tx/v1beta1/tx.ts index 86b624e3..480c8921 100644 --- a/libs/injective-vue/src/cosmos/tx/v1beta1/tx.ts +++ b/libs/injective-vue/src/cosmos/tx/v1beta1/tx.ts @@ -3,8 +3,8 @@ import { SignMode } from "../signing/v1beta1/signing"; import { CompactBitArray, CompactBitArrayAmino } from "../../crypto/multisig/v1beta1/multisig"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; /** Tx is the standard type used for broadcasting transactions. */ export interface Tx { diff --git a/libs/injective-vue/src/cosmos/vesting/v1beta1/vesting.ts b/libs/injective-vue/src/cosmos/vesting/v1beta1/vesting.ts index a032aafe..3e4118c2 100644 --- a/libs/injective-vue/src/cosmos/vesting/v1beta1/vesting.ts +++ b/libs/injective-vue/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,8 +1,8 @@ import { BaseAccount, BaseAccountAmino } from "../../auth/v1beta1/auth"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all diff --git a/libs/injective-vue/src/cosmwasm/wasm/v1/proposal_legacy.ts b/libs/injective-vue/src/cosmwasm/wasm/v1/proposal_legacy.ts index b101d981..a957e537 100644 --- a/libs/injective-vue/src/cosmwasm/wasm/v1/proposal_legacy.ts +++ b/libs/injective-vue/src/cosmwasm/wasm/v1/proposal_legacy.ts @@ -1,9 +1,9 @@ import { AccessConfig, AccessConfigAmino } from "./types"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; import { ComputedRef } from "vue"; /** * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for diff --git a/libs/injective-vue/src/cosmwasm/wasm/v1/tx.ts b/libs/injective-vue/src/cosmwasm/wasm/v1/tx.ts index ec31e4ab..78684ea0 100644 --- a/libs/injective-vue/src/cosmwasm/wasm/v1/tx.ts +++ b/libs/injective-vue/src/cosmwasm/wasm/v1/tx.ts @@ -1,9 +1,9 @@ import { AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; import { ComputedRef } from "vue"; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { diff --git a/libs/injective-vue/src/extern.ts b/libs/injective-vue/src/extern.ts index c844d6f0..2ceebef5 100644 --- a/libs/injective-vue/src/extern.ts +++ b/libs/injective-vue/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/helpers.ts b/libs/injective-vue/src/helpers.ts index 1f19575b..ab170adb 100644 --- a/libs/injective-vue/src/helpers.ts +++ b/libs/injective-vue/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/ibc/applications/transfer/v1/tx.ts b/libs/injective-vue/src/ibc/applications/transfer/v1/tx.ts index d44bd558..756b7b69 100644 --- a/libs/injective-vue/src/ibc/applications/transfer/v1/tx.ts +++ b/libs/injective-vue/src/ibc/applications/transfer/v1/tx.ts @@ -2,8 +2,8 @@ import { Coin, CoinAmino } from "../../../../cosmos/base/v1beta1/coin"; import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v1/client"; import { Forwarding, ForwardingAmino } from "./transfer"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between diff --git a/libs/injective-vue/src/ibc/core/channel/v1/tx.ts b/libs/injective-vue/src/ibc/core/channel/v1/tx.ts index 14ba4ea1..5584dc8a 100644 --- a/libs/injective-vue/src/ibc/core/channel/v1/tx.ts +++ b/libs/injective-vue/src/ibc/core/channel/v1/tx.ts @@ -2,8 +2,8 @@ import { Channel, ChannelAmino, Packet, PacketAmino, State } from "./channel"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { UpgradeFields, UpgradeFieldsAmino, Upgrade, UpgradeAmino, ErrorReceipt, ErrorReceiptAmino } from "./upgrade"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; import { ComputedRef } from "vue"; /** ResponseResultType defines the possible outcomes of the execution of a message */ export enum ResponseResultType { diff --git a/libs/injective-vue/src/ibc/core/channel/v1/upgrade.ts b/libs/injective-vue/src/ibc/core/channel/v1/upgrade.ts index 0b23f16a..91185340 100644 --- a/libs/injective-vue/src/ibc/core/channel/v1/upgrade.ts +++ b/libs/injective-vue/src/ibc/core/channel/v1/upgrade.ts @@ -1,7 +1,7 @@ import { Timeout, TimeoutAmino, Order } from "./channel"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, isSet } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, isSet } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * Upgrade is a verifiable type which contains the relevant information diff --git a/libs/injective-vue/src/ibc/core/client/v1/client.ts b/libs/injective-vue/src/ibc/core/client/v1/client.ts index 2d3f05d9..4846cb86 100644 --- a/libs/injective-vue/src/ibc/core/client/v1/client.ts +++ b/libs/injective-vue/src/ibc/core/client/v1/client.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * IdentifiedClientState defines a client state with an additional client diff --git a/libs/injective-vue/src/ibc/core/client/v1/tx.ts b/libs/injective-vue/src/ibc/core/client/v1/tx.ts index 26be87d5..43f9dd14 100644 --- a/libs/injective-vue/src/ibc/core/client/v1/tx.ts +++ b/libs/injective-vue/src/ibc/core/client/v1/tx.ts @@ -2,8 +2,8 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import { Params, ParamsAmino } from "./client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { ComputedRef } from "vue"; /** MsgCreateClient defines a message to create an IBC client */ export interface MsgCreateClient { diff --git a/libs/injective-vue/src/ibc/core/connection/v1/tx.ts b/libs/injective-vue/src/ibc/core/connection/v1/tx.ts index a2e74a8f..87869100 100644 --- a/libs/injective-vue/src/ibc/core/connection/v1/tx.ts +++ b/libs/injective-vue/src/ibc/core/connection/v1/tx.ts @@ -2,8 +2,8 @@ import { Counterparty, CounterpartyAmino, Version, VersionAmino } from "./connec import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to diff --git a/libs/injective-vue/src/injective/auction/v1beta1/genesis.ts b/libs/injective-vue/src/injective/auction/v1beta1/genesis.ts index cd374615..410528d6 100644 --- a/libs/injective-vue/src/injective/auction/v1beta1/genesis.ts +++ b/libs/injective-vue/src/injective/auction/v1beta1/genesis.ts @@ -1,7 +1,7 @@ import { Params, ParamsAmino, Bid, BidAmino, LastAuctionResult, LastAuctionResultAmino } from "./auction"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState defines the auction module's genesis state. */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/auction/v1beta1/tx.ts b/libs/injective-vue/src/injective/auction/v1beta1/tx.ts index 1d7929dd..830e7e6b 100644 --- a/libs/injective-vue/src/injective/auction/v1beta1/tx.ts +++ b/libs/injective-vue/src/injective/auction/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Params, ParamsAmino } from "./auction"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** Bid defines a SDK message for placing a bid for an auction */ export interface MsgBid { diff --git a/libs/injective-vue/src/injective/exchange/v1beta1/genesis.ts b/libs/injective-vue/src/injective/exchange/v1beta1/genesis.ts index 037acbad..1fe25185 100644 --- a/libs/injective-vue/src/injective/exchange/v1beta1/genesis.ts +++ b/libs/injective-vue/src/injective/exchange/v1beta1/genesis.ts @@ -1,7 +1,7 @@ import { Params, ParamsAmino, SpotMarket, SpotMarketAmino, DerivativeMarket, DerivativeMarketAmino, PerpetualMarketInfo, PerpetualMarketInfoAmino, DerivativeMarketSettlementInfo, DerivativeMarketSettlementInfoAmino, TradingRewardCampaignInfo, TradingRewardCampaignInfoAmino, CampaignRewardPool, CampaignRewardPoolAmino, FeeDiscountSchedule, FeeDiscountScheduleAmino, TradeRecords, TradeRecordsAmino, BinaryOptionsMarket, BinaryOptionsMarketAmino, DenomDecimals, DenomDecimalsAmino, MarketFeeMultiplier, MarketFeeMultiplierAmino, AggregateSubaccountVolumeRecord, AggregateSubaccountVolumeRecordAmino, MarketVolume, MarketVolumeAmino, FeeDiscountTierTTL, FeeDiscountTierTTLAmino, SpotLimitOrder, SpotLimitOrderAmino, DerivativeLimitOrder, DerivativeLimitOrderAmino, DerivativeMarketOrder, DerivativeMarketOrderAmino, Deposit, DepositAmino, Position, PositionAmino, SubaccountTradeNonce, SubaccountTradeNonceAmino, ExpiryFuturesMarketInfo, ExpiryFuturesMarketInfoAmino, PerpetualMarketFunding, PerpetualMarketFundingAmino, GrantAuthorization, GrantAuthorizationAmino, ActiveGrant, ActiveGrantAmino } from "./exchange"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState defines the exchange module's genesis state. */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/insurance/v1beta1/events.ts b/libs/injective-vue/src/injective/insurance/v1beta1/events.ts index 1e644710..5a996e43 100644 --- a/libs/injective-vue/src/injective/insurance/v1beta1/events.ts +++ b/libs/injective-vue/src/injective/insurance/v1beta1/events.ts @@ -1,8 +1,8 @@ import { InsuranceFund, InsuranceFundAmino, RedemptionSchedule, RedemptionScheduleAmino } from "./insurance"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; export interface EventInsuranceFundUpdate { fund?: InsuranceFund; diff --git a/libs/injective-vue/src/injective/insurance/v1beta1/genesis.ts b/libs/injective-vue/src/injective/insurance/v1beta1/genesis.ts index 8c0451fc..58526b1d 100644 --- a/libs/injective-vue/src/injective/insurance/v1beta1/genesis.ts +++ b/libs/injective-vue/src/injective/insurance/v1beta1/genesis.ts @@ -1,7 +1,7 @@ import { Params, ParamsAmino, InsuranceFund, InsuranceFundAmino, RedemptionSchedule, RedemptionScheduleAmino } from "./insurance"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState defines the insurance module's genesis state. */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/insurance/v1beta1/insurance.ts b/libs/injective-vue/src/injective/insurance/v1beta1/insurance.ts index 99da0464..9cdd2802 100644 --- a/libs/injective-vue/src/injective/insurance/v1beta1/insurance.ts +++ b/libs/injective-vue/src/injective/insurance/v1beta1/insurance.ts @@ -3,8 +3,8 @@ import { OracleType } from "../../oracle/v1beta1/oracle"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet, toTimestamp, fromTimestamp } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet, toTimestamp, fromTimestamp } from "../../../helpers"; import { ComputedRef } from "vue"; export interface Params { /** diff --git a/libs/injective-vue/src/injective/ocr/v1beta1/genesis.ts b/libs/injective-vue/src/injective/ocr/v1beta1/genesis.ts index 99121946..36ebbe01 100644 --- a/libs/injective-vue/src/injective/ocr/v1beta1/genesis.ts +++ b/libs/injective-vue/src/injective/ocr/v1beta1/genesis.ts @@ -1,8 +1,8 @@ import { Params, ParamsAmino, FeedConfig, FeedConfigAmino, Transmission, TransmissionAmino, EpochAndRound, EpochAndRoundAmino } from "./ocr"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState defines the OCR module's genesis state. */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/ocr/v1beta1/tx.ts b/libs/injective-vue/src/injective/ocr/v1beta1/tx.ts index 42d41539..8bd3e8aa 100644 --- a/libs/injective-vue/src/injective/ocr/v1beta1/tx.ts +++ b/libs/injective-vue/src/injective/ocr/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { FeedConfig, FeedConfigAmino, Report, ReportAmino, Params, ParamsAmino } from "./ocr"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; export interface MsgCreateFeed { sender: string; diff --git a/libs/injective-vue/src/injective/oracle/v1beta1/genesis.ts b/libs/injective-vue/src/injective/oracle/v1beta1/genesis.ts index 26b2cf14..0aeb414f 100644 --- a/libs/injective-vue/src/injective/oracle/v1beta1/genesis.ts +++ b/libs/injective-vue/src/injective/oracle/v1beta1/genesis.ts @@ -1,7 +1,7 @@ import { Params, ParamsAmino, BandPriceState, BandPriceStateAmino, PriceFeedState, PriceFeedStateAmino, CoinbasePriceState, CoinbasePriceStateAmino, BandOracleRequest, BandOracleRequestAmino, BandIBCParams, BandIBCParamsAmino, ChainlinkPriceState, ChainlinkPriceStateAmino, PriceRecords, PriceRecordsAmino, ProviderState, ProviderStateAmino, PythPriceState, PythPriceStateAmino, StorkPriceState, StorkPriceStateAmino } from "./oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState defines the oracle module's genesis state. */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/peggy/v1/attestation.ts b/libs/injective-vue/src/injective/peggy/v1/attestation.ts index 1a5250fc..604cdd98 100644 --- a/libs/injective-vue/src/injective/peggy/v1/attestation.ts +++ b/libs/injective-vue/src/injective/peggy/v1/attestation.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** * ClaimType is the cosmos type of an event from the counterpart chain that can diff --git a/libs/injective-vue/src/injective/peggy/v1/genesis.ts b/libs/injective-vue/src/injective/peggy/v1/genesis.ts index 81a5b218..a72595a7 100644 --- a/libs/injective-vue/src/injective/peggy/v1/genesis.ts +++ b/libs/injective-vue/src/injective/peggy/v1/genesis.ts @@ -4,8 +4,8 @@ import { MsgValsetConfirm, MsgValsetConfirmAmino, MsgConfirmBatch, MsgConfirmBat import { OutgoingTxBatch, OutgoingTxBatchAmino, OutgoingTransferTx, OutgoingTransferTxAmino } from "./batch"; import { Attestation, AttestationAmino } from "./attestation"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState struct */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/peggy/v1/params.ts b/libs/injective-vue/src/injective/peggy/v1/params.ts index 53dae4da..92b53a51 100644 --- a/libs/injective-vue/src/injective/peggy/v1/params.ts +++ b/libs/injective-vue/src/injective/peggy/v1/params.ts @@ -1,7 +1,7 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; export interface Params { peggyId: string; diff --git a/libs/injective-vue/src/injective/permissions/v1beta1/events.ts b/libs/injective-vue/src/injective/permissions/v1beta1/events.ts index fd6a4f82..bc4b15c1 100644 --- a/libs/injective-vue/src/injective/permissions/v1beta1/events.ts +++ b/libs/injective-vue/src/injective/permissions/v1beta1/events.ts @@ -1,7 +1,7 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; export interface EventSetVoucher { addr: string; diff --git a/libs/injective-vue/src/injective/permissions/v1beta1/genesis.ts b/libs/injective-vue/src/injective/permissions/v1beta1/genesis.ts index 3f7e04c9..3cc6f49e 100644 --- a/libs/injective-vue/src/injective/permissions/v1beta1/genesis.ts +++ b/libs/injective-vue/src/injective/permissions/v1beta1/genesis.ts @@ -1,8 +1,8 @@ import { Params, ParamsAmino } from "./params"; import { Namespace, NamespaceAmino } from "./permissions"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState defines the permissions module's genesis state. */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/permissions/v1beta1/tx.ts b/libs/injective-vue/src/injective/permissions/v1beta1/tx.ts index 1c1fe0c0..068d2cc9 100644 --- a/libs/injective-vue/src/injective/permissions/v1beta1/tx.ts +++ b/libs/injective-vue/src/injective/permissions/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Params, ParamsAmino } from "../../../cosmos/bank/v1beta1/bank"; import { Namespace, NamespaceAmino, Role, RoleAmino, AddressRoles, AddressRolesAmino } from "./permissions"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; export interface MsgUpdateParams { /** authority is the address of the governance account. */ diff --git a/libs/injective-vue/src/injective/stream/v1beta1/query.ts b/libs/injective-vue/src/injective/stream/v1beta1/query.ts index 3207c752..e3841241 100644 --- a/libs/injective-vue/src/injective/stream/v1beta1/query.ts +++ b/libs/injective-vue/src/injective/stream/v1beta1/query.ts @@ -1,8 +1,8 @@ import { Level, LevelAmino, Deposit, DepositAmino, SpotLimitOrder, SpotLimitOrderAmino, DerivativeLimitOrder, DerivativeLimitOrderAmino, PositionDelta, PositionDeltaAmino } from "../../exchange/v1beta1/exchange"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; export enum OrderUpdateStatus { Unspecified = 0, diff --git a/libs/injective-vue/src/injective/tokenfactory/v1beta1/genesis.ts b/libs/injective-vue/src/injective/tokenfactory/v1beta1/genesis.ts index b5e01146..bda88659 100644 --- a/libs/injective-vue/src/injective/tokenfactory/v1beta1/genesis.ts +++ b/libs/injective-vue/src/injective/tokenfactory/v1beta1/genesis.ts @@ -1,8 +1,8 @@ import { Params, ParamsAmino } from "./params"; import { DenomAuthorityMetadata, DenomAuthorityMetadataAmino } from "./authorityMetadata"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** GenesisState defines the tokenfactory module's genesis state. */ export interface GenesisState { diff --git a/libs/injective-vue/src/injective/types/v1beta1/account.ts b/libs/injective-vue/src/injective/types/v1beta1/account.ts index bdd747c6..5e15c851 100644 --- a/libs/injective-vue/src/injective/types/v1beta1/account.ts +++ b/libs/injective-vue/src/injective/types/v1beta1/account.ts @@ -1,7 +1,7 @@ import { BaseAccount, BaseAccountAmino } from "../../../cosmos/auth/v1beta1/auth"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * EthAccount implements the authtypes.AccountI interface and embeds an diff --git a/libs/injective-vue/src/injective/wasmx/v1/genesis.ts b/libs/injective-vue/src/injective/wasmx/v1/genesis.ts index e6a19028..baec191e 100644 --- a/libs/injective-vue/src/injective/wasmx/v1/genesis.ts +++ b/libs/injective-vue/src/injective/wasmx/v1/genesis.ts @@ -1,7 +1,7 @@ import { RegisteredContract, RegisteredContractAmino, Params, ParamsAmino } from "./wasmx"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; export interface RegisteredContractWithAddress { address: string; diff --git a/libs/injective-vue/src/injective/wasmx/v1/proposal.ts b/libs/injective-vue/src/injective/wasmx/v1/proposal.ts index 0bebb2e6..a119e7e7 100644 --- a/libs/injective-vue/src/injective/wasmx/v1/proposal.ts +++ b/libs/injective-vue/src/injective/wasmx/v1/proposal.ts @@ -1,7 +1,7 @@ import { StoreCodeProposal, StoreCodeProposalAmino } from "../../../cosmwasm/wasm/v1/proposal_legacy"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; export enum FundingMode { Unspecified = 0, diff --git a/libs/injective-vue/src/injective/wasmx/v1/wasmx.ts b/libs/injective-vue/src/injective/wasmx/v1/wasmx.ts index 07106298..50cdb9fc 100644 --- a/libs/injective-vue/src/injective/wasmx/v1/wasmx.ts +++ b/libs/injective-vue/src/injective/wasmx/v1/wasmx.ts @@ -1,8 +1,8 @@ import { AccessConfig, AccessConfigAmino } from "../../../cosmwasm/wasm/v1/types"; import { FundingMode } from "./proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; export interface Params { /** diff --git a/libs/injective-vue/src/registry.ts b/libs/injective-vue/src/registry.ts index dee026ae..e7f6497f 100644 --- a/libs/injective-vue/src/registry.ts +++ b/libs/injective-vue/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/tendermint/abci/types.ts b/libs/injective-vue/src/tendermint/abci/types.ts index a1f4f26e..b7d76036 100644 --- a/libs/injective-vue/src/tendermint/abci/types.ts +++ b/libs/injective-vue/src/tendermint/abci/types.ts @@ -4,8 +4,8 @@ import { ProofOps, ProofOpsAmino } from "../crypto/proof"; import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BlockIDFlag } from "../types/validator"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; import { ComputedRef } from "vue"; export enum CheckTxType { NEW = 0, diff --git a/libs/injective-vue/src/tendermint/types/block.ts b/libs/injective-vue/src/tendermint/types/block.ts index f91a0f55..cf8af491 100644 --- a/libs/injective-vue/src/tendermint/types/block.ts +++ b/libs/injective-vue/src/tendermint/types/block.ts @@ -1,8 +1,8 @@ import { Header, HeaderAmino, Data, DataAmino, Commit, CommitAmino } from "./types"; import { EvidenceList, EvidenceListAmino } from "./evidence"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial } from "../../helpers"; import { ComputedRef } from "vue"; export interface Block { header: Header; diff --git a/libs/injective-vue/src/tendermint/types/evidence.ts b/libs/injective-vue/src/tendermint/types/evidence.ts index 67bfcd51..661b4f13 100644 --- a/libs/injective-vue/src/tendermint/types/evidence.ts +++ b/libs/injective-vue/src/tendermint/types/evidence.ts @@ -2,8 +2,8 @@ import { Vote, VoteAmino, LightBlock, LightBlockAmino } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator, ValidatorAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; import { ComputedRef } from "vue"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; diff --git a/libs/injective-vue/src/tendermint/types/params.ts b/libs/injective-vue/src/tendermint/types/params.ts index 6cc92e6f..16da8bfc 100644 --- a/libs/injective-vue/src/tendermint/types/params.ts +++ b/libs/injective-vue/src/tendermint/types/params.ts @@ -1,7 +1,7 @@ import { Duration, DurationAmino } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial } from "../../helpers"; import { ComputedRef } from "vue"; /** * ConsensusParams contains consensus critical parameters that determine the diff --git a/libs/injective-vue/src/tendermint/types/validator.ts b/libs/injective-vue/src/tendermint/types/validator.ts index d70aa67a..52f72f9d 100644 --- a/libs/injective-vue/src/tendermint/types/validator.ts +++ b/libs/injective-vue/src/tendermint/types/validator.ts @@ -1,7 +1,7 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; import { ComputedRef } from "vue"; /** BlockIdFlag indicates which BlockID the signature is for */ export enum BlockIDFlag { diff --git a/libs/injective-vue/src/types.ts b/libs/injective-vue/src/types.ts index 6983e34a..e44c8a75 100644 --- a/libs/injective-vue/src/types.ts +++ b/libs/injective-vue/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -48,6 +48,7 @@ export interface TelescopeGeneratedCodec< toProto?: (message: T) => Uint8Array; fromProtoMsg?: (message: ProtoMsg) => T; toProtoMsg?: (message: T) => Any; + registerTypeUrl?: () => void; } export type TelescopeGeneratedType< diff --git a/libs/injective-vue/src/utf8.ts b/libs/injective-vue/src/utf8.ts index 56735515..5fef278b 100644 --- a/libs/injective-vue/src/utf8.ts +++ b/libs/injective-vue/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/varint.ts b/libs/injective-vue/src/varint.ts index e06f5977..cab33130 100644 --- a/libs/injective-vue/src/varint.ts +++ b/libs/injective-vue/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/vue-query.ts b/libs/injective-vue/src/vue-query.ts index 09b35b29..7cf1f613 100644 --- a/libs/injective-vue/src/vue-query.ts +++ b/libs/injective-vue/src/vue-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/binary.ts b/libs/injectivejs/src/binary.ts index 7325addd..f9a515e4 100644 --- a/libs/injectivejs/src/binary.ts +++ b/libs/injectivejs/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/cosmos/auth/v1beta1/auth.ts b/libs/injectivejs/src/cosmos/auth/v1beta1/auth.ts index bd8ed990..85846fa2 100644 --- a/libs/injectivejs/src/cosmos/auth/v1beta1/auth.ts +++ b/libs/injectivejs/src/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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 @@ -222,10 +222,12 @@ export const BaseAccount = { typeUrl: "/cosmos.auth.v1beta1.BaseAccount", value: BaseAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); } }; -GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); function createBaseModuleAccount(): ModuleAccount { return { baseAccount: undefined, @@ -326,10 +328,13 @@ export const ModuleAccount = { typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", value: ModuleAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); + BaseAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); function createBaseModuleCredential(): ModuleCredential { return { moduleName: "", @@ -418,10 +423,9 @@ export const ModuleCredential = { typeUrl: "/cosmos.auth.v1beta1.ModuleCredential", value: ModuleCredential.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModuleCredential.typeUrl, ModuleCredential); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleCredential.aminoType, ModuleCredential.typeUrl); function createBaseParams(): Params { return { maxMemoCharacters: BigInt(0), @@ -544,7 +548,6 @@ export const Params = { typeUrl: "/cosmos.auth.v1beta1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/auth/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/cosmos/auth/v1beta1/query.rpc.func.ts index 9a6e4931..96ab73af 100644 --- a/libs/injectivejs/src/cosmos/auth/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/auth/v1beta1/query.rpc.func.ts @@ -5,68 +5,78 @@ export const createGetAccounts = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryAccountRequest.encode, decode: QueryAccountResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Account", - clientResolver + clientResolver, + deps: [QueryAccountRequest, QueryAccountResponse] }); export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAccountAddressByIDRequest.encode, decode: QueryAccountAddressByIDResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountAddressByID", - clientResolver + clientResolver, + deps: [QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleAccountsRequest.encode, decode: QueryModuleAccountsResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccounts", - clientResolver + clientResolver, + deps: [QueryModuleAccountsRequest, QueryModuleAccountsResponse] }); export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleAccountByNameRequest.encode, decode: QueryModuleAccountByNameResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccountByName", - clientResolver + clientResolver, + deps: [QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse] }); export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuery({ encode: Bech32PrefixRequest.encode, decode: Bech32PrefixResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Bech32Prefix", - clientResolver + clientResolver, + deps: [Bech32PrefixRequest, Bech32PrefixResponse] }); export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => buildQuery({ encode: AddressBytesToStringRequest.encode, decode: AddressBytesToStringResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressBytesToString", - clientResolver + clientResolver, + deps: [AddressBytesToStringRequest, AddressBytesToStringResponse] }); export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => buildQuery({ encode: AddressStringToBytesRequest.encode, decode: AddressStringToBytesResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressStringToBytes", - clientResolver + clientResolver, + deps: [AddressStringToBytesRequest, AddressStringToBytesResponse] }); export const createGetAccountInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAccountInfoRequest.encode, decode: QueryAccountInfoResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountInfo", - clientResolver + clientResolver, + deps: [QueryAccountInfoRequest, QueryAccountInfoResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/auth/v1beta1/query.ts b/libs/injectivejs/src/cosmos/auth/v1beta1/query.ts index 13eb3d8e..1074a756 100644 --- a/libs/injectivejs/src/cosmos/auth/v1beta1/query.ts +++ b/libs/injectivejs/src/cosmos/auth/v1beta1/query.ts @@ -3,8 +3,8 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth"; import { EthAccount, EthAccountProtoMsg } from "../../../injective/types/v1beta1/account"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. * @@ -557,10 +557,11 @@ export const QueryAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", value: QueryAccountsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsRequest.typeUrl, QueryAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsRequest.aminoType, QueryAccountsRequest.typeUrl); function createBaseQueryAccountsResponse(): QueryAccountsResponse { return { accounts: [], @@ -649,10 +650,13 @@ export const QueryAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", value: QueryAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsResponse.typeUrl, QueryAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsResponse.aminoType, QueryAccountsResponse.typeUrl); function createBaseQueryAccountRequest(): QueryAccountRequest { return { address: "" @@ -727,10 +731,9 @@ export const QueryAccountRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", value: QueryAccountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountRequest.typeUrl, QueryAccountRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountRequest.aminoType, QueryAccountRequest.typeUrl); function createBaseQueryAccountResponse(): QueryAccountResponse { return { account: undefined @@ -805,10 +808,12 @@ export const QueryAccountResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", value: QueryAccountResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountResponse.typeUrl, QueryAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountResponse.aminoType, QueryAccountResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -870,10 +875,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -948,10 +952,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest { return {}; } @@ -1013,10 +1018,9 @@ export const QueryModuleAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", value: QueryModuleAccountsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountsRequest.typeUrl, QueryModuleAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsRequest.aminoType, QueryModuleAccountsRequest.typeUrl); function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse { return { accounts: [] @@ -1093,10 +1097,11 @@ export const QueryModuleAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", value: QueryModuleAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountsResponse.typeUrl, QueryModuleAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsResponse.aminoType, QueryModuleAccountsResponse.typeUrl); function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRequest { return { name: "" @@ -1171,10 +1176,9 @@ export const QueryModuleAccountByNameRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", value: QueryModuleAccountByNameRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameRequest.typeUrl, QueryModuleAccountByNameRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameRequest.aminoType, QueryModuleAccountByNameRequest.typeUrl); function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameResponse { return { account: undefined @@ -1249,10 +1253,11 @@ export const QueryModuleAccountByNameResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", value: QueryModuleAccountByNameResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameResponse.typeUrl, QueryModuleAccountByNameResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameResponse.aminoType, QueryModuleAccountByNameResponse.typeUrl); function createBaseBech32PrefixRequest(): Bech32PrefixRequest { return {}; } @@ -1314,10 +1319,9 @@ export const Bech32PrefixRequest = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", value: Bech32PrefixRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixRequest.typeUrl, Bech32PrefixRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixRequest.aminoType, Bech32PrefixRequest.typeUrl); function createBaseBech32PrefixResponse(): Bech32PrefixResponse { return { bech32Prefix: "" @@ -1392,10 +1396,9 @@ export const Bech32PrefixResponse = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", value: Bech32PrefixResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixResponse.typeUrl, Bech32PrefixResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixResponse.aminoType, Bech32PrefixResponse.typeUrl); function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest { return { addressBytes: new Uint8Array() @@ -1470,10 +1473,9 @@ export const AddressBytesToStringRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", value: AddressBytesToStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringRequest.typeUrl, AddressBytesToStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringRequest.aminoType, AddressBytesToStringRequest.typeUrl); function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse { return { addressString: "" @@ -1548,10 +1550,9 @@ export const AddressBytesToStringResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", value: AddressBytesToStringResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringResponse.typeUrl, AddressBytesToStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringResponse.aminoType, AddressBytesToStringResponse.typeUrl); function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest { return { addressString: "" @@ -1626,10 +1627,9 @@ export const AddressStringToBytesRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", value: AddressStringToBytesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesRequest.typeUrl, AddressStringToBytesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesRequest.aminoType, AddressStringToBytesRequest.typeUrl); function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse { return { addressBytes: new Uint8Array() @@ -1704,10 +1704,9 @@ export const AddressStringToBytesResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", value: AddressStringToBytesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesResponse.typeUrl, AddressStringToBytesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesResponse.aminoType, AddressStringToBytesResponse.typeUrl); function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequest { return { id: BigInt(0), @@ -1794,10 +1793,9 @@ export const QueryAccountAddressByIDRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", value: QueryAccountAddressByIDRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDRequest.typeUrl, QueryAccountAddressByIDRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDRequest.aminoType, QueryAccountAddressByIDRequest.typeUrl); function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDResponse { return { accountAddress: "" @@ -1872,10 +1870,9 @@ export const QueryAccountAddressByIDResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", value: QueryAccountAddressByIDResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDResponse.typeUrl, QueryAccountAddressByIDResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDResponse.aminoType, QueryAccountAddressByIDResponse.typeUrl); function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest { return { address: "" @@ -1950,10 +1947,9 @@ export const QueryAccountInfoRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest", value: QueryAccountInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountInfoRequest.typeUrl, QueryAccountInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoRequest.aminoType, QueryAccountInfoRequest.typeUrl); function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse { return { info: undefined @@ -2028,7 +2024,8 @@ export const QueryAccountInfoResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse", value: QueryAccountInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryAccountInfoResponse.typeUrl, QueryAccountInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoResponse.aminoType, QueryAccountInfoResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/authz/v1beta1/authz.ts b/libs/injectivejs/src/cosmos/authz/v1beta1/authz.ts index e71c3fee..87272802 100644 --- a/libs/injectivejs/src/cosmos/authz/v1beta1/authz.ts +++ b/libs/injectivejs/src/cosmos/authz/v1beta1/authz.ts @@ -187,10 +187,12 @@ export const GenericAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", value: GenericAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); } }; -GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); function createBaseGrant(): Grant { return { authorization: undefined, @@ -277,10 +279,11 @@ export const Grant = { typeUrl: "/cosmos.authz.v1beta1.Grant", value: Grant.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Grant.typeUrl, Grant); -GlobalDecoderRegistry.registerAminoProtoMapping(Grant.aminoType, Grant.typeUrl); function createBaseGrantAuthorization(): GrantAuthorization { return { granter: "", @@ -391,10 +394,11 @@ export const GrantAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", value: GrantAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GrantAuthorization.typeUrl, GrantAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantAuthorization.aminoType, GrantAuthorization.typeUrl); function createBaseGrantQueueItem(): GrantQueueItem { return { msgTypeUrls: [] @@ -471,7 +475,6 @@ export const GrantQueueItem = { typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", value: GrantQueueItem.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GrantQueueItem.typeUrl, GrantQueueItem); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantQueueItem.aminoType, GrantQueueItem.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/authz/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/authz/v1beta1/tx.rpc.func.ts index 18006a6c..7c896912 100644 --- a/libs/injectivejs/src/cosmos/authz/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/authz/v1beta1/tx.rpc.func.ts @@ -5,17 +5,20 @@ export const createGrant = (clientResolver?: SigningClientResolver) => buildTx buildTx({ clientResolver, typeUrl: MsgExec.typeUrl, encoders: toEncoders(MsgExec), - converters: toConverters(MsgExec) + converters: toConverters(MsgExec), + deps: [MsgExec] }); export const createRevoke = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRevoke.typeUrl, encoders: toEncoders(MsgRevoke), - converters: toConverters(MsgRevoke) + converters: toConverters(MsgRevoke), + deps: [MsgRevoke] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/authz/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/authz/v1beta1/tx.ts index 80640ebe..265830cc 100644 --- a/libs/injectivejs/src/cosmos/authz/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/authz/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Grant, GrantAmino } from "./authz"; import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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. @@ -237,10 +237,11 @@ export const MsgGrant = { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.encode(message).finish() }; + }, + registerTypeUrl() { + Grant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgGrant.typeUrl, MsgGrant); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrant.aminoType, MsgGrant.typeUrl); function createBaseMsgGrantResponse(): MsgGrantResponse { return {}; } @@ -302,10 +303,9 @@ export const MsgGrantResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", value: MsgGrantResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantResponse.typeUrl, MsgGrantResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantResponse.aminoType, MsgGrantResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { grantee: "", @@ -394,10 +394,9 @@ export const MsgExec = { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { results: [] @@ -474,10 +473,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgRevoke(): MsgRevoke { return { granter: "", @@ -576,10 +574,9 @@ export const MsgRevoke = { typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevoke.typeUrl, MsgRevoke); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevoke.aminoType, MsgRevoke.typeUrl); function createBaseMsgRevokeResponse(): MsgRevokeResponse { return {}; } @@ -641,7 +638,6 @@ export const MsgRevokeResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", value: MsgRevokeResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRevokeResponse.typeUrl, MsgRevokeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeResponse.aminoType, MsgRevokeResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/bank/v1beta1/bank.ts b/libs/injectivejs/src/cosmos/bank/v1beta1/bank.ts index 2c115ba3..0deb436b 100644 --- a/libs/injectivejs/src/cosmos/bank/v1beta1/bank.ts +++ b/libs/injectivejs/src/cosmos/bank/v1beta1/bank.ts @@ -346,10 +346,11 @@ export const Params = { typeUrl: "/cosmos.bank.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseSendEnabled(): SendEnabled { return { denom: "", @@ -436,10 +437,9 @@ export const SendEnabled = { typeUrl: "/cosmos.bank.v1beta1.SendEnabled", value: SendEnabled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SendEnabled.typeUrl, SendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(SendEnabled.aminoType, SendEnabled.typeUrl); function createBaseInput(): Input { return { address: "", @@ -528,10 +528,11 @@ export const Input = { typeUrl: "/cosmos.bank.v1beta1.Input", value: Input.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Input.typeUrl, Input); -GlobalDecoderRegistry.registerAminoProtoMapping(Input.aminoType, Input.typeUrl); function createBaseOutput(): Output { return { address: "", @@ -620,10 +621,11 @@ export const Output = { typeUrl: "/cosmos.bank.v1beta1.Output", value: Output.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Output.typeUrl, Output); -GlobalDecoderRegistry.registerAminoProtoMapping(Output.aminoType, Output.typeUrl); function createBaseSupply(): Supply { return { total: [] @@ -700,10 +702,13 @@ export const Supply = { typeUrl: "/cosmos.bank.v1beta1.Supply", value: Supply.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(Supply.typeUrl, Supply); + GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Supply.typeUrl, Supply); -GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); function createBaseDenomUnit(): DenomUnit { return { denom: "", @@ -804,10 +809,9 @@ export const DenomUnit = { typeUrl: "/cosmos.bank.v1beta1.DenomUnit", value: DenomUnit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DenomUnit.typeUrl, DenomUnit); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomUnit.aminoType, DenomUnit.typeUrl); function createBaseMetadata(): Metadata { return { description: "", @@ -968,7 +972,8 @@ export const Metadata = { typeUrl: "/cosmos.bank.v1beta1.Metadata", value: Metadata.encode(message).finish() }; + }, + registerTypeUrl() { + DenomUnit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Metadata.typeUrl, Metadata); -GlobalDecoderRegistry.registerAminoProtoMapping(Metadata.aminoType, Metadata.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/bank/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/cosmos/bank/v1beta1/query.rpc.func.ts index dc21baf8..70281597 100644 --- a/libs/injectivejs/src/cosmos/bank/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/bank/v1beta1/query.rpc.func.ts @@ -5,89 +5,102 @@ export const createGetBalance = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryAllBalancesRequest.encode, decode: QueryAllBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "AllBalances", - clientResolver + clientResolver, + deps: [QueryAllBalancesRequest, QueryAllBalancesResponse] }); export const createGetSpendableBalances = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpendableBalancesRequest.encode, decode: QuerySpendableBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalances", - clientResolver + clientResolver, + deps: [QuerySpendableBalancesRequest, QuerySpendableBalancesResponse] }); export const createGetSpendableBalanceByDenom = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpendableBalanceByDenomRequest.encode, decode: QuerySpendableBalanceByDenomResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalanceByDenom", - clientResolver + clientResolver, + deps: [QuerySpendableBalanceByDenomRequest, QuerySpendableBalanceByDenomResponse] }); export const createGetTotalSupply = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTotalSupplyRequest.encode, decode: QueryTotalSupplyResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "TotalSupply", - clientResolver + clientResolver, + deps: [QueryTotalSupplyRequest, QueryTotalSupplyResponse] }); export const createGetSupplyOf = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySupplyOfRequest.encode, decode: QuerySupplyOfResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SupplyOf", - clientResolver + clientResolver, + deps: [QuerySupplyOfRequest, QuerySupplyOfResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetDenomMetadata = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomMetadataRequest.encode, decode: QueryDenomMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadata", - clientResolver + clientResolver, + deps: [QueryDenomMetadataRequest, QueryDenomMetadataResponse] }); export const createGetDenomMetadataByQueryString = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomMetadataByQueryStringRequest.encode, decode: QueryDenomMetadataByQueryStringResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadataByQueryString", - clientResolver + clientResolver, + deps: [QueryDenomMetadataByQueryStringRequest, QueryDenomMetadataByQueryStringResponse] }); export const createGetDenomsMetadata = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomsMetadataRequest.encode, decode: QueryDenomsMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomsMetadata", - clientResolver + clientResolver, + deps: [QueryDenomsMetadataRequest, QueryDenomsMetadataResponse] }); export const createGetDenomOwners = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomOwnersRequest.encode, decode: QueryDenomOwnersResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwners", - clientResolver + clientResolver, + deps: [QueryDenomOwnersRequest, QueryDenomOwnersResponse] }); export const createGetDenomOwnersByQuery = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomOwnersByQueryRequest.encode, decode: QueryDenomOwnersByQueryResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwnersByQuery", - clientResolver + clientResolver, + deps: [QueryDenomOwnersByQueryRequest, QueryDenomOwnersByQueryResponse] }); export const createGetSendEnabled = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySendEnabledRequest.encode, decode: QuerySendEnabledResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SendEnabled", - clientResolver + clientResolver, + deps: [QuerySendEnabledRequest, QuerySendEnabledResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/bank/v1beta1/query.ts b/libs/injectivejs/src/cosmos/bank/v1beta1/query.ts index 45f3fa82..f8f232a5 100644 --- a/libs/injectivejs/src/cosmos/bank/v1beta1/query.ts +++ b/libs/injectivejs/src/cosmos/bank/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino, Metadata, MetadataAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ export interface QueryBalanceRequest { /** address is the address to query balances for. */ @@ -810,10 +809,9 @@ export const QueryBalanceRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", value: QueryBalanceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceRequest.typeUrl, QueryBalanceRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceRequest.aminoType, QueryBalanceRequest.typeUrl); function createBaseQueryBalanceResponse(): QueryBalanceResponse { return { balance: undefined @@ -888,10 +886,11 @@ export const QueryBalanceResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", value: QueryBalanceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceResponse.typeUrl, QueryBalanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceResponse.aminoType, QueryBalanceResponse.typeUrl); function createBaseQueryAllBalancesRequest(): QueryAllBalancesRequest { return { address: "", @@ -990,10 +989,11 @@ export const QueryAllBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", value: QueryAllBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesRequest.typeUrl, QueryAllBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesRequest.aminoType, QueryAllBalancesRequest.typeUrl); function createBaseQueryAllBalancesResponse(): QueryAllBalancesResponse { return { balances: [], @@ -1082,10 +1082,12 @@ export const QueryAllBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", value: QueryAllBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesResponse.typeUrl, QueryAllBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesResponse.aminoType, QueryAllBalancesResponse.typeUrl); function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { return { address: "", @@ -1172,10 +1174,11 @@ export const QuerySpendableBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", value: QuerySpendableBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesRequest.typeUrl, QuerySpendableBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesRequest.aminoType, QuerySpendableBalancesRequest.typeUrl); function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { return { balances: [], @@ -1264,10 +1267,12 @@ export const QuerySpendableBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", value: QuerySpendableBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesResponse.typeUrl, QuerySpendableBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesResponse.aminoType, QuerySpendableBalancesResponse.typeUrl); function createBaseQuerySpendableBalanceByDenomRequest(): QuerySpendableBalanceByDenomRequest { return { address: "", @@ -1354,10 +1359,9 @@ export const QuerySpendableBalanceByDenomRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", value: QuerySpendableBalanceByDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomRequest.typeUrl, QuerySpendableBalanceByDenomRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomRequest.aminoType, QuerySpendableBalanceByDenomRequest.typeUrl); function createBaseQuerySpendableBalanceByDenomResponse(): QuerySpendableBalanceByDenomResponse { return { balance: undefined @@ -1432,10 +1436,11 @@ export const QuerySpendableBalanceByDenomResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", value: QuerySpendableBalanceByDenomResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomResponse.typeUrl, QuerySpendableBalanceByDenomResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomResponse.aminoType, QuerySpendableBalanceByDenomResponse.typeUrl); function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { return { pagination: undefined @@ -1510,10 +1515,11 @@ export const QueryTotalSupplyRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", value: QueryTotalSupplyRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyRequest.typeUrl, QueryTotalSupplyRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyRequest.aminoType, QueryTotalSupplyRequest.typeUrl); function createBaseQueryTotalSupplyResponse(): QueryTotalSupplyResponse { return { supply: [], @@ -1602,10 +1608,12 @@ export const QueryTotalSupplyResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", value: QueryTotalSupplyResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyResponse.typeUrl, QueryTotalSupplyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyResponse.aminoType, QueryTotalSupplyResponse.typeUrl); function createBaseQuerySupplyOfRequest(): QuerySupplyOfRequest { return { denom: "" @@ -1680,10 +1688,9 @@ export const QuerySupplyOfRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", value: QuerySupplyOfRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySupplyOfRequest.typeUrl, QuerySupplyOfRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfRequest.aminoType, QuerySupplyOfRequest.typeUrl); function createBaseQuerySupplyOfResponse(): QuerySupplyOfResponse { return { amount: Coin.fromPartial({}) @@ -1758,10 +1765,11 @@ export const QuerySupplyOfResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", value: QuerySupplyOfResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySupplyOfResponse.typeUrl, QuerySupplyOfResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfResponse.aminoType, QuerySupplyOfResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -1823,10 +1831,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -1901,10 +1908,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDenomsMetadataRequest(): QueryDenomsMetadataRequest { return { pagination: undefined @@ -1979,10 +1987,11 @@ export const QueryDenomsMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", value: QueryDenomsMetadataRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataRequest.typeUrl, QueryDenomsMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataRequest.aminoType, QueryDenomsMetadataRequest.typeUrl); function createBaseQueryDenomsMetadataResponse(): QueryDenomsMetadataResponse { return { metadatas: [], @@ -2071,10 +2080,12 @@ export const QueryDenomsMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", value: QueryDenomsMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataResponse.typeUrl, QueryDenomsMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataResponse.aminoType, QueryDenomsMetadataResponse.typeUrl); function createBaseQueryDenomMetadataRequest(): QueryDenomMetadataRequest { return { denom: "" @@ -2149,10 +2160,9 @@ export const QueryDenomMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", value: QueryDenomMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataRequest.typeUrl, QueryDenomMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataRequest.aminoType, QueryDenomMetadataRequest.typeUrl); function createBaseQueryDenomMetadataResponse(): QueryDenomMetadataResponse { return { metadata: Metadata.fromPartial({}) @@ -2227,10 +2237,11 @@ export const QueryDenomMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", value: QueryDenomMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataResponse.typeUrl, QueryDenomMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataResponse.aminoType, QueryDenomMetadataResponse.typeUrl); function createBaseQueryDenomMetadataByQueryStringRequest(): QueryDenomMetadataByQueryStringRequest { return { denom: "" @@ -2305,10 +2316,9 @@ export const QueryDenomMetadataByQueryStringRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", value: QueryDenomMetadataByQueryStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringRequest.typeUrl, QueryDenomMetadataByQueryStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringRequest.aminoType, QueryDenomMetadataByQueryStringRequest.typeUrl); function createBaseQueryDenomMetadataByQueryStringResponse(): QueryDenomMetadataByQueryStringResponse { return { metadata: Metadata.fromPartial({}) @@ -2383,10 +2393,11 @@ export const QueryDenomMetadataByQueryStringResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", value: QueryDenomMetadataByQueryStringResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringResponse.typeUrl, QueryDenomMetadataByQueryStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringResponse.aminoType, QueryDenomMetadataByQueryStringResponse.typeUrl); function createBaseQueryDenomOwnersRequest(): QueryDenomOwnersRequest { return { denom: "", @@ -2473,10 +2484,11 @@ export const QueryDenomOwnersRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", value: QueryDenomOwnersRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersRequest.typeUrl, QueryDenomOwnersRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersRequest.aminoType, QueryDenomOwnersRequest.typeUrl); function createBaseDenomOwner(): DenomOwner { return { address: "", @@ -2563,10 +2575,11 @@ export const DenomOwner = { typeUrl: "/cosmos.bank.v1beta1.DenomOwner", value: DenomOwner.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DenomOwner.typeUrl, DenomOwner); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomOwner.aminoType, DenomOwner.typeUrl); function createBaseQueryDenomOwnersResponse(): QueryDenomOwnersResponse { return { denomOwners: [], @@ -2655,10 +2668,12 @@ export const QueryDenomOwnersResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", value: QueryDenomOwnersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersResponse.typeUrl, QueryDenomOwnersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersResponse.aminoType, QueryDenomOwnersResponse.typeUrl); function createBaseQueryDenomOwnersByQueryRequest(): QueryDenomOwnersByQueryRequest { return { denom: "", @@ -2745,10 +2760,11 @@ export const QueryDenomOwnersByQueryRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", value: QueryDenomOwnersByQueryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryRequest.typeUrl, QueryDenomOwnersByQueryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryRequest.aminoType, QueryDenomOwnersByQueryRequest.typeUrl); function createBaseQueryDenomOwnersByQueryResponse(): QueryDenomOwnersByQueryResponse { return { denomOwners: [], @@ -2837,10 +2853,12 @@ export const QueryDenomOwnersByQueryResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", value: QueryDenomOwnersByQueryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryResponse.typeUrl, QueryDenomOwnersByQueryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryResponse.aminoType, QueryDenomOwnersByQueryResponse.typeUrl); function createBaseQuerySendEnabledRequest(): QuerySendEnabledRequest { return { denoms: [], @@ -2929,10 +2947,11 @@ export const QuerySendEnabledRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledRequest", value: QuerySendEnabledRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySendEnabledRequest.typeUrl, QuerySendEnabledRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledRequest.aminoType, QuerySendEnabledRequest.typeUrl); function createBaseQuerySendEnabledResponse(): QuerySendEnabledResponse { return { sendEnabled: [], @@ -3021,7 +3040,9 @@ export const QuerySendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledResponse", value: QuerySendEnabledResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); + PageResponse.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QuerySendEnabledResponse.typeUrl, QuerySendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledResponse.aminoType, QuerySendEnabledResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/bank/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/bank/v1beta1/tx.rpc.func.ts index fa81e316..e63f91ea 100644 --- a/libs/injectivejs/src/cosmos/bank/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/bank/v1beta1/tx.rpc.func.ts @@ -5,23 +5,27 @@ export const createSend = (clientResolver?: SigningClientResolver) => buildTx buildTx({ clientResolver, typeUrl: MsgMultiSend.typeUrl, encoders: toEncoders(MsgMultiSend), - converters: toConverters(MsgMultiSend) + converters: toConverters(MsgMultiSend), + deps: [MsgMultiSend] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createSetSendEnabled = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSetSendEnabled.typeUrl, encoders: toEncoders(MsgSetSendEnabled), - converters: toConverters(MsgSetSendEnabled) + converters: toConverters(MsgSetSendEnabled), + deps: [MsgSetSendEnabled] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/bank/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/bank/v1beta1/tx.ts index afc67365..97a8d819 100644 --- a/libs/injectivejs/src/cosmos/bank/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/bank/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Input, InputAmino, Output, OutputAmino, Params, ParamsAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgSend represents a message to send coins from one account to another. */ export interface MsgSend { fromAddress: string; @@ -305,10 +304,11 @@ export const MsgSend = { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSend.typeUrl, MsgSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSend.aminoType, MsgSend.typeUrl); function createBaseMsgSendResponse(): MsgSendResponse { return {}; } @@ -370,10 +370,9 @@ export const MsgSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", value: MsgSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSendResponse.typeUrl, MsgSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSendResponse.aminoType, MsgSendResponse.typeUrl); function createBaseMsgMultiSend(): MsgMultiSend { return { inputs: [], @@ -464,10 +463,12 @@ export const MsgMultiSend = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.encode(message).finish() }; + }, + registerTypeUrl() { + Input.registerTypeUrl(); + Output.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgMultiSend.typeUrl, MsgMultiSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSend.aminoType, MsgMultiSend.typeUrl); function createBaseMsgMultiSendResponse(): MsgMultiSendResponse { return {}; } @@ -529,10 +530,9 @@ export const MsgMultiSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", value: MsgMultiSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMultiSendResponse.typeUrl, MsgMultiSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSendResponse.aminoType, MsgMultiSendResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -619,10 +619,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -684,10 +685,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSetSendEnabled(): MsgSetSendEnabled { return { authority: "", @@ -790,10 +790,11 @@ export const MsgSetSendEnabled = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", value: MsgSetSendEnabled.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSetSendEnabled.typeUrl, MsgSetSendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabled.aminoType, MsgSetSendEnabled.typeUrl); function createBaseMsgSetSendEnabledResponse(): MsgSetSendEnabledResponse { return {}; } @@ -855,7 +856,6 @@ export const MsgSetSendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", value: MsgSetSendEnabledResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgSetSendEnabledResponse.typeUrl, MsgSetSendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabledResponse.aminoType, MsgSetSendEnabledResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/base/abci/v1beta1/abci.ts b/libs/injectivejs/src/cosmos/base/abci/v1beta1/abci.ts index 06316ec9..f8346d6a 100644 --- a/libs/injectivejs/src/cosmos/base/abci/v1beta1/abci.ts +++ b/libs/injectivejs/src/cosmos/base/abci/v1beta1/abci.ts @@ -3,7 +3,6 @@ import { Event, EventAmino } from "../../../../tendermint/abci/types"; import { Block, BlockAmino } from "../../../../tendermint/types/block"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * TxResponse defines a structure containing relevant tx data and metadata. The * tags are stringified and the log is JSON decoded. @@ -644,10 +643,11 @@ export const TxResponse = { typeUrl: "/cosmos.base.abci.v1beta1.TxResponse", value: TxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResponse.typeUrl, TxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxResponse.aminoType, TxResponse.typeUrl); function createBaseABCIMessageLog(): ABCIMessageLog { return { msgIndex: 0, @@ -748,10 +748,11 @@ export const ABCIMessageLog = { typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog", value: ABCIMessageLog.encode(message).finish() }; + }, + registerTypeUrl() { + StringEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ABCIMessageLog.typeUrl, ABCIMessageLog); -GlobalDecoderRegistry.registerAminoProtoMapping(ABCIMessageLog.aminoType, ABCIMessageLog.typeUrl); function createBaseStringEvent(): StringEvent { return { type: "", @@ -840,10 +841,11 @@ export const StringEvent = { typeUrl: "/cosmos.base.abci.v1beta1.StringEvent", value: StringEvent.encode(message).finish() }; + }, + registerTypeUrl() { + Attribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StringEvent.typeUrl, StringEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(StringEvent.aminoType, StringEvent.typeUrl); function createBaseAttribute(): Attribute { return { key: "", @@ -930,10 +932,9 @@ export const Attribute = { typeUrl: "/cosmos.base.abci.v1beta1.Attribute", value: Attribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Attribute.typeUrl, Attribute); -GlobalDecoderRegistry.registerAminoProtoMapping(Attribute.aminoType, Attribute.typeUrl); function createBaseGasInfo(): GasInfo { return { gasWanted: BigInt(0), @@ -1020,10 +1021,9 @@ export const GasInfo = { typeUrl: "/cosmos.base.abci.v1beta1.GasInfo", value: GasInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GasInfo.typeUrl, GasInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GasInfo.aminoType, GasInfo.typeUrl); function createBaseResult(): Result { return { data: new Uint8Array(), @@ -1138,10 +1138,9 @@ export const Result = { typeUrl: "/cosmos.base.abci.v1beta1.Result", value: Result.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Result.typeUrl, Result); -GlobalDecoderRegistry.registerAminoProtoMapping(Result.aminoType, Result.typeUrl); function createBaseSimulationResponse(): SimulationResponse { return { gasInfo: GasInfo.fromPartial({}), @@ -1228,10 +1227,12 @@ export const SimulationResponse = { typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse", value: SimulationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulationResponse.typeUrl, SimulationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulationResponse.aminoType, SimulationResponse.typeUrl); function createBaseMsgData(): MsgData { return { msgType: "", @@ -1318,10 +1319,9 @@ export const MsgData = { typeUrl: "/cosmos.base.abci.v1beta1.MsgData", value: MsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgData.typeUrl, MsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgData.aminoType, MsgData.typeUrl); function createBaseTxMsgData(): TxMsgData { return { data: [], @@ -1412,10 +1412,9 @@ export const TxMsgData = { typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData", value: TxMsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxMsgData.typeUrl, TxMsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(TxMsgData.aminoType, TxMsgData.typeUrl); function createBaseSearchTxsResult(): SearchTxsResult { return { totalCount: BigInt(0), @@ -1552,10 +1551,11 @@ export const SearchTxsResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult", value: SearchTxsResult.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SearchTxsResult.typeUrl, SearchTxsResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchTxsResult.aminoType, SearchTxsResult.typeUrl); function createBaseSearchBlocksResult(): SearchBlocksResult { return { totalCount: BigInt(0), @@ -1692,7 +1692,8 @@ export const SearchBlocksResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchBlocksResult", value: SearchBlocksResult.encode(message).finish() }; + }, + registerTypeUrl() { + Block.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SearchBlocksResult.typeUrl, SearchBlocksResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchBlocksResult.aminoType, SearchBlocksResult.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/base/query/v1beta1/pagination.ts b/libs/injectivejs/src/cosmos/base/query/v1beta1/pagination.ts index 35272ec2..c0f45d3f 100644 --- a/libs/injectivejs/src/cosmos/base/query/v1beta1/pagination.ts +++ b/libs/injectivejs/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * PageRequest is to be embedded in gRPC request messages for efficient * pagination. Ex: @@ -265,10 +264,9 @@ export const PageRequest = { typeUrl: "/cosmos.base.query.v1beta1.PageRequest", value: PageRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PageRequest.typeUrl, PageRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(PageRequest.aminoType, PageRequest.typeUrl); function createBasePageResponse(): PageResponse { return { nextKey: new Uint8Array(), @@ -355,7 +353,6 @@ export const PageResponse = { typeUrl: "/cosmos.base.query.v1beta1.PageResponse", value: PageResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PageResponse.typeUrl, PageResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(PageResponse.aminoType, PageResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/base/v1beta1/coin.ts b/libs/injectivejs/src/cosmos/base/v1beta1/coin.ts index 155e8009..1b5f5906 100644 --- a/libs/injectivejs/src/cosmos/base/v1beta1/coin.ts +++ b/libs/injectivejs/src/cosmos/base/v1beta1/coin.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * Coin defines a token with a denomination and an amount. * @@ -187,10 +186,9 @@ export const Coin = { typeUrl: "/cosmos.base.v1beta1.Coin", value: Coin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Coin.typeUrl, Coin); -GlobalDecoderRegistry.registerAminoProtoMapping(Coin.aminoType, Coin.typeUrl); function createBaseDecCoin(): DecCoin { return { denom: "", @@ -277,10 +275,9 @@ export const DecCoin = { typeUrl: "/cosmos.base.v1beta1.DecCoin", value: DecCoin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecCoin.typeUrl, DecCoin); -GlobalDecoderRegistry.registerAminoProtoMapping(DecCoin.aminoType, DecCoin.typeUrl); function createBaseIntProto(): IntProto { return { int: "" @@ -355,10 +352,9 @@ export const IntProto = { typeUrl: "/cosmos.base.v1beta1.IntProto", value: IntProto.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IntProto.typeUrl, IntProto); -GlobalDecoderRegistry.registerAminoProtoMapping(IntProto.aminoType, IntProto.typeUrl); function createBaseDecProto(): DecProto { return { dec: "" @@ -433,7 +429,6 @@ export const DecProto = { typeUrl: "/cosmos.base.v1beta1.DecProto", value: DecProto.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(DecProto.typeUrl, DecProto); -GlobalDecoderRegistry.registerAminoProtoMapping(DecProto.aminoType, DecProto.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/crypto/ed25519/keys.ts b/libs/injectivejs/src/cosmos/crypto/ed25519/keys.ts index 6f544d77..5b8f8515 100644 --- a/libs/injectivejs/src/cosmos/crypto/ed25519/keys.ts +++ b/libs/injectivejs/src/cosmos/crypto/ed25519/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. * It's needed for Any serialization and SDK compatibility. @@ -125,10 +124,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.ed25519.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -203,7 +201,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.ed25519.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/libs/injectivejs/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 1d46639b..e8a32786 100644 --- a/libs/injectivejs/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/libs/injectivejs/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers @@ -129,10 +128,9 @@ export const MultiSignature = { typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature", value: MultiSignature.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MultiSignature.typeUrl, MultiSignature); -GlobalDecoderRegistry.registerAminoProtoMapping(MultiSignature.aminoType, MultiSignature.typeUrl); function createBaseCompactBitArray(): CompactBitArray { return { extraBitsStored: 0, @@ -219,7 +217,6 @@ export const CompactBitArray = { typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray", value: CompactBitArray.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CompactBitArray.typeUrl, CompactBitArray); -GlobalDecoderRegistry.registerAminoProtoMapping(CompactBitArray.aminoType, CompactBitArray.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/crypto/secp256k1/keys.ts b/libs/injectivejs/src/cosmos/crypto/secp256k1/keys.ts index c0fdd0ac..423d256f 100644 --- a/libs/injectivejs/src/cosmos/crypto/secp256k1/keys.ts +++ b/libs/injectivejs/src/cosmos/crypto/secp256k1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey defines a secp256k1 public key * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte @@ -119,10 +118,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256k1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -197,7 +195,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256k1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/crypto/secp256r1/keys.ts b/libs/injectivejs/src/cosmos/crypto/secp256r1/keys.ts index 6b1edf68..15e905e3 100644 --- a/libs/injectivejs/src/cosmos/crypto/secp256r1/keys.ts +++ b/libs/injectivejs/src/cosmos/crypto/secp256r1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** PubKey defines a secp256r1 ECDSA public key. */ export interface PubKey { /** @@ -117,10 +116,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256r1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { secret: new Uint8Array() @@ -195,7 +193,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256r1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/distribution/v1beta1/distribution.ts b/libs/injectivejs/src/cosmos/distribution/v1beta1/distribution.ts index fdf747a5..a9de2203 100644 --- a/libs/injectivejs/src/cosmos/distribution/v1beta1/distribution.ts +++ b/libs/injectivejs/src/cosmos/distribution/v1beta1/distribution.ts @@ -458,10 +458,9 @@ export const Params = { typeUrl: "/cosmos.distribution.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards { return { cumulativeRewardRatio: [], @@ -550,10 +549,11 @@ export const ValidatorHistoricalRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", value: ValidatorHistoricalRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorHistoricalRewards.typeUrl, ValidatorHistoricalRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorHistoricalRewards.aminoType, ValidatorHistoricalRewards.typeUrl); function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards { return { rewards: [], @@ -642,10 +642,11 @@ export const ValidatorCurrentRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", value: ValidatorCurrentRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorCurrentRewards.typeUrl, ValidatorCurrentRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorCurrentRewards.aminoType, ValidatorCurrentRewards.typeUrl); function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission { return { commission: [] @@ -722,10 +723,11 @@ export const ValidatorAccumulatedCommission = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", value: ValidatorAccumulatedCommission.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorAccumulatedCommission.typeUrl, ValidatorAccumulatedCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorAccumulatedCommission.aminoType, ValidatorAccumulatedCommission.typeUrl); function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards { return { rewards: [] @@ -802,10 +804,11 @@ export const ValidatorOutstandingRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", value: ValidatorOutstandingRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorOutstandingRewards.typeUrl, ValidatorOutstandingRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorOutstandingRewards.aminoType, ValidatorOutstandingRewards.typeUrl); function createBaseValidatorSlashEvent(): ValidatorSlashEvent { return { validatorPeriod: BigInt(0), @@ -892,10 +895,9 @@ export const ValidatorSlashEvent = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", value: ValidatorSlashEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorSlashEvent.typeUrl, ValidatorSlashEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvent.aminoType, ValidatorSlashEvent.typeUrl); function createBaseValidatorSlashEvents(): ValidatorSlashEvents { return { validatorSlashEvents: [] @@ -972,10 +974,11 @@ export const ValidatorSlashEvents = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", value: ValidatorSlashEvents.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorSlashEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSlashEvents.typeUrl, ValidatorSlashEvents); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvents.aminoType, ValidatorSlashEvents.typeUrl); function createBaseFeePool(): FeePool { return { communityPool: [] @@ -1052,10 +1055,11 @@ export const FeePool = { typeUrl: "/cosmos.distribution.v1beta1.FeePool", value: FeePool.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeePool.typeUrl, FeePool); -GlobalDecoderRegistry.registerAminoProtoMapping(FeePool.aminoType, FeePool.typeUrl); function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal { return { title: "", @@ -1168,10 +1172,13 @@ export const CommunityPoolSpendProposal = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", value: CommunityPoolSpendProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); function createBaseDelegatorStartingInfo(): DelegatorStartingInfo { return { previousPeriod: BigInt(0), @@ -1270,10 +1277,9 @@ export const DelegatorStartingInfo = { typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", value: DelegatorStartingInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DelegatorStartingInfo.typeUrl, DelegatorStartingInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegatorStartingInfo.aminoType, DelegatorStartingInfo.typeUrl); function createBaseDelegationDelegatorReward(): DelegationDelegatorReward { return { validatorAddress: "", @@ -1362,10 +1368,11 @@ export const DelegationDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", value: DelegationDelegatorReward.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationDelegatorReward.typeUrl, DelegationDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationDelegatorReward.aminoType, DelegationDelegatorReward.typeUrl); function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit { return { title: "", @@ -1488,7 +1495,9 @@ export const CommunityPoolSpendProposalWithDeposit = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", value: CommunityPoolSpendProposalWithDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); } -}; -GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts index 0323b14d..28bf1510 100644 --- a/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createSetWithdrawAddress = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgSetWithdrawAddress.typeUrl, encoders: toEncoders(MsgSetWithdrawAddress), - converters: toConverters(MsgSetWithdrawAddress) + converters: toConverters(MsgSetWithdrawAddress), + deps: [MsgSetWithdrawAddress] }); export const createWithdrawDelegatorReward = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawDelegatorReward.typeUrl, encoders: toEncoders(MsgWithdrawDelegatorReward), - converters: toConverters(MsgWithdrawDelegatorReward) + converters: toConverters(MsgWithdrawDelegatorReward), + deps: [MsgWithdrawDelegatorReward] }); export const createWithdrawValidatorCommission = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawValidatorCommission.typeUrl, encoders: toEncoders(MsgWithdrawValidatorCommission), - converters: toConverters(MsgWithdrawValidatorCommission) + converters: toConverters(MsgWithdrawValidatorCommission), + deps: [MsgWithdrawValidatorCommission] }); export const createFundCommunityPool = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgFundCommunityPool.typeUrl, encoders: toEncoders(MsgFundCommunityPool), - converters: toConverters(MsgFundCommunityPool) + converters: toConverters(MsgFundCommunityPool), + deps: [MsgFundCommunityPool] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createCommunityPoolSpend = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCommunityPoolSpend.typeUrl, encoders: toEncoders(MsgCommunityPoolSpend), - converters: toConverters(MsgCommunityPoolSpend) + converters: toConverters(MsgCommunityPoolSpend), + deps: [MsgCommunityPoolSpend] }); export const createDepositValidatorRewardsPool = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDepositValidatorRewardsPool.typeUrl, encoders: toEncoders(MsgDepositValidatorRewardsPool), - converters: toConverters(MsgDepositValidatorRewardsPool) + converters: toConverters(MsgDepositValidatorRewardsPool), + deps: [MsgDepositValidatorRewardsPool] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.ts index 64517d0b..565af23f 100644 --- a/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/distribution/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino } from "./distribution"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). @@ -429,10 +428,9 @@ export const MsgSetWithdrawAddress = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddress.typeUrl, MsgSetWithdrawAddress); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddress.aminoType, MsgSetWithdrawAddress.typeUrl); function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse { return {}; } @@ -494,10 +492,9 @@ export const MsgSetWithdrawAddressResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", value: MsgSetWithdrawAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddressResponse.typeUrl, MsgSetWithdrawAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddressResponse.aminoType, MsgSetWithdrawAddressResponse.typeUrl); function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { return { delegatorAddress: "", @@ -584,10 +581,9 @@ export const MsgWithdrawDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorReward.typeUrl, MsgWithdrawDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorReward.aminoType, MsgWithdrawDelegatorReward.typeUrl); function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse { return { amount: [] @@ -664,10 +660,11 @@ export const MsgWithdrawDelegatorRewardResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", value: MsgWithdrawDelegatorRewardResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorRewardResponse.typeUrl, MsgWithdrawDelegatorRewardResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorRewardResponse.aminoType, MsgWithdrawDelegatorRewardResponse.typeUrl); function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { return { validatorAddress: "" @@ -742,10 +739,9 @@ export const MsgWithdrawValidatorCommission = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommission.typeUrl, MsgWithdrawValidatorCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommission.aminoType, MsgWithdrawValidatorCommission.typeUrl); function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse { return { amount: [] @@ -822,10 +818,11 @@ export const MsgWithdrawValidatorCommissionResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", value: MsgWithdrawValidatorCommissionResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommissionResponse.typeUrl, MsgWithdrawValidatorCommissionResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommissionResponse.aminoType, MsgWithdrawValidatorCommissionResponse.typeUrl); function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { return { amount: [], @@ -914,10 +911,11 @@ export const MsgFundCommunityPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgFundCommunityPool.typeUrl, MsgFundCommunityPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPool.aminoType, MsgFundCommunityPool.typeUrl); function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse { return {}; } @@ -979,10 +977,9 @@ export const MsgFundCommunityPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", value: MsgFundCommunityPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgFundCommunityPoolResponse.typeUrl, MsgFundCommunityPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPoolResponse.aminoType, MsgFundCommunityPoolResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1069,10 +1066,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1134,10 +1132,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCommunityPoolSpend(): MsgCommunityPoolSpend { return { authority: "", @@ -1238,10 +1235,11 @@ export const MsgCommunityPoolSpend = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", value: MsgCommunityPoolSpend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpend.typeUrl, MsgCommunityPoolSpend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpend.aminoType, MsgCommunityPoolSpend.typeUrl); function createBaseMsgCommunityPoolSpendResponse(): MsgCommunityPoolSpendResponse { return {}; } @@ -1303,10 +1301,9 @@ export const MsgCommunityPoolSpendResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", value: MsgCommunityPoolSpendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpendResponse.typeUrl, MsgCommunityPoolSpendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpendResponse.aminoType, MsgCommunityPoolSpendResponse.typeUrl); function createBaseMsgDepositValidatorRewardsPool(): MsgDepositValidatorRewardsPool { return { depositor: "", @@ -1407,10 +1404,11 @@ export const MsgDepositValidatorRewardsPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", value: MsgDepositValidatorRewardsPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPool.typeUrl, MsgDepositValidatorRewardsPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPool.aminoType, MsgDepositValidatorRewardsPool.typeUrl); function createBaseMsgDepositValidatorRewardsPoolResponse(): MsgDepositValidatorRewardsPoolResponse { return {}; } @@ -1472,7 +1470,6 @@ export const MsgDepositValidatorRewardsPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", value: MsgDepositValidatorRewardsPoolResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPoolResponse.typeUrl, MsgDepositValidatorRewardsPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPoolResponse.aminoType, MsgDepositValidatorRewardsPoolResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts index aa73f97f..344d1149 100644 --- a/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts @@ -5,17 +5,20 @@ export const createGrantAllowance = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgGrantAllowance.typeUrl, encoders: toEncoders(MsgGrantAllowance), - converters: toConverters(MsgGrantAllowance) + converters: toConverters(MsgGrantAllowance), + deps: [MsgGrantAllowance] }); export const createRevokeAllowance = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRevokeAllowance.typeUrl, encoders: toEncoders(MsgRevokeAllowance), - converters: toConverters(MsgRevokeAllowance) + converters: toConverters(MsgRevokeAllowance), + deps: [MsgRevokeAllowance] }); export const createPruneAllowances = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgPruneAllowances.typeUrl, encoders: toEncoders(MsgPruneAllowances), - converters: toConverters(MsgPruneAllowances) + converters: toConverters(MsgPruneAllowances), + deps: [MsgPruneAllowances] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.ts index 9e674784..e5fd3d32 100644 --- a/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance * of fees from the account of Granter. @@ -227,10 +227,9 @@ export const MsgGrantAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowance.typeUrl, MsgGrantAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowance.aminoType, MsgGrantAllowance.typeUrl); function createBaseMsgGrantAllowanceResponse(): MsgGrantAllowanceResponse { return {}; } @@ -292,10 +291,9 @@ export const MsgGrantAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", value: MsgGrantAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowanceResponse.typeUrl, MsgGrantAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowanceResponse.aminoType, MsgGrantAllowanceResponse.typeUrl); function createBaseMsgRevokeAllowance(): MsgRevokeAllowance { return { granter: "", @@ -382,10 +380,9 @@ export const MsgRevokeAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowance.typeUrl, MsgRevokeAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowance.aminoType, MsgRevokeAllowance.typeUrl); function createBaseMsgRevokeAllowanceResponse(): MsgRevokeAllowanceResponse { return {}; } @@ -447,10 +444,9 @@ export const MsgRevokeAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", value: MsgRevokeAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowanceResponse.typeUrl, MsgRevokeAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowanceResponse.aminoType, MsgRevokeAllowanceResponse.typeUrl); function createBaseMsgPruneAllowances(): MsgPruneAllowances { return { pruner: "" @@ -525,10 +521,9 @@ export const MsgPruneAllowances = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances", value: MsgPruneAllowances.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAllowances.typeUrl, MsgPruneAllowances); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowances.aminoType, MsgPruneAllowances.typeUrl); function createBaseMsgPruneAllowancesResponse(): MsgPruneAllowancesResponse { return {}; } @@ -590,7 +585,6 @@ export const MsgPruneAllowancesResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", value: MsgPruneAllowancesResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAllowancesResponse.typeUrl, MsgPruneAllowancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowancesResponse.aminoType, MsgPruneAllowancesResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1/gov.ts b/libs/injectivejs/src/cosmos/gov/v1/gov.ts index 434920f3..d762a109 100644 --- a/libs/injectivejs/src/cosmos/gov/v1/gov.ts +++ b/libs/injectivejs/src/cosmos/gov/v1/gov.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** VoteOption enumerates the valid vote options for a given governance proposal. */ export enum VoteOption { /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ @@ -719,10 +718,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -823,10 +821,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1073,10 +1072,12 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1187,10 +1188,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1303,10 +1303,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1395,10 +1396,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: undefined @@ -1473,10 +1475,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: "", @@ -1575,10 +1576,9 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1.TallyParams", value: TallyParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); function createBaseParams(): Params { return { minDeposit: [], @@ -1837,7 +1837,8 @@ export const Params = { typeUrl: "/cosmos.gov.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/gov/v1/tx.rpc.func.ts index 0fe35d3a..21c06ac1 100644 --- a/libs/injectivejs/src/cosmos/gov/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/gov/v1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createSubmitProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const createExecLegacyContent = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExecLegacyContent.typeUrl, encoders: toEncoders(MsgExecLegacyContent), - converters: toConverters(MsgExecLegacyContent) + converters: toConverters(MsgExecLegacyContent), + deps: [MsgExecLegacyContent] }); export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVote.typeUrl, encoders: toEncoders(MsgVote), - converters: toConverters(MsgVote) + converters: toConverters(MsgVote), + deps: [MsgVote] }); export const createVoteWeighted = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createCancelProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelProposal.typeUrl, encoders: toEncoders(MsgCancelProposal), - converters: toConverters(MsgCancelProposal) + converters: toConverters(MsgCancelProposal), + deps: [MsgCancelProposal] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1/tx.ts b/libs/injectivejs/src/cosmos/gov/v1/tx.ts index d01c6807..16328bd2 100644 --- a/libs/injectivejs/src/cosmos/gov/v1/tx.ts +++ b/libs/injectivejs/src/cosmos/gov/v1/tx.ts @@ -545,10 +545,11 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -623,10 +624,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgExecLegacyContent(): MsgExecLegacyContent { return { content: undefined, @@ -713,10 +713,63 @@ export const MsgExecLegacyContent = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", value: MsgExecLegacyContent.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + StoreCodeProposal.registerTypeUrl(); + InstantiateContractProposal.registerTypeUrl(); + InstantiateContract2Proposal.registerTypeUrl(); + MigrateContractProposal.registerTypeUrl(); + SudoContractProposal.registerTypeUrl(); + ExecuteContractProposal.registerTypeUrl(); + UpdateAdminProposal.registerTypeUrl(); + ClearAdminProposal.registerTypeUrl(); + PinCodesProposal.registerTypeUrl(); + UnpinCodesProposal.registerTypeUrl(); + UpdateInstantiateConfigProposal.registerTypeUrl(); + StoreAndInstantiateContractProposal.registerTypeUrl(); + SpotMarketParamUpdateProposal.registerTypeUrl(); + BatchExchangeModificationProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + TradingRewardCampaignLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + TradingRewardPendingPointsUpdateProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + BatchCommunityPoolSpendProposal.registerTypeUrl(); + AtomicMarketOrderFeeMultiplierScheduleProposal.registerTypeUrl(); + SetConfigProposal.registerTypeUrl(); + SetBatchConfigProposal.registerTypeUrl(); + GrantBandOraclePrivilegeProposal.registerTypeUrl(); + RevokeBandOraclePrivilegeProposal.registerTypeUrl(); + GrantPriceFeederPrivilegeProposal.registerTypeUrl(); + GrantProviderPrivilegeProposal.registerTypeUrl(); + RevokeProviderPrivilegeProposal.registerTypeUrl(); + RevokePriceFeederPrivilegeProposal.registerTypeUrl(); + AuthorizeBandOracleRequestProposal.registerTypeUrl(); + UpdateBandOracleRequestProposal.registerTypeUrl(); + EnableBandIBCProposal.registerTypeUrl(); + GrantStorkPublisherPrivilegeProposal.registerTypeUrl(); + RevokeStorkPublisherPrivilegeProposal.registerTypeUrl(); + BlacklistEthereumAddressesProposal.registerTypeUrl(); + RevokeEthereumBlacklistProposal.registerTypeUrl(); + ContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractDeregistrationProposal.registerTypeUrl(); + ContractRegistrationRequest.registerTypeUrl(); + BatchStoreCodeProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecLegacyContent.typeUrl, MsgExecLegacyContent); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContent.aminoType, MsgExecLegacyContent.typeUrl); function createBaseMsgExecLegacyContentResponse(): MsgExecLegacyContentResponse { return {}; } @@ -778,10 +831,9 @@ export const MsgExecLegacyContentResponse = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", value: MsgExecLegacyContentResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecLegacyContentResponse.typeUrl, MsgExecLegacyContentResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContentResponse.aminoType, MsgExecLegacyContentResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -892,10 +944,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -957,10 +1008,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -1073,10 +1123,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -1138,10 +1189,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -1242,10 +1292,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -1307,10 +1358,9 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1397,10 +1447,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.gov.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1462,10 +1513,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.gov.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCancelProposal(): MsgCancelProposal { return { proposalId: BigInt(0), @@ -1552,10 +1602,9 @@ export const MsgCancelProposal = { typeUrl: "/cosmos.gov.v1.MsgCancelProposal", value: MsgCancelProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelProposal.typeUrl, MsgCancelProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposal.aminoType, MsgCancelProposal.typeUrl); function createBaseMsgCancelProposalResponse(): MsgCancelProposalResponse { return { proposalId: BigInt(0), @@ -1654,7 +1703,6 @@ export const MsgCancelProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgCancelProposalResponse", value: MsgCancelProposalResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCancelProposalResponse.typeUrl, MsgCancelProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposalResponse.aminoType, MsgCancelProposalResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1beta1/gov.ts b/libs/injectivejs/src/cosmos/gov/v1beta1/gov.ts index cf660d2d..cd304181 100644 --- a/libs/injectivejs/src/cosmos/gov/v1beta1/gov.ts +++ b/libs/injectivejs/src/cosmos/gov/v1beta1/gov.ts @@ -550,10 +550,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseTextProposal(): TextProposal { return { title: "", @@ -640,10 +639,12 @@ export const TextProposal = { typeUrl: "/cosmos.gov.v1beta1.TextProposal", value: TextProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); } }; -GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -744,10 +745,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1beta1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { proposalId: BigInt(0), @@ -920,10 +922,65 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1beta1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TextProposal.registerTypeUrl(); + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + StoreCodeProposal.registerTypeUrl(); + InstantiateContractProposal.registerTypeUrl(); + InstantiateContract2Proposal.registerTypeUrl(); + MigrateContractProposal.registerTypeUrl(); + SudoContractProposal.registerTypeUrl(); + ExecuteContractProposal.registerTypeUrl(); + UpdateAdminProposal.registerTypeUrl(); + ClearAdminProposal.registerTypeUrl(); + PinCodesProposal.registerTypeUrl(); + UnpinCodesProposal.registerTypeUrl(); + UpdateInstantiateConfigProposal.registerTypeUrl(); + StoreAndInstantiateContractProposal.registerTypeUrl(); + SpotMarketParamUpdateProposal.registerTypeUrl(); + BatchExchangeModificationProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + TradingRewardCampaignLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + TradingRewardPendingPointsUpdateProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + BatchCommunityPoolSpendProposal.registerTypeUrl(); + AtomicMarketOrderFeeMultiplierScheduleProposal.registerTypeUrl(); + SetConfigProposal.registerTypeUrl(); + SetBatchConfigProposal.registerTypeUrl(); + GrantBandOraclePrivilegeProposal.registerTypeUrl(); + RevokeBandOraclePrivilegeProposal.registerTypeUrl(); + GrantPriceFeederPrivilegeProposal.registerTypeUrl(); + GrantProviderPrivilegeProposal.registerTypeUrl(); + RevokeProviderPrivilegeProposal.registerTypeUrl(); + RevokePriceFeederPrivilegeProposal.registerTypeUrl(); + AuthorizeBandOracleRequestProposal.registerTypeUrl(); + UpdateBandOracleRequestProposal.registerTypeUrl(); + EnableBandIBCProposal.registerTypeUrl(); + GrantStorkPublisherPrivilegeProposal.registerTypeUrl(); + RevokeStorkPublisherPrivilegeProposal.registerTypeUrl(); + BlacklistEthereumAddressesProposal.registerTypeUrl(); + RevokeEthereumBlacklistProposal.registerTypeUrl(); + ContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractDeregistrationProposal.registerTypeUrl(); + ContractRegistrationRequest.registerTypeUrl(); + BatchStoreCodeProposal.registerTypeUrl(); + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yes: "", @@ -1034,10 +1091,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1beta1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1150,10 +1206,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1beta1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1242,10 +1299,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1beta1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: Duration.fromPartial({}) @@ -1320,10 +1378,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1beta1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: new Uint8Array(), @@ -1422,7 +1479,6 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1beta1.TallyParams", value: TallyParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/cosmos/gov/v1beta1/query.rpc.func.ts index eadeddd8..93896ba8 100644 --- a/libs/injectivejs/src/cosmos/gov/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/gov/v1beta1/query.rpc.func.ts @@ -5,54 +5,62 @@ export const createGetProposal = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryProposalsRequest.encode, decode: QueryProposalsResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Proposals", - clientResolver + clientResolver, + deps: [QueryProposalsRequest, QueryProposalsResponse] }); export const createGetVote = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryVoteRequest.encode, decode: QueryVoteResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Vote", - clientResolver + clientResolver, + deps: [QueryVoteRequest, QueryVoteResponse] }); export const createGetVotes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryVotesRequest.encode, decode: QueryVotesResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Votes", - clientResolver + clientResolver, + deps: [QueryVotesRequest, QueryVotesResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetDeposit = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDepositRequest.encode, decode: QueryDepositResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Deposit", - clientResolver + clientResolver, + deps: [QueryDepositRequest, QueryDepositResponse] }); export const createGetDeposits = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDepositsRequest.encode, decode: QueryDepositsResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Deposits", - clientResolver + clientResolver, + deps: [QueryDepositsRequest, QueryDepositsResponse] }); export const createGetTallyResult = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTallyResultRequest.encode, decode: QueryTallyResultResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "TallyResult", - clientResolver + clientResolver, + deps: [QueryTallyResultRequest, QueryTallyResultResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1beta1/query.ts b/libs/injectivejs/src/cosmos/gov/v1beta1/query.ts index 15053043..d4419837 100644 --- a/libs/injectivejs/src/cosmos/gov/v1beta1/query.ts +++ b/libs/injectivejs/src/cosmos/gov/v1beta1/query.ts @@ -2,7 +2,6 @@ import { ProposalStatus, Proposal, ProposalAmino, Vote, VoteAmino, VotingParams, import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ export interface QueryProposalRequest { /** proposal_id defines the unique id of the proposal. */ @@ -423,10 +422,9 @@ export const QueryProposalRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", value: QueryProposalRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryProposalRequest.typeUrl, QueryProposalRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalRequest.aminoType, QueryProposalRequest.typeUrl); function createBaseQueryProposalResponse(): QueryProposalResponse { return { proposal: Proposal.fromPartial({}) @@ -501,10 +499,11 @@ export const QueryProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", value: QueryProposalResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalResponse.typeUrl, QueryProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalResponse.aminoType, QueryProposalResponse.typeUrl); function createBaseQueryProposalsRequest(): QueryProposalsRequest { return { proposalStatus: 0, @@ -615,10 +614,11 @@ export const QueryProposalsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", value: QueryProposalsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsRequest.typeUrl, QueryProposalsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsRequest.aminoType, QueryProposalsRequest.typeUrl); function createBaseQueryProposalsResponse(): QueryProposalsResponse { return { proposals: [], @@ -707,10 +707,12 @@ export const QueryProposalsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", value: QueryProposalsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsResponse.typeUrl, QueryProposalsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsResponse.aminoType, QueryProposalsResponse.typeUrl); function createBaseQueryVoteRequest(): QueryVoteRequest { return { proposalId: BigInt(0), @@ -797,10 +799,9 @@ export const QueryVoteRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", value: QueryVoteRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryVoteRequest.typeUrl, QueryVoteRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteRequest.aminoType, QueryVoteRequest.typeUrl); function createBaseQueryVoteResponse(): QueryVoteResponse { return { vote: Vote.fromPartial({}) @@ -875,10 +876,11 @@ export const QueryVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", value: QueryVoteResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVoteResponse.typeUrl, QueryVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteResponse.aminoType, QueryVoteResponse.typeUrl); function createBaseQueryVotesRequest(): QueryVotesRequest { return { proposalId: BigInt(0), @@ -965,10 +967,11 @@ export const QueryVotesRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", value: QueryVotesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesRequest.typeUrl, QueryVotesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesRequest.aminoType, QueryVotesRequest.typeUrl); function createBaseQueryVotesResponse(): QueryVotesResponse { return { votes: [], @@ -1057,10 +1060,12 @@ export const QueryVotesResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", value: QueryVotesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesResponse.typeUrl, QueryVotesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesResponse.aminoType, QueryVotesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return { paramsType: "" @@ -1135,10 +1140,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { votingParams: VotingParams.fromPartial({}), @@ -1237,10 +1241,13 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + VotingParams.registerTypeUrl(); + DepositParams.registerTypeUrl(); + TallyParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDepositRequest(): QueryDepositRequest { return { proposalId: BigInt(0), @@ -1327,10 +1334,9 @@ export const QueryDepositRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", value: QueryDepositRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDepositRequest.typeUrl, QueryDepositRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositRequest.aminoType, QueryDepositRequest.typeUrl); function createBaseQueryDepositResponse(): QueryDepositResponse { return { deposit: Deposit.fromPartial({}) @@ -1405,10 +1411,11 @@ export const QueryDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", value: QueryDepositResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositResponse.typeUrl, QueryDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositResponse.aminoType, QueryDepositResponse.typeUrl); function createBaseQueryDepositsRequest(): QueryDepositsRequest { return { proposalId: BigInt(0), @@ -1495,10 +1502,11 @@ export const QueryDepositsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", value: QueryDepositsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsRequest.typeUrl, QueryDepositsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsRequest.aminoType, QueryDepositsRequest.typeUrl); function createBaseQueryDepositsResponse(): QueryDepositsResponse { return { deposits: [], @@ -1587,10 +1595,12 @@ export const QueryDepositsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", value: QueryDepositsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsResponse.typeUrl, QueryDepositsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsResponse.aminoType, QueryDepositsResponse.typeUrl); function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { return { proposalId: BigInt(0) @@ -1665,10 +1675,9 @@ export const QueryTallyResultRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", value: QueryTallyResultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTallyResultRequest.typeUrl, QueryTallyResultRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultRequest.aminoType, QueryTallyResultRequest.typeUrl); function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { return { tally: TallyResult.fromPartial({}) @@ -1743,7 +1752,8 @@ export const QueryTallyResultResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", value: QueryTallyResultResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryTallyResultResponse.typeUrl, QueryTallyResultResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultResponse.aminoType, QueryTallyResultResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/gov/v1beta1/tx.rpc.func.ts index 222ecb6c..aecdfcb7 100644 --- a/libs/injectivejs/src/cosmos/gov/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/gov/v1beta1/tx.rpc.func.ts @@ -5,23 +5,27 @@ export const createSubmitProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVote.typeUrl, encoders: toEncoders(MsgVote), - converters: toConverters(MsgVote) + converters: toConverters(MsgVote), + deps: [MsgVote] }); export const createVoteWeighted = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/gov/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/gov/v1beta1/tx.ts index 2235f820..9e1b9148 100644 --- a/libs/injectivejs/src/cosmos/gov/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/gov/v1beta1/tx.ts @@ -10,8 +10,8 @@ import { GrantBandOraclePrivilegeProposal, GrantBandOraclePrivilegeProposalProto import { BlacklistEthereumAddressesProposal, BlacklistEthereumAddressesProposalProtoMsg, RevokeEthereumBlacklistProposal, RevokeEthereumBlacklistProposalProtoMsg } from "../../../injective/peggy/v1/proposal"; import { ContractRegistrationRequestProposal, ContractRegistrationRequestProposalProtoMsg, BatchContractRegistrationRequestProposal, BatchContractRegistrationRequestProposalProtoMsg, BatchContractDeregistrationProposal, BatchContractDeregistrationProposalProtoMsg, ContractRegistrationRequest, ContractRegistrationRequestProtoMsg, BatchStoreCodeProposal, BatchStoreCodeProposalProtoMsg } from "../../../injective/wasmx/v1/proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary * proposal Content. @@ -295,10 +295,64 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + StoreCodeProposal.registerTypeUrl(); + InstantiateContractProposal.registerTypeUrl(); + InstantiateContract2Proposal.registerTypeUrl(); + MigrateContractProposal.registerTypeUrl(); + SudoContractProposal.registerTypeUrl(); + ExecuteContractProposal.registerTypeUrl(); + UpdateAdminProposal.registerTypeUrl(); + ClearAdminProposal.registerTypeUrl(); + PinCodesProposal.registerTypeUrl(); + UnpinCodesProposal.registerTypeUrl(); + UpdateInstantiateConfigProposal.registerTypeUrl(); + StoreAndInstantiateContractProposal.registerTypeUrl(); + SpotMarketParamUpdateProposal.registerTypeUrl(); + BatchExchangeModificationProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + TradingRewardCampaignLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + TradingRewardPendingPointsUpdateProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + BatchCommunityPoolSpendProposal.registerTypeUrl(); + AtomicMarketOrderFeeMultiplierScheduleProposal.registerTypeUrl(); + SetConfigProposal.registerTypeUrl(); + SetBatchConfigProposal.registerTypeUrl(); + GrantBandOraclePrivilegeProposal.registerTypeUrl(); + RevokeBandOraclePrivilegeProposal.registerTypeUrl(); + GrantPriceFeederPrivilegeProposal.registerTypeUrl(); + GrantProviderPrivilegeProposal.registerTypeUrl(); + RevokeProviderPrivilegeProposal.registerTypeUrl(); + RevokePriceFeederPrivilegeProposal.registerTypeUrl(); + AuthorizeBandOracleRequestProposal.registerTypeUrl(); + UpdateBandOracleRequestProposal.registerTypeUrl(); + EnableBandIBCProposal.registerTypeUrl(); + GrantStorkPublisherPrivilegeProposal.registerTypeUrl(); + RevokeStorkPublisherPrivilegeProposal.registerTypeUrl(); + BlacklistEthereumAddressesProposal.registerTypeUrl(); + RevokeEthereumBlacklistProposal.registerTypeUrl(); + ContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractRegistrationRequestProposal.registerTypeUrl(); + BatchContractDeregistrationProposal.registerTypeUrl(); + ContractRegistrationRequest.registerTypeUrl(); + BatchStoreCodeProposal.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -373,10 +427,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -475,10 +528,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -540,10 +592,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -644,10 +695,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -709,10 +761,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -813,10 +864,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -878,7 +930,6 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/group/v1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/group/v1/tx.rpc.func.ts index 28648bdd..b04f9190 100644 --- a/libs/injectivejs/src/cosmos/group/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/group/v1/tx.rpc.func.ts @@ -5,83 +5,97 @@ export const createCreateGroup = (clientResolver?: SigningClientResolver) => bui clientResolver, typeUrl: MsgCreateGroup.typeUrl, encoders: toEncoders(MsgCreateGroup), - converters: toConverters(MsgCreateGroup) + converters: toConverters(MsgCreateGroup), + deps: [MsgCreateGroup] }); export const createUpdateGroupMembers = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupMembers.typeUrl, encoders: toEncoders(MsgUpdateGroupMembers), - converters: toConverters(MsgUpdateGroupMembers) + converters: toConverters(MsgUpdateGroupMembers), + deps: [MsgUpdateGroupMembers] }); export const createUpdateGroupAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupAdmin), - converters: toConverters(MsgUpdateGroupAdmin) + converters: toConverters(MsgUpdateGroupAdmin), + deps: [MsgUpdateGroupAdmin] }); export const createUpdateGroupMetadata = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupMetadata), - converters: toConverters(MsgUpdateGroupMetadata) + converters: toConverters(MsgUpdateGroupMetadata), + deps: [MsgUpdateGroupMetadata] }); export const createCreateGroupPolicy = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateGroupPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupPolicy), - converters: toConverters(MsgCreateGroupPolicy) + converters: toConverters(MsgCreateGroupPolicy), + deps: [MsgCreateGroupPolicy] }); export const createCreateGroupWithPolicy = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateGroupWithPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupWithPolicy), - converters: toConverters(MsgCreateGroupWithPolicy) + converters: toConverters(MsgCreateGroupWithPolicy), + deps: [MsgCreateGroupWithPolicy] }); export const createUpdateGroupPolicyAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupPolicyAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyAdmin), - converters: toConverters(MsgUpdateGroupPolicyAdmin) + converters: toConverters(MsgUpdateGroupPolicyAdmin), + deps: [MsgUpdateGroupPolicyAdmin] }); export const createUpdateGroupPolicyDecisionPolicy = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupPolicyDecisionPolicy.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyDecisionPolicy), - converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy) + converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy), + deps: [MsgUpdateGroupPolicyDecisionPolicy] }); export const createUpdateGroupPolicyMetadata = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupPolicyMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyMetadata), - converters: toConverters(MsgUpdateGroupPolicyMetadata) + converters: toConverters(MsgUpdateGroupPolicyMetadata), + deps: [MsgUpdateGroupPolicyMetadata] }); export const createSubmitProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const createWithdrawProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawProposal.typeUrl, encoders: toEncoders(MsgWithdrawProposal), - converters: toConverters(MsgWithdrawProposal) + converters: toConverters(MsgWithdrawProposal), + deps: [MsgWithdrawProposal] }); export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVote.typeUrl, encoders: toEncoders(MsgVote), - converters: toConverters(MsgVote) + converters: toConverters(MsgVote), + deps: [MsgVote] }); export const createExec = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExec.typeUrl, encoders: toEncoders(MsgExec), - converters: toConverters(MsgExec) + converters: toConverters(MsgExec), + deps: [MsgExec] }); export const createLeaveGroup = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgLeaveGroup.typeUrl, encoders: toEncoders(MsgLeaveGroup), - converters: toConverters(MsgLeaveGroup) + converters: toConverters(MsgLeaveGroup), + deps: [MsgLeaveGroup] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/group/v1/tx.ts b/libs/injectivejs/src/cosmos/group/v1/tx.ts index 492b0084..a2e3714f 100644 --- a/libs/injectivejs/src/cosmos/group/v1/tx.ts +++ b/libs/injectivejs/src/cosmos/group/v1/tx.ts @@ -796,10 +796,11 @@ export const MsgCreateGroup = { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroup.typeUrl, MsgCreateGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroup.aminoType, MsgCreateGroup.typeUrl); function createBaseMsgCreateGroupResponse(): MsgCreateGroupResponse { return { groupId: BigInt(0) @@ -874,10 +875,9 @@ export const MsgCreateGroupResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", value: MsgCreateGroupResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupResponse.typeUrl, MsgCreateGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupResponse.aminoType, MsgCreateGroupResponse.typeUrl); function createBaseMsgUpdateGroupMembers(): MsgUpdateGroupMembers { return { admin: "", @@ -978,10 +978,11 @@ export const MsgUpdateGroupMembers = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembers.typeUrl, MsgUpdateGroupMembers); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembers.aminoType, MsgUpdateGroupMembers.typeUrl); function createBaseMsgUpdateGroupMembersResponse(): MsgUpdateGroupMembersResponse { return {}; } @@ -1043,10 +1044,9 @@ export const MsgUpdateGroupMembersResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", value: MsgUpdateGroupMembersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembersResponse.typeUrl, MsgUpdateGroupMembersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembersResponse.aminoType, MsgUpdateGroupMembersResponse.typeUrl); function createBaseMsgUpdateGroupAdmin(): MsgUpdateGroupAdmin { return { admin: "", @@ -1145,10 +1145,9 @@ export const MsgUpdateGroupAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdmin.typeUrl, MsgUpdateGroupAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdmin.aminoType, MsgUpdateGroupAdmin.typeUrl); function createBaseMsgUpdateGroupAdminResponse(): MsgUpdateGroupAdminResponse { return {}; } @@ -1210,10 +1209,9 @@ export const MsgUpdateGroupAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", value: MsgUpdateGroupAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdminResponse.typeUrl, MsgUpdateGroupAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdminResponse.aminoType, MsgUpdateGroupAdminResponse.typeUrl); function createBaseMsgUpdateGroupMetadata(): MsgUpdateGroupMetadata { return { admin: "", @@ -1312,10 +1310,9 @@ export const MsgUpdateGroupMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadata.typeUrl, MsgUpdateGroupMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadata.aminoType, MsgUpdateGroupMetadata.typeUrl); function createBaseMsgUpdateGroupMetadataResponse(): MsgUpdateGroupMetadataResponse { return {}; } @@ -1377,10 +1374,9 @@ export const MsgUpdateGroupMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", value: MsgUpdateGroupMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadataResponse.typeUrl, MsgUpdateGroupMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadataResponse.aminoType, MsgUpdateGroupMetadataResponse.typeUrl); function createBaseMsgCreateGroupPolicy(): MsgCreateGroupPolicy { return { admin: "", @@ -1491,10 +1487,12 @@ export const MsgCreateGroupPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicy.typeUrl, MsgCreateGroupPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicy.aminoType, MsgCreateGroupPolicy.typeUrl); function createBaseMsgCreateGroupPolicyResponse(): MsgCreateGroupPolicyResponse { return { address: "" @@ -1569,10 +1567,9 @@ export const MsgCreateGroupPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", value: MsgCreateGroupPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicyResponse.typeUrl, MsgCreateGroupPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicyResponse.aminoType, MsgCreateGroupPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyAdmin(): MsgUpdateGroupPolicyAdmin { return { admin: "", @@ -1671,10 +1668,9 @@ export const MsgUpdateGroupPolicyAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdmin.typeUrl, MsgUpdateGroupPolicyAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdmin.aminoType, MsgUpdateGroupPolicyAdmin.typeUrl); function createBaseMsgUpdateGroupPolicyAdminResponse(): MsgUpdateGroupPolicyAdminResponse { return {}; } @@ -1736,10 +1732,9 @@ export const MsgUpdateGroupPolicyAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", value: MsgUpdateGroupPolicyAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdminResponse.typeUrl, MsgUpdateGroupPolicyAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdminResponse.aminoType, MsgUpdateGroupPolicyAdminResponse.typeUrl); function createBaseMsgCreateGroupWithPolicy(): MsgCreateGroupWithPolicy { return { admin: "", @@ -1876,10 +1871,12 @@ export const MsgCreateGroupWithPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicy.typeUrl, MsgCreateGroupWithPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicy.aminoType, MsgCreateGroupWithPolicy.typeUrl); function createBaseMsgCreateGroupWithPolicyResponse(): MsgCreateGroupWithPolicyResponse { return { groupId: BigInt(0), @@ -1966,10 +1963,9 @@ export const MsgCreateGroupWithPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", value: MsgCreateGroupWithPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicyResponse.typeUrl, MsgCreateGroupWithPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicyResponse.aminoType, MsgCreateGroupWithPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicy(): MsgUpdateGroupPolicyDecisionPolicy { return { admin: "", @@ -2068,10 +2064,12 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicy.typeUrl, MsgUpdateGroupPolicyDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicy.aminoType, MsgUpdateGroupPolicyDecisionPolicy.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(): MsgUpdateGroupPolicyDecisionPolicyResponse { return {}; } @@ -2133,10 +2131,9 @@ export const MsgUpdateGroupPolicyDecisionPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", value: MsgUpdateGroupPolicyDecisionPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl, MsgUpdateGroupPolicyDecisionPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicyResponse.aminoType, MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyMetadata(): MsgUpdateGroupPolicyMetadata { return { admin: "", @@ -2235,10 +2232,9 @@ export const MsgUpdateGroupPolicyMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadata.typeUrl, MsgUpdateGroupPolicyMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadata.aminoType, MsgUpdateGroupPolicyMetadata.typeUrl); function createBaseMsgUpdateGroupPolicyMetadataResponse(): MsgUpdateGroupPolicyMetadataResponse { return {}; } @@ -2300,10 +2296,9 @@ export const MsgUpdateGroupPolicyMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", value: MsgUpdateGroupPolicyMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadataResponse.typeUrl, MsgUpdateGroupPolicyMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadataResponse.aminoType, MsgUpdateGroupPolicyMetadataResponse.typeUrl); function createBaseMsgSubmitProposal(): MsgSubmitProposal { return { groupPolicyAddress: "", @@ -2454,10 +2449,9 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -2532,10 +2526,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgWithdrawProposal(): MsgWithdrawProposal { return { proposalId: BigInt(0), @@ -2622,10 +2615,9 @@ export const MsgWithdrawProposal = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposal.typeUrl, MsgWithdrawProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposal.aminoType, MsgWithdrawProposal.typeUrl); function createBaseMsgWithdrawProposalResponse(): MsgWithdrawProposalResponse { return {}; } @@ -2687,10 +2679,9 @@ export const MsgWithdrawProposalResponse = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", value: MsgWithdrawProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposalResponse.typeUrl, MsgWithdrawProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposalResponse.aminoType, MsgWithdrawProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -2813,10 +2804,9 @@ export const MsgVote = { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -2878,10 +2868,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.group.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { proposalId: BigInt(0), @@ -2968,10 +2957,9 @@ export const MsgExec = { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { result: 0 @@ -3046,10 +3034,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.group.v1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgLeaveGroup(): MsgLeaveGroup { return { address: "", @@ -3136,10 +3123,9 @@ export const MsgLeaveGroup = { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgLeaveGroup.typeUrl, MsgLeaveGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroup.aminoType, MsgLeaveGroup.typeUrl); function createBaseMsgLeaveGroupResponse(): MsgLeaveGroupResponse { return {}; } @@ -3201,7 +3187,6 @@ export const MsgLeaveGroupResponse = { typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", value: MsgLeaveGroupResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgLeaveGroupResponse.typeUrl, MsgLeaveGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroupResponse.aminoType, MsgLeaveGroupResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/group/v1/types.ts b/libs/injectivejs/src/cosmos/group/v1/types.ts index f8e9c860..802939a6 100644 --- a/libs/injectivejs/src/cosmos/group/v1/types.ts +++ b/libs/injectivejs/src/cosmos/group/v1/types.ts @@ -847,10 +847,9 @@ export const Member = { typeUrl: "/cosmos.group.v1.Member", value: Member.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Member.typeUrl, Member); -GlobalDecoderRegistry.registerAminoProtoMapping(Member.aminoType, Member.typeUrl); function createBaseMemberRequest(): MemberRequest { return { address: "", @@ -949,10 +948,9 @@ export const MemberRequest = { typeUrl: "/cosmos.group.v1.MemberRequest", value: MemberRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MemberRequest.typeUrl, MemberRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(MemberRequest.aminoType, MemberRequest.typeUrl); function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy { return { threshold: "", @@ -1039,10 +1037,13 @@ export const ThresholdDecisionPolicy = { typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", value: ThresholdDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy { return { percentage: "", @@ -1129,10 +1130,13 @@ export const PercentageDecisionPolicy = { typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", value: PercentageDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); function createBaseDecisionPolicyWindows(): DecisionPolicyWindows { return { votingPeriod: Duration.fromPartial({}), @@ -1219,10 +1223,9 @@ export const DecisionPolicyWindows = { typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", value: DecisionPolicyWindows.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecisionPolicyWindows.typeUrl, DecisionPolicyWindows); -GlobalDecoderRegistry.registerAminoProtoMapping(DecisionPolicyWindows.aminoType, DecisionPolicyWindows.typeUrl); function createBaseGroupInfo(): GroupInfo { return { id: BigInt(0), @@ -1357,10 +1360,9 @@ export const GroupInfo = { typeUrl: "/cosmos.group.v1.GroupInfo", value: GroupInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GroupInfo.typeUrl, GroupInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupInfo.aminoType, GroupInfo.typeUrl); function createBaseGroupMember(): GroupMember { return { groupId: BigInt(0), @@ -1447,10 +1449,11 @@ export const GroupMember = { typeUrl: "/cosmos.group.v1.GroupMember", value: GroupMember.encode(message).finish() }; + }, + registerTypeUrl() { + Member.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupMember.typeUrl, GroupMember); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupMember.aminoType, GroupMember.typeUrl); function createBaseGroupPolicyInfo(): GroupPolicyInfo { return { address: "", @@ -1597,10 +1600,12 @@ export const GroupPolicyInfo = { typeUrl: "/cosmos.group.v1.GroupPolicyInfo", value: GroupPolicyInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupPolicyInfo.typeUrl, GroupPolicyInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupPolicyInfo.aminoType, GroupPolicyInfo.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1835,10 +1840,9 @@ export const Proposal = { typeUrl: "/cosmos.group.v1.Proposal", value: Proposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1949,10 +1953,9 @@ export const TallyResult = { typeUrl: "/cosmos.group.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -2075,7 +2078,6 @@ export const Vote = { typeUrl: "/cosmos.group.v1.Vote", value: Vote.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/ics23/v1/proofs.ts b/libs/injectivejs/src/cosmos/ics23/v1/proofs.ts index 27759bde..b02054e7 100644 --- a/libs/injectivejs/src/cosmos/ics23/v1/proofs.ts +++ b/libs/injectivejs/src/cosmos/ics23/v1/proofs.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum HashOp { /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ NO_HASH = 0, @@ -754,10 +753,12 @@ export const ExistenceProof = { typeUrl: "/cosmos.ics23.v1.ExistenceProof", value: ExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExistenceProof.typeUrl, ExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(ExistenceProof.aminoType, ExistenceProof.typeUrl); function createBaseNonExistenceProof(): NonExistenceProof { return { key: new Uint8Array(), @@ -856,10 +857,11 @@ export const NonExistenceProof = { typeUrl: "/cosmos.ics23.v1.NonExistenceProof", value: NonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(NonExistenceProof.typeUrl, NonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(NonExistenceProof.aminoType, NonExistenceProof.typeUrl); function createBaseCommitmentProof(): CommitmentProof { return { exist: undefined, @@ -970,10 +972,14 @@ export const CommitmentProof = { typeUrl: "/cosmos.ics23.v1.CommitmentProof", value: CommitmentProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); + BatchProof.registerTypeUrl(); + CompressedBatchProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitmentProof.typeUrl, CommitmentProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CommitmentProof.aminoType, CommitmentProof.typeUrl); function createBaseLeafOp(): LeafOp { return { hash: 0, @@ -1096,10 +1102,9 @@ export const LeafOp = { typeUrl: "/cosmos.ics23.v1.LeafOp", value: LeafOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LeafOp.typeUrl, LeafOp); -GlobalDecoderRegistry.registerAminoProtoMapping(LeafOp.aminoType, LeafOp.typeUrl); function createBaseInnerOp(): InnerOp { return { hash: 0, @@ -1198,10 +1203,9 @@ export const InnerOp = { typeUrl: "/cosmos.ics23.v1.InnerOp", value: InnerOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerOp.typeUrl, InnerOp); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerOp.aminoType, InnerOp.typeUrl); function createBaseProofSpec(): ProofSpec { return { leafSpec: undefined, @@ -1324,10 +1328,12 @@ export const ProofSpec = { typeUrl: "/cosmos.ics23.v1.ProofSpec", value: ProofSpec.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerSpec.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProofSpec.typeUrl, ProofSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(ProofSpec.aminoType, ProofSpec.typeUrl); function createBaseInnerSpec(): InnerSpec { return { childOrder: [], @@ -1473,10 +1479,9 @@ export const InnerSpec = { typeUrl: "/cosmos.ics23.v1.InnerSpec", value: InnerSpec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerSpec.typeUrl, InnerSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerSpec.aminoType, InnerSpec.typeUrl); function createBaseBatchProof(): BatchProof { return { entries: [] @@ -1553,10 +1558,11 @@ export const BatchProof = { typeUrl: "/cosmos.ics23.v1.BatchProof", value: BatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + BatchEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchProof.typeUrl, BatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchProof.aminoType, BatchProof.typeUrl); function createBaseBatchEntry(): BatchEntry { return { exist: undefined, @@ -1643,10 +1649,12 @@ export const BatchEntry = { typeUrl: "/cosmos.ics23.v1.BatchEntry", value: BatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchEntry.typeUrl, BatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchEntry.aminoType, BatchEntry.typeUrl); function createBaseCompressedBatchProof(): CompressedBatchProof { return { entries: [], @@ -1737,10 +1745,12 @@ export const CompressedBatchProof = { typeUrl: "/cosmos.ics23.v1.CompressedBatchProof", value: CompressedBatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedBatchEntry.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchProof.typeUrl, CompressedBatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchProof.aminoType, CompressedBatchProof.typeUrl); function createBaseCompressedBatchEntry(): CompressedBatchEntry { return { exist: undefined, @@ -1827,10 +1837,12 @@ export const CompressedBatchEntry = { typeUrl: "/cosmos.ics23.v1.CompressedBatchEntry", value: CompressedBatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); + CompressedNonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchEntry.typeUrl, CompressedBatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchEntry.aminoType, CompressedBatchEntry.typeUrl); function createBaseCompressedExistenceProof(): CompressedExistenceProof { return { key: new Uint8Array(), @@ -1952,10 +1964,11 @@ export const CompressedExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedExistenceProof", value: CompressedExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedExistenceProof.typeUrl, CompressedExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedExistenceProof.aminoType, CompressedExistenceProof.typeUrl); function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { return { key: new Uint8Array(), @@ -2054,7 +2067,8 @@ export const CompressedNonExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedNonExistenceProof", value: CompressedNonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(CompressedNonExistenceProof.typeUrl, CompressedNonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedNonExistenceProof.aminoType, CompressedNonExistenceProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/staking/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/cosmos/staking/v1beta1/query.rpc.func.ts index d870abdc..679c908c 100644 --- a/libs/injectivejs/src/cosmos/staking/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/staking/v1beta1/query.rpc.func.ts @@ -5,96 +5,110 @@ export const createGetValidators = (clientResolver?: RpcResolver) => buildQuery< decode: QueryValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Validators", - clientResolver + clientResolver, + deps: [QueryValidatorsRequest, QueryValidatorsResponse] }); export const createGetValidator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValidatorRequest.encode, decode: QueryValidatorResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Validator", - clientResolver + clientResolver, + deps: [QueryValidatorRequest, QueryValidatorResponse] }); export const createGetValidatorDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValidatorDelegationsRequest.encode, decode: QueryValidatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse] }); export const createGetValidatorUnbondingDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValidatorUnbondingDelegationsRequest.encode, decode: QueryValidatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse] }); export const createGetDelegation = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegationRequest.encode, decode: QueryDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Delegation", - clientResolver + clientResolver, + deps: [QueryDelegationRequest, QueryDelegationResponse] }); export const createGetUnbondingDelegation = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryUnbondingDelegationRequest.encode, decode: QueryUnbondingDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "UnbondingDelegation", - clientResolver + clientResolver, + deps: [QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse] }); export const createGetDelegatorDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorDelegationsRequest.encode, decode: QueryDelegatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse] }); export const createGetDelegatorUnbondingDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorUnbondingDelegationsRequest.encode, decode: QueryDelegatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse] }); export const createGetRedelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryRedelegationsRequest.encode, decode: QueryRedelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Redelegations", - clientResolver + clientResolver, + deps: [QueryRedelegationsRequest, QueryRedelegationsResponse] }); export const createGetDelegatorValidators = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorValidatorsRequest.encode, decode: QueryDelegatorValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidators", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse] }); export const createGetDelegatorValidator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorValidatorRequest.encode, decode: QueryDelegatorValidatorResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidator", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse] }); export const createGetHistoricalInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryHistoricalInfoRequest.encode, decode: QueryHistoricalInfoResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "HistoricalInfo", - clientResolver + clientResolver, + deps: [QueryHistoricalInfoRequest, QueryHistoricalInfoResponse] }); export const createGetPool = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPoolRequest.encode, decode: QueryPoolResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Pool", - clientResolver + clientResolver, + deps: [QueryPoolRequest, QueryPoolResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/staking/v1beta1/query.ts b/libs/injectivejs/src/cosmos/staking/v1beta1/query.ts index f4754096..1b267bf2 100644 --- a/libs/injectivejs/src/cosmos/staking/v1beta1/query.ts +++ b/libs/injectivejs/src/cosmos/staking/v1beta1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { Validator, ValidatorAmino, DelegationResponse, DelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, RedelegationResponse, RedelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Pool, PoolAmino, Params, ParamsAmino } from "./staking"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ export interface QueryValidatorsRequest { /** status enables to query for validators matching a given status. */ @@ -757,10 +756,11 @@ export const QueryValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", value: QueryValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsRequest.typeUrl, QueryValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsRequest.aminoType, QueryValidatorsRequest.typeUrl); function createBaseQueryValidatorsResponse(): QueryValidatorsResponse { return { validators: [], @@ -849,10 +849,12 @@ export const QueryValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", value: QueryValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsResponse.typeUrl, QueryValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsResponse.aminoType, QueryValidatorsResponse.typeUrl); function createBaseQueryValidatorRequest(): QueryValidatorRequest { return { validatorAddr: "" @@ -927,10 +929,9 @@ export const QueryValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", value: QueryValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValidatorRequest.typeUrl, QueryValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorRequest.aminoType, QueryValidatorRequest.typeUrl); function createBaseQueryValidatorResponse(): QueryValidatorResponse { return { validator: Validator.fromPartial({}) @@ -1005,10 +1006,11 @@ export const QueryValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", value: QueryValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorResponse.typeUrl, QueryValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorResponse.aminoType, QueryValidatorResponse.typeUrl); function createBaseQueryValidatorDelegationsRequest(): QueryValidatorDelegationsRequest { return { validatorAddr: "", @@ -1095,10 +1097,11 @@ export const QueryValidatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", value: QueryValidatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsRequest.typeUrl, QueryValidatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsRequest.aminoType, QueryValidatorDelegationsRequest.typeUrl); function createBaseQueryValidatorDelegationsResponse(): QueryValidatorDelegationsResponse { return { delegationResponses: [], @@ -1187,10 +1190,12 @@ export const QueryValidatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", value: QueryValidatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsResponse.typeUrl, QueryValidatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsResponse.aminoType, QueryValidatorDelegationsResponse.typeUrl); function createBaseQueryValidatorUnbondingDelegationsRequest(): QueryValidatorUnbondingDelegationsRequest { return { validatorAddr: "", @@ -1277,10 +1282,11 @@ export const QueryValidatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", value: QueryValidatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsRequest.typeUrl, QueryValidatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsRequest.aminoType, QueryValidatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryValidatorUnbondingDelegationsResponse(): QueryValidatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -1369,10 +1375,12 @@ export const QueryValidatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", value: QueryValidatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsResponse.typeUrl, QueryValidatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsResponse.aminoType, QueryValidatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryDelegationRequest(): QueryDelegationRequest { return { delegatorAddr: "", @@ -1459,10 +1467,9 @@ export const QueryDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", value: QueryDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegationRequest.typeUrl, QueryDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationRequest.aminoType, QueryDelegationRequest.typeUrl); function createBaseQueryDelegationResponse(): QueryDelegationResponse { return { delegationResponse: undefined @@ -1537,10 +1544,11 @@ export const QueryDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", value: QueryDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegationResponse.typeUrl, QueryDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationResponse.aminoType, QueryDelegationResponse.typeUrl); function createBaseQueryUnbondingDelegationRequest(): QueryUnbondingDelegationRequest { return { delegatorAddr: "", @@ -1627,10 +1635,9 @@ export const QueryUnbondingDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", value: QueryUnbondingDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationRequest.typeUrl, QueryUnbondingDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationRequest.aminoType, QueryUnbondingDelegationRequest.typeUrl); function createBaseQueryUnbondingDelegationResponse(): QueryUnbondingDelegationResponse { return { unbond: UnbondingDelegation.fromPartial({}) @@ -1705,10 +1712,11 @@ export const QueryUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", value: QueryUnbondingDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationResponse.typeUrl, QueryUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationResponse.aminoType, QueryUnbondingDelegationResponse.typeUrl); function createBaseQueryDelegatorDelegationsRequest(): QueryDelegatorDelegationsRequest { return { delegatorAddr: "", @@ -1795,10 +1803,11 @@ export const QueryDelegatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", value: QueryDelegatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsRequest.typeUrl, QueryDelegatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsRequest.aminoType, QueryDelegatorDelegationsRequest.typeUrl); function createBaseQueryDelegatorDelegationsResponse(): QueryDelegatorDelegationsResponse { return { delegationResponses: [], @@ -1887,10 +1896,12 @@ export const QueryDelegatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", value: QueryDelegatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsResponse.typeUrl, QueryDelegatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsResponse.aminoType, QueryDelegatorDelegationsResponse.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsRequest(): QueryDelegatorUnbondingDelegationsRequest { return { delegatorAddr: "", @@ -1977,10 +1988,11 @@ export const QueryDelegatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", value: QueryDelegatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsRequest.typeUrl, QueryDelegatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsRequest.aminoType, QueryDelegatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsResponse(): QueryDelegatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -2069,10 +2081,12 @@ export const QueryDelegatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", value: QueryDelegatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsResponse.typeUrl, QueryDelegatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsResponse.aminoType, QueryDelegatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryRedelegationsRequest(): QueryRedelegationsRequest { return { delegatorAddr: "", @@ -2183,10 +2197,11 @@ export const QueryRedelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", value: QueryRedelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsRequest.typeUrl, QueryRedelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsRequest.aminoType, QueryRedelegationsRequest.typeUrl); function createBaseQueryRedelegationsResponse(): QueryRedelegationsResponse { return { redelegationResponses: [], @@ -2275,10 +2290,12 @@ export const QueryRedelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", value: QueryRedelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsResponse.typeUrl, QueryRedelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsResponse.aminoType, QueryRedelegationsResponse.typeUrl); function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { return { delegatorAddr: "", @@ -2365,10 +2382,11 @@ export const QueryDelegatorValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", value: QueryDelegatorValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsRequest.typeUrl, QueryDelegatorValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsRequest.aminoType, QueryDelegatorValidatorsRequest.typeUrl); function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { return { validators: [], @@ -2457,10 +2475,12 @@ export const QueryDelegatorValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", value: QueryDelegatorValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsResponse.typeUrl, QueryDelegatorValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsResponse.aminoType, QueryDelegatorValidatorsResponse.typeUrl); function createBaseQueryDelegatorValidatorRequest(): QueryDelegatorValidatorRequest { return { delegatorAddr: "", @@ -2547,10 +2567,9 @@ export const QueryDelegatorValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", value: QueryDelegatorValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorRequest.typeUrl, QueryDelegatorValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorRequest.aminoType, QueryDelegatorValidatorRequest.typeUrl); function createBaseQueryDelegatorValidatorResponse(): QueryDelegatorValidatorResponse { return { validator: Validator.fromPartial({}) @@ -2625,10 +2644,11 @@ export const QueryDelegatorValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", value: QueryDelegatorValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorResponse.typeUrl, QueryDelegatorValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorResponse.aminoType, QueryDelegatorValidatorResponse.typeUrl); function createBaseQueryHistoricalInfoRequest(): QueryHistoricalInfoRequest { return { height: BigInt(0) @@ -2703,10 +2723,9 @@ export const QueryHistoricalInfoRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", value: QueryHistoricalInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalInfoRequest.typeUrl, QueryHistoricalInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoRequest.aminoType, QueryHistoricalInfoRequest.typeUrl); function createBaseQueryHistoricalInfoResponse(): QueryHistoricalInfoResponse { return { hist: undefined @@ -2781,10 +2800,11 @@ export const QueryHistoricalInfoResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", value: QueryHistoricalInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + HistoricalInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalInfoResponse.typeUrl, QueryHistoricalInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoResponse.aminoType, QueryHistoricalInfoResponse.typeUrl); function createBaseQueryPoolRequest(): QueryPoolRequest { return {}; } @@ -2846,10 +2866,9 @@ export const QueryPoolRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", value: QueryPoolRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPoolRequest.typeUrl, QueryPoolRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolRequest.aminoType, QueryPoolRequest.typeUrl); function createBaseQueryPoolResponse(): QueryPoolResponse { return { pool: Pool.fromPartial({}) @@ -2924,10 +2943,11 @@ export const QueryPoolResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", value: QueryPoolResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Pool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPoolResponse.typeUrl, QueryPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolResponse.aminoType, QueryPoolResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2989,10 +3009,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -3067,7 +3086,8 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/staking/v1beta1/staking.ts b/libs/injectivejs/src/cosmos/staking/v1beta1/staking.ts index ab2a299e..1c7ac96e 100644 --- a/libs/injectivejs/src/cosmos/staking/v1beta1/staking.ts +++ b/libs/injectivejs/src/cosmos/staking/v1beta1/staking.ts @@ -5,8 +5,8 @@ import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; /** BondStatus is the status of a validator. */ export enum BondStatus { @@ -838,10 +838,12 @@ export const HistoricalInfo = { typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", value: HistoricalInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HistoricalInfo.typeUrl, HistoricalInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(HistoricalInfo.aminoType, HistoricalInfo.typeUrl); function createBaseCommissionRates(): CommissionRates { return { rate: "", @@ -940,10 +942,9 @@ export const CommissionRates = { typeUrl: "/cosmos.staking.v1beta1.CommissionRates", value: CommissionRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommissionRates.typeUrl, CommissionRates); -GlobalDecoderRegistry.registerAminoProtoMapping(CommissionRates.aminoType, CommissionRates.typeUrl); function createBaseCommission(): Commission { return { commissionRates: CommissionRates.fromPartial({}), @@ -1030,10 +1031,11 @@ export const Commission = { typeUrl: "/cosmos.staking.v1beta1.Commission", value: Commission.encode(message).finish() }; + }, + registerTypeUrl() { + CommissionRates.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commission.typeUrl, Commission); -GlobalDecoderRegistry.registerAminoProtoMapping(Commission.aminoType, Commission.typeUrl); function createBaseDescription(): Description { return { moniker: "", @@ -1156,10 +1158,9 @@ export const Description = { typeUrl: "/cosmos.staking.v1beta1.Description", value: Description.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Description.typeUrl, Description); -GlobalDecoderRegistry.registerAminoProtoMapping(Description.aminoType, Description.typeUrl); function createBaseValidator(): Validator { return { operatorAddress: "", @@ -1389,10 +1390,12 @@ export const Validator = { typeUrl: "/cosmos.staking.v1beta1.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); + Commission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); -GlobalDecoderRegistry.registerAminoProtoMapping(Validator.aminoType, Validator.typeUrl); function createBaseValAddresses(): ValAddresses { return { addresses: [] @@ -1469,10 +1472,9 @@ export const ValAddresses = { typeUrl: "/cosmos.staking.v1beta1.ValAddresses", value: ValAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValAddresses.typeUrl, ValAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(ValAddresses.aminoType, ValAddresses.typeUrl); function createBaseDVPair(): DVPair { return { delegatorAddress: "", @@ -1559,10 +1561,9 @@ export const DVPair = { typeUrl: "/cosmos.staking.v1beta1.DVPair", value: DVPair.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVPair.typeUrl, DVPair); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPair.aminoType, DVPair.typeUrl); function createBaseDVPairs(): DVPairs { return { pairs: [] @@ -1639,10 +1640,11 @@ export const DVPairs = { typeUrl: "/cosmos.staking.v1beta1.DVPairs", value: DVPairs.encode(message).finish() }; + }, + registerTypeUrl() { + DVPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVPairs.typeUrl, DVPairs); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPairs.aminoType, DVPairs.typeUrl); function createBaseDVVTriplet(): DVVTriplet { return { delegatorAddress: "", @@ -1741,10 +1743,9 @@ export const DVVTriplet = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", value: DVVTriplet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVVTriplet.typeUrl, DVVTriplet); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplet.aminoType, DVVTriplet.typeUrl); function createBaseDVVTriplets(): DVVTriplets { return { triplets: [] @@ -1821,10 +1822,11 @@ export const DVVTriplets = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", value: DVVTriplets.encode(message).finish() }; + }, + registerTypeUrl() { + DVVTriplet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVVTriplets.typeUrl, DVVTriplets); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplets.aminoType, DVVTriplets.typeUrl); function createBaseDelegation(): Delegation { return { delegatorAddress: "", @@ -1923,10 +1925,9 @@ export const Delegation = { typeUrl: "/cosmos.staking.v1beta1.Delegation", value: Delegation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Delegation.typeUrl, Delegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Delegation.aminoType, Delegation.typeUrl); function createBaseUnbondingDelegation(): UnbondingDelegation { return { delegatorAddress: "", @@ -2027,10 +2028,11 @@ export const UnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", value: UnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UnbondingDelegation.typeUrl, UnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegation.aminoType, UnbondingDelegation.typeUrl); function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry { return { creationHeight: BigInt(0), @@ -2165,10 +2167,9 @@ export const UnbondingDelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", value: UnbondingDelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UnbondingDelegationEntry.typeUrl, UnbondingDelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegationEntry.aminoType, UnbondingDelegationEntry.typeUrl); function createBaseRedelegationEntry(): RedelegationEntry { return { creationHeight: BigInt(0), @@ -2303,10 +2304,9 @@ export const RedelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", value: RedelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RedelegationEntry.typeUrl, RedelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntry.aminoType, RedelegationEntry.typeUrl); function createBaseRedelegation(): Redelegation { return { delegatorAddress: "", @@ -2419,10 +2419,11 @@ export const Redelegation = { typeUrl: "/cosmos.staking.v1beta1.Redelegation", value: Redelegation.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Redelegation.typeUrl, Redelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Redelegation.aminoType, Redelegation.typeUrl); function createBaseParams(): Params { return { unbondingTime: Duration.fromPartial({}), @@ -2557,10 +2558,9 @@ export const Params = { typeUrl: "/cosmos.staking.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseDelegationResponse(): DelegationResponse { return { delegation: Delegation.fromPartial({}), @@ -2647,10 +2647,12 @@ export const DelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", value: DelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Delegation.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationResponse.typeUrl, DelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationResponse.aminoType, DelegationResponse.typeUrl); function createBaseRedelegationEntryResponse(): RedelegationEntryResponse { return { redelegationEntry: RedelegationEntry.fromPartial({}), @@ -2737,10 +2739,11 @@ export const RedelegationEntryResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", value: RedelegationEntryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationEntryResponse.typeUrl, RedelegationEntryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntryResponse.aminoType, RedelegationEntryResponse.typeUrl); function createBaseRedelegationResponse(): RedelegationResponse { return { redelegation: Redelegation.fromPartial({}), @@ -2829,10 +2832,12 @@ export const RedelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", value: RedelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Redelegation.registerTypeUrl(); + RedelegationEntryResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationResponse.typeUrl, RedelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationResponse.aminoType, RedelegationResponse.typeUrl); function createBasePool(): Pool { return { notBondedTokens: "", @@ -2919,10 +2924,9 @@ export const Pool = { typeUrl: "/cosmos.staking.v1beta1.Pool", value: Pool.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Pool.typeUrl, Pool); -GlobalDecoderRegistry.registerAminoProtoMapping(Pool.aminoType, Pool.typeUrl); function createBaseValidatorUpdates(): ValidatorUpdates { return { updates: [] @@ -2999,7 +3003,8 @@ export const ValidatorUpdates = { typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates", value: ValidatorUpdates.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorUpdate.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ValidatorUpdates.typeUrl, ValidatorUpdates); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorUpdates.aminoType, ValidatorUpdates.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/staking/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/staking/v1beta1/tx.rpc.func.ts index 81244bbe..98ad73ff 100644 --- a/libs/injectivejs/src/cosmos/staking/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/staking/v1beta1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createCreateValidator = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgCreateValidator.typeUrl, encoders: toEncoders(MsgCreateValidator), - converters: toConverters(MsgCreateValidator) + converters: toConverters(MsgCreateValidator), + deps: [MsgCreateValidator] }); export const createEditValidator = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgEditValidator.typeUrl, encoders: toEncoders(MsgEditValidator), - converters: toConverters(MsgEditValidator) + converters: toConverters(MsgEditValidator), + deps: [MsgEditValidator] }); export const createDelegate = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDelegate.typeUrl, encoders: toEncoders(MsgDelegate), - converters: toConverters(MsgDelegate) + converters: toConverters(MsgDelegate), + deps: [MsgDelegate] }); export const createBeginRedelegate = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBeginRedelegate.typeUrl, encoders: toEncoders(MsgBeginRedelegate), - converters: toConverters(MsgBeginRedelegate) + converters: toConverters(MsgBeginRedelegate), + deps: [MsgBeginRedelegate] }); export const createUndelegate = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUndelegate.typeUrl, encoders: toEncoders(MsgUndelegate), - converters: toConverters(MsgUndelegate) + converters: toConverters(MsgUndelegate), + deps: [MsgUndelegate] }); export const createCancelUnbondingDelegation = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelUnbondingDelegation.typeUrl, encoders: toEncoders(MsgCancelUnbondingDelegation), - converters: toConverters(MsgCancelUnbondingDelegation) + converters: toConverters(MsgCancelUnbondingDelegation), + deps: [MsgCancelUnbondingDelegation] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/staking/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/staking/v1beta1/tx.ts index ef9fba80..d25b942c 100644 --- a/libs/injectivejs/src/cosmos/staking/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/staking/v1beta1/tx.ts @@ -3,9 +3,9 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { description: Description; @@ -503,10 +503,11 @@ export const MsgCreateValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateValidator.typeUrl, MsgCreateValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidator.aminoType, MsgCreateValidator.typeUrl); function createBaseMsgCreateValidatorResponse(): MsgCreateValidatorResponse { return {}; } @@ -568,10 +569,9 @@ export const MsgCreateValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", value: MsgCreateValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateValidatorResponse.typeUrl, MsgCreateValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidatorResponse.aminoType, MsgCreateValidatorResponse.typeUrl); function createBaseMsgEditValidator(): MsgEditValidator { return { description: Description.fromPartial({}), @@ -682,10 +682,11 @@ export const MsgEditValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgEditValidator.typeUrl, MsgEditValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidator.aminoType, MsgEditValidator.typeUrl); function createBaseMsgEditValidatorResponse(): MsgEditValidatorResponse { return {}; } @@ -747,10 +748,9 @@ export const MsgEditValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", value: MsgEditValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEditValidatorResponse.typeUrl, MsgEditValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidatorResponse.aminoType, MsgEditValidatorResponse.typeUrl); function createBaseMsgDelegate(): MsgDelegate { return { delegatorAddress: "", @@ -849,10 +849,11 @@ export const MsgDelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDelegate.typeUrl, MsgDelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegate.aminoType, MsgDelegate.typeUrl); function createBaseMsgDelegateResponse(): MsgDelegateResponse { return {}; } @@ -914,10 +915,9 @@ export const MsgDelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", value: MsgDelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDelegateResponse.typeUrl, MsgDelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegateResponse.aminoType, MsgDelegateResponse.typeUrl); function createBaseMsgBeginRedelegate(): MsgBeginRedelegate { return { delegatorAddress: "", @@ -1028,10 +1028,11 @@ export const MsgBeginRedelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBeginRedelegate.typeUrl, MsgBeginRedelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegate.aminoType, MsgBeginRedelegate.typeUrl); function createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse { return { completionTime: new Date() @@ -1106,10 +1107,9 @@ export const MsgBeginRedelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", value: MsgBeginRedelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBeginRedelegateResponse.typeUrl, MsgBeginRedelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegateResponse.aminoType, MsgBeginRedelegateResponse.typeUrl); function createBaseMsgUndelegate(): MsgUndelegate { return { delegatorAddress: "", @@ -1208,10 +1208,11 @@ export const MsgUndelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegate.typeUrl, MsgUndelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegate.aminoType, MsgUndelegate.typeUrl); function createBaseMsgUndelegateResponse(): MsgUndelegateResponse { return { completionTime: new Date(), @@ -1298,10 +1299,11 @@ export const MsgUndelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", value: MsgUndelegateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegateResponse.typeUrl, MsgUndelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegateResponse.aminoType, MsgUndelegateResponse.typeUrl); function createBaseMsgCancelUnbondingDelegation(): MsgCancelUnbondingDelegation { return { delegatorAddress: "", @@ -1412,10 +1414,11 @@ export const MsgCancelUnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegation.typeUrl, MsgCancelUnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegation.aminoType, MsgCancelUnbondingDelegation.typeUrl); function createBaseMsgCancelUnbondingDelegationResponse(): MsgCancelUnbondingDelegationResponse { return {}; } @@ -1477,10 +1480,9 @@ export const MsgCancelUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", value: MsgCancelUnbondingDelegationResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegationResponse.typeUrl, MsgCancelUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegationResponse.aminoType, MsgCancelUnbondingDelegationResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1567,10 +1569,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1632,7 +1635,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/tx/signing/v1beta1/signing.ts b/libs/injectivejs/src/cosmos/tx/signing/v1beta1/signing.ts index 8c90655f..de70a246 100644 --- a/libs/injectivejs/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/libs/injectivejs/src/cosmos/tx/signing/v1beta1/signing.ts @@ -2,7 +2,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../../crypto/multisig/ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * SignMode represents a signing mode with its own security guarantees. * @@ -308,10 +307,11 @@ export const SignatureDescriptors = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors", value: SignatureDescriptors.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptors.typeUrl, SignatureDescriptors); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptors.aminoType, SignatureDescriptors.typeUrl); function createBaseSignatureDescriptor(): SignatureDescriptor { return { publicKey: undefined, @@ -410,10 +410,11 @@ export const SignatureDescriptor = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor", value: SignatureDescriptor.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor.typeUrl, SignatureDescriptor); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor.aminoType, SignatureDescriptor.typeUrl); function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { return { single: undefined, @@ -500,10 +501,12 @@ export const SignatureDescriptor_Data = { typeUrl: "/cosmos.tx.signing.v1beta1.Data", value: SignatureDescriptor_Data.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data_Single.registerTypeUrl(); + SignatureDescriptor_Data_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data.typeUrl, SignatureDescriptor_Data); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data.aminoType, SignatureDescriptor_Data.typeUrl); function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { return { mode: 0, @@ -590,10 +593,9 @@ export const SignatureDescriptor_Data_Single = { typeUrl: "/cosmos.tx.signing.v1beta1.Single", value: SignatureDescriptor_Data_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Single.typeUrl, SignatureDescriptor_Data_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Single.aminoType, SignatureDescriptor_Data_Single.typeUrl); function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { return { bitarray: undefined, @@ -682,7 +684,9 @@ export const SignatureDescriptor_Data_Multi = { typeUrl: "/cosmos.tx.signing.v1beta1.Multi", value: SignatureDescriptor_Data_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + SignatureDescriptor_Data.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Multi.typeUrl, SignatureDescriptor_Data_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Multi.aminoType, SignatureDescriptor_Data_Multi.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/tx/v1beta1/service.rpc.func.ts b/libs/injectivejs/src/cosmos/tx/v1beta1/service.rpc.func.ts index a13635e1..096bfb4f 100644 --- a/libs/injectivejs/src/cosmos/tx/v1beta1/service.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/tx/v1beta1/service.rpc.func.ts @@ -5,61 +5,70 @@ export const createGetSimulate = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: GetTxRequest.encode, decode: GetTxResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetTx", - clientResolver + clientResolver, + deps: [GetTxRequest, GetTxResponse] }); export const createGetBroadcastTx = (clientResolver?: RpcResolver) => buildQuery({ encode: BroadcastTxRequest.encode, decode: BroadcastTxResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "BroadcastTx", - clientResolver + clientResolver, + deps: [BroadcastTxRequest, BroadcastTxResponse] }); export const createGetGetTxsEvent = (clientResolver?: RpcResolver) => buildQuery({ encode: GetTxsEventRequest.encode, decode: GetTxsEventResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetTxsEvent", - clientResolver + clientResolver, + deps: [GetTxsEventRequest, GetTxsEventResponse] }); export const createGetGetBlockWithTxs = (clientResolver?: RpcResolver) => buildQuery({ encode: GetBlockWithTxsRequest.encode, decode: GetBlockWithTxsResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetBlockWithTxs", - clientResolver + clientResolver, + deps: [GetBlockWithTxsRequest, GetBlockWithTxsResponse] }); export const createGetTxDecode = (clientResolver?: RpcResolver) => buildQuery({ encode: TxDecodeRequest.encode, decode: TxDecodeResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxDecode", - clientResolver + clientResolver, + deps: [TxDecodeRequest, TxDecodeResponse] }); export const createGetTxEncode = (clientResolver?: RpcResolver) => buildQuery({ encode: TxEncodeRequest.encode, decode: TxEncodeResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxEncode", - clientResolver + clientResolver, + deps: [TxEncodeRequest, TxEncodeResponse] }); export const createGetTxEncodeAmino = (clientResolver?: RpcResolver) => buildQuery({ encode: TxEncodeAminoRequest.encode, decode: TxEncodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxEncodeAmino", - clientResolver + clientResolver, + deps: [TxEncodeAminoRequest, TxEncodeAminoResponse] }); export const createGetTxDecodeAmino = (clientResolver?: RpcResolver) => buildQuery({ encode: TxDecodeAminoRequest.encode, decode: TxDecodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxDecodeAmino", - clientResolver + clientResolver, + deps: [TxDecodeAminoRequest, TxDecodeAminoResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/tx/v1beta1/service.ts b/libs/injectivejs/src/cosmos/tx/v1beta1/service.ts index 9c0eaf31..6a7f7c35 100644 --- a/libs/injectivejs/src/cosmos/tx/v1beta1/service.ts +++ b/libs/injectivejs/src/cosmos/tx/v1beta1/service.ts @@ -5,7 +5,6 @@ import { BlockID, BlockIDAmino } from "../../../tendermint/types/types"; import { Block, BlockAmino } from "../../../tendermint/types/block"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** OrderBy defines the sorting order */ export enum OrderBy { /** @@ -824,10 +823,11 @@ export const GetTxsEventRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest", value: GetTxsEventRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventRequest.typeUrl, GetTxsEventRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventRequest.aminoType, GetTxsEventRequest.typeUrl); function createBaseGetTxsEventResponse(): GetTxsEventResponse { return { txs: [], @@ -942,10 +942,13 @@ export const GetTxsEventResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse", value: GetTxsEventResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventResponse.typeUrl, GetTxsEventResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventResponse.aminoType, GetTxsEventResponse.typeUrl); function createBaseBroadcastTxRequest(): BroadcastTxRequest { return { txBytes: new Uint8Array(), @@ -1032,10 +1035,9 @@ export const BroadcastTxRequest = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest", value: BroadcastTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BroadcastTxRequest.typeUrl, BroadcastTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxRequest.aminoType, BroadcastTxRequest.typeUrl); function createBaseBroadcastTxResponse(): BroadcastTxResponse { return { txResponse: undefined @@ -1110,10 +1112,11 @@ export const BroadcastTxResponse = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse", value: BroadcastTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BroadcastTxResponse.typeUrl, BroadcastTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxResponse.aminoType, BroadcastTxResponse.typeUrl); function createBaseSimulateRequest(): SimulateRequest { return { tx: undefined, @@ -1200,10 +1203,11 @@ export const SimulateRequest = { typeUrl: "/cosmos.tx.v1beta1.SimulateRequest", value: SimulateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateRequest.typeUrl, SimulateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateRequest.aminoType, SimulateRequest.typeUrl); function createBaseSimulateResponse(): SimulateResponse { return { gasInfo: undefined, @@ -1290,10 +1294,12 @@ export const SimulateResponse = { typeUrl: "/cosmos.tx.v1beta1.SimulateResponse", value: SimulateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateResponse.typeUrl, SimulateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateResponse.aminoType, SimulateResponse.typeUrl); function createBaseGetTxRequest(): GetTxRequest { return { hash: "" @@ -1368,10 +1374,9 @@ export const GetTxRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxRequest", value: GetTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GetTxRequest.typeUrl, GetTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxRequest.aminoType, GetTxRequest.typeUrl); function createBaseGetTxResponse(): GetTxResponse { return { tx: undefined, @@ -1458,10 +1463,12 @@ export const GetTxResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxResponse", value: GetTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxResponse.typeUrl, GetTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxResponse.aminoType, GetTxResponse.typeUrl); function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { return { height: BigInt(0), @@ -1548,10 +1555,11 @@ export const GetBlockWithTxsRequest = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest", value: GetBlockWithTxsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsRequest.typeUrl, GetBlockWithTxsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsRequest.aminoType, GetBlockWithTxsRequest.typeUrl); function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { return { txs: [], @@ -1664,10 +1672,14 @@ export const GetBlockWithTxsResponse = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse", value: GetBlockWithTxsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + BlockID.registerTypeUrl(); + Block.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsResponse.typeUrl, GetBlockWithTxsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsResponse.aminoType, GetBlockWithTxsResponse.typeUrl); function createBaseTxDecodeRequest(): TxDecodeRequest { return { txBytes: new Uint8Array() @@ -1742,10 +1754,9 @@ export const TxDecodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeRequest", value: TxDecodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeRequest.typeUrl, TxDecodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeRequest.aminoType, TxDecodeRequest.typeUrl); function createBaseTxDecodeResponse(): TxDecodeResponse { return { tx: undefined @@ -1820,10 +1831,11 @@ export const TxDecodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeResponse", value: TxDecodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxDecodeResponse.typeUrl, TxDecodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeResponse.aminoType, TxDecodeResponse.typeUrl); function createBaseTxEncodeRequest(): TxEncodeRequest { return { tx: undefined @@ -1898,10 +1910,11 @@ export const TxEncodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeRequest", value: TxEncodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxEncodeRequest.typeUrl, TxEncodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeRequest.aminoType, TxEncodeRequest.typeUrl); function createBaseTxEncodeResponse(): TxEncodeResponse { return { txBytes: new Uint8Array() @@ -1976,10 +1989,9 @@ export const TxEncodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeResponse", value: TxEncodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeResponse.typeUrl, TxEncodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeResponse.aminoType, TxEncodeResponse.typeUrl); function createBaseTxEncodeAminoRequest(): TxEncodeAminoRequest { return { aminoJson: "" @@ -2054,10 +2066,9 @@ export const TxEncodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoRequest", value: TxEncodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoRequest.typeUrl, TxEncodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoRequest.aminoType, TxEncodeAminoRequest.typeUrl); function createBaseTxEncodeAminoResponse(): TxEncodeAminoResponse { return { aminoBinary: new Uint8Array() @@ -2132,10 +2143,9 @@ export const TxEncodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoResponse", value: TxEncodeAminoResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoResponse.typeUrl, TxEncodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoResponse.aminoType, TxEncodeAminoResponse.typeUrl); function createBaseTxDecodeAminoRequest(): TxDecodeAminoRequest { return { aminoBinary: new Uint8Array() @@ -2210,10 +2220,9 @@ export const TxDecodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoRequest", value: TxDecodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeAminoRequest.typeUrl, TxDecodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoRequest.aminoType, TxDecodeAminoRequest.typeUrl); function createBaseTxDecodeAminoResponse(): TxDecodeAminoResponse { return { aminoJson: "" @@ -2288,7 +2297,6 @@ export const TxDecodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoResponse", value: TxDecodeAminoResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TxDecodeAminoResponse.typeUrl, TxDecodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoResponse.aminoType, TxDecodeAminoResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/tx/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/tx/v1beta1/tx.ts index 6e8614bb..e0136f83 100644 --- a/libs/injectivejs/src/cosmos/tx/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/tx/v1beta1/tx.ts @@ -4,7 +4,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../crypto/multisig/v1b import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Tx is the standard type used for broadcasting transactions. */ export interface Tx { /** body is the processable content of the transaction */ @@ -747,10 +746,12 @@ export const Tx = { typeUrl: "/cosmos.tx.v1beta1.Tx", value: Tx.encode(message).finish() }; + }, + registerTypeUrl() { + TxBody.registerTypeUrl(); + AuthInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tx.typeUrl, Tx); -GlobalDecoderRegistry.registerAminoProtoMapping(Tx.aminoType, Tx.typeUrl); function createBaseTxRaw(): TxRaw { return { bodyBytes: new Uint8Array(), @@ -851,10 +852,9 @@ export const TxRaw = { typeUrl: "/cosmos.tx.v1beta1.TxRaw", value: TxRaw.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxRaw.typeUrl, TxRaw); -GlobalDecoderRegistry.registerAminoProtoMapping(TxRaw.aminoType, TxRaw.typeUrl); function createBaseSignDoc(): SignDoc { return { bodyBytes: new Uint8Array(), @@ -965,10 +965,9 @@ export const SignDoc = { typeUrl: "/cosmos.tx.v1beta1.SignDoc", value: SignDoc.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignDoc.typeUrl, SignDoc); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDoc.aminoType, SignDoc.typeUrl); function createBaseSignDocDirectAux(): SignDocDirectAux { return { bodyBytes: new Uint8Array(), @@ -1103,10 +1102,11 @@ export const SignDocDirectAux = { typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux", value: SignDocDirectAux.encode(message).finish() }; + }, + registerTypeUrl() { + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignDocDirectAux.typeUrl, SignDocDirectAux); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDocDirectAux.aminoType, SignDocDirectAux.typeUrl); function createBaseTxBody(): TxBody { return { messages: [], @@ -1235,10 +1235,9 @@ export const TxBody = { typeUrl: "/cosmos.tx.v1beta1.TxBody", value: TxBody.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxBody.typeUrl, TxBody); -GlobalDecoderRegistry.registerAminoProtoMapping(TxBody.aminoType, TxBody.typeUrl); function createBaseAuthInfo(): AuthInfo { return { signerInfos: [], @@ -1339,10 +1338,13 @@ export const AuthInfo = { typeUrl: "/cosmos.tx.v1beta1.AuthInfo", value: AuthInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SignerInfo.registerTypeUrl(); + Fee.registerTypeUrl(); + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AuthInfo.typeUrl, AuthInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(AuthInfo.aminoType, AuthInfo.typeUrl); function createBaseSignerInfo(): SignerInfo { return { publicKey: undefined, @@ -1441,10 +1443,11 @@ export const SignerInfo = { typeUrl: "/cosmos.tx.v1beta1.SignerInfo", value: SignerInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignerInfo.typeUrl, SignerInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(SignerInfo.aminoType, SignerInfo.typeUrl); function createBaseModeInfo(): ModeInfo { return { single: undefined, @@ -1531,10 +1534,12 @@ export const ModeInfo = { typeUrl: "/cosmos.tx.v1beta1.ModeInfo", value: ModeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo_Single.registerTypeUrl(); + ModeInfo_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo.typeUrl, ModeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo.aminoType, ModeInfo.typeUrl); function createBaseModeInfo_Single(): ModeInfo_Single { return { mode: 0 @@ -1609,10 +1614,9 @@ export const ModeInfo_Single = { typeUrl: "/cosmos.tx.v1beta1.Single", value: ModeInfo_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModeInfo_Single.typeUrl, ModeInfo_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Single.aminoType, ModeInfo_Single.typeUrl); function createBaseModeInfo_Multi(): ModeInfo_Multi { return { bitarray: undefined, @@ -1701,10 +1705,12 @@ export const ModeInfo_Multi = { typeUrl: "/cosmos.tx.v1beta1.Multi", value: ModeInfo_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo_Multi.typeUrl, ModeInfo_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Multi.aminoType, ModeInfo_Multi.typeUrl); function createBaseFee(): Fee { return { amount: [], @@ -1817,10 +1823,11 @@ export const Fee = { typeUrl: "/cosmos.tx.v1beta1.Fee", value: Fee.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Fee.typeUrl, Fee); -GlobalDecoderRegistry.registerAminoProtoMapping(Fee.aminoType, Fee.typeUrl); function createBaseTip(): Tip { return { amount: [], @@ -1909,10 +1916,11 @@ export const Tip = { typeUrl: "/cosmos.tx.v1beta1.Tip", value: Tip.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tip.typeUrl, Tip); -GlobalDecoderRegistry.registerAminoProtoMapping(Tip.aminoType, Tip.typeUrl); function createBaseAuxSignerData(): AuxSignerData { return { address: "", @@ -2023,7 +2031,8 @@ export const AuxSignerData = { typeUrl: "/cosmos.tx.v1beta1.AuxSignerData", value: AuxSignerData.encode(message).finish() }; + }, + registerTypeUrl() { + SignDocDirectAux.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AuxSignerData.typeUrl, AuxSignerData); -GlobalDecoderRegistry.registerAminoProtoMapping(AuxSignerData.aminoType, AuxSignerData.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/upgrade/v1beta1/upgrade.ts b/libs/injectivejs/src/cosmos/upgrade/v1beta1/upgrade.ts index c2adfcb7..add35514 100644 --- a/libs/injectivejs/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/libs/injectivejs/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -303,10 +303,9 @@ export const Plan = { typeUrl: "/cosmos.upgrade.v1beta1.Plan", value: Plan.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Plan.typeUrl, Plan); -GlobalDecoderRegistry.registerAminoProtoMapping(Plan.aminoType, Plan.typeUrl); function createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal { return { title: "", @@ -405,10 +404,13 @@ export const SoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", value: SoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); + Plan.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); function createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal { return { title: "", @@ -495,10 +497,12 @@ export const CancelSoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", value: CancelSoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); function createBaseModuleVersion(): ModuleVersion { return { name: "", @@ -585,7 +589,6 @@ export const ModuleVersion = { typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", value: ModuleVersion.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ModuleVersion.typeUrl, ModuleVersion); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleVersion.aminoType, ModuleVersion.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts index 49328086..d693bff4 100644 --- a/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts @@ -5,17 +5,20 @@ export const createCreateVestingAccount = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgCreateVestingAccount.typeUrl, encoders: toEncoders(MsgCreateVestingAccount), - converters: toConverters(MsgCreateVestingAccount) + converters: toConverters(MsgCreateVestingAccount), + deps: [MsgCreateVestingAccount] }); export const createCreatePermanentLockedAccount = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreatePermanentLockedAccount.typeUrl, encoders: toEncoders(MsgCreatePermanentLockedAccount), - converters: toConverters(MsgCreatePermanentLockedAccount) + converters: toConverters(MsgCreatePermanentLockedAccount), + deps: [MsgCreatePermanentLockedAccount] }); export const createCreatePeriodicVestingAccount = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreatePeriodicVestingAccount.typeUrl, encoders: toEncoders(MsgCreatePeriodicVestingAccount), - converters: toConverters(MsgCreatePeriodicVestingAccount) + converters: toConverters(MsgCreatePeriodicVestingAccount), + deps: [MsgCreatePeriodicVestingAccount] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.ts b/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.ts index 4e9fcb3f..5354ddff 100644 --- a/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.ts +++ b/libs/injectivejs/src/cosmos/vesting/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Period, PeriodAmino } from "./vesting"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateVestingAccount defines a message that enables creating a vesting * account. @@ -277,10 +276,11 @@ export const MsgCreateVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateVestingAccount.typeUrl, MsgCreateVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccount.aminoType, MsgCreateVestingAccount.typeUrl); function createBaseMsgCreateVestingAccountResponse(): MsgCreateVestingAccountResponse { return {}; } @@ -342,10 +342,9 @@ export const MsgCreateVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", value: MsgCreateVestingAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateVestingAccountResponse.typeUrl, MsgCreateVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccountResponse.aminoType, MsgCreateVestingAccountResponse.typeUrl); function createBaseMsgCreatePermanentLockedAccount(): MsgCreatePermanentLockedAccount { return { fromAddress: "", @@ -446,10 +445,11 @@ export const MsgCreatePermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccount.typeUrl, MsgCreatePermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccount.aminoType, MsgCreatePermanentLockedAccount.typeUrl); function createBaseMsgCreatePermanentLockedAccountResponse(): MsgCreatePermanentLockedAccountResponse { return {}; } @@ -511,10 +511,9 @@ export const MsgCreatePermanentLockedAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", value: MsgCreatePermanentLockedAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccountResponse.typeUrl, MsgCreatePermanentLockedAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccountResponse.aminoType, MsgCreatePermanentLockedAccountResponse.typeUrl); function createBaseMsgCreatePeriodicVestingAccount(): MsgCreatePeriodicVestingAccount { return { fromAddress: "", @@ -627,10 +626,11 @@ export const MsgCreatePeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", value: MsgCreatePeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccount.typeUrl, MsgCreatePeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccount.aminoType, MsgCreatePeriodicVestingAccount.typeUrl); function createBaseMsgCreatePeriodicVestingAccountResponse(): MsgCreatePeriodicVestingAccountResponse { return {}; } @@ -692,7 +692,6 @@ export const MsgCreatePeriodicVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", value: MsgCreatePeriodicVestingAccountResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccountResponse.typeUrl, MsgCreatePeriodicVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccountResponse.aminoType, MsgCreatePeriodicVestingAccountResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos/vesting/v1beta1/vesting.ts b/libs/injectivejs/src/cosmos/vesting/v1beta1/vesting.ts index 91f05562..f886cac4 100644 --- a/libs/injectivejs/src/cosmos/vesting/v1beta1/vesting.ts +++ b/libs/injectivejs/src/cosmos/vesting/v1beta1/vesting.ts @@ -2,7 +2,6 @@ import { BaseAccount, BaseAccountAmino } from "../../auth/v1beta1/auth"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all * the necessary fields needed for any vesting account implementation. @@ -287,10 +286,12 @@ export const BaseVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", value: BaseVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BaseVestingAccount.typeUrl, BaseVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseVestingAccount.aminoType, BaseVestingAccount.typeUrl); function createBaseContinuousVestingAccount(): ContinuousVestingAccount { return { baseVestingAccount: undefined, @@ -377,10 +378,11 @@ export const ContinuousVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", value: ContinuousVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContinuousVestingAccount.typeUrl, ContinuousVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ContinuousVestingAccount.aminoType, ContinuousVestingAccount.typeUrl); function createBaseDelayedVestingAccount(): DelayedVestingAccount { return { baseVestingAccount: undefined @@ -455,10 +457,11 @@ export const DelayedVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", value: DelayedVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelayedVestingAccount.typeUrl, DelayedVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(DelayedVestingAccount.aminoType, DelayedVestingAccount.typeUrl); function createBasePeriod(): Period { return { length: BigInt(0), @@ -547,10 +550,11 @@ export const Period = { typeUrl: "/cosmos.vesting.v1beta1.Period", value: Period.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Period.typeUrl, Period); -GlobalDecoderRegistry.registerAminoProtoMapping(Period.aminoType, Period.typeUrl); function createBasePeriodicVestingAccount(): PeriodicVestingAccount { return { baseVestingAccount: undefined, @@ -651,10 +655,12 @@ export const PeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", value: PeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PeriodicVestingAccount.typeUrl, PeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PeriodicVestingAccount.aminoType, PeriodicVestingAccount.typeUrl); function createBasePermanentLockedAccount(): PermanentLockedAccount { return { baseVestingAccount: undefined @@ -729,7 +735,8 @@ export const PermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", value: PermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(PermanentLockedAccount.typeUrl, PermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PermanentLockedAccount.aminoType, PermanentLockedAccount.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmos_proto/cosmos.ts b/libs/injectivejs/src/cosmos_proto/cosmos.ts index 0a97877f..9c5ace2a 100644 --- a/libs/injectivejs/src/cosmos_proto/cosmos.ts +++ b/libs/injectivejs/src/cosmos_proto/cosmos.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../binary"; import { DeepPartial } from "../helpers"; -import { GlobalDecoderRegistry } from "../registry"; export enum ScalarType { SCALAR_TYPE_UNSPECIFIED = 0, SCALAR_TYPE_STRING = 1, @@ -231,9 +230,9 @@ export const InterfaceDescriptor = { typeUrl: "/cosmos_proto.InterfaceDescriptor", value: InterfaceDescriptor.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InterfaceDescriptor.typeUrl, InterfaceDescriptor); function createBaseScalarDescriptor(): ScalarDescriptor { return { name: "", @@ -336,6 +335,6 @@ export const ScalarDescriptor = { typeUrl: "/cosmos_proto.ScalarDescriptor", value: ScalarDescriptor.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ScalarDescriptor.typeUrl, ScalarDescriptor); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmwasm/wasm/v1/proposal_legacy.ts b/libs/injectivejs/src/cosmwasm/wasm/v1/proposal_legacy.ts index 0a986632..614900e7 100644 --- a/libs/injectivejs/src/cosmwasm/wasm/v1/proposal_legacy.ts +++ b/libs/injectivejs/src/cosmwasm/wasm/v1/proposal_legacy.ts @@ -1,9 +1,9 @@ import { AccessConfig, AccessConfigAmino } from "./types"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for * an explicit StoreCodeProposal. To submit WASM code to the system, @@ -834,10 +834,13 @@ export const StoreCodeProposal = { typeUrl: "/cosmwasm.wasm.v1.StoreCodeProposal", value: StoreCodeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(StoreCodeProposal.typeUrl, StoreCodeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(StoreCodeProposal.aminoType, StoreCodeProposal.typeUrl); + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StoreCodeProposal.typeUrl, StoreCodeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(StoreCodeProposal.aminoType, StoreCodeProposal.typeUrl); function createBaseInstantiateContractProposal(): InstantiateContractProposal { return { title: "", @@ -998,10 +1001,13 @@ export const InstantiateContractProposal = { typeUrl: "/cosmwasm.wasm.v1.InstantiateContractProposal", value: InstantiateContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(InstantiateContractProposal.typeUrl, InstantiateContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContractProposal.aminoType, InstantiateContractProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(InstantiateContractProposal.typeUrl, InstantiateContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContractProposal.aminoType, InstantiateContractProposal.typeUrl); function createBaseInstantiateContract2Proposal(): InstantiateContract2Proposal { return { title: "", @@ -1186,10 +1192,13 @@ export const InstantiateContract2Proposal = { typeUrl: "/cosmwasm.wasm.v1.InstantiateContract2Proposal", value: InstantiateContract2Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(InstantiateContract2Proposal.typeUrl, InstantiateContract2Proposal); + GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContract2Proposal.aminoType, InstantiateContract2Proposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(InstantiateContract2Proposal.typeUrl, InstantiateContract2Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(InstantiateContract2Proposal.aminoType, InstantiateContract2Proposal.typeUrl); function createBaseMigrateContractProposal(): MigrateContractProposal { return { title: "", @@ -1312,10 +1321,12 @@ export const MigrateContractProposal = { typeUrl: "/cosmwasm.wasm.v1.MigrateContractProposal", value: MigrateContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(MigrateContractProposal.typeUrl, MigrateContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(MigrateContractProposal.aminoType, MigrateContractProposal.typeUrl); } }; -GlobalDecoderRegistry.register(MigrateContractProposal.typeUrl, MigrateContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MigrateContractProposal.aminoType, MigrateContractProposal.typeUrl); function createBaseSudoContractProposal(): SudoContractProposal { return { title: "", @@ -1426,10 +1437,12 @@ export const SudoContractProposal = { typeUrl: "/cosmwasm.wasm.v1.SudoContractProposal", value: SudoContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SudoContractProposal.typeUrl, SudoContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SudoContractProposal.aminoType, SudoContractProposal.typeUrl); } }; -GlobalDecoderRegistry.register(SudoContractProposal.typeUrl, SudoContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SudoContractProposal.aminoType, SudoContractProposal.typeUrl); function createBaseExecuteContractProposal(): ExecuteContractProposal { return { title: "", @@ -1566,10 +1579,13 @@ export const ExecuteContractProposal = { typeUrl: "/cosmwasm.wasm.v1.ExecuteContractProposal", value: ExecuteContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ExecuteContractProposal.typeUrl, ExecuteContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ExecuteContractProposal.aminoType, ExecuteContractProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExecuteContractProposal.typeUrl, ExecuteContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ExecuteContractProposal.aminoType, ExecuteContractProposal.typeUrl); function createBaseUpdateAdminProposal(): UpdateAdminProposal { return { title: "", @@ -1680,10 +1696,12 @@ export const UpdateAdminProposal = { typeUrl: "/cosmwasm.wasm.v1.UpdateAdminProposal", value: UpdateAdminProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateAdminProposal.typeUrl, UpdateAdminProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateAdminProposal.aminoType, UpdateAdminProposal.typeUrl); } }; -GlobalDecoderRegistry.register(UpdateAdminProposal.typeUrl, UpdateAdminProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateAdminProposal.aminoType, UpdateAdminProposal.typeUrl); function createBaseClearAdminProposal(): ClearAdminProposal { return { title: "", @@ -1782,10 +1800,12 @@ export const ClearAdminProposal = { typeUrl: "/cosmwasm.wasm.v1.ClearAdminProposal", value: ClearAdminProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ClearAdminProposal.typeUrl, ClearAdminProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ClearAdminProposal.aminoType, ClearAdminProposal.typeUrl); } }; -GlobalDecoderRegistry.register(ClearAdminProposal.typeUrl, ClearAdminProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ClearAdminProposal.aminoType, ClearAdminProposal.typeUrl); function createBasePinCodesProposal(): PinCodesProposal { return { title: "", @@ -1895,10 +1915,12 @@ export const PinCodesProposal = { typeUrl: "/cosmwasm.wasm.v1.PinCodesProposal", value: PinCodesProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PinCodesProposal.typeUrl, PinCodesProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(PinCodesProposal.aminoType, PinCodesProposal.typeUrl); } }; -GlobalDecoderRegistry.register(PinCodesProposal.typeUrl, PinCodesProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(PinCodesProposal.aminoType, PinCodesProposal.typeUrl); function createBaseUnpinCodesProposal(): UnpinCodesProposal { return { title: "", @@ -2008,10 +2030,12 @@ export const UnpinCodesProposal = { typeUrl: "/cosmwasm.wasm.v1.UnpinCodesProposal", value: UnpinCodesProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UnpinCodesProposal.typeUrl, UnpinCodesProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UnpinCodesProposal.aminoType, UnpinCodesProposal.typeUrl); } }; -GlobalDecoderRegistry.register(UnpinCodesProposal.typeUrl, UnpinCodesProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UnpinCodesProposal.aminoType, UnpinCodesProposal.typeUrl); function createBaseAccessConfigUpdate(): AccessConfigUpdate { return { codeId: BigInt(0), @@ -2098,10 +2122,11 @@ export const AccessConfigUpdate = { typeUrl: "/cosmwasm.wasm.v1.AccessConfigUpdate", value: AccessConfigUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AccessConfigUpdate.typeUrl, AccessConfigUpdate); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessConfigUpdate.aminoType, AccessConfigUpdate.typeUrl); function createBaseUpdateInstantiateConfigProposal(): UpdateInstantiateConfigProposal { return { title: "", @@ -2202,10 +2227,13 @@ export const UpdateInstantiateConfigProposal = { typeUrl: "/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal", value: UpdateInstantiateConfigProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateInstantiateConfigProposal.typeUrl, UpdateInstantiateConfigProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateInstantiateConfigProposal.aminoType, UpdateInstantiateConfigProposal.typeUrl); + AccessConfigUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UpdateInstantiateConfigProposal.typeUrl, UpdateInstantiateConfigProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateInstantiateConfigProposal.aminoType, UpdateInstantiateConfigProposal.typeUrl); function createBaseStoreAndInstantiateContractProposal(): StoreAndInstantiateContractProposal { return { title: "", @@ -2426,7 +2454,11 @@ export const StoreAndInstantiateContractProposal = { typeUrl: "/cosmwasm.wasm.v1.StoreAndInstantiateContractProposal", value: StoreAndInstantiateContractProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(StoreAndInstantiateContractProposal.typeUrl, StoreAndInstantiateContractProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(StoreAndInstantiateContractProposal.aminoType, StoreAndInstantiateContractProposal.typeUrl); + AccessConfig.registerTypeUrl(); + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(StoreAndInstantiateContractProposal.typeUrl, StoreAndInstantiateContractProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(StoreAndInstantiateContractProposal.aminoType, StoreAndInstantiateContractProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmwasm/wasm/v1/query.rpc.func.ts b/libs/injectivejs/src/cosmwasm/wasm/v1/query.rpc.func.ts index 8a0c89f5..eff06fce 100644 --- a/libs/injectivejs/src/cosmwasm/wasm/v1/query.rpc.func.ts +++ b/libs/injectivejs/src/cosmwasm/wasm/v1/query.rpc.func.ts @@ -5,96 +5,110 @@ export const createGetContractInfo = (clientResolver?: RpcResolver) => buildQuer decode: QueryContractInfoResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractInfo", - clientResolver + clientResolver, + deps: [QueryContractInfoRequest, QueryContractInfoResponse] }); export const createGetContractHistory = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryContractHistoryRequest.encode, decode: QueryContractHistoryResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractHistory", - clientResolver + clientResolver, + deps: [QueryContractHistoryRequest, QueryContractHistoryResponse] }); export const createGetContractsByCode = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryContractsByCodeRequest.encode, decode: QueryContractsByCodeResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCode", - clientResolver + clientResolver, + deps: [QueryContractsByCodeRequest, QueryContractsByCodeResponse] }); export const createGetAllContractState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAllContractStateRequest.encode, decode: QueryAllContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "AllContractState", - clientResolver + clientResolver, + deps: [QueryAllContractStateRequest, QueryAllContractStateResponse] }); export const createGetRawContractState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryRawContractStateRequest.encode, decode: QueryRawContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "RawContractState", - clientResolver + clientResolver, + deps: [QueryRawContractStateRequest, QueryRawContractStateResponse] }); export const createGetSmartContractState = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySmartContractStateRequest.encode, decode: QuerySmartContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "SmartContractState", - clientResolver + clientResolver, + deps: [QuerySmartContractStateRequest, QuerySmartContractStateResponse] }); export const createGetCode = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCodeRequest.encode, decode: QueryCodeResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "Code", - clientResolver + clientResolver, + deps: [QueryCodeRequest, QueryCodeResponse] }); export const createGetCodes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCodesRequest.encode, decode: QueryCodesResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "Codes", - clientResolver + clientResolver, + deps: [QueryCodesRequest, QueryCodesResponse] }); export const createGetCodeInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCodeInfoRequest.encode, decode: QueryCodeInfoResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "CodeInfo", - clientResolver + clientResolver, + deps: [QueryCodeInfoRequest, QueryCodeInfoResponse] }); export const createGetPinnedCodes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPinnedCodesRequest.encode, decode: QueryPinnedCodesResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "PinnedCodes", - clientResolver + clientResolver, + deps: [QueryPinnedCodesRequest, QueryPinnedCodesResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetContractsByCreator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryContractsByCreatorRequest.encode, decode: QueryContractsByCreatorResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCreator", - clientResolver + clientResolver, + deps: [QueryContractsByCreatorRequest, QueryContractsByCreatorResponse] }); export const createGetWasmLimitsConfig = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryWasmLimitsConfigRequest.encode, decode: QueryWasmLimitsConfigResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "WasmLimitsConfig", - clientResolver + clientResolver, + deps: [QueryWasmLimitsConfigRequest, QueryWasmLimitsConfigResponse] }); export const createGetBuildAddress = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBuildAddressRequest.encode, decode: QueryBuildAddressResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "BuildAddress", - clientResolver + clientResolver, + deps: [QueryBuildAddressRequest, QueryBuildAddressResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmwasm/wasm/v1/query.ts b/libs/injectivejs/src/cosmwasm/wasm/v1/query.ts index cd8c0b8e..4352cce0 100644 --- a/libs/injectivejs/src/cosmwasm/wasm/v1/query.ts +++ b/libs/injectivejs/src/cosmwasm/wasm/v1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { ContractInfo, ContractInfoAmino, ContractCodeHistoryEntry, ContractCodeHistoryEntryAmino, Model, ModelAmino, AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -774,10 +773,9 @@ export const QueryContractInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", value: QueryContractInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryContractInfoRequest.typeUrl, QueryContractInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoRequest.aminoType, QueryContractInfoRequest.typeUrl); function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { return { address: "", @@ -864,10 +862,11 @@ export const QueryContractInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", value: QueryContractInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractInfoResponse.typeUrl, QueryContractInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoResponse.aminoType, QueryContractInfoResponse.typeUrl); function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { return { address: "", @@ -954,10 +953,11 @@ export const QueryContractHistoryRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", value: QueryContractHistoryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryRequest.typeUrl, QueryContractHistoryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryRequest.aminoType, QueryContractHistoryRequest.typeUrl); function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse { return { entries: [], @@ -1046,10 +1046,12 @@ export const QueryContractHistoryResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", value: QueryContractHistoryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractCodeHistoryEntry.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryResponse.typeUrl, QueryContractHistoryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryResponse.aminoType, QueryContractHistoryResponse.typeUrl); function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { return { codeId: BigInt(0), @@ -1136,10 +1138,11 @@ export const QueryContractsByCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", value: QueryContractsByCodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeRequest.typeUrl, QueryContractsByCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeRequest.aminoType, QueryContractsByCodeRequest.typeUrl); function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse { return { contracts: [], @@ -1228,10 +1231,11 @@ export const QueryContractsByCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", value: QueryContractsByCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeResponse.typeUrl, QueryContractsByCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeResponse.aminoType, QueryContractsByCodeResponse.typeUrl); function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { return { address: "", @@ -1318,10 +1322,11 @@ export const QueryAllContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", value: QueryAllContractStateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateRequest.typeUrl, QueryAllContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateRequest.aminoType, QueryAllContractStateRequest.typeUrl); function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse { return { models: [], @@ -1410,10 +1415,12 @@ export const QueryAllContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", value: QueryAllContractStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Model.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateResponse.typeUrl, QueryAllContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateResponse.aminoType, QueryAllContractStateResponse.typeUrl); function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { return { address: "", @@ -1500,10 +1507,9 @@ export const QueryRawContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", value: QueryRawContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateRequest.typeUrl, QueryRawContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateRequest.aminoType, QueryRawContractStateRequest.typeUrl); function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse { return { data: new Uint8Array() @@ -1578,10 +1584,9 @@ export const QueryRawContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", value: QueryRawContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateResponse.typeUrl, QueryRawContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateResponse.aminoType, QueryRawContractStateResponse.typeUrl); function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { return { address: "", @@ -1668,10 +1673,9 @@ export const QuerySmartContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", value: QuerySmartContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateRequest.typeUrl, QuerySmartContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateRequest.aminoType, QuerySmartContractStateRequest.typeUrl); function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse { return { data: new Uint8Array() @@ -1746,10 +1750,9 @@ export const QuerySmartContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", value: QuerySmartContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateResponse.typeUrl, QuerySmartContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateResponse.aminoType, QuerySmartContractStateResponse.typeUrl); function createBaseQueryCodeRequest(): QueryCodeRequest { return { codeId: BigInt(0) @@ -1824,10 +1827,9 @@ export const QueryCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", value: QueryCodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeRequest.typeUrl, QueryCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeRequest.aminoType, QueryCodeRequest.typeUrl); function createBaseQueryCodeInfoRequest(): QueryCodeInfoRequest { return { codeId: BigInt(0) @@ -1902,10 +1904,9 @@ export const QueryCodeInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoRequest", value: QueryCodeInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeInfoRequest.typeUrl, QueryCodeInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoRequest.aminoType, QueryCodeInfoRequest.typeUrl); function createBaseQueryCodeInfoResponse(): QueryCodeInfoResponse { return { codeId: BigInt(0), @@ -2016,10 +2017,11 @@ export const QueryCodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoResponse", value: QueryCodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeInfoResponse.typeUrl, QueryCodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoResponse.aminoType, QueryCodeInfoResponse.typeUrl); function createBaseCodeInfoResponse(): CodeInfoResponse { return { codeId: BigInt(0), @@ -2130,10 +2132,11 @@ export const CodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", value: CodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfoResponse.typeUrl, CodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfoResponse.aminoType, CodeInfoResponse.typeUrl); function createBaseQueryCodeResponse(): QueryCodeResponse { return { codeInfo: undefined, @@ -2220,10 +2223,11 @@ export const QueryCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", value: QueryCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeResponse.typeUrl, QueryCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeResponse.aminoType, QueryCodeResponse.typeUrl); function createBaseQueryCodesRequest(): QueryCodesRequest { return { pagination: undefined @@ -2298,10 +2302,11 @@ export const QueryCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", value: QueryCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesRequest.typeUrl, QueryCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesRequest.aminoType, QueryCodesRequest.typeUrl); function createBaseQueryCodesResponse(): QueryCodesResponse { return { codeInfos: [], @@ -2390,10 +2395,12 @@ export const QueryCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", value: QueryCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesResponse.typeUrl, QueryCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesResponse.aminoType, QueryCodesResponse.typeUrl); function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { return { pagination: undefined @@ -2468,10 +2475,11 @@ export const QueryPinnedCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", value: QueryPinnedCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesRequest.typeUrl, QueryPinnedCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesRequest.aminoType, QueryPinnedCodesRequest.typeUrl); function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { return { codeIds: [], @@ -2569,10 +2577,11 @@ export const QueryPinnedCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", value: QueryPinnedCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesResponse.typeUrl, QueryPinnedCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesResponse.aminoType, QueryPinnedCodesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2634,10 +2643,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -2712,10 +2720,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest { return { creatorAddress: "", @@ -2802,10 +2811,11 @@ export const QueryContractsByCreatorRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest", value: QueryContractsByCreatorRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorRequest.typeUrl, QueryContractsByCreatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorRequest.aminoType, QueryContractsByCreatorRequest.typeUrl); function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorResponse { return { contractAddresses: [], @@ -2894,10 +2904,11 @@ export const QueryContractsByCreatorResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse", value: QueryContractsByCreatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorResponse.typeUrl, QueryContractsByCreatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorResponse.aminoType, QueryContractsByCreatorResponse.typeUrl); function createBaseQueryWasmLimitsConfigRequest(): QueryWasmLimitsConfigRequest { return {}; } @@ -2959,10 +2970,9 @@ export const QueryWasmLimitsConfigRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigRequest", value: QueryWasmLimitsConfigRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigRequest.typeUrl, QueryWasmLimitsConfigRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigRequest.aminoType, QueryWasmLimitsConfigRequest.typeUrl); function createBaseQueryWasmLimitsConfigResponse(): QueryWasmLimitsConfigResponse { return { config: "" @@ -3037,10 +3047,9 @@ export const QueryWasmLimitsConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigResponse", value: QueryWasmLimitsConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigResponse.typeUrl, QueryWasmLimitsConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigResponse.aminoType, QueryWasmLimitsConfigResponse.typeUrl); function createBaseQueryBuildAddressRequest(): QueryBuildAddressRequest { return { codeHash: "", @@ -3151,10 +3160,9 @@ export const QueryBuildAddressRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressRequest", value: QueryBuildAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBuildAddressRequest.typeUrl, QueryBuildAddressRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressRequest.aminoType, QueryBuildAddressRequest.typeUrl); function createBaseQueryBuildAddressResponse(): QueryBuildAddressResponse { return { address: "" @@ -3229,7 +3237,6 @@ export const QueryBuildAddressResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressResponse", value: QueryBuildAddressResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(QueryBuildAddressResponse.typeUrl, QueryBuildAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressResponse.aminoType, QueryBuildAddressResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmwasm/wasm/v1/tx.rpc.func.ts b/libs/injectivejs/src/cosmwasm/wasm/v1/tx.rpc.func.ts index 61f2ed80..5c34fb61 100644 --- a/libs/injectivejs/src/cosmwasm/wasm/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/cosmwasm/wasm/v1/tx.rpc.func.ts @@ -5,101 +5,118 @@ export const createStoreCode = (clientResolver?: SigningClientResolver) => build clientResolver, typeUrl: MsgStoreCode.typeUrl, encoders: toEncoders(MsgStoreCode), - converters: toConverters(MsgStoreCode) + converters: toConverters(MsgStoreCode), + deps: [MsgStoreCode] }); export const createInstantiateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantiateContract.typeUrl, encoders: toEncoders(MsgInstantiateContract), - converters: toConverters(MsgInstantiateContract) + converters: toConverters(MsgInstantiateContract), + deps: [MsgInstantiateContract] }); export const createInstantiateContract2 = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantiateContract2.typeUrl, encoders: toEncoders(MsgInstantiateContract2), - converters: toConverters(MsgInstantiateContract2) + converters: toConverters(MsgInstantiateContract2), + deps: [MsgInstantiateContract2] }); export const createExecuteContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExecuteContract.typeUrl, encoders: toEncoders(MsgExecuteContract), - converters: toConverters(MsgExecuteContract) + converters: toConverters(MsgExecuteContract), + deps: [MsgExecuteContract] }); export const createMigrateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgMigrateContract.typeUrl, encoders: toEncoders(MsgMigrateContract), - converters: toConverters(MsgMigrateContract) + converters: toConverters(MsgMigrateContract), + deps: [MsgMigrateContract] }); export const createUpdateAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateAdmin.typeUrl, encoders: toEncoders(MsgUpdateAdmin), - converters: toConverters(MsgUpdateAdmin) + converters: toConverters(MsgUpdateAdmin), + deps: [MsgUpdateAdmin] }); export const createClearAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgClearAdmin.typeUrl, encoders: toEncoders(MsgClearAdmin), - converters: toConverters(MsgClearAdmin) + converters: toConverters(MsgClearAdmin), + deps: [MsgClearAdmin] }); export const createUpdateInstantiateConfig = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateInstantiateConfig.typeUrl, encoders: toEncoders(MsgUpdateInstantiateConfig), - converters: toConverters(MsgUpdateInstantiateConfig) + converters: toConverters(MsgUpdateInstantiateConfig), + deps: [MsgUpdateInstantiateConfig] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createSudoContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSudoContract.typeUrl, encoders: toEncoders(MsgSudoContract), - converters: toConverters(MsgSudoContract) + converters: toConverters(MsgSudoContract), + deps: [MsgSudoContract] }); export const createPinCodes = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgPinCodes.typeUrl, encoders: toEncoders(MsgPinCodes), - converters: toConverters(MsgPinCodes) + converters: toConverters(MsgPinCodes), + deps: [MsgPinCodes] }); export const createUnpinCodes = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUnpinCodes.typeUrl, encoders: toEncoders(MsgUnpinCodes), - converters: toConverters(MsgUnpinCodes) + converters: toConverters(MsgUnpinCodes), + deps: [MsgUnpinCodes] }); export const createStoreAndInstantiateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgStoreAndInstantiateContract.typeUrl, encoders: toEncoders(MsgStoreAndInstantiateContract), - converters: toConverters(MsgStoreAndInstantiateContract) + converters: toConverters(MsgStoreAndInstantiateContract), + deps: [MsgStoreAndInstantiateContract] }); export const createRemoveCodeUploadParamsAddresses = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRemoveCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgRemoveCodeUploadParamsAddresses), - converters: toConverters(MsgRemoveCodeUploadParamsAddresses) + converters: toConverters(MsgRemoveCodeUploadParamsAddresses), + deps: [MsgRemoveCodeUploadParamsAddresses] }); export const createAddCodeUploadParamsAddresses = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgAddCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgAddCodeUploadParamsAddresses), - converters: toConverters(MsgAddCodeUploadParamsAddresses) + converters: toConverters(MsgAddCodeUploadParamsAddresses), + deps: [MsgAddCodeUploadParamsAddresses] }); export const createStoreAndMigrateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgStoreAndMigrateContract.typeUrl, encoders: toEncoders(MsgStoreAndMigrateContract), - converters: toConverters(MsgStoreAndMigrateContract) + converters: toConverters(MsgStoreAndMigrateContract), + deps: [MsgStoreAndMigrateContract] }); export const createUpdateContractLabel = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateContractLabel.typeUrl, encoders: toEncoders(MsgUpdateContractLabel), - converters: toConverters(MsgUpdateContractLabel) + converters: toConverters(MsgUpdateContractLabel), + deps: [MsgUpdateContractLabel] }); \ No newline at end of file diff --git a/libs/injectivejs/src/cosmwasm/wasm/v1/tx.ts b/libs/injectivejs/src/cosmwasm/wasm/v1/tx.ts index c97c9907..4d1c7288 100644 --- a/libs/injectivejs/src/cosmwasm/wasm/v1/tx.ts +++ b/libs/injectivejs/src/cosmwasm/wasm/v1/tx.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { /** Sender is the actor that signed the messages */ @@ -1070,10 +1069,11 @@ export const MsgStoreCode = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreCode.typeUrl, MsgStoreCode); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCode.aminoType, MsgStoreCode.typeUrl); function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { return { codeId: BigInt(0), @@ -1160,10 +1160,9 @@ export const MsgStoreCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", value: MsgStoreCodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreCodeResponse.typeUrl, MsgStoreCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCodeResponse.aminoType, MsgStoreCodeResponse.typeUrl); function createBaseMsgInstantiateContract(): MsgInstantiateContract { return { sender: "", @@ -1300,10 +1299,11 @@ export const MsgInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract.typeUrl, MsgInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract.aminoType, MsgInstantiateContract.typeUrl); function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { return { address: "", @@ -1390,10 +1390,9 @@ export const MsgInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", value: MsgInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContractResponse.typeUrl, MsgInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContractResponse.aminoType, MsgInstantiateContractResponse.typeUrl); function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { return { sender: "", @@ -1554,10 +1553,11 @@ export const MsgInstantiateContract2 = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", value: MsgInstantiateContract2.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract2.typeUrl, MsgInstantiateContract2); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2.aminoType, MsgInstantiateContract2.typeUrl); function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { return { address: "", @@ -1644,10 +1644,9 @@ export const MsgInstantiateContract2Response = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", value: MsgInstantiateContract2Response.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContract2Response.typeUrl, MsgInstantiateContract2Response); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2Response.aminoType, MsgInstantiateContract2Response.typeUrl); function createBaseMsgExecuteContract(): MsgExecuteContract { return { sender: "", @@ -1760,10 +1759,11 @@ export const MsgExecuteContract = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecuteContract.typeUrl, MsgExecuteContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContract.aminoType, MsgExecuteContract.typeUrl); function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { return { data: new Uint8Array() @@ -1838,10 +1838,9 @@ export const MsgExecuteContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", value: MsgExecuteContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractResponse.typeUrl, MsgExecuteContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContractResponse.aminoType, MsgExecuteContractResponse.typeUrl); function createBaseMsgMigrateContract(): MsgMigrateContract { return { sender: "", @@ -1952,10 +1951,9 @@ export const MsgMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContract.typeUrl, MsgMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContract.aminoType, MsgMigrateContract.typeUrl); function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { return { data: new Uint8Array() @@ -2030,10 +2028,9 @@ export const MsgMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", value: MsgMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContractResponse.typeUrl, MsgMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContractResponse.aminoType, MsgMigrateContractResponse.typeUrl); function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { return { sender: "", @@ -2132,10 +2129,9 @@ export const MsgUpdateAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", value: MsgUpdateAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdmin.typeUrl, MsgUpdateAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdmin.aminoType, MsgUpdateAdmin.typeUrl); function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { return {}; } @@ -2197,10 +2193,9 @@ export const MsgUpdateAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", value: MsgUpdateAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdminResponse.typeUrl, MsgUpdateAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdminResponse.aminoType, MsgUpdateAdminResponse.typeUrl); function createBaseMsgClearAdmin(): MsgClearAdmin { return { sender: "", @@ -2287,10 +2282,9 @@ export const MsgClearAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdmin.typeUrl, MsgClearAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdmin.aminoType, MsgClearAdmin.typeUrl); function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { return {}; } @@ -2352,10 +2346,9 @@ export const MsgClearAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", value: MsgClearAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdminResponse.typeUrl, MsgClearAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdminResponse.aminoType, MsgClearAdminResponse.typeUrl); function createBaseMsgUpdateInstantiateConfig(): MsgUpdateInstantiateConfig { return { sender: "", @@ -2454,10 +2447,11 @@ export const MsgUpdateInstantiateConfig = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", value: MsgUpdateInstantiateConfig.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfig.typeUrl, MsgUpdateInstantiateConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfig.aminoType, MsgUpdateInstantiateConfig.typeUrl); function createBaseMsgUpdateInstantiateConfigResponse(): MsgUpdateInstantiateConfigResponse { return {}; } @@ -2519,10 +2513,9 @@ export const MsgUpdateInstantiateConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", value: MsgUpdateInstantiateConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfigResponse.typeUrl, MsgUpdateInstantiateConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfigResponse.aminoType, MsgUpdateInstantiateConfigResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2609,10 +2602,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2674,10 +2668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSudoContract(): MsgSudoContract { return { authority: "", @@ -2776,10 +2769,9 @@ export const MsgSudoContract = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", value: MsgSudoContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContract.typeUrl, MsgSudoContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContract.aminoType, MsgSudoContract.typeUrl); function createBaseMsgSudoContractResponse(): MsgSudoContractResponse { return { data: new Uint8Array() @@ -2854,10 +2846,9 @@ export const MsgSudoContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", value: MsgSudoContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContractResponse.typeUrl, MsgSudoContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContractResponse.aminoType, MsgSudoContractResponse.typeUrl); function createBaseMsgPinCodes(): MsgPinCodes { return { authority: "", @@ -2955,10 +2946,9 @@ export const MsgPinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", value: MsgPinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodes.typeUrl, MsgPinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodes.aminoType, MsgPinCodes.typeUrl); function createBaseMsgPinCodesResponse(): MsgPinCodesResponse { return {}; } @@ -3020,10 +3010,9 @@ export const MsgPinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", value: MsgPinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodesResponse.typeUrl, MsgPinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodesResponse.aminoType, MsgPinCodesResponse.typeUrl); function createBaseMsgUnpinCodes(): MsgUnpinCodes { return { authority: "", @@ -3121,10 +3110,9 @@ export const MsgUnpinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", value: MsgUnpinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodes.typeUrl, MsgUnpinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodes.aminoType, MsgUnpinCodes.typeUrl); function createBaseMsgUnpinCodesResponse(): MsgUnpinCodesResponse { return {}; } @@ -3186,10 +3174,9 @@ export const MsgUnpinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", value: MsgUnpinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodesResponse.typeUrl, MsgUnpinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodesResponse.aminoType, MsgUnpinCodesResponse.typeUrl); function createBaseMsgStoreAndInstantiateContract(): MsgStoreAndInstantiateContract { return { authority: "", @@ -3386,10 +3373,12 @@ export const MsgStoreAndInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", value: MsgStoreAndInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContract.typeUrl, MsgStoreAndInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContract.aminoType, MsgStoreAndInstantiateContract.typeUrl); function createBaseMsgStoreAndInstantiateContractResponse(): MsgStoreAndInstantiateContractResponse { return { address: "", @@ -3476,10 +3465,9 @@ export const MsgStoreAndInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", value: MsgStoreAndInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContractResponse.typeUrl, MsgStoreAndInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContractResponse.aminoType, MsgStoreAndInstantiateContractResponse.typeUrl); function createBaseMsgAddCodeUploadParamsAddresses(): MsgAddCodeUploadParamsAddresses { return { authority: "", @@ -3568,10 +3556,9 @@ export const MsgAddCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", value: MsgAddCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddresses.typeUrl, MsgAddCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddresses.aminoType, MsgAddCodeUploadParamsAddresses.typeUrl); function createBaseMsgAddCodeUploadParamsAddressesResponse(): MsgAddCodeUploadParamsAddressesResponse { return {}; } @@ -3633,10 +3620,9 @@ export const MsgAddCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", value: MsgAddCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddressesResponse.typeUrl, MsgAddCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddressesResponse.aminoType, MsgAddCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddresses(): MsgRemoveCodeUploadParamsAddresses { return { authority: "", @@ -3725,10 +3711,9 @@ export const MsgRemoveCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", value: MsgRemoveCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddresses.typeUrl, MsgRemoveCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddresses.aminoType, MsgRemoveCodeUploadParamsAddresses.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddressesResponse(): MsgRemoveCodeUploadParamsAddressesResponse { return {}; } @@ -3790,10 +3775,9 @@ export const MsgRemoveCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", value: MsgRemoveCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddressesResponse.typeUrl, MsgRemoveCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddressesResponse.aminoType, MsgRemoveCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgStoreAndMigrateContract(): MsgStoreAndMigrateContract { return { authority: "", @@ -3916,10 +3900,11 @@ export const MsgStoreAndMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", value: MsgStoreAndMigrateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContract.typeUrl, MsgStoreAndMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContract.aminoType, MsgStoreAndMigrateContract.typeUrl); function createBaseMsgStoreAndMigrateContractResponse(): MsgStoreAndMigrateContractResponse { return { codeId: BigInt(0), @@ -4018,10 +4003,9 @@ export const MsgStoreAndMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", value: MsgStoreAndMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContractResponse.typeUrl, MsgStoreAndMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContractResponse.aminoType, MsgStoreAndMigrateContractResponse.typeUrl); function createBaseMsgUpdateContractLabel(): MsgUpdateContractLabel { return { sender: "", @@ -4120,10 +4104,9 @@ export const MsgUpdateContractLabel = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", value: MsgUpdateContractLabel.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContractLabel.typeUrl, MsgUpdateContractLabel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabel.aminoType, MsgUpdateContractLabel.typeUrl); function createBaseMsgUpdateContractLabelResponse(): MsgUpdateContractLabelResponse { return {}; } @@ -4185,7 +4168,6 @@ export const MsgUpdateContractLabelResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", value: MsgUpdateContractLabelResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateContractLabelResponse.typeUrl, MsgUpdateContractLabelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabelResponse.aminoType, MsgUpdateContractLabelResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/cosmwasm/wasm/v1/types.ts b/libs/injectivejs/src/cosmwasm/wasm/v1/types.ts index 3dccb816..16d3b488 100644 --- a/libs/injectivejs/src/cosmwasm/wasm/v1/types.ts +++ b/libs/injectivejs/src/cosmwasm/wasm/v1/types.ts @@ -386,10 +386,9 @@ export const AccessTypeParam = { typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", value: AccessTypeParam.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessTypeParam.typeUrl, AccessTypeParam); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessTypeParam.aminoType, AccessTypeParam.typeUrl); function createBaseAccessConfig(): AccessConfig { return { permission: 0, @@ -478,10 +477,9 @@ export const AccessConfig = { typeUrl: "/cosmwasm.wasm.v1.AccessConfig", value: AccessConfig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessConfig.typeUrl, AccessConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessConfig.aminoType, AccessConfig.typeUrl); function createBaseParams(): Params { return { codeUploadAccess: AccessConfig.fromPartial({}), @@ -568,10 +566,11 @@ export const Params = { typeUrl: "/cosmwasm.wasm.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseCodeInfo(): CodeInfo { return { codeHash: new Uint8Array(), @@ -670,10 +669,11 @@ export const CodeInfo = { typeUrl: "/cosmwasm.wasm.v1.CodeInfo", value: CodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfo.typeUrl, CodeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfo.aminoType, CodeInfo.typeUrl); function createBaseContractInfo(): ContractInfo { return { codeId: BigInt(0), @@ -820,10 +820,9 @@ export const ContractInfo = { typeUrl: "/cosmwasm.wasm.v1.ContractInfo", value: ContractInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ContractInfo.typeUrl, ContractInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractInfo.aminoType, ContractInfo.typeUrl); function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { return { operation: 0, @@ -934,10 +933,11 @@ export const ContractCodeHistoryEntry = { typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", value: ContractCodeHistoryEntry.encode(message).finish() }; + }, + registerTypeUrl() { + AbsoluteTxPosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContractCodeHistoryEntry.typeUrl, ContractCodeHistoryEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractCodeHistoryEntry.aminoType, ContractCodeHistoryEntry.typeUrl); function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { return { blockHeight: BigInt(0), @@ -1024,10 +1024,9 @@ export const AbsoluteTxPosition = { typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", value: AbsoluteTxPosition.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AbsoluteTxPosition.typeUrl, AbsoluteTxPosition); -GlobalDecoderRegistry.registerAminoProtoMapping(AbsoluteTxPosition.aminoType, AbsoluteTxPosition.typeUrl); function createBaseModel(): Model { return { key: new Uint8Array(), @@ -1114,7 +1113,6 @@ export const Model = { typeUrl: "/cosmwasm.wasm.v1.Model", value: Model.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Model.typeUrl, Model); -GlobalDecoderRegistry.registerAminoProtoMapping(Model.aminoType, Model.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/extern.ts b/libs/injectivejs/src/extern.ts index c7325c58..7cbe4e00 100644 --- a/libs/injectivejs/src/extern.ts +++ b/libs/injectivejs/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/google/api/http.ts b/libs/injectivejs/src/google/api/http.ts index 3fd3a11b..92221c2c 100644 --- a/libs/injectivejs/src/google/api/http.ts +++ b/libs/injectivejs/src/google/api/http.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * Defines the HTTP configuration for an API service. It contains a list of * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method @@ -802,9 +801,11 @@ export const Http = { typeUrl: "/google.api.Http", value: Http.encode(message).finish() }; + }, + registerTypeUrl() { + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Http.typeUrl, Http); function createBaseHttpRule(): HttpRule { return { selector: "", @@ -982,9 +983,12 @@ export const HttpRule = { typeUrl: "/google.api.HttpRule", value: HttpRule.encode(message).finish() }; + }, + registerTypeUrl() { + CustomHttpPattern.registerTypeUrl(); + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HttpRule.typeUrl, HttpRule); function createBaseCustomHttpPattern(): CustomHttpPattern { return { kind: "", @@ -1064,6 +1068,6 @@ export const CustomHttpPattern = { typeUrl: "/google.api.CustomHttpPattern", value: CustomHttpPattern.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CustomHttpPattern.typeUrl, CustomHttpPattern); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/google/protobuf/any.ts b/libs/injectivejs/src/google/protobuf/any.ts index bbae1be1..ee7f0ff9 100644 --- a/libs/injectivejs/src/google/protobuf/any.ts +++ b/libs/injectivejs/src/google/protobuf/any.ts @@ -327,5 +327,6 @@ export const Any = { typeUrl: "/google.protobuf.Any", value: Any.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; \ No newline at end of file diff --git a/libs/injectivejs/src/google/protobuf/descriptor.ts b/libs/injectivejs/src/google/protobuf/descriptor.ts index 53b60923..486eb527 100644 --- a/libs/injectivejs/src/google/protobuf/descriptor.ts +++ b/libs/injectivejs/src/google/protobuf/descriptor.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** The full set of known editions. */ export enum Edition { /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ @@ -3156,9 +3155,11 @@ export const FileDescriptorSet = { typeUrl: "/google.protobuf.FileDescriptorSet", value: FileDescriptorSet.encode(message).finish() }; + }, + registerTypeUrl() { + FileDescriptorProto.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorSet.typeUrl, FileDescriptorSet); function createBaseFileDescriptorProto(): FileDescriptorProto { return { name: "", @@ -3402,9 +3403,16 @@ export const FileDescriptorProto = { typeUrl: "/google.protobuf.FileDescriptorProto", value: FileDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + ServiceDescriptorProto.registerTypeUrl(); + FieldDescriptorProto.registerTypeUrl(); + FileOptions.registerTypeUrl(); + SourceCodeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorProto.typeUrl, FileDescriptorProto); function createBaseDescriptorProto(): DescriptorProto { return { name: "", @@ -3596,9 +3604,17 @@ export const DescriptorProto = { typeUrl: "/google.protobuf.DescriptorProto", value: DescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldDescriptorProto.registerTypeUrl(); + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + DescriptorProto_ExtensionRange.registerTypeUrl(); + OneofDescriptorProto.registerTypeUrl(); + MessageOptions.registerTypeUrl(); + DescriptorProto_ReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto.typeUrl, DescriptorProto); function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { return { start: 0, @@ -3690,9 +3706,11 @@ export const DescriptorProto_ExtensionRange = { typeUrl: "/google.protobuf.ExtensionRange", value: DescriptorProto_ExtensionRange.encode(message).finish() }; + }, + registerTypeUrl() { + ExtensionRangeOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto_ExtensionRange.typeUrl, DescriptorProto_ExtensionRange); function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { return { start: 0, @@ -3772,9 +3790,9 @@ export const DescriptorProto_ReservedRange = { typeUrl: "/google.protobuf.ReservedRange", value: DescriptorProto_ReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DescriptorProto_ReservedRange.typeUrl, DescriptorProto_ReservedRange); function createBaseExtensionRangeOptions(): ExtensionRangeOptions { return { uninterpretedOption: [], @@ -3882,9 +3900,13 @@ export const ExtensionRangeOptions = { typeUrl: "/google.protobuf.ExtensionRangeOptions", value: ExtensionRangeOptions.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption.registerTypeUrl(); + ExtensionRangeOptions_Declaration.registerTypeUrl(); + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtensionRangeOptions.typeUrl, ExtensionRangeOptions); function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration { return { number: 0, @@ -4000,9 +4022,9 @@ export const ExtensionRangeOptions_Declaration = { typeUrl: "/google.protobuf.Declaration", value: ExtensionRangeOptions_Declaration.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtensionRangeOptions_Declaration.typeUrl, ExtensionRangeOptions_Declaration); function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { name: "", @@ -4190,9 +4212,11 @@ export const FieldDescriptorProto = { typeUrl: "/google.protobuf.FieldDescriptorProto", value: FieldDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldDescriptorProto.typeUrl, FieldDescriptorProto); function createBaseOneofDescriptorProto(): OneofDescriptorProto { return { name: "", @@ -4272,9 +4296,11 @@ export const OneofDescriptorProto = { typeUrl: "/google.protobuf.OneofDescriptorProto", value: OneofDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + OneofOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofDescriptorProto.typeUrl, OneofDescriptorProto); function createBaseEnumDescriptorProto(): EnumDescriptorProto { return { name: "", @@ -4396,9 +4422,13 @@ export const EnumDescriptorProto = { typeUrl: "/google.protobuf.EnumDescriptorProto", value: EnumDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueDescriptorProto.registerTypeUrl(); + EnumOptions.registerTypeUrl(); + EnumDescriptorProto_EnumReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumDescriptorProto.typeUrl, EnumDescriptorProto); function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { return { start: 0, @@ -4478,9 +4508,9 @@ export const EnumDescriptorProto_EnumReservedRange = { typeUrl: "/google.protobuf.EnumReservedRange", value: EnumDescriptorProto_EnumReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EnumDescriptorProto_EnumReservedRange.typeUrl, EnumDescriptorProto_EnumReservedRange); function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { return { name: "", @@ -4572,9 +4602,11 @@ export const EnumValueDescriptorProto = { typeUrl: "/google.protobuf.EnumValueDescriptorProto", value: EnumValueDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueDescriptorProto.typeUrl, EnumValueDescriptorProto); function createBaseServiceDescriptorProto(): ServiceDescriptorProto { return { name: "", @@ -4668,9 +4700,12 @@ export const ServiceDescriptorProto = { typeUrl: "/google.protobuf.ServiceDescriptorProto", value: ServiceDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodDescriptorProto.registerTypeUrl(); + ServiceOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceDescriptorProto.typeUrl, ServiceDescriptorProto); function createBaseMethodDescriptorProto(): MethodDescriptorProto { return { name: "", @@ -4798,9 +4833,11 @@ export const MethodDescriptorProto = { typeUrl: "/google.protobuf.MethodDescriptorProto", value: MethodDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodDescriptorProto.typeUrl, MethodDescriptorProto); function createBaseFileOptions(): FileOptions { return { javaPackage: "", @@ -5110,9 +5147,12 @@ export const FileOptions = { typeUrl: "/google.protobuf.FileOptions", value: FileOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileOptions.typeUrl, FileOptions); function createBaseMessageOptions(): MessageOptions { return { messageSetWireFormat: false, @@ -5254,9 +5294,12 @@ export const MessageOptions = { typeUrl: "/google.protobuf.MessageOptions", value: MessageOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MessageOptions.typeUrl, MessageOptions); function createBaseFieldOptions(): FieldOptions { return { ctype: 1, @@ -5495,9 +5538,14 @@ export const FieldOptions = { typeUrl: "/google.protobuf.FieldOptions", value: FieldOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions_EditionDefault.registerTypeUrl(); + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldOptions.typeUrl, FieldOptions); function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault { return { edition: 1, @@ -5577,9 +5625,9 @@ export const FieldOptions_EditionDefault = { typeUrl: "/google.protobuf.EditionDefault", value: FieldOptions_EditionDefault.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_EditionDefault.typeUrl, FieldOptions_EditionDefault); function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport { return { editionIntroduced: 1, @@ -5683,9 +5731,9 @@ export const FieldOptions_FeatureSupport = { typeUrl: "/google.protobuf.FeatureSupport", value: FieldOptions_FeatureSupport.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_FeatureSupport.typeUrl, FieldOptions_FeatureSupport); function createBaseOneofOptions(): OneofOptions { return { features: undefined, @@ -5767,9 +5815,12 @@ export const OneofOptions = { typeUrl: "/google.protobuf.OneofOptions", value: OneofOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofOptions.typeUrl, OneofOptions); function createBaseEnumOptions(): EnumOptions { return { allowAlias: false, @@ -5887,9 +5938,12 @@ export const EnumOptions = { typeUrl: "/google.protobuf.EnumOptions", value: EnumOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumOptions.typeUrl, EnumOptions); function createBaseEnumValueOptions(): EnumValueOptions { return { deprecated: false, @@ -6007,9 +6061,13 @@ export const EnumValueOptions = { typeUrl: "/google.protobuf.EnumValueOptions", value: EnumValueOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueOptions.typeUrl, EnumValueOptions); function createBaseServiceOptions(): ServiceOptions { return { features: undefined, @@ -6103,9 +6161,12 @@ export const ServiceOptions = { typeUrl: "/google.protobuf.ServiceOptions", value: ServiceOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceOptions.typeUrl, ServiceOptions); function createBaseMethodOptions(): MethodOptions { return { deprecated: false, @@ -6211,9 +6272,12 @@ export const MethodOptions = { typeUrl: "/google.protobuf.MethodOptions", value: MethodOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodOptions.typeUrl, MethodOptions); function createBaseUninterpretedOption(): UninterpretedOption { return { name: [], @@ -6355,9 +6419,11 @@ export const UninterpretedOption = { typeUrl: "/google.protobuf.UninterpretedOption", value: UninterpretedOption.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption_NamePart.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UninterpretedOption.typeUrl, UninterpretedOption); function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { return { namePart: "", @@ -6437,9 +6503,9 @@ export const UninterpretedOption_NamePart = { typeUrl: "/google.protobuf.NamePart", value: UninterpretedOption_NamePart.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UninterpretedOption_NamePart.typeUrl, UninterpretedOption_NamePart); function createBaseFeatureSet(): FeatureSet { return { fieldPresence: 1, @@ -6567,9 +6633,9 @@ export const FeatureSet = { typeUrl: "/google.protobuf.FeatureSet", value: FeatureSet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeatureSet.typeUrl, FeatureSet); function createBaseFeatureSetDefaults(): FeatureSetDefaults { return { defaults: [], @@ -6663,9 +6729,11 @@ export const FeatureSetDefaults = { typeUrl: "/google.protobuf.FeatureSetDefaults", value: FeatureSetDefaults.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSetDefaults_FeatureSetEditionDefault.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults.typeUrl, FeatureSetDefaults); function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault { return { edition: 1, @@ -6757,9 +6825,11 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = { typeUrl: "/google.protobuf.FeatureSetEditionDefault", value: FeatureSetDefaults_FeatureSetEditionDefault.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults_FeatureSetEditionDefault.typeUrl, FeatureSetDefaults_FeatureSetEditionDefault); function createBaseSourceCodeInfo(): SourceCodeInfo { return { location: [] @@ -6829,9 +6899,11 @@ export const SourceCodeInfo = { typeUrl: "/google.protobuf.SourceCodeInfo", value: SourceCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SourceCodeInfo_Location.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SourceCodeInfo.typeUrl, SourceCodeInfo); function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { return { path: [], @@ -6971,9 +7043,9 @@ export const SourceCodeInfo_Location = { typeUrl: "/google.protobuf.Location", value: SourceCodeInfo_Location.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SourceCodeInfo_Location.typeUrl, SourceCodeInfo_Location); function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { return { annotation: [] @@ -7043,9 +7115,11 @@ export const GeneratedCodeInfo = { typeUrl: "/google.protobuf.GeneratedCodeInfo", value: GeneratedCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + GeneratedCodeInfo_Annotation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GeneratedCodeInfo.typeUrl, GeneratedCodeInfo); function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { return { path: [], @@ -7172,6 +7246,6 @@ export const GeneratedCodeInfo_Annotation = { typeUrl: "/google.protobuf.Annotation", value: GeneratedCodeInfo_Annotation.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GeneratedCodeInfo_Annotation.typeUrl, GeneratedCodeInfo_Annotation); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/google/protobuf/duration.ts b/libs/injectivejs/src/google/protobuf/duration.ts index 6e3e301a..d7d60874 100644 --- a/libs/injectivejs/src/google/protobuf/duration.ts +++ b/libs/injectivejs/src/google/protobuf/duration.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Duration represents a signed, fixed-length span of time represented * as a count of seconds and fractions of seconds at nanosecond @@ -220,6 +219,6 @@ export const Duration = { typeUrl: "/google.protobuf.Duration", value: Duration.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Duration.typeUrl, Duration); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/google/protobuf/timestamp.ts b/libs/injectivejs/src/google/protobuf/timestamp.ts index d4d255b3..9e9baefe 100644 --- a/libs/injectivejs/src/google/protobuf/timestamp.ts +++ b/libs/injectivejs/src/google/protobuf/timestamp.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Timestamp represents a point in time independent of any time zone or local * calendar, encoded as a count of seconds and fractions of seconds at @@ -276,6 +275,6 @@ export const Timestamp = { typeUrl: "/google.protobuf.Timestamp", value: Timestamp.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Timestamp.typeUrl, Timestamp); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/helper-func-types.ts b/libs/injectivejs/src/helper-func-types.ts index 7c3f8421..a78ed1bc 100644 --- a/libs/injectivejs/src/helper-func-types.ts +++ b/libs/injectivejs/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -9,13 +9,16 @@ import { HttpEndpoint } from "@interchainjs/types"; import { BinaryReader, BinaryWriter } from "./binary"; import { getRpcClient } from "./extern"; import { isRpc, Rpc } from "./helpers"; +import { TelescopeGeneratedCodec } from "./types"; +import { GlobalDecoderRegistry } from "./registry"; export interface QueryBuilderOptions { encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter decode: (input: BinaryReader | Uint8Array, length?: number) => TRes service: string, method: string, - clientResolver?: RpcResolver + clientResolver?: RpcResolver, + deps?: TelescopeGeneratedCodec[], } export function buildQuery(opts: QueryBuilderOptions) { @@ -30,6 +33,8 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); + registerDependencies(opts.deps ?? []); + const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -73,6 +78,7 @@ export interface TxBuilderOptions { typeUrl: string, encoders?: Encoder[], converters?: AminoConverter[], + deps?: TelescopeGeneratedCodec[], } export function buildTx(opts: TxBuilderOptions) { @@ -94,6 +100,7 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); + registerDependencies(opts.deps ?? []); const data = [ { @@ -189,3 +196,9 @@ export interface AminoConverter { export type SigningClientResolver = string | HttpEndpoint | ISigningClient; export type RpcResolver = string | HttpEndpoint | Rpc ; + +function registerDependencies(deps: TelescopeGeneratedCodec[]) { + for (const dep of deps) { + dep.registerTypeUrl?.(); + } +} diff --git a/libs/injectivejs/src/helpers.ts b/libs/injectivejs/src/helpers.ts index 1f19575b..ab170adb 100644 --- a/libs/injectivejs/src/helpers.ts +++ b/libs/injectivejs/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/ibc/applications/transfer/v1/transfer.ts b/libs/injectivejs/src/ibc/applications/transfer/v1/transfer.ts index 12d6526c..8c1ecaaf 100644 --- a/libs/injectivejs/src/ibc/applications/transfer/v1/transfer.ts +++ b/libs/injectivejs/src/ibc/applications/transfer/v1/transfer.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Params defines the set of IBC transfer parameters. * NOTE: To prevent a single token from being transferred, set the @@ -185,10 +184,9 @@ export const Params = { typeUrl: "/ibc.applications.transfer.v1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseForwarding(): Forwarding { return { unwind: false, @@ -277,10 +275,11 @@ export const Forwarding = { typeUrl: "/ibc.applications.transfer.v1.Forwarding", value: Forwarding.encode(message).finish() }; + }, + registerTypeUrl() { + Hop.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Forwarding.typeUrl, Forwarding); -GlobalDecoderRegistry.registerAminoProtoMapping(Forwarding.aminoType, Forwarding.typeUrl); function createBaseHop(): Hop { return { portId: "", @@ -367,7 +366,6 @@ export const Hop = { typeUrl: "/ibc.applications.transfer.v1.Hop", value: Hop.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Hop.typeUrl, Hop); -GlobalDecoderRegistry.registerAminoProtoMapping(Hop.aminoType, Hop.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/applications/transfer/v1/tx.rpc.func.ts b/libs/injectivejs/src/ibc/applications/transfer/v1/tx.rpc.func.ts index 72028384..c38aa495 100644 --- a/libs/injectivejs/src/ibc/applications/transfer/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/ibc/applications/transfer/v1/tx.rpc.func.ts @@ -5,11 +5,13 @@ export const createTransfer = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgTransfer.typeUrl, encoders: toEncoders(MsgTransfer), - converters: toConverters(MsgTransfer) + converters: toConverters(MsgTransfer), + deps: [MsgTransfer] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/applications/transfer/v1/tx.ts b/libs/injectivejs/src/ibc/applications/transfer/v1/tx.ts index f4fb581c..4a5d9355 100644 --- a/libs/injectivejs/src/ibc/applications/transfer/v1/tx.ts +++ b/libs/injectivejs/src/ibc/applications/transfer/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v import { Forwarding, ForwardingAmino } from "./transfer"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between * ICS20 enabled chains. See ICS Spec here: @@ -330,10 +329,13 @@ export const MsgTransfer = { typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + Height.registerTypeUrl(); + Forwarding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTransfer.typeUrl, MsgTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransfer.aminoType, MsgTransfer.typeUrl); function createBaseMsgTransferResponse(): MsgTransferResponse { return { sequence: BigInt(0) @@ -408,10 +410,9 @@ export const MsgTransferResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", value: MsgTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferResponse.typeUrl, MsgTransferResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransferResponse.aminoType, MsgTransferResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -498,10 +499,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -563,7 +565,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/channel/v1/channel.ts b/libs/injectivejs/src/ibc/core/channel/v1/channel.ts index 6965c083..aa87842c 100644 --- a/libs/injectivejs/src/ibc/core/channel/v1/channel.ts +++ b/libs/injectivejs/src/ibc/core/channel/v1/channel.ts @@ -1,7 +1,6 @@ import { Height, HeightAmino } from "../../client/v1/client"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a channel is in one of the following states: * CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED. @@ -614,10 +613,11 @@ export const Channel = { typeUrl: "/ibc.core.channel.v1.Channel", value: Channel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Channel.typeUrl, Channel); -GlobalDecoderRegistry.registerAminoProtoMapping(Channel.aminoType, Channel.typeUrl); function createBaseIdentifiedChannel(): IdentifiedChannel { return { state: 0, @@ -778,10 +778,11 @@ export const IdentifiedChannel = { typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", value: IdentifiedChannel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedChannel.typeUrl, IdentifiedChannel); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedChannel.aminoType, IdentifiedChannel.typeUrl); function createBaseCounterparty(): Counterparty { return { portId: "", @@ -868,10 +869,9 @@ export const Counterparty = { typeUrl: "/ibc.core.channel.v1.Counterparty", value: Counterparty.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBasePacket(): Packet { return { sequence: BigInt(0), @@ -1030,10 +1030,11 @@ export const Packet = { typeUrl: "/ibc.core.channel.v1.Packet", value: Packet.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Packet.typeUrl, Packet); -GlobalDecoderRegistry.registerAminoProtoMapping(Packet.aminoType, Packet.typeUrl); function createBasePacketState(): PacketState { return { portId: "", @@ -1144,10 +1145,9 @@ export const PacketState = { typeUrl: "/ibc.core.channel.v1.PacketState", value: PacketState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketState.typeUrl, PacketState); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketState.aminoType, PacketState.typeUrl); function createBasePacketId(): PacketId { return { portId: "", @@ -1246,10 +1246,9 @@ export const PacketId = { typeUrl: "/ibc.core.channel.v1.PacketId", value: PacketId.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketId.typeUrl, PacketId); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketId.aminoType, PacketId.typeUrl); function createBaseAcknowledgement(): Acknowledgement { return { result: undefined, @@ -1336,10 +1335,9 @@ export const Acknowledgement = { typeUrl: "/ibc.core.channel.v1.Acknowledgement", value: Acknowledgement.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Acknowledgement.typeUrl, Acknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(Acknowledgement.aminoType, Acknowledgement.typeUrl); function createBaseTimeout(): Timeout { return { height: Height.fromPartial({}), @@ -1426,10 +1424,11 @@ export const Timeout = { typeUrl: "/ibc.core.channel.v1.Timeout", value: Timeout.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Timeout.typeUrl, Timeout); -GlobalDecoderRegistry.registerAminoProtoMapping(Timeout.aminoType, Timeout.typeUrl); function createBaseParams(): Params { return { upgradeTimeout: Timeout.fromPartial({}) @@ -1504,7 +1503,8 @@ export const Params = { typeUrl: "/ibc.core.channel.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Timeout.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/channel/v1/tx.rpc.func.ts b/libs/injectivejs/src/ibc/core/channel/v1/tx.rpc.func.ts index 92917fb9..10dad0fc 100644 --- a/libs/injectivejs/src/ibc/core/channel/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/ibc/core/channel/v1/tx.rpc.func.ts @@ -5,113 +5,132 @@ export const createChannelOpenInit = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgChannelOpenInit.typeUrl, encoders: toEncoders(MsgChannelOpenInit), - converters: toConverters(MsgChannelOpenInit) + converters: toConverters(MsgChannelOpenInit), + deps: [MsgChannelOpenInit] }); export const createChannelOpenTry = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenTry.typeUrl, encoders: toEncoders(MsgChannelOpenTry), - converters: toConverters(MsgChannelOpenTry) + converters: toConverters(MsgChannelOpenTry), + deps: [MsgChannelOpenTry] }); export const createChannelOpenAck = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenAck.typeUrl, encoders: toEncoders(MsgChannelOpenAck), - converters: toConverters(MsgChannelOpenAck) + converters: toConverters(MsgChannelOpenAck), + deps: [MsgChannelOpenAck] }); export const createChannelOpenConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenConfirm.typeUrl, encoders: toEncoders(MsgChannelOpenConfirm), - converters: toConverters(MsgChannelOpenConfirm) + converters: toConverters(MsgChannelOpenConfirm), + deps: [MsgChannelOpenConfirm] }); export const createChannelCloseInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelCloseInit.typeUrl, encoders: toEncoders(MsgChannelCloseInit), - converters: toConverters(MsgChannelCloseInit) + converters: toConverters(MsgChannelCloseInit), + deps: [MsgChannelCloseInit] }); export const createChannelCloseConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelCloseConfirm.typeUrl, encoders: toEncoders(MsgChannelCloseConfirm), - converters: toConverters(MsgChannelCloseConfirm) + converters: toConverters(MsgChannelCloseConfirm), + deps: [MsgChannelCloseConfirm] }); export const createRecvPacket = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRecvPacket.typeUrl, encoders: toEncoders(MsgRecvPacket), - converters: toConverters(MsgRecvPacket) + converters: toConverters(MsgRecvPacket), + deps: [MsgRecvPacket] }); export const createTimeout = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTimeout.typeUrl, encoders: toEncoders(MsgTimeout), - converters: toConverters(MsgTimeout) + converters: toConverters(MsgTimeout), + deps: [MsgTimeout] }); export const createTimeoutOnClose = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTimeoutOnClose.typeUrl, encoders: toEncoders(MsgTimeoutOnClose), - converters: toConverters(MsgTimeoutOnClose) + converters: toConverters(MsgTimeoutOnClose), + deps: [MsgTimeoutOnClose] }); export const createAcknowledgement = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgAcknowledgement.typeUrl, encoders: toEncoders(MsgAcknowledgement), - converters: toConverters(MsgAcknowledgement) + converters: toConverters(MsgAcknowledgement), + deps: [MsgAcknowledgement] }); export const createChannelUpgradeInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeInit.typeUrl, encoders: toEncoders(MsgChannelUpgradeInit), - converters: toConverters(MsgChannelUpgradeInit) + converters: toConverters(MsgChannelUpgradeInit), + deps: [MsgChannelUpgradeInit] }); export const createChannelUpgradeTry = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeTry.typeUrl, encoders: toEncoders(MsgChannelUpgradeTry), - converters: toConverters(MsgChannelUpgradeTry) + converters: toConverters(MsgChannelUpgradeTry), + deps: [MsgChannelUpgradeTry] }); export const createChannelUpgradeAck = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeAck.typeUrl, encoders: toEncoders(MsgChannelUpgradeAck), - converters: toConverters(MsgChannelUpgradeAck) + converters: toConverters(MsgChannelUpgradeAck), + deps: [MsgChannelUpgradeAck] }); export const createChannelUpgradeConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeConfirm.typeUrl, encoders: toEncoders(MsgChannelUpgradeConfirm), - converters: toConverters(MsgChannelUpgradeConfirm) + converters: toConverters(MsgChannelUpgradeConfirm), + deps: [MsgChannelUpgradeConfirm] }); export const createChannelUpgradeOpen = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeOpen.typeUrl, encoders: toEncoders(MsgChannelUpgradeOpen), - converters: toConverters(MsgChannelUpgradeOpen) + converters: toConverters(MsgChannelUpgradeOpen), + deps: [MsgChannelUpgradeOpen] }); export const createChannelUpgradeTimeout = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeTimeout.typeUrl, encoders: toEncoders(MsgChannelUpgradeTimeout), - converters: toConverters(MsgChannelUpgradeTimeout) + converters: toConverters(MsgChannelUpgradeTimeout), + deps: [MsgChannelUpgradeTimeout] }); export const createChannelUpgradeCancel = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeCancel.typeUrl, encoders: toEncoders(MsgChannelUpgradeCancel), - converters: toConverters(MsgChannelUpgradeCancel) + converters: toConverters(MsgChannelUpgradeCancel), + deps: [MsgChannelUpgradeCancel] }); export const createUpdateChannelParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createPruneAcknowledgements = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgPruneAcknowledgements.typeUrl, encoders: toEncoders(MsgPruneAcknowledgements), - converters: toConverters(MsgPruneAcknowledgements) + converters: toConverters(MsgPruneAcknowledgements), + deps: [MsgPruneAcknowledgements] }); \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/channel/v1/tx.ts b/libs/injectivejs/src/ibc/core/channel/v1/tx.ts index b7023355..b0ecaf62 100644 --- a/libs/injectivejs/src/ibc/core/channel/v1/tx.ts +++ b/libs/injectivejs/src/ibc/core/channel/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client import { UpgradeFields, UpgradeFieldsAmino, Upgrade, UpgradeAmino, ErrorReceipt, ErrorReceiptAmino } from "./upgrade"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** ResponseResultType defines the possible outcomes of the execution of a message */ export enum ResponseResultType { /** RESPONSE_RESULT_TYPE_UNSPECIFIED - Default zero value enumeration */ @@ -996,10 +995,11 @@ export const MsgChannelOpenInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", value: MsgChannelOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenInit.typeUrl, MsgChannelOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInit.aminoType, MsgChannelOpenInit.typeUrl); function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { return { channelId: "", @@ -1086,10 +1086,9 @@ export const MsgChannelOpenInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", value: MsgChannelOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenInitResponse.typeUrl, MsgChannelOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInitResponse.aminoType, MsgChannelOpenInitResponse.typeUrl); function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { return { portId: "", @@ -1236,10 +1235,12 @@ export const MsgChannelOpenTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", value: MsgChannelOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenTry.typeUrl, MsgChannelOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTry.aminoType, MsgChannelOpenTry.typeUrl); function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { return { version: "", @@ -1326,10 +1327,9 @@ export const MsgChannelOpenTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", value: MsgChannelOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenTryResponse.typeUrl, MsgChannelOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTryResponse.aminoType, MsgChannelOpenTryResponse.typeUrl); function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { return { portId: "", @@ -1476,10 +1476,11 @@ export const MsgChannelOpenAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", value: MsgChannelOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenAck.typeUrl, MsgChannelOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAck.aminoType, MsgChannelOpenAck.typeUrl); function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { return {}; } @@ -1541,10 +1542,9 @@ export const MsgChannelOpenAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", value: MsgChannelOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenAckResponse.typeUrl, MsgChannelOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAckResponse.aminoType, MsgChannelOpenAckResponse.typeUrl); function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { return { portId: "", @@ -1667,10 +1667,11 @@ export const MsgChannelOpenConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", value: MsgChannelOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirm.typeUrl, MsgChannelOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirm.aminoType, MsgChannelOpenConfirm.typeUrl); function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse { return {}; } @@ -1732,10 +1733,9 @@ export const MsgChannelOpenConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", value: MsgChannelOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirmResponse.typeUrl, MsgChannelOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirmResponse.aminoType, MsgChannelOpenConfirmResponse.typeUrl); function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { return { portId: "", @@ -1834,10 +1834,9 @@ export const MsgChannelCloseInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", value: MsgChannelCloseInit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInit.typeUrl, MsgChannelCloseInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInit.aminoType, MsgChannelCloseInit.typeUrl); function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { return {}; } @@ -1899,10 +1898,9 @@ export const MsgChannelCloseInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", value: MsgChannelCloseInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInitResponse.typeUrl, MsgChannelCloseInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInitResponse.aminoType, MsgChannelCloseInitResponse.typeUrl); function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { return { portId: "", @@ -2037,10 +2035,11 @@ export const MsgChannelCloseConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", value: MsgChannelCloseConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirm.typeUrl, MsgChannelCloseConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirm.aminoType, MsgChannelCloseConfirm.typeUrl); function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse { return {}; } @@ -2102,10 +2101,9 @@ export const MsgChannelCloseConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", value: MsgChannelCloseConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirmResponse.typeUrl, MsgChannelCloseConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirmResponse.aminoType, MsgChannelCloseConfirmResponse.typeUrl); function createBaseMsgRecvPacket(): MsgRecvPacket { return { packet: Packet.fromPartial({}), @@ -2216,10 +2214,12 @@ export const MsgRecvPacket = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", value: MsgRecvPacket.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRecvPacket.typeUrl, MsgRecvPacket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacket.aminoType, MsgRecvPacket.typeUrl); function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { return { result: 0 @@ -2294,10 +2294,9 @@ export const MsgRecvPacketResponse = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", value: MsgRecvPacketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecvPacketResponse.typeUrl, MsgRecvPacketResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacketResponse.aminoType, MsgRecvPacketResponse.typeUrl); function createBaseMsgTimeout(): MsgTimeout { return { packet: Packet.fromPartial({}), @@ -2420,10 +2419,12 @@ export const MsgTimeout = { typeUrl: "/ibc.core.channel.v1.MsgTimeout", value: MsgTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeout.typeUrl, MsgTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeout.aminoType, MsgTimeout.typeUrl); function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { return { result: 0 @@ -2498,10 +2499,9 @@ export const MsgTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", value: MsgTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutResponse.typeUrl, MsgTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutResponse.aminoType, MsgTimeoutResponse.typeUrl); function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { return { packet: Packet.fromPartial({}), @@ -2648,10 +2648,12 @@ export const MsgTimeoutOnClose = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", value: MsgTimeoutOnClose.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeoutOnClose.typeUrl, MsgTimeoutOnClose); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnClose.aminoType, MsgTimeoutOnClose.typeUrl); function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { return { result: 0 @@ -2726,10 +2728,9 @@ export const MsgTimeoutOnCloseResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", value: MsgTimeoutOnCloseResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutOnCloseResponse.typeUrl, MsgTimeoutOnCloseResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnCloseResponse.aminoType, MsgTimeoutOnCloseResponse.typeUrl); function createBaseMsgAcknowledgement(): MsgAcknowledgement { return { packet: Packet.fromPartial({}), @@ -2852,10 +2853,12 @@ export const MsgAcknowledgement = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", value: MsgAcknowledgement.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgAcknowledgement.typeUrl, MsgAcknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgement.aminoType, MsgAcknowledgement.typeUrl); function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { return { result: 0 @@ -2930,10 +2933,9 @@ export const MsgAcknowledgementResponse = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", value: MsgAcknowledgementResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcknowledgementResponse.typeUrl, MsgAcknowledgementResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgementResponse.aminoType, MsgAcknowledgementResponse.typeUrl); function createBaseMsgChannelUpgradeInit(): MsgChannelUpgradeInit { return { portId: "", @@ -3044,10 +3046,11 @@ export const MsgChannelUpgradeInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInit", value: MsgChannelUpgradeInit.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInit.typeUrl, MsgChannelUpgradeInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInit.aminoType, MsgChannelUpgradeInit.typeUrl); function createBaseMsgChannelUpgradeInitResponse(): MsgChannelUpgradeInitResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3134,10 +3137,11 @@ export const MsgChannelUpgradeInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse", value: MsgChannelUpgradeInitResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInitResponse.typeUrl, MsgChannelUpgradeInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInitResponse.aminoType, MsgChannelUpgradeInitResponse.typeUrl); function createBaseMsgChannelUpgradeTry(): MsgChannelUpgradeTry { return { portId: "", @@ -3310,10 +3314,12 @@ export const MsgChannelUpgradeTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTry", value: MsgChannelUpgradeTry.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTry.typeUrl, MsgChannelUpgradeTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTry.aminoType, MsgChannelUpgradeTry.typeUrl); function createBaseMsgChannelUpgradeTryResponse(): MsgChannelUpgradeTryResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3412,10 +3418,11 @@ export const MsgChannelUpgradeTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse", value: MsgChannelUpgradeTryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTryResponse.typeUrl, MsgChannelUpgradeTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTryResponse.aminoType, MsgChannelUpgradeTryResponse.typeUrl); function createBaseMsgChannelUpgradeAck(): MsgChannelUpgradeAck { return { portId: "", @@ -3562,10 +3569,12 @@ export const MsgChannelUpgradeAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAck", value: MsgChannelUpgradeAck.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAck.typeUrl, MsgChannelUpgradeAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAck.aminoType, MsgChannelUpgradeAck.typeUrl); function createBaseMsgChannelUpgradeAckResponse(): MsgChannelUpgradeAckResponse { return { result: 0 @@ -3640,10 +3649,9 @@ export const MsgChannelUpgradeAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse", value: MsgChannelUpgradeAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAckResponse.typeUrl, MsgChannelUpgradeAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAckResponse.aminoType, MsgChannelUpgradeAckResponse.typeUrl); function createBaseMsgChannelUpgradeConfirm(): MsgChannelUpgradeConfirm { return { portId: "", @@ -3802,10 +3810,12 @@ export const MsgChannelUpgradeConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirm", value: MsgChannelUpgradeConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirm.typeUrl, MsgChannelUpgradeConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirm.aminoType, MsgChannelUpgradeConfirm.typeUrl); function createBaseMsgChannelUpgradeConfirmResponse(): MsgChannelUpgradeConfirmResponse { return { result: 0 @@ -3880,10 +3890,9 @@ export const MsgChannelUpgradeConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", value: MsgChannelUpgradeConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirmResponse.typeUrl, MsgChannelUpgradeConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirmResponse.aminoType, MsgChannelUpgradeConfirmResponse.typeUrl); function createBaseMsgChannelUpgradeOpen(): MsgChannelUpgradeOpen { return { portId: "", @@ -4030,10 +4039,11 @@ export const MsgChannelUpgradeOpen = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpen", value: MsgChannelUpgradeOpen.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpen.typeUrl, MsgChannelUpgradeOpen); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpen.aminoType, MsgChannelUpgradeOpen.typeUrl); function createBaseMsgChannelUpgradeOpenResponse(): MsgChannelUpgradeOpenResponse { return {}; } @@ -4095,10 +4105,9 @@ export const MsgChannelUpgradeOpenResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", value: MsgChannelUpgradeOpenResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpenResponse.typeUrl, MsgChannelUpgradeOpenResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpenResponse.aminoType, MsgChannelUpgradeOpenResponse.typeUrl); function createBaseMsgChannelUpgradeTimeout(): MsgChannelUpgradeTimeout { return { portId: "", @@ -4233,10 +4242,12 @@ export const MsgChannelUpgradeTimeout = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeout", value: MsgChannelUpgradeTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeout.typeUrl, MsgChannelUpgradeTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeout.aminoType, MsgChannelUpgradeTimeout.typeUrl); function createBaseMsgChannelUpgradeTimeoutResponse(): MsgChannelUpgradeTimeoutResponse { return {}; } @@ -4298,10 +4309,9 @@ export const MsgChannelUpgradeTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", value: MsgChannelUpgradeTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeoutResponse.typeUrl, MsgChannelUpgradeTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeoutResponse.aminoType, MsgChannelUpgradeTimeoutResponse.typeUrl); function createBaseMsgChannelUpgradeCancel(): MsgChannelUpgradeCancel { return { portId: "", @@ -4436,10 +4446,12 @@ export const MsgChannelUpgradeCancel = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancel", value: MsgChannelUpgradeCancel.encode(message).finish() }; + }, + registerTypeUrl() { + ErrorReceipt.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancel.typeUrl, MsgChannelUpgradeCancel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancel.aminoType, MsgChannelUpgradeCancel.typeUrl); function createBaseMsgChannelUpgradeCancelResponse(): MsgChannelUpgradeCancelResponse { return {}; } @@ -4501,10 +4513,9 @@ export const MsgChannelUpgradeCancelResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", value: MsgChannelUpgradeCancelResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancelResponse.typeUrl, MsgChannelUpgradeCancelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancelResponse.aminoType, MsgChannelUpgradeCancelResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -4591,10 +4602,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -4656,10 +4668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgPruneAcknowledgements(): MsgPruneAcknowledgements { return { portId: "", @@ -4770,10 +4781,9 @@ export const MsgPruneAcknowledgements = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgements", value: MsgPruneAcknowledgements.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAcknowledgements.typeUrl, MsgPruneAcknowledgements); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgements.aminoType, MsgPruneAcknowledgements.typeUrl); function createBaseMsgPruneAcknowledgementsResponse(): MsgPruneAcknowledgementsResponse { return { totalPrunedSequences: BigInt(0), @@ -4860,7 +4870,6 @@ export const MsgPruneAcknowledgementsResponse = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", value: MsgPruneAcknowledgementsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAcknowledgementsResponse.typeUrl, MsgPruneAcknowledgementsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgementsResponse.aminoType, MsgPruneAcknowledgementsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/channel/v1/upgrade.ts b/libs/injectivejs/src/ibc/core/channel/v1/upgrade.ts index 8ce98e36..4b7a4477 100644 --- a/libs/injectivejs/src/ibc/core/channel/v1/upgrade.ts +++ b/libs/injectivejs/src/ibc/core/channel/v1/upgrade.ts @@ -1,7 +1,6 @@ import { Timeout, TimeoutAmino, Order } from "./channel"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Upgrade is a verifiable type which contains the relevant information * for an attempted upgrade. It provides the proposed changes to the channel @@ -188,10 +187,12 @@ export const Upgrade = { typeUrl: "/ibc.core.channel.v1.Upgrade", value: Upgrade.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Timeout.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Upgrade.typeUrl, Upgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(Upgrade.aminoType, Upgrade.typeUrl); function createBaseUpgradeFields(): UpgradeFields { return { ordering: 0, @@ -292,10 +293,9 @@ export const UpgradeFields = { typeUrl: "/ibc.core.channel.v1.UpgradeFields", value: UpgradeFields.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UpgradeFields.typeUrl, UpgradeFields); -GlobalDecoderRegistry.registerAminoProtoMapping(UpgradeFields.aminoType, UpgradeFields.typeUrl); function createBaseErrorReceipt(): ErrorReceipt { return { sequence: BigInt(0), @@ -382,7 +382,6 @@ export const ErrorReceipt = { typeUrl: "/ibc.core.channel.v1.ErrorReceipt", value: ErrorReceipt.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ErrorReceipt.typeUrl, ErrorReceipt); -GlobalDecoderRegistry.registerAminoProtoMapping(ErrorReceipt.aminoType, ErrorReceipt.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/client/v1/client.ts b/libs/injectivejs/src/ibc/core/client/v1/client.ts index f6c36539..326bb611 100644 --- a/libs/injectivejs/src/ibc/core/client/v1/client.ts +++ b/libs/injectivejs/src/ibc/core/client/v1/client.ts @@ -1,7 +1,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * IdentifiedClientState defines a client state with an additional client * identifier field. @@ -248,10 +247,9 @@ export const IdentifiedClientState = { typeUrl: "/ibc.core.client.v1.IdentifiedClientState", value: IdentifiedClientState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IdentifiedClientState.typeUrl, IdentifiedClientState); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedClientState.aminoType, IdentifiedClientState.typeUrl); function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { return { height: Height.fromPartial({}), @@ -338,10 +336,9 @@ export const ConsensusStateWithHeight = { typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", value: ConsensusStateWithHeight.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConsensusStateWithHeight.typeUrl, ConsensusStateWithHeight); -GlobalDecoderRegistry.registerAminoProtoMapping(ConsensusStateWithHeight.aminoType, ConsensusStateWithHeight.typeUrl); function createBaseClientConsensusStates(): ClientConsensusStates { return { clientId: "", @@ -430,10 +427,11 @@ export const ClientConsensusStates = { typeUrl: "/ibc.core.client.v1.ClientConsensusStates", value: ClientConsensusStates.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusStateWithHeight.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ClientConsensusStates.typeUrl, ClientConsensusStates); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientConsensusStates.aminoType, ClientConsensusStates.typeUrl); function createBaseHeight(): Height { return { revisionNumber: BigInt(0), @@ -516,10 +514,9 @@ export const Height = { typeUrl: "/ibc.core.client.v1.Height", value: Height.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Height.typeUrl, Height); -GlobalDecoderRegistry.registerAminoProtoMapping(Height.aminoType, Height.typeUrl); function createBaseParams(): Params { return { allowedClients: [] @@ -596,7 +593,6 @@ export const Params = { typeUrl: "/ibc.core.client.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/client/v1/tx.rpc.func.ts b/libs/injectivejs/src/ibc/core/client/v1/tx.rpc.func.ts index a178d5d2..456651dd 100644 --- a/libs/injectivejs/src/ibc/core/client/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/ibc/core/client/v1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createCreateClient = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgCreateClient.typeUrl, encoders: toEncoders(MsgCreateClient), - converters: toConverters(MsgCreateClient) + converters: toConverters(MsgCreateClient), + deps: [MsgCreateClient] }); export const createUpdateClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateClient.typeUrl, encoders: toEncoders(MsgUpdateClient), - converters: toConverters(MsgUpdateClient) + converters: toConverters(MsgUpdateClient), + deps: [MsgUpdateClient] }); export const createUpgradeClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpgradeClient.typeUrl, encoders: toEncoders(MsgUpgradeClient), - converters: toConverters(MsgUpgradeClient) + converters: toConverters(MsgUpgradeClient), + deps: [MsgUpgradeClient] }); export const createSubmitMisbehaviour = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitMisbehaviour.typeUrl, encoders: toEncoders(MsgSubmitMisbehaviour), - converters: toConverters(MsgSubmitMisbehaviour) + converters: toConverters(MsgSubmitMisbehaviour), + deps: [MsgSubmitMisbehaviour] }); export const createRecoverClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRecoverClient.typeUrl, encoders: toEncoders(MsgRecoverClient), - converters: toConverters(MsgRecoverClient) + converters: toConverters(MsgRecoverClient), + deps: [MsgRecoverClient] }); export const createIBCSoftwareUpgrade = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgIBCSoftwareUpgrade.typeUrl, encoders: toEncoders(MsgIBCSoftwareUpgrade), - converters: toConverters(MsgIBCSoftwareUpgrade) + converters: toConverters(MsgIBCSoftwareUpgrade), + deps: [MsgIBCSoftwareUpgrade] }); export const createUpdateClientParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/client/v1/tx.ts b/libs/injectivejs/src/ibc/core/client/v1/tx.ts index c0281aac..99b3dca1 100644 --- a/libs/injectivejs/src/ibc/core/client/v1/tx.ts +++ b/libs/injectivejs/src/ibc/core/client/v1/tx.ts @@ -3,7 +3,6 @@ import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import { Params, ParamsAmino } from "./client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** MsgCreateClient defines a message to create an IBC client */ export interface MsgCreateClient { /** light client state */ @@ -450,10 +449,9 @@ export const MsgCreateClient = { typeUrl: "/ibc.core.client.v1.MsgCreateClient", value: MsgCreateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClient.typeUrl, MsgCreateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClient.aminoType, MsgCreateClient.typeUrl); function createBaseMsgCreateClientResponse(): MsgCreateClientResponse { return { clientId: "" @@ -528,10 +526,9 @@ export const MsgCreateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", value: MsgCreateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClientResponse.typeUrl, MsgCreateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClientResponse.aminoType, MsgCreateClientResponse.typeUrl); function createBaseMsgUpdateClient(): MsgUpdateClient { return { clientId: "", @@ -630,10 +627,9 @@ export const MsgUpdateClient = { typeUrl: "/ibc.core.client.v1.MsgUpdateClient", value: MsgUpdateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClient.typeUrl, MsgUpdateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClient.aminoType, MsgUpdateClient.typeUrl); function createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse { return {}; } @@ -695,10 +691,9 @@ export const MsgUpdateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", value: MsgUpdateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClientResponse.typeUrl, MsgUpdateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClientResponse.aminoType, MsgUpdateClientResponse.typeUrl); function createBaseMsgUpgradeClient(): MsgUpgradeClient { return { clientId: "", @@ -833,10 +828,9 @@ export const MsgUpgradeClient = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", value: MsgUpgradeClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClient.typeUrl, MsgUpgradeClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClient.aminoType, MsgUpgradeClient.typeUrl); function createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse { return {}; } @@ -898,10 +892,9 @@ export const MsgUpgradeClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", value: MsgUpgradeClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClientResponse.typeUrl, MsgUpgradeClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClientResponse.aminoType, MsgUpgradeClientResponse.typeUrl); function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { return { clientId: "", @@ -1000,10 +993,9 @@ export const MsgSubmitMisbehaviour = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", value: MsgSubmitMisbehaviour.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviour.typeUrl, MsgSubmitMisbehaviour); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviour.aminoType, MsgSubmitMisbehaviour.typeUrl); function createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourResponse { return {}; } @@ -1065,10 +1057,9 @@ export const MsgSubmitMisbehaviourResponse = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", value: MsgSubmitMisbehaviourResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviourResponse.typeUrl, MsgSubmitMisbehaviourResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviourResponse.aminoType, MsgSubmitMisbehaviourResponse.typeUrl); function createBaseMsgRecoverClient(): MsgRecoverClient { return { subjectClientId: "", @@ -1167,10 +1158,9 @@ export const MsgRecoverClient = { typeUrl: "/ibc.core.client.v1.MsgRecoverClient", value: MsgRecoverClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClient.typeUrl, MsgRecoverClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClient.aminoType, MsgRecoverClient.typeUrl); function createBaseMsgRecoverClientResponse(): MsgRecoverClientResponse { return {}; } @@ -1232,10 +1222,9 @@ export const MsgRecoverClientResponse = { typeUrl: "/ibc.core.client.v1.MsgRecoverClientResponse", value: MsgRecoverClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClientResponse.typeUrl, MsgRecoverClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClientResponse.aminoType, MsgRecoverClientResponse.typeUrl); function createBaseMsgIBCSoftwareUpgrade(): MsgIBCSoftwareUpgrade { return { plan: Plan.fromPartial({}), @@ -1334,10 +1323,9 @@ export const MsgIBCSoftwareUpgrade = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgrade", value: MsgIBCSoftwareUpgrade.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgrade.typeUrl, MsgIBCSoftwareUpgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgrade.aminoType, MsgIBCSoftwareUpgrade.typeUrl); function createBaseMsgIBCSoftwareUpgradeResponse(): MsgIBCSoftwareUpgradeResponse { return {}; } @@ -1399,10 +1387,9 @@ export const MsgIBCSoftwareUpgradeResponse = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse", value: MsgIBCSoftwareUpgradeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgradeResponse.typeUrl, MsgIBCSoftwareUpgradeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgradeResponse.aminoType, MsgIBCSoftwareUpgradeResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1489,10 +1476,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.client.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1554,7 +1542,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/commitment/v1/commitment.ts b/libs/injectivejs/src/ibc/core/commitment/v1/commitment.ts index 051efcdf..b66229f3 100644 --- a/libs/injectivejs/src/ibc/core/commitment/v1/commitment.ts +++ b/libs/injectivejs/src/ibc/core/commitment/v1/commitment.ts @@ -1,7 +1,6 @@ import { CommitmentProof, CommitmentProofAmino } from "../../../../cosmos/ics23/v1/proofs"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MerkleRoot defines a merkle root hash. * In the Cosmos SDK, the AppHash of a block header becomes the root. @@ -150,10 +149,9 @@ export const MerkleRoot = { typeUrl: "/ibc.core.commitment.v1.MerkleRoot", value: MerkleRoot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerkleRoot.typeUrl, MerkleRoot); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleRoot.aminoType, MerkleRoot.typeUrl); function createBaseMerklePrefix(): MerklePrefix { return { keyPrefix: new Uint8Array() @@ -228,10 +226,9 @@ export const MerklePrefix = { typeUrl: "/ibc.core.commitment.v1.MerklePrefix", value: MerklePrefix.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerklePrefix.typeUrl, MerklePrefix); -GlobalDecoderRegistry.registerAminoProtoMapping(MerklePrefix.aminoType, MerklePrefix.typeUrl); function createBaseMerkleProof(): MerkleProof { return { proofs: [] @@ -308,7 +305,8 @@ export const MerkleProof = { typeUrl: "/ibc.core.commitment.v1.MerkleProof", value: MerkleProof.encode(message).finish() }; + }, + registerTypeUrl() { + CommitmentProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(MerkleProof.typeUrl, MerkleProof); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleProof.aminoType, MerkleProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/connection/v1/connection.ts b/libs/injectivejs/src/ibc/core/connection/v1/connection.ts index 1791709d..ed473558 100644 --- a/libs/injectivejs/src/ibc/core/connection/v1/connection.ts +++ b/libs/injectivejs/src/ibc/core/connection/v1/connection.ts @@ -1,7 +1,6 @@ import { MerklePrefix, MerklePrefixAmino } from "../../commitment/v1/commitment"; import { isSet, DeepPartial } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a connection is in one of the following states: * INIT, TRYOPEN, OPEN or UNINITIALIZED. @@ -420,10 +419,12 @@ export const ConnectionEnd = { typeUrl: "/ibc.core.connection.v1.ConnectionEnd", value: ConnectionEnd.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConnectionEnd.typeUrl, ConnectionEnd); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionEnd.aminoType, ConnectionEnd.typeUrl); function createBaseIdentifiedConnection(): IdentifiedConnection { return { id: "", @@ -560,10 +561,12 @@ export const IdentifiedConnection = { typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", value: IdentifiedConnection.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedConnection.typeUrl, IdentifiedConnection); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedConnection.aminoType, IdentifiedConnection.typeUrl); function createBaseCounterparty(): Counterparty { return { clientId: "", @@ -662,10 +665,11 @@ export const Counterparty = { typeUrl: "/ibc.core.connection.v1.Counterparty", value: Counterparty.encode(message).finish() }; + }, + registerTypeUrl() { + MerklePrefix.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBaseClientPaths(): ClientPaths { return { paths: [] @@ -742,10 +746,9 @@ export const ClientPaths = { typeUrl: "/ibc.core.connection.v1.ClientPaths", value: ClientPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ClientPaths.typeUrl, ClientPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientPaths.aminoType, ClientPaths.typeUrl); function createBaseConnectionPaths(): ConnectionPaths { return { clientId: "", @@ -834,10 +837,9 @@ export const ConnectionPaths = { typeUrl: "/ibc.core.connection.v1.ConnectionPaths", value: ConnectionPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConnectionPaths.typeUrl, ConnectionPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionPaths.aminoType, ConnectionPaths.typeUrl); function createBaseVersion(): Version { return { identifier: "", @@ -926,10 +928,9 @@ export const Version = { typeUrl: "/ibc.core.connection.v1.Version", value: Version.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Version.typeUrl, Version); -GlobalDecoderRegistry.registerAminoProtoMapping(Version.aminoType, Version.typeUrl); function createBaseParams(): Params { return { maxExpectedTimePerBlock: BigInt(0) @@ -1004,7 +1005,6 @@ export const Params = { typeUrl: "/ibc.core.connection.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/connection/v1/tx.rpc.func.ts b/libs/injectivejs/src/ibc/core/connection/v1/tx.rpc.func.ts index c6b7e37d..6ee23357 100644 --- a/libs/injectivejs/src/ibc/core/connection/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/ibc/core/connection/v1/tx.rpc.func.ts @@ -5,29 +5,34 @@ export const createConnectionOpenInit = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgConnectionOpenInit.typeUrl, encoders: toEncoders(MsgConnectionOpenInit), - converters: toConverters(MsgConnectionOpenInit) + converters: toConverters(MsgConnectionOpenInit), + deps: [MsgConnectionOpenInit] }); export const createConnectionOpenTry = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenTry.typeUrl, encoders: toEncoders(MsgConnectionOpenTry), - converters: toConverters(MsgConnectionOpenTry) + converters: toConverters(MsgConnectionOpenTry), + deps: [MsgConnectionOpenTry] }); export const createConnectionOpenAck = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenAck.typeUrl, encoders: toEncoders(MsgConnectionOpenAck), - converters: toConverters(MsgConnectionOpenAck) + converters: toConverters(MsgConnectionOpenAck), + deps: [MsgConnectionOpenAck] }); export const createConnectionOpenConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenConfirm.typeUrl, encoders: toEncoders(MsgConnectionOpenConfirm), - converters: toConverters(MsgConnectionOpenConfirm) + converters: toConverters(MsgConnectionOpenConfirm), + deps: [MsgConnectionOpenConfirm] }); export const createUpdateConnectionParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/ibc/core/connection/v1/tx.ts b/libs/injectivejs/src/ibc/core/connection/v1/tx.ts index fd194d48..82afa89d 100644 --- a/libs/injectivejs/src/ibc/core/connection/v1/tx.ts +++ b/libs/injectivejs/src/ibc/core/connection/v1/tx.ts @@ -3,7 +3,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to * initialize a connection with Chain B. @@ -436,10 +435,12 @@ export const MsgConnectionOpenInit = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", value: MsgConnectionOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenInit.typeUrl, MsgConnectionOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInit.aminoType, MsgConnectionOpenInit.typeUrl); function createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitResponse { return {}; } @@ -501,10 +502,9 @@ export const MsgConnectionOpenInitResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", value: MsgConnectionOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenInitResponse.typeUrl, MsgConnectionOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInitResponse.aminoType, MsgConnectionOpenInitResponse.typeUrl); function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { return { clientId: "", @@ -725,10 +725,13 @@ export const MsgConnectionOpenTry = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", value: MsgConnectionOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenTry.typeUrl, MsgConnectionOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTry.aminoType, MsgConnectionOpenTry.typeUrl); function createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse { return {}; } @@ -790,10 +793,9 @@ export const MsgConnectionOpenTryResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", value: MsgConnectionOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenTryResponse.typeUrl, MsgConnectionOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTryResponse.aminoType, MsgConnectionOpenTryResponse.typeUrl); function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { return { connectionId: "", @@ -988,10 +990,11 @@ export const MsgConnectionOpenAck = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", value: MsgConnectionOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenAck.typeUrl, MsgConnectionOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAck.aminoType, MsgConnectionOpenAck.typeUrl); function createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse { return {}; } @@ -1053,10 +1056,9 @@ export const MsgConnectionOpenAckResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", value: MsgConnectionOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenAckResponse.typeUrl, MsgConnectionOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAckResponse.aminoType, MsgConnectionOpenAckResponse.typeUrl); function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { return { connectionId: "", @@ -1167,10 +1169,11 @@ export const MsgConnectionOpenConfirm = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", value: MsgConnectionOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirm.typeUrl, MsgConnectionOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirm.aminoType, MsgConnectionOpenConfirm.typeUrl); function createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmResponse { return {}; } @@ -1232,10 +1235,9 @@ export const MsgConnectionOpenConfirmResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", value: MsgConnectionOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirmResponse.typeUrl, MsgConnectionOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirmResponse.aminoType, MsgConnectionOpenConfirmResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1322,10 +1324,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1387,7 +1390,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/auction/v1beta1/auction.ts b/libs/injectivejs/src/injective/auction/v1beta1/auction.ts index 7fd1367f..6251b329 100644 --- a/libs/injectivejs/src/injective/auction/v1beta1/auction.ts +++ b/libs/injectivejs/src/injective/auction/v1beta1/auction.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { /** auction_period_duration defines the auction period duration */ auctionPeriod: bigint; @@ -226,10 +225,9 @@ export const Params = { typeUrl: "/injective.auction.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseBid(): Bid { return { bidder: "", @@ -309,9 +307,9 @@ export const Bid = { typeUrl: "/injective.auction.v1beta1.Bid", value: Bid.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bid.typeUrl, Bid); function createBaseLastAuctionResult(): LastAuctionResult { return { winner: "", @@ -403,9 +401,9 @@ export const LastAuctionResult = { typeUrl: "/injective.auction.v1beta1.LastAuctionResult", value: LastAuctionResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LastAuctionResult.typeUrl, LastAuctionResult); function createBaseEventBid(): EventBid { return { bidder: "", @@ -497,9 +495,9 @@ export const EventBid = { typeUrl: "/injective.auction.v1beta1.EventBid", value: EventBid.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBid.typeUrl, EventBid); function createBaseEventAuctionResult(): EventAuctionResult { return { winner: "", @@ -591,9 +589,9 @@ export const EventAuctionResult = { typeUrl: "/injective.auction.v1beta1.EventAuctionResult", value: EventAuctionResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAuctionResult.typeUrl, EventAuctionResult); function createBaseEventAuctionStart(): EventAuctionStart { return { round: BigInt(0), @@ -687,6 +685,8 @@ export const EventAuctionStart = { typeUrl: "/injective.auction.v1beta1.EventAuctionStart", value: EventAuctionStart.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventAuctionStart.typeUrl, EventAuctionStart); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/auction/v1beta1/genesis.ts b/libs/injectivejs/src/injective/auction/v1beta1/genesis.ts index 6ea94963..25c77c67 100644 --- a/libs/injectivejs/src/injective/auction/v1beta1/genesis.ts +++ b/libs/injectivejs/src/injective/auction/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, Bid, BidAmino, LastAuctionResult, LastAuctionResultAmino } from "./auction"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the auction module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to auction. */ @@ -151,6 +150,10 @@ export const GenesisState = { typeUrl: "/injective.auction.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + Bid.registerTypeUrl(); + LastAuctionResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/auction/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/injective/auction/v1beta1/query.rpc.func.ts index 831e714f..aef87a11 100644 --- a/libs/injectivejs/src/injective/auction/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/auction/v1beta1/query.rpc.func.ts @@ -5,26 +5,30 @@ export const createGetAuctionParams = (clientResolver?: RpcResolver) => buildQue decode: QueryAuctionParamsResponse.decode, service: "injective.auction.v1beta1.Query", method: "AuctionParams", - clientResolver + clientResolver, + deps: [QueryAuctionParamsRequest, QueryAuctionParamsResponse] }); export const createGetCurrentAuctionBasket = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCurrentAuctionBasketRequest.encode, decode: QueryCurrentAuctionBasketResponse.decode, service: "injective.auction.v1beta1.Query", method: "CurrentAuctionBasket", - clientResolver + clientResolver, + deps: [QueryCurrentAuctionBasketRequest, QueryCurrentAuctionBasketResponse] }); export const createGetAuctionModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.auction.v1beta1.Query", method: "AuctionModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const createGetLastAuctionResult = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryLastAuctionResultRequest.encode, decode: QueryLastAuctionResultResponse.decode, service: "injective.auction.v1beta1.Query", method: "LastAuctionResult", - clientResolver + clientResolver, + deps: [QueryLastAuctionResultRequest, QueryLastAuctionResultResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/auction/v1beta1/query.ts b/libs/injectivejs/src/injective/auction/v1beta1/query.ts index 723f9496..131df2e4 100644 --- a/libs/injectivejs/src/injective/auction/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/auction/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * QueryAuctionParamsRequest is the request type for the Query/AuctionParams RPC * method. @@ -220,9 +219,9 @@ export const QueryAuctionParamsRequest = { typeUrl: "/injective.auction.v1beta1.QueryAuctionParamsRequest", value: QueryAuctionParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAuctionParamsRequest.typeUrl, QueryAuctionParamsRequest); function createBaseQueryAuctionParamsResponse(): QueryAuctionParamsResponse { return { params: Params.fromPartial({}) @@ -290,9 +289,11 @@ export const QueryAuctionParamsResponse = { typeUrl: "/injective.auction.v1beta1.QueryAuctionParamsResponse", value: QueryAuctionParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAuctionParamsResponse.typeUrl, QueryAuctionParamsResponse); function createBaseQueryCurrentAuctionBasketRequest(): QueryCurrentAuctionBasketRequest { return {}; } @@ -347,9 +348,9 @@ export const QueryCurrentAuctionBasketRequest = { typeUrl: "/injective.auction.v1beta1.QueryCurrentAuctionBasketRequest", value: QueryCurrentAuctionBasketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCurrentAuctionBasketRequest.typeUrl, QueryCurrentAuctionBasketRequest); function createBaseQueryCurrentAuctionBasketResponse(): QueryCurrentAuctionBasketResponse { return { amount: [], @@ -467,9 +468,11 @@ export const QueryCurrentAuctionBasketResponse = { typeUrl: "/injective.auction.v1beta1.QueryCurrentAuctionBasketResponse", value: QueryCurrentAuctionBasketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCurrentAuctionBasketResponse.typeUrl, QueryCurrentAuctionBasketResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -524,9 +527,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.auction.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -594,9 +597,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.auction.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryLastAuctionResultRequest(): QueryLastAuctionResultRequest { return {}; } @@ -651,9 +656,9 @@ export const QueryLastAuctionResultRequest = { typeUrl: "/injective.auction.v1beta1.QueryLastAuctionResultRequest", value: QueryLastAuctionResultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastAuctionResultRequest.typeUrl, QueryLastAuctionResultRequest); function createBaseQueryLastAuctionResultResponse(): QueryLastAuctionResultResponse { return { lastAuctionResult: undefined @@ -721,6 +726,8 @@ export const QueryLastAuctionResultResponse = { typeUrl: "/injective.auction.v1beta1.QueryLastAuctionResultResponse", value: QueryLastAuctionResultResponse.encode(message).finish() }; + }, + registerTypeUrl() { + LastAuctionResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryLastAuctionResultResponse.typeUrl, QueryLastAuctionResultResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/auction/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/injective/auction/v1beta1/tx.rpc.func.ts index b8eb2122..03dbd06e 100644 --- a/libs/injectivejs/src/injective/auction/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/auction/v1beta1/tx.rpc.func.ts @@ -5,11 +5,13 @@ export const createBid = (clientResolver?: SigningClientResolver) => buildTx buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/auction/v1beta1/tx.ts b/libs/injectivejs/src/injective/auction/v1beta1/tx.ts index 9905ad0e..dff99f56 100644 --- a/libs/injectivejs/src/injective/auction/v1beta1/tx.ts +++ b/libs/injectivejs/src/injective/auction/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Params, ParamsAmino } from "./auction"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Bid defines a SDK message for placing a bid for an auction */ export interface MsgBid { sender: string; @@ -173,10 +172,11 @@ export const MsgBid = { typeUrl: "/injective.auction.v1beta1.MsgBid", value: MsgBid.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBid.typeUrl, MsgBid); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBid.aminoType, MsgBid.typeUrl); function createBaseMsgBidResponse(): MsgBidResponse { return {}; } @@ -231,9 +231,9 @@ export const MsgBidResponse = { typeUrl: "/injective.auction.v1beta1.MsgBidResponse", value: MsgBidResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBidResponse.typeUrl, MsgBidResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -320,10 +320,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.auction.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -378,6 +379,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.auction.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts b/libs/injectivejs/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts index 0017ec6a..353000d2 100644 --- a/libs/injectivejs/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts +++ b/libs/injectivejs/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * PubKey defines a type alias for an ecdsa.PublicKey that implements * Tendermint's PubKey interface. It represents the 33-byte compressed public @@ -121,10 +120,9 @@ export const PubKey = { typeUrl: "/injective.crypto.v1beta1.ethsecp256k1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -199,7 +197,6 @@ export const PrivKey = { typeUrl: "/injective.crypto.v1beta1.ethsecp256k1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/authz.ts b/libs/injectivejs/src/injective/exchange/v1beta1/authz.ts index 96f2d111..88521344 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/authz.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/authz.ts @@ -273,10 +273,12 @@ export const CreateSpotLimitOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateSpotLimitOrderAuthz", value: CreateSpotLimitOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateSpotLimitOrderAuthz.typeUrl, CreateSpotLimitOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotLimitOrderAuthz.aminoType, CreateSpotLimitOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateSpotLimitOrderAuthz.typeUrl, CreateSpotLimitOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotLimitOrderAuthz.aminoType, CreateSpotLimitOrderAuthz.typeUrl); function createBaseCreateSpotMarketOrderAuthz(): CreateSpotMarketOrderAuthz { return { subaccountId: "", @@ -365,10 +367,12 @@ export const CreateSpotMarketOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateSpotMarketOrderAuthz", value: CreateSpotMarketOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateSpotMarketOrderAuthz.typeUrl, CreateSpotMarketOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotMarketOrderAuthz.aminoType, CreateSpotMarketOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateSpotMarketOrderAuthz.typeUrl, CreateSpotMarketOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateSpotMarketOrderAuthz.aminoType, CreateSpotMarketOrderAuthz.typeUrl); function createBaseBatchCreateSpotLimitOrdersAuthz(): BatchCreateSpotLimitOrdersAuthz { return { subaccountId: "", @@ -457,10 +461,12 @@ export const BatchCreateSpotLimitOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCreateSpotLimitOrdersAuthz", value: BatchCreateSpotLimitOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCreateSpotLimitOrdersAuthz.typeUrl, BatchCreateSpotLimitOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateSpotLimitOrdersAuthz.aminoType, BatchCreateSpotLimitOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCreateSpotLimitOrdersAuthz.typeUrl, BatchCreateSpotLimitOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateSpotLimitOrdersAuthz.aminoType, BatchCreateSpotLimitOrdersAuthz.typeUrl); function createBaseCancelSpotOrderAuthz(): CancelSpotOrderAuthz { return { subaccountId: "", @@ -549,10 +555,12 @@ export const CancelSpotOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CancelSpotOrderAuthz", value: CancelSpotOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelSpotOrderAuthz.typeUrl, CancelSpotOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelSpotOrderAuthz.aminoType, CancelSpotOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CancelSpotOrderAuthz.typeUrl, CancelSpotOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelSpotOrderAuthz.aminoType, CancelSpotOrderAuthz.typeUrl); function createBaseBatchCancelSpotOrdersAuthz(): BatchCancelSpotOrdersAuthz { return { subaccountId: "", @@ -641,10 +649,12 @@ export const BatchCancelSpotOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCancelSpotOrdersAuthz", value: BatchCancelSpotOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCancelSpotOrdersAuthz.typeUrl, BatchCancelSpotOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelSpotOrdersAuthz.aminoType, BatchCancelSpotOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCancelSpotOrdersAuthz.typeUrl, BatchCancelSpotOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelSpotOrdersAuthz.aminoType, BatchCancelSpotOrdersAuthz.typeUrl); function createBaseCreateDerivativeLimitOrderAuthz(): CreateDerivativeLimitOrderAuthz { return { subaccountId: "", @@ -733,10 +743,12 @@ export const CreateDerivativeLimitOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateDerivativeLimitOrderAuthz", value: CreateDerivativeLimitOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateDerivativeLimitOrderAuthz.typeUrl, CreateDerivativeLimitOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeLimitOrderAuthz.aminoType, CreateDerivativeLimitOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateDerivativeLimitOrderAuthz.typeUrl, CreateDerivativeLimitOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeLimitOrderAuthz.aminoType, CreateDerivativeLimitOrderAuthz.typeUrl); function createBaseCreateDerivativeMarketOrderAuthz(): CreateDerivativeMarketOrderAuthz { return { subaccountId: "", @@ -825,10 +837,12 @@ export const CreateDerivativeMarketOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CreateDerivativeMarketOrderAuthz", value: CreateDerivativeMarketOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CreateDerivativeMarketOrderAuthz.typeUrl, CreateDerivativeMarketOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeMarketOrderAuthz.aminoType, CreateDerivativeMarketOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CreateDerivativeMarketOrderAuthz.typeUrl, CreateDerivativeMarketOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CreateDerivativeMarketOrderAuthz.aminoType, CreateDerivativeMarketOrderAuthz.typeUrl); function createBaseBatchCreateDerivativeLimitOrdersAuthz(): BatchCreateDerivativeLimitOrdersAuthz { return { subaccountId: "", @@ -917,10 +931,12 @@ export const BatchCreateDerivativeLimitOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCreateDerivativeLimitOrdersAuthz", value: BatchCreateDerivativeLimitOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCreateDerivativeLimitOrdersAuthz.typeUrl, BatchCreateDerivativeLimitOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateDerivativeLimitOrdersAuthz.aminoType, BatchCreateDerivativeLimitOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCreateDerivativeLimitOrdersAuthz.typeUrl, BatchCreateDerivativeLimitOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCreateDerivativeLimitOrdersAuthz.aminoType, BatchCreateDerivativeLimitOrdersAuthz.typeUrl); function createBaseCancelDerivativeOrderAuthz(): CancelDerivativeOrderAuthz { return { subaccountId: "", @@ -1009,10 +1025,12 @@ export const CancelDerivativeOrderAuthz = { typeUrl: "/injective.exchange.v1beta1.CancelDerivativeOrderAuthz", value: CancelDerivativeOrderAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelDerivativeOrderAuthz.typeUrl, CancelDerivativeOrderAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelDerivativeOrderAuthz.aminoType, CancelDerivativeOrderAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(CancelDerivativeOrderAuthz.typeUrl, CancelDerivativeOrderAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelDerivativeOrderAuthz.aminoType, CancelDerivativeOrderAuthz.typeUrl); function createBaseBatchCancelDerivativeOrdersAuthz(): BatchCancelDerivativeOrdersAuthz { return { subaccountId: "", @@ -1101,10 +1119,12 @@ export const BatchCancelDerivativeOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchCancelDerivativeOrdersAuthz", value: BatchCancelDerivativeOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCancelDerivativeOrdersAuthz.typeUrl, BatchCancelDerivativeOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelDerivativeOrdersAuthz.aminoType, BatchCancelDerivativeOrdersAuthz.typeUrl); } }; -GlobalDecoderRegistry.register(BatchCancelDerivativeOrdersAuthz.typeUrl, BatchCancelDerivativeOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCancelDerivativeOrdersAuthz.aminoType, BatchCancelDerivativeOrdersAuthz.typeUrl); function createBaseBatchUpdateOrdersAuthz(): BatchUpdateOrdersAuthz { return { subaccountId: "", @@ -1207,7 +1227,9 @@ export const BatchUpdateOrdersAuthz = { typeUrl: "/injective.exchange.v1beta1.BatchUpdateOrdersAuthz", value: BatchUpdateOrdersAuthz.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchUpdateOrdersAuthz.typeUrl, BatchUpdateOrdersAuthz); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchUpdateOrdersAuthz.aminoType, BatchUpdateOrdersAuthz.typeUrl); } -}; -GlobalDecoderRegistry.register(BatchUpdateOrdersAuthz.typeUrl, BatchUpdateOrdersAuthz); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchUpdateOrdersAuthz.aminoType, BatchUpdateOrdersAuthz.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/events.ts b/libs/injectivejs/src/injective/exchange/v1beta1/events.ts index 133514d5..ee7baca9 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/events.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/events.ts @@ -2,7 +2,6 @@ import { ExecutionType, TradeLog, TradeLogAmino, DerivativeTradeLog, DerivativeT import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventBatchSpotExecution { marketId: string; isBuy: boolean; @@ -748,9 +747,11 @@ export const EventBatchSpotExecution = { typeUrl: "/injective.exchange.v1beta1.EventBatchSpotExecution", value: EventBatchSpotExecution.encode(message).finish() }; + }, + registerTypeUrl() { + TradeLog.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchSpotExecution.typeUrl, EventBatchSpotExecution); function createBaseEventBatchDerivativeExecution(): EventBatchDerivativeExecution { return { marketId: "", @@ -880,9 +881,11 @@ export const EventBatchDerivativeExecution = { typeUrl: "/injective.exchange.v1beta1.EventBatchDerivativeExecution", value: EventBatchDerivativeExecution.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeTradeLog.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchDerivativeExecution.typeUrl, EventBatchDerivativeExecution); function createBaseEventLostFundsFromLiquidation(): EventLostFundsFromLiquidation { return { marketId: "", @@ -986,9 +989,9 @@ export const EventLostFundsFromLiquidation = { typeUrl: "/injective.exchange.v1beta1.EventLostFundsFromLiquidation", value: EventLostFundsFromLiquidation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventLostFundsFromLiquidation.typeUrl, EventLostFundsFromLiquidation); function createBaseEventBatchDerivativePosition(): EventBatchDerivativePosition { return { marketId: "", @@ -1070,9 +1073,11 @@ export const EventBatchDerivativePosition = { typeUrl: "/injective.exchange.v1beta1.EventBatchDerivativePosition", value: EventBatchDerivativePosition.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountPosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchDerivativePosition.typeUrl, EventBatchDerivativePosition); function createBaseEventDerivativeMarketPaused(): EventDerivativeMarketPaused { return { marketId: "", @@ -1176,9 +1181,9 @@ export const EventDerivativeMarketPaused = { typeUrl: "/injective.exchange.v1beta1.EventDerivativeMarketPaused", value: EventDerivativeMarketPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventDerivativeMarketPaused.typeUrl, EventDerivativeMarketPaused); function createBaseEventMarketBeyondBankruptcy(): EventMarketBeyondBankruptcy { return { marketId: "", @@ -1270,9 +1275,9 @@ export const EventMarketBeyondBankruptcy = { typeUrl: "/injective.exchange.v1beta1.EventMarketBeyondBankruptcy", value: EventMarketBeyondBankruptcy.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventMarketBeyondBankruptcy.typeUrl, EventMarketBeyondBankruptcy); function createBaseEventAllPositionsHaircut(): EventAllPositionsHaircut { return { marketId: "", @@ -1364,9 +1369,9 @@ export const EventAllPositionsHaircut = { typeUrl: "/injective.exchange.v1beta1.EventAllPositionsHaircut", value: EventAllPositionsHaircut.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAllPositionsHaircut.typeUrl, EventAllPositionsHaircut); function createBaseEventBinaryOptionsMarketUpdate(): EventBinaryOptionsMarketUpdate { return { market: BinaryOptionsMarket.fromPartial({}) @@ -1434,9 +1439,11 @@ export const EventBinaryOptionsMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventBinaryOptionsMarketUpdate", value: EventBinaryOptionsMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + BinaryOptionsMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBinaryOptionsMarketUpdate.typeUrl, EventBinaryOptionsMarketUpdate); function createBaseEventNewSpotOrders(): EventNewSpotOrders { return { marketId: "", @@ -1532,9 +1539,11 @@ export const EventNewSpotOrders = { typeUrl: "/injective.exchange.v1beta1.EventNewSpotOrders", value: EventNewSpotOrders.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewSpotOrders.typeUrl, EventNewSpotOrders); function createBaseEventNewDerivativeOrders(): EventNewDerivativeOrders { return { marketId: "", @@ -1630,9 +1639,11 @@ export const EventNewDerivativeOrders = { typeUrl: "/injective.exchange.v1beta1.EventNewDerivativeOrders", value: EventNewDerivativeOrders.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewDerivativeOrders.typeUrl, EventNewDerivativeOrders); function createBaseEventCancelSpotOrder(): EventCancelSpotOrder { return { marketId: "", @@ -1712,9 +1723,11 @@ export const EventCancelSpotOrder = { typeUrl: "/injective.exchange.v1beta1.EventCancelSpotOrder", value: EventCancelSpotOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventCancelSpotOrder.typeUrl, EventCancelSpotOrder); function createBaseEventSpotMarketUpdate(): EventSpotMarketUpdate { return { market: SpotMarket.fromPartial({}) @@ -1782,9 +1795,11 @@ export const EventSpotMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventSpotMarketUpdate", value: EventSpotMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSpotMarketUpdate.typeUrl, EventSpotMarketUpdate); function createBaseEventPerpetualMarketUpdate(): EventPerpetualMarketUpdate { return { market: DerivativeMarket.fromPartial({}), @@ -1876,9 +1891,13 @@ export const EventPerpetualMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventPerpetualMarketUpdate", value: EventPerpetualMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarket.registerTypeUrl(); + PerpetualMarketInfo.registerTypeUrl(); + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventPerpetualMarketUpdate.typeUrl, EventPerpetualMarketUpdate); function createBaseEventExpiryFuturesMarketUpdate(): EventExpiryFuturesMarketUpdate { return { market: DerivativeMarket.fromPartial({}), @@ -1958,9 +1977,12 @@ export const EventExpiryFuturesMarketUpdate = { typeUrl: "/injective.exchange.v1beta1.EventExpiryFuturesMarketUpdate", value: EventExpiryFuturesMarketUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarket.registerTypeUrl(); + ExpiryFuturesMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventExpiryFuturesMarketUpdate.typeUrl, EventExpiryFuturesMarketUpdate); function createBaseEventPerpetualMarketFundingUpdate(): EventPerpetualMarketFundingUpdate { return { marketId: "", @@ -2076,9 +2098,11 @@ export const EventPerpetualMarketFundingUpdate = { typeUrl: "/injective.exchange.v1beta1.EventPerpetualMarketFundingUpdate", value: EventPerpetualMarketFundingUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventPerpetualMarketFundingUpdate.typeUrl, EventPerpetualMarketFundingUpdate); function createBaseEventSubaccountDeposit(): EventSubaccountDeposit { return { srcAddress: "", @@ -2170,9 +2194,11 @@ export const EventSubaccountDeposit = { typeUrl: "/injective.exchange.v1beta1.EventSubaccountDeposit", value: EventSubaccountDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSubaccountDeposit.typeUrl, EventSubaccountDeposit); function createBaseEventSubaccountWithdraw(): EventSubaccountWithdraw { return { subaccountId: new Uint8Array(), @@ -2264,9 +2290,11 @@ export const EventSubaccountWithdraw = { typeUrl: "/injective.exchange.v1beta1.EventSubaccountWithdraw", value: EventSubaccountWithdraw.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSubaccountWithdraw.typeUrl, EventSubaccountWithdraw); function createBaseEventSubaccountBalanceTransfer(): EventSubaccountBalanceTransfer { return { srcSubaccountId: "", @@ -2358,9 +2386,11 @@ export const EventSubaccountBalanceTransfer = { typeUrl: "/injective.exchange.v1beta1.EventSubaccountBalanceTransfer", value: EventSubaccountBalanceTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSubaccountBalanceTransfer.typeUrl, EventSubaccountBalanceTransfer); function createBaseEventBatchDepositUpdate(): EventBatchDepositUpdate { return { depositUpdates: [] @@ -2430,9 +2460,11 @@ export const EventBatchDepositUpdate = { typeUrl: "/injective.exchange.v1beta1.EventBatchDepositUpdate", value: EventBatchDepositUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DepositUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBatchDepositUpdate.typeUrl, EventBatchDepositUpdate); function createBaseDerivativeMarketOrderCancel(): DerivativeMarketOrderCancel { return { marketOrder: undefined, @@ -2512,9 +2544,11 @@ export const DerivativeMarketOrderCancel = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketOrderCancel", value: DerivativeMarketOrderCancel.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarketOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketOrderCancel.typeUrl, DerivativeMarketOrderCancel); function createBaseEventCancelDerivativeOrder(): EventCancelDerivativeOrder { return { marketId: "", @@ -2618,9 +2652,12 @@ export const EventCancelDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.EventCancelDerivativeOrder", value: EventCancelDerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); + DerivativeMarketOrderCancel.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventCancelDerivativeOrder.typeUrl, EventCancelDerivativeOrder); function createBaseEventFeeDiscountSchedule(): EventFeeDiscountSchedule { return { schedule: undefined @@ -2688,9 +2725,11 @@ export const EventFeeDiscountSchedule = { typeUrl: "/injective.exchange.v1beta1.EventFeeDiscountSchedule", value: EventFeeDiscountSchedule.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventFeeDiscountSchedule.typeUrl, EventFeeDiscountSchedule); function createBaseEventTradingRewardCampaignUpdate(): EventTradingRewardCampaignUpdate { return { campaignInfo: undefined, @@ -2772,9 +2811,12 @@ export const EventTradingRewardCampaignUpdate = { typeUrl: "/injective.exchange.v1beta1.EventTradingRewardCampaignUpdate", value: EventTradingRewardCampaignUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventTradingRewardCampaignUpdate.typeUrl, EventTradingRewardCampaignUpdate); function createBaseEventTradingRewardDistribution(): EventTradingRewardDistribution { return { accountRewards: [] @@ -2844,9 +2886,11 @@ export const EventTradingRewardDistribution = { typeUrl: "/injective.exchange.v1beta1.EventTradingRewardDistribution", value: EventTradingRewardDistribution.encode(message).finish() }; + }, + registerTypeUrl() { + AccountRewards.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventTradingRewardDistribution.typeUrl, EventTradingRewardDistribution); function createBaseEventNewConditionalDerivativeOrder(): EventNewConditionalDerivativeOrder { return { marketId: "", @@ -2950,9 +2994,11 @@ export const EventNewConditionalDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.EventNewConditionalDerivativeOrder", value: EventNewConditionalDerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewConditionalDerivativeOrder.typeUrl, EventNewConditionalDerivativeOrder); function createBaseEventCancelConditionalDerivativeOrder(): EventCancelConditionalDerivativeOrder { return { marketId: "", @@ -3056,9 +3102,12 @@ export const EventCancelConditionalDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.EventCancelConditionalDerivativeOrder", value: EventCancelConditionalDerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); + DerivativeMarketOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventCancelConditionalDerivativeOrder.typeUrl, EventCancelConditionalDerivativeOrder); function createBaseEventConditionalDerivativeOrderTrigger(): EventConditionalDerivativeOrderTrigger { return { marketId: new Uint8Array(), @@ -3174,9 +3223,9 @@ export const EventConditionalDerivativeOrderTrigger = { typeUrl: "/injective.exchange.v1beta1.EventConditionalDerivativeOrderTrigger", value: EventConditionalDerivativeOrderTrigger.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventConditionalDerivativeOrderTrigger.typeUrl, EventConditionalDerivativeOrderTrigger); function createBaseEventOrderFail(): EventOrderFail { return { account: new Uint8Array(), @@ -3295,9 +3344,9 @@ export const EventOrderFail = { typeUrl: "/injective.exchange.v1beta1.EventOrderFail", value: EventOrderFail.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventOrderFail.typeUrl, EventOrderFail); function createBaseEventAtomicMarketOrderFeeMultipliersUpdated(): EventAtomicMarketOrderFeeMultipliersUpdated { return { marketFeeMultipliers: [] @@ -3367,9 +3416,11 @@ export const EventAtomicMarketOrderFeeMultipliersUpdated = { typeUrl: "/injective.exchange.v1beta1.EventAtomicMarketOrderFeeMultipliersUpdated", value: EventAtomicMarketOrderFeeMultipliersUpdated.encode(message).finish() }; + }, + registerTypeUrl() { + MarketFeeMultiplier.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventAtomicMarketOrderFeeMultipliersUpdated.typeUrl, EventAtomicMarketOrderFeeMultipliersUpdated); function createBaseEventOrderbookUpdate(): EventOrderbookUpdate { return { spotUpdates: [], @@ -3453,9 +3504,11 @@ export const EventOrderbookUpdate = { typeUrl: "/injective.exchange.v1beta1.EventOrderbookUpdate", value: EventOrderbookUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + OrderbookUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventOrderbookUpdate.typeUrl, EventOrderbookUpdate); function createBaseOrderbookUpdate(): OrderbookUpdate { return { seq: BigInt(0), @@ -3535,9 +3588,11 @@ export const OrderbookUpdate = { typeUrl: "/injective.exchange.v1beta1.OrderbookUpdate", value: OrderbookUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + Orderbook.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OrderbookUpdate.typeUrl, OrderbookUpdate); function createBaseOrderbook(): Orderbook { return { marketId: new Uint8Array(), @@ -3633,9 +3688,11 @@ export const Orderbook = { typeUrl: "/injective.exchange.v1beta1.Orderbook", value: Orderbook.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Orderbook.typeUrl, Orderbook); function createBaseEventGrantAuthorizations(): EventGrantAuthorizations { return { granter: "", @@ -3717,9 +3774,11 @@ export const EventGrantAuthorizations = { typeUrl: "/injective.exchange.v1beta1.EventGrantAuthorizations", value: EventGrantAuthorizations.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventGrantAuthorizations.typeUrl, EventGrantAuthorizations); function createBaseEventGrantActivation(): EventGrantActivation { return { grantee: "", @@ -3811,9 +3870,9 @@ export const EventGrantActivation = { typeUrl: "/injective.exchange.v1beta1.EventGrantActivation", value: EventGrantActivation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventGrantActivation.typeUrl, EventGrantActivation); function createBaseEventInvalidGrant(): EventInvalidGrant { return { grantee: "", @@ -3893,9 +3952,9 @@ export const EventInvalidGrant = { typeUrl: "/injective.exchange.v1beta1.EventInvalidGrant", value: EventInvalidGrant.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventInvalidGrant.typeUrl, EventInvalidGrant); function createBaseEventOrderCancelFail(): EventOrderCancelFail { return { marketId: "", @@ -4011,6 +4070,6 @@ export const EventOrderCancelFail = { typeUrl: "/injective.exchange.v1beta1.EventOrderCancelFail", value: EventOrderCancelFail.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EventOrderCancelFail.typeUrl, EventOrderCancelFail); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/exchange.ts b/libs/injectivejs/src/injective/exchange/v1beta1/exchange.ts index a91677d5..8e19e678 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/exchange.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/exchange.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { OracleType } from "../../oracle/v1beta1/oracle"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum AtomicMarketOrderAccessLevel { Nobody = 0, /** BeginBlockerSmartContractsOnly - currently unsupported */ @@ -2391,10 +2390,11 @@ export const Params = { typeUrl: "/injective.exchange.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseMarketFeeMultiplier(): MarketFeeMultiplier { return { marketId: "", @@ -2474,9 +2474,9 @@ export const MarketFeeMultiplier = { typeUrl: "/injective.exchange.v1beta1.MarketFeeMultiplier", value: MarketFeeMultiplier.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MarketFeeMultiplier.typeUrl, MarketFeeMultiplier); function createBaseDerivativeMarket(): DerivativeMarket { return { ticker: "", @@ -2760,9 +2760,9 @@ export const DerivativeMarket = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarket", value: DerivativeMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DerivativeMarket.typeUrl, DerivativeMarket); function createBaseBinaryOptionsMarket(): BinaryOptionsMarket { return { ticker: "", @@ -3046,9 +3046,9 @@ export const BinaryOptionsMarket = { typeUrl: "/injective.exchange.v1beta1.BinaryOptionsMarket", value: BinaryOptionsMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BinaryOptionsMarket.typeUrl, BinaryOptionsMarket); function createBaseExpiryFuturesMarketInfo(): ExpiryFuturesMarketInfo { return { marketId: "", @@ -3164,9 +3164,9 @@ export const ExpiryFuturesMarketInfo = { typeUrl: "/injective.exchange.v1beta1.ExpiryFuturesMarketInfo", value: ExpiryFuturesMarketInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExpiryFuturesMarketInfo.typeUrl, ExpiryFuturesMarketInfo); function createBasePerpetualMarketInfo(): PerpetualMarketInfo { return { marketId: "", @@ -3282,9 +3282,9 @@ export const PerpetualMarketInfo = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketInfo", value: PerpetualMarketInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PerpetualMarketInfo.typeUrl, PerpetualMarketInfo); function createBasePerpetualMarketFunding(): PerpetualMarketFunding { return { cumulativeFunding: "", @@ -3376,9 +3376,9 @@ export const PerpetualMarketFunding = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketFunding", value: PerpetualMarketFunding.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PerpetualMarketFunding.typeUrl, PerpetualMarketFunding); function createBaseDerivativeMarketSettlementInfo(): DerivativeMarketSettlementInfo { return { marketId: "", @@ -3458,9 +3458,9 @@ export const DerivativeMarketSettlementInfo = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketSettlementInfo", value: DerivativeMarketSettlementInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DerivativeMarketSettlementInfo.typeUrl, DerivativeMarketSettlementInfo); function createBaseNextFundingTimestamp(): NextFundingTimestamp { return { nextTimestamp: BigInt(0) @@ -3528,9 +3528,9 @@ export const NextFundingTimestamp = { typeUrl: "/injective.exchange.v1beta1.NextFundingTimestamp", value: NextFundingTimestamp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(NextFundingTimestamp.typeUrl, NextFundingTimestamp); function createBaseMidPriceAndTOB(): MidPriceAndTOB { return { midPrice: undefined, @@ -3622,9 +3622,9 @@ export const MidPriceAndTOB = { typeUrl: "/injective.exchange.v1beta1.MidPriceAndTOB", value: MidPriceAndTOB.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MidPriceAndTOB.typeUrl, MidPriceAndTOB); function createBaseSpotMarket(): SpotMarket { return { ticker: "", @@ -3836,9 +3836,9 @@ export const SpotMarket = { typeUrl: "/injective.exchange.v1beta1.SpotMarket", value: SpotMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SpotMarket.typeUrl, SpotMarket); function createBaseDeposit(): Deposit { return { availableBalance: "", @@ -3918,9 +3918,9 @@ export const Deposit = { typeUrl: "/injective.exchange.v1beta1.Deposit", value: Deposit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); function createBaseSubaccountTradeNonce(): SubaccountTradeNonce { return { nonce: 0 @@ -3988,9 +3988,9 @@ export const SubaccountTradeNonce = { typeUrl: "/injective.exchange.v1beta1.SubaccountTradeNonce", value: SubaccountTradeNonce.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountTradeNonce.typeUrl, SubaccountTradeNonce); function createBaseOrderInfo(): OrderInfo { return { subaccountId: "", @@ -4106,9 +4106,9 @@ export const OrderInfo = { typeUrl: "/injective.exchange.v1beta1.OrderInfo", value: OrderInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderInfo.typeUrl, OrderInfo); function createBaseSpotOrder(): SpotOrder { return { marketId: "", @@ -4212,9 +4212,11 @@ export const SpotOrder = { typeUrl: "/injective.exchange.v1beta1.SpotOrder", value: SpotOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrder.typeUrl, SpotOrder); function createBaseSpotLimitOrder(): SpotLimitOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -4330,9 +4332,11 @@ export const SpotLimitOrder = { typeUrl: "/injective.exchange.v1beta1.SpotLimitOrder", value: SpotLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotLimitOrder.typeUrl, SpotLimitOrder); function createBaseSpotMarketOrder(): SpotMarketOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -4448,9 +4452,11 @@ export const SpotMarketOrder = { typeUrl: "/injective.exchange.v1beta1.SpotMarketOrder", value: SpotMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotMarketOrder.typeUrl, SpotMarketOrder); function createBaseDerivativeOrder(): DerivativeOrder { return { marketId: "", @@ -4566,9 +4572,11 @@ export const DerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.DerivativeOrder", value: DerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrder.typeUrl, DerivativeOrder); function createBaseSubaccountOrderbookMetadata(): SubaccountOrderbookMetadata { return { vanillaLimitOrderCount: 0, @@ -4696,9 +4704,9 @@ export const SubaccountOrderbookMetadata = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrderbookMetadata", value: SubaccountOrderbookMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountOrderbookMetadata.typeUrl, SubaccountOrderbookMetadata); function createBaseSubaccountOrder(): SubaccountOrder { return { price: "", @@ -4802,9 +4810,9 @@ export const SubaccountOrder = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrder", value: SubaccountOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountOrder.typeUrl, SubaccountOrder); function createBaseSubaccountOrderData(): SubaccountOrderData { return { order: undefined, @@ -4884,9 +4892,11 @@ export const SubaccountOrderData = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrderData", value: SubaccountOrderData.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountOrderData.typeUrl, SubaccountOrderData); function createBaseDerivativeLimitOrder(): DerivativeLimitOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -5014,9 +5024,11 @@ export const DerivativeLimitOrder = { typeUrl: "/injective.exchange.v1beta1.DerivativeLimitOrder", value: DerivativeLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeLimitOrder.typeUrl, DerivativeLimitOrder); function createBaseDerivativeMarketOrder(): DerivativeMarketOrder { return { orderInfo: OrderInfo.fromPartial({}), @@ -5144,9 +5156,11 @@ export const DerivativeMarketOrder = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketOrder", value: DerivativeMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + OrderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketOrder.typeUrl, DerivativeMarketOrder); function createBasePosition(): Position { return { isLong: false, @@ -5262,9 +5276,9 @@ export const Position = { typeUrl: "/injective.exchange.v1beta1.Position", value: Position.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Position.typeUrl, Position); function createBaseMarketOrderIndicator(): MarketOrderIndicator { return { marketId: "", @@ -5344,9 +5358,9 @@ export const MarketOrderIndicator = { typeUrl: "/injective.exchange.v1beta1.MarketOrderIndicator", value: MarketOrderIndicator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MarketOrderIndicator.typeUrl, MarketOrderIndicator); function createBaseTradeLog(): TradeLog { return { quantity: "", @@ -5486,9 +5500,9 @@ export const TradeLog = { typeUrl: "/injective.exchange.v1beta1.TradeLog", value: TradeLog.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradeLog.typeUrl, TradeLog); function createBasePositionDelta(): PositionDelta { return { isLong: false, @@ -5592,9 +5606,9 @@ export const PositionDelta = { typeUrl: "/injective.exchange.v1beta1.PositionDelta", value: PositionDelta.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PositionDelta.typeUrl, PositionDelta); function createBaseDerivativeTradeLog(): DerivativeTradeLog { return { subaccountId: new Uint8Array(), @@ -5746,9 +5760,11 @@ export const DerivativeTradeLog = { typeUrl: "/injective.exchange.v1beta1.DerivativeTradeLog", value: DerivativeTradeLog.encode(message).finish() }; + }, + registerTypeUrl() { + PositionDelta.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeTradeLog.typeUrl, DerivativeTradeLog); function createBaseSubaccountPosition(): SubaccountPosition { return { position: undefined, @@ -5828,9 +5844,11 @@ export const SubaccountPosition = { typeUrl: "/injective.exchange.v1beta1.SubaccountPosition", value: SubaccountPosition.encode(message).finish() }; + }, + registerTypeUrl() { + Position.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountPosition.typeUrl, SubaccountPosition); function createBaseSubaccountDeposit(): SubaccountDeposit { return { subaccountId: new Uint8Array(), @@ -5910,9 +5928,11 @@ export const SubaccountDeposit = { typeUrl: "/injective.exchange.v1beta1.SubaccountDeposit", value: SubaccountDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountDeposit.typeUrl, SubaccountDeposit); function createBaseDepositUpdate(): DepositUpdate { return { denom: "", @@ -5994,9 +6014,11 @@ export const DepositUpdate = { typeUrl: "/injective.exchange.v1beta1.DepositUpdate", value: DepositUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountDeposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositUpdate.typeUrl, DepositUpdate); function createBasePointsMultiplier(): PointsMultiplier { return { makerPointsMultiplier: "", @@ -6076,9 +6098,9 @@ export const PointsMultiplier = { typeUrl: "/injective.exchange.v1beta1.PointsMultiplier", value: PointsMultiplier.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PointsMultiplier.typeUrl, PointsMultiplier); function createBaseTradingRewardCampaignBoostInfo(): TradingRewardCampaignBoostInfo { return { boostedSpotMarketIds: [], @@ -6190,9 +6212,11 @@ export const TradingRewardCampaignBoostInfo = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignBoostInfo", value: TradingRewardCampaignBoostInfo.encode(message).finish() }; + }, + registerTypeUrl() { + PointsMultiplier.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignBoostInfo.typeUrl, TradingRewardCampaignBoostInfo); function createBaseCampaignRewardPool(): CampaignRewardPool { return { startTimestamp: BigInt(0), @@ -6274,9 +6298,11 @@ export const CampaignRewardPool = { typeUrl: "/injective.exchange.v1beta1.CampaignRewardPool", value: CampaignRewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CampaignRewardPool.typeUrl, CampaignRewardPool); function createBaseTradingRewardCampaignInfo(): TradingRewardCampaignInfo { return { campaignDurationSeconds: BigInt(0), @@ -6384,9 +6410,11 @@ export const TradingRewardCampaignInfo = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignInfo", value: TradingRewardCampaignInfo.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignBoostInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignInfo.typeUrl, TradingRewardCampaignInfo); function createBaseFeeDiscountTierInfo(): FeeDiscountTierInfo { return { makerDiscountRate: "", @@ -6490,9 +6518,9 @@ export const FeeDiscountTierInfo = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountTierInfo", value: FeeDiscountTierInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeeDiscountTierInfo.typeUrl, FeeDiscountTierInfo); function createBaseFeeDiscountSchedule(): FeeDiscountSchedule { return { bucketCount: BigInt(0), @@ -6614,9 +6642,11 @@ export const FeeDiscountSchedule = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountSchedule", value: FeeDiscountSchedule.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountTierInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountSchedule.typeUrl, FeeDiscountSchedule); function createBaseFeeDiscountTierTTL(): FeeDiscountTierTTL { return { tier: BigInt(0), @@ -6696,9 +6726,9 @@ export const FeeDiscountTierTTL = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountTierTTL", value: FeeDiscountTierTTL.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeeDiscountTierTTL.typeUrl, FeeDiscountTierTTL); function createBaseVolumeRecord(): VolumeRecord { return { makerVolume: "", @@ -6778,9 +6808,9 @@ export const VolumeRecord = { typeUrl: "/injective.exchange.v1beta1.VolumeRecord", value: VolumeRecord.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VolumeRecord.typeUrl, VolumeRecord); function createBaseAccountRewards(): AccountRewards { return { account: "", @@ -6862,9 +6892,11 @@ export const AccountRewards = { typeUrl: "/injective.exchange.v1beta1.AccountRewards", value: AccountRewards.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AccountRewards.typeUrl, AccountRewards); function createBaseTradeRecords(): TradeRecords { return { marketId: "", @@ -6946,9 +6978,11 @@ export const TradeRecords = { typeUrl: "/injective.exchange.v1beta1.TradeRecords", value: TradeRecords.encode(message).finish() }; + }, + registerTypeUrl() { + TradeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradeRecords.typeUrl, TradeRecords); function createBaseSubaccountIDs(): SubaccountIDs { return { subaccountIds: [] @@ -7018,9 +7052,9 @@ export const SubaccountIDs = { typeUrl: "/injective.exchange.v1beta1.SubaccountIDs", value: SubaccountIDs.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountIDs.typeUrl, SubaccountIDs); function createBaseTradeRecord(): TradeRecord { return { timestamp: BigInt(0), @@ -7112,9 +7146,9 @@ export const TradeRecord = { typeUrl: "/injective.exchange.v1beta1.TradeRecord", value: TradeRecord.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradeRecord.typeUrl, TradeRecord); function createBaseLevel(): Level { return { p: "", @@ -7194,9 +7228,9 @@ export const Level = { typeUrl: "/injective.exchange.v1beta1.Level", value: Level.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Level.typeUrl, Level); function createBaseAggregateSubaccountVolumeRecord(): AggregateSubaccountVolumeRecord { return { subaccountId: "", @@ -7278,9 +7312,11 @@ export const AggregateSubaccountVolumeRecord = { typeUrl: "/injective.exchange.v1beta1.AggregateSubaccountVolumeRecord", value: AggregateSubaccountVolumeRecord.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AggregateSubaccountVolumeRecord.typeUrl, AggregateSubaccountVolumeRecord); function createBaseAggregateAccountVolumeRecord(): AggregateAccountVolumeRecord { return { account: "", @@ -7362,9 +7398,11 @@ export const AggregateAccountVolumeRecord = { typeUrl: "/injective.exchange.v1beta1.AggregateAccountVolumeRecord", value: AggregateAccountVolumeRecord.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AggregateAccountVolumeRecord.typeUrl, AggregateAccountVolumeRecord); function createBaseMarketVolume(): MarketVolume { return { marketId: "", @@ -7444,9 +7482,11 @@ export const MarketVolume = { typeUrl: "/injective.exchange.v1beta1.MarketVolume", value: MarketVolume.encode(message).finish() }; + }, + registerTypeUrl() { + VolumeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MarketVolume.typeUrl, MarketVolume); function createBaseDenomDecimals(): DenomDecimals { return { denom: "", @@ -7526,9 +7566,9 @@ export const DenomDecimals = { typeUrl: "/injective.exchange.v1beta1.DenomDecimals", value: DenomDecimals.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DenomDecimals.typeUrl, DenomDecimals); function createBaseGrantAuthorization(): GrantAuthorization { return { grantee: "", @@ -7608,9 +7648,9 @@ export const GrantAuthorization = { typeUrl: "/injective.exchange.v1beta1.GrantAuthorization", value: GrantAuthorization.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GrantAuthorization.typeUrl, GrantAuthorization); function createBaseActiveGrant(): ActiveGrant { return { granter: "", @@ -7690,9 +7730,9 @@ export const ActiveGrant = { typeUrl: "/injective.exchange.v1beta1.ActiveGrant", value: ActiveGrant.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ActiveGrant.typeUrl, ActiveGrant); function createBaseEffectiveGrant(): EffectiveGrant { return { granter: "", @@ -7784,6 +7824,6 @@ export const EffectiveGrant = { typeUrl: "/injective.exchange.v1beta1.EffectiveGrant", value: EffectiveGrant.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EffectiveGrant.typeUrl, EffectiveGrant); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/genesis.ts b/libs/injectivejs/src/injective/exchange/v1beta1/genesis.ts index 9e4a2e86..9c196ea6 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/genesis.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, SpotMarket, SpotMarketAmino, DerivativeMarket, DerivativeMarketAmino, PerpetualMarketInfo, PerpetualMarketInfoAmino, DerivativeMarketSettlementInfo, DerivativeMarketSettlementInfoAmino, TradingRewardCampaignInfo, TradingRewardCampaignInfoAmino, CampaignRewardPool, CampaignRewardPoolAmino, FeeDiscountSchedule, FeeDiscountScheduleAmino, TradeRecords, TradeRecordsAmino, BinaryOptionsMarket, BinaryOptionsMarketAmino, DenomDecimals, DenomDecimalsAmino, MarketFeeMultiplier, MarketFeeMultiplierAmino, AggregateSubaccountVolumeRecord, AggregateSubaccountVolumeRecordAmino, MarketVolume, MarketVolumeAmino, FeeDiscountTierTTL, FeeDiscountTierTTLAmino, SpotLimitOrder, SpotLimitOrderAmino, DerivativeLimitOrder, DerivativeLimitOrderAmino, DerivativeMarketOrder, DerivativeMarketOrderAmino, Deposit, DepositAmino, Position, PositionAmino, SubaccountTradeNonce, SubaccountTradeNonceAmino, ExpiryFuturesMarketInfo, ExpiryFuturesMarketInfoAmino, PerpetualMarketFunding, PerpetualMarketFundingAmino, GrantAuthorization, GrantAuthorizationAmino, ActiveGrant, ActiveGrantAmino } from "./exchange"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the exchange module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to exchange. */ @@ -1017,9 +1016,39 @@ export const GenesisState = { typeUrl: "/injective.exchange.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + SpotMarket.registerTypeUrl(); + DerivativeMarket.registerTypeUrl(); + SpotOrderBook.registerTypeUrl(); + DerivativeOrderBook.registerTypeUrl(); + Balance.registerTypeUrl(); + DerivativePosition.registerTypeUrl(); + SubaccountNonce.registerTypeUrl(); + ExpiryFuturesMarketInfoState.registerTypeUrl(); + PerpetualMarketInfo.registerTypeUrl(); + PerpetualMarketFundingState.registerTypeUrl(); + DerivativeMarketSettlementInfo.registerTypeUrl(); + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); + TradingRewardCampaignAccountPoints.registerTypeUrl(); + FeeDiscountSchedule.registerTypeUrl(); + FeeDiscountAccountTierTTL.registerTypeUrl(); + FeeDiscountBucketVolumeAccounts.registerTypeUrl(); + TradingRewardCampaignAccountPendingPoints.registerTypeUrl(); + TradeRecords.registerTypeUrl(); + BinaryOptionsMarket.registerTypeUrl(); + DenomDecimals.registerTypeUrl(); + ConditionalDerivativeOrderBook.registerTypeUrl(); + MarketFeeMultiplier.registerTypeUrl(); + OrderbookSequence.registerTypeUrl(); + AggregateSubaccountVolumeRecord.registerTypeUrl(); + MarketVolume.registerTypeUrl(); + FullGrantAuthorizations.registerTypeUrl(); + FullActiveGrant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseOrderbookSequence(): OrderbookSequence { return { sequence: BigInt(0), @@ -1099,9 +1128,9 @@ export const OrderbookSequence = { typeUrl: "/injective.exchange.v1beta1.OrderbookSequence", value: OrderbookSequence.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderbookSequence.typeUrl, OrderbookSequence); function createBaseFeeDiscountAccountTierTTL(): FeeDiscountAccountTierTTL { return { account: "", @@ -1181,9 +1210,11 @@ export const FeeDiscountAccountTierTTL = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountAccountTierTTL", value: FeeDiscountAccountTierTTL.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountTierTTL.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountAccountTierTTL.typeUrl, FeeDiscountAccountTierTTL); function createBaseFeeDiscountBucketVolumeAccounts(): FeeDiscountBucketVolumeAccounts { return { bucketStartTimestamp: BigInt(0), @@ -1265,9 +1296,11 @@ export const FeeDiscountBucketVolumeAccounts = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountBucketVolumeAccounts", value: FeeDiscountBucketVolumeAccounts.encode(message).finish() }; + }, + registerTypeUrl() { + AccountVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountBucketVolumeAccounts.typeUrl, FeeDiscountBucketVolumeAccounts); function createBaseAccountVolume(): AccountVolume { return { account: "", @@ -1347,9 +1380,9 @@ export const AccountVolume = { typeUrl: "/injective.exchange.v1beta1.AccountVolume", value: AccountVolume.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccountVolume.typeUrl, AccountVolume); function createBaseTradingRewardCampaignAccountPoints(): TradingRewardCampaignAccountPoints { return { account: "", @@ -1429,9 +1462,9 @@ export const TradingRewardCampaignAccountPoints = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignAccountPoints", value: TradingRewardCampaignAccountPoints.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradingRewardCampaignAccountPoints.typeUrl, TradingRewardCampaignAccountPoints); function createBaseTradingRewardCampaignAccountPendingPoints(): TradingRewardCampaignAccountPendingPoints { return { rewardPoolStartTimestamp: BigInt(0), @@ -1513,9 +1546,11 @@ export const TradingRewardCampaignAccountPendingPoints = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignAccountPendingPoints", value: TradingRewardCampaignAccountPendingPoints.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignAccountPoints.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignAccountPendingPoints.typeUrl, TradingRewardCampaignAccountPendingPoints); function createBaseSpotOrderBook(): SpotOrderBook { return { marketId: "", @@ -1609,9 +1644,11 @@ export const SpotOrderBook = { typeUrl: "/injective.exchange.v1beta1.SpotOrderBook", value: SpotOrderBook.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrderBook.typeUrl, SpotOrderBook); function createBaseDerivativeOrderBook(): DerivativeOrderBook { return { marketId: "", @@ -1705,9 +1742,11 @@ export const DerivativeOrderBook = { typeUrl: "/injective.exchange.v1beta1.DerivativeOrderBook", value: DerivativeOrderBook.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrderBook.typeUrl, DerivativeOrderBook); function createBaseConditionalDerivativeOrderBook(): ConditionalDerivativeOrderBook { return { marketId: "", @@ -1831,9 +1870,12 @@ export const ConditionalDerivativeOrderBook = { typeUrl: "/injective.exchange.v1beta1.ConditionalDerivativeOrderBook", value: ConditionalDerivativeOrderBook.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); + DerivativeMarketOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConditionalDerivativeOrderBook.typeUrl, ConditionalDerivativeOrderBook); function createBaseBalance(): Balance { return { subaccountId: "", @@ -1925,9 +1967,11 @@ export const Balance = { typeUrl: "/injective.exchange.v1beta1.Balance", value: Balance.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Balance.typeUrl, Balance); function createBaseDerivativePosition(): DerivativePosition { return { subaccountId: "", @@ -2019,9 +2063,11 @@ export const DerivativePosition = { typeUrl: "/injective.exchange.v1beta1.DerivativePosition", value: DerivativePosition.encode(message).finish() }; + }, + registerTypeUrl() { + Position.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativePosition.typeUrl, DerivativePosition); function createBaseSubaccountNonce(): SubaccountNonce { return { subaccountId: "", @@ -2101,9 +2147,11 @@ export const SubaccountNonce = { typeUrl: "/injective.exchange.v1beta1.SubaccountNonce", value: SubaccountNonce.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountTradeNonce.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountNonce.typeUrl, SubaccountNonce); function createBaseExpiryFuturesMarketInfoState(): ExpiryFuturesMarketInfoState { return { marketId: "", @@ -2183,9 +2231,11 @@ export const ExpiryFuturesMarketInfoState = { typeUrl: "/injective.exchange.v1beta1.ExpiryFuturesMarketInfoState", value: ExpiryFuturesMarketInfoState.encode(message).finish() }; + }, + registerTypeUrl() { + ExpiryFuturesMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExpiryFuturesMarketInfoState.typeUrl, ExpiryFuturesMarketInfoState); function createBasePerpetualMarketFundingState(): PerpetualMarketFundingState { return { marketId: "", @@ -2265,9 +2315,11 @@ export const PerpetualMarketFundingState = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketFundingState", value: PerpetualMarketFundingState.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PerpetualMarketFundingState.typeUrl, PerpetualMarketFundingState); function createBaseFullGrantAuthorizations(): FullGrantAuthorizations { return { granter: "", @@ -2373,9 +2425,11 @@ export const FullGrantAuthorizations = { typeUrl: "/injective.exchange.v1beta1.FullGrantAuthorizations", value: FullGrantAuthorizations.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FullGrantAuthorizations.typeUrl, FullGrantAuthorizations); function createBaseFullActiveGrant(): FullActiveGrant { return { grantee: "", @@ -2455,6 +2509,8 @@ export const FullActiveGrant = { typeUrl: "/injective.exchange.v1beta1.FullActiveGrant", value: FullActiveGrant.encode(message).finish() }; + }, + registerTypeUrl() { + ActiveGrant.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(FullActiveGrant.typeUrl, FullActiveGrant); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/proposal.ts b/libs/injectivejs/src/injective/exchange/v1beta1/proposal.ts index 320d2ad9..98f3707d 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/proposal.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/proposal.ts @@ -1247,10 +1247,13 @@ export const SpotMarketParamUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.SpotMarketParamUpdateProposal", value: SpotMarketParamUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SpotMarketParamUpdateProposal.typeUrl, SpotMarketParamUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketParamUpdateProposal.aminoType, SpotMarketParamUpdateProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotMarketParamUpdateProposal.typeUrl, SpotMarketParamUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketParamUpdateProposal.aminoType, SpotMarketParamUpdateProposal.typeUrl); function createBaseExchangeEnableProposal(): ExchangeEnableProposal { return { title: "", @@ -1349,10 +1352,9 @@ export const ExchangeEnableProposal = { typeUrl: "/injective.exchange.v1beta1.ExchangeEnableProposal", value: ExchangeEnableProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExchangeEnableProposal.typeUrl, ExchangeEnableProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ExchangeEnableProposal.aminoType, ExchangeEnableProposal.typeUrl); function createBaseBatchExchangeModificationProposal(): BatchExchangeModificationProposal { return { title: "", @@ -1587,10 +1589,23 @@ export const BatchExchangeModificationProposal = { typeUrl: "/injective.exchange.v1beta1.BatchExchangeModificationProposal", value: BatchExchangeModificationProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchExchangeModificationProposal.typeUrl, BatchExchangeModificationProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchExchangeModificationProposal.aminoType, BatchExchangeModificationProposal.typeUrl); + SpotMarketParamUpdateProposal.registerTypeUrl(); + DerivativeMarketParamUpdateProposal.registerTypeUrl(); + SpotMarketLaunchProposal.registerTypeUrl(); + PerpetualMarketLaunchProposal.registerTypeUrl(); + ExpiryFuturesMarketLaunchProposal.registerTypeUrl(); + TradingRewardCampaignUpdateProposal.registerTypeUrl(); + BinaryOptionsMarketLaunchProposal.registerTypeUrl(); + BinaryOptionsMarketParamUpdateProposal.registerTypeUrl(); + UpdateDenomDecimalsProposal.registerTypeUrl(); + FeeDiscountProposal.registerTypeUrl(); + MarketForcedSettlementProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchExchangeModificationProposal.typeUrl, BatchExchangeModificationProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchExchangeModificationProposal.aminoType, BatchExchangeModificationProposal.typeUrl); function createBaseSpotMarketLaunchProposal(): SpotMarketLaunchProposal { return { title: "", @@ -1785,10 +1800,13 @@ export const SpotMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.SpotMarketLaunchProposal", value: SpotMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SpotMarketLaunchProposal.typeUrl, SpotMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketLaunchProposal.aminoType, SpotMarketLaunchProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotMarketLaunchProposal.typeUrl, SpotMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SpotMarketLaunchProposal.aminoType, SpotMarketLaunchProposal.typeUrl); function createBasePerpetualMarketLaunchProposal(): PerpetualMarketLaunchProposal { return { title: "", @@ -2043,10 +2061,13 @@ export const PerpetualMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketLaunchProposal", value: PerpetualMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PerpetualMarketLaunchProposal.typeUrl, PerpetualMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(PerpetualMarketLaunchProposal.aminoType, PerpetualMarketLaunchProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PerpetualMarketLaunchProposal.typeUrl, PerpetualMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(PerpetualMarketLaunchProposal.aminoType, PerpetualMarketLaunchProposal.typeUrl); function createBaseBinaryOptionsMarketLaunchProposal(): BinaryOptionsMarketLaunchProposal { return { title: "", @@ -2313,10 +2334,12 @@ export const BinaryOptionsMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.BinaryOptionsMarketLaunchProposal", value: BinaryOptionsMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BinaryOptionsMarketLaunchProposal.typeUrl, BinaryOptionsMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketLaunchProposal.aminoType, BinaryOptionsMarketLaunchProposal.typeUrl); } }; -GlobalDecoderRegistry.register(BinaryOptionsMarketLaunchProposal.typeUrl, BinaryOptionsMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketLaunchProposal.aminoType, BinaryOptionsMarketLaunchProposal.typeUrl); function createBaseExpiryFuturesMarketLaunchProposal(): ExpiryFuturesMarketLaunchProposal { return { title: "", @@ -2583,10 +2606,13 @@ export const ExpiryFuturesMarketLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.ExpiryFuturesMarketLaunchProposal", value: ExpiryFuturesMarketLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ExpiryFuturesMarketLaunchProposal.typeUrl, ExpiryFuturesMarketLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ExpiryFuturesMarketLaunchProposal.aminoType, ExpiryFuturesMarketLaunchProposal.typeUrl); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExpiryFuturesMarketLaunchProposal.typeUrl, ExpiryFuturesMarketLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ExpiryFuturesMarketLaunchProposal.aminoType, ExpiryFuturesMarketLaunchProposal.typeUrl); function createBaseDerivativeMarketParamUpdateProposal(): DerivativeMarketParamUpdateProposal { return { title: "", @@ -2853,10 +2879,14 @@ export const DerivativeMarketParamUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketParamUpdateProposal", value: DerivativeMarketParamUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(DerivativeMarketParamUpdateProposal.typeUrl, DerivativeMarketParamUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(DerivativeMarketParamUpdateProposal.aminoType, DerivativeMarketParamUpdateProposal.typeUrl); + OracleParams.registerTypeUrl(); + AdminInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketParamUpdateProposal.typeUrl, DerivativeMarketParamUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(DerivativeMarketParamUpdateProposal.aminoType, DerivativeMarketParamUpdateProposal.typeUrl); function createBaseAdminInfo(): AdminInfo { return { admin: "", @@ -2936,9 +2966,9 @@ export const AdminInfo = { typeUrl: "/injective.exchange.v1beta1.AdminInfo", value: AdminInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AdminInfo.typeUrl, AdminInfo); function createBaseMarketForcedSettlementProposal(): MarketForcedSettlementProposal { return { title: "", @@ -3049,10 +3079,12 @@ export const MarketForcedSettlementProposal = { typeUrl: "/injective.exchange.v1beta1.MarketForcedSettlementProposal", value: MarketForcedSettlementProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(MarketForcedSettlementProposal.typeUrl, MarketForcedSettlementProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(MarketForcedSettlementProposal.aminoType, MarketForcedSettlementProposal.typeUrl); } }; -GlobalDecoderRegistry.register(MarketForcedSettlementProposal.typeUrl, MarketForcedSettlementProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MarketForcedSettlementProposal.aminoType, MarketForcedSettlementProposal.typeUrl); function createBaseUpdateDenomDecimalsProposal(): UpdateDenomDecimalsProposal { return { title: "", @@ -3153,10 +3185,13 @@ export const UpdateDenomDecimalsProposal = { typeUrl: "/injective.exchange.v1beta1.UpdateDenomDecimalsProposal", value: UpdateDenomDecimalsProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateDenomDecimalsProposal.typeUrl, UpdateDenomDecimalsProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateDenomDecimalsProposal.aminoType, UpdateDenomDecimalsProposal.typeUrl); + DenomDecimals.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UpdateDenomDecimalsProposal.typeUrl, UpdateDenomDecimalsProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateDenomDecimalsProposal.aminoType, UpdateDenomDecimalsProposal.typeUrl); function createBaseBinaryOptionsMarketParamUpdateProposal(): BinaryOptionsMarketParamUpdateProposal { return { title: "", @@ -3411,10 +3446,13 @@ export const BinaryOptionsMarketParamUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.BinaryOptionsMarketParamUpdateProposal", value: BinaryOptionsMarketParamUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BinaryOptionsMarketParamUpdateProposal.typeUrl, BinaryOptionsMarketParamUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketParamUpdateProposal.aminoType, BinaryOptionsMarketParamUpdateProposal.typeUrl); + ProviderOracleParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BinaryOptionsMarketParamUpdateProposal.typeUrl, BinaryOptionsMarketParamUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BinaryOptionsMarketParamUpdateProposal.aminoType, BinaryOptionsMarketParamUpdateProposal.typeUrl); function createBaseProviderOracleParams(): ProviderOracleParams { return { symbol: "", @@ -3518,9 +3556,9 @@ export const ProviderOracleParams = { typeUrl: "/injective.exchange.v1beta1.ProviderOracleParams", value: ProviderOracleParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProviderOracleParams.typeUrl, ProviderOracleParams); function createBaseOracleParams(): OracleParams { return { oracleBase: "", @@ -3624,9 +3662,9 @@ export const OracleParams = { typeUrl: "/injective.exchange.v1beta1.OracleParams", value: OracleParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleParams.typeUrl, OracleParams); function createBaseTradingRewardCampaignLaunchProposal(): TradingRewardCampaignLaunchProposal { return { title: "", @@ -3739,10 +3777,14 @@ export const TradingRewardCampaignLaunchProposal = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignLaunchProposal", value: TradingRewardCampaignLaunchProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TradingRewardCampaignLaunchProposal.typeUrl, TradingRewardCampaignLaunchProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignLaunchProposal.aminoType, TradingRewardCampaignLaunchProposal.typeUrl); + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignLaunchProposal.typeUrl, TradingRewardCampaignLaunchProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignLaunchProposal.aminoType, TradingRewardCampaignLaunchProposal.typeUrl); function createBaseTradingRewardCampaignUpdateProposal(): TradingRewardCampaignUpdateProposal { return { title: "", @@ -3869,10 +3911,14 @@ export const TradingRewardCampaignUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.TradingRewardCampaignUpdateProposal", value: TradingRewardCampaignUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TradingRewardCampaignUpdateProposal.typeUrl, TradingRewardCampaignUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignUpdateProposal.aminoType, TradingRewardCampaignUpdateProposal.typeUrl); + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardCampaignUpdateProposal.typeUrl, TradingRewardCampaignUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardCampaignUpdateProposal.aminoType, TradingRewardCampaignUpdateProposal.typeUrl); function createBaseRewardPointUpdate(): RewardPointUpdate { return { accountAddress: "", @@ -3952,9 +3998,9 @@ export const RewardPointUpdate = { typeUrl: "/injective.exchange.v1beta1.RewardPointUpdate", value: RewardPointUpdate.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RewardPointUpdate.typeUrl, RewardPointUpdate); function createBaseTradingRewardPendingPointsUpdateProposal(): TradingRewardPendingPointsUpdateProposal { return { title: "", @@ -4067,10 +4113,13 @@ export const TradingRewardPendingPointsUpdateProposal = { typeUrl: "/injective.exchange.v1beta1.TradingRewardPendingPointsUpdateProposal", value: TradingRewardPendingPointsUpdateProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TradingRewardPendingPointsUpdateProposal.typeUrl, TradingRewardPendingPointsUpdateProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardPendingPointsUpdateProposal.aminoType, TradingRewardPendingPointsUpdateProposal.typeUrl); + RewardPointUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TradingRewardPendingPointsUpdateProposal.typeUrl, TradingRewardPendingPointsUpdateProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TradingRewardPendingPointsUpdateProposal.aminoType, TradingRewardPendingPointsUpdateProposal.typeUrl); function createBaseFeeDiscountProposal(): FeeDiscountProposal { return { title: "", @@ -4169,10 +4218,13 @@ export const FeeDiscountProposal = { typeUrl: "/injective.exchange.v1beta1.FeeDiscountProposal", value: FeeDiscountProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(FeeDiscountProposal.typeUrl, FeeDiscountProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(FeeDiscountProposal.aminoType, FeeDiscountProposal.typeUrl); + FeeDiscountSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeeDiscountProposal.typeUrl, FeeDiscountProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(FeeDiscountProposal.aminoType, FeeDiscountProposal.typeUrl); function createBaseBatchCommunityPoolSpendProposal(): BatchCommunityPoolSpendProposal { return { title: "", @@ -4273,10 +4325,13 @@ export const BatchCommunityPoolSpendProposal = { typeUrl: "/injective.exchange.v1beta1.BatchCommunityPoolSpendProposal", value: BatchCommunityPoolSpendProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchCommunityPoolSpendProposal.typeUrl, BatchCommunityPoolSpendProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchCommunityPoolSpendProposal.aminoType, BatchCommunityPoolSpendProposal.typeUrl); + CommunityPoolSpendProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchCommunityPoolSpendProposal.typeUrl, BatchCommunityPoolSpendProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchCommunityPoolSpendProposal.aminoType, BatchCommunityPoolSpendProposal.typeUrl); function createBaseAtomicMarketOrderFeeMultiplierScheduleProposal(): AtomicMarketOrderFeeMultiplierScheduleProposal { return { title: "", @@ -4377,7 +4432,10 @@ export const AtomicMarketOrderFeeMultiplierScheduleProposal = { typeUrl: "/injective.exchange.v1beta1.AtomicMarketOrderFeeMultiplierScheduleProposal", value: AtomicMarketOrderFeeMultiplierScheduleProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl, AtomicMarketOrderFeeMultiplierScheduleProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(AtomicMarketOrderFeeMultiplierScheduleProposal.aminoType, AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl); + MarketFeeMultiplier.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl, AtomicMarketOrderFeeMultiplierScheduleProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(AtomicMarketOrderFeeMultiplierScheduleProposal.aminoType, AtomicMarketOrderFeeMultiplierScheduleProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/injective/exchange/v1beta1/query.rpc.func.ts index d0f2be43..97005d48 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/query.rpc.func.ts @@ -5,418 +5,478 @@ export const createGetQueryExchangeParams = (clientResolver?: RpcResolver) => bu decode: QueryExchangeParamsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "QueryExchangeParams", - clientResolver + clientResolver, + deps: [QueryExchangeParamsRequest, QueryExchangeParamsResponse] }); export const createGetSubaccountDeposits = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountDepositsRequest.encode, decode: QuerySubaccountDepositsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountDeposits", - clientResolver + clientResolver, + deps: [QuerySubaccountDepositsRequest, QuerySubaccountDepositsResponse] }); export const createGetSubaccountDeposit = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountDepositRequest.encode, decode: QuerySubaccountDepositResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountDeposit", - clientResolver + clientResolver, + deps: [QuerySubaccountDepositRequest, QuerySubaccountDepositResponse] }); export const createGetExchangeBalances = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryExchangeBalancesRequest.encode, decode: QueryExchangeBalancesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ExchangeBalances", - clientResolver + clientResolver, + deps: [QueryExchangeBalancesRequest, QueryExchangeBalancesResponse] }); export const createGetAggregateVolume = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAggregateVolumeRequest.encode, decode: QueryAggregateVolumeResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateVolume", - clientResolver + clientResolver, + deps: [QueryAggregateVolumeRequest, QueryAggregateVolumeResponse] }); export const createGetAggregateVolumes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAggregateVolumesRequest.encode, decode: QueryAggregateVolumesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateVolumes", - clientResolver + clientResolver, + deps: [QueryAggregateVolumesRequest, QueryAggregateVolumesResponse] }); export const createGetAggregateMarketVolume = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAggregateMarketVolumeRequest.encode, decode: QueryAggregateMarketVolumeResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateMarketVolume", - clientResolver + clientResolver, + deps: [QueryAggregateMarketVolumeRequest, QueryAggregateMarketVolumeResponse] }); export const createGetAggregateMarketVolumes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAggregateMarketVolumesRequest.encode, decode: QueryAggregateMarketVolumesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AggregateMarketVolumes", - clientResolver + clientResolver, + deps: [QueryAggregateMarketVolumesRequest, QueryAggregateMarketVolumesResponse] }); export const createGetDenomDecimal = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomDecimalRequest.encode, decode: QueryDenomDecimalResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DenomDecimal", - clientResolver + clientResolver, + deps: [QueryDenomDecimalRequest, QueryDenomDecimalResponse] }); export const createGetDenomDecimals = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomDecimalsRequest.encode, decode: QueryDenomDecimalsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DenomDecimals", - clientResolver + clientResolver, + deps: [QueryDenomDecimalsRequest, QueryDenomDecimalsResponse] }); export const createGetSpotMarkets = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpotMarketsRequest.encode, decode: QuerySpotMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotMarkets", - clientResolver + clientResolver, + deps: [QuerySpotMarketsRequest, QuerySpotMarketsResponse] }); export const createGetSpotMarket = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpotMarketRequest.encode, decode: QuerySpotMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotMarket", - clientResolver + clientResolver, + deps: [QuerySpotMarketRequest, QuerySpotMarketResponse] }); export const createGetFullSpotMarkets = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryFullSpotMarketsRequest.encode, decode: QueryFullSpotMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FullSpotMarkets", - clientResolver + clientResolver, + deps: [QueryFullSpotMarketsRequest, QueryFullSpotMarketsResponse] }); export const createGetFullSpotMarket = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryFullSpotMarketRequest.encode, decode: QueryFullSpotMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FullSpotMarket", - clientResolver + clientResolver, + deps: [QueryFullSpotMarketRequest, QueryFullSpotMarketResponse] }); export const createGetSpotOrderbook = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpotOrderbookRequest.encode, decode: QuerySpotOrderbookResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotOrderbook", - clientResolver + clientResolver, + deps: [QuerySpotOrderbookRequest, QuerySpotOrderbookResponse] }); export const createGetTraderSpotOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTraderSpotOrdersRequest.encode, decode: QueryTraderSpotOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderSpotOrders", - clientResolver + clientResolver, + deps: [QueryTraderSpotOrdersRequest, QueryTraderSpotOrdersResponse] }); export const createGetAccountAddressSpotOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAccountAddressSpotOrdersRequest.encode, decode: QueryAccountAddressSpotOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AccountAddressSpotOrders", - clientResolver + clientResolver, + deps: [QueryAccountAddressSpotOrdersRequest, QueryAccountAddressSpotOrdersResponse] }); export const createGetSpotOrdersByHashes = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpotOrdersByHashesRequest.encode, decode: QuerySpotOrdersByHashesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotOrdersByHashes", - clientResolver + clientResolver, + deps: [QuerySpotOrdersByHashesRequest, QuerySpotOrdersByHashesResponse] }); export const createGetSubaccountOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountOrdersRequest.encode, decode: QuerySubaccountOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountOrders", - clientResolver + clientResolver, + deps: [QuerySubaccountOrdersRequest, QuerySubaccountOrdersResponse] }); export const createGetTraderSpotTransientOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTraderSpotOrdersRequest.encode, decode: QueryTraderSpotOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderSpotTransientOrders", - clientResolver + clientResolver, + deps: [QueryTraderSpotOrdersRequest, QueryTraderSpotOrdersResponse] }); export const createGetSpotMidPriceAndTOB = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpotMidPriceAndTOBRequest.encode, decode: QuerySpotMidPriceAndTOBResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SpotMidPriceAndTOB", - clientResolver + clientResolver, + deps: [QuerySpotMidPriceAndTOBRequest, QuerySpotMidPriceAndTOBResponse] }); export const createGetDerivativeMidPriceAndTOB = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDerivativeMidPriceAndTOBRequest.encode, decode: QueryDerivativeMidPriceAndTOBResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMidPriceAndTOB", - clientResolver + clientResolver, + deps: [QueryDerivativeMidPriceAndTOBRequest, QueryDerivativeMidPriceAndTOBResponse] }); export const createGetDerivativeOrderbook = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDerivativeOrderbookRequest.encode, decode: QueryDerivativeOrderbookResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeOrderbook", - clientResolver + clientResolver, + deps: [QueryDerivativeOrderbookRequest, QueryDerivativeOrderbookResponse] }); export const createGetTraderDerivativeOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTraderDerivativeOrdersRequest.encode, decode: QueryTraderDerivativeOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderDerivativeOrders", - clientResolver + clientResolver, + deps: [QueryTraderDerivativeOrdersRequest, QueryTraderDerivativeOrdersResponse] }); export const createGetAccountAddressDerivativeOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAccountAddressDerivativeOrdersRequest.encode, decode: QueryAccountAddressDerivativeOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "AccountAddressDerivativeOrders", - clientResolver + clientResolver, + deps: [QueryAccountAddressDerivativeOrdersRequest, QueryAccountAddressDerivativeOrdersResponse] }); export const createGetDerivativeOrdersByHashes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDerivativeOrdersByHashesRequest.encode, decode: QueryDerivativeOrdersByHashesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeOrdersByHashes", - clientResolver + clientResolver, + deps: [QueryDerivativeOrdersByHashesRequest, QueryDerivativeOrdersByHashesResponse] }); export const createGetTraderDerivativeTransientOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTraderDerivativeOrdersRequest.encode, decode: QueryTraderDerivativeOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderDerivativeTransientOrders", - clientResolver + clientResolver, + deps: [QueryTraderDerivativeOrdersRequest, QueryTraderDerivativeOrdersResponse] }); export const createGetDerivativeMarkets = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDerivativeMarketsRequest.encode, decode: QueryDerivativeMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMarkets", - clientResolver + clientResolver, + deps: [QueryDerivativeMarketsRequest, QueryDerivativeMarketsResponse] }); export const createGetDerivativeMarket = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDerivativeMarketRequest.encode, decode: QueryDerivativeMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMarket", - clientResolver + clientResolver, + deps: [QueryDerivativeMarketRequest, QueryDerivativeMarketResponse] }); export const createGetDerivativeMarketAddress = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDerivativeMarketAddressRequest.encode, decode: QueryDerivativeMarketAddressResponse.decode, service: "injective.exchange.v1beta1.Query", method: "DerivativeMarketAddress", - clientResolver + clientResolver, + deps: [QueryDerivativeMarketAddressRequest, QueryDerivativeMarketAddressResponse] }); export const createGetSubaccountTradeNonce = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountTradeNonceRequest.encode, decode: QuerySubaccountTradeNonceResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountTradeNonce", - clientResolver + clientResolver, + deps: [QuerySubaccountTradeNonceRequest, QuerySubaccountTradeNonceResponse] }); export const createGetExchangeModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ExchangeModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const createGetPositions = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPositionsRequest.encode, decode: QueryPositionsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "Positions", - clientResolver + clientResolver, + deps: [QueryPositionsRequest, QueryPositionsResponse] }); export const createGetSubaccountPositions = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountPositionsRequest.encode, decode: QuerySubaccountPositionsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountPositions", - clientResolver + clientResolver, + deps: [QuerySubaccountPositionsRequest, QuerySubaccountPositionsResponse] }); export const createGetSubaccountPositionInMarket = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountPositionInMarketRequest.encode, decode: QuerySubaccountPositionInMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountPositionInMarket", - clientResolver + clientResolver, + deps: [QuerySubaccountPositionInMarketRequest, QuerySubaccountPositionInMarketResponse] }); export const createGetSubaccountEffectivePositionInMarket = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountEffectivePositionInMarketRequest.encode, decode: QuerySubaccountEffectivePositionInMarketResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountEffectivePositionInMarket", - clientResolver + clientResolver, + deps: [QuerySubaccountEffectivePositionInMarketRequest, QuerySubaccountEffectivePositionInMarketResponse] }); export const createGetPerpetualMarketInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPerpetualMarketInfoRequest.encode, decode: QueryPerpetualMarketInfoResponse.decode, service: "injective.exchange.v1beta1.Query", method: "PerpetualMarketInfo", - clientResolver + clientResolver, + deps: [QueryPerpetualMarketInfoRequest, QueryPerpetualMarketInfoResponse] }); export const createGetExpiryFuturesMarketInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryExpiryFuturesMarketInfoRequest.encode, decode: QueryExpiryFuturesMarketInfoResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ExpiryFuturesMarketInfo", - clientResolver + clientResolver, + deps: [QueryExpiryFuturesMarketInfoRequest, QueryExpiryFuturesMarketInfoResponse] }); export const createGetPerpetualMarketFunding = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPerpetualMarketFundingRequest.encode, decode: QueryPerpetualMarketFundingResponse.decode, service: "injective.exchange.v1beta1.Query", method: "PerpetualMarketFunding", - clientResolver + clientResolver, + deps: [QueryPerpetualMarketFundingRequest, QueryPerpetualMarketFundingResponse] }); export const createGetSubaccountOrderMetadata = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySubaccountOrderMetadataRequest.encode, decode: QuerySubaccountOrderMetadataResponse.decode, service: "injective.exchange.v1beta1.Query", method: "SubaccountOrderMetadata", - clientResolver + clientResolver, + deps: [QuerySubaccountOrderMetadataRequest, QuerySubaccountOrderMetadataResponse] }); export const createGetTradeRewardPoints = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTradeRewardPointsRequest.encode, decode: QueryTradeRewardPointsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TradeRewardPoints", - clientResolver + clientResolver, + deps: [QueryTradeRewardPointsRequest, QueryTradeRewardPointsResponse] }); export const createGetPendingTradeRewardPoints = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTradeRewardPointsRequest.encode, decode: QueryTradeRewardPointsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "PendingTradeRewardPoints", - clientResolver + clientResolver, + deps: [QueryTradeRewardPointsRequest, QueryTradeRewardPointsResponse] }); export const createGetTradeRewardCampaign = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTradeRewardCampaignRequest.encode, decode: QueryTradeRewardCampaignResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TradeRewardCampaign", - clientResolver + clientResolver, + deps: [QueryTradeRewardCampaignRequest, QueryTradeRewardCampaignResponse] }); export const createGetFeeDiscountAccountInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryFeeDiscountAccountInfoRequest.encode, decode: QueryFeeDiscountAccountInfoResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FeeDiscountAccountInfo", - clientResolver + clientResolver, + deps: [QueryFeeDiscountAccountInfoRequest, QueryFeeDiscountAccountInfoResponse] }); export const createGetFeeDiscountSchedule = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryFeeDiscountScheduleRequest.encode, decode: QueryFeeDiscountScheduleResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FeeDiscountSchedule", - clientResolver + clientResolver, + deps: [QueryFeeDiscountScheduleRequest, QueryFeeDiscountScheduleResponse] }); export const createGetBalanceMismatches = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBalanceMismatchesRequest.encode, decode: QueryBalanceMismatchesResponse.decode, service: "injective.exchange.v1beta1.Query", method: "BalanceMismatches", - clientResolver + clientResolver, + deps: [QueryBalanceMismatchesRequest, QueryBalanceMismatchesResponse] }); export const createGetBalanceWithBalanceHolds = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBalanceWithBalanceHoldsRequest.encode, decode: QueryBalanceWithBalanceHoldsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "BalanceWithBalanceHolds", - clientResolver + clientResolver, + deps: [QueryBalanceWithBalanceHoldsRequest, QueryBalanceWithBalanceHoldsResponse] }); export const createGetFeeDiscountTierStatistics = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryFeeDiscountTierStatisticsRequest.encode, decode: QueryFeeDiscountTierStatisticsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "FeeDiscountTierStatistics", - clientResolver + clientResolver, + deps: [QueryFeeDiscountTierStatisticsRequest, QueryFeeDiscountTierStatisticsResponse] }); export const createGetMitoVaultInfos = (clientResolver?: RpcResolver) => buildQuery({ encode: MitoVaultInfosRequest.encode, decode: MitoVaultInfosResponse.decode, service: "injective.exchange.v1beta1.Query", method: "MitoVaultInfos", - clientResolver + clientResolver, + deps: [MitoVaultInfosRequest, MitoVaultInfosResponse] }); export const createGetQueryMarketIDFromVault = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryMarketIDFromVaultRequest.encode, decode: QueryMarketIDFromVaultResponse.decode, service: "injective.exchange.v1beta1.Query", method: "QueryMarketIDFromVault", - clientResolver + clientResolver, + deps: [QueryMarketIDFromVaultRequest, QueryMarketIDFromVaultResponse] }); export const createGetHistoricalTradeRecords = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryHistoricalTradeRecordsRequest.encode, decode: QueryHistoricalTradeRecordsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "HistoricalTradeRecords", - clientResolver + clientResolver, + deps: [QueryHistoricalTradeRecordsRequest, QueryHistoricalTradeRecordsResponse] }); export const createGetIsOptedOutOfRewards = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryIsOptedOutOfRewardsRequest.encode, decode: QueryIsOptedOutOfRewardsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "IsOptedOutOfRewards", - clientResolver + clientResolver, + deps: [QueryIsOptedOutOfRewardsRequest, QueryIsOptedOutOfRewardsResponse] }); export const createGetOptedOutOfRewardsAccounts = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryOptedOutOfRewardsAccountsRequest.encode, decode: QueryOptedOutOfRewardsAccountsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "OptedOutOfRewardsAccounts", - clientResolver + clientResolver, + deps: [QueryOptedOutOfRewardsAccountsRequest, QueryOptedOutOfRewardsAccountsResponse] }); export const createGetMarketVolatility = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryMarketVolatilityRequest.encode, decode: QueryMarketVolatilityResponse.decode, service: "injective.exchange.v1beta1.Query", method: "MarketVolatility", - clientResolver + clientResolver, + deps: [QueryMarketVolatilityRequest, QueryMarketVolatilityResponse] }); export const createGetBinaryOptionsMarkets = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBinaryMarketsRequest.encode, decode: QueryBinaryMarketsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "BinaryOptionsMarkets", - clientResolver + clientResolver, + deps: [QueryBinaryMarketsRequest, QueryBinaryMarketsResponse] }); export const createGetTraderDerivativeConditionalOrders = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTraderDerivativeConditionalOrdersRequest.encode, decode: QueryTraderDerivativeConditionalOrdersResponse.decode, service: "injective.exchange.v1beta1.Query", method: "TraderDerivativeConditionalOrders", - clientResolver + clientResolver, + deps: [QueryTraderDerivativeConditionalOrdersRequest, QueryTraderDerivativeConditionalOrdersResponse] }); export const createGetMarketAtomicExecutionFeeMultiplier = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryMarketAtomicExecutionFeeMultiplierRequest.encode, decode: QueryMarketAtomicExecutionFeeMultiplierResponse.decode, service: "injective.exchange.v1beta1.Query", method: "MarketAtomicExecutionFeeMultiplier", - clientResolver + clientResolver, + deps: [QueryMarketAtomicExecutionFeeMultiplierRequest, QueryMarketAtomicExecutionFeeMultiplierResponse] }); export const createGetActiveStakeGrant = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryActiveStakeGrantRequest.encode, decode: QueryActiveStakeGrantResponse.decode, service: "injective.exchange.v1beta1.Query", method: "ActiveStakeGrant", - clientResolver + clientResolver, + deps: [QueryActiveStakeGrantRequest, QueryActiveStakeGrantResponse] }); export const createGetGrantAuthorization = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryGrantAuthorizationRequest.encode, decode: QueryGrantAuthorizationResponse.decode, service: "injective.exchange.v1beta1.Query", method: "GrantAuthorization", - clientResolver + clientResolver, + deps: [QueryGrantAuthorizationRequest, QueryGrantAuthorizationResponse] }); export const createGetGrantAuthorizations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryGrantAuthorizationsRequest.encode, decode: QueryGrantAuthorizationsResponse.decode, service: "injective.exchange.v1beta1.Query", method: "GrantAuthorizations", - clientResolver + clientResolver, + deps: [QueryGrantAuthorizationsRequest, QueryGrantAuthorizationsResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/query.ts b/libs/injectivejs/src/injective/exchange/v1beta1/query.ts index a03e3cd0..d8ebc81b 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Balance, BalanceAmino, DerivativePosition, DerivativePositionAmino, Gen import { MetadataStatistics, MetadataStatisticsAmino } from "../../oracle/v1beta1/oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum OrderSide { /** Side_Unspecified - will return both */ Side_Unspecified = 0, @@ -3232,9 +3231,9 @@ export const Subaccount = { typeUrl: "/injective.exchange.v1beta1.Subaccount", value: Subaccount.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Subaccount.typeUrl, Subaccount); function createBaseQuerySubaccountOrdersRequest(): QuerySubaccountOrdersRequest { return { subaccountId: "", @@ -3314,9 +3313,9 @@ export const QuerySubaccountOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrdersRequest", value: QuerySubaccountOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountOrdersRequest.typeUrl, QuerySubaccountOrdersRequest); function createBaseQuerySubaccountOrdersResponse(): QuerySubaccountOrdersResponse { return { buyOrders: [], @@ -3400,9 +3399,11 @@ export const QuerySubaccountOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrdersResponse", value: QuerySubaccountOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountOrdersResponse.typeUrl, QuerySubaccountOrdersResponse); function createBaseSubaccountOrderbookMetadataWithMarket(): SubaccountOrderbookMetadataWithMarket { return { metadata: undefined, @@ -3494,9 +3495,11 @@ export const SubaccountOrderbookMetadataWithMarket = { typeUrl: "/injective.exchange.v1beta1.SubaccountOrderbookMetadataWithMarket", value: SubaccountOrderbookMetadataWithMarket.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrderbookMetadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountOrderbookMetadataWithMarket.typeUrl, SubaccountOrderbookMetadataWithMarket); function createBaseQueryExchangeParamsRequest(): QueryExchangeParamsRequest { return {}; } @@ -3551,9 +3554,9 @@ export const QueryExchangeParamsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeParamsRequest", value: QueryExchangeParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryExchangeParamsRequest.typeUrl, QueryExchangeParamsRequest); function createBaseQueryExchangeParamsResponse(): QueryExchangeParamsResponse { return { params: Params.fromPartial({}) @@ -3621,9 +3624,11 @@ export const QueryExchangeParamsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeParamsResponse", value: QueryExchangeParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryExchangeParamsResponse.typeUrl, QueryExchangeParamsResponse); function createBaseQuerySubaccountDepositsRequest(): QuerySubaccountDepositsRequest { return { subaccountId: "", @@ -3703,9 +3708,11 @@ export const QuerySubaccountDepositsRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositsRequest", value: QuerySubaccountDepositsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Subaccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountDepositsRequest.typeUrl, QuerySubaccountDepositsRequest); function createBaseQuerySubaccountDepositsResponse_DepositsEntry(): QuerySubaccountDepositsResponse_DepositsEntry { return { key: "", @@ -3772,6 +3779,9 @@ export const QuerySubaccountDepositsResponse_DepositsEntry = { }, toProto(message: QuerySubaccountDepositsResponse_DepositsEntry): Uint8Array { return QuerySubaccountDepositsResponse_DepositsEntry.encode(message).finish(); + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; function createBaseQuerySubaccountDepositsResponse(): QuerySubaccountDepositsResponse { @@ -3864,9 +3874,11 @@ export const QuerySubaccountDepositsResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositsResponse", value: QuerySubaccountDepositsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountDepositsResponse.typeUrl, QuerySubaccountDepositsResponse); function createBaseQueryExchangeBalancesRequest(): QueryExchangeBalancesRequest { return {}; } @@ -3921,9 +3933,9 @@ export const QueryExchangeBalancesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeBalancesRequest", value: QueryExchangeBalancesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryExchangeBalancesRequest.typeUrl, QueryExchangeBalancesRequest); function createBaseQueryExchangeBalancesResponse(): QueryExchangeBalancesResponse { return { balances: [] @@ -3993,9 +4005,11 @@ export const QueryExchangeBalancesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryExchangeBalancesResponse", value: QueryExchangeBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Balance.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryExchangeBalancesResponse.typeUrl, QueryExchangeBalancesResponse); function createBaseQueryAggregateVolumeRequest(): QueryAggregateVolumeRequest { return { account: "" @@ -4063,9 +4077,9 @@ export const QueryAggregateVolumeRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumeRequest", value: QueryAggregateVolumeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateVolumeRequest.typeUrl, QueryAggregateVolumeRequest); function createBaseQueryAggregateVolumeResponse(): QueryAggregateVolumeResponse { return { aggregateVolumes: [] @@ -4135,9 +4149,11 @@ export const QueryAggregateVolumeResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumeResponse", value: QueryAggregateVolumeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateVolumeResponse.typeUrl, QueryAggregateVolumeResponse); function createBaseQueryAggregateVolumesRequest(): QueryAggregateVolumesRequest { return { accounts: [], @@ -4221,9 +4237,9 @@ export const QueryAggregateVolumesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumesRequest", value: QueryAggregateVolumesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateVolumesRequest.typeUrl, QueryAggregateVolumesRequest); function createBaseQueryAggregateVolumesResponse(): QueryAggregateVolumesResponse { return { aggregateAccountVolumes: [], @@ -4307,9 +4323,12 @@ export const QueryAggregateVolumesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateVolumesResponse", value: QueryAggregateVolumesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AggregateAccountVolumeRecord.registerTypeUrl(); + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateVolumesResponse.typeUrl, QueryAggregateVolumesResponse); function createBaseQueryAggregateMarketVolumeRequest(): QueryAggregateMarketVolumeRequest { return { marketId: "" @@ -4377,9 +4396,9 @@ export const QueryAggregateMarketVolumeRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumeRequest", value: QueryAggregateMarketVolumeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumeRequest.typeUrl, QueryAggregateMarketVolumeRequest); function createBaseQueryAggregateMarketVolumeResponse(): QueryAggregateMarketVolumeResponse { return { volume: VolumeRecord.fromPartial({}) @@ -4447,9 +4466,11 @@ export const QueryAggregateMarketVolumeResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumeResponse", value: QueryAggregateMarketVolumeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + VolumeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumeResponse.typeUrl, QueryAggregateMarketVolumeResponse); function createBaseQueryDenomDecimalRequest(): QueryDenomDecimalRequest { return { denom: "" @@ -4517,9 +4538,9 @@ export const QueryDenomDecimalRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalRequest", value: QueryDenomDecimalRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomDecimalRequest.typeUrl, QueryDenomDecimalRequest); function createBaseQueryDenomDecimalResponse(): QueryDenomDecimalResponse { return { decimal: BigInt(0) @@ -4587,9 +4608,9 @@ export const QueryDenomDecimalResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalResponse", value: QueryDenomDecimalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomDecimalResponse.typeUrl, QueryDenomDecimalResponse); function createBaseQueryDenomDecimalsRequest(): QueryDenomDecimalsRequest { return { denoms: [] @@ -4659,9 +4680,9 @@ export const QueryDenomDecimalsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalsRequest", value: QueryDenomDecimalsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomDecimalsRequest.typeUrl, QueryDenomDecimalsRequest); function createBaseQueryDenomDecimalsResponse(): QueryDenomDecimalsResponse { return { denomDecimals: [] @@ -4731,9 +4752,11 @@ export const QueryDenomDecimalsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDenomDecimalsResponse", value: QueryDenomDecimalsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomDecimals.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomDecimalsResponse.typeUrl, QueryDenomDecimalsResponse); function createBaseQueryAggregateMarketVolumesRequest(): QueryAggregateMarketVolumesRequest { return { marketIds: [] @@ -4803,9 +4826,9 @@ export const QueryAggregateMarketVolumesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumesRequest", value: QueryAggregateMarketVolumesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumesRequest.typeUrl, QueryAggregateMarketVolumesRequest); function createBaseQueryAggregateMarketVolumesResponse(): QueryAggregateMarketVolumesResponse { return { volumes: [] @@ -4875,9 +4898,11 @@ export const QueryAggregateMarketVolumesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAggregateMarketVolumesResponse", value: QueryAggregateMarketVolumesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MarketVolume.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAggregateMarketVolumesResponse.typeUrl, QueryAggregateMarketVolumesResponse); function createBaseQuerySubaccountDepositRequest(): QuerySubaccountDepositRequest { return { subaccountId: "", @@ -4957,9 +4982,9 @@ export const QuerySubaccountDepositRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositRequest", value: QuerySubaccountDepositRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountDepositRequest.typeUrl, QuerySubaccountDepositRequest); function createBaseQuerySubaccountDepositResponse(): QuerySubaccountDepositResponse { return { deposits: undefined @@ -5027,9 +5052,11 @@ export const QuerySubaccountDepositResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountDepositResponse", value: QuerySubaccountDepositResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountDepositResponse.typeUrl, QuerySubaccountDepositResponse); function createBaseQuerySpotMarketsRequest(): QuerySpotMarketsRequest { return { status: "", @@ -5111,9 +5138,9 @@ export const QuerySpotMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketsRequest", value: QuerySpotMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMarketsRequest.typeUrl, QuerySpotMarketsRequest); function createBaseQuerySpotMarketsResponse(): QuerySpotMarketsResponse { return { markets: [] @@ -5183,9 +5210,11 @@ export const QuerySpotMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketsResponse", value: QuerySpotMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotMarketsResponse.typeUrl, QuerySpotMarketsResponse); function createBaseQuerySpotMarketRequest(): QuerySpotMarketRequest { return { marketId: "" @@ -5253,9 +5282,9 @@ export const QuerySpotMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketRequest", value: QuerySpotMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMarketRequest.typeUrl, QuerySpotMarketRequest); function createBaseQuerySpotMarketResponse(): QuerySpotMarketResponse { return { market: undefined @@ -5323,9 +5352,11 @@ export const QuerySpotMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMarketResponse", value: QuerySpotMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotMarketResponse.typeUrl, QuerySpotMarketResponse); function createBaseQuerySpotOrderbookRequest(): QuerySpotOrderbookRequest { return { marketId: "", @@ -5441,9 +5472,9 @@ export const QuerySpotOrderbookRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrderbookRequest", value: QuerySpotOrderbookRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotOrderbookRequest.typeUrl, QuerySpotOrderbookRequest); function createBaseQuerySpotOrderbookResponse(): QuerySpotOrderbookResponse { return { buysPriceLevel: [], @@ -5527,9 +5558,11 @@ export const QuerySpotOrderbookResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrderbookResponse", value: QuerySpotOrderbookResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotOrderbookResponse.typeUrl, QuerySpotOrderbookResponse); function createBaseFullSpotMarket(): FullSpotMarket { return { market: undefined, @@ -5609,9 +5642,12 @@ export const FullSpotMarket = { typeUrl: "/injective.exchange.v1beta1.FullSpotMarket", value: FullSpotMarket.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarket.registerTypeUrl(); + MidPriceAndTOB.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FullSpotMarket.typeUrl, FullSpotMarket); function createBaseQueryFullSpotMarketsRequest(): QueryFullSpotMarketsRequest { return { status: "", @@ -5705,9 +5741,9 @@ export const QueryFullSpotMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketsRequest", value: QueryFullSpotMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFullSpotMarketsRequest.typeUrl, QueryFullSpotMarketsRequest); function createBaseQueryFullSpotMarketsResponse(): QueryFullSpotMarketsResponse { return { markets: [] @@ -5777,9 +5813,11 @@ export const QueryFullSpotMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketsResponse", value: QueryFullSpotMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullSpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFullSpotMarketsResponse.typeUrl, QueryFullSpotMarketsResponse); function createBaseQueryFullSpotMarketRequest(): QueryFullSpotMarketRequest { return { marketId: "", @@ -5859,9 +5897,9 @@ export const QueryFullSpotMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketRequest", value: QueryFullSpotMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFullSpotMarketRequest.typeUrl, QueryFullSpotMarketRequest); function createBaseQueryFullSpotMarketResponse(): QueryFullSpotMarketResponse { return { market: undefined @@ -5929,9 +5967,11 @@ export const QueryFullSpotMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFullSpotMarketResponse", value: QueryFullSpotMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullSpotMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFullSpotMarketResponse.typeUrl, QueryFullSpotMarketResponse); function createBaseQuerySpotOrdersByHashesRequest(): QuerySpotOrdersByHashesRequest { return { marketId: "", @@ -6025,9 +6065,9 @@ export const QuerySpotOrdersByHashesRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrdersByHashesRequest", value: QuerySpotOrdersByHashesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotOrdersByHashesRequest.typeUrl, QuerySpotOrdersByHashesRequest); function createBaseQuerySpotOrdersByHashesResponse(): QuerySpotOrdersByHashesResponse { return { orders: [] @@ -6097,9 +6137,11 @@ export const QuerySpotOrdersByHashesResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotOrdersByHashesResponse", value: QuerySpotOrdersByHashesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedSpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpotOrdersByHashesResponse.typeUrl, QuerySpotOrdersByHashesResponse); function createBaseQueryTraderSpotOrdersRequest(): QueryTraderSpotOrdersRequest { return { marketId: "", @@ -6179,9 +6221,9 @@ export const QueryTraderSpotOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderSpotOrdersRequest", value: QueryTraderSpotOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderSpotOrdersRequest.typeUrl, QueryTraderSpotOrdersRequest); function createBaseQueryAccountAddressSpotOrdersRequest(): QueryAccountAddressSpotOrdersRequest { return { marketId: "", @@ -6261,9 +6303,9 @@ export const QueryAccountAddressSpotOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressSpotOrdersRequest", value: QueryAccountAddressSpotOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressSpotOrdersRequest.typeUrl, QueryAccountAddressSpotOrdersRequest); function createBaseTrimmedSpotLimitOrder(): TrimmedSpotLimitOrder { return { price: "", @@ -6391,9 +6433,9 @@ export const TrimmedSpotLimitOrder = { typeUrl: "/injective.exchange.v1beta1.TrimmedSpotLimitOrder", value: TrimmedSpotLimitOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TrimmedSpotLimitOrder.typeUrl, TrimmedSpotLimitOrder); function createBaseQueryTraderSpotOrdersResponse(): QueryTraderSpotOrdersResponse { return { orders: [] @@ -6463,9 +6505,11 @@ export const QueryTraderSpotOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTraderSpotOrdersResponse", value: QueryTraderSpotOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedSpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTraderSpotOrdersResponse.typeUrl, QueryTraderSpotOrdersResponse); function createBaseQueryAccountAddressSpotOrdersResponse(): QueryAccountAddressSpotOrdersResponse { return { orders: [] @@ -6535,9 +6579,11 @@ export const QueryAccountAddressSpotOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressSpotOrdersResponse", value: QueryAccountAddressSpotOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedSpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountAddressSpotOrdersResponse.typeUrl, QueryAccountAddressSpotOrdersResponse); function createBaseQuerySpotMidPriceAndTOBRequest(): QuerySpotMidPriceAndTOBRequest { return { marketId: "" @@ -6605,9 +6651,9 @@ export const QuerySpotMidPriceAndTOBRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMidPriceAndTOBRequest", value: QuerySpotMidPriceAndTOBRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMidPriceAndTOBRequest.typeUrl, QuerySpotMidPriceAndTOBRequest); function createBaseQuerySpotMidPriceAndTOBResponse(): QuerySpotMidPriceAndTOBResponse { return { midPrice: undefined, @@ -6699,9 +6745,9 @@ export const QuerySpotMidPriceAndTOBResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySpotMidPriceAndTOBResponse", value: QuerySpotMidPriceAndTOBResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpotMidPriceAndTOBResponse.typeUrl, QuerySpotMidPriceAndTOBResponse); function createBaseQueryDerivativeMidPriceAndTOBRequest(): QueryDerivativeMidPriceAndTOBRequest { return { marketId: "" @@ -6769,9 +6815,9 @@ export const QueryDerivativeMidPriceAndTOBRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMidPriceAndTOBRequest", value: QueryDerivativeMidPriceAndTOBRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMidPriceAndTOBRequest.typeUrl, QueryDerivativeMidPriceAndTOBRequest); function createBaseQueryDerivativeMidPriceAndTOBResponse(): QueryDerivativeMidPriceAndTOBResponse { return { midPrice: undefined, @@ -6863,9 +6909,9 @@ export const QueryDerivativeMidPriceAndTOBResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMidPriceAndTOBResponse", value: QueryDerivativeMidPriceAndTOBResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMidPriceAndTOBResponse.typeUrl, QueryDerivativeMidPriceAndTOBResponse); function createBaseQueryDerivativeOrderbookRequest(): QueryDerivativeOrderbookRequest { return { marketId: "", @@ -6957,9 +7003,9 @@ export const QueryDerivativeOrderbookRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrderbookRequest", value: QueryDerivativeOrderbookRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeOrderbookRequest.typeUrl, QueryDerivativeOrderbookRequest); function createBaseQueryDerivativeOrderbookResponse(): QueryDerivativeOrderbookResponse { return { buysPriceLevel: [], @@ -7043,9 +7089,11 @@ export const QueryDerivativeOrderbookResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrderbookResponse", value: QueryDerivativeOrderbookResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeOrderbookResponse.typeUrl, QueryDerivativeOrderbookResponse); function createBaseQueryTraderSpotOrdersToCancelUpToAmountRequest(): QueryTraderSpotOrdersToCancelUpToAmountRequest { return { marketId: "", @@ -7173,9 +7221,9 @@ export const QueryTraderSpotOrdersToCancelUpToAmountRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderSpotOrdersToCancelUpToAmountRequest", value: QueryTraderSpotOrdersToCancelUpToAmountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderSpotOrdersToCancelUpToAmountRequest.typeUrl, QueryTraderSpotOrdersToCancelUpToAmountRequest); function createBaseQueryTraderDerivativeOrdersToCancelUpToAmountRequest(): QueryTraderDerivativeOrdersToCancelUpToAmountRequest { return { marketId: "", @@ -7291,9 +7339,9 @@ export const QueryTraderDerivativeOrdersToCancelUpToAmountRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeOrdersToCancelUpToAmountRequest", value: QueryTraderDerivativeOrdersToCancelUpToAmountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderDerivativeOrdersToCancelUpToAmountRequest.typeUrl, QueryTraderDerivativeOrdersToCancelUpToAmountRequest); function createBaseQueryTraderDerivativeOrdersRequest(): QueryTraderDerivativeOrdersRequest { return { marketId: "", @@ -7373,9 +7421,9 @@ export const QueryTraderDerivativeOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeOrdersRequest", value: QueryTraderDerivativeOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderDerivativeOrdersRequest.typeUrl, QueryTraderDerivativeOrdersRequest); function createBaseQueryAccountAddressDerivativeOrdersRequest(): QueryAccountAddressDerivativeOrdersRequest { return { marketId: "", @@ -7455,9 +7503,9 @@ export const QueryAccountAddressDerivativeOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressDerivativeOrdersRequest", value: QueryAccountAddressDerivativeOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressDerivativeOrdersRequest.typeUrl, QueryAccountAddressDerivativeOrdersRequest); function createBaseTrimmedDerivativeLimitOrder(): TrimmedDerivativeLimitOrder { return { price: "", @@ -7597,9 +7645,9 @@ export const TrimmedDerivativeLimitOrder = { typeUrl: "/injective.exchange.v1beta1.TrimmedDerivativeLimitOrder", value: TrimmedDerivativeLimitOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TrimmedDerivativeLimitOrder.typeUrl, TrimmedDerivativeLimitOrder); function createBaseQueryTraderDerivativeOrdersResponse(): QueryTraderDerivativeOrdersResponse { return { orders: [] @@ -7669,9 +7717,11 @@ export const QueryTraderDerivativeOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeOrdersResponse", value: QueryTraderDerivativeOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTraderDerivativeOrdersResponse.typeUrl, QueryTraderDerivativeOrdersResponse); function createBaseQueryAccountAddressDerivativeOrdersResponse(): QueryAccountAddressDerivativeOrdersResponse { return { orders: [] @@ -7741,9 +7791,11 @@ export const QueryAccountAddressDerivativeOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryAccountAddressDerivativeOrdersResponse", value: QueryAccountAddressDerivativeOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountAddressDerivativeOrdersResponse.typeUrl, QueryAccountAddressDerivativeOrdersResponse); function createBaseQueryDerivativeOrdersByHashesRequest(): QueryDerivativeOrdersByHashesRequest { return { marketId: "", @@ -7837,9 +7889,9 @@ export const QueryDerivativeOrdersByHashesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrdersByHashesRequest", value: QueryDerivativeOrdersByHashesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeOrdersByHashesRequest.typeUrl, QueryDerivativeOrdersByHashesRequest); function createBaseQueryDerivativeOrdersByHashesResponse(): QueryDerivativeOrdersByHashesResponse { return { orders: [] @@ -7909,9 +7961,11 @@ export const QueryDerivativeOrdersByHashesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeOrdersByHashesResponse", value: QueryDerivativeOrdersByHashesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeOrdersByHashesResponse.typeUrl, QueryDerivativeOrdersByHashesResponse); function createBaseQueryDerivativeMarketsRequest(): QueryDerivativeMarketsRequest { return { status: "", @@ -8005,9 +8059,9 @@ export const QueryDerivativeMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketsRequest", value: QueryDerivativeMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketsRequest.typeUrl, QueryDerivativeMarketsRequest); function createBasePriceLevel(): PriceLevel { return { price: "", @@ -8087,9 +8141,9 @@ export const PriceLevel = { typeUrl: "/injective.exchange.v1beta1.PriceLevel", value: PriceLevel.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceLevel.typeUrl, PriceLevel); function createBasePerpetualMarketState(): PerpetualMarketState { return { marketInfo: undefined, @@ -8169,9 +8223,12 @@ export const PerpetualMarketState = { typeUrl: "/injective.exchange.v1beta1.PerpetualMarketState", value: PerpetualMarketState.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketInfo.registerTypeUrl(); + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PerpetualMarketState.typeUrl, PerpetualMarketState); function createBaseFullDerivativeMarket(): FullDerivativeMarket { return { market: undefined, @@ -8287,9 +8344,14 @@ export const FullDerivativeMarket = { typeUrl: "/injective.exchange.v1beta1.FullDerivativeMarket", value: FullDerivativeMarket.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarket.registerTypeUrl(); + PerpetualMarketState.registerTypeUrl(); + ExpiryFuturesMarketInfo.registerTypeUrl(); + MidPriceAndTOB.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FullDerivativeMarket.typeUrl, FullDerivativeMarket); function createBaseQueryDerivativeMarketsResponse(): QueryDerivativeMarketsResponse { return { markets: [] @@ -8359,9 +8421,11 @@ export const QueryDerivativeMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketsResponse", value: QueryDerivativeMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullDerivativeMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeMarketsResponse.typeUrl, QueryDerivativeMarketsResponse); function createBaseQueryDerivativeMarketRequest(): QueryDerivativeMarketRequest { return { marketId: "" @@ -8429,9 +8493,9 @@ export const QueryDerivativeMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketRequest", value: QueryDerivativeMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketRequest.typeUrl, QueryDerivativeMarketRequest); function createBaseQueryDerivativeMarketResponse(): QueryDerivativeMarketResponse { return { market: undefined @@ -8499,9 +8563,11 @@ export const QueryDerivativeMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketResponse", value: QueryDerivativeMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FullDerivativeMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDerivativeMarketResponse.typeUrl, QueryDerivativeMarketResponse); function createBaseQueryDerivativeMarketAddressRequest(): QueryDerivativeMarketAddressRequest { return { marketId: "" @@ -8569,9 +8635,9 @@ export const QueryDerivativeMarketAddressRequest = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketAddressRequest", value: QueryDerivativeMarketAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketAddressRequest.typeUrl, QueryDerivativeMarketAddressRequest); function createBaseQueryDerivativeMarketAddressResponse(): QueryDerivativeMarketAddressResponse { return { address: "", @@ -8651,9 +8717,9 @@ export const QueryDerivativeMarketAddressResponse = { typeUrl: "/injective.exchange.v1beta1.QueryDerivativeMarketAddressResponse", value: QueryDerivativeMarketAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDerivativeMarketAddressResponse.typeUrl, QueryDerivativeMarketAddressResponse); function createBaseQuerySubaccountTradeNonceRequest(): QuerySubaccountTradeNonceRequest { return { subaccountId: "" @@ -8721,9 +8787,9 @@ export const QuerySubaccountTradeNonceRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountTradeNonceRequest", value: QuerySubaccountTradeNonceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountTradeNonceRequest.typeUrl, QuerySubaccountTradeNonceRequest); function createBaseQuerySubaccountPositionsRequest(): QuerySubaccountPositionsRequest { return { subaccountId: "" @@ -8791,9 +8857,9 @@ export const QuerySubaccountPositionsRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionsRequest", value: QuerySubaccountPositionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountPositionsRequest.typeUrl, QuerySubaccountPositionsRequest); function createBaseQuerySubaccountPositionInMarketRequest(): QuerySubaccountPositionInMarketRequest { return { subaccountId: "", @@ -8873,9 +8939,9 @@ export const QuerySubaccountPositionInMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionInMarketRequest", value: QuerySubaccountPositionInMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountPositionInMarketRequest.typeUrl, QuerySubaccountPositionInMarketRequest); function createBaseQuerySubaccountEffectivePositionInMarketRequest(): QuerySubaccountEffectivePositionInMarketRequest { return { subaccountId: "", @@ -8955,9 +9021,9 @@ export const QuerySubaccountEffectivePositionInMarketRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountEffectivePositionInMarketRequest", value: QuerySubaccountEffectivePositionInMarketRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountEffectivePositionInMarketRequest.typeUrl, QuerySubaccountEffectivePositionInMarketRequest); function createBaseQuerySubaccountOrderMetadataRequest(): QuerySubaccountOrderMetadataRequest { return { subaccountId: "" @@ -9025,9 +9091,9 @@ export const QuerySubaccountOrderMetadataRequest = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrderMetadataRequest", value: QuerySubaccountOrderMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountOrderMetadataRequest.typeUrl, QuerySubaccountOrderMetadataRequest); function createBaseQuerySubaccountPositionsResponse(): QuerySubaccountPositionsResponse { return { state: [] @@ -9097,9 +9163,11 @@ export const QuerySubaccountPositionsResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionsResponse", value: QuerySubaccountPositionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativePosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountPositionsResponse.typeUrl, QuerySubaccountPositionsResponse); function createBaseQuerySubaccountPositionInMarketResponse(): QuerySubaccountPositionInMarketResponse { return { state: undefined @@ -9167,9 +9235,11 @@ export const QuerySubaccountPositionInMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountPositionInMarketResponse", value: QuerySubaccountPositionInMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Position.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountPositionInMarketResponse.typeUrl, QuerySubaccountPositionInMarketResponse); function createBaseEffectivePosition(): EffectivePosition { return { isLong: false, @@ -9273,9 +9343,9 @@ export const EffectivePosition = { typeUrl: "/injective.exchange.v1beta1.EffectivePosition", value: EffectivePosition.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EffectivePosition.typeUrl, EffectivePosition); function createBaseQuerySubaccountEffectivePositionInMarketResponse(): QuerySubaccountEffectivePositionInMarketResponse { return { state: undefined @@ -9343,9 +9413,11 @@ export const QuerySubaccountEffectivePositionInMarketResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountEffectivePositionInMarketResponse", value: QuerySubaccountEffectivePositionInMarketResponse.encode(message).finish() }; + }, + registerTypeUrl() { + EffectivePosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountEffectivePositionInMarketResponse.typeUrl, QuerySubaccountEffectivePositionInMarketResponse); function createBaseQueryPerpetualMarketInfoRequest(): QueryPerpetualMarketInfoRequest { return { marketId: "" @@ -9413,9 +9485,9 @@ export const QueryPerpetualMarketInfoRequest = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketInfoRequest", value: QueryPerpetualMarketInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPerpetualMarketInfoRequest.typeUrl, QueryPerpetualMarketInfoRequest); function createBaseQueryPerpetualMarketInfoResponse(): QueryPerpetualMarketInfoResponse { return { info: PerpetualMarketInfo.fromPartial({}) @@ -9483,9 +9555,11 @@ export const QueryPerpetualMarketInfoResponse = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketInfoResponse", value: QueryPerpetualMarketInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPerpetualMarketInfoResponse.typeUrl, QueryPerpetualMarketInfoResponse); function createBaseQueryExpiryFuturesMarketInfoRequest(): QueryExpiryFuturesMarketInfoRequest { return { marketId: "" @@ -9553,9 +9627,9 @@ export const QueryExpiryFuturesMarketInfoRequest = { typeUrl: "/injective.exchange.v1beta1.QueryExpiryFuturesMarketInfoRequest", value: QueryExpiryFuturesMarketInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryExpiryFuturesMarketInfoRequest.typeUrl, QueryExpiryFuturesMarketInfoRequest); function createBaseQueryExpiryFuturesMarketInfoResponse(): QueryExpiryFuturesMarketInfoResponse { return { info: ExpiryFuturesMarketInfo.fromPartial({}) @@ -9623,9 +9697,11 @@ export const QueryExpiryFuturesMarketInfoResponse = { typeUrl: "/injective.exchange.v1beta1.QueryExpiryFuturesMarketInfoResponse", value: QueryExpiryFuturesMarketInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ExpiryFuturesMarketInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryExpiryFuturesMarketInfoResponse.typeUrl, QueryExpiryFuturesMarketInfoResponse); function createBaseQueryPerpetualMarketFundingRequest(): QueryPerpetualMarketFundingRequest { return { marketId: "" @@ -9693,9 +9769,9 @@ export const QueryPerpetualMarketFundingRequest = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketFundingRequest", value: QueryPerpetualMarketFundingRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPerpetualMarketFundingRequest.typeUrl, QueryPerpetualMarketFundingRequest); function createBaseQueryPerpetualMarketFundingResponse(): QueryPerpetualMarketFundingResponse { return { state: PerpetualMarketFunding.fromPartial({}) @@ -9763,9 +9839,11 @@ export const QueryPerpetualMarketFundingResponse = { typeUrl: "/injective.exchange.v1beta1.QueryPerpetualMarketFundingResponse", value: QueryPerpetualMarketFundingResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PerpetualMarketFunding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPerpetualMarketFundingResponse.typeUrl, QueryPerpetualMarketFundingResponse); function createBaseQuerySubaccountOrderMetadataResponse(): QuerySubaccountOrderMetadataResponse { return { metadata: [] @@ -9835,9 +9913,11 @@ export const QuerySubaccountOrderMetadataResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountOrderMetadataResponse", value: QuerySubaccountOrderMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountOrderbookMetadataWithMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySubaccountOrderMetadataResponse.typeUrl, QuerySubaccountOrderMetadataResponse); function createBaseQuerySubaccountTradeNonceResponse(): QuerySubaccountTradeNonceResponse { return { nonce: 0 @@ -9905,9 +9985,9 @@ export const QuerySubaccountTradeNonceResponse = { typeUrl: "/injective.exchange.v1beta1.QuerySubaccountTradeNonceResponse", value: QuerySubaccountTradeNonceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySubaccountTradeNonceResponse.typeUrl, QuerySubaccountTradeNonceResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -9962,9 +10042,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.exchange.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -10032,9 +10112,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.exchange.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryPositionsRequest(): QueryPositionsRequest { return {}; } @@ -10089,9 +10171,9 @@ export const QueryPositionsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryPositionsRequest", value: QueryPositionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPositionsRequest.typeUrl, QueryPositionsRequest); function createBaseQueryPositionsResponse(): QueryPositionsResponse { return { state: [] @@ -10161,9 +10243,11 @@ export const QueryPositionsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryPositionsResponse", value: QueryPositionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativePosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPositionsResponse.typeUrl, QueryPositionsResponse); function createBaseQueryTradeRewardPointsRequest(): QueryTradeRewardPointsRequest { return { accounts: [], @@ -10245,9 +10329,9 @@ export const QueryTradeRewardPointsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardPointsRequest", value: QueryTradeRewardPointsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTradeRewardPointsRequest.typeUrl, QueryTradeRewardPointsRequest); function createBaseQueryTradeRewardPointsResponse(): QueryTradeRewardPointsResponse { return { accountTradeRewardPoints: [] @@ -10317,9 +10401,9 @@ export const QueryTradeRewardPointsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardPointsResponse", value: QueryTradeRewardPointsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTradeRewardPointsResponse.typeUrl, QueryTradeRewardPointsResponse); function createBaseQueryTradeRewardCampaignRequest(): QueryTradeRewardCampaignRequest { return {}; } @@ -10374,9 +10458,9 @@ export const QueryTradeRewardCampaignRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardCampaignRequest", value: QueryTradeRewardCampaignRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTradeRewardCampaignRequest.typeUrl, QueryTradeRewardCampaignRequest); function createBaseQueryTradeRewardCampaignResponse(): QueryTradeRewardCampaignResponse { return { tradingRewardCampaignInfo: undefined, @@ -10498,9 +10582,12 @@ export const QueryTradeRewardCampaignResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTradeRewardCampaignResponse", value: QueryTradeRewardCampaignResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TradingRewardCampaignInfo.registerTypeUrl(); + CampaignRewardPool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTradeRewardCampaignResponse.typeUrl, QueryTradeRewardCampaignResponse); function createBaseQueryIsOptedOutOfRewardsRequest(): QueryIsOptedOutOfRewardsRequest { return { account: "" @@ -10568,9 +10655,9 @@ export const QueryIsOptedOutOfRewardsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryIsOptedOutOfRewardsRequest", value: QueryIsOptedOutOfRewardsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryIsOptedOutOfRewardsRequest.typeUrl, QueryIsOptedOutOfRewardsRequest); function createBaseQueryIsOptedOutOfRewardsResponse(): QueryIsOptedOutOfRewardsResponse { return { isOptedOut: false @@ -10638,9 +10725,9 @@ export const QueryIsOptedOutOfRewardsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryIsOptedOutOfRewardsResponse", value: QueryIsOptedOutOfRewardsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryIsOptedOutOfRewardsResponse.typeUrl, QueryIsOptedOutOfRewardsResponse); function createBaseQueryOptedOutOfRewardsAccountsRequest(): QueryOptedOutOfRewardsAccountsRequest { return {}; } @@ -10695,9 +10782,9 @@ export const QueryOptedOutOfRewardsAccountsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryOptedOutOfRewardsAccountsRequest", value: QueryOptedOutOfRewardsAccountsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOptedOutOfRewardsAccountsRequest.typeUrl, QueryOptedOutOfRewardsAccountsRequest); function createBaseQueryOptedOutOfRewardsAccountsResponse(): QueryOptedOutOfRewardsAccountsResponse { return { accounts: [] @@ -10767,9 +10854,9 @@ export const QueryOptedOutOfRewardsAccountsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryOptedOutOfRewardsAccountsResponse", value: QueryOptedOutOfRewardsAccountsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOptedOutOfRewardsAccountsResponse.typeUrl, QueryOptedOutOfRewardsAccountsResponse); function createBaseQueryFeeDiscountAccountInfoRequest(): QueryFeeDiscountAccountInfoRequest { return { account: "" @@ -10837,9 +10924,9 @@ export const QueryFeeDiscountAccountInfoRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountAccountInfoRequest", value: QueryFeeDiscountAccountInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeeDiscountAccountInfoRequest.typeUrl, QueryFeeDiscountAccountInfoRequest); function createBaseQueryFeeDiscountAccountInfoResponse(): QueryFeeDiscountAccountInfoResponse { return { tierLevel: BigInt(0), @@ -10931,9 +11018,12 @@ export const QueryFeeDiscountAccountInfoResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountAccountInfoResponse", value: QueryFeeDiscountAccountInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountTierInfo.registerTypeUrl(); + FeeDiscountTierTTL.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeeDiscountAccountInfoResponse.typeUrl, QueryFeeDiscountAccountInfoResponse); function createBaseQueryFeeDiscountScheduleRequest(): QueryFeeDiscountScheduleRequest { return {}; } @@ -10988,9 +11078,9 @@ export const QueryFeeDiscountScheduleRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountScheduleRequest", value: QueryFeeDiscountScheduleRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeeDiscountScheduleRequest.typeUrl, QueryFeeDiscountScheduleRequest); function createBaseQueryFeeDiscountScheduleResponse(): QueryFeeDiscountScheduleResponse { return { feeDiscountSchedule: undefined @@ -11058,9 +11148,11 @@ export const QueryFeeDiscountScheduleResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountScheduleResponse", value: QueryFeeDiscountScheduleResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeeDiscountSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeeDiscountScheduleResponse.typeUrl, QueryFeeDiscountScheduleResponse); function createBaseQueryBalanceMismatchesRequest(): QueryBalanceMismatchesRequest { return { dustFactor: BigInt(0) @@ -11128,9 +11220,9 @@ export const QueryBalanceMismatchesRequest = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceMismatchesRequest", value: QueryBalanceMismatchesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceMismatchesRequest.typeUrl, QueryBalanceMismatchesRequest); function createBaseBalanceMismatch(): BalanceMismatch { return { subaccountId: "", @@ -11270,9 +11362,9 @@ export const BalanceMismatch = { typeUrl: "/injective.exchange.v1beta1.BalanceMismatch", value: BalanceMismatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BalanceMismatch.typeUrl, BalanceMismatch); function createBaseQueryBalanceMismatchesResponse(): QueryBalanceMismatchesResponse { return { balanceMismatches: [] @@ -11342,9 +11434,11 @@ export const QueryBalanceMismatchesResponse = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceMismatchesResponse", value: QueryBalanceMismatchesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BalanceMismatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceMismatchesResponse.typeUrl, QueryBalanceMismatchesResponse); function createBaseQueryBalanceWithBalanceHoldsRequest(): QueryBalanceWithBalanceHoldsRequest { return {}; } @@ -11399,9 +11493,9 @@ export const QueryBalanceWithBalanceHoldsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceWithBalanceHoldsRequest", value: QueryBalanceWithBalanceHoldsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceWithBalanceHoldsRequest.typeUrl, QueryBalanceWithBalanceHoldsRequest); function createBaseBalanceWithMarginHold(): BalanceWithMarginHold { return { subaccountId: "", @@ -11517,9 +11611,9 @@ export const BalanceWithMarginHold = { typeUrl: "/injective.exchange.v1beta1.BalanceWithMarginHold", value: BalanceWithMarginHold.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BalanceWithMarginHold.typeUrl, BalanceWithMarginHold); function createBaseQueryBalanceWithBalanceHoldsResponse(): QueryBalanceWithBalanceHoldsResponse { return { balanceWithBalanceHolds: [] @@ -11589,9 +11683,11 @@ export const QueryBalanceWithBalanceHoldsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryBalanceWithBalanceHoldsResponse", value: QueryBalanceWithBalanceHoldsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BalanceWithMarginHold.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceWithBalanceHoldsResponse.typeUrl, QueryBalanceWithBalanceHoldsResponse); function createBaseQueryFeeDiscountTierStatisticsRequest(): QueryFeeDiscountTierStatisticsRequest { return {}; } @@ -11646,9 +11742,9 @@ export const QueryFeeDiscountTierStatisticsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountTierStatisticsRequest", value: QueryFeeDiscountTierStatisticsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeeDiscountTierStatisticsRequest.typeUrl, QueryFeeDiscountTierStatisticsRequest); function createBaseTierStatistic(): TierStatistic { return { tier: BigInt(0), @@ -11728,9 +11824,9 @@ export const TierStatistic = { typeUrl: "/injective.exchange.v1beta1.TierStatistic", value: TierStatistic.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TierStatistic.typeUrl, TierStatistic); function createBaseQueryFeeDiscountTierStatisticsResponse(): QueryFeeDiscountTierStatisticsResponse { return { statistics: [] @@ -11800,9 +11896,11 @@ export const QueryFeeDiscountTierStatisticsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryFeeDiscountTierStatisticsResponse", value: QueryFeeDiscountTierStatisticsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TierStatistic.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeeDiscountTierStatisticsResponse.typeUrl, QueryFeeDiscountTierStatisticsResponse); function createBaseMitoVaultInfosRequest(): MitoVaultInfosRequest { return {}; } @@ -11857,9 +11955,9 @@ export const MitoVaultInfosRequest = { typeUrl: "/injective.exchange.v1beta1.MitoVaultInfosRequest", value: MitoVaultInfosRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MitoVaultInfosRequest.typeUrl, MitoVaultInfosRequest); function createBaseMitoVaultInfosResponse(): MitoVaultInfosResponse { return { masterAddresses: [], @@ -11971,9 +12069,9 @@ export const MitoVaultInfosResponse = { typeUrl: "/injective.exchange.v1beta1.MitoVaultInfosResponse", value: MitoVaultInfosResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MitoVaultInfosResponse.typeUrl, MitoVaultInfosResponse); function createBaseQueryMarketIDFromVaultRequest(): QueryMarketIDFromVaultRequest { return { vaultAddress: "" @@ -12041,9 +12139,9 @@ export const QueryMarketIDFromVaultRequest = { typeUrl: "/injective.exchange.v1beta1.QueryMarketIDFromVaultRequest", value: QueryMarketIDFromVaultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketIDFromVaultRequest.typeUrl, QueryMarketIDFromVaultRequest); function createBaseQueryMarketIDFromVaultResponse(): QueryMarketIDFromVaultResponse { return { marketId: "" @@ -12111,9 +12209,9 @@ export const QueryMarketIDFromVaultResponse = { typeUrl: "/injective.exchange.v1beta1.QueryMarketIDFromVaultResponse", value: QueryMarketIDFromVaultResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketIDFromVaultResponse.typeUrl, QueryMarketIDFromVaultResponse); function createBaseQueryHistoricalTradeRecordsRequest(): QueryHistoricalTradeRecordsRequest { return { marketId: "" @@ -12181,9 +12279,9 @@ export const QueryHistoricalTradeRecordsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryHistoricalTradeRecordsRequest", value: QueryHistoricalTradeRecordsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalTradeRecordsRequest.typeUrl, QueryHistoricalTradeRecordsRequest); function createBaseQueryHistoricalTradeRecordsResponse(): QueryHistoricalTradeRecordsResponse { return { tradeRecords: [] @@ -12253,9 +12351,11 @@ export const QueryHistoricalTradeRecordsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryHistoricalTradeRecordsResponse", value: QueryHistoricalTradeRecordsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TradeRecords.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalTradeRecordsResponse.typeUrl, QueryHistoricalTradeRecordsResponse); function createBaseTradeHistoryOptions(): TradeHistoryOptions { return { tradeGroupingSec: BigInt(0), @@ -12359,9 +12459,9 @@ export const TradeHistoryOptions = { typeUrl: "/injective.exchange.v1beta1.TradeHistoryOptions", value: TradeHistoryOptions.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradeHistoryOptions.typeUrl, TradeHistoryOptions); function createBaseQueryMarketVolatilityRequest(): QueryMarketVolatilityRequest { return { marketId: "", @@ -12441,9 +12541,11 @@ export const QueryMarketVolatilityRequest = { typeUrl: "/injective.exchange.v1beta1.QueryMarketVolatilityRequest", value: QueryMarketVolatilityRequest.encode(message).finish() }; + }, + registerTypeUrl() { + TradeHistoryOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryMarketVolatilityRequest.typeUrl, QueryMarketVolatilityRequest); function createBaseQueryMarketVolatilityResponse(): QueryMarketVolatilityResponse { return { volatility: "", @@ -12537,9 +12639,12 @@ export const QueryMarketVolatilityResponse = { typeUrl: "/injective.exchange.v1beta1.QueryMarketVolatilityResponse", value: QueryMarketVolatilityResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MetadataStatistics.registerTypeUrl(); + TradeRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryMarketVolatilityResponse.typeUrl, QueryMarketVolatilityResponse); function createBaseQueryBinaryMarketsRequest(): QueryBinaryMarketsRequest { return { status: "" @@ -12607,9 +12712,9 @@ export const QueryBinaryMarketsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryBinaryMarketsRequest", value: QueryBinaryMarketsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBinaryMarketsRequest.typeUrl, QueryBinaryMarketsRequest); function createBaseQueryBinaryMarketsResponse(): QueryBinaryMarketsResponse { return { markets: [] @@ -12679,9 +12784,11 @@ export const QueryBinaryMarketsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryBinaryMarketsResponse", value: QueryBinaryMarketsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BinaryOptionsMarket.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBinaryMarketsResponse.typeUrl, QueryBinaryMarketsResponse); function createBaseQueryTraderDerivativeConditionalOrdersRequest(): QueryTraderDerivativeConditionalOrdersRequest { return { subaccountId: "", @@ -12761,9 +12868,9 @@ export const QueryTraderDerivativeConditionalOrdersRequest = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeConditionalOrdersRequest", value: QueryTraderDerivativeConditionalOrdersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTraderDerivativeConditionalOrdersRequest.typeUrl, QueryTraderDerivativeConditionalOrdersRequest); function createBaseTrimmedDerivativeConditionalOrder(): TrimmedDerivativeConditionalOrder { return { price: "", @@ -12915,9 +13022,9 @@ export const TrimmedDerivativeConditionalOrder = { typeUrl: "/injective.exchange.v1beta1.TrimmedDerivativeConditionalOrder", value: TrimmedDerivativeConditionalOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TrimmedDerivativeConditionalOrder.typeUrl, TrimmedDerivativeConditionalOrder); function createBaseQueryTraderDerivativeConditionalOrdersResponse(): QueryTraderDerivativeConditionalOrdersResponse { return { orders: [] @@ -12987,9 +13094,11 @@ export const QueryTraderDerivativeConditionalOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.QueryTraderDerivativeConditionalOrdersResponse", value: QueryTraderDerivativeConditionalOrdersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TrimmedDerivativeConditionalOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTraderDerivativeConditionalOrdersResponse.typeUrl, QueryTraderDerivativeConditionalOrdersResponse); function createBaseQueryMarketAtomicExecutionFeeMultiplierRequest(): QueryMarketAtomicExecutionFeeMultiplierRequest { return { marketId: "" @@ -13057,9 +13166,9 @@ export const QueryMarketAtomicExecutionFeeMultiplierRequest = { typeUrl: "/injective.exchange.v1beta1.QueryMarketAtomicExecutionFeeMultiplierRequest", value: QueryMarketAtomicExecutionFeeMultiplierRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketAtomicExecutionFeeMultiplierRequest.typeUrl, QueryMarketAtomicExecutionFeeMultiplierRequest); function createBaseQueryMarketAtomicExecutionFeeMultiplierResponse(): QueryMarketAtomicExecutionFeeMultiplierResponse { return { multiplier: "" @@ -13127,9 +13236,9 @@ export const QueryMarketAtomicExecutionFeeMultiplierResponse = { typeUrl: "/injective.exchange.v1beta1.QueryMarketAtomicExecutionFeeMultiplierResponse", value: QueryMarketAtomicExecutionFeeMultiplierResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryMarketAtomicExecutionFeeMultiplierResponse.typeUrl, QueryMarketAtomicExecutionFeeMultiplierResponse); function createBaseQueryActiveStakeGrantRequest(): QueryActiveStakeGrantRequest { return { grantee: "" @@ -13197,9 +13306,9 @@ export const QueryActiveStakeGrantRequest = { typeUrl: "/injective.exchange.v1beta1.QueryActiveStakeGrantRequest", value: QueryActiveStakeGrantRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryActiveStakeGrantRequest.typeUrl, QueryActiveStakeGrantRequest); function createBaseQueryActiveStakeGrantResponse(): QueryActiveStakeGrantResponse { return { grant: undefined, @@ -13279,9 +13388,12 @@ export const QueryActiveStakeGrantResponse = { typeUrl: "/injective.exchange.v1beta1.QueryActiveStakeGrantResponse", value: QueryActiveStakeGrantResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ActiveGrant.registerTypeUrl(); + EffectiveGrant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryActiveStakeGrantResponse.typeUrl, QueryActiveStakeGrantResponse); function createBaseQueryGrantAuthorizationRequest(): QueryGrantAuthorizationRequest { return { granter: "", @@ -13361,9 +13473,9 @@ export const QueryGrantAuthorizationRequest = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationRequest", value: QueryGrantAuthorizationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryGrantAuthorizationRequest.typeUrl, QueryGrantAuthorizationRequest); function createBaseQueryGrantAuthorizationResponse(): QueryGrantAuthorizationResponse { return { amount: "" @@ -13431,9 +13543,9 @@ export const QueryGrantAuthorizationResponse = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationResponse", value: QueryGrantAuthorizationResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryGrantAuthorizationResponse.typeUrl, QueryGrantAuthorizationResponse); function createBaseQueryGrantAuthorizationsRequest(): QueryGrantAuthorizationsRequest { return { granter: "" @@ -13501,9 +13613,9 @@ export const QueryGrantAuthorizationsRequest = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationsRequest", value: QueryGrantAuthorizationsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryGrantAuthorizationsRequest.typeUrl, QueryGrantAuthorizationsRequest); function createBaseQueryGrantAuthorizationsResponse(): QueryGrantAuthorizationsResponse { return { totalGrantAmount: "", @@ -13585,6 +13697,8 @@ export const QueryGrantAuthorizationsResponse = { typeUrl: "/injective.exchange.v1beta1.QueryGrantAuthorizationsResponse", value: QueryGrantAuthorizationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryGrantAuthorizationsResponse.typeUrl, QueryGrantAuthorizationsResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/injective/exchange/v1beta1/tx.rpc.func.ts index aefb5bab..679cfedb 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/tx.rpc.func.ts @@ -5,209 +5,244 @@ export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const createWithdraw = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdraw.typeUrl, encoders: toEncoders(MsgWithdraw), - converters: toConverters(MsgWithdraw) + converters: toConverters(MsgWithdraw), + deps: [MsgWithdraw] }); export const createInstantSpotMarketLaunch = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantSpotMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantSpotMarketLaunch), - converters: toConverters(MsgInstantSpotMarketLaunch) + converters: toConverters(MsgInstantSpotMarketLaunch), + deps: [MsgInstantSpotMarketLaunch] }); export const createInstantPerpetualMarketLaunch = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantPerpetualMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantPerpetualMarketLaunch), - converters: toConverters(MsgInstantPerpetualMarketLaunch) + converters: toConverters(MsgInstantPerpetualMarketLaunch), + deps: [MsgInstantPerpetualMarketLaunch] }); export const createInstantExpiryFuturesMarketLaunch = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantExpiryFuturesMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantExpiryFuturesMarketLaunch), - converters: toConverters(MsgInstantExpiryFuturesMarketLaunch) + converters: toConverters(MsgInstantExpiryFuturesMarketLaunch), + deps: [MsgInstantExpiryFuturesMarketLaunch] }); export const createCreateSpotLimitOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateSpotLimitOrder.typeUrl, encoders: toEncoders(MsgCreateSpotLimitOrder), - converters: toConverters(MsgCreateSpotLimitOrder) + converters: toConverters(MsgCreateSpotLimitOrder), + deps: [MsgCreateSpotLimitOrder] }); export const createBatchCreateSpotLimitOrders = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBatchCreateSpotLimitOrders.typeUrl, encoders: toEncoders(MsgBatchCreateSpotLimitOrders), - converters: toConverters(MsgBatchCreateSpotLimitOrders) + converters: toConverters(MsgBatchCreateSpotLimitOrders), + deps: [MsgBatchCreateSpotLimitOrders] }); export const createCreateSpotMarketOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateSpotMarketOrder.typeUrl, encoders: toEncoders(MsgCreateSpotMarketOrder), - converters: toConverters(MsgCreateSpotMarketOrder) + converters: toConverters(MsgCreateSpotMarketOrder), + deps: [MsgCreateSpotMarketOrder] }); export const createCancelSpotOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelSpotOrder.typeUrl, encoders: toEncoders(MsgCancelSpotOrder), - converters: toConverters(MsgCancelSpotOrder) + converters: toConverters(MsgCancelSpotOrder), + deps: [MsgCancelSpotOrder] }); export const createBatchCancelSpotOrders = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBatchCancelSpotOrders.typeUrl, encoders: toEncoders(MsgBatchCancelSpotOrders), - converters: toConverters(MsgBatchCancelSpotOrders) + converters: toConverters(MsgBatchCancelSpotOrders), + deps: [MsgBatchCancelSpotOrders] }); export const createBatchUpdateOrders = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBatchUpdateOrders.typeUrl, encoders: toEncoders(MsgBatchUpdateOrders), - converters: toConverters(MsgBatchUpdateOrders) + converters: toConverters(MsgBatchUpdateOrders), + deps: [MsgBatchUpdateOrders] }); export const createPrivilegedExecuteContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgPrivilegedExecuteContract.typeUrl, encoders: toEncoders(MsgPrivilegedExecuteContract), - converters: toConverters(MsgPrivilegedExecuteContract) + converters: toConverters(MsgPrivilegedExecuteContract), + deps: [MsgPrivilegedExecuteContract] }); export const createCreateDerivativeLimitOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateDerivativeLimitOrder.typeUrl, encoders: toEncoders(MsgCreateDerivativeLimitOrder), - converters: toConverters(MsgCreateDerivativeLimitOrder) + converters: toConverters(MsgCreateDerivativeLimitOrder), + deps: [MsgCreateDerivativeLimitOrder] }); export const createBatchCreateDerivativeLimitOrders = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBatchCreateDerivativeLimitOrders.typeUrl, encoders: toEncoders(MsgBatchCreateDerivativeLimitOrders), - converters: toConverters(MsgBatchCreateDerivativeLimitOrders) + converters: toConverters(MsgBatchCreateDerivativeLimitOrders), + deps: [MsgBatchCreateDerivativeLimitOrders] }); export const createCreateDerivativeMarketOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateDerivativeMarketOrder.typeUrl, encoders: toEncoders(MsgCreateDerivativeMarketOrder), - converters: toConverters(MsgCreateDerivativeMarketOrder) + converters: toConverters(MsgCreateDerivativeMarketOrder), + deps: [MsgCreateDerivativeMarketOrder] }); export const createCancelDerivativeOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelDerivativeOrder.typeUrl, encoders: toEncoders(MsgCancelDerivativeOrder), - converters: toConverters(MsgCancelDerivativeOrder) + converters: toConverters(MsgCancelDerivativeOrder), + deps: [MsgCancelDerivativeOrder] }); export const createBatchCancelDerivativeOrders = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBatchCancelDerivativeOrders.typeUrl, encoders: toEncoders(MsgBatchCancelDerivativeOrders), - converters: toConverters(MsgBatchCancelDerivativeOrders) + converters: toConverters(MsgBatchCancelDerivativeOrders), + deps: [MsgBatchCancelDerivativeOrders] }); export const createInstantBinaryOptionsMarketLaunch = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantBinaryOptionsMarketLaunch.typeUrl, encoders: toEncoders(MsgInstantBinaryOptionsMarketLaunch), - converters: toConverters(MsgInstantBinaryOptionsMarketLaunch) + converters: toConverters(MsgInstantBinaryOptionsMarketLaunch), + deps: [MsgInstantBinaryOptionsMarketLaunch] }); export const createCreateBinaryOptionsLimitOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateBinaryOptionsLimitOrder.typeUrl, encoders: toEncoders(MsgCreateBinaryOptionsLimitOrder), - converters: toConverters(MsgCreateBinaryOptionsLimitOrder) + converters: toConverters(MsgCreateBinaryOptionsLimitOrder), + deps: [MsgCreateBinaryOptionsLimitOrder] }); export const createCreateBinaryOptionsMarketOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateBinaryOptionsMarketOrder.typeUrl, encoders: toEncoders(MsgCreateBinaryOptionsMarketOrder), - converters: toConverters(MsgCreateBinaryOptionsMarketOrder) + converters: toConverters(MsgCreateBinaryOptionsMarketOrder), + deps: [MsgCreateBinaryOptionsMarketOrder] }); export const createCancelBinaryOptionsOrder = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelBinaryOptionsOrder.typeUrl, encoders: toEncoders(MsgCancelBinaryOptionsOrder), - converters: toConverters(MsgCancelBinaryOptionsOrder) + converters: toConverters(MsgCancelBinaryOptionsOrder), + deps: [MsgCancelBinaryOptionsOrder] }); export const createBatchCancelBinaryOptionsOrders = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBatchCancelBinaryOptionsOrders.typeUrl, encoders: toEncoders(MsgBatchCancelBinaryOptionsOrders), - converters: toConverters(MsgBatchCancelBinaryOptionsOrders) + converters: toConverters(MsgBatchCancelBinaryOptionsOrders), + deps: [MsgBatchCancelBinaryOptionsOrders] }); export const createSubaccountTransfer = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubaccountTransfer.typeUrl, encoders: toEncoders(MsgSubaccountTransfer), - converters: toConverters(MsgSubaccountTransfer) + converters: toConverters(MsgSubaccountTransfer), + deps: [MsgSubaccountTransfer] }); export const createExternalTransfer = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExternalTransfer.typeUrl, encoders: toEncoders(MsgExternalTransfer), - converters: toConverters(MsgExternalTransfer) + converters: toConverters(MsgExternalTransfer), + deps: [MsgExternalTransfer] }); export const createLiquidatePosition = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgLiquidatePosition.typeUrl, encoders: toEncoders(MsgLiquidatePosition), - converters: toConverters(MsgLiquidatePosition) + converters: toConverters(MsgLiquidatePosition), + deps: [MsgLiquidatePosition] }); export const createEmergencySettleMarket = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgEmergencySettleMarket.typeUrl, encoders: toEncoders(MsgEmergencySettleMarket), - converters: toConverters(MsgEmergencySettleMarket) + converters: toConverters(MsgEmergencySettleMarket), + deps: [MsgEmergencySettleMarket] }); export const createIncreasePositionMargin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgIncreasePositionMargin.typeUrl, encoders: toEncoders(MsgIncreasePositionMargin), - converters: toConverters(MsgIncreasePositionMargin) + converters: toConverters(MsgIncreasePositionMargin), + deps: [MsgIncreasePositionMargin] }); export const createDecreasePositionMargin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDecreasePositionMargin.typeUrl, encoders: toEncoders(MsgDecreasePositionMargin), - converters: toConverters(MsgDecreasePositionMargin) + converters: toConverters(MsgDecreasePositionMargin), + deps: [MsgDecreasePositionMargin] }); export const createRewardsOptOut = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRewardsOptOut.typeUrl, encoders: toEncoders(MsgRewardsOptOut), - converters: toConverters(MsgRewardsOptOut) + converters: toConverters(MsgRewardsOptOut), + deps: [MsgRewardsOptOut] }); export const createAdminUpdateBinaryOptionsMarket = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgAdminUpdateBinaryOptionsMarket.typeUrl, encoders: toEncoders(MsgAdminUpdateBinaryOptionsMarket), - converters: toConverters(MsgAdminUpdateBinaryOptionsMarket) + converters: toConverters(MsgAdminUpdateBinaryOptionsMarket), + deps: [MsgAdminUpdateBinaryOptionsMarket] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createUpdateSpotMarket = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateSpotMarket.typeUrl, encoders: toEncoders(MsgUpdateSpotMarket), - converters: toConverters(MsgUpdateSpotMarket) + converters: toConverters(MsgUpdateSpotMarket), + deps: [MsgUpdateSpotMarket] }); export const createUpdateDerivativeMarket = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateDerivativeMarket.typeUrl, encoders: toEncoders(MsgUpdateDerivativeMarket), - converters: toConverters(MsgUpdateDerivativeMarket) + converters: toConverters(MsgUpdateDerivativeMarket), + deps: [MsgUpdateDerivativeMarket] }); export const createAuthorizeStakeGrants = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgAuthorizeStakeGrants.typeUrl, encoders: toEncoders(MsgAuthorizeStakeGrants), - converters: toConverters(MsgAuthorizeStakeGrants) + converters: toConverters(MsgAuthorizeStakeGrants), + deps: [MsgAuthorizeStakeGrants] }); export const createActivateStakeGrant = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgActivateStakeGrant.typeUrl, encoders: toEncoders(MsgActivateStakeGrant), - converters: toConverters(MsgActivateStakeGrant) + converters: toConverters(MsgActivateStakeGrant), + deps: [MsgActivateStakeGrant] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/exchange/v1beta1/tx.ts b/libs/injectivejs/src/injective/exchange/v1beta1/tx.ts index 5508578a..208197e1 100644 --- a/libs/injectivejs/src/injective/exchange/v1beta1/tx.ts +++ b/libs/injectivejs/src/injective/exchange/v1beta1/tx.ts @@ -4,7 +4,6 @@ import { SpotOrder, SpotOrderAmino, DerivativeOrder, DerivativeOrderAmino, Marke import { Params, ParamsAmino } from "../../../cosmos/distribution/v1beta1/distribution"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface MsgUpdateSpotMarket { /** current admin address of the associated market */ admin: string; @@ -2125,10 +2124,9 @@ export const MsgUpdateSpotMarket = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateSpotMarket", value: MsgUpdateSpotMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateSpotMarket.typeUrl, MsgUpdateSpotMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateSpotMarket.aminoType, MsgUpdateSpotMarket.typeUrl); function createBaseMsgUpdateSpotMarketResponse(): MsgUpdateSpotMarketResponse { return {}; } @@ -2183,9 +2181,9 @@ export const MsgUpdateSpotMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateSpotMarketResponse", value: MsgUpdateSpotMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateSpotMarketResponse.typeUrl, MsgUpdateSpotMarketResponse); function createBaseMsgUpdateDerivativeMarket(): MsgUpdateDerivativeMarket { return { admin: "", @@ -2344,10 +2342,9 @@ export const MsgUpdateDerivativeMarket = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateDerivativeMarket", value: MsgUpdateDerivativeMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateDerivativeMarket.typeUrl, MsgUpdateDerivativeMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateDerivativeMarket.aminoType, MsgUpdateDerivativeMarket.typeUrl); function createBaseMsgUpdateDerivativeMarketResponse(): MsgUpdateDerivativeMarketResponse { return {}; } @@ -2402,9 +2399,9 @@ export const MsgUpdateDerivativeMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateDerivativeMarketResponse", value: MsgUpdateDerivativeMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateDerivativeMarketResponse.typeUrl, MsgUpdateDerivativeMarketResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2491,10 +2488,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2549,9 +2547,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.exchange.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgDeposit(): MsgDeposit { return { sender: "", @@ -2650,10 +2648,11 @@ export const MsgDeposit = { typeUrl: "/injective.exchange.v1beta1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -2708,9 +2707,9 @@ export const MsgDepositResponse = { typeUrl: "/injective.exchange.v1beta1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); function createBaseMsgWithdraw(): MsgWithdraw { return { sender: "", @@ -2809,10 +2808,11 @@ export const MsgWithdraw = { typeUrl: "/injective.exchange.v1beta1.MsgWithdraw", value: MsgWithdraw.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdraw.typeUrl, MsgWithdraw); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdraw.aminoType, MsgWithdraw.typeUrl); function createBaseMsgWithdrawResponse(): MsgWithdrawResponse { return {}; } @@ -2867,9 +2867,9 @@ export const MsgWithdrawResponse = { typeUrl: "/injective.exchange.v1beta1.MsgWithdrawResponse", value: MsgWithdrawResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawResponse.typeUrl, MsgWithdrawResponse); function createBaseMsgCreateSpotLimitOrder(): MsgCreateSpotLimitOrder { return { sender: "", @@ -2956,10 +2956,11 @@ export const MsgCreateSpotLimitOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder", value: MsgCreateSpotLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateSpotLimitOrder.typeUrl, MsgCreateSpotLimitOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateSpotLimitOrder.aminoType, MsgCreateSpotLimitOrder.typeUrl); function createBaseMsgCreateSpotLimitOrderResponse(): MsgCreateSpotLimitOrderResponse { return { orderHash: "", @@ -3039,9 +3040,9 @@ export const MsgCreateSpotLimitOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotLimitOrderResponse", value: MsgCreateSpotLimitOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateSpotLimitOrderResponse.typeUrl, MsgCreateSpotLimitOrderResponse); function createBaseMsgBatchCreateSpotLimitOrders(): MsgBatchCreateSpotLimitOrders { return { sender: "", @@ -3130,10 +3131,11 @@ export const MsgBatchCreateSpotLimitOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrders", value: MsgBatchCreateSpotLimitOrders.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCreateSpotLimitOrders.typeUrl, MsgBatchCreateSpotLimitOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCreateSpotLimitOrders.aminoType, MsgBatchCreateSpotLimitOrders.typeUrl); function createBaseMsgBatchCreateSpotLimitOrdersResponse(): MsgBatchCreateSpotLimitOrdersResponse { return { orderHashes: [], @@ -3231,9 +3233,9 @@ export const MsgBatchCreateSpotLimitOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrdersResponse", value: MsgBatchCreateSpotLimitOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCreateSpotLimitOrdersResponse.typeUrl, MsgBatchCreateSpotLimitOrdersResponse); function createBaseMsgInstantSpotMarketLaunch(): MsgInstantSpotMarketLaunch { return { sender: "", @@ -3380,10 +3382,9 @@ export const MsgInstantSpotMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch", value: MsgInstantSpotMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantSpotMarketLaunch.typeUrl, MsgInstantSpotMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantSpotMarketLaunch.aminoType, MsgInstantSpotMarketLaunch.typeUrl); function createBaseMsgInstantSpotMarketLaunchResponse(): MsgInstantSpotMarketLaunchResponse { return {}; } @@ -3438,9 +3439,9 @@ export const MsgInstantSpotMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunchResponse", value: MsgInstantSpotMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantSpotMarketLaunchResponse.typeUrl, MsgInstantSpotMarketLaunchResponse); function createBaseMsgInstantPerpetualMarketLaunch(): MsgInstantPerpetualMarketLaunch { return { sender: "", @@ -3671,10 +3672,9 @@ export const MsgInstantPerpetualMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantPerpetualMarketLaunch", value: MsgInstantPerpetualMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantPerpetualMarketLaunch.typeUrl, MsgInstantPerpetualMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantPerpetualMarketLaunch.aminoType, MsgInstantPerpetualMarketLaunch.typeUrl); function createBaseMsgInstantPerpetualMarketLaunchResponse(): MsgInstantPerpetualMarketLaunchResponse { return {}; } @@ -3729,9 +3729,9 @@ export const MsgInstantPerpetualMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantPerpetualMarketLaunchResponse", value: MsgInstantPerpetualMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantPerpetualMarketLaunchResponse.typeUrl, MsgInstantPerpetualMarketLaunchResponse); function createBaseMsgInstantBinaryOptionsMarketLaunch(): MsgInstantBinaryOptionsMarketLaunch { return { sender: "", @@ -3974,10 +3974,9 @@ export const MsgInstantBinaryOptionsMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch", value: MsgInstantBinaryOptionsMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantBinaryOptionsMarketLaunch.typeUrl, MsgInstantBinaryOptionsMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantBinaryOptionsMarketLaunch.aminoType, MsgInstantBinaryOptionsMarketLaunch.typeUrl); function createBaseMsgInstantBinaryOptionsMarketLaunchResponse(): MsgInstantBinaryOptionsMarketLaunchResponse { return {}; } @@ -4032,9 +4031,9 @@ export const MsgInstantBinaryOptionsMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunchResponse", value: MsgInstantBinaryOptionsMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantBinaryOptionsMarketLaunchResponse.typeUrl, MsgInstantBinaryOptionsMarketLaunchResponse); function createBaseMsgInstantExpiryFuturesMarketLaunch(): MsgInstantExpiryFuturesMarketLaunch { return { sender: "", @@ -4277,10 +4276,9 @@ export const MsgInstantExpiryFuturesMarketLaunch = { typeUrl: "/injective.exchange.v1beta1.MsgInstantExpiryFuturesMarketLaunch", value: MsgInstantExpiryFuturesMarketLaunch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantExpiryFuturesMarketLaunch.typeUrl, MsgInstantExpiryFuturesMarketLaunch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantExpiryFuturesMarketLaunch.aminoType, MsgInstantExpiryFuturesMarketLaunch.typeUrl); function createBaseMsgInstantExpiryFuturesMarketLaunchResponse(): MsgInstantExpiryFuturesMarketLaunchResponse { return {}; } @@ -4335,9 +4333,9 @@ export const MsgInstantExpiryFuturesMarketLaunchResponse = { typeUrl: "/injective.exchange.v1beta1.MsgInstantExpiryFuturesMarketLaunchResponse", value: MsgInstantExpiryFuturesMarketLaunchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantExpiryFuturesMarketLaunchResponse.typeUrl, MsgInstantExpiryFuturesMarketLaunchResponse); function createBaseMsgCreateSpotMarketOrder(): MsgCreateSpotMarketOrder { return { sender: "", @@ -4424,10 +4422,11 @@ export const MsgCreateSpotMarketOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder", value: MsgCreateSpotMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateSpotMarketOrder.typeUrl, MsgCreateSpotMarketOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateSpotMarketOrder.aminoType, MsgCreateSpotMarketOrder.typeUrl); function createBaseMsgCreateSpotMarketOrderResponse(): MsgCreateSpotMarketOrderResponse { return { orderHash: "", @@ -4519,9 +4518,11 @@ export const MsgCreateSpotMarketOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateSpotMarketOrderResponse", value: MsgCreateSpotMarketOrderResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SpotMarketOrderResults.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateSpotMarketOrderResponse.typeUrl, MsgCreateSpotMarketOrderResponse); function createBaseSpotMarketOrderResults(): SpotMarketOrderResults { return { quantity: "", @@ -4613,9 +4614,9 @@ export const SpotMarketOrderResults = { typeUrl: "/injective.exchange.v1beta1.SpotMarketOrderResults", value: SpotMarketOrderResults.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SpotMarketOrderResults.typeUrl, SpotMarketOrderResults); function createBaseMsgCreateDerivativeLimitOrder(): MsgCreateDerivativeLimitOrder { return { sender: "", @@ -4702,10 +4703,11 @@ export const MsgCreateDerivativeLimitOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder", value: MsgCreateDerivativeLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateDerivativeLimitOrder.typeUrl, MsgCreateDerivativeLimitOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateDerivativeLimitOrder.aminoType, MsgCreateDerivativeLimitOrder.typeUrl); function createBaseMsgCreateDerivativeLimitOrderResponse(): MsgCreateDerivativeLimitOrderResponse { return { orderHash: "", @@ -4785,9 +4787,9 @@ export const MsgCreateDerivativeLimitOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrderResponse", value: MsgCreateDerivativeLimitOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateDerivativeLimitOrderResponse.typeUrl, MsgCreateDerivativeLimitOrderResponse); function createBaseMsgCreateBinaryOptionsLimitOrder(): MsgCreateBinaryOptionsLimitOrder { return { sender: "", @@ -4874,10 +4876,11 @@ export const MsgCreateBinaryOptionsLimitOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder", value: MsgCreateBinaryOptionsLimitOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsLimitOrder.typeUrl, MsgCreateBinaryOptionsLimitOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateBinaryOptionsLimitOrder.aminoType, MsgCreateBinaryOptionsLimitOrder.typeUrl); function createBaseMsgCreateBinaryOptionsLimitOrderResponse(): MsgCreateBinaryOptionsLimitOrderResponse { return { orderHash: "", @@ -4957,9 +4960,9 @@ export const MsgCreateBinaryOptionsLimitOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrderResponse", value: MsgCreateBinaryOptionsLimitOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsLimitOrderResponse.typeUrl, MsgCreateBinaryOptionsLimitOrderResponse); function createBaseMsgBatchCreateDerivativeLimitOrders(): MsgBatchCreateDerivativeLimitOrders { return { sender: "", @@ -5048,10 +5051,11 @@ export const MsgBatchCreateDerivativeLimitOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrders", value: MsgBatchCreateDerivativeLimitOrders.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCreateDerivativeLimitOrders.typeUrl, MsgBatchCreateDerivativeLimitOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCreateDerivativeLimitOrders.aminoType, MsgBatchCreateDerivativeLimitOrders.typeUrl); function createBaseMsgBatchCreateDerivativeLimitOrdersResponse(): MsgBatchCreateDerivativeLimitOrdersResponse { return { orderHashes: [], @@ -5149,9 +5153,9 @@ export const MsgBatchCreateDerivativeLimitOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrdersResponse", value: MsgBatchCreateDerivativeLimitOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCreateDerivativeLimitOrdersResponse.typeUrl, MsgBatchCreateDerivativeLimitOrdersResponse); function createBaseMsgCancelSpotOrder(): MsgCancelSpotOrder { return { sender: "", @@ -5274,10 +5278,9 @@ export const MsgCancelSpotOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCancelSpotOrder", value: MsgCancelSpotOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSpotOrder.typeUrl, MsgCancelSpotOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelSpotOrder.aminoType, MsgCancelSpotOrder.typeUrl); function createBaseMsgCancelSpotOrderResponse(): MsgCancelSpotOrderResponse { return {}; } @@ -5332,9 +5335,9 @@ export const MsgCancelSpotOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCancelSpotOrderResponse", value: MsgCancelSpotOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSpotOrderResponse.typeUrl, MsgCancelSpotOrderResponse); function createBaseMsgBatchCancelSpotOrders(): MsgBatchCancelSpotOrders { return { sender: "", @@ -5423,10 +5426,11 @@ export const MsgBatchCancelSpotOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders", value: MsgBatchCancelSpotOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCancelSpotOrders.typeUrl, MsgBatchCancelSpotOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCancelSpotOrders.aminoType, MsgBatchCancelSpotOrders.typeUrl); function createBaseMsgBatchCancelSpotOrdersResponse(): MsgBatchCancelSpotOrdersResponse { return { success: [] @@ -5505,9 +5509,9 @@ export const MsgBatchCancelSpotOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelSpotOrdersResponse", value: MsgBatchCancelSpotOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCancelSpotOrdersResponse.typeUrl, MsgBatchCancelSpotOrdersResponse); function createBaseMsgBatchCancelBinaryOptionsOrders(): MsgBatchCancelBinaryOptionsOrders { return { sender: "", @@ -5596,10 +5600,11 @@ export const MsgBatchCancelBinaryOptionsOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders", value: MsgBatchCancelBinaryOptionsOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCancelBinaryOptionsOrders.typeUrl, MsgBatchCancelBinaryOptionsOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCancelBinaryOptionsOrders.aminoType, MsgBatchCancelBinaryOptionsOrders.typeUrl); function createBaseMsgBatchCancelBinaryOptionsOrdersResponse(): MsgBatchCancelBinaryOptionsOrdersResponse { return { success: [] @@ -5678,9 +5683,9 @@ export const MsgBatchCancelBinaryOptionsOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrdersResponse", value: MsgBatchCancelBinaryOptionsOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCancelBinaryOptionsOrdersResponse.typeUrl, MsgBatchCancelBinaryOptionsOrdersResponse); function createBaseMsgBatchUpdateOrders(): MsgBatchUpdateOrders { return { sender: "", @@ -5893,10 +5898,13 @@ export const MsgBatchUpdateOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchUpdateOrders", value: MsgBatchUpdateOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); + SpotOrder.registerTypeUrl(); + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchUpdateOrders.typeUrl, MsgBatchUpdateOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchUpdateOrders.aminoType, MsgBatchUpdateOrders.typeUrl); function createBaseMsgBatchUpdateOrdersResponse(): MsgBatchUpdateOrdersResponse { return { spotCancelSuccess: [], @@ -6147,9 +6155,9 @@ export const MsgBatchUpdateOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchUpdateOrdersResponse", value: MsgBatchUpdateOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchUpdateOrdersResponse.typeUrl, MsgBatchUpdateOrdersResponse); function createBaseMsgCreateDerivativeMarketOrder(): MsgCreateDerivativeMarketOrder { return { sender: "", @@ -6236,10 +6244,11 @@ export const MsgCreateDerivativeMarketOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder", value: MsgCreateDerivativeMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateDerivativeMarketOrder.typeUrl, MsgCreateDerivativeMarketOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateDerivativeMarketOrder.aminoType, MsgCreateDerivativeMarketOrder.typeUrl); function createBaseMsgCreateDerivativeMarketOrderResponse(): MsgCreateDerivativeMarketOrderResponse { return { orderHash: "", @@ -6331,9 +6340,11 @@ export const MsgCreateDerivativeMarketOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrderResponse", value: MsgCreateDerivativeMarketOrderResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarketOrderResults.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateDerivativeMarketOrderResponse.typeUrl, MsgCreateDerivativeMarketOrderResponse); function createBaseDerivativeMarketOrderResults(): DerivativeMarketOrderResults { return { quantity: "", @@ -6449,9 +6460,11 @@ export const DerivativeMarketOrderResults = { typeUrl: "/injective.exchange.v1beta1.DerivativeMarketOrderResults", value: DerivativeMarketOrderResults.encode(message).finish() }; + }, + registerTypeUrl() { + PositionDelta.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeMarketOrderResults.typeUrl, DerivativeMarketOrderResults); function createBaseMsgCreateBinaryOptionsMarketOrder(): MsgCreateBinaryOptionsMarketOrder { return { sender: "", @@ -6538,10 +6551,11 @@ export const MsgCreateBinaryOptionsMarketOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder", value: MsgCreateBinaryOptionsMarketOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsMarketOrder.typeUrl, MsgCreateBinaryOptionsMarketOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateBinaryOptionsMarketOrder.aminoType, MsgCreateBinaryOptionsMarketOrder.typeUrl); function createBaseMsgCreateBinaryOptionsMarketOrderResponse(): MsgCreateBinaryOptionsMarketOrderResponse { return { orderHash: "", @@ -6633,9 +6647,11 @@ export const MsgCreateBinaryOptionsMarketOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrderResponse", value: MsgCreateBinaryOptionsMarketOrderResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeMarketOrderResults.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateBinaryOptionsMarketOrderResponse.typeUrl, MsgCreateBinaryOptionsMarketOrderResponse); function createBaseMsgCancelDerivativeOrder(): MsgCancelDerivativeOrder { return { sender: "", @@ -6770,10 +6786,9 @@ export const MsgCancelDerivativeOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCancelDerivativeOrder", value: MsgCancelDerivativeOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelDerivativeOrder.typeUrl, MsgCancelDerivativeOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelDerivativeOrder.aminoType, MsgCancelDerivativeOrder.typeUrl); function createBaseMsgCancelDerivativeOrderResponse(): MsgCancelDerivativeOrderResponse { return {}; } @@ -6828,9 +6843,9 @@ export const MsgCancelDerivativeOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCancelDerivativeOrderResponse", value: MsgCancelDerivativeOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelDerivativeOrderResponse.typeUrl, MsgCancelDerivativeOrderResponse); function createBaseMsgCancelBinaryOptionsOrder(): MsgCancelBinaryOptionsOrder { return { sender: "", @@ -6965,10 +6980,9 @@ export const MsgCancelBinaryOptionsOrder = { typeUrl: "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder", value: MsgCancelBinaryOptionsOrder.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelBinaryOptionsOrder.typeUrl, MsgCancelBinaryOptionsOrder); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelBinaryOptionsOrder.aminoType, MsgCancelBinaryOptionsOrder.typeUrl); function createBaseMsgCancelBinaryOptionsOrderResponse(): MsgCancelBinaryOptionsOrderResponse { return {}; } @@ -7023,9 +7037,9 @@ export const MsgCancelBinaryOptionsOrderResponse = { typeUrl: "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrderResponse", value: MsgCancelBinaryOptionsOrderResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelBinaryOptionsOrderResponse.typeUrl, MsgCancelBinaryOptionsOrderResponse); function createBaseOrderData(): OrderData { return { marketId: "", @@ -7141,9 +7155,9 @@ export const OrderData = { typeUrl: "/injective.exchange.v1beta1.OrderData", value: OrderData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderData.typeUrl, OrderData); function createBaseMsgBatchCancelDerivativeOrders(): MsgBatchCancelDerivativeOrders { return { sender: "", @@ -7232,10 +7246,11 @@ export const MsgBatchCancelDerivativeOrders = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders", value: MsgBatchCancelDerivativeOrders.encode(message).finish() }; + }, + registerTypeUrl() { + OrderData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBatchCancelDerivativeOrders.typeUrl, MsgBatchCancelDerivativeOrders); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBatchCancelDerivativeOrders.aminoType, MsgBatchCancelDerivativeOrders.typeUrl); function createBaseMsgBatchCancelDerivativeOrdersResponse(): MsgBatchCancelDerivativeOrdersResponse { return { success: [] @@ -7314,9 +7329,9 @@ export const MsgBatchCancelDerivativeOrdersResponse = { typeUrl: "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrdersResponse", value: MsgBatchCancelDerivativeOrdersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBatchCancelDerivativeOrdersResponse.typeUrl, MsgBatchCancelDerivativeOrdersResponse); function createBaseMsgSubaccountTransfer(): MsgSubaccountTransfer { return { sender: "", @@ -7427,10 +7442,11 @@ export const MsgSubaccountTransfer = { typeUrl: "/injective.exchange.v1beta1.MsgSubaccountTransfer", value: MsgSubaccountTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubaccountTransfer.typeUrl, MsgSubaccountTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubaccountTransfer.aminoType, MsgSubaccountTransfer.typeUrl); function createBaseMsgSubaccountTransferResponse(): MsgSubaccountTransferResponse { return {}; } @@ -7485,9 +7501,9 @@ export const MsgSubaccountTransferResponse = { typeUrl: "/injective.exchange.v1beta1.MsgSubaccountTransferResponse", value: MsgSubaccountTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubaccountTransferResponse.typeUrl, MsgSubaccountTransferResponse); function createBaseMsgExternalTransfer(): MsgExternalTransfer { return { sender: "", @@ -7598,10 +7614,11 @@ export const MsgExternalTransfer = { typeUrl: "/injective.exchange.v1beta1.MsgExternalTransfer", value: MsgExternalTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExternalTransfer.typeUrl, MsgExternalTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExternalTransfer.aminoType, MsgExternalTransfer.typeUrl); function createBaseMsgExternalTransferResponse(): MsgExternalTransferResponse { return {}; } @@ -7656,9 +7673,9 @@ export const MsgExternalTransferResponse = { typeUrl: "/injective.exchange.v1beta1.MsgExternalTransferResponse", value: MsgExternalTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExternalTransferResponse.typeUrl, MsgExternalTransferResponse); function createBaseMsgLiquidatePosition(): MsgLiquidatePosition { return { sender: "", @@ -7769,10 +7786,11 @@ export const MsgLiquidatePosition = { typeUrl: "/injective.exchange.v1beta1.MsgLiquidatePosition", value: MsgLiquidatePosition.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgLiquidatePosition.typeUrl, MsgLiquidatePosition); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLiquidatePosition.aminoType, MsgLiquidatePosition.typeUrl); function createBaseMsgLiquidatePositionResponse(): MsgLiquidatePositionResponse { return {}; } @@ -7827,9 +7845,9 @@ export const MsgLiquidatePositionResponse = { typeUrl: "/injective.exchange.v1beta1.MsgLiquidatePositionResponse", value: MsgLiquidatePositionResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgLiquidatePositionResponse.typeUrl, MsgLiquidatePositionResponse); function createBaseMsgEmergencySettleMarket(): MsgEmergencySettleMarket { return { sender: "", @@ -7928,10 +7946,9 @@ export const MsgEmergencySettleMarket = { typeUrl: "/injective.exchange.v1beta1.MsgEmergencySettleMarket", value: MsgEmergencySettleMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEmergencySettleMarket.typeUrl, MsgEmergencySettleMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEmergencySettleMarket.aminoType, MsgEmergencySettleMarket.typeUrl); function createBaseMsgEmergencySettleMarketResponse(): MsgEmergencySettleMarketResponse { return {}; } @@ -7986,9 +8003,9 @@ export const MsgEmergencySettleMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgEmergencySettleMarketResponse", value: MsgEmergencySettleMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEmergencySettleMarketResponse.typeUrl, MsgEmergencySettleMarketResponse); function createBaseMsgIncreasePositionMargin(): MsgIncreasePositionMargin { return { sender: "", @@ -8111,10 +8128,9 @@ export const MsgIncreasePositionMargin = { typeUrl: "/injective.exchange.v1beta1.MsgIncreasePositionMargin", value: MsgIncreasePositionMargin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIncreasePositionMargin.typeUrl, MsgIncreasePositionMargin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIncreasePositionMargin.aminoType, MsgIncreasePositionMargin.typeUrl); function createBaseMsgIncreasePositionMarginResponse(): MsgIncreasePositionMarginResponse { return {}; } @@ -8169,9 +8185,9 @@ export const MsgIncreasePositionMarginResponse = { typeUrl: "/injective.exchange.v1beta1.MsgIncreasePositionMarginResponse", value: MsgIncreasePositionMarginResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIncreasePositionMarginResponse.typeUrl, MsgIncreasePositionMarginResponse); function createBaseMsgDecreasePositionMargin(): MsgDecreasePositionMargin { return { sender: "", @@ -8294,10 +8310,9 @@ export const MsgDecreasePositionMargin = { typeUrl: "/injective.exchange.v1beta1.MsgDecreasePositionMargin", value: MsgDecreasePositionMargin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDecreasePositionMargin.typeUrl, MsgDecreasePositionMargin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDecreasePositionMargin.aminoType, MsgDecreasePositionMargin.typeUrl); function createBaseMsgDecreasePositionMarginResponse(): MsgDecreasePositionMarginResponse { return {}; } @@ -8352,9 +8367,9 @@ export const MsgDecreasePositionMarginResponse = { typeUrl: "/injective.exchange.v1beta1.MsgDecreasePositionMarginResponse", value: MsgDecreasePositionMarginResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDecreasePositionMarginResponse.typeUrl, MsgDecreasePositionMarginResponse); function createBaseMsgPrivilegedExecuteContract(): MsgPrivilegedExecuteContract { return { sender: "", @@ -8465,10 +8480,9 @@ export const MsgPrivilegedExecuteContract = { typeUrl: "/injective.exchange.v1beta1.MsgPrivilegedExecuteContract", value: MsgPrivilegedExecuteContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPrivilegedExecuteContract.typeUrl, MsgPrivilegedExecuteContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPrivilegedExecuteContract.aminoType, MsgPrivilegedExecuteContract.typeUrl); function createBaseMsgPrivilegedExecuteContractResponse(): MsgPrivilegedExecuteContractResponse { return { fundsDiff: [] @@ -8538,9 +8552,11 @@ export const MsgPrivilegedExecuteContractResponse = { typeUrl: "/injective.exchange.v1beta1.MsgPrivilegedExecuteContractResponse", value: MsgPrivilegedExecuteContractResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgPrivilegedExecuteContractResponse.typeUrl, MsgPrivilegedExecuteContractResponse); function createBaseMsgRewardsOptOut(): MsgRewardsOptOut { return { sender: "" @@ -8615,10 +8631,9 @@ export const MsgRewardsOptOut = { typeUrl: "/injective.exchange.v1beta1.MsgRewardsOptOut", value: MsgRewardsOptOut.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRewardsOptOut.typeUrl, MsgRewardsOptOut); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRewardsOptOut.aminoType, MsgRewardsOptOut.typeUrl); function createBaseMsgRewardsOptOutResponse(): MsgRewardsOptOutResponse { return {}; } @@ -8673,9 +8688,9 @@ export const MsgRewardsOptOutResponse = { typeUrl: "/injective.exchange.v1beta1.MsgRewardsOptOutResponse", value: MsgRewardsOptOutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRewardsOptOutResponse.typeUrl, MsgRewardsOptOutResponse); function createBaseMsgReclaimLockedFunds(): MsgReclaimLockedFunds { return { sender: "", @@ -8774,10 +8789,9 @@ export const MsgReclaimLockedFunds = { typeUrl: "/injective.exchange.v1beta1.MsgReclaimLockedFunds", value: MsgReclaimLockedFunds.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgReclaimLockedFunds.typeUrl, MsgReclaimLockedFunds); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgReclaimLockedFunds.aminoType, MsgReclaimLockedFunds.typeUrl); function createBaseMsgReclaimLockedFundsResponse(): MsgReclaimLockedFundsResponse { return {}; } @@ -8832,9 +8846,9 @@ export const MsgReclaimLockedFundsResponse = { typeUrl: "/injective.exchange.v1beta1.MsgReclaimLockedFundsResponse", value: MsgReclaimLockedFundsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgReclaimLockedFundsResponse.typeUrl, MsgReclaimLockedFundsResponse); function createBaseMsgSignData(): MsgSignData { return { signer: new Uint8Array(), @@ -8914,9 +8928,9 @@ export const MsgSignData = { typeUrl: "/injective.exchange.v1beta1.MsgSignData", value: MsgSignData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSignData.typeUrl, MsgSignData); function createBaseMsgSignDoc(): MsgSignDoc { return { signType: "", @@ -8996,9 +9010,11 @@ export const MsgSignDoc = { typeUrl: "/injective.exchange.v1beta1.MsgSignDoc", value: MsgSignDoc.encode(message).finish() }; + }, + registerTypeUrl() { + MsgSignData.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSignDoc.typeUrl, MsgSignDoc); function createBaseMsgAdminUpdateBinaryOptionsMarket(): MsgAdminUpdateBinaryOptionsMarket { return { sender: "", @@ -9133,10 +9149,9 @@ export const MsgAdminUpdateBinaryOptionsMarket = { typeUrl: "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket", value: MsgAdminUpdateBinaryOptionsMarket.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAdminUpdateBinaryOptionsMarket.typeUrl, MsgAdminUpdateBinaryOptionsMarket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAdminUpdateBinaryOptionsMarket.aminoType, MsgAdminUpdateBinaryOptionsMarket.typeUrl); function createBaseMsgAdminUpdateBinaryOptionsMarketResponse(): MsgAdminUpdateBinaryOptionsMarketResponse { return {}; } @@ -9191,9 +9206,9 @@ export const MsgAdminUpdateBinaryOptionsMarketResponse = { typeUrl: "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarketResponse", value: MsgAdminUpdateBinaryOptionsMarketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAdminUpdateBinaryOptionsMarketResponse.typeUrl, MsgAdminUpdateBinaryOptionsMarketResponse); function createBaseMsgAuthorizeStakeGrants(): MsgAuthorizeStakeGrants { return { sender: "", @@ -9282,10 +9297,11 @@ export const MsgAuthorizeStakeGrants = { typeUrl: "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants", value: MsgAuthorizeStakeGrants.encode(message).finish() }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgAuthorizeStakeGrants.typeUrl, MsgAuthorizeStakeGrants); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAuthorizeStakeGrants.aminoType, MsgAuthorizeStakeGrants.typeUrl); function createBaseMsgAuthorizeStakeGrantsResponse(): MsgAuthorizeStakeGrantsResponse { return {}; } @@ -9340,9 +9356,9 @@ export const MsgAuthorizeStakeGrantsResponse = { typeUrl: "/injective.exchange.v1beta1.MsgAuthorizeStakeGrantsResponse", value: MsgAuthorizeStakeGrantsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAuthorizeStakeGrantsResponse.typeUrl, MsgAuthorizeStakeGrantsResponse); function createBaseMsgActivateStakeGrant(): MsgActivateStakeGrant { return { sender: "", @@ -9429,10 +9445,9 @@ export const MsgActivateStakeGrant = { typeUrl: "/injective.exchange.v1beta1.MsgActivateStakeGrant", value: MsgActivateStakeGrant.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgActivateStakeGrant.typeUrl, MsgActivateStakeGrant); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgActivateStakeGrant.aminoType, MsgActivateStakeGrant.typeUrl); function createBaseMsgActivateStakeGrantResponse(): MsgActivateStakeGrantResponse { return {}; } @@ -9487,6 +9502,6 @@ export const MsgActivateStakeGrantResponse = { typeUrl: "/injective.exchange.v1beta1.MsgActivateStakeGrantResponse", value: MsgActivateStakeGrantResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgActivateStakeGrantResponse.typeUrl, MsgActivateStakeGrantResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/insurance/v1beta1/events.ts b/libs/injectivejs/src/injective/insurance/v1beta1/events.ts index b4bca225..c605ca91 100644 --- a/libs/injectivejs/src/injective/insurance/v1beta1/events.ts +++ b/libs/injectivejs/src/injective/insurance/v1beta1/events.ts @@ -2,7 +2,6 @@ import { InsuranceFund, InsuranceFundAmino, RedemptionSchedule, RedemptionSchedu import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventInsuranceFundUpdate { fund?: InsuranceFund; } @@ -164,9 +163,11 @@ export const EventInsuranceFundUpdate = { typeUrl: "/injective.insurance.v1beta1.EventInsuranceFundUpdate", value: EventInsuranceFundUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + InsuranceFund.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventInsuranceFundUpdate.typeUrl, EventInsuranceFundUpdate); function createBaseEventRequestRedemption(): EventRequestRedemption { return { schedule: undefined @@ -234,9 +235,11 @@ export const EventRequestRedemption = { typeUrl: "/injective.insurance.v1beta1.EventRequestRedemption", value: EventRequestRedemption.encode(message).finish() }; + }, + registerTypeUrl() { + RedemptionSchedule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventRequestRedemption.typeUrl, EventRequestRedemption); function createBaseEventWithdrawRedemption(): EventWithdrawRedemption { return { schedule: undefined, @@ -316,9 +319,12 @@ export const EventWithdrawRedemption = { typeUrl: "/injective.insurance.v1beta1.EventWithdrawRedemption", value: EventWithdrawRedemption.encode(message).finish() }; + }, + registerTypeUrl() { + RedemptionSchedule.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventWithdrawRedemption.typeUrl, EventWithdrawRedemption); function createBaseEventUnderwrite(): EventUnderwrite { return { underwriter: "", @@ -422,9 +428,11 @@ export const EventUnderwrite = { typeUrl: "/injective.insurance.v1beta1.EventUnderwrite", value: EventUnderwrite.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventUnderwrite.typeUrl, EventUnderwrite); function createBaseEventInsuranceWithdraw(): EventInsuranceWithdraw { return { marketId: "", @@ -516,6 +524,8 @@ export const EventInsuranceWithdraw = { typeUrl: "/injective.insurance.v1beta1.EventInsuranceWithdraw", value: EventInsuranceWithdraw.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventInsuranceWithdraw.typeUrl, EventInsuranceWithdraw); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/insurance/v1beta1/genesis.ts b/libs/injectivejs/src/injective/insurance/v1beta1/genesis.ts index ee8fb73c..e2356ea9 100644 --- a/libs/injectivejs/src/injective/insurance/v1beta1/genesis.ts +++ b/libs/injectivejs/src/injective/insurance/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, InsuranceFund, InsuranceFundAmino, RedemptionSchedule, RedemptionScheduleAmino } from "./insurance"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the insurance module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to insurance. */ @@ -173,6 +172,10 @@ export const GenesisState = { typeUrl: "/injective.insurance.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + InsuranceFund.registerTypeUrl(); + RedemptionSchedule.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/insurance/v1beta1/insurance.ts b/libs/injectivejs/src/injective/insurance/v1beta1/insurance.ts index ac3a0186..7f8b0d53 100644 --- a/libs/injectivejs/src/injective/insurance/v1beta1/insurance.ts +++ b/libs/injectivejs/src/injective/insurance/v1beta1/insurance.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, toTimestamp, fromTimestamp } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { /** * default_redemption_notice_period_duration defines the default minimum @@ -217,10 +216,9 @@ export const Params = { typeUrl: "/injective.insurance.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseInsuranceFund(): InsuranceFund { return { depositDenom: "", @@ -408,9 +406,9 @@ export const InsuranceFund = { typeUrl: "/injective.insurance.v1beta1.InsuranceFund", value: InsuranceFund.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InsuranceFund.typeUrl, InsuranceFund); function createBaseRedemptionSchedule(): RedemptionSchedule { return { id: BigInt(0), @@ -526,6 +524,8 @@ export const RedemptionSchedule = { typeUrl: "/injective.insurance.v1beta1.RedemptionSchedule", value: RedemptionSchedule.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(RedemptionSchedule.typeUrl, RedemptionSchedule); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/insurance/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/injective/insurance/v1beta1/query.rpc.func.ts index b7b9ee1d..73e9563a 100644 --- a/libs/injectivejs/src/injective/insurance/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/insurance/v1beta1/query.rpc.func.ts @@ -5,40 +5,46 @@ export const createGetInsuranceParams = (clientResolver?: RpcResolver) => buildQ decode: QueryInsuranceParamsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceParams", - clientResolver + clientResolver, + deps: [QueryInsuranceParamsRequest, QueryInsuranceParamsResponse] }); export const createGetInsuranceFund = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryInsuranceFundRequest.encode, decode: QueryInsuranceFundResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceFund", - clientResolver + clientResolver, + deps: [QueryInsuranceFundRequest, QueryInsuranceFundResponse] }); export const createGetInsuranceFunds = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryInsuranceFundsRequest.encode, decode: QueryInsuranceFundsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceFunds", - clientResolver + clientResolver, + deps: [QueryInsuranceFundsRequest, QueryInsuranceFundsResponse] }); export const createGetEstimatedRedemptions = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryEstimatedRedemptionsRequest.encode, decode: QueryEstimatedRedemptionsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "EstimatedRedemptions", - clientResolver + clientResolver, + deps: [QueryEstimatedRedemptionsRequest, QueryEstimatedRedemptionsResponse] }); export const createGetPendingRedemptions = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPendingRedemptionsRequest.encode, decode: QueryPendingRedemptionsResponse.decode, service: "injective.insurance.v1beta1.Query", method: "PendingRedemptions", - clientResolver + clientResolver, + deps: [QueryPendingRedemptionsRequest, QueryPendingRedemptionsResponse] }); export const createGetInsuranceModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.insurance.v1beta1.Query", method: "InsuranceModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/insurance/v1beta1/query.ts b/libs/injectivejs/src/injective/insurance/v1beta1/query.ts index f8ee7aae..ea1cd75d 100644 --- a/libs/injectivejs/src/injective/insurance/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/insurance/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * QueryInsuranceParamsRequest is the request type for the Query/InsuranceParams * RPC method. @@ -316,9 +315,9 @@ export const QueryInsuranceParamsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceParamsRequest", value: QueryInsuranceParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryInsuranceParamsRequest.typeUrl, QueryInsuranceParamsRequest); function createBaseQueryInsuranceParamsResponse(): QueryInsuranceParamsResponse { return { params: Params.fromPartial({}) @@ -386,9 +385,11 @@ export const QueryInsuranceParamsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceParamsResponse", value: QueryInsuranceParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryInsuranceParamsResponse.typeUrl, QueryInsuranceParamsResponse); function createBaseQueryInsuranceFundRequest(): QueryInsuranceFundRequest { return { marketId: "" @@ -456,9 +457,9 @@ export const QueryInsuranceFundRequest = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundRequest", value: QueryInsuranceFundRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryInsuranceFundRequest.typeUrl, QueryInsuranceFundRequest); function createBaseQueryInsuranceFundResponse(): QueryInsuranceFundResponse { return { fund: undefined @@ -526,9 +527,11 @@ export const QueryInsuranceFundResponse = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundResponse", value: QueryInsuranceFundResponse.encode(message).finish() }; + }, + registerTypeUrl() { + InsuranceFund.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryInsuranceFundResponse.typeUrl, QueryInsuranceFundResponse); function createBaseQueryInsuranceFundsRequest(): QueryInsuranceFundsRequest { return {}; } @@ -583,9 +586,9 @@ export const QueryInsuranceFundsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundsRequest", value: QueryInsuranceFundsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryInsuranceFundsRequest.typeUrl, QueryInsuranceFundsRequest); function createBaseQueryInsuranceFundsResponse(): QueryInsuranceFundsResponse { return { funds: [] @@ -655,9 +658,11 @@ export const QueryInsuranceFundsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryInsuranceFundsResponse", value: QueryInsuranceFundsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + InsuranceFund.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryInsuranceFundsResponse.typeUrl, QueryInsuranceFundsResponse); function createBaseQueryEstimatedRedemptionsRequest(): QueryEstimatedRedemptionsRequest { return { marketId: "", @@ -737,9 +742,9 @@ export const QueryEstimatedRedemptionsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryEstimatedRedemptionsRequest", value: QueryEstimatedRedemptionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryEstimatedRedemptionsRequest.typeUrl, QueryEstimatedRedemptionsRequest); function createBaseQueryEstimatedRedemptionsResponse(): QueryEstimatedRedemptionsResponse { return { amount: [] @@ -809,9 +814,11 @@ export const QueryEstimatedRedemptionsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryEstimatedRedemptionsResponse", value: QueryEstimatedRedemptionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryEstimatedRedemptionsResponse.typeUrl, QueryEstimatedRedemptionsResponse); function createBaseQueryPendingRedemptionsRequest(): QueryPendingRedemptionsRequest { return { marketId: "", @@ -891,9 +898,9 @@ export const QueryPendingRedemptionsRequest = { typeUrl: "/injective.insurance.v1beta1.QueryPendingRedemptionsRequest", value: QueryPendingRedemptionsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPendingRedemptionsRequest.typeUrl, QueryPendingRedemptionsRequest); function createBaseQueryPendingRedemptionsResponse(): QueryPendingRedemptionsResponse { return { amount: [] @@ -963,9 +970,11 @@ export const QueryPendingRedemptionsResponse = { typeUrl: "/injective.insurance.v1beta1.QueryPendingRedemptionsResponse", value: QueryPendingRedemptionsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPendingRedemptionsResponse.typeUrl, QueryPendingRedemptionsResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -1020,9 +1029,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.insurance.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -1090,6 +1099,8 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.insurance.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/insurance/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/injective/insurance/v1beta1/tx.rpc.func.ts index 34466eaa..3af0a977 100644 --- a/libs/injectivejs/src/injective/insurance/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/insurance/v1beta1/tx.rpc.func.ts @@ -5,23 +5,27 @@ export const createCreateInsuranceFund = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgCreateInsuranceFund.typeUrl, encoders: toEncoders(MsgCreateInsuranceFund), - converters: toConverters(MsgCreateInsuranceFund) + converters: toConverters(MsgCreateInsuranceFund), + deps: [MsgCreateInsuranceFund] }); export const createUnderwrite = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUnderwrite.typeUrl, encoders: toEncoders(MsgUnderwrite), - converters: toConverters(MsgUnderwrite) + converters: toConverters(MsgUnderwrite), + deps: [MsgUnderwrite] }); export const createRequestRedemption = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRequestRedemption.typeUrl, encoders: toEncoders(MsgRequestRedemption), - converters: toConverters(MsgRequestRedemption) + converters: toConverters(MsgRequestRedemption), + deps: [MsgRequestRedemption] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/insurance/v1beta1/tx.ts b/libs/injectivejs/src/injective/insurance/v1beta1/tx.ts index 1965e15c..c3d6e361 100644 --- a/libs/injectivejs/src/injective/insurance/v1beta1/tx.ts +++ b/libs/injectivejs/src/injective/insurance/v1beta1/tx.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Params, ParamsAmino } from "./insurance"; import { isSet, DeepPartial } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateInsuranceFund a message to create an insurance fund for a derivative * market. @@ -364,10 +363,11 @@ export const MsgCreateInsuranceFund = { typeUrl: "/injective.insurance.v1beta1.MsgCreateInsuranceFund", value: MsgCreateInsuranceFund.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateInsuranceFund.typeUrl, MsgCreateInsuranceFund); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateInsuranceFund.aminoType, MsgCreateInsuranceFund.typeUrl); function createBaseMsgCreateInsuranceFundResponse(): MsgCreateInsuranceFundResponse { return {}; } @@ -422,9 +422,9 @@ export const MsgCreateInsuranceFundResponse = { typeUrl: "/injective.insurance.v1beta1.MsgCreateInsuranceFundResponse", value: MsgCreateInsuranceFundResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateInsuranceFundResponse.typeUrl, MsgCreateInsuranceFundResponse); function createBaseMsgUnderwrite(): MsgUnderwrite { return { sender: "", @@ -523,10 +523,11 @@ export const MsgUnderwrite = { typeUrl: "/injective.insurance.v1beta1.MsgUnderwrite", value: MsgUnderwrite.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUnderwrite.typeUrl, MsgUnderwrite); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnderwrite.aminoType, MsgUnderwrite.typeUrl); function createBaseMsgUnderwriteResponse(): MsgUnderwriteResponse { return {}; } @@ -581,9 +582,9 @@ export const MsgUnderwriteResponse = { typeUrl: "/injective.insurance.v1beta1.MsgUnderwriteResponse", value: MsgUnderwriteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnderwriteResponse.typeUrl, MsgUnderwriteResponse); function createBaseMsgRequestRedemption(): MsgRequestRedemption { return { sender: "", @@ -682,10 +683,11 @@ export const MsgRequestRedemption = { typeUrl: "/injective.insurance.v1beta1.MsgRequestRedemption", value: MsgRequestRedemption.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRequestRedemption.typeUrl, MsgRequestRedemption); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRequestRedemption.aminoType, MsgRequestRedemption.typeUrl); function createBaseMsgRequestRedemptionResponse(): MsgRequestRedemptionResponse { return {}; } @@ -740,9 +742,9 @@ export const MsgRequestRedemptionResponse = { typeUrl: "/injective.insurance.v1beta1.MsgRequestRedemptionResponse", value: MsgRequestRedemptionResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestRedemptionResponse.typeUrl, MsgRequestRedemptionResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -829,10 +831,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.insurance.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -887,6 +890,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.insurance.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/ocr/v1beta1/genesis.ts b/libs/injectivejs/src/injective/ocr/v1beta1/genesis.ts index 2fd0d991..e502849a 100644 --- a/libs/injectivejs/src/injective/ocr/v1beta1/genesis.ts +++ b/libs/injectivejs/src/injective/ocr/v1beta1/genesis.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino, FeedConfig, FeedConfigAmino, Transmission, Transmi import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the OCR module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to OCR. */ @@ -352,9 +351,18 @@ export const GenesisState = { typeUrl: "/injective.ocr.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + FeedConfig.registerTypeUrl(); + FeedEpochAndRound.registerTypeUrl(); + FeedTransmission.registerTypeUrl(); + FeedLatestAggregatorRoundIDs.registerTypeUrl(); + RewardPool.registerTypeUrl(); + FeedCounts.registerTypeUrl(); + PendingPayeeship.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseFeedTransmission(): FeedTransmission { return { feedId: "", @@ -434,9 +442,11 @@ export const FeedTransmission = { typeUrl: "/injective.ocr.v1beta1.FeedTransmission", value: FeedTransmission.encode(message).finish() }; + }, + registerTypeUrl() { + Transmission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedTransmission.typeUrl, FeedTransmission); function createBaseFeedEpochAndRound(): FeedEpochAndRound { return { feedId: "", @@ -516,9 +526,11 @@ export const FeedEpochAndRound = { typeUrl: "/injective.ocr.v1beta1.FeedEpochAndRound", value: FeedEpochAndRound.encode(message).finish() }; + }, + registerTypeUrl() { + EpochAndRound.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedEpochAndRound.typeUrl, FeedEpochAndRound); function createBaseFeedLatestAggregatorRoundIDs(): FeedLatestAggregatorRoundIDs { return { feedId: "", @@ -598,9 +610,9 @@ export const FeedLatestAggregatorRoundIDs = { typeUrl: "/injective.ocr.v1beta1.FeedLatestAggregatorRoundIDs", value: FeedLatestAggregatorRoundIDs.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeedLatestAggregatorRoundIDs.typeUrl, FeedLatestAggregatorRoundIDs); function createBaseRewardPool(): RewardPool { return { feedId: "", @@ -680,9 +692,11 @@ export const RewardPool = { typeUrl: "/injective.ocr.v1beta1.RewardPool", value: RewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RewardPool.typeUrl, RewardPool); function createBaseFeedCounts(): FeedCounts { return { feedId: "", @@ -764,9 +778,11 @@ export const FeedCounts = { typeUrl: "/injective.ocr.v1beta1.FeedCounts", value: FeedCounts.encode(message).finish() }; + }, + registerTypeUrl() { + Count.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedCounts.typeUrl, FeedCounts); function createBaseCount(): Count { return { address: "", @@ -846,9 +862,9 @@ export const Count = { typeUrl: "/injective.ocr.v1beta1.Count", value: Count.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Count.typeUrl, Count); function createBasePendingPayeeship(): PendingPayeeship { return { feedId: "", @@ -940,6 +956,6 @@ export const PendingPayeeship = { typeUrl: "/injective.ocr.v1beta1.PendingPayeeship", value: PendingPayeeship.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PendingPayeeship.typeUrl, PendingPayeeship); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/ocr/v1beta1/ocr.ts b/libs/injectivejs/src/injective/ocr/v1beta1/ocr.ts index 6a93f048..30f397df 100644 --- a/libs/injectivejs/src/injective/ocr/v1beta1/ocr.ts +++ b/libs/injectivejs/src/injective/ocr/v1beta1/ocr.ts @@ -751,10 +751,9 @@ export const Params = { typeUrl: "/injective.ocr.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseFeedConfig(): FeedConfig { return { signers: [], @@ -898,9 +897,11 @@ export const FeedConfig = { typeUrl: "/injective.ocr.v1beta1.FeedConfig", value: FeedConfig.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeedConfig.typeUrl, FeedConfig); function createBaseFeedConfigInfo(): FeedConfigInfo { return { latestConfigDigest: new Uint8Array(), @@ -1016,9 +1017,9 @@ export const FeedConfigInfo = { typeUrl: "/injective.ocr.v1beta1.FeedConfigInfo", value: FeedConfigInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeedConfigInfo.typeUrl, FeedConfigInfo); function createBaseModuleParams(): ModuleParams { return { feedId: "", @@ -1194,9 +1195,9 @@ export const ModuleParams = { typeUrl: "/injective.ocr.v1beta1.ModuleParams", value: ModuleParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModuleParams.typeUrl, ModuleParams); function createBaseContractConfig(): ContractConfig { return { configCount: BigInt(0), @@ -1340,9 +1341,9 @@ export const ContractConfig = { typeUrl: "/injective.ocr.v1beta1.ContractConfig", value: ContractConfig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ContractConfig.typeUrl, ContractConfig); function createBaseSetConfigProposal(): SetConfigProposal { return { title: "", @@ -1441,10 +1442,13 @@ export const SetConfigProposal = { typeUrl: "/injective.ocr.v1beta1.SetConfigProposal", value: SetConfigProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SetConfigProposal.typeUrl, SetConfigProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SetConfigProposal.aminoType, SetConfigProposal.typeUrl); + FeedConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SetConfigProposal.typeUrl, SetConfigProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SetConfigProposal.aminoType, SetConfigProposal.typeUrl); function createBaseFeedProperties(): FeedProperties { return { feedId: "", @@ -1632,9 +1636,9 @@ export const FeedProperties = { typeUrl: "/injective.ocr.v1beta1.FeedProperties", value: FeedProperties.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeedProperties.typeUrl, FeedProperties); function createBaseSetBatchConfigProposal(): SetBatchConfigProposal { return { title: "", @@ -1775,10 +1779,13 @@ export const SetBatchConfigProposal = { typeUrl: "/injective.ocr.v1beta1.SetBatchConfigProposal", value: SetBatchConfigProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SetBatchConfigProposal.typeUrl, SetBatchConfigProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SetBatchConfigProposal.aminoType, SetBatchConfigProposal.typeUrl); + FeedProperties.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SetBatchConfigProposal.typeUrl, SetBatchConfigProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SetBatchConfigProposal.aminoType, SetBatchConfigProposal.typeUrl); function createBaseOracleObservationsCounts(): OracleObservationsCounts { return { counts: [] @@ -1857,9 +1864,9 @@ export const OracleObservationsCounts = { typeUrl: "/injective.ocr.v1beta1.OracleObservationsCounts", value: OracleObservationsCounts.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleObservationsCounts.typeUrl, OracleObservationsCounts); function createBaseGasReimbursements(): GasReimbursements { return { reimbursements: [] @@ -1929,9 +1936,11 @@ export const GasReimbursements = { typeUrl: "/injective.ocr.v1beta1.GasReimbursements", value: GasReimbursements.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GasReimbursements.typeUrl, GasReimbursements); function createBasePayee(): Payee { return { transmitterAddr: "", @@ -2011,9 +2020,9 @@ export const Payee = { typeUrl: "/injective.ocr.v1beta1.Payee", value: Payee.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Payee.typeUrl, Payee); function createBaseTransmission(): Transmission { return { answer: "", @@ -2105,9 +2114,9 @@ export const Transmission = { typeUrl: "/injective.ocr.v1beta1.Transmission", value: Transmission.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Transmission.typeUrl, Transmission); function createBaseEpochAndRound(): EpochAndRound { return { epoch: BigInt(0), @@ -2187,9 +2196,9 @@ export const EpochAndRound = { typeUrl: "/injective.ocr.v1beta1.EpochAndRound", value: EpochAndRound.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EpochAndRound.typeUrl, EpochAndRound); function createBaseReport(): Report { return { observationsTimestamp: BigInt(0), @@ -2283,9 +2292,9 @@ export const Report = { typeUrl: "/injective.ocr.v1beta1.Report", value: Report.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Report.typeUrl, Report); function createBaseReportToSign(): ReportToSign { return { configDigest: new Uint8Array(), @@ -2401,9 +2410,9 @@ export const ReportToSign = { typeUrl: "/injective.ocr.v1beta1.ReportToSign", value: ReportToSign.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ReportToSign.typeUrl, ReportToSign); function createBaseEventOraclePaid(): EventOraclePaid { return { transmitterAddr: "", @@ -2495,9 +2504,11 @@ export const EventOraclePaid = { typeUrl: "/injective.ocr.v1beta1.EventOraclePaid", value: EventOraclePaid.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventOraclePaid.typeUrl, EventOraclePaid); function createBaseEventAnswerUpdated(): EventAnswerUpdated { return { current: "", @@ -2589,9 +2600,9 @@ export const EventAnswerUpdated = { typeUrl: "/injective.ocr.v1beta1.EventAnswerUpdated", value: EventAnswerUpdated.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAnswerUpdated.typeUrl, EventAnswerUpdated); function createBaseEventNewRound(): EventNewRound { return { roundId: "", @@ -2683,9 +2694,9 @@ export const EventNewRound = { typeUrl: "/injective.ocr.v1beta1.EventNewRound", value: EventNewRound.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventNewRound.typeUrl, EventNewRound); function createBaseEventTransmitted(): EventTransmitted { return { configDigest: new Uint8Array(), @@ -2765,9 +2776,9 @@ export const EventTransmitted = { typeUrl: "/injective.ocr.v1beta1.EventTransmitted", value: EventTransmitted.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventTransmitted.typeUrl, EventTransmitted); function createBaseEventNewTransmission(): EventNewTransmission { return { feedId: "", @@ -2933,9 +2944,11 @@ export const EventNewTransmission = { typeUrl: "/injective.ocr.v1beta1.EventNewTransmission", value: EventNewTransmission.encode(message).finish() }; + }, + registerTypeUrl() { + EpochAndRound.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventNewTransmission.typeUrl, EventNewTransmission); function createBaseEventConfigSet(): EventConfigSet { return { configDigest: new Uint8Array(), @@ -3039,6 +3052,9 @@ export const EventConfigSet = { typeUrl: "/injective.ocr.v1beta1.EventConfigSet", value: EventConfigSet.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfig.registerTypeUrl(); + FeedConfigInfo.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventConfigSet.typeUrl, EventConfigSet); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/ocr/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/injective/ocr/v1beta1/query.rpc.func.ts index 028e63a7..d084b36c 100644 --- a/libs/injectivejs/src/injective/ocr/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/ocr/v1beta1/query.rpc.func.ts @@ -5,47 +5,54 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryFeedConfigRequest.encode, decode: QueryFeedConfigResponse.decode, service: "injective.ocr.v1beta1.Query", method: "FeedConfig", - clientResolver + clientResolver, + deps: [QueryFeedConfigRequest, QueryFeedConfigResponse] }); export const createGetFeedConfigInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryFeedConfigInfoRequest.encode, decode: QueryFeedConfigInfoResponse.decode, service: "injective.ocr.v1beta1.Query", method: "FeedConfigInfo", - clientResolver + clientResolver, + deps: [QueryFeedConfigInfoRequest, QueryFeedConfigInfoResponse] }); export const createGetLatestRound = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryLatestRoundRequest.encode, decode: QueryLatestRoundResponse.decode, service: "injective.ocr.v1beta1.Query", method: "LatestRound", - clientResolver + clientResolver, + deps: [QueryLatestRoundRequest, QueryLatestRoundResponse] }); export const createGetLatestTransmissionDetails = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryLatestTransmissionDetailsRequest.encode, decode: QueryLatestTransmissionDetailsResponse.decode, service: "injective.ocr.v1beta1.Query", method: "LatestTransmissionDetails", - clientResolver + clientResolver, + deps: [QueryLatestTransmissionDetailsRequest, QueryLatestTransmissionDetailsResponse] }); export const createGetOwedAmount = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryOwedAmountRequest.encode, decode: QueryOwedAmountResponse.decode, service: "injective.ocr.v1beta1.Query", method: "OwedAmount", - clientResolver + clientResolver, + deps: [QueryOwedAmountRequest, QueryOwedAmountResponse] }); export const createGetOcrModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.ocr.v1beta1.Query", method: "OcrModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/ocr/v1beta1/query.ts b/libs/injectivejs/src/injective/ocr/v1beta1/query.ts index d4dbcdb8..874cc026 100644 --- a/libs/injectivejs/src/injective/ocr/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/ocr/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { typeUrl: "/injective.ocr.v1beta1.QueryParamsRequest"; @@ -256,9 +255,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.ocr.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -326,9 +325,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.ocr.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryFeedConfigRequest(): QueryFeedConfigRequest { return { feedId: "" @@ -396,9 +397,9 @@ export const QueryFeedConfigRequest = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigRequest", value: QueryFeedConfigRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeedConfigRequest.typeUrl, QueryFeedConfigRequest); function createBaseQueryFeedConfigResponse(): QueryFeedConfigResponse { return { feedConfigInfo: undefined, @@ -478,9 +479,12 @@ export const QueryFeedConfigResponse = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigResponse", value: QueryFeedConfigResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfigInfo.registerTypeUrl(); + FeedConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeedConfigResponse.typeUrl, QueryFeedConfigResponse); function createBaseQueryFeedConfigInfoRequest(): QueryFeedConfigInfoRequest { return { feedId: "" @@ -548,9 +552,9 @@ export const QueryFeedConfigInfoRequest = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigInfoRequest", value: QueryFeedConfigInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryFeedConfigInfoRequest.typeUrl, QueryFeedConfigInfoRequest); function createBaseQueryFeedConfigInfoResponse(): QueryFeedConfigInfoResponse { return { feedConfigInfo: undefined, @@ -630,9 +634,12 @@ export const QueryFeedConfigInfoResponse = { typeUrl: "/injective.ocr.v1beta1.QueryFeedConfigInfoResponse", value: QueryFeedConfigInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfigInfo.registerTypeUrl(); + EpochAndRound.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryFeedConfigInfoResponse.typeUrl, QueryFeedConfigInfoResponse); function createBaseQueryLatestRoundRequest(): QueryLatestRoundRequest { return { feedId: "" @@ -700,9 +707,9 @@ export const QueryLatestRoundRequest = { typeUrl: "/injective.ocr.v1beta1.QueryLatestRoundRequest", value: QueryLatestRoundRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLatestRoundRequest.typeUrl, QueryLatestRoundRequest); function createBaseQueryLatestRoundResponse(): QueryLatestRoundResponse { return { latestRoundId: BigInt(0), @@ -782,9 +789,11 @@ export const QueryLatestRoundResponse = { typeUrl: "/injective.ocr.v1beta1.QueryLatestRoundResponse", value: QueryLatestRoundResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Transmission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLatestRoundResponse.typeUrl, QueryLatestRoundResponse); function createBaseQueryLatestTransmissionDetailsRequest(): QueryLatestTransmissionDetailsRequest { return { feedId: "" @@ -852,9 +861,9 @@ export const QueryLatestTransmissionDetailsRequest = { typeUrl: "/injective.ocr.v1beta1.QueryLatestTransmissionDetailsRequest", value: QueryLatestTransmissionDetailsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLatestTransmissionDetailsRequest.typeUrl, QueryLatestTransmissionDetailsRequest); function createBaseQueryLatestTransmissionDetailsResponse(): QueryLatestTransmissionDetailsResponse { return { configDigest: new Uint8Array(), @@ -946,9 +955,12 @@ export const QueryLatestTransmissionDetailsResponse = { typeUrl: "/injective.ocr.v1beta1.QueryLatestTransmissionDetailsResponse", value: QueryLatestTransmissionDetailsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + EpochAndRound.registerTypeUrl(); + Transmission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLatestTransmissionDetailsResponse.typeUrl, QueryLatestTransmissionDetailsResponse); function createBaseQueryOwedAmountRequest(): QueryOwedAmountRequest { return { transmitter: "" @@ -1016,9 +1028,9 @@ export const QueryOwedAmountRequest = { typeUrl: "/injective.ocr.v1beta1.QueryOwedAmountRequest", value: QueryOwedAmountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOwedAmountRequest.typeUrl, QueryOwedAmountRequest); function createBaseQueryOwedAmountResponse(): QueryOwedAmountResponse { return { amount: Coin.fromPartial({}) @@ -1086,9 +1098,11 @@ export const QueryOwedAmountResponse = { typeUrl: "/injective.ocr.v1beta1.QueryOwedAmountResponse", value: QueryOwedAmountResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOwedAmountResponse.typeUrl, QueryOwedAmountResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -1143,9 +1157,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.ocr.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -1213,6 +1227,8 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.ocr.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/ocr/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/injective/ocr/v1beta1/tx.rpc.func.ts index 32fa6520..534dfab5 100644 --- a/libs/injectivejs/src/injective/ocr/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/ocr/v1beta1/tx.rpc.func.ts @@ -5,53 +5,62 @@ export const createCreateFeed = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgCreateFeed.typeUrl, encoders: toEncoders(MsgCreateFeed), - converters: toConverters(MsgCreateFeed) + converters: toConverters(MsgCreateFeed), + deps: [MsgCreateFeed] }); export const createUpdateFeed = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateFeed.typeUrl, encoders: toEncoders(MsgUpdateFeed), - converters: toConverters(MsgUpdateFeed) + converters: toConverters(MsgUpdateFeed), + deps: [MsgUpdateFeed] }); export const createTransmit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTransmit.typeUrl, encoders: toEncoders(MsgTransmit), - converters: toConverters(MsgTransmit) + converters: toConverters(MsgTransmit), + deps: [MsgTransmit] }); export const createFundFeedRewardPool = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgFundFeedRewardPool.typeUrl, encoders: toEncoders(MsgFundFeedRewardPool), - converters: toConverters(MsgFundFeedRewardPool) + converters: toConverters(MsgFundFeedRewardPool), + deps: [MsgFundFeedRewardPool] }); export const createWithdrawFeedRewardPool = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawFeedRewardPool.typeUrl, encoders: toEncoders(MsgWithdrawFeedRewardPool), - converters: toConverters(MsgWithdrawFeedRewardPool) + converters: toConverters(MsgWithdrawFeedRewardPool), + deps: [MsgWithdrawFeedRewardPool] }); export const createSetPayees = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSetPayees.typeUrl, encoders: toEncoders(MsgSetPayees), - converters: toConverters(MsgSetPayees) + converters: toConverters(MsgSetPayees), + deps: [MsgSetPayees] }); export const createTransferPayeeship = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTransferPayeeship.typeUrl, encoders: toEncoders(MsgTransferPayeeship), - converters: toConverters(MsgTransferPayeeship) + converters: toConverters(MsgTransferPayeeship), + deps: [MsgTransferPayeeship] }); export const createAcceptPayeeship = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgAcceptPayeeship.typeUrl, encoders: toEncoders(MsgAcceptPayeeship), - converters: toConverters(MsgAcceptPayeeship) + converters: toConverters(MsgAcceptPayeeship), + deps: [MsgAcceptPayeeship] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/ocr/v1beta1/tx.ts b/libs/injectivejs/src/injective/ocr/v1beta1/tx.ts index d26b2a17..bb298f08 100644 --- a/libs/injectivejs/src/injective/ocr/v1beta1/tx.ts +++ b/libs/injectivejs/src/injective/ocr/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { FeedConfig, FeedConfigAmino, Report, ReportAmino, Params, ParamsAmino } import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface MsgCreateFeed { sender: string; config?: FeedConfig; @@ -411,10 +410,11 @@ export const MsgCreateFeed = { typeUrl: "/injective.ocr.v1beta1.MsgCreateFeed", value: MsgCreateFeed.encode(message).finish() }; + }, + registerTypeUrl() { + FeedConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateFeed.typeUrl, MsgCreateFeed); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateFeed.aminoType, MsgCreateFeed.typeUrl); function createBaseMsgCreateFeedResponse(): MsgCreateFeedResponse { return {}; } @@ -469,9 +469,9 @@ export const MsgCreateFeedResponse = { typeUrl: "/injective.ocr.v1beta1.MsgCreateFeedResponse", value: MsgCreateFeedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateFeedResponse.typeUrl, MsgCreateFeedResponse); function createBaseMsgUpdateFeed(): MsgUpdateFeed { return { sender: "", @@ -646,10 +646,9 @@ export const MsgUpdateFeed = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateFeed", value: MsgUpdateFeed.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateFeed.typeUrl, MsgUpdateFeed); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateFeed.aminoType, MsgUpdateFeed.typeUrl); function createBaseMsgUpdateFeedResponse(): MsgUpdateFeedResponse { return {}; } @@ -704,9 +703,9 @@ export const MsgUpdateFeedResponse = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateFeedResponse", value: MsgUpdateFeedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateFeedResponse.typeUrl, MsgUpdateFeedResponse); function createBaseMsgTransmit(): MsgTransmit { return { transmitter: "", @@ -867,10 +866,11 @@ export const MsgTransmit = { typeUrl: "/injective.ocr.v1beta1.MsgTransmit", value: MsgTransmit.encode(message).finish() }; + }, + registerTypeUrl() { + Report.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTransmit.typeUrl, MsgTransmit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransmit.aminoType, MsgTransmit.typeUrl); function createBaseMsgTransmitResponse(): MsgTransmitResponse { return {}; } @@ -925,9 +925,9 @@ export const MsgTransmitResponse = { typeUrl: "/injective.ocr.v1beta1.MsgTransmitResponse", value: MsgTransmitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransmitResponse.typeUrl, MsgTransmitResponse); function createBaseMsgFundFeedRewardPool(): MsgFundFeedRewardPool { return { sender: "", @@ -1026,10 +1026,11 @@ export const MsgFundFeedRewardPool = { typeUrl: "/injective.ocr.v1beta1.MsgFundFeedRewardPool", value: MsgFundFeedRewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgFundFeedRewardPool.typeUrl, MsgFundFeedRewardPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundFeedRewardPool.aminoType, MsgFundFeedRewardPool.typeUrl); function createBaseMsgFundFeedRewardPoolResponse(): MsgFundFeedRewardPoolResponse { return {}; } @@ -1084,9 +1085,9 @@ export const MsgFundFeedRewardPoolResponse = { typeUrl: "/injective.ocr.v1beta1.MsgFundFeedRewardPoolResponse", value: MsgFundFeedRewardPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgFundFeedRewardPoolResponse.typeUrl, MsgFundFeedRewardPoolResponse); function createBaseMsgWithdrawFeedRewardPool(): MsgWithdrawFeedRewardPool { return { sender: "", @@ -1185,10 +1186,11 @@ export const MsgWithdrawFeedRewardPool = { typeUrl: "/injective.ocr.v1beta1.MsgWithdrawFeedRewardPool", value: MsgWithdrawFeedRewardPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawFeedRewardPool.typeUrl, MsgWithdrawFeedRewardPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawFeedRewardPool.aminoType, MsgWithdrawFeedRewardPool.typeUrl); function createBaseMsgWithdrawFeedRewardPoolResponse(): MsgWithdrawFeedRewardPoolResponse { return {}; } @@ -1243,9 +1245,9 @@ export const MsgWithdrawFeedRewardPoolResponse = { typeUrl: "/injective.ocr.v1beta1.MsgWithdrawFeedRewardPoolResponse", value: MsgWithdrawFeedRewardPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawFeedRewardPoolResponse.typeUrl, MsgWithdrawFeedRewardPoolResponse); function createBaseMsgSetPayees(): MsgSetPayees { return { sender: "", @@ -1360,10 +1362,9 @@ export const MsgSetPayees = { typeUrl: "/injective.ocr.v1beta1.MsgSetPayees", value: MsgSetPayees.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetPayees.typeUrl, MsgSetPayees); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetPayees.aminoType, MsgSetPayees.typeUrl); function createBaseMsgSetPayeesResponse(): MsgSetPayeesResponse { return {}; } @@ -1418,9 +1419,9 @@ export const MsgSetPayeesResponse = { typeUrl: "/injective.ocr.v1beta1.MsgSetPayeesResponse", value: MsgSetPayeesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetPayeesResponse.typeUrl, MsgSetPayeesResponse); function createBaseMsgTransferPayeeship(): MsgTransferPayeeship { return { sender: "", @@ -1531,10 +1532,9 @@ export const MsgTransferPayeeship = { typeUrl: "/injective.ocr.v1beta1.MsgTransferPayeeship", value: MsgTransferPayeeship.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferPayeeship.typeUrl, MsgTransferPayeeship); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransferPayeeship.aminoType, MsgTransferPayeeship.typeUrl); function createBaseMsgTransferPayeeshipResponse(): MsgTransferPayeeshipResponse { return {}; } @@ -1589,9 +1589,9 @@ export const MsgTransferPayeeshipResponse = { typeUrl: "/injective.ocr.v1beta1.MsgTransferPayeeshipResponse", value: MsgTransferPayeeshipResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferPayeeshipResponse.typeUrl, MsgTransferPayeeshipResponse); function createBaseMsgAcceptPayeeship(): MsgAcceptPayeeship { return { payee: "", @@ -1690,10 +1690,9 @@ export const MsgAcceptPayeeship = { typeUrl: "/injective.ocr.v1beta1.MsgAcceptPayeeship", value: MsgAcceptPayeeship.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcceptPayeeship.typeUrl, MsgAcceptPayeeship); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcceptPayeeship.aminoType, MsgAcceptPayeeship.typeUrl); function createBaseMsgAcceptPayeeshipResponse(): MsgAcceptPayeeshipResponse { return {}; } @@ -1748,9 +1747,9 @@ export const MsgAcceptPayeeshipResponse = { typeUrl: "/injective.ocr.v1beta1.MsgAcceptPayeeshipResponse", value: MsgAcceptPayeeshipResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcceptPayeeshipResponse.typeUrl, MsgAcceptPayeeshipResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1837,10 +1836,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1895,6 +1895,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.ocr.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/events.ts b/libs/injectivejs/src/injective/oracle/v1beta1/events.ts index e78a07bd..29516152 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/events.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/events.ts @@ -1,7 +1,6 @@ import { StorkPriceState, StorkPriceStateAmino, PythPriceState, PythPriceStateAmino } from "./oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface SetChainlinkPriceEvent { feedId: string; answer: string; @@ -293,9 +292,9 @@ export const SetChainlinkPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetChainlinkPriceEvent", value: SetChainlinkPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetChainlinkPriceEvent.typeUrl, SetChainlinkPriceEvent); function createBaseSetBandPriceEvent(): SetBandPriceEvent { return { relayer: "", @@ -411,9 +410,9 @@ export const SetBandPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetBandPriceEvent", value: SetBandPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetBandPriceEvent.typeUrl, SetBandPriceEvent); function createBaseSetBandIBCPriceEvent(): SetBandIBCPriceEvent { return { relayer: "", @@ -545,9 +544,9 @@ export const SetBandIBCPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetBandIBCPriceEvent", value: SetBandIBCPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetBandIBCPriceEvent.typeUrl, SetBandIBCPriceEvent); function createBaseEventBandIBCAckSuccess(): EventBandIBCAckSuccess { return { ackResult: "", @@ -627,9 +626,9 @@ export const EventBandIBCAckSuccess = { typeUrl: "/injective.oracle.v1beta1.EventBandIBCAckSuccess", value: EventBandIBCAckSuccess.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBandIBCAckSuccess.typeUrl, EventBandIBCAckSuccess); function createBaseEventBandIBCAckError(): EventBandIBCAckError { return { ackError: "", @@ -709,9 +708,9 @@ export const EventBandIBCAckError = { typeUrl: "/injective.oracle.v1beta1.EventBandIBCAckError", value: EventBandIBCAckError.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBandIBCAckError.typeUrl, EventBandIBCAckError); function createBaseEventBandIBCResponseTimeout(): EventBandIBCResponseTimeout { return { clientId: BigInt(0) @@ -779,9 +778,9 @@ export const EventBandIBCResponseTimeout = { typeUrl: "/injective.oracle.v1beta1.EventBandIBCResponseTimeout", value: EventBandIBCResponseTimeout.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBandIBCResponseTimeout.typeUrl, EventBandIBCResponseTimeout); function createBaseSetPriceFeedPriceEvent(): SetPriceFeedPriceEvent { return { relayer: "", @@ -885,9 +884,9 @@ export const SetPriceFeedPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetPriceFeedPriceEvent", value: SetPriceFeedPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetPriceFeedPriceEvent.typeUrl, SetPriceFeedPriceEvent); function createBaseSetProviderPriceEvent(): SetProviderPriceEvent { return { provider: "", @@ -991,9 +990,9 @@ export const SetProviderPriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetProviderPriceEvent", value: SetProviderPriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetProviderPriceEvent.typeUrl, SetProviderPriceEvent); function createBaseSetCoinbasePriceEvent(): SetCoinbasePriceEvent { return { symbol: "", @@ -1085,9 +1084,9 @@ export const SetCoinbasePriceEvent = { typeUrl: "/injective.oracle.v1beta1.SetCoinbasePriceEvent", value: SetCoinbasePriceEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SetCoinbasePriceEvent.typeUrl, SetCoinbasePriceEvent); function createBaseEventSetStorkPrices(): EventSetStorkPrices { return { prices: [] @@ -1157,9 +1156,11 @@ export const EventSetStorkPrices = { typeUrl: "/injective.oracle.v1beta1.EventSetStorkPrices", value: EventSetStorkPrices.encode(message).finish() }; + }, + registerTypeUrl() { + StorkPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventSetStorkPrices.typeUrl, EventSetStorkPrices); function createBaseEventSetPythPrices(): EventSetPythPrices { return { prices: [] @@ -1229,6 +1230,8 @@ export const EventSetPythPrices = { typeUrl: "/injective.oracle.v1beta1.EventSetPythPrices", value: EventSetPythPrices.encode(message).finish() }; + }, + registerTypeUrl() { + PythPriceState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventSetPythPrices.typeUrl, EventSetPythPrices); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/genesis.ts b/libs/injectivejs/src/injective/oracle/v1beta1/genesis.ts index de88f8a9..a36e6b87 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/genesis.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/genesis.ts @@ -1,7 +1,6 @@ import { Params, ParamsAmino, BandPriceState, BandPriceStateAmino, PriceFeedState, PriceFeedStateAmino, CoinbasePriceState, CoinbasePriceStateAmino, BandOracleRequest, BandOracleRequestAmino, BandIBCParams, BandIBCParamsAmino, ChainlinkPriceState, ChainlinkPriceStateAmino, PriceRecords, PriceRecordsAmino, ProviderState, ProviderStateAmino, PythPriceState, PythPriceStateAmino, StorkPriceState, StorkPriceStateAmino } from "./oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the oracle module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to oracle. */ @@ -353,9 +352,22 @@ export const GenesisState = { typeUrl: "/injective.oracle.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + BandPriceState.registerTypeUrl(); + PriceFeedState.registerTypeUrl(); + CoinbasePriceState.registerTypeUrl(); + BandOracleRequest.registerTypeUrl(); + BandIBCParams.registerTypeUrl(); + CalldataRecord.registerTypeUrl(); + ChainlinkPriceState.registerTypeUrl(); + PriceRecords.registerTypeUrl(); + ProviderState.registerTypeUrl(); + PythPriceState.registerTypeUrl(); + StorkPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseCalldataRecord(): CalldataRecord { return { clientId: BigInt(0), @@ -435,6 +447,6 @@ export const CalldataRecord = { typeUrl: "/injective.oracle.v1beta1.CalldataRecord", value: CalldataRecord.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CalldataRecord.typeUrl, CalldataRecord); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/oracle.ts b/libs/injectivejs/src/injective/oracle/v1beta1/oracle.ts index 36616d68..85d2302a 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/oracle.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/oracle.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum OracleType { Unspecified = 0, Band = 1, @@ -771,10 +770,9 @@ export const Params = { typeUrl: "/injective.oracle.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseOracleInfo(): OracleInfo { return { symbol: "", @@ -854,9 +852,9 @@ export const OracleInfo = { typeUrl: "/injective.oracle.v1beta1.OracleInfo", value: OracleInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleInfo.typeUrl, OracleInfo); function createBaseChainlinkPriceState(): ChainlinkPriceState { return { feedId: "", @@ -960,9 +958,11 @@ export const ChainlinkPriceState = { typeUrl: "/injective.oracle.v1beta1.ChainlinkPriceState", value: ChainlinkPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ChainlinkPriceState.typeUrl, ChainlinkPriceState); function createBaseBandPriceState(): BandPriceState { return { symbol: "", @@ -1078,9 +1078,11 @@ export const BandPriceState = { typeUrl: "/injective.oracle.v1beta1.BandPriceState", value: BandPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BandPriceState.typeUrl, BandPriceState); function createBasePriceFeedState(): PriceFeedState { return { base: "", @@ -1186,9 +1188,11 @@ export const PriceFeedState = { typeUrl: "/injective.oracle.v1beta1.PriceFeedState", value: PriceFeedState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PriceFeedState.typeUrl, PriceFeedState); function createBaseProviderInfo(): ProviderInfo { return { provider: "", @@ -1270,9 +1274,9 @@ export const ProviderInfo = { typeUrl: "/injective.oracle.v1beta1.ProviderInfo", value: ProviderInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProviderInfo.typeUrl, ProviderInfo); function createBaseProviderState(): ProviderState { return { providerInfo: undefined, @@ -1354,9 +1358,12 @@ export const ProviderState = { typeUrl: "/injective.oracle.v1beta1.ProviderState", value: ProviderState.encode(message).finish() }; + }, + registerTypeUrl() { + ProviderInfo.registerTypeUrl(); + ProviderPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProviderState.typeUrl, ProviderState); function createBaseProviderPriceState(): ProviderPriceState { return { symbol: "", @@ -1436,9 +1443,11 @@ export const ProviderPriceState = { typeUrl: "/injective.oracle.v1beta1.ProviderPriceState", value: ProviderPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProviderPriceState.typeUrl, ProviderPriceState); function createBasePriceFeedInfo(): PriceFeedInfo { return { base: "", @@ -1518,9 +1527,9 @@ export const PriceFeedInfo = { typeUrl: "/injective.oracle.v1beta1.PriceFeedInfo", value: PriceFeedInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceFeedInfo.typeUrl, PriceFeedInfo); function createBasePriceFeedPrice(): PriceFeedPrice { return { price: "" @@ -1588,9 +1597,9 @@ export const PriceFeedPrice = { typeUrl: "/injective.oracle.v1beta1.PriceFeedPrice", value: PriceFeedPrice.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceFeedPrice.typeUrl, PriceFeedPrice); function createBaseCoinbasePriceState(): CoinbasePriceState { return { kind: "", @@ -1706,9 +1715,11 @@ export const CoinbasePriceState = { typeUrl: "/injective.oracle.v1beta1.CoinbasePriceState", value: CoinbasePriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CoinbasePriceState.typeUrl, CoinbasePriceState); function createBaseStorkPriceState(): StorkPriceState { return { timestamp: BigInt(0), @@ -1812,9 +1823,11 @@ export const StorkPriceState = { typeUrl: "/injective.oracle.v1beta1.StorkPriceState", value: StorkPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StorkPriceState.typeUrl, StorkPriceState); function createBasePriceState(): PriceState { return { price: "", @@ -1906,9 +1919,9 @@ export const PriceState = { typeUrl: "/injective.oracle.v1beta1.PriceState", value: PriceState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceState.typeUrl, PriceState); function createBasePythPriceState(): PythPriceState { return { priceId: "", @@ -2036,9 +2049,11 @@ export const PythPriceState = { typeUrl: "/injective.oracle.v1beta1.PythPriceState", value: PythPriceState.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PythPriceState.typeUrl, PythPriceState); function createBaseBandOracleRequest(): BandOracleRequest { return { requestId: BigInt(0), @@ -2206,9 +2221,11 @@ export const BandOracleRequest = { typeUrl: "/injective.oracle.v1beta1.BandOracleRequest", value: BandOracleRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BandOracleRequest.typeUrl, BandOracleRequest); function createBaseBandIBCParams(): BandIBCParams { return { bandIbcEnabled: false, @@ -2347,9 +2364,9 @@ export const BandIBCParams = { typeUrl: "/injective.oracle.v1beta1.BandIBCParams", value: BandIBCParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BandIBCParams.typeUrl, BandIBCParams); function createBaseSymbolPriceTimestamp(): SymbolPriceTimestamp { return { oracle: 0, @@ -2441,9 +2458,9 @@ export const SymbolPriceTimestamp = { typeUrl: "/injective.oracle.v1beta1.SymbolPriceTimestamp", value: SymbolPriceTimestamp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SymbolPriceTimestamp.typeUrl, SymbolPriceTimestamp); function createBaseLastPriceTimestamps(): LastPriceTimestamps { return { lastPriceTimestamps: [] @@ -2513,9 +2530,11 @@ export const LastPriceTimestamps = { typeUrl: "/injective.oracle.v1beta1.LastPriceTimestamps", value: LastPriceTimestamps.encode(message).finish() }; + }, + registerTypeUrl() { + SymbolPriceTimestamp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LastPriceTimestamps.typeUrl, LastPriceTimestamps); function createBasePriceRecords(): PriceRecords { return { oracle: 0, @@ -2609,9 +2628,11 @@ export const PriceRecords = { typeUrl: "/injective.oracle.v1beta1.PriceRecords", value: PriceRecords.encode(message).finish() }; + }, + registerTypeUrl() { + PriceRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PriceRecords.typeUrl, PriceRecords); function createBasePriceRecord(): PriceRecord { return { timestamp: BigInt(0), @@ -2691,9 +2712,9 @@ export const PriceRecord = { typeUrl: "/injective.oracle.v1beta1.PriceRecord", value: PriceRecord.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceRecord.typeUrl, PriceRecord); function createBaseMetadataStatistics(): MetadataStatistics { return { groupCount: 0, @@ -2857,9 +2878,9 @@ export const MetadataStatistics = { typeUrl: "/injective.oracle.v1beta1.MetadataStatistics", value: MetadataStatistics.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MetadataStatistics.typeUrl, MetadataStatistics); function createBasePriceAttestation(): PriceAttestation { return { priceId: "", @@ -3011,9 +3032,9 @@ export const PriceAttestation = { typeUrl: "/injective.oracle.v1beta1.PriceAttestation", value: PriceAttestation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PriceAttestation.typeUrl, PriceAttestation); function createBaseAssetPair(): AssetPair { return { assetId: "", @@ -3095,9 +3116,11 @@ export const AssetPair = { typeUrl: "/injective.oracle.v1beta1.AssetPair", value: AssetPair.encode(message).finish() }; + }, + registerTypeUrl() { + SignedPriceOfAssetPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AssetPair.typeUrl, AssetPair); function createBaseSignedPriceOfAssetPair(): SignedPriceOfAssetPair { return { publisherKey: "", @@ -3201,6 +3224,6 @@ export const SignedPriceOfAssetPair = { typeUrl: "/injective.oracle.v1beta1.SignedPriceOfAssetPair", value: SignedPriceOfAssetPair.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(SignedPriceOfAssetPair.typeUrl, SignedPriceOfAssetPair); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/proposal.ts b/libs/injectivejs/src/injective/oracle/v1beta1/proposal.ts index 453fdef3..1c00592d 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/proposal.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/proposal.ts @@ -314,10 +314,12 @@ export const GrantBandOraclePrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantBandOraclePrivilegeProposal", value: GrantBandOraclePrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantBandOraclePrivilegeProposal.typeUrl, GrantBandOraclePrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantBandOraclePrivilegeProposal.aminoType, GrantBandOraclePrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantBandOraclePrivilegeProposal.typeUrl, GrantBandOraclePrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantBandOraclePrivilegeProposal.aminoType, GrantBandOraclePrivilegeProposal.typeUrl); function createBaseRevokeBandOraclePrivilegeProposal(): RevokeBandOraclePrivilegeProposal { return { title: "", @@ -418,10 +420,12 @@ export const RevokeBandOraclePrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokeBandOraclePrivilegeProposal", value: RevokeBandOraclePrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeBandOraclePrivilegeProposal.typeUrl, RevokeBandOraclePrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokeBandOraclePrivilegeProposal.aminoType, RevokeBandOraclePrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(RevokeBandOraclePrivilegeProposal.typeUrl, RevokeBandOraclePrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokeBandOraclePrivilegeProposal.aminoType, RevokeBandOraclePrivilegeProposal.typeUrl); function createBaseGrantPriceFeederPrivilegeProposal(): GrantPriceFeederPrivilegeProposal { return { title: "", @@ -546,10 +550,12 @@ export const GrantPriceFeederPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantPriceFeederPrivilegeProposal", value: GrantPriceFeederPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantPriceFeederPrivilegeProposal.typeUrl, GrantPriceFeederPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantPriceFeederPrivilegeProposal.aminoType, GrantPriceFeederPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantPriceFeederPrivilegeProposal.typeUrl, GrantPriceFeederPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantPriceFeederPrivilegeProposal.aminoType, GrantPriceFeederPrivilegeProposal.typeUrl); function createBaseGrantProviderPrivilegeProposal(): GrantProviderPrivilegeProposal { return { title: "", @@ -662,10 +668,12 @@ export const GrantProviderPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantProviderPrivilegeProposal", value: GrantProviderPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantProviderPrivilegeProposal.typeUrl, GrantProviderPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantProviderPrivilegeProposal.aminoType, GrantProviderPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantProviderPrivilegeProposal.typeUrl, GrantProviderPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantProviderPrivilegeProposal.aminoType, GrantProviderPrivilegeProposal.typeUrl); function createBaseRevokeProviderPrivilegeProposal(): RevokeProviderPrivilegeProposal { return { title: "", @@ -778,10 +786,12 @@ export const RevokeProviderPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokeProviderPrivilegeProposal", value: RevokeProviderPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeProviderPrivilegeProposal.typeUrl, RevokeProviderPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokeProviderPrivilegeProposal.aminoType, RevokeProviderPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(RevokeProviderPrivilegeProposal.typeUrl, RevokeProviderPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokeProviderPrivilegeProposal.aminoType, RevokeProviderPrivilegeProposal.typeUrl); function createBaseRevokePriceFeederPrivilegeProposal(): RevokePriceFeederPrivilegeProposal { return { title: "", @@ -906,10 +916,12 @@ export const RevokePriceFeederPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokePriceFeederPrivilegeProposal", value: RevokePriceFeederPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokePriceFeederPrivilegeProposal.typeUrl, RevokePriceFeederPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokePriceFeederPrivilegeProposal.aminoType, RevokePriceFeederPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(RevokePriceFeederPrivilegeProposal.typeUrl, RevokePriceFeederPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokePriceFeederPrivilegeProposal.aminoType, RevokePriceFeederPrivilegeProposal.typeUrl); function createBaseAuthorizeBandOracleRequestProposal(): AuthorizeBandOracleRequestProposal { return { title: "", @@ -1008,10 +1020,13 @@ export const AuthorizeBandOracleRequestProposal = { typeUrl: "/injective.oracle.v1beta1.AuthorizeBandOracleRequestProposal", value: AuthorizeBandOracleRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(AuthorizeBandOracleRequestProposal.typeUrl, AuthorizeBandOracleRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(AuthorizeBandOracleRequestProposal.aminoType, AuthorizeBandOracleRequestProposal.typeUrl); + BandOracleRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AuthorizeBandOracleRequestProposal.typeUrl, AuthorizeBandOracleRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(AuthorizeBandOracleRequestProposal.aminoType, AuthorizeBandOracleRequestProposal.typeUrl); function createBaseUpdateBandOracleRequestProposal(): UpdateBandOracleRequestProposal { return { title: "", @@ -1133,10 +1148,13 @@ export const UpdateBandOracleRequestProposal = { typeUrl: "/injective.oracle.v1beta1.UpdateBandOracleRequestProposal", value: UpdateBandOracleRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(UpdateBandOracleRequestProposal.typeUrl, UpdateBandOracleRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(UpdateBandOracleRequestProposal.aminoType, UpdateBandOracleRequestProposal.typeUrl); + BandOracleRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UpdateBandOracleRequestProposal.typeUrl, UpdateBandOracleRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(UpdateBandOracleRequestProposal.aminoType, UpdateBandOracleRequestProposal.typeUrl); function createBaseEnableBandIBCProposal(): EnableBandIBCProposal { return { title: "", @@ -1235,10 +1253,13 @@ export const EnableBandIBCProposal = { typeUrl: "/injective.oracle.v1beta1.EnableBandIBCProposal", value: EnableBandIBCProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(EnableBandIBCProposal.typeUrl, EnableBandIBCProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(EnableBandIBCProposal.aminoType, EnableBandIBCProposal.typeUrl); + BandIBCParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnableBandIBCProposal.typeUrl, EnableBandIBCProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(EnableBandIBCProposal.aminoType, EnableBandIBCProposal.typeUrl); function createBaseGrantStorkPublisherPrivilegeProposal(): GrantStorkPublisherPrivilegeProposal { return { title: "", @@ -1339,10 +1360,12 @@ export const GrantStorkPublisherPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.GrantStorkPublisherPrivilegeProposal", value: GrantStorkPublisherPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GrantStorkPublisherPrivilegeProposal.typeUrl, GrantStorkPublisherPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(GrantStorkPublisherPrivilegeProposal.aminoType, GrantStorkPublisherPrivilegeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(GrantStorkPublisherPrivilegeProposal.typeUrl, GrantStorkPublisherPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantStorkPublisherPrivilegeProposal.aminoType, GrantStorkPublisherPrivilegeProposal.typeUrl); function createBaseRevokeStorkPublisherPrivilegeProposal(): RevokeStorkPublisherPrivilegeProposal { return { title: "", @@ -1443,7 +1466,9 @@ export const RevokeStorkPublisherPrivilegeProposal = { typeUrl: "/injective.oracle.v1beta1.RevokeStorkPublisherPrivilegeProposal", value: RevokeStorkPublisherPrivilegeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeStorkPublisherPrivilegeProposal.typeUrl, RevokeStorkPublisherPrivilegeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(RevokeStorkPublisherPrivilegeProposal.aminoType, RevokeStorkPublisherPrivilegeProposal.typeUrl); } -}; -GlobalDecoderRegistry.register(RevokeStorkPublisherPrivilegeProposal.typeUrl, RevokeStorkPublisherPrivilegeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(RevokeStorkPublisherPrivilegeProposal.aminoType, RevokeStorkPublisherPrivilegeProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/injective/oracle/v1beta1/query.rpc.func.ts index 16f39b30..b42d914b 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/query.rpc.func.ts @@ -5,117 +5,134 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryBandRelayersRequest.encode, decode: QueryBandRelayersResponse.decode, service: "injective.oracle.v1beta1.Query", method: "BandRelayers", - clientResolver + clientResolver, + deps: [QueryBandRelayersRequest, QueryBandRelayersResponse] }); export const createGetBandPriceStates = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBandPriceStatesRequest.encode, decode: QueryBandPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "BandPriceStates", - clientResolver + clientResolver, + deps: [QueryBandPriceStatesRequest, QueryBandPriceStatesResponse] }); export const createGetBandIBCPriceStates = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBandIBCPriceStatesRequest.encode, decode: QueryBandIBCPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "BandIBCPriceStates", - clientResolver + clientResolver, + deps: [QueryBandIBCPriceStatesRequest, QueryBandIBCPriceStatesResponse] }); export const createGetPriceFeedPriceStates = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPriceFeedPriceStatesRequest.encode, decode: QueryPriceFeedPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "PriceFeedPriceStates", - clientResolver + clientResolver, + deps: [QueryPriceFeedPriceStatesRequest, QueryPriceFeedPriceStatesResponse] }); export const createGetCoinbasePriceStates = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCoinbasePriceStatesRequest.encode, decode: QueryCoinbasePriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "CoinbasePriceStates", - clientResolver + clientResolver, + deps: [QueryCoinbasePriceStatesRequest, QueryCoinbasePriceStatesResponse] }); export const createGetPythPriceStates = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPythPriceStatesRequest.encode, decode: QueryPythPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "PythPriceStates", - clientResolver + clientResolver, + deps: [QueryPythPriceStatesRequest, QueryPythPriceStatesResponse] }); export const createGetStorkPriceStates = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryStorkPriceStatesRequest.encode, decode: QueryStorkPriceStatesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "StorkPriceStates", - clientResolver + clientResolver, + deps: [QueryStorkPriceStatesRequest, QueryStorkPriceStatesResponse] }); export const createGetStorkPublishers = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryStorkPublishersRequest.encode, decode: QueryStorkPublishersResponse.decode, service: "injective.oracle.v1beta1.Query", method: "StorkPublishers", - clientResolver + clientResolver, + deps: [QueryStorkPublishersRequest, QueryStorkPublishersResponse] }); export const createGetProviderPriceState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryProviderPriceStateRequest.encode, decode: QueryProviderPriceStateResponse.decode, service: "injective.oracle.v1beta1.Query", method: "ProviderPriceState", - clientResolver + clientResolver, + deps: [QueryProviderPriceStateRequest, QueryProviderPriceStateResponse] }); export const createGetOracleModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const createGetHistoricalPriceRecords = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryHistoricalPriceRecordsRequest.encode, decode: QueryHistoricalPriceRecordsResponse.decode, service: "injective.oracle.v1beta1.Query", method: "HistoricalPriceRecords", - clientResolver + clientResolver, + deps: [QueryHistoricalPriceRecordsRequest, QueryHistoricalPriceRecordsResponse] }); export const createGetOracleVolatility = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryOracleVolatilityRequest.encode, decode: QueryOracleVolatilityResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleVolatility", - clientResolver + clientResolver, + deps: [QueryOracleVolatilityRequest, QueryOracleVolatilityResponse] }); export const createGetOracleProvidersInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryOracleProvidersInfoRequest.encode, decode: QueryOracleProvidersInfoResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleProvidersInfo", - clientResolver + clientResolver, + deps: [QueryOracleProvidersInfoRequest, QueryOracleProvidersInfoResponse] }); export const createGetOracleProviderPrices = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryOracleProviderPricesRequest.encode, decode: QueryOracleProviderPricesResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OracleProviderPrices", - clientResolver + clientResolver, + deps: [QueryOracleProviderPricesRequest, QueryOracleProviderPricesResponse] }); export const createGetOraclePrice = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryOraclePriceRequest.encode, decode: QueryOraclePriceResponse.decode, service: "injective.oracle.v1beta1.Query", method: "OraclePrice", - clientResolver + clientResolver, + deps: [QueryOraclePriceRequest, QueryOraclePriceResponse] }); export const createGetPythPrice = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPythPriceRequest.encode, decode: QueryPythPriceResponse.decode, service: "injective.oracle.v1beta1.Query", method: "PythPrice", - clientResolver + clientResolver, + deps: [QueryPythPriceRequest, QueryPythPriceResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/query.ts b/libs/injectivejs/src/injective/oracle/v1beta1/query.ts index e44832a4..e87024e9 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/query.ts @@ -2,7 +2,6 @@ import { OracleType, OracleInfo, OracleInfoAmino, PythPriceState, PythPriceState import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface QueryPythPriceRequest { priceId: string; } @@ -824,9 +823,9 @@ export const QueryPythPriceRequest = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceRequest", value: QueryPythPriceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPythPriceRequest.typeUrl, QueryPythPriceRequest); function createBaseQueryPythPriceResponse(): QueryPythPriceResponse { return { priceState: undefined @@ -894,9 +893,11 @@ export const QueryPythPriceResponse = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceResponse", value: QueryPythPriceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PythPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPythPriceResponse.typeUrl, QueryPythPriceResponse); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -951,9 +952,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.oracle.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -1021,9 +1022,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.oracle.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryBandRelayersRequest(): QueryBandRelayersRequest { return {}; } @@ -1078,9 +1081,9 @@ export const QueryBandRelayersRequest = { typeUrl: "/injective.oracle.v1beta1.QueryBandRelayersRequest", value: QueryBandRelayersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandRelayersRequest.typeUrl, QueryBandRelayersRequest); function createBaseQueryBandRelayersResponse(): QueryBandRelayersResponse { return { relayers: [] @@ -1150,9 +1153,9 @@ export const QueryBandRelayersResponse = { typeUrl: "/injective.oracle.v1beta1.QueryBandRelayersResponse", value: QueryBandRelayersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandRelayersResponse.typeUrl, QueryBandRelayersResponse); function createBaseQueryBandPriceStatesRequest(): QueryBandPriceStatesRequest { return {}; } @@ -1207,9 +1210,9 @@ export const QueryBandPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryBandPriceStatesRequest", value: QueryBandPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandPriceStatesRequest.typeUrl, QueryBandPriceStatesRequest); function createBaseQueryBandPriceStatesResponse(): QueryBandPriceStatesResponse { return { priceStates: [] @@ -1279,9 +1282,11 @@ export const QueryBandPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryBandPriceStatesResponse", value: QueryBandPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BandPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBandPriceStatesResponse.typeUrl, QueryBandPriceStatesResponse); function createBaseQueryBandIBCPriceStatesRequest(): QueryBandIBCPriceStatesRequest { return {}; } @@ -1336,9 +1341,9 @@ export const QueryBandIBCPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryBandIBCPriceStatesRequest", value: QueryBandIBCPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBandIBCPriceStatesRequest.typeUrl, QueryBandIBCPriceStatesRequest); function createBaseQueryBandIBCPriceStatesResponse(): QueryBandIBCPriceStatesResponse { return { priceStates: [] @@ -1408,9 +1413,11 @@ export const QueryBandIBCPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryBandIBCPriceStatesResponse", value: QueryBandIBCPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BandPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBandIBCPriceStatesResponse.typeUrl, QueryBandIBCPriceStatesResponse); function createBaseQueryPriceFeedPriceStatesRequest(): QueryPriceFeedPriceStatesRequest { return {}; } @@ -1465,9 +1472,9 @@ export const QueryPriceFeedPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryPriceFeedPriceStatesRequest", value: QueryPriceFeedPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPriceFeedPriceStatesRequest.typeUrl, QueryPriceFeedPriceStatesRequest); function createBaseQueryPriceFeedPriceStatesResponse(): QueryPriceFeedPriceStatesResponse { return { priceStates: [] @@ -1537,9 +1544,11 @@ export const QueryPriceFeedPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryPriceFeedPriceStatesResponse", value: QueryPriceFeedPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PriceFeedState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPriceFeedPriceStatesResponse.typeUrl, QueryPriceFeedPriceStatesResponse); function createBaseQueryCoinbasePriceStatesRequest(): QueryCoinbasePriceStatesRequest { return {}; } @@ -1594,9 +1603,9 @@ export const QueryCoinbasePriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryCoinbasePriceStatesRequest", value: QueryCoinbasePriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCoinbasePriceStatesRequest.typeUrl, QueryCoinbasePriceStatesRequest); function createBaseQueryCoinbasePriceStatesResponse(): QueryCoinbasePriceStatesResponse { return { priceStates: [] @@ -1666,9 +1675,11 @@ export const QueryCoinbasePriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryCoinbasePriceStatesResponse", value: QueryCoinbasePriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CoinbasePriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCoinbasePriceStatesResponse.typeUrl, QueryCoinbasePriceStatesResponse); function createBaseQueryPythPriceStatesRequest(): QueryPythPriceStatesRequest { return {}; } @@ -1723,9 +1734,9 @@ export const QueryPythPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceStatesRequest", value: QueryPythPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPythPriceStatesRequest.typeUrl, QueryPythPriceStatesRequest); function createBaseQueryPythPriceStatesResponse(): QueryPythPriceStatesResponse { return { priceStates: [] @@ -1795,9 +1806,11 @@ export const QueryPythPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryPythPriceStatesResponse", value: QueryPythPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PythPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPythPriceStatesResponse.typeUrl, QueryPythPriceStatesResponse); function createBaseQueryStorkPriceStatesRequest(): QueryStorkPriceStatesRequest { return {}; } @@ -1852,9 +1865,9 @@ export const QueryStorkPriceStatesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPriceStatesRequest", value: QueryStorkPriceStatesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryStorkPriceStatesRequest.typeUrl, QueryStorkPriceStatesRequest); function createBaseQueryStorkPriceStatesResponse(): QueryStorkPriceStatesResponse { return { priceStates: [] @@ -1924,9 +1937,11 @@ export const QueryStorkPriceStatesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPriceStatesResponse", value: QueryStorkPriceStatesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + StorkPriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryStorkPriceStatesResponse.typeUrl, QueryStorkPriceStatesResponse); function createBaseQueryStorkPublishersRequest(): QueryStorkPublishersRequest { return {}; } @@ -1981,9 +1996,9 @@ export const QueryStorkPublishersRequest = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPublishersRequest", value: QueryStorkPublishersRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryStorkPublishersRequest.typeUrl, QueryStorkPublishersRequest); function createBaseQueryStorkPublishersResponse(): QueryStorkPublishersResponse { return { publishers: [] @@ -2053,9 +2068,9 @@ export const QueryStorkPublishersResponse = { typeUrl: "/injective.oracle.v1beta1.QueryStorkPublishersResponse", value: QueryStorkPublishersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryStorkPublishersResponse.typeUrl, QueryStorkPublishersResponse); function createBaseQueryProviderPriceStateRequest(): QueryProviderPriceStateRequest { return { provider: "", @@ -2135,9 +2150,9 @@ export const QueryProviderPriceStateRequest = { typeUrl: "/injective.oracle.v1beta1.QueryProviderPriceStateRequest", value: QueryProviderPriceStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryProviderPriceStateRequest.typeUrl, QueryProviderPriceStateRequest); function createBaseQueryProviderPriceStateResponse(): QueryProviderPriceStateResponse { return { priceState: undefined @@ -2205,9 +2220,11 @@ export const QueryProviderPriceStateResponse = { typeUrl: "/injective.oracle.v1beta1.QueryProviderPriceStateResponse", value: QueryProviderPriceStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PriceState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProviderPriceStateResponse.typeUrl, QueryProviderPriceStateResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -2262,9 +2279,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.oracle.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -2332,9 +2349,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.oracle.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryHistoricalPriceRecordsRequest(): QueryHistoricalPriceRecordsRequest { return { oracle: 0, @@ -2414,9 +2433,9 @@ export const QueryHistoricalPriceRecordsRequest = { typeUrl: "/injective.oracle.v1beta1.QueryHistoricalPriceRecordsRequest", value: QueryHistoricalPriceRecordsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalPriceRecordsRequest.typeUrl, QueryHistoricalPriceRecordsRequest); function createBaseQueryHistoricalPriceRecordsResponse(): QueryHistoricalPriceRecordsResponse { return { priceRecords: [] @@ -2486,9 +2505,11 @@ export const QueryHistoricalPriceRecordsResponse = { typeUrl: "/injective.oracle.v1beta1.QueryHistoricalPriceRecordsResponse", value: QueryHistoricalPriceRecordsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PriceRecords.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalPriceRecordsResponse.typeUrl, QueryHistoricalPriceRecordsResponse); function createBaseOracleHistoryOptions(): OracleHistoryOptions { return { maxAge: BigInt(0), @@ -2580,9 +2601,9 @@ export const OracleHistoryOptions = { typeUrl: "/injective.oracle.v1beta1.OracleHistoryOptions", value: OracleHistoryOptions.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OracleHistoryOptions.typeUrl, OracleHistoryOptions); function createBaseQueryOracleVolatilityRequest(): QueryOracleVolatilityRequest { return { baseInfo: undefined, @@ -2674,9 +2695,12 @@ export const QueryOracleVolatilityRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOracleVolatilityRequest", value: QueryOracleVolatilityRequest.encode(message).finish() }; + }, + registerTypeUrl() { + OracleInfo.registerTypeUrl(); + OracleHistoryOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleVolatilityRequest.typeUrl, QueryOracleVolatilityRequest); function createBaseQueryOracleVolatilityResponse(): QueryOracleVolatilityResponse { return { volatility: "", @@ -2770,9 +2794,12 @@ export const QueryOracleVolatilityResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOracleVolatilityResponse", value: QueryOracleVolatilityResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MetadataStatistics.registerTypeUrl(); + PriceRecord.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleVolatilityResponse.typeUrl, QueryOracleVolatilityResponse); function createBaseQueryOracleProvidersInfoRequest(): QueryOracleProvidersInfoRequest { return {}; } @@ -2827,9 +2854,9 @@ export const QueryOracleProvidersInfoRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProvidersInfoRequest", value: QueryOracleProvidersInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOracleProvidersInfoRequest.typeUrl, QueryOracleProvidersInfoRequest); function createBaseQueryOracleProvidersInfoResponse(): QueryOracleProvidersInfoResponse { return { providers: [] @@ -2899,9 +2926,11 @@ export const QueryOracleProvidersInfoResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProvidersInfoResponse", value: QueryOracleProvidersInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ProviderInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleProvidersInfoResponse.typeUrl, QueryOracleProvidersInfoResponse); function createBaseQueryOracleProviderPricesRequest(): QueryOracleProviderPricesRequest { return { provider: "" @@ -2969,9 +2998,9 @@ export const QueryOracleProviderPricesRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProviderPricesRequest", value: QueryOracleProviderPricesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOracleProviderPricesRequest.typeUrl, QueryOracleProviderPricesRequest); function createBaseQueryOracleProviderPricesResponse(): QueryOracleProviderPricesResponse { return { providerState: [] @@ -3041,9 +3070,11 @@ export const QueryOracleProviderPricesResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOracleProviderPricesResponse", value: QueryOracleProviderPricesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ProviderState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOracleProviderPricesResponse.typeUrl, QueryOracleProviderPricesResponse); function createBaseScalingOptions(): ScalingOptions { return { baseDecimals: 0, @@ -3123,9 +3154,9 @@ export const ScalingOptions = { typeUrl: "/injective.oracle.v1beta1.ScalingOptions", value: ScalingOptions.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ScalingOptions.typeUrl, ScalingOptions); function createBaseQueryOraclePriceRequest(): QueryOraclePriceRequest { return { oracleType: 0, @@ -3229,9 +3260,11 @@ export const QueryOraclePriceRequest = { typeUrl: "/injective.oracle.v1beta1.QueryOraclePriceRequest", value: QueryOraclePriceRequest.encode(message).finish() }; + }, + registerTypeUrl() { + ScalingOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOraclePriceRequest.typeUrl, QueryOraclePriceRequest); function createBasePricePairState(): PricePairState { return { pairPrice: "", @@ -3371,9 +3404,9 @@ export const PricePairState = { typeUrl: "/injective.oracle.v1beta1.PricePairState", value: PricePairState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PricePairState.typeUrl, PricePairState); function createBaseQueryOraclePriceResponse(): QueryOraclePriceResponse { return { pricePairState: undefined @@ -3441,6 +3474,8 @@ export const QueryOraclePriceResponse = { typeUrl: "/injective.oracle.v1beta1.QueryOraclePriceResponse", value: QueryOraclePriceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PricePairState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryOraclePriceResponse.typeUrl, QueryOraclePriceResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/injective/oracle/v1beta1/tx.rpc.func.ts index 6179a27f..cb368da4 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/tx.rpc.func.ts @@ -5,47 +5,55 @@ export const createRelayProviderPrices = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgRelayProviderPrices.typeUrl, encoders: toEncoders(MsgRelayProviderPrices), - converters: toConverters(MsgRelayProviderPrices) + converters: toConverters(MsgRelayProviderPrices), + deps: [MsgRelayProviderPrices] }); export const createRelayPriceFeedPrice = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRelayPriceFeedPrice.typeUrl, encoders: toEncoders(MsgRelayPriceFeedPrice), - converters: toConverters(MsgRelayPriceFeedPrice) + converters: toConverters(MsgRelayPriceFeedPrice), + deps: [MsgRelayPriceFeedPrice] }); export const createRelayBandRates = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRelayBandRates.typeUrl, encoders: toEncoders(MsgRelayBandRates), - converters: toConverters(MsgRelayBandRates) + converters: toConverters(MsgRelayBandRates), + deps: [MsgRelayBandRates] }); export const createRequestBandIBCRates = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRequestBandIBCRates.typeUrl, encoders: toEncoders(MsgRequestBandIBCRates), - converters: toConverters(MsgRequestBandIBCRates) + converters: toConverters(MsgRequestBandIBCRates), + deps: [MsgRequestBandIBCRates] }); export const createRelayCoinbaseMessages = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRelayCoinbaseMessages.typeUrl, encoders: toEncoders(MsgRelayCoinbaseMessages), - converters: toConverters(MsgRelayCoinbaseMessages) + converters: toConverters(MsgRelayCoinbaseMessages), + deps: [MsgRelayCoinbaseMessages] }); export const createRelayStorkMessage = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRelayStorkPrices.typeUrl, encoders: toEncoders(MsgRelayStorkPrices), - converters: toConverters(MsgRelayStorkPrices) + converters: toConverters(MsgRelayStorkPrices), + deps: [MsgRelayStorkPrices] }); export const createRelayPythPrices = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRelayPythPrices.typeUrl, encoders: toEncoders(MsgRelayPythPrices), - converters: toConverters(MsgRelayPythPrices) + converters: toConverters(MsgRelayPythPrices), + deps: [MsgRelayPythPrices] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/oracle/v1beta1/tx.ts b/libs/injectivejs/src/injective/oracle/v1beta1/tx.ts index d87e3df4..4dc5fc6f 100644 --- a/libs/injectivejs/src/injective/oracle/v1beta1/tx.ts +++ b/libs/injectivejs/src/injective/oracle/v1beta1/tx.ts @@ -1,7 +1,6 @@ import { AssetPair, AssetPairAmino, PriceAttestation, PriceAttestationAmino, Params, ParamsAmino } from "./oracle"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgRelayProviderPrice defines a SDK message for setting a price through the * provider oracle. @@ -400,10 +399,9 @@ export const MsgRelayProviderPrices = { typeUrl: "/injective.oracle.v1beta1.MsgRelayProviderPrices", value: MsgRelayProviderPrices.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayProviderPrices.typeUrl, MsgRelayProviderPrices); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayProviderPrices.aminoType, MsgRelayProviderPrices.typeUrl); function createBaseMsgRelayProviderPricesResponse(): MsgRelayProviderPricesResponse { return {}; } @@ -458,9 +456,9 @@ export const MsgRelayProviderPricesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayProviderPricesResponse", value: MsgRelayProviderPricesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayProviderPricesResponse.typeUrl, MsgRelayProviderPricesResponse); function createBaseMsgRelayPriceFeedPrice(): MsgRelayPriceFeedPrice { return { sender: "", @@ -577,10 +575,9 @@ export const MsgRelayPriceFeedPrice = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPriceFeedPrice", value: MsgRelayPriceFeedPrice.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayPriceFeedPrice.typeUrl, MsgRelayPriceFeedPrice); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayPriceFeedPrice.aminoType, MsgRelayPriceFeedPrice.typeUrl); function createBaseMsgRelayPriceFeedPriceResponse(): MsgRelayPriceFeedPriceResponse { return {}; } @@ -635,9 +632,9 @@ export const MsgRelayPriceFeedPriceResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPriceFeedPriceResponse", value: MsgRelayPriceFeedPriceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayPriceFeedPriceResponse.typeUrl, MsgRelayPriceFeedPriceResponse); function createBaseMsgRelayBandRates(): MsgRelayBandRates { return { relayer: "", @@ -795,10 +792,9 @@ export const MsgRelayBandRates = { typeUrl: "/injective.oracle.v1beta1.MsgRelayBandRates", value: MsgRelayBandRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayBandRates.typeUrl, MsgRelayBandRates); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayBandRates.aminoType, MsgRelayBandRates.typeUrl); function createBaseMsgRelayBandRatesResponse(): MsgRelayBandRatesResponse { return {}; } @@ -853,9 +849,9 @@ export const MsgRelayBandRatesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayBandRatesResponse", value: MsgRelayBandRatesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayBandRatesResponse.typeUrl, MsgRelayBandRatesResponse); function createBaseMsgRelayCoinbaseMessages(): MsgRelayCoinbaseMessages { return { sender: "", @@ -958,10 +954,9 @@ export const MsgRelayCoinbaseMessages = { typeUrl: "/injective.oracle.v1beta1.MsgRelayCoinbaseMessages", value: MsgRelayCoinbaseMessages.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayCoinbaseMessages.typeUrl, MsgRelayCoinbaseMessages); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayCoinbaseMessages.aminoType, MsgRelayCoinbaseMessages.typeUrl); function createBaseMsgRelayCoinbaseMessagesResponse(): MsgRelayCoinbaseMessagesResponse { return {}; } @@ -1016,9 +1011,9 @@ export const MsgRelayCoinbaseMessagesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayCoinbaseMessagesResponse", value: MsgRelayCoinbaseMessagesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayCoinbaseMessagesResponse.typeUrl, MsgRelayCoinbaseMessagesResponse); function createBaseMsgRelayStorkPrices(): MsgRelayStorkPrices { return { sender: "", @@ -1100,9 +1095,11 @@ export const MsgRelayStorkPrices = { typeUrl: "/injective.oracle.v1beta1.MsgRelayStorkPrices", value: MsgRelayStorkPrices.encode(message).finish() }; + }, + registerTypeUrl() { + AssetPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRelayStorkPrices.typeUrl, MsgRelayStorkPrices); function createBaseMsgRelayStorkPricesResponse(): MsgRelayStorkPricesResponse { return {}; } @@ -1157,9 +1154,9 @@ export const MsgRelayStorkPricesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayStorkPricesResponse", value: MsgRelayStorkPricesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayStorkPricesResponse.typeUrl, MsgRelayStorkPricesResponse); function createBaseMsgRequestBandIBCRates(): MsgRequestBandIBCRates { return { sender: "", @@ -1246,10 +1243,9 @@ export const MsgRequestBandIBCRates = { typeUrl: "/injective.oracle.v1beta1.MsgRequestBandIBCRates", value: MsgRequestBandIBCRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBandIBCRates.typeUrl, MsgRequestBandIBCRates); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRequestBandIBCRates.aminoType, MsgRequestBandIBCRates.typeUrl); function createBaseMsgRequestBandIBCRatesResponse(): MsgRequestBandIBCRatesResponse { return {}; } @@ -1304,9 +1300,9 @@ export const MsgRequestBandIBCRatesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRequestBandIBCRatesResponse", value: MsgRequestBandIBCRatesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBandIBCRatesResponse.typeUrl, MsgRequestBandIBCRatesResponse); function createBaseMsgRelayPythPrices(): MsgRelayPythPrices { return { sender: "", @@ -1395,10 +1391,11 @@ export const MsgRelayPythPrices = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPythPrices", value: MsgRelayPythPrices.encode(message).finish() }; + }, + registerTypeUrl() { + PriceAttestation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRelayPythPrices.typeUrl, MsgRelayPythPrices); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRelayPythPrices.aminoType, MsgRelayPythPrices.typeUrl); function createBaseMsgRelayPythPricesResponse(): MsgRelayPythPricesResponse { return {}; } @@ -1453,9 +1450,9 @@ export const MsgRelayPythPricesResponse = { typeUrl: "/injective.oracle.v1beta1.MsgRelayPythPricesResponse", value: MsgRelayPythPricesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRelayPythPricesResponse.typeUrl, MsgRelayPythPricesResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1542,10 +1539,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.oracle.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1600,6 +1598,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.oracle.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/attestation.ts b/libs/injectivejs/src/injective/peggy/v1/attestation.ts index 2b00c1ac..16f0c388 100644 --- a/libs/injectivejs/src/injective/peggy/v1/attestation.ts +++ b/libs/injectivejs/src/injective/peggy/v1/attestation.ts @@ -1,7 +1,6 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * ClaimType is the cosmos type of an event from the counterpart chain that can * be handled @@ -246,9 +245,9 @@ export const Attestation = { typeUrl: "/injective.peggy.v1.Attestation", value: Attestation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Attestation.typeUrl, Attestation); function createBaseERC20Token(): ERC20Token { return { contract: "", @@ -328,6 +327,6 @@ export const ERC20Token = { typeUrl: "/injective.peggy.v1.ERC20Token", value: ERC20Token.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ERC20Token.typeUrl, ERC20Token); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/batch.ts b/libs/injectivejs/src/injective/peggy/v1/batch.ts index c4bc396f..a0ba24c9 100644 --- a/libs/injectivejs/src/injective/peggy/v1/batch.ts +++ b/libs/injectivejs/src/injective/peggy/v1/batch.ts @@ -1,7 +1,6 @@ import { ERC20Token, ERC20TokenAmino } from "./attestation"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** OutgoingTxBatch represents a batch of transactions going from Peggy to ETH */ export interface OutgoingTxBatch { batchNonce: bigint; @@ -167,9 +166,11 @@ export const OutgoingTxBatch = { typeUrl: "/injective.peggy.v1.OutgoingTxBatch", value: OutgoingTxBatch.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTransferTx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OutgoingTxBatch.typeUrl, OutgoingTxBatch); function createBaseOutgoingTransferTx(): OutgoingTransferTx { return { id: BigInt(0), @@ -285,6 +286,8 @@ export const OutgoingTransferTx = { typeUrl: "/injective.peggy.v1.OutgoingTransferTx", value: OutgoingTransferTx.encode(message).finish() }; + }, + registerTypeUrl() { + ERC20Token.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(OutgoingTransferTx.typeUrl, OutgoingTransferTx); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/events.ts b/libs/injectivejs/src/injective/peggy/v1/events.ts index bb0b7095..049b6c57 100644 --- a/libs/injectivejs/src/injective/peggy/v1/events.ts +++ b/libs/injectivejs/src/injective/peggy/v1/events.ts @@ -2,7 +2,6 @@ import { ClaimType } from "./attestation"; import { BridgeValidator, BridgeValidatorAmino } from "./types"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventAttestationObserved { attestationType: ClaimType; bridgeContract: string; @@ -474,9 +473,9 @@ export const EventAttestationObserved = { typeUrl: "/injective.peggy.v1.EventAttestationObserved", value: EventAttestationObserved.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttestationObserved.typeUrl, EventAttestationObserved); function createBaseEventBridgeWithdrawCanceled(): EventBridgeWithdrawCanceled { return { bridgeContract: "", @@ -556,9 +555,9 @@ export const EventBridgeWithdrawCanceled = { typeUrl: "/injective.peggy.v1.EventBridgeWithdrawCanceled", value: EventBridgeWithdrawCanceled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventBridgeWithdrawCanceled.typeUrl, EventBridgeWithdrawCanceled); function createBaseEventOutgoingBatch(): EventOutgoingBatch { return { denom: "", @@ -685,9 +684,9 @@ export const EventOutgoingBatch = { typeUrl: "/injective.peggy.v1.EventOutgoingBatch", value: EventOutgoingBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventOutgoingBatch.typeUrl, EventOutgoingBatch); function createBaseEventOutgoingBatchCanceled(): EventOutgoingBatchCanceled { return { bridgeContract: "", @@ -791,9 +790,9 @@ export const EventOutgoingBatchCanceled = { typeUrl: "/injective.peggy.v1.EventOutgoingBatchCanceled", value: EventOutgoingBatchCanceled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventOutgoingBatchCanceled.typeUrl, EventOutgoingBatchCanceled); function createBaseEventValsetUpdateRequest(): EventValsetUpdateRequest { return { valsetNonce: BigInt(0), @@ -911,9 +910,11 @@ export const EventValsetUpdateRequest = { typeUrl: "/injective.peggy.v1.EventValsetUpdateRequest", value: EventValsetUpdateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventValsetUpdateRequest.typeUrl, EventValsetUpdateRequest); function createBaseEventSetOrchestratorAddresses(): EventSetOrchestratorAddresses { return { validatorAddress: "", @@ -1005,9 +1006,9 @@ export const EventSetOrchestratorAddresses = { typeUrl: "/injective.peggy.v1.EventSetOrchestratorAddresses", value: EventSetOrchestratorAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventSetOrchestratorAddresses.typeUrl, EventSetOrchestratorAddresses); function createBaseEventValsetConfirm(): EventValsetConfirm { return { valsetNonce: BigInt(0), @@ -1087,9 +1088,9 @@ export const EventValsetConfirm = { typeUrl: "/injective.peggy.v1.EventValsetConfirm", value: EventValsetConfirm.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventValsetConfirm.typeUrl, EventValsetConfirm); function createBaseEventSendToEth(): EventSendToEth { return { outgoingTxId: BigInt(0), @@ -1205,9 +1206,9 @@ export const EventSendToEth = { typeUrl: "/injective.peggy.v1.EventSendToEth", value: EventSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventSendToEth.typeUrl, EventSendToEth); function createBaseEventConfirmBatch(): EventConfirmBatch { return { batchNonce: BigInt(0), @@ -1287,9 +1288,9 @@ export const EventConfirmBatch = { typeUrl: "/injective.peggy.v1.EventConfirmBatch", value: EventConfirmBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventConfirmBatch.typeUrl, EventConfirmBatch); function createBaseEventAttestationVote(): EventAttestationVote { return { eventNonce: BigInt(0), @@ -1381,9 +1382,9 @@ export const EventAttestationVote = { typeUrl: "/injective.peggy.v1.EventAttestationVote", value: EventAttestationVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttestationVote.typeUrl, EventAttestationVote); function createBaseEventDepositClaim(): EventDepositClaim { return { eventNonce: BigInt(0), @@ -1547,9 +1548,9 @@ export const EventDepositClaim = { typeUrl: "/injective.peggy.v1.EventDepositClaim", value: EventDepositClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventDepositClaim.typeUrl, EventDepositClaim); function createBaseEventWithdrawClaim(): EventWithdrawClaim { return { eventNonce: BigInt(0), @@ -1677,9 +1678,9 @@ export const EventWithdrawClaim = { typeUrl: "/injective.peggy.v1.EventWithdrawClaim", value: EventWithdrawClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventWithdrawClaim.typeUrl, EventWithdrawClaim); function createBaseEventERC20DeployedClaim(): EventERC20DeployedClaim { return { eventNonce: BigInt(0), @@ -1843,9 +1844,9 @@ export const EventERC20DeployedClaim = { typeUrl: "/injective.peggy.v1.EventERC20DeployedClaim", value: EventERC20DeployedClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventERC20DeployedClaim.typeUrl, EventERC20DeployedClaim); function createBaseEventValsetUpdateClaim(): EventValsetUpdateClaim { return { eventNonce: BigInt(0), @@ -1999,9 +2000,11 @@ export const EventValsetUpdateClaim = { typeUrl: "/injective.peggy.v1.EventValsetUpdateClaim", value: EventValsetUpdateClaim.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventValsetUpdateClaim.typeUrl, EventValsetUpdateClaim); function createBaseEventCancelSendToEth(): EventCancelSendToEth { return { outgoingTxId: BigInt(0) @@ -2069,9 +2072,9 @@ export const EventCancelSendToEth = { typeUrl: "/injective.peggy.v1.EventCancelSendToEth", value: EventCancelSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventCancelSendToEth.typeUrl, EventCancelSendToEth); function createBaseEventSubmitBadSignatureEvidence(): EventSubmitBadSignatureEvidence { return { badEthSignature: "", @@ -2151,9 +2154,9 @@ export const EventSubmitBadSignatureEvidence = { typeUrl: "/injective.peggy.v1.EventSubmitBadSignatureEvidence", value: EventSubmitBadSignatureEvidence.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventSubmitBadSignatureEvidence.typeUrl, EventSubmitBadSignatureEvidence); function createBaseEventValidatorSlash(): EventValidatorSlash { return { power: BigInt(0), @@ -2269,6 +2272,6 @@ export const EventValidatorSlash = { typeUrl: "/injective.peggy.v1.EventValidatorSlash", value: EventValidatorSlash.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EventValidatorSlash.typeUrl, EventValidatorSlash); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/genesis.ts b/libs/injectivejs/src/injective/peggy/v1/genesis.ts index d26c2e15..7d60b442 100644 --- a/libs/injectivejs/src/injective/peggy/v1/genesis.ts +++ b/libs/injectivejs/src/injective/peggy/v1/genesis.ts @@ -5,7 +5,6 @@ import { OutgoingTxBatch, OutgoingTxBatchAmino, OutgoingTransferTx, OutgoingTran import { Attestation, AttestationAmino } from "./attestation"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState struct */ export interface GenesisState { params?: Params; @@ -303,6 +302,16 @@ export const GenesisState = { typeUrl: "/injective.peggy.v1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + Valset.registerTypeUrl(); + MsgValsetConfirm.registerTypeUrl(); + OutgoingTxBatch.registerTypeUrl(); + MsgConfirmBatch.registerTypeUrl(); + Attestation.registerTypeUrl(); + MsgSetOrchestratorAddresses.registerTypeUrl(); + ERC20ToDenom.registerTypeUrl(); + OutgoingTransferTx.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/msgs.rpc.func.ts b/libs/injectivejs/src/injective/peggy/v1/msgs.rpc.func.ts index 24882c49..d5220f90 100644 --- a/libs/injectivejs/src/injective/peggy/v1/msgs.rpc.func.ts +++ b/libs/injectivejs/src/injective/peggy/v1/msgs.rpc.func.ts @@ -5,83 +5,97 @@ export const createValsetConfirm = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgValsetConfirm.typeUrl, encoders: toEncoders(MsgValsetConfirm), - converters: toConverters(MsgValsetConfirm) + converters: toConverters(MsgValsetConfirm), + deps: [MsgValsetConfirm] }); export const createSendToEth = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSendToEth.typeUrl, encoders: toEncoders(MsgSendToEth), - converters: toConverters(MsgSendToEth) + converters: toConverters(MsgSendToEth), + deps: [MsgSendToEth] }); export const createRequestBatch = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRequestBatch.typeUrl, encoders: toEncoders(MsgRequestBatch), - converters: toConverters(MsgRequestBatch) + converters: toConverters(MsgRequestBatch), + deps: [MsgRequestBatch] }); export const createConfirmBatch = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConfirmBatch.typeUrl, encoders: toEncoders(MsgConfirmBatch), - converters: toConverters(MsgConfirmBatch) + converters: toConverters(MsgConfirmBatch), + deps: [MsgConfirmBatch] }); export const createDepositClaim = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDepositClaim.typeUrl, encoders: toEncoders(MsgDepositClaim), - converters: toConverters(MsgDepositClaim) + converters: toConverters(MsgDepositClaim), + deps: [MsgDepositClaim] }); export const createWithdrawClaim = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawClaim.typeUrl, encoders: toEncoders(MsgWithdrawClaim), - converters: toConverters(MsgWithdrawClaim) + converters: toConverters(MsgWithdrawClaim), + deps: [MsgWithdrawClaim] }); export const createValsetUpdateClaim = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgValsetUpdatedClaim.typeUrl, encoders: toEncoders(MsgValsetUpdatedClaim), - converters: toConverters(MsgValsetUpdatedClaim) + converters: toConverters(MsgValsetUpdatedClaim), + deps: [MsgValsetUpdatedClaim] }); export const createERC20DeployedClaim = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgERC20DeployedClaim.typeUrl, encoders: toEncoders(MsgERC20DeployedClaim), - converters: toConverters(MsgERC20DeployedClaim) + converters: toConverters(MsgERC20DeployedClaim), + deps: [MsgERC20DeployedClaim] }); export const createSetOrchestratorAddresses = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSetOrchestratorAddresses.typeUrl, encoders: toEncoders(MsgSetOrchestratorAddresses), - converters: toConverters(MsgSetOrchestratorAddresses) + converters: toConverters(MsgSetOrchestratorAddresses), + deps: [MsgSetOrchestratorAddresses] }); export const createCancelSendToEth = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelSendToEth.typeUrl, encoders: toEncoders(MsgCancelSendToEth), - converters: toConverters(MsgCancelSendToEth) + converters: toConverters(MsgCancelSendToEth), + deps: [MsgCancelSendToEth] }); export const createSubmitBadSignatureEvidence = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitBadSignatureEvidence.typeUrl, encoders: toEncoders(MsgSubmitBadSignatureEvidence), - converters: toConverters(MsgSubmitBadSignatureEvidence) + converters: toConverters(MsgSubmitBadSignatureEvidence), + deps: [MsgSubmitBadSignatureEvidence] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createBlacklistEthereumAddresses = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBlacklistEthereumAddresses.typeUrl, encoders: toEncoders(MsgBlacklistEthereumAddresses), - converters: toConverters(MsgBlacklistEthereumAddresses) + converters: toConverters(MsgBlacklistEthereumAddresses), + deps: [MsgBlacklistEthereumAddresses] }); export const createRevokeEthereumBlacklist = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRevokeEthereumBlacklist.typeUrl, encoders: toEncoders(MsgRevokeEthereumBlacklist), - converters: toConverters(MsgRevokeEthereumBlacklist) + converters: toConverters(MsgRevokeEthereumBlacklist), + deps: [MsgRevokeEthereumBlacklist] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/msgs.ts b/libs/injectivejs/src/injective/peggy/v1/msgs.ts index 32e90531..d4efbcf3 100644 --- a/libs/injectivejs/src/injective/peggy/v1/msgs.ts +++ b/libs/injectivejs/src/injective/peggy/v1/msgs.ts @@ -4,7 +4,6 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino } from "./params"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgSetOrchestratorAddresses * this message allows validators to delegate their voting responsibilities @@ -771,10 +770,9 @@ export const MsgSetOrchestratorAddresses = { typeUrl: "/injective.peggy.v1.MsgSetOrchestratorAddresses", value: MsgSetOrchestratorAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetOrchestratorAddresses.typeUrl, MsgSetOrchestratorAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetOrchestratorAddresses.aminoType, MsgSetOrchestratorAddresses.typeUrl); function createBaseMsgSetOrchestratorAddressesResponse(): MsgSetOrchestratorAddressesResponse { return {}; } @@ -829,9 +827,9 @@ export const MsgSetOrchestratorAddressesResponse = { typeUrl: "/injective.peggy.v1.MsgSetOrchestratorAddressesResponse", value: MsgSetOrchestratorAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetOrchestratorAddressesResponse.typeUrl, MsgSetOrchestratorAddressesResponse); function createBaseMsgValsetConfirm(): MsgValsetConfirm { return { nonce: BigInt(0), @@ -942,10 +940,9 @@ export const MsgValsetConfirm = { typeUrl: "/injective.peggy.v1.MsgValsetConfirm", value: MsgValsetConfirm.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgValsetConfirm.typeUrl, MsgValsetConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgValsetConfirm.aminoType, MsgValsetConfirm.typeUrl); function createBaseMsgValsetConfirmResponse(): MsgValsetConfirmResponse { return {}; } @@ -1000,9 +997,9 @@ export const MsgValsetConfirmResponse = { typeUrl: "/injective.peggy.v1.MsgValsetConfirmResponse", value: MsgValsetConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgValsetConfirmResponse.typeUrl, MsgValsetConfirmResponse); function createBaseMsgSendToEth(): MsgSendToEth { return { sender: "", @@ -1113,10 +1110,11 @@ export const MsgSendToEth = { typeUrl: "/injective.peggy.v1.MsgSendToEth", value: MsgSendToEth.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSendToEth.typeUrl, MsgSendToEth); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSendToEth.aminoType, MsgSendToEth.typeUrl); function createBaseMsgSendToEthResponse(): MsgSendToEthResponse { return {}; } @@ -1171,9 +1169,9 @@ export const MsgSendToEthResponse = { typeUrl: "/injective.peggy.v1.MsgSendToEthResponse", value: MsgSendToEthResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSendToEthResponse.typeUrl, MsgSendToEthResponse); function createBaseMsgRequestBatch(): MsgRequestBatch { return { orchestrator: "", @@ -1260,10 +1258,9 @@ export const MsgRequestBatch = { typeUrl: "/injective.peggy.v1.MsgRequestBatch", value: MsgRequestBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBatch.typeUrl, MsgRequestBatch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRequestBatch.aminoType, MsgRequestBatch.typeUrl); function createBaseMsgRequestBatchResponse(): MsgRequestBatchResponse { return {}; } @@ -1318,9 +1315,9 @@ export const MsgRequestBatchResponse = { typeUrl: "/injective.peggy.v1.MsgRequestBatchResponse", value: MsgRequestBatchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRequestBatchResponse.typeUrl, MsgRequestBatchResponse); function createBaseMsgConfirmBatch(): MsgConfirmBatch { return { nonce: BigInt(0), @@ -1443,10 +1440,9 @@ export const MsgConfirmBatch = { typeUrl: "/injective.peggy.v1.MsgConfirmBatch", value: MsgConfirmBatch.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConfirmBatch.typeUrl, MsgConfirmBatch); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConfirmBatch.aminoType, MsgConfirmBatch.typeUrl); function createBaseMsgConfirmBatchResponse(): MsgConfirmBatchResponse { return {}; } @@ -1501,9 +1497,9 @@ export const MsgConfirmBatchResponse = { typeUrl: "/injective.peggy.v1.MsgConfirmBatchResponse", value: MsgConfirmBatchResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConfirmBatchResponse.typeUrl, MsgConfirmBatchResponse); function createBaseMsgDepositClaim(): MsgDepositClaim { return { eventNonce: BigInt(0), @@ -1662,10 +1658,9 @@ export const MsgDepositClaim = { typeUrl: "/injective.peggy.v1.MsgDepositClaim", value: MsgDepositClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositClaim.typeUrl, MsgDepositClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositClaim.aminoType, MsgDepositClaim.typeUrl); function createBaseMsgDepositClaimResponse(): MsgDepositClaimResponse { return {}; } @@ -1720,9 +1715,9 @@ export const MsgDepositClaimResponse = { typeUrl: "/injective.peggy.v1.MsgDepositClaimResponse", value: MsgDepositClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositClaimResponse.typeUrl, MsgDepositClaimResponse); function createBaseMsgWithdrawClaim(): MsgWithdrawClaim { return { eventNonce: BigInt(0), @@ -1845,10 +1840,9 @@ export const MsgWithdrawClaim = { typeUrl: "/injective.peggy.v1.MsgWithdrawClaim", value: MsgWithdrawClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawClaim.typeUrl, MsgWithdrawClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawClaim.aminoType, MsgWithdrawClaim.typeUrl); function createBaseMsgWithdrawClaimResponse(): MsgWithdrawClaimResponse { return {}; } @@ -1903,9 +1897,9 @@ export const MsgWithdrawClaimResponse = { typeUrl: "/injective.peggy.v1.MsgWithdrawClaimResponse", value: MsgWithdrawClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawClaimResponse.typeUrl, MsgWithdrawClaimResponse); function createBaseMsgERC20DeployedClaim(): MsgERC20DeployedClaim { return { eventNonce: BigInt(0), @@ -2064,10 +2058,9 @@ export const MsgERC20DeployedClaim = { typeUrl: "/injective.peggy.v1.MsgERC20DeployedClaim", value: MsgERC20DeployedClaim.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgERC20DeployedClaim.typeUrl, MsgERC20DeployedClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgERC20DeployedClaim.aminoType, MsgERC20DeployedClaim.typeUrl); function createBaseMsgERC20DeployedClaimResponse(): MsgERC20DeployedClaimResponse { return {}; } @@ -2122,9 +2115,9 @@ export const MsgERC20DeployedClaimResponse = { typeUrl: "/injective.peggy.v1.MsgERC20DeployedClaimResponse", value: MsgERC20DeployedClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgERC20DeployedClaimResponse.typeUrl, MsgERC20DeployedClaimResponse); function createBaseMsgCancelSendToEth(): MsgCancelSendToEth { return { transactionId: BigInt(0), @@ -2211,10 +2204,9 @@ export const MsgCancelSendToEth = { typeUrl: "/injective.peggy.v1.MsgCancelSendToEth", value: MsgCancelSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSendToEth.typeUrl, MsgCancelSendToEth); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelSendToEth.aminoType, MsgCancelSendToEth.typeUrl); function createBaseMsgCancelSendToEthResponse(): MsgCancelSendToEthResponse { return {}; } @@ -2269,9 +2261,9 @@ export const MsgCancelSendToEthResponse = { typeUrl: "/injective.peggy.v1.MsgCancelSendToEthResponse", value: MsgCancelSendToEthResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelSendToEthResponse.typeUrl, MsgCancelSendToEthResponse); function createBaseMsgSubmitBadSignatureEvidence(): MsgSubmitBadSignatureEvidence { return { subject: undefined, @@ -2370,10 +2362,9 @@ export const MsgSubmitBadSignatureEvidence = { typeUrl: "/injective.peggy.v1.MsgSubmitBadSignatureEvidence", value: MsgSubmitBadSignatureEvidence.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitBadSignatureEvidence.typeUrl, MsgSubmitBadSignatureEvidence); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitBadSignatureEvidence.aminoType, MsgSubmitBadSignatureEvidence.typeUrl); function createBaseMsgSubmitBadSignatureEvidenceResponse(): MsgSubmitBadSignatureEvidenceResponse { return {}; } @@ -2428,9 +2419,9 @@ export const MsgSubmitBadSignatureEvidenceResponse = { typeUrl: "/injective.peggy.v1.MsgSubmitBadSignatureEvidenceResponse", value: MsgSubmitBadSignatureEvidenceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitBadSignatureEvidenceResponse.typeUrl, MsgSubmitBadSignatureEvidenceResponse); function createBaseMsgValsetUpdatedClaim(): MsgValsetUpdatedClaim { return { eventNonce: BigInt(0), @@ -2579,10 +2570,11 @@ export const MsgValsetUpdatedClaim = { typeUrl: "/injective.peggy.v1.MsgValsetUpdatedClaim", value: MsgValsetUpdatedClaim.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgValsetUpdatedClaim.typeUrl, MsgValsetUpdatedClaim); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgValsetUpdatedClaim.aminoType, MsgValsetUpdatedClaim.typeUrl); function createBaseMsgValsetUpdatedClaimResponse(): MsgValsetUpdatedClaimResponse { return {}; } @@ -2637,9 +2629,9 @@ export const MsgValsetUpdatedClaimResponse = { typeUrl: "/injective.peggy.v1.MsgValsetUpdatedClaimResponse", value: MsgValsetUpdatedClaimResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgValsetUpdatedClaimResponse.typeUrl, MsgValsetUpdatedClaimResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2726,10 +2718,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.peggy.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2784,9 +2777,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.peggy.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgBlacklistEthereumAddresses(): MsgBlacklistEthereumAddresses { return { signer: "", @@ -2875,10 +2868,9 @@ export const MsgBlacklistEthereumAddresses = { typeUrl: "/injective.peggy.v1.MsgBlacklistEthereumAddresses", value: MsgBlacklistEthereumAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBlacklistEthereumAddresses.typeUrl, MsgBlacklistEthereumAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBlacklistEthereumAddresses.aminoType, MsgBlacklistEthereumAddresses.typeUrl); function createBaseMsgBlacklistEthereumAddressesResponse(): MsgBlacklistEthereumAddressesResponse { return {}; } @@ -2933,9 +2925,9 @@ export const MsgBlacklistEthereumAddressesResponse = { typeUrl: "/injective.peggy.v1.MsgBlacklistEthereumAddressesResponse", value: MsgBlacklistEthereumAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBlacklistEthereumAddressesResponse.typeUrl, MsgBlacklistEthereumAddressesResponse); function createBaseMsgRevokeEthereumBlacklist(): MsgRevokeEthereumBlacklist { return { signer: "", @@ -3024,10 +3016,9 @@ export const MsgRevokeEthereumBlacklist = { typeUrl: "/injective.peggy.v1.MsgRevokeEthereumBlacklist", value: MsgRevokeEthereumBlacklist.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeEthereumBlacklist.typeUrl, MsgRevokeEthereumBlacklist); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeEthereumBlacklist.aminoType, MsgRevokeEthereumBlacklist.typeUrl); function createBaseMsgRevokeEthereumBlacklistResponse(): MsgRevokeEthereumBlacklistResponse { return {}; } @@ -3082,6 +3073,6 @@ export const MsgRevokeEthereumBlacklistResponse = { typeUrl: "/injective.peggy.v1.MsgRevokeEthereumBlacklistResponse", value: MsgRevokeEthereumBlacklistResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRevokeEthereumBlacklistResponse.typeUrl, MsgRevokeEthereumBlacklistResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/params.ts b/libs/injectivejs/src/injective/peggy/v1/params.ts index 8925790d..b329604b 100644 --- a/libs/injectivejs/src/injective/peggy/v1/params.ts +++ b/libs/injectivejs/src/injective/peggy/v1/params.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { peggyId: string; contractSourceHash: string; @@ -386,7 +385,8 @@ export const Params = { typeUrl: "/injective.peggy.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/pool.ts b/libs/injectivejs/src/injective/peggy/v1/pool.ts index 3b46adc4..59a59d58 100644 --- a/libs/injectivejs/src/injective/peggy/v1/pool.ts +++ b/libs/injectivejs/src/injective/peggy/v1/pool.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** IDSet represents a set of IDs */ export interface IDSet { ids: bigint[]; @@ -111,9 +110,9 @@ export const IDSet = { typeUrl: "/injective.peggy.v1.IDSet", value: IDSet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IDSet.typeUrl, IDSet); function createBaseBatchFees(): BatchFees { return { token: "", @@ -193,6 +192,6 @@ export const BatchFees = { typeUrl: "/injective.peggy.v1.BatchFees", value: BatchFees.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(BatchFees.typeUrl, BatchFees); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/proposal.ts b/libs/injectivejs/src/injective/peggy/v1/proposal.ts index cf60d937..1368cbdb 100644 --- a/libs/injectivejs/src/injective/peggy/v1/proposal.ts +++ b/libs/injectivejs/src/injective/peggy/v1/proposal.ts @@ -130,9 +130,11 @@ export const BlacklistEthereumAddressesProposal = { typeUrl: "/injective.peggy.v1.BlacklistEthereumAddressesProposal", value: BlacklistEthereumAddressesProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BlacklistEthereumAddressesProposal.typeUrl, BlacklistEthereumAddressesProposal); } }; -GlobalDecoderRegistry.register(BlacklistEthereumAddressesProposal.typeUrl, BlacklistEthereumAddressesProposal); function createBaseRevokeEthereumBlacklistProposal(): RevokeEthereumBlacklistProposal { return { title: "", @@ -226,6 +228,8 @@ export const RevokeEthereumBlacklistProposal = { typeUrl: "/injective.peggy.v1.RevokeEthereumBlacklistProposal", value: RevokeEthereumBlacklistProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(RevokeEthereumBlacklistProposal.typeUrl, RevokeEthereumBlacklistProposal); } -}; -GlobalDecoderRegistry.register(RevokeEthereumBlacklistProposal.typeUrl, RevokeEthereumBlacklistProposal); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/query.rpc.func.ts b/libs/injectivejs/src/injective/peggy/v1/query.rpc.func.ts index 962ccf47..2915d012 100644 --- a/libs/injectivejs/src/injective/peggy/v1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/peggy/v1/query.rpc.func.ts @@ -5,145 +5,166 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryCurrentValsetRequest.encode, decode: QueryCurrentValsetResponse.decode, service: "injective.peggy.v1.Query", method: "CurrentValset", - clientResolver + clientResolver, + deps: [QueryCurrentValsetRequest, QueryCurrentValsetResponse] }); export const createGetValsetRequest = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValsetRequestRequest.encode, decode: QueryValsetRequestResponse.decode, service: "injective.peggy.v1.Query", method: "ValsetRequest", - clientResolver + clientResolver, + deps: [QueryValsetRequestRequest, QueryValsetRequestResponse] }); export const createGetValsetConfirm = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValsetConfirmRequest.encode, decode: QueryValsetConfirmResponse.decode, service: "injective.peggy.v1.Query", method: "ValsetConfirm", - clientResolver + clientResolver, + deps: [QueryValsetConfirmRequest, QueryValsetConfirmResponse] }); export const createGetValsetConfirmsByNonce = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValsetConfirmsByNonceRequest.encode, decode: QueryValsetConfirmsByNonceResponse.decode, service: "injective.peggy.v1.Query", method: "ValsetConfirmsByNonce", - clientResolver + clientResolver, + deps: [QueryValsetConfirmsByNonceRequest, QueryValsetConfirmsByNonceResponse] }); export const createGetLastValsetRequests = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryLastValsetRequestsRequest.encode, decode: QueryLastValsetRequestsResponse.decode, service: "injective.peggy.v1.Query", method: "LastValsetRequests", - clientResolver + clientResolver, + deps: [QueryLastValsetRequestsRequest, QueryLastValsetRequestsResponse] }); export const createGetLastPendingValsetRequestByAddr = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryLastPendingValsetRequestByAddrRequest.encode, decode: QueryLastPendingValsetRequestByAddrResponse.decode, service: "injective.peggy.v1.Query", method: "LastPendingValsetRequestByAddr", - clientResolver + clientResolver, + deps: [QueryLastPendingValsetRequestByAddrRequest, QueryLastPendingValsetRequestByAddrResponse] }); export const createGetLastEventByAddr = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryLastEventByAddrRequest.encode, decode: QueryLastEventByAddrResponse.decode, service: "injective.peggy.v1.Query", method: "LastEventByAddr", - clientResolver + clientResolver, + deps: [QueryLastEventByAddrRequest, QueryLastEventByAddrResponse] }); export const createGetGetPendingSendToEth = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPendingSendToEth.encode, decode: QueryPendingSendToEthResponse.decode, service: "injective.peggy.v1.Query", method: "GetPendingSendToEth", - clientResolver + clientResolver, + deps: [QueryPendingSendToEth, QueryPendingSendToEthResponse] }); export const createGetBatchFees = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBatchFeeRequest.encode, decode: QueryBatchFeeResponse.decode, service: "injective.peggy.v1.Query", method: "BatchFees", - clientResolver + clientResolver, + deps: [QueryBatchFeeRequest, QueryBatchFeeResponse] }); export const createGetOutgoingTxBatches = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryOutgoingTxBatchesRequest.encode, decode: QueryOutgoingTxBatchesResponse.decode, service: "injective.peggy.v1.Query", method: "OutgoingTxBatches", - clientResolver + clientResolver, + deps: [QueryOutgoingTxBatchesRequest, QueryOutgoingTxBatchesResponse] }); export const createGetLastPendingBatchRequestByAddr = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryLastPendingBatchRequestByAddrRequest.encode, decode: QueryLastPendingBatchRequestByAddrResponse.decode, service: "injective.peggy.v1.Query", method: "LastPendingBatchRequestByAddr", - clientResolver + clientResolver, + deps: [QueryLastPendingBatchRequestByAddrRequest, QueryLastPendingBatchRequestByAddrResponse] }); export const createGetBatchRequestByNonce = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBatchRequestByNonceRequest.encode, decode: QueryBatchRequestByNonceResponse.decode, service: "injective.peggy.v1.Query", method: "BatchRequestByNonce", - clientResolver + clientResolver, + deps: [QueryBatchRequestByNonceRequest, QueryBatchRequestByNonceResponse] }); export const createGetBatchConfirms = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBatchConfirmsRequest.encode, decode: QueryBatchConfirmsResponse.decode, service: "injective.peggy.v1.Query", method: "BatchConfirms", - clientResolver + clientResolver, + deps: [QueryBatchConfirmsRequest, QueryBatchConfirmsResponse] }); export const createGetERC20ToDenom = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryERC20ToDenomRequest.encode, decode: QueryERC20ToDenomResponse.decode, service: "injective.peggy.v1.Query", method: "ERC20ToDenom", - clientResolver + clientResolver, + deps: [QueryERC20ToDenomRequest, QueryERC20ToDenomResponse] }); export const createGetDenomToERC20 = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomToERC20Request.encode, decode: QueryDenomToERC20Response.decode, service: "injective.peggy.v1.Query", method: "DenomToERC20", - clientResolver + clientResolver, + deps: [QueryDenomToERC20Request, QueryDenomToERC20Response] }); export const createGetGetDelegateKeyByValidator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegateKeysByValidatorAddress.encode, decode: QueryDelegateKeysByValidatorAddressResponse.decode, service: "injective.peggy.v1.Query", method: "GetDelegateKeyByValidator", - clientResolver + clientResolver, + deps: [QueryDelegateKeysByValidatorAddress, QueryDelegateKeysByValidatorAddressResponse] }); export const createGetGetDelegateKeyByEth = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegateKeysByEthAddress.encode, decode: QueryDelegateKeysByEthAddressResponse.decode, service: "injective.peggy.v1.Query", method: "GetDelegateKeyByEth", - clientResolver + clientResolver, + deps: [QueryDelegateKeysByEthAddress, QueryDelegateKeysByEthAddressResponse] }); export const createGetGetDelegateKeyByOrchestrator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegateKeysByOrchestratorAddress.encode, decode: QueryDelegateKeysByOrchestratorAddressResponse.decode, service: "injective.peggy.v1.Query", method: "GetDelegateKeyByOrchestrator", - clientResolver + clientResolver, + deps: [QueryDelegateKeysByOrchestratorAddress, QueryDelegateKeysByOrchestratorAddressResponse] }); export const createGetPeggyModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.peggy.v1.Query", method: "PeggyModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); export const createGetMissingPeggoNonces = (clientResolver?: RpcResolver) => buildQuery({ encode: MissingNoncesRequest.encode, decode: MissingNoncesResponse.decode, service: "injective.peggy.v1.Query", method: "MissingPeggoNonces", - clientResolver + clientResolver, + deps: [MissingNoncesRequest, MissingNoncesResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/query.ts b/libs/injectivejs/src/injective/peggy/v1/query.ts index f325d5d4..763baece 100644 --- a/libs/injectivejs/src/injective/peggy/v1/query.ts +++ b/libs/injectivejs/src/injective/peggy/v1/query.ts @@ -6,7 +6,6 @@ import { OutgoingTxBatch, OutgoingTxBatchAmino, OutgoingTransferTx, OutgoingTran import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { typeUrl: "/injective.peggy.v1.QueryParamsRequest"; @@ -655,9 +654,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.peggy.v1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -725,9 +724,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.peggy.v1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryCurrentValsetRequest(): QueryCurrentValsetRequest { return {}; } @@ -782,9 +783,9 @@ export const QueryCurrentValsetRequest = { typeUrl: "/injective.peggy.v1.QueryCurrentValsetRequest", value: QueryCurrentValsetRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCurrentValsetRequest.typeUrl, QueryCurrentValsetRequest); function createBaseQueryCurrentValsetResponse(): QueryCurrentValsetResponse { return { valset: undefined @@ -852,9 +853,11 @@ export const QueryCurrentValsetResponse = { typeUrl: "/injective.peggy.v1.QueryCurrentValsetResponse", value: QueryCurrentValsetResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCurrentValsetResponse.typeUrl, QueryCurrentValsetResponse); function createBaseQueryValsetRequestRequest(): QueryValsetRequestRequest { return { nonce: BigInt(0) @@ -922,9 +925,9 @@ export const QueryValsetRequestRequest = { typeUrl: "/injective.peggy.v1.QueryValsetRequestRequest", value: QueryValsetRequestRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValsetRequestRequest.typeUrl, QueryValsetRequestRequest); function createBaseQueryValsetRequestResponse(): QueryValsetRequestResponse { return { valset: undefined @@ -992,9 +995,11 @@ export const QueryValsetRequestResponse = { typeUrl: "/injective.peggy.v1.QueryValsetRequestResponse", value: QueryValsetRequestResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValsetRequestResponse.typeUrl, QueryValsetRequestResponse); function createBaseQueryValsetConfirmRequest(): QueryValsetConfirmRequest { return { nonce: BigInt(0), @@ -1074,9 +1079,9 @@ export const QueryValsetConfirmRequest = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmRequest", value: QueryValsetConfirmRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValsetConfirmRequest.typeUrl, QueryValsetConfirmRequest); function createBaseQueryValsetConfirmResponse(): QueryValsetConfirmResponse { return { confirm: undefined @@ -1144,9 +1149,11 @@ export const QueryValsetConfirmResponse = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmResponse", value: QueryValsetConfirmResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MsgValsetConfirm.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValsetConfirmResponse.typeUrl, QueryValsetConfirmResponse); function createBaseQueryValsetConfirmsByNonceRequest(): QueryValsetConfirmsByNonceRequest { return { nonce: BigInt(0) @@ -1214,9 +1221,9 @@ export const QueryValsetConfirmsByNonceRequest = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmsByNonceRequest", value: QueryValsetConfirmsByNonceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValsetConfirmsByNonceRequest.typeUrl, QueryValsetConfirmsByNonceRequest); function createBaseQueryValsetConfirmsByNonceResponse(): QueryValsetConfirmsByNonceResponse { return { confirms: [] @@ -1286,9 +1293,11 @@ export const QueryValsetConfirmsByNonceResponse = { typeUrl: "/injective.peggy.v1.QueryValsetConfirmsByNonceResponse", value: QueryValsetConfirmsByNonceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MsgValsetConfirm.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValsetConfirmsByNonceResponse.typeUrl, QueryValsetConfirmsByNonceResponse); function createBaseQueryLastValsetRequestsRequest(): QueryLastValsetRequestsRequest { return {}; } @@ -1343,9 +1352,9 @@ export const QueryLastValsetRequestsRequest = { typeUrl: "/injective.peggy.v1.QueryLastValsetRequestsRequest", value: QueryLastValsetRequestsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastValsetRequestsRequest.typeUrl, QueryLastValsetRequestsRequest); function createBaseQueryLastValsetRequestsResponse(): QueryLastValsetRequestsResponse { return { valsets: [] @@ -1415,9 +1424,11 @@ export const QueryLastValsetRequestsResponse = { typeUrl: "/injective.peggy.v1.QueryLastValsetRequestsResponse", value: QueryLastValsetRequestsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastValsetRequestsResponse.typeUrl, QueryLastValsetRequestsResponse); function createBaseQueryLastPendingValsetRequestByAddrRequest(): QueryLastPendingValsetRequestByAddrRequest { return { address: "" @@ -1485,9 +1496,9 @@ export const QueryLastPendingValsetRequestByAddrRequest = { typeUrl: "/injective.peggy.v1.QueryLastPendingValsetRequestByAddrRequest", value: QueryLastPendingValsetRequestByAddrRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastPendingValsetRequestByAddrRequest.typeUrl, QueryLastPendingValsetRequestByAddrRequest); function createBaseQueryLastPendingValsetRequestByAddrResponse(): QueryLastPendingValsetRequestByAddrResponse { return { valsets: [] @@ -1557,9 +1568,11 @@ export const QueryLastPendingValsetRequestByAddrResponse = { typeUrl: "/injective.peggy.v1.QueryLastPendingValsetRequestByAddrResponse", value: QueryLastPendingValsetRequestByAddrResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Valset.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastPendingValsetRequestByAddrResponse.typeUrl, QueryLastPendingValsetRequestByAddrResponse); function createBaseQueryBatchFeeRequest(): QueryBatchFeeRequest { return {}; } @@ -1614,9 +1627,9 @@ export const QueryBatchFeeRequest = { typeUrl: "/injective.peggy.v1.QueryBatchFeeRequest", value: QueryBatchFeeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBatchFeeRequest.typeUrl, QueryBatchFeeRequest); function createBaseQueryBatchFeeResponse(): QueryBatchFeeResponse { return { batchFees: [] @@ -1686,9 +1699,11 @@ export const QueryBatchFeeResponse = { typeUrl: "/injective.peggy.v1.QueryBatchFeeResponse", value: QueryBatchFeeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BatchFees.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBatchFeeResponse.typeUrl, QueryBatchFeeResponse); function createBaseQueryLastPendingBatchRequestByAddrRequest(): QueryLastPendingBatchRequestByAddrRequest { return { address: "" @@ -1756,9 +1771,9 @@ export const QueryLastPendingBatchRequestByAddrRequest = { typeUrl: "/injective.peggy.v1.QueryLastPendingBatchRequestByAddrRequest", value: QueryLastPendingBatchRequestByAddrRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastPendingBatchRequestByAddrRequest.typeUrl, QueryLastPendingBatchRequestByAddrRequest); function createBaseQueryLastPendingBatchRequestByAddrResponse(): QueryLastPendingBatchRequestByAddrResponse { return { batch: undefined @@ -1826,9 +1841,11 @@ export const QueryLastPendingBatchRequestByAddrResponse = { typeUrl: "/injective.peggy.v1.QueryLastPendingBatchRequestByAddrResponse", value: QueryLastPendingBatchRequestByAddrResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTxBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastPendingBatchRequestByAddrResponse.typeUrl, QueryLastPendingBatchRequestByAddrResponse); function createBaseQueryOutgoingTxBatchesRequest(): QueryOutgoingTxBatchesRequest { return {}; } @@ -1883,9 +1900,9 @@ export const QueryOutgoingTxBatchesRequest = { typeUrl: "/injective.peggy.v1.QueryOutgoingTxBatchesRequest", value: QueryOutgoingTxBatchesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryOutgoingTxBatchesRequest.typeUrl, QueryOutgoingTxBatchesRequest); function createBaseQueryOutgoingTxBatchesResponse(): QueryOutgoingTxBatchesResponse { return { batches: [] @@ -1955,9 +1972,11 @@ export const QueryOutgoingTxBatchesResponse = { typeUrl: "/injective.peggy.v1.QueryOutgoingTxBatchesResponse", value: QueryOutgoingTxBatchesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTxBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryOutgoingTxBatchesResponse.typeUrl, QueryOutgoingTxBatchesResponse); function createBaseQueryBatchRequestByNonceRequest(): QueryBatchRequestByNonceRequest { return { nonce: BigInt(0), @@ -2037,9 +2056,9 @@ export const QueryBatchRequestByNonceRequest = { typeUrl: "/injective.peggy.v1.QueryBatchRequestByNonceRequest", value: QueryBatchRequestByNonceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBatchRequestByNonceRequest.typeUrl, QueryBatchRequestByNonceRequest); function createBaseQueryBatchRequestByNonceResponse(): QueryBatchRequestByNonceResponse { return { batch: undefined @@ -2107,9 +2126,11 @@ export const QueryBatchRequestByNonceResponse = { typeUrl: "/injective.peggy.v1.QueryBatchRequestByNonceResponse", value: QueryBatchRequestByNonceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTxBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBatchRequestByNonceResponse.typeUrl, QueryBatchRequestByNonceResponse); function createBaseQueryBatchConfirmsRequest(): QueryBatchConfirmsRequest { return { nonce: BigInt(0), @@ -2189,9 +2210,9 @@ export const QueryBatchConfirmsRequest = { typeUrl: "/injective.peggy.v1.QueryBatchConfirmsRequest", value: QueryBatchConfirmsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBatchConfirmsRequest.typeUrl, QueryBatchConfirmsRequest); function createBaseQueryBatchConfirmsResponse(): QueryBatchConfirmsResponse { return { confirms: [] @@ -2261,9 +2282,11 @@ export const QueryBatchConfirmsResponse = { typeUrl: "/injective.peggy.v1.QueryBatchConfirmsResponse", value: QueryBatchConfirmsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + MsgConfirmBatch.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBatchConfirmsResponse.typeUrl, QueryBatchConfirmsResponse); function createBaseQueryLastEventByAddrRequest(): QueryLastEventByAddrRequest { return { address: "" @@ -2331,9 +2354,9 @@ export const QueryLastEventByAddrRequest = { typeUrl: "/injective.peggy.v1.QueryLastEventByAddrRequest", value: QueryLastEventByAddrRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryLastEventByAddrRequest.typeUrl, QueryLastEventByAddrRequest); function createBaseQueryLastEventByAddrResponse(): QueryLastEventByAddrResponse { return { lastClaimEvent: undefined @@ -2401,9 +2424,11 @@ export const QueryLastEventByAddrResponse = { typeUrl: "/injective.peggy.v1.QueryLastEventByAddrResponse", value: QueryLastEventByAddrResponse.encode(message).finish() }; + }, + registerTypeUrl() { + LastClaimEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryLastEventByAddrResponse.typeUrl, QueryLastEventByAddrResponse); function createBaseQueryERC20ToDenomRequest(): QueryERC20ToDenomRequest { return { erc20: "" @@ -2471,9 +2496,9 @@ export const QueryERC20ToDenomRequest = { typeUrl: "/injective.peggy.v1.QueryERC20ToDenomRequest", value: QueryERC20ToDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryERC20ToDenomRequest.typeUrl, QueryERC20ToDenomRequest); function createBaseQueryERC20ToDenomResponse(): QueryERC20ToDenomResponse { return { denom: "", @@ -2553,9 +2578,9 @@ export const QueryERC20ToDenomResponse = { typeUrl: "/injective.peggy.v1.QueryERC20ToDenomResponse", value: QueryERC20ToDenomResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryERC20ToDenomResponse.typeUrl, QueryERC20ToDenomResponse); function createBaseQueryDenomToERC20Request(): QueryDenomToERC20Request { return { denom: "" @@ -2623,9 +2648,9 @@ export const QueryDenomToERC20Request = { typeUrl: "/injective.peggy.v1.QueryDenomToERC20Request", value: QueryDenomToERC20Request.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomToERC20Request.typeUrl, QueryDenomToERC20Request); function createBaseQueryDenomToERC20Response(): QueryDenomToERC20Response { return { erc20: "", @@ -2705,9 +2730,9 @@ export const QueryDenomToERC20Response = { typeUrl: "/injective.peggy.v1.QueryDenomToERC20Response", value: QueryDenomToERC20Response.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomToERC20Response.typeUrl, QueryDenomToERC20Response); function createBaseQueryDelegateKeysByValidatorAddress(): QueryDelegateKeysByValidatorAddress { return { validatorAddress: "" @@ -2775,9 +2800,9 @@ export const QueryDelegateKeysByValidatorAddress = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByValidatorAddress", value: QueryDelegateKeysByValidatorAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByValidatorAddress.typeUrl, QueryDelegateKeysByValidatorAddress); function createBaseQueryDelegateKeysByValidatorAddressResponse(): QueryDelegateKeysByValidatorAddressResponse { return { ethAddress: "", @@ -2857,9 +2882,9 @@ export const QueryDelegateKeysByValidatorAddressResponse = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByValidatorAddressResponse", value: QueryDelegateKeysByValidatorAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByValidatorAddressResponse.typeUrl, QueryDelegateKeysByValidatorAddressResponse); function createBaseQueryDelegateKeysByEthAddress(): QueryDelegateKeysByEthAddress { return { ethAddress: "" @@ -2927,9 +2952,9 @@ export const QueryDelegateKeysByEthAddress = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByEthAddress", value: QueryDelegateKeysByEthAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByEthAddress.typeUrl, QueryDelegateKeysByEthAddress); function createBaseQueryDelegateKeysByEthAddressResponse(): QueryDelegateKeysByEthAddressResponse { return { validatorAddress: "", @@ -3009,9 +3034,9 @@ export const QueryDelegateKeysByEthAddressResponse = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByEthAddressResponse", value: QueryDelegateKeysByEthAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByEthAddressResponse.typeUrl, QueryDelegateKeysByEthAddressResponse); function createBaseQueryDelegateKeysByOrchestratorAddress(): QueryDelegateKeysByOrchestratorAddress { return { orchestratorAddress: "" @@ -3079,9 +3104,9 @@ export const QueryDelegateKeysByOrchestratorAddress = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByOrchestratorAddress", value: QueryDelegateKeysByOrchestratorAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByOrchestratorAddress.typeUrl, QueryDelegateKeysByOrchestratorAddress); function createBaseQueryDelegateKeysByOrchestratorAddressResponse(): QueryDelegateKeysByOrchestratorAddressResponse { return { validatorAddress: "", @@ -3161,9 +3186,9 @@ export const QueryDelegateKeysByOrchestratorAddressResponse = { typeUrl: "/injective.peggy.v1.QueryDelegateKeysByOrchestratorAddressResponse", value: QueryDelegateKeysByOrchestratorAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegateKeysByOrchestratorAddressResponse.typeUrl, QueryDelegateKeysByOrchestratorAddressResponse); function createBaseQueryPendingSendToEth(): QueryPendingSendToEth { return { senderAddress: "" @@ -3231,9 +3256,9 @@ export const QueryPendingSendToEth = { typeUrl: "/injective.peggy.v1.QueryPendingSendToEth", value: QueryPendingSendToEth.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPendingSendToEth.typeUrl, QueryPendingSendToEth); function createBaseQueryPendingSendToEthResponse(): QueryPendingSendToEthResponse { return { transfersInBatches: [], @@ -3317,9 +3342,11 @@ export const QueryPendingSendToEthResponse = { typeUrl: "/injective.peggy.v1.QueryPendingSendToEthResponse", value: QueryPendingSendToEthResponse.encode(message).finish() }; + }, + registerTypeUrl() { + OutgoingTransferTx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPendingSendToEthResponse.typeUrl, QueryPendingSendToEthResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -3374,9 +3401,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.peggy.v1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -3444,9 +3471,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.peggy.v1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseMissingNoncesRequest(): MissingNoncesRequest { return {}; } @@ -3501,9 +3530,9 @@ export const MissingNoncesRequest = { typeUrl: "/injective.peggy.v1.MissingNoncesRequest", value: MissingNoncesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MissingNoncesRequest.typeUrl, MissingNoncesRequest); function createBaseMissingNoncesResponse(): MissingNoncesResponse { return { operatorAddresses: [] @@ -3573,6 +3602,6 @@ export const MissingNoncesResponse = { typeUrl: "/injective.peggy.v1.MissingNoncesResponse", value: MissingNoncesResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MissingNoncesResponse.typeUrl, MissingNoncesResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/peggy/v1/types.ts b/libs/injectivejs/src/injective/peggy/v1/types.ts index 37fbe06a..b3d27b6c 100644 --- a/libs/injectivejs/src/injective/peggy/v1/types.ts +++ b/libs/injectivejs/src/injective/peggy/v1/types.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** BridgeValidator represents a validator's ETH address and its power */ export interface BridgeValidator { power: bigint; @@ -204,9 +203,9 @@ export const BridgeValidator = { typeUrl: "/injective.peggy.v1.BridgeValidator", value: BridgeValidator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BridgeValidator.typeUrl, BridgeValidator); function createBaseValset(): Valset { return { nonce: BigInt(0), @@ -324,9 +323,11 @@ export const Valset = { typeUrl: "/injective.peggy.v1.Valset", value: Valset.encode(message).finish() }; + }, + registerTypeUrl() { + BridgeValidator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Valset.typeUrl, Valset); function createBaseLastObservedEthereumBlockHeight(): LastObservedEthereumBlockHeight { return { cosmosBlockHeight: BigInt(0), @@ -406,9 +407,9 @@ export const LastObservedEthereumBlockHeight = { typeUrl: "/injective.peggy.v1.LastObservedEthereumBlockHeight", value: LastObservedEthereumBlockHeight.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LastObservedEthereumBlockHeight.typeUrl, LastObservedEthereumBlockHeight); function createBaseLastClaimEvent(): LastClaimEvent { return { ethereumEventNonce: BigInt(0), @@ -488,9 +489,9 @@ export const LastClaimEvent = { typeUrl: "/injective.peggy.v1.LastClaimEvent", value: LastClaimEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LastClaimEvent.typeUrl, LastClaimEvent); function createBaseERC20ToDenom(): ERC20ToDenom { return { erc20: "", @@ -570,6 +571,6 @@ export const ERC20ToDenom = { typeUrl: "/injective.peggy.v1.ERC20ToDenom", value: ERC20ToDenom.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ERC20ToDenom.typeUrl, ERC20ToDenom); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/events.ts b/libs/injectivejs/src/injective/permissions/v1beta1/events.ts index 0b4fbba0..3f249c24 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/events.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/events.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventSetVoucher { addr: string; voucher: Coin; @@ -97,6 +96,8 @@ export const EventSetVoucher = { typeUrl: "/injective.permissions.v1beta1.EventSetVoucher", value: EventSetVoucher.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventSetVoucher.typeUrl, EventSetVoucher); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/genesis.ts b/libs/injectivejs/src/injective/permissions/v1beta1/genesis.ts index 3920fd81..5961dd5c 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/genesis.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/genesis.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "./params"; import { Namespace, NamespaceAmino } from "./permissions"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the permissions module's genesis state. */ export interface GenesisState { /** params defines the parameters of the module. */ @@ -104,6 +103,9 @@ export const GenesisState = { typeUrl: "/injective.permissions.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + Namespace.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/params.ts b/libs/injectivejs/src/injective/permissions/v1beta1/params.ts index 24aa6bb5..2af60295 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/params.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/params.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Params defines the parameters for the permissions module. */ export interface Params { wasmHookQueryMaxGas: bigint; @@ -91,7 +90,6 @@ export const Params = { typeUrl: "/injective.permissions.v1beta1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/permissions.ts b/libs/injectivejs/src/injective/permissions/v1beta1/permissions.ts index 6cd42f27..4b5c411b 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/permissions.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/permissions.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** each Action enum value should be a power of two */ export enum Action { UNSPECIFIED = 0, @@ -303,9 +302,12 @@ export const Namespace = { typeUrl: "/injective.permissions.v1beta1.Namespace", value: Namespace.encode(message).finish() }; + }, + registerTypeUrl() { + Role.registerTypeUrl(); + AddressRoles.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Namespace.typeUrl, Namespace); function createBaseAddressRoles(): AddressRoles { return { address: "", @@ -387,9 +389,9 @@ export const AddressRoles = { typeUrl: "/injective.permissions.v1beta1.AddressRoles", value: AddressRoles.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressRoles.typeUrl, AddressRoles); function createBaseRole(): Role { return { role: "", @@ -469,9 +471,9 @@ export const Role = { typeUrl: "/injective.permissions.v1beta1.Role", value: Role.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Role.typeUrl, Role); function createBaseRoleIDs(): RoleIDs { return { roleIds: [] @@ -550,9 +552,9 @@ export const RoleIDs = { typeUrl: "/injective.permissions.v1beta1.RoleIDs", value: RoleIDs.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RoleIDs.typeUrl, RoleIDs); function createBaseVoucher(): Voucher { return { coins: [] @@ -622,9 +624,11 @@ export const Voucher = { typeUrl: "/injective.permissions.v1beta1.Voucher", value: Voucher.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Voucher.typeUrl, Voucher); function createBaseAddressVoucher(): AddressVoucher { return { address: "", @@ -704,6 +708,8 @@ export const AddressVoucher = { typeUrl: "/injective.permissions.v1beta1.AddressVoucher", value: AddressVoucher.encode(message).finish() }; + }, + registerTypeUrl() { + Voucher.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AddressVoucher.typeUrl, AddressVoucher); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/injective/permissions/v1beta1/query.rpc.func.ts index 364cc281..22e64ab9 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/query.rpc.func.ts @@ -5,40 +5,46 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryAllNamespacesRequest.encode, decode: QueryAllNamespacesResponse.decode, service: "injective.permissions.v1beta1.Query", method: "AllNamespaces", - clientResolver + clientResolver, + deps: [QueryAllNamespacesRequest, QueryAllNamespacesResponse] }); export const createGetNamespaceByDenom = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryNamespaceByDenomRequest.encode, decode: QueryNamespaceByDenomResponse.decode, service: "injective.permissions.v1beta1.Query", method: "NamespaceByDenom", - clientResolver + clientResolver, + deps: [QueryNamespaceByDenomRequest, QueryNamespaceByDenomResponse] }); export const createGetAddressRoles = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAddressRolesRequest.encode, decode: QueryAddressRolesResponse.decode, service: "injective.permissions.v1beta1.Query", method: "AddressRoles", - clientResolver + clientResolver, + deps: [QueryAddressRolesRequest, QueryAddressRolesResponse] }); export const createGetAddressesByRole = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAddressesByRoleRequest.encode, decode: QueryAddressesByRoleResponse.decode, service: "injective.permissions.v1beta1.Query", method: "AddressesByRole", - clientResolver + clientResolver, + deps: [QueryAddressesByRoleRequest, QueryAddressesByRoleResponse] }); export const createGetVouchersForAddress = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryVouchersForAddressRequest.encode, decode: QueryVouchersForAddressResponse.decode, service: "injective.permissions.v1beta1.Query", method: "VouchersForAddress", - clientResolver + clientResolver, + deps: [QueryVouchersForAddressRequest, QueryVouchersForAddressResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/query.ts b/libs/injectivejs/src/injective/permissions/v1beta1/query.ts index adce6867..550e8235 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Namespace, NamespaceAmino } from "./permissions"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { @@ -278,9 +277,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.permissions.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -348,9 +347,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.permissions.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryAllNamespacesRequest(): QueryAllNamespacesRequest { return {}; } @@ -405,9 +406,9 @@ export const QueryAllNamespacesRequest = { typeUrl: "/injective.permissions.v1beta1.QueryAllNamespacesRequest", value: QueryAllNamespacesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAllNamespacesRequest.typeUrl, QueryAllNamespacesRequest); function createBaseQueryAllNamespacesResponse(): QueryAllNamespacesResponse { return { namespaces: [] @@ -477,9 +478,11 @@ export const QueryAllNamespacesResponse = { typeUrl: "/injective.permissions.v1beta1.QueryAllNamespacesResponse", value: QueryAllNamespacesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Namespace.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllNamespacesResponse.typeUrl, QueryAllNamespacesResponse); function createBaseQueryNamespaceByDenomRequest(): QueryNamespaceByDenomRequest { return { denom: "", @@ -559,9 +562,9 @@ export const QueryNamespaceByDenomRequest = { typeUrl: "/injective.permissions.v1beta1.QueryNamespaceByDenomRequest", value: QueryNamespaceByDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryNamespaceByDenomRequest.typeUrl, QueryNamespaceByDenomRequest); function createBaseQueryNamespaceByDenomResponse(): QueryNamespaceByDenomResponse { return { namespace: undefined @@ -629,9 +632,11 @@ export const QueryNamespaceByDenomResponse = { typeUrl: "/injective.permissions.v1beta1.QueryNamespaceByDenomResponse", value: QueryNamespaceByDenomResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Namespace.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryNamespaceByDenomResponse.typeUrl, QueryNamespaceByDenomResponse); function createBaseQueryAddressesByRoleRequest(): QueryAddressesByRoleRequest { return { denom: "", @@ -711,9 +716,9 @@ export const QueryAddressesByRoleRequest = { typeUrl: "/injective.permissions.v1beta1.QueryAddressesByRoleRequest", value: QueryAddressesByRoleRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressesByRoleRequest.typeUrl, QueryAddressesByRoleRequest); function createBaseQueryAddressesByRoleResponse(): QueryAddressesByRoleResponse { return { addresses: [] @@ -783,9 +788,9 @@ export const QueryAddressesByRoleResponse = { typeUrl: "/injective.permissions.v1beta1.QueryAddressesByRoleResponse", value: QueryAddressesByRoleResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressesByRoleResponse.typeUrl, QueryAddressesByRoleResponse); function createBaseQueryAddressRolesRequest(): QueryAddressRolesRequest { return { denom: "", @@ -865,9 +870,9 @@ export const QueryAddressRolesRequest = { typeUrl: "/injective.permissions.v1beta1.QueryAddressRolesRequest", value: QueryAddressRolesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressRolesRequest.typeUrl, QueryAddressRolesRequest); function createBaseQueryAddressRolesResponse(): QueryAddressRolesResponse { return { roles: [] @@ -937,9 +942,9 @@ export const QueryAddressRolesResponse = { typeUrl: "/injective.permissions.v1beta1.QueryAddressRolesResponse", value: QueryAddressRolesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAddressRolesResponse.typeUrl, QueryAddressRolesResponse); function createBaseQueryVouchersForAddressRequest(): QueryVouchersForAddressRequest { return { address: "" @@ -1007,9 +1012,9 @@ export const QueryVouchersForAddressRequest = { typeUrl: "/injective.permissions.v1beta1.QueryVouchersForAddressRequest", value: QueryVouchersForAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryVouchersForAddressRequest.typeUrl, QueryVouchersForAddressRequest); function createBaseQueryVouchersForAddressResponse(): QueryVouchersForAddressResponse { return { vouchers: [] @@ -1079,6 +1084,8 @@ export const QueryVouchersForAddressResponse = { typeUrl: "/injective.permissions.v1beta1.QueryVouchersForAddressResponse", value: QueryVouchersForAddressResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryVouchersForAddressResponse.typeUrl, QueryVouchersForAddressResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/injective/permissions/v1beta1/tx.rpc.func.ts index 7f8a521e..cec152ec 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createCreateNamespace = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateNamespace.typeUrl, encoders: toEncoders(MsgCreateNamespace), - converters: toConverters(MsgCreateNamespace) + converters: toConverters(MsgCreateNamespace), + deps: [MsgCreateNamespace] }); export const createDeleteNamespace = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDeleteNamespace.typeUrl, encoders: toEncoders(MsgDeleteNamespace), - converters: toConverters(MsgDeleteNamespace) + converters: toConverters(MsgDeleteNamespace), + deps: [MsgDeleteNamespace] }); export const createUpdateNamespace = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateNamespace.typeUrl, encoders: toEncoders(MsgUpdateNamespace), - converters: toConverters(MsgUpdateNamespace) + converters: toConverters(MsgUpdateNamespace), + deps: [MsgUpdateNamespace] }); export const createUpdateNamespaceRoles = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateNamespaceRoles.typeUrl, encoders: toEncoders(MsgUpdateNamespaceRoles), - converters: toConverters(MsgUpdateNamespaceRoles) + converters: toConverters(MsgUpdateNamespaceRoles), + deps: [MsgUpdateNamespaceRoles] }); export const createRevokeNamespaceRoles = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRevokeNamespaceRoles.typeUrl, encoders: toEncoders(MsgRevokeNamespaceRoles), - converters: toConverters(MsgRevokeNamespaceRoles) + converters: toConverters(MsgRevokeNamespaceRoles), + deps: [MsgRevokeNamespaceRoles] }); export const createClaimVoucher = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgClaimVoucher.typeUrl, encoders: toEncoders(MsgClaimVoucher), - converters: toConverters(MsgClaimVoucher) + converters: toConverters(MsgClaimVoucher), + deps: [MsgClaimVoucher] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/permissions/v1beta1/tx.ts b/libs/injectivejs/src/injective/permissions/v1beta1/tx.ts index e3dc4630..d2f26a5e 100644 --- a/libs/injectivejs/src/injective/permissions/v1beta1/tx.ts +++ b/libs/injectivejs/src/injective/permissions/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "../../../cosmos/bank/v1beta1/bank"; import { Namespace, NamespaceAmino, Role, RoleAmino, AddressRoles, AddressRolesAmino } from "./permissions"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface MsgUpdateParams { /** authority is the address of the governance account. */ authority: string; @@ -367,10 +366,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -425,9 +425,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgCreateNamespace(): MsgCreateNamespace { return { sender: "", @@ -514,10 +514,11 @@ export const MsgCreateNamespace = { typeUrl: "/injective.permissions.v1beta1.MsgCreateNamespace", value: MsgCreateNamespace.encode(message).finish() }; + }, + registerTypeUrl() { + Namespace.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateNamespace.typeUrl, MsgCreateNamespace); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateNamespace.aminoType, MsgCreateNamespace.typeUrl); function createBaseMsgCreateNamespaceResponse(): MsgCreateNamespaceResponse { return {}; } @@ -572,9 +573,9 @@ export const MsgCreateNamespaceResponse = { typeUrl: "/injective.permissions.v1beta1.MsgCreateNamespaceResponse", value: MsgCreateNamespaceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateNamespaceResponse.typeUrl, MsgCreateNamespaceResponse); function createBaseMsgDeleteNamespace(): MsgDeleteNamespace { return { sender: "", @@ -661,10 +662,9 @@ export const MsgDeleteNamespace = { typeUrl: "/injective.permissions.v1beta1.MsgDeleteNamespace", value: MsgDeleteNamespace.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeleteNamespace.typeUrl, MsgDeleteNamespace); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeleteNamespace.aminoType, MsgDeleteNamespace.typeUrl); function createBaseMsgDeleteNamespaceResponse(): MsgDeleteNamespaceResponse { return {}; } @@ -719,9 +719,9 @@ export const MsgDeleteNamespaceResponse = { typeUrl: "/injective.permissions.v1beta1.MsgDeleteNamespaceResponse", value: MsgDeleteNamespaceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeleteNamespaceResponse.typeUrl, MsgDeleteNamespaceResponse); function createBaseMsgUpdateNamespace(): MsgUpdateNamespace { return { sender: "", @@ -856,10 +856,14 @@ export const MsgUpdateNamespace = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespace", value: MsgUpdateNamespace.encode(message).finish() }; + }, + registerTypeUrl() { + MsgUpdateNamespace_MsgSetWasmHook.registerTypeUrl(); + MsgUpdateNamespace_MsgSetMintsPaused.registerTypeUrl(); + MsgUpdateNamespace_MsgSetSendsPaused.registerTypeUrl(); + MsgUpdateNamespace_MsgSetBurnsPaused.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateNamespace.typeUrl, MsgUpdateNamespace); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateNamespace.aminoType, MsgUpdateNamespace.typeUrl); function createBaseMsgUpdateNamespace_MsgSetWasmHook(): MsgUpdateNamespace_MsgSetWasmHook { return { newValue: "" @@ -927,9 +931,9 @@ export const MsgUpdateNamespace_MsgSetWasmHook = { typeUrl: "/injective.permissions.v1beta1.MsgSetWasmHook", value: MsgUpdateNamespace_MsgSetWasmHook.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetWasmHook.typeUrl, MsgUpdateNamespace_MsgSetWasmHook); function createBaseMsgUpdateNamespace_MsgSetMintsPaused(): MsgUpdateNamespace_MsgSetMintsPaused { return { newValue: false @@ -997,9 +1001,9 @@ export const MsgUpdateNamespace_MsgSetMintsPaused = { typeUrl: "/injective.permissions.v1beta1.MsgSetMintsPaused", value: MsgUpdateNamespace_MsgSetMintsPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetMintsPaused.typeUrl, MsgUpdateNamespace_MsgSetMintsPaused); function createBaseMsgUpdateNamespace_MsgSetSendsPaused(): MsgUpdateNamespace_MsgSetSendsPaused { return { newValue: false @@ -1067,9 +1071,9 @@ export const MsgUpdateNamespace_MsgSetSendsPaused = { typeUrl: "/injective.permissions.v1beta1.MsgSetSendsPaused", value: MsgUpdateNamespace_MsgSetSendsPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetSendsPaused.typeUrl, MsgUpdateNamespace_MsgSetSendsPaused); function createBaseMsgUpdateNamespace_MsgSetBurnsPaused(): MsgUpdateNamespace_MsgSetBurnsPaused { return { newValue: false @@ -1137,9 +1141,9 @@ export const MsgUpdateNamespace_MsgSetBurnsPaused = { typeUrl: "/injective.permissions.v1beta1.MsgSetBurnsPaused", value: MsgUpdateNamespace_MsgSetBurnsPaused.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespace_MsgSetBurnsPaused.typeUrl, MsgUpdateNamespace_MsgSetBurnsPaused); function createBaseMsgUpdateNamespaceResponse(): MsgUpdateNamespaceResponse { return {}; } @@ -1194,9 +1198,9 @@ export const MsgUpdateNamespaceResponse = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespaceResponse", value: MsgUpdateNamespaceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespaceResponse.typeUrl, MsgUpdateNamespaceResponse); function createBaseMsgUpdateNamespaceRoles(): MsgUpdateNamespaceRoles { return { sender: "", @@ -1311,10 +1315,12 @@ export const MsgUpdateNamespaceRoles = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespaceRoles", value: MsgUpdateNamespaceRoles.encode(message).finish() }; + }, + registerTypeUrl() { + Role.registerTypeUrl(); + AddressRoles.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateNamespaceRoles.typeUrl, MsgUpdateNamespaceRoles); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateNamespaceRoles.aminoType, MsgUpdateNamespaceRoles.typeUrl); function createBaseMsgUpdateNamespaceRolesResponse(): MsgUpdateNamespaceRolesResponse { return {}; } @@ -1369,9 +1375,9 @@ export const MsgUpdateNamespaceRolesResponse = { typeUrl: "/injective.permissions.v1beta1.MsgUpdateNamespaceRolesResponse", value: MsgUpdateNamespaceRolesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateNamespaceRolesResponse.typeUrl, MsgUpdateNamespaceRolesResponse); function createBaseMsgRevokeNamespaceRoles(): MsgRevokeNamespaceRoles { return { sender: "", @@ -1472,10 +1478,11 @@ export const MsgRevokeNamespaceRoles = { typeUrl: "/injective.permissions.v1beta1.MsgRevokeNamespaceRoles", value: MsgRevokeNamespaceRoles.encode(message).finish() }; + }, + registerTypeUrl() { + AddressRoles.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRevokeNamespaceRoles.typeUrl, MsgRevokeNamespaceRoles); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeNamespaceRoles.aminoType, MsgRevokeNamespaceRoles.typeUrl); function createBaseMsgRevokeNamespaceRolesResponse(): MsgRevokeNamespaceRolesResponse { return {}; } @@ -1530,9 +1537,9 @@ export const MsgRevokeNamespaceRolesResponse = { typeUrl: "/injective.permissions.v1beta1.MsgRevokeNamespaceRolesResponse", value: MsgRevokeNamespaceRolesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeNamespaceRolesResponse.typeUrl, MsgRevokeNamespaceRolesResponse); function createBaseMsgClaimVoucher(): MsgClaimVoucher { return { sender: "", @@ -1619,10 +1626,9 @@ export const MsgClaimVoucher = { typeUrl: "/injective.permissions.v1beta1.MsgClaimVoucher", value: MsgClaimVoucher.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClaimVoucher.typeUrl, MsgClaimVoucher); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClaimVoucher.aminoType, MsgClaimVoucher.typeUrl); function createBaseMsgClaimVoucherResponse(): MsgClaimVoucherResponse { return {}; } @@ -1677,6 +1683,6 @@ export const MsgClaimVoucherResponse = { typeUrl: "/injective.permissions.v1beta1.MsgClaimVoucherResponse", value: MsgClaimVoucherResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgClaimVoucherResponse.typeUrl, MsgClaimVoucherResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/stream/v1beta1/query.ts b/libs/injectivejs/src/injective/stream/v1beta1/query.ts index 9bdabccf..c5f63535 100644 --- a/libs/injectivejs/src/injective/stream/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/stream/v1beta1/query.ts @@ -2,7 +2,6 @@ import { Level, LevelAmino, Deposit, DepositAmino, SpotLimitOrder, SpotLimitOrde import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum OrderUpdateStatus { Unspecified = 0, Booked = 1, @@ -663,9 +662,17 @@ export const StreamRequest = { typeUrl: "/injective.stream.v1beta1.StreamRequest", value: StreamRequest.encode(message).finish() }; + }, + registerTypeUrl() { + BankBalancesFilter.registerTypeUrl(); + SubaccountDepositsFilter.registerTypeUrl(); + TradesFilter.registerTypeUrl(); + OrdersFilter.registerTypeUrl(); + OrderbookFilter.registerTypeUrl(); + PositionsFilter.registerTypeUrl(); + OraclePriceFilter.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StreamRequest.typeUrl, StreamRequest); function createBaseStreamResponse(): StreamResponse { return { blockHeight: BigInt(0), @@ -885,9 +892,19 @@ export const StreamResponse = { typeUrl: "/injective.stream.v1beta1.StreamResponse", value: StreamResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BankBalance.registerTypeUrl(); + SubaccountDeposits.registerTypeUrl(); + SpotTrade.registerTypeUrl(); + DerivativeTrade.registerTypeUrl(); + SpotOrderUpdate.registerTypeUrl(); + DerivativeOrderUpdate.registerTypeUrl(); + OrderbookUpdate.registerTypeUrl(); + Position.registerTypeUrl(); + OraclePrice.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StreamResponse.typeUrl, StreamResponse); function createBaseOrderbookUpdate(): OrderbookUpdate { return { seq: BigInt(0), @@ -967,9 +984,11 @@ export const OrderbookUpdate = { typeUrl: "/injective.stream.v1beta1.OrderbookUpdate", value: OrderbookUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + Orderbook.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OrderbookUpdate.typeUrl, OrderbookUpdate); function createBaseOrderbook(): Orderbook { return { marketId: "", @@ -1065,9 +1084,11 @@ export const Orderbook = { typeUrl: "/injective.stream.v1beta1.Orderbook", value: Orderbook.encode(message).finish() }; + }, + registerTypeUrl() { + Level.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Orderbook.typeUrl, Orderbook); function createBaseBankBalance(): BankBalance { return { account: "", @@ -1149,9 +1170,11 @@ export const BankBalance = { typeUrl: "/injective.stream.v1beta1.BankBalance", value: BankBalance.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BankBalance.typeUrl, BankBalance); function createBaseSubaccountDeposits(): SubaccountDeposits { return { subaccountId: "", @@ -1233,9 +1256,11 @@ export const SubaccountDeposits = { typeUrl: "/injective.stream.v1beta1.SubaccountDeposits", value: SubaccountDeposits.encode(message).finish() }; + }, + registerTypeUrl() { + SubaccountDeposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountDeposits.typeUrl, SubaccountDeposits); function createBaseSubaccountDeposit(): SubaccountDeposit { return { denom: "", @@ -1315,9 +1340,11 @@ export const SubaccountDeposit = { typeUrl: "/injective.stream.v1beta1.SubaccountDeposit", value: SubaccountDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SubaccountDeposit.typeUrl, SubaccountDeposit); function createBaseSpotOrderUpdate(): SpotOrderUpdate { return { status: 0, @@ -1421,9 +1448,11 @@ export const SpotOrderUpdate = { typeUrl: "/injective.stream.v1beta1.SpotOrderUpdate", value: SpotOrderUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + SpotOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrderUpdate.typeUrl, SpotOrderUpdate); function createBaseSpotOrder(): SpotOrder { return { marketId: "", @@ -1503,9 +1532,11 @@ export const SpotOrder = { typeUrl: "/injective.stream.v1beta1.SpotOrder", value: SpotOrder.encode(message).finish() }; + }, + registerTypeUrl() { + SpotLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SpotOrder.typeUrl, SpotOrder); function createBaseDerivativeOrderUpdate(): DerivativeOrderUpdate { return { status: 0, @@ -1609,9 +1640,11 @@ export const DerivativeOrderUpdate = { typeUrl: "/injective.stream.v1beta1.DerivativeOrderUpdate", value: DerivativeOrderUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrderUpdate.typeUrl, DerivativeOrderUpdate); function createBaseDerivativeOrder(): DerivativeOrder { return { marketId: "", @@ -1703,9 +1736,11 @@ export const DerivativeOrder = { typeUrl: "/injective.stream.v1beta1.DerivativeOrder", value: DerivativeOrder.encode(message).finish() }; + }, + registerTypeUrl() { + DerivativeLimitOrder.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeOrder.typeUrl, DerivativeOrder); function createBasePosition(): Position { return { marketId: "", @@ -1845,9 +1880,9 @@ export const Position = { typeUrl: "/injective.stream.v1beta1.Position", value: Position.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Position.typeUrl, Position); function createBaseOraclePrice(): OraclePrice { return { symbol: "", @@ -1939,9 +1974,9 @@ export const OraclePrice = { typeUrl: "/injective.stream.v1beta1.OraclePrice", value: OraclePrice.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OraclePrice.typeUrl, OraclePrice); function createBaseSpotTrade(): SpotTrade { return { marketId: "", @@ -2129,9 +2164,9 @@ export const SpotTrade = { typeUrl: "/injective.stream.v1beta1.SpotTrade", value: SpotTrade.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SpotTrade.typeUrl, SpotTrade); function createBaseDerivativeTrade(): DerivativeTrade { return { marketId: "", @@ -2319,9 +2354,11 @@ export const DerivativeTrade = { typeUrl: "/injective.stream.v1beta1.DerivativeTrade", value: DerivativeTrade.encode(message).finish() }; + }, + registerTypeUrl() { + PositionDelta.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DerivativeTrade.typeUrl, DerivativeTrade); function createBaseTradesFilter(): TradesFilter { return { subaccountIds: [], @@ -2405,9 +2442,9 @@ export const TradesFilter = { typeUrl: "/injective.stream.v1beta1.TradesFilter", value: TradesFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TradesFilter.typeUrl, TradesFilter); function createBasePositionsFilter(): PositionsFilter { return { subaccountIds: [], @@ -2491,9 +2528,9 @@ export const PositionsFilter = { typeUrl: "/injective.stream.v1beta1.PositionsFilter", value: PositionsFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PositionsFilter.typeUrl, PositionsFilter); function createBaseOrdersFilter(): OrdersFilter { return { subaccountIds: [], @@ -2577,9 +2614,9 @@ export const OrdersFilter = { typeUrl: "/injective.stream.v1beta1.OrdersFilter", value: OrdersFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrdersFilter.typeUrl, OrdersFilter); function createBaseOrderbookFilter(): OrderbookFilter { return { marketIds: [] @@ -2649,9 +2686,9 @@ export const OrderbookFilter = { typeUrl: "/injective.stream.v1beta1.OrderbookFilter", value: OrderbookFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(OrderbookFilter.typeUrl, OrderbookFilter); function createBaseBankBalancesFilter(): BankBalancesFilter { return { accounts: [] @@ -2721,9 +2758,9 @@ export const BankBalancesFilter = { typeUrl: "/injective.stream.v1beta1.BankBalancesFilter", value: BankBalancesFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BankBalancesFilter.typeUrl, BankBalancesFilter); function createBaseSubaccountDepositsFilter(): SubaccountDepositsFilter { return { subaccountIds: [] @@ -2793,9 +2830,9 @@ export const SubaccountDepositsFilter = { typeUrl: "/injective.stream.v1beta1.SubaccountDepositsFilter", value: SubaccountDepositsFilter.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SubaccountDepositsFilter.typeUrl, SubaccountDepositsFilter); function createBaseOraclePriceFilter(): OraclePriceFilter { return { symbol: [] @@ -2865,6 +2902,6 @@ export const OraclePriceFilter = { typeUrl: "/injective.stream.v1beta1.OraclePriceFilter", value: OraclePriceFilter.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(OraclePriceFilter.typeUrl, OraclePriceFilter); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/authorityMetadata.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/authorityMetadata.ts index 4497aa5e..3eb2cc32 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/authorityMetadata.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/authorityMetadata.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * DenomAuthorityMetadata specifies metadata for addresses that have specific * capabilities over a token factory denom. Right now there is only one Admin @@ -94,6 +93,6 @@ export const DenomAuthorityMetadata = { typeUrl: "/injective.tokenfactory.v1beta1.DenomAuthorityMetadata", value: DenomAuthorityMetadata.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(DenomAuthorityMetadata.typeUrl, DenomAuthorityMetadata); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/events.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/events.ts index 38852b9d..6e562ec8 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/events.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/events.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Metadata, MetadataAmino } from "../../../cosmos/bank/v1beta1/bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventCreateTFDenom { account: string; denom: string; @@ -162,9 +161,9 @@ export const EventCreateTFDenom = { typeUrl: "/injective.tokenfactory.v1beta1.EventCreateTFDenom", value: EventCreateTFDenom.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventCreateTFDenom.typeUrl, EventCreateTFDenom); function createBaseEventMintTFDenom(): EventMintTFDenom { return { recipientAddress: "", @@ -244,9 +243,11 @@ export const EventMintTFDenom = { typeUrl: "/injective.tokenfactory.v1beta1.EventMintTFDenom", value: EventMintTFDenom.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventMintTFDenom.typeUrl, EventMintTFDenom); function createBaseEventBurnDenom(): EventBurnDenom { return { burnerAddress: "", @@ -326,9 +327,11 @@ export const EventBurnDenom = { typeUrl: "/injective.tokenfactory.v1beta1.EventBurnDenom", value: EventBurnDenom.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EventBurnDenom.typeUrl, EventBurnDenom); function createBaseEventChangeTFAdmin(): EventChangeTFAdmin { return { denom: "", @@ -408,9 +411,9 @@ export const EventChangeTFAdmin = { typeUrl: "/injective.tokenfactory.v1beta1.EventChangeTFAdmin", value: EventChangeTFAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventChangeTFAdmin.typeUrl, EventChangeTFAdmin); function createBaseEventSetTFDenomMetadata(): EventSetTFDenomMetadata { return { denom: "", @@ -490,6 +493,8 @@ export const EventSetTFDenomMetadata = { typeUrl: "/injective.tokenfactory.v1beta1.EventSetTFDenomMetadata", value: EventSetTFDenomMetadata.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EventSetTFDenomMetadata.typeUrl, EventSetTFDenomMetadata); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/genesis.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/genesis.ts index 13aeef22..1a851b73 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/genesis.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/genesis.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "./params"; import { DenomAuthorityMetadata, DenomAuthorityMetadataAmino } from "./authorityMetadata"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** GenesisState defines the tokenfactory module's genesis state. */ export interface GenesisState { /** params defines the parameters of the module. */ @@ -136,9 +135,12 @@ export const GenesisState = { typeUrl: "/injective.tokenfactory.v1beta1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + GenesisDenom.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); function createBaseGenesisDenom(): GenesisDenom { return { denom: "", @@ -254,6 +256,8 @@ export const GenesisDenom = { typeUrl: "/injective.tokenfactory.v1beta1.GenesisDenom", value: GenesisDenom.encode(message).finish() }; + }, + registerTypeUrl() { + DenomAuthorityMetadata.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisDenom.typeUrl, GenesisDenom); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/params.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/params.ts index bb4a1ef3..2093d2ef 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/params.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/params.ts @@ -1,7 +1,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Params defines the parameters for the tokenfactory module. */ export interface Params { denomCreationFee: Coin[]; @@ -94,7 +93,8 @@ export const Params = { typeUrl: "/injective.tokenfactory.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.rpc.func.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.rpc.func.ts index f18ad34f..f443876c 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.rpc.func.ts @@ -5,26 +5,30 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryDenomAuthorityMetadataRequest.encode, decode: QueryDenomAuthorityMetadataResponse.decode, service: "injective.tokenfactory.v1beta1.Query", method: "DenomAuthorityMetadata", - clientResolver + clientResolver, + deps: [QueryDenomAuthorityMetadataRequest, QueryDenomAuthorityMetadataResponse] }); export const createGetDenomsFromCreator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomsFromCreatorRequest.encode, decode: QueryDenomsFromCreatorResponse.decode, service: "injective.tokenfactory.v1beta1.Query", method: "DenomsFromCreator", - clientResolver + clientResolver, + deps: [QueryDenomsFromCreatorRequest, QueryDenomsFromCreatorResponse] }); export const createGetTokenfactoryModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.tokenfactory.v1beta1.Query", method: "TokenfactoryModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.ts index 3a0d5408..3788f31c 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/query.ts @@ -3,7 +3,6 @@ import { DenomAuthorityMetadata, DenomAuthorityMetadataAmino } from "./authority import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { @@ -218,9 +217,9 @@ export const QueryParamsRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -288,9 +287,11 @@ export const QueryParamsResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); function createBaseQueryDenomAuthorityMetadataRequest(): QueryDenomAuthorityMetadataRequest { return { creator: "", @@ -370,9 +371,9 @@ export const QueryDenomAuthorityMetadataRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest", value: QueryDenomAuthorityMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomAuthorityMetadataRequest.typeUrl, QueryDenomAuthorityMetadataRequest); function createBaseQueryDenomAuthorityMetadataResponse(): QueryDenomAuthorityMetadataResponse { return { authorityMetadata: DenomAuthorityMetadata.fromPartial({}) @@ -440,9 +441,11 @@ export const QueryDenomAuthorityMetadataResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse", value: QueryDenomAuthorityMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomAuthorityMetadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomAuthorityMetadataResponse.typeUrl, QueryDenomAuthorityMetadataResponse); function createBaseQueryDenomsFromCreatorRequest(): QueryDenomsFromCreatorRequest { return { creator: "" @@ -510,9 +513,9 @@ export const QueryDenomsFromCreatorRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest", value: QueryDenomsFromCreatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomsFromCreatorRequest.typeUrl, QueryDenomsFromCreatorRequest); function createBaseQueryDenomsFromCreatorResponse(): QueryDenomsFromCreatorResponse { return { denoms: [] @@ -582,9 +585,9 @@ export const QueryDenomsFromCreatorResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse", value: QueryDenomsFromCreatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomsFromCreatorResponse.typeUrl, QueryDenomsFromCreatorResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -639,9 +642,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.tokenfactory.v1beta1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -709,6 +712,8 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.tokenfactory.v1beta1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts index dd53b620..28455f34 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts @@ -5,35 +5,41 @@ export const createCreateDenom = (clientResolver?: SigningClientResolver) => bui clientResolver, typeUrl: MsgCreateDenom.typeUrl, encoders: toEncoders(MsgCreateDenom), - converters: toConverters(MsgCreateDenom) + converters: toConverters(MsgCreateDenom), + deps: [MsgCreateDenom] }); export const createMint = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgMint.typeUrl, encoders: toEncoders(MsgMint), - converters: toConverters(MsgMint) + converters: toConverters(MsgMint), + deps: [MsgMint] }); export const createBurn = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBurn.typeUrl, encoders: toEncoders(MsgBurn), - converters: toConverters(MsgBurn) + converters: toConverters(MsgBurn), + deps: [MsgBurn] }); export const createChangeAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChangeAdmin.typeUrl, encoders: toEncoders(MsgChangeAdmin), - converters: toConverters(MsgChangeAdmin) + converters: toConverters(MsgChangeAdmin), + deps: [MsgChangeAdmin] }); export const createSetDenomMetadata = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSetDenomMetadata.typeUrl, encoders: toEncoders(MsgSetDenomMetadata), - converters: toConverters(MsgSetDenomMetadata) + converters: toConverters(MsgSetDenomMetadata), + deps: [MsgSetDenomMetadata] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.ts b/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.ts index 707eeec0..147e66c8 100644 --- a/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.ts +++ b/libs/injectivejs/src/injective/tokenfactory/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { Metadata, MetadataAmino, Params, ParamsAmino } from "../../../cosmos/bank/v1beta1/bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateDenom defines the message structure for the CreateDenom gRPC service * method. It allows an account to create a new denom. It requires a sender @@ -385,10 +384,9 @@ export const MsgCreateDenom = { typeUrl: "/injective.tokenfactory.v1beta1.MsgCreateDenom", value: MsgCreateDenom.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateDenom.typeUrl, MsgCreateDenom); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateDenom.aminoType, MsgCreateDenom.typeUrl); function createBaseMsgCreateDenomResponse(): MsgCreateDenomResponse { return { newTokenDenom: "" @@ -456,9 +454,9 @@ export const MsgCreateDenomResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgCreateDenomResponse", value: MsgCreateDenomResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateDenomResponse.typeUrl, MsgCreateDenomResponse); function createBaseMsgMint(): MsgMint { return { sender: "", @@ -545,10 +543,11 @@ export const MsgMint = { typeUrl: "/injective.tokenfactory.v1beta1.MsgMint", value: MsgMint.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgMint.typeUrl, MsgMint); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMint.aminoType, MsgMint.typeUrl); function createBaseMsgMintResponse(): MsgMintResponse { return {}; } @@ -603,9 +602,9 @@ export const MsgMintResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgMintResponse", value: MsgMintResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMintResponse.typeUrl, MsgMintResponse); function createBaseMsgBurn(): MsgBurn { return { sender: "", @@ -692,10 +691,11 @@ export const MsgBurn = { typeUrl: "/injective.tokenfactory.v1beta1.MsgBurn", value: MsgBurn.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBurn.typeUrl, MsgBurn); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBurn.aminoType, MsgBurn.typeUrl); function createBaseMsgBurnResponse(): MsgBurnResponse { return {}; } @@ -750,9 +750,9 @@ export const MsgBurnResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgBurnResponse", value: MsgBurnResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBurnResponse.typeUrl, MsgBurnResponse); function createBaseMsgChangeAdmin(): MsgChangeAdmin { return { sender: "", @@ -851,10 +851,9 @@ export const MsgChangeAdmin = { typeUrl: "/injective.tokenfactory.v1beta1.MsgChangeAdmin", value: MsgChangeAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChangeAdmin.typeUrl, MsgChangeAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChangeAdmin.aminoType, MsgChangeAdmin.typeUrl); function createBaseMsgChangeAdminResponse(): MsgChangeAdminResponse { return {}; } @@ -909,9 +908,9 @@ export const MsgChangeAdminResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgChangeAdminResponse", value: MsgChangeAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChangeAdminResponse.typeUrl, MsgChangeAdminResponse); function createBaseMsgSetDenomMetadata(): MsgSetDenomMetadata { return { sender: "", @@ -998,10 +997,11 @@ export const MsgSetDenomMetadata = { typeUrl: "/injective.tokenfactory.v1beta1.MsgSetDenomMetadata", value: MsgSetDenomMetadata.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSetDenomMetadata.typeUrl, MsgSetDenomMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetDenomMetadata.aminoType, MsgSetDenomMetadata.typeUrl); function createBaseMsgSetDenomMetadataResponse(): MsgSetDenomMetadataResponse { return {}; } @@ -1056,9 +1056,9 @@ export const MsgSetDenomMetadataResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgSetDenomMetadataResponse", value: MsgSetDenomMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetDenomMetadataResponse.typeUrl, MsgSetDenomMetadataResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1145,10 +1145,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.tokenfactory.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1203,6 +1204,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.tokenfactory.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/types/v1beta1/account.ts b/libs/injectivejs/src/injective/types/v1beta1/account.ts index 08000833..a16b528f 100644 --- a/libs/injectivejs/src/injective/types/v1beta1/account.ts +++ b/libs/injectivejs/src/injective/types/v1beta1/account.ts @@ -1,7 +1,7 @@ import { BaseAccount, BaseAccountAmino } from "../../../cosmos/auth/v1beta1/auth"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * EthAccount implements the authtypes.AccountI interface and embeds an * authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. @@ -105,6 +105,9 @@ export const EthAccount = { typeUrl: "/injective.types.v1beta1.EthAccount", value: EthAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/types/v1beta1/tx_ext.ts b/libs/injectivejs/src/injective/types/v1beta1/tx_ext.ts index ac7f44f2..0a49d341 100644 --- a/libs/injectivejs/src/injective/types/v1beta1/tx_ext.ts +++ b/libs/injectivejs/src/injective/types/v1beta1/tx_ext.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface ExtensionOptionsWeb3Tx { /** * typedDataChainID used only in EIP712 Domain and should match @@ -134,6 +133,6 @@ export const ExtensionOptionsWeb3Tx = { typeUrl: "/injective.types.v1beta1.ExtensionOptionsWeb3Tx", value: ExtensionOptionsWeb3Tx.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ExtensionOptionsWeb3Tx.typeUrl, ExtensionOptionsWeb3Tx); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/types/v1beta1/tx_response.ts b/libs/injectivejs/src/injective/types/v1beta1/tx_response.ts index 14002e46..e872639e 100644 --- a/libs/injectivejs/src/injective/types/v1beta1/tx_response.ts +++ b/libs/injectivejs/src/injective/types/v1beta1/tx_response.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * base header ak message type, we can cast the bytes into corresponding message * response type @@ -120,9 +119,9 @@ export const TxResponseGenericMessage = { typeUrl: "/injective.types.v1beta1.TxResponseGenericMessage", value: TxResponseGenericMessage.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxResponseGenericMessage.typeUrl, TxResponseGenericMessage); function createBaseTxResponseData(): TxResponseData { return { messages: [] @@ -192,6 +191,8 @@ export const TxResponseData = { typeUrl: "/injective.types.v1beta1.TxResponseData", value: TxResponseData.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponseGenericMessage.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(TxResponseData.typeUrl, TxResponseData); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/events.ts b/libs/injectivejs/src/injective/wasmx/v1/events.ts index b579a219..c0f177b6 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/events.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/events.ts @@ -1,7 +1,6 @@ import { FundingMode } from "./proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface EventContractExecution { contractAddress: string; response: Uint8Array; @@ -167,9 +166,9 @@ export const EventContractExecution = { typeUrl: "/injective.wasmx.v1.EventContractExecution", value: EventContractExecution.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventContractExecution.typeUrl, EventContractExecution); function createBaseEventContractRegistered(): EventContractRegistered { return { contractAddress: "", @@ -321,9 +320,9 @@ export const EventContractRegistered = { typeUrl: "/injective.wasmx.v1.EventContractRegistered", value: EventContractRegistered.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventContractRegistered.typeUrl, EventContractRegistered); function createBaseEventContractDeregistered(): EventContractDeregistered { return { contractAddress: "" @@ -391,6 +390,6 @@ export const EventContractDeregistered = { typeUrl: "/injective.wasmx.v1.EventContractDeregistered", value: EventContractDeregistered.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(EventContractDeregistered.typeUrl, EventContractDeregistered); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/genesis.ts b/libs/injectivejs/src/injective/wasmx/v1/genesis.ts index ffe48f34..04f698c5 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/genesis.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/genesis.ts @@ -1,7 +1,6 @@ import { RegisteredContract, RegisteredContractAmino, Params, ParamsAmino } from "./wasmx"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface RegisteredContractWithAddress { address: string; registeredContract?: RegisteredContract; @@ -125,9 +124,11 @@ export const RegisteredContractWithAddress = { typeUrl: "/injective.wasmx.v1.RegisteredContractWithAddress", value: RegisteredContractWithAddress.encode(message).finish() }; + }, + registerTypeUrl() { + RegisteredContract.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RegisteredContractWithAddress.typeUrl, RegisteredContractWithAddress); function createBaseGenesisState(): GenesisState { return { params: Params.fromPartial({}), @@ -209,6 +210,9 @@ export const GenesisState = { typeUrl: "/injective.wasmx.v1.GenesisState", value: GenesisState.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); + RegisteredContractWithAddress.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/proposal.ts b/libs/injectivejs/src/injective/wasmx/v1/proposal.ts index 7b8680f3..33f8d89d 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/proposal.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/proposal.ts @@ -1,7 +1,7 @@ import { StoreCodeProposal, StoreCodeProposalAmino } from "../../../cosmwasm/wasm/v1/proposal_legacy"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; export enum FundingMode { Unspecified = 0, SelfFunded = 1, @@ -285,10 +285,13 @@ export const ContractRegistrationRequestProposal = { typeUrl: "/injective.wasmx.v1.ContractRegistrationRequestProposal", value: ContractRegistrationRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ContractRegistrationRequestProposal.typeUrl, ContractRegistrationRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(ContractRegistrationRequestProposal.aminoType, ContractRegistrationRequestProposal.typeUrl); + ContractRegistrationRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContractRegistrationRequestProposal.typeUrl, ContractRegistrationRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractRegistrationRequestProposal.aminoType, ContractRegistrationRequestProposal.typeUrl); function createBaseBatchContractRegistrationRequestProposal(): BatchContractRegistrationRequestProposal { return { title: "", @@ -389,10 +392,13 @@ export const BatchContractRegistrationRequestProposal = { typeUrl: "/injective.wasmx.v1.BatchContractRegistrationRequestProposal", value: BatchContractRegistrationRequestProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchContractRegistrationRequestProposal.typeUrl, BatchContractRegistrationRequestProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractRegistrationRequestProposal.aminoType, BatchContractRegistrationRequestProposal.typeUrl); + ContractRegistrationRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchContractRegistrationRequestProposal.typeUrl, BatchContractRegistrationRequestProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractRegistrationRequestProposal.aminoType, BatchContractRegistrationRequestProposal.typeUrl); function createBaseBatchContractDeregistrationProposal(): BatchContractDeregistrationProposal { return { title: "", @@ -493,10 +499,12 @@ export const BatchContractDeregistrationProposal = { typeUrl: "/injective.wasmx.v1.BatchContractDeregistrationProposal", value: BatchContractDeregistrationProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchContractDeregistrationProposal.typeUrl, BatchContractDeregistrationProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractDeregistrationProposal.aminoType, BatchContractDeregistrationProposal.typeUrl); } }; -GlobalDecoderRegistry.register(BatchContractDeregistrationProposal.typeUrl, BatchContractDeregistrationProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchContractDeregistrationProposal.aminoType, BatchContractDeregistrationProposal.typeUrl); function createBaseContractRegistrationRequest(): ContractRegistrationRequest { return { contractAddress: "", @@ -660,9 +668,11 @@ export const ContractRegistrationRequest = { typeUrl: "/injective.wasmx.v1.ContractRegistrationRequest", value: ContractRegistrationRequest.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ContractRegistrationRequest.typeUrl, ContractRegistrationRequest); } }; -GlobalDecoderRegistry.register(ContractRegistrationRequest.typeUrl, ContractRegistrationRequest); function createBaseBatchStoreCodeProposal(): BatchStoreCodeProposal { return { title: "", @@ -763,7 +773,10 @@ export const BatchStoreCodeProposal = { typeUrl: "/injective.wasmx.v1.BatchStoreCodeProposal", value: BatchStoreCodeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BatchStoreCodeProposal.typeUrl, BatchStoreCodeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(BatchStoreCodeProposal.aminoType, BatchStoreCodeProposal.typeUrl); + StoreCodeProposal.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(BatchStoreCodeProposal.typeUrl, BatchStoreCodeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchStoreCodeProposal.aminoType, BatchStoreCodeProposal.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/query.rpc.func.ts b/libs/injectivejs/src/injective/wasmx/v1/query.rpc.func.ts index 22d53477..5b2d75b1 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/query.rpc.func.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/query.rpc.func.ts @@ -5,19 +5,22 @@ export const createGetWasmxParams = (clientResolver?: RpcResolver) => buildQuery decode: QueryWasmxParamsResponse.decode, service: "injective.wasmx.v1.Query", method: "WasmxParams", - clientResolver + clientResolver, + deps: [QueryWasmxParamsRequest, QueryWasmxParamsResponse] }); export const createGetContractRegistrationInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryContractRegistrationInfoRequest.encode, decode: QueryContractRegistrationInfoResponse.decode, service: "injective.wasmx.v1.Query", method: "ContractRegistrationInfo", - clientResolver + clientResolver, + deps: [QueryContractRegistrationInfoRequest, QueryContractRegistrationInfoResponse] }); export const createGetWasmxModuleState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleStateRequest.encode, decode: QueryModuleStateResponse.decode, service: "injective.wasmx.v1.Query", method: "WasmxModuleState", - clientResolver + clientResolver, + deps: [QueryModuleStateRequest, QueryModuleStateResponse] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/query.ts b/libs/injectivejs/src/injective/wasmx/v1/query.ts index 002a060c..8fd5bf17 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/query.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/query.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino, RegisteredContract, RegisteredContractAmino } from import { GenesisState, GenesisStateAmino } from "./genesis"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * QueryWasmxParamsRequest is the request type for the Query/WasmxParams RPC * method. @@ -167,9 +166,9 @@ export const QueryWasmxParamsRequest = { typeUrl: "/injective.wasmx.v1.QueryWasmxParamsRequest", value: QueryWasmxParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmxParamsRequest.typeUrl, QueryWasmxParamsRequest); function createBaseQueryWasmxParamsResponse(): QueryWasmxParamsResponse { return { params: Params.fromPartial({}) @@ -237,9 +236,11 @@ export const QueryWasmxParamsResponse = { typeUrl: "/injective.wasmx.v1.QueryWasmxParamsResponse", value: QueryWasmxParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryWasmxParamsResponse.typeUrl, QueryWasmxParamsResponse); function createBaseQueryModuleStateRequest(): QueryModuleStateRequest { return {}; } @@ -294,9 +295,9 @@ export const QueryModuleStateRequest = { typeUrl: "/injective.wasmx.v1.QueryModuleStateRequest", value: QueryModuleStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleStateRequest.typeUrl, QueryModuleStateRequest); function createBaseQueryModuleStateResponse(): QueryModuleStateResponse { return { state: undefined @@ -364,9 +365,11 @@ export const QueryModuleStateResponse = { typeUrl: "/injective.wasmx.v1.QueryModuleStateResponse", value: QueryModuleStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GenesisState.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleStateResponse.typeUrl, QueryModuleStateResponse); function createBaseQueryContractRegistrationInfoRequest(): QueryContractRegistrationInfoRequest { return { contractAddress: "" @@ -434,9 +437,9 @@ export const QueryContractRegistrationInfoRequest = { typeUrl: "/injective.wasmx.v1.QueryContractRegistrationInfoRequest", value: QueryContractRegistrationInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryContractRegistrationInfoRequest.typeUrl, QueryContractRegistrationInfoRequest); function createBaseQueryContractRegistrationInfoResponse(): QueryContractRegistrationInfoResponse { return { contract: undefined @@ -504,6 +507,8 @@ export const QueryContractRegistrationInfoResponse = { typeUrl: "/injective.wasmx.v1.QueryContractRegistrationInfoResponse", value: QueryContractRegistrationInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RegisteredContract.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryContractRegistrationInfoResponse.typeUrl, QueryContractRegistrationInfoResponse); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/tx.rpc.func.ts b/libs/injectivejs/src/injective/wasmx/v1/tx.rpc.func.ts index 9f6c3d0c..48648798 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/tx.rpc.func.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/tx.rpc.func.ts @@ -5,35 +5,41 @@ export const createUpdateRegistryContractParams = (clientResolver?: SigningClien clientResolver, typeUrl: MsgUpdateContract.typeUrl, encoders: toEncoders(MsgUpdateContract), - converters: toConverters(MsgUpdateContract) + converters: toConverters(MsgUpdateContract), + deps: [MsgUpdateContract] }); export const createActivateRegistryContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgActivateContract.typeUrl, encoders: toEncoders(MsgActivateContract), - converters: toConverters(MsgActivateContract) + converters: toConverters(MsgActivateContract), + deps: [MsgActivateContract] }); export const createDeactivateRegistryContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDeactivateContract.typeUrl, encoders: toEncoders(MsgDeactivateContract), - converters: toConverters(MsgDeactivateContract) + converters: toConverters(MsgDeactivateContract), + deps: [MsgDeactivateContract] }); export const createExecuteContractCompat = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExecuteContractCompat.typeUrl, encoders: toEncoders(MsgExecuteContractCompat), - converters: toConverters(MsgExecuteContractCompat) + converters: toConverters(MsgExecuteContractCompat), + deps: [MsgExecuteContractCompat] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createRegisterContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRegisterContract.typeUrl, encoders: toEncoders(MsgRegisterContract), - converters: toConverters(MsgRegisterContract) + converters: toConverters(MsgRegisterContract), + deps: [MsgRegisterContract] }); \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/tx.ts b/libs/injectivejs/src/injective/wasmx/v1/tx.ts index a8b9a574..0ae1f9d1 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/tx.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/tx.ts @@ -2,7 +2,6 @@ import { Params, ParamsAmino } from "./wasmx"; import { ContractRegistrationRequest, ContractRegistrationRequestAmino } from "./proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgExecuteContractCompat submits the given message data to a smart contract, * compatible with EIP712 @@ -327,10 +326,9 @@ export const MsgExecuteContractCompat = { typeUrl: "/injective.wasmx.v1.MsgExecuteContractCompat", value: MsgExecuteContractCompat.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractCompat.typeUrl, MsgExecuteContractCompat); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContractCompat.aminoType, MsgExecuteContractCompat.typeUrl); function createBaseMsgExecuteContractCompatResponse(): MsgExecuteContractCompatResponse { return { data: new Uint8Array() @@ -398,9 +396,9 @@ export const MsgExecuteContractCompatResponse = { typeUrl: "/injective.wasmx.v1.MsgExecuteContractCompatResponse", value: MsgExecuteContractCompatResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractCompatResponse.typeUrl, MsgExecuteContractCompatResponse); function createBaseMsgUpdateContract(): MsgUpdateContract { return { sender: "", @@ -523,10 +521,9 @@ export const MsgUpdateContract = { typeUrl: "/injective.wasmx.v1.MsgUpdateContract", value: MsgUpdateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContract.typeUrl, MsgUpdateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContract.aminoType, MsgUpdateContract.typeUrl); function createBaseMsgUpdateContractResponse(): MsgUpdateContractResponse { return {}; } @@ -581,9 +578,9 @@ export const MsgUpdateContractResponse = { typeUrl: "/injective.wasmx.v1.MsgUpdateContractResponse", value: MsgUpdateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContractResponse.typeUrl, MsgUpdateContractResponse); function createBaseMsgActivateContract(): MsgActivateContract { return { sender: "", @@ -670,10 +667,9 @@ export const MsgActivateContract = { typeUrl: "/injective.wasmx.v1.MsgActivateContract", value: MsgActivateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgActivateContract.typeUrl, MsgActivateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgActivateContract.aminoType, MsgActivateContract.typeUrl); function createBaseMsgActivateContractResponse(): MsgActivateContractResponse { return {}; } @@ -728,9 +724,9 @@ export const MsgActivateContractResponse = { typeUrl: "/injective.wasmx.v1.MsgActivateContractResponse", value: MsgActivateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgActivateContractResponse.typeUrl, MsgActivateContractResponse); function createBaseMsgDeactivateContract(): MsgDeactivateContract { return { sender: "", @@ -817,10 +813,9 @@ export const MsgDeactivateContract = { typeUrl: "/injective.wasmx.v1.MsgDeactivateContract", value: MsgDeactivateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeactivateContract.typeUrl, MsgDeactivateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeactivateContract.aminoType, MsgDeactivateContract.typeUrl); function createBaseMsgDeactivateContractResponse(): MsgDeactivateContractResponse { return {}; } @@ -875,9 +870,9 @@ export const MsgDeactivateContractResponse = { typeUrl: "/injective.wasmx.v1.MsgDeactivateContractResponse", value: MsgDeactivateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDeactivateContractResponse.typeUrl, MsgDeactivateContractResponse); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -964,10 +959,11 @@ export const MsgUpdateParams = { typeUrl: "/injective.wasmx.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1022,9 +1018,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/injective.wasmx.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); function createBaseMsgRegisterContract(): MsgRegisterContract { return { sender: "", @@ -1111,10 +1107,11 @@ export const MsgRegisterContract = { typeUrl: "/injective.wasmx.v1.MsgRegisterContract", value: MsgRegisterContract.encode(message).finish() }; + }, + registerTypeUrl() { + ContractRegistrationRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRegisterContract.typeUrl, MsgRegisterContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRegisterContract.aminoType, MsgRegisterContract.typeUrl); function createBaseMsgRegisterContractResponse(): MsgRegisterContractResponse { return {}; } @@ -1169,6 +1166,6 @@ export const MsgRegisterContractResponse = { typeUrl: "/injective.wasmx.v1.MsgRegisterContractResponse", value: MsgRegisterContractResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRegisterContractResponse.typeUrl, MsgRegisterContractResponse); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/injective/wasmx/v1/wasmx.ts b/libs/injectivejs/src/injective/wasmx/v1/wasmx.ts index 3cb66691..02d6bef7 100644 --- a/libs/injectivejs/src/injective/wasmx/v1/wasmx.ts +++ b/libs/injectivejs/src/injective/wasmx/v1/wasmx.ts @@ -2,7 +2,6 @@ import { AccessConfig, AccessConfigAmino } from "../../../cosmwasm/wasm/v1/types import { FundingMode } from "./proposal"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export interface Params { /** * Set the status to active to indicate that contracts can be executed in @@ -231,10 +230,11 @@ export const Params = { typeUrl: "/injective.wasmx.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseRegisteredContract(): RegisteredContract { return { gasLimit: BigInt(0), @@ -374,6 +374,6 @@ export const RegisteredContract = { typeUrl: "/injective.wasmx.v1.RegisteredContract", value: RegisteredContract.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(RegisteredContract.typeUrl, RegisteredContract); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/registry.ts b/libs/injectivejs/src/registry.ts index dee026ae..e7f6497f 100644 --- a/libs/injectivejs/src/registry.ts +++ b/libs/injectivejs/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/tendermint/abci/types.ts b/libs/injectivejs/src/tendermint/abci/types.ts index 4759afd1..812f015a 100644 --- a/libs/injectivejs/src/tendermint/abci/types.ts +++ b/libs/injectivejs/src/tendermint/abci/types.ts @@ -5,7 +5,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BlockIDFlag } from "../types/validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export enum CheckTxType { NEW = 0, RECHECK = 1, @@ -1617,9 +1616,26 @@ export const Request = { typeUrl: "/tendermint.abci.Request", value: Request.encode(message).finish() }; + }, + registerTypeUrl() { + RequestEcho.registerTypeUrl(); + RequestFlush.registerTypeUrl(); + RequestInfo.registerTypeUrl(); + RequestInitChain.registerTypeUrl(); + RequestQuery.registerTypeUrl(); + RequestCheckTx.registerTypeUrl(); + RequestCommit.registerTypeUrl(); + RequestListSnapshots.registerTypeUrl(); + RequestOfferSnapshot.registerTypeUrl(); + RequestLoadSnapshotChunk.registerTypeUrl(); + RequestApplySnapshotChunk.registerTypeUrl(); + RequestPrepareProposal.registerTypeUrl(); + RequestProcessProposal.registerTypeUrl(); + RequestExtendVote.registerTypeUrl(); + RequestVerifyVoteExtension.registerTypeUrl(); + RequestFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Request.typeUrl, Request); function createBaseRequestEcho(): RequestEcho { return { message: "" @@ -1687,9 +1703,9 @@ export const RequestEcho = { typeUrl: "/tendermint.abci.RequestEcho", value: RequestEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestEcho.typeUrl, RequestEcho); function createBaseRequestFlush(): RequestFlush { return {}; } @@ -1744,9 +1760,9 @@ export const RequestFlush = { typeUrl: "/tendermint.abci.RequestFlush", value: RequestFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestFlush.typeUrl, RequestFlush); function createBaseRequestInfo(): RequestInfo { return { version: "", @@ -1850,9 +1866,9 @@ export const RequestInfo = { typeUrl: "/tendermint.abci.RequestInfo", value: RequestInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestInfo.typeUrl, RequestInfo); function createBaseRequestInitChain(): RequestInitChain { return { time: new Date(), @@ -1982,9 +1998,12 @@ export const RequestInitChain = { typeUrl: "/tendermint.abci.RequestInitChain", value: RequestInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestInitChain.typeUrl, RequestInitChain); function createBaseRequestQuery(): RequestQuery { return { data: new Uint8Array(), @@ -2088,9 +2107,9 @@ export const RequestQuery = { typeUrl: "/tendermint.abci.RequestQuery", value: RequestQuery.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestQuery.typeUrl, RequestQuery); function createBaseRequestCheckTx(): RequestCheckTx { return { tx: new Uint8Array(), @@ -2170,9 +2189,9 @@ export const RequestCheckTx = { typeUrl: "/tendermint.abci.RequestCheckTx", value: RequestCheckTx.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCheckTx.typeUrl, RequestCheckTx); function createBaseRequestCommit(): RequestCommit { return {}; } @@ -2227,9 +2246,9 @@ export const RequestCommit = { typeUrl: "/tendermint.abci.RequestCommit", value: RequestCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCommit.typeUrl, RequestCommit); function createBaseRequestListSnapshots(): RequestListSnapshots { return {}; } @@ -2284,9 +2303,9 @@ export const RequestListSnapshots = { typeUrl: "/tendermint.abci.RequestListSnapshots", value: RequestListSnapshots.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestListSnapshots.typeUrl, RequestListSnapshots); function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { return { snapshot: undefined, @@ -2366,9 +2385,11 @@ export const RequestOfferSnapshot = { typeUrl: "/tendermint.abci.RequestOfferSnapshot", value: RequestOfferSnapshot.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestOfferSnapshot.typeUrl, RequestOfferSnapshot); function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { return { height: BigInt(0), @@ -2460,9 +2481,9 @@ export const RequestLoadSnapshotChunk = { typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", value: RequestLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestLoadSnapshotChunk.typeUrl, RequestLoadSnapshotChunk); function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { return { index: 0, @@ -2554,9 +2575,9 @@ export const RequestApplySnapshotChunk = { typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", value: RequestApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestApplySnapshotChunk.typeUrl, RequestApplySnapshotChunk); function createBaseRequestPrepareProposal(): RequestPrepareProposal { return { maxTxBytes: BigInt(0), @@ -2712,9 +2733,12 @@ export const RequestPrepareProposal = { typeUrl: "/tendermint.abci.RequestPrepareProposal", value: RequestPrepareProposal.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedCommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestPrepareProposal.typeUrl, RequestPrepareProposal); function createBaseRequestProcessProposal(): RequestProcessProposal { return { txs: [], @@ -2870,9 +2894,12 @@ export const RequestProcessProposal = { typeUrl: "/tendermint.abci.RequestProcessProposal", value: RequestProcessProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestProcessProposal.typeUrl, RequestProcessProposal); function createBaseRequestExtendVote(): RequestExtendVote { return { hash: new Uint8Array(), @@ -3028,9 +3055,12 @@ export const RequestExtendVote = { typeUrl: "/tendermint.abci.RequestExtendVote", value: RequestExtendVote.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestExtendVote.typeUrl, RequestExtendVote); function createBaseRequestVerifyVoteExtension(): RequestVerifyVoteExtension { return { hash: new Uint8Array(), @@ -3134,9 +3164,9 @@ export const RequestVerifyVoteExtension = { typeUrl: "/tendermint.abci.RequestVerifyVoteExtension", value: RequestVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestVerifyVoteExtension.typeUrl, RequestVerifyVoteExtension); function createBaseRequestFinalizeBlock(): RequestFinalizeBlock { return { txs: [], @@ -3292,9 +3322,12 @@ export const RequestFinalizeBlock = { typeUrl: "/tendermint.abci.RequestFinalizeBlock", value: RequestFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestFinalizeBlock.typeUrl, RequestFinalizeBlock); function createBaseResponse(): Response { return { exception: undefined, @@ -3554,9 +3587,27 @@ export const Response = { typeUrl: "/tendermint.abci.Response", value: Response.encode(message).finish() }; + }, + registerTypeUrl() { + ResponseException.registerTypeUrl(); + ResponseEcho.registerTypeUrl(); + ResponseFlush.registerTypeUrl(); + ResponseInfo.registerTypeUrl(); + ResponseInitChain.registerTypeUrl(); + ResponseQuery.registerTypeUrl(); + ResponseCheckTx.registerTypeUrl(); + ResponseCommit.registerTypeUrl(); + ResponseListSnapshots.registerTypeUrl(); + ResponseOfferSnapshot.registerTypeUrl(); + ResponseLoadSnapshotChunk.registerTypeUrl(); + ResponseApplySnapshotChunk.registerTypeUrl(); + ResponsePrepareProposal.registerTypeUrl(); + ResponseProcessProposal.registerTypeUrl(); + ResponseExtendVote.registerTypeUrl(); + ResponseVerifyVoteExtension.registerTypeUrl(); + ResponseFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Response.typeUrl, Response); function createBaseResponseException(): ResponseException { return { error: "" @@ -3624,9 +3675,9 @@ export const ResponseException = { typeUrl: "/tendermint.abci.ResponseException", value: ResponseException.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseException.typeUrl, ResponseException); function createBaseResponseEcho(): ResponseEcho { return { message: "" @@ -3694,9 +3745,9 @@ export const ResponseEcho = { typeUrl: "/tendermint.abci.ResponseEcho", value: ResponseEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseEcho.typeUrl, ResponseEcho); function createBaseResponseFlush(): ResponseFlush { return {}; } @@ -3751,9 +3802,9 @@ export const ResponseFlush = { typeUrl: "/tendermint.abci.ResponseFlush", value: ResponseFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseFlush.typeUrl, ResponseFlush); function createBaseResponseInfo(): ResponseInfo { return { data: "", @@ -3869,9 +3920,9 @@ export const ResponseInfo = { typeUrl: "/tendermint.abci.ResponseInfo", value: ResponseInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseInfo.typeUrl, ResponseInfo); function createBaseResponseInitChain(): ResponseInitChain { return { consensusParams: undefined, @@ -3965,9 +4016,12 @@ export const ResponseInitChain = { typeUrl: "/tendermint.abci.ResponseInitChain", value: ResponseInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseInitChain.typeUrl, ResponseInitChain); function createBaseResponseQuery(): ResponseQuery { return { code: 0, @@ -4131,9 +4185,11 @@ export const ResponseQuery = { typeUrl: "/tendermint.abci.ResponseQuery", value: ResponseQuery.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOps.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseQuery.typeUrl, ResponseQuery); function createBaseResponseCheckTx(): ResponseCheckTx { return { code: 0, @@ -4287,9 +4343,11 @@ export const ResponseCheckTx = { typeUrl: "/tendermint.abci.ResponseCheckTx", value: ResponseCheckTx.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseCheckTx.typeUrl, ResponseCheckTx); function createBaseResponseCommit(): ResponseCommit { return { retainHeight: BigInt(0) @@ -4357,9 +4415,9 @@ export const ResponseCommit = { typeUrl: "/tendermint.abci.ResponseCommit", value: ResponseCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseCommit.typeUrl, ResponseCommit); function createBaseResponseListSnapshots(): ResponseListSnapshots { return { snapshots: [] @@ -4429,9 +4487,11 @@ export const ResponseListSnapshots = { typeUrl: "/tendermint.abci.ResponseListSnapshots", value: ResponseListSnapshots.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseListSnapshots.typeUrl, ResponseListSnapshots); function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { return { result: 0 @@ -4499,9 +4559,9 @@ export const ResponseOfferSnapshot = { typeUrl: "/tendermint.abci.ResponseOfferSnapshot", value: ResponseOfferSnapshot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseOfferSnapshot.typeUrl, ResponseOfferSnapshot); function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { return { chunk: new Uint8Array() @@ -4569,9 +4629,9 @@ export const ResponseLoadSnapshotChunk = { typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", value: ResponseLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseLoadSnapshotChunk.typeUrl, ResponseLoadSnapshotChunk); function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { return { result: 0, @@ -4676,9 +4736,9 @@ export const ResponseApplySnapshotChunk = { typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", value: ResponseApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseApplySnapshotChunk.typeUrl, ResponseApplySnapshotChunk); function createBaseResponsePrepareProposal(): ResponsePrepareProposal { return { txs: [] @@ -4748,9 +4808,9 @@ export const ResponsePrepareProposal = { typeUrl: "/tendermint.abci.ResponsePrepareProposal", value: ResponsePrepareProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponsePrepareProposal.typeUrl, ResponsePrepareProposal); function createBaseResponseProcessProposal(): ResponseProcessProposal { return { status: 0 @@ -4818,9 +4878,9 @@ export const ResponseProcessProposal = { typeUrl: "/tendermint.abci.ResponseProcessProposal", value: ResponseProcessProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseProcessProposal.typeUrl, ResponseProcessProposal); function createBaseResponseExtendVote(): ResponseExtendVote { return { voteExtension: new Uint8Array() @@ -4888,9 +4948,9 @@ export const ResponseExtendVote = { typeUrl: "/tendermint.abci.ResponseExtendVote", value: ResponseExtendVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseExtendVote.typeUrl, ResponseExtendVote); function createBaseResponseVerifyVoteExtension(): ResponseVerifyVoteExtension { return { status: 0 @@ -4958,9 +5018,9 @@ export const ResponseVerifyVoteExtension = { typeUrl: "/tendermint.abci.ResponseVerifyVoteExtension", value: ResponseVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseVerifyVoteExtension.typeUrl, ResponseVerifyVoteExtension); function createBaseResponseFinalizeBlock(): ResponseFinalizeBlock { return { events: [], @@ -5082,9 +5142,14 @@ export const ResponseFinalizeBlock = { typeUrl: "/tendermint.abci.ResponseFinalizeBlock", value: ResponseFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); + ExecTxResult.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); + ConsensusParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseFinalizeBlock.typeUrl, ResponseFinalizeBlock); function createBaseCommitInfo(): CommitInfo { return { round: 0, @@ -5166,9 +5231,11 @@ export const CommitInfo = { typeUrl: "/tendermint.abci.CommitInfo", value: CommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + VoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitInfo.typeUrl, CommitInfo); function createBaseExtendedCommitInfo(): ExtendedCommitInfo { return { round: 0, @@ -5250,9 +5317,11 @@ export const ExtendedCommitInfo = { typeUrl: "/tendermint.abci.ExtendedCommitInfo", value: ExtendedCommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedVoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommitInfo.typeUrl, ExtendedCommitInfo); function createBaseEvent(): Event { return { type: "", @@ -5334,9 +5403,11 @@ export const Event = { typeUrl: "/tendermint.abci.Event", value: Event.encode(message).finish() }; + }, + registerTypeUrl() { + EventAttribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Event.typeUrl, Event); function createBaseEventAttribute(): EventAttribute { return { key: "", @@ -5428,9 +5499,9 @@ export const EventAttribute = { typeUrl: "/tendermint.abci.EventAttribute", value: EventAttribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttribute.typeUrl, EventAttribute); function createBaseExecTxResult(): ExecTxResult { return { code: 0, @@ -5584,9 +5655,11 @@ export const ExecTxResult = { typeUrl: "/tendermint.abci.ExecTxResult", value: ExecTxResult.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExecTxResult.typeUrl, ExecTxResult); function createBaseTxResult(): TxResult { return { height: BigInt(0), @@ -5690,9 +5763,11 @@ export const TxResult = { typeUrl: "/tendermint.abci.TxResult", value: TxResult.encode(message).finish() }; + }, + registerTypeUrl() { + ExecTxResult.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResult.typeUrl, TxResult); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -5772,9 +5847,9 @@ export const Validator = { typeUrl: "/tendermint.abci.Validator", value: Validator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseValidatorUpdate(): ValidatorUpdate { return { pubKey: PublicKey.fromPartial({}), @@ -5854,9 +5929,11 @@ export const ValidatorUpdate = { typeUrl: "/tendermint.abci.ValidatorUpdate", value: ValidatorUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorUpdate.typeUrl, ValidatorUpdate); function createBaseVoteInfo(): VoteInfo { return { validator: Validator.fromPartial({}), @@ -5936,9 +6013,11 @@ export const VoteInfo = { typeUrl: "/tendermint.abci.VoteInfo", value: VoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(VoteInfo.typeUrl, VoteInfo); function createBaseExtendedVoteInfo(): ExtendedVoteInfo { return { validator: Validator.fromPartial({}), @@ -6042,9 +6121,11 @@ export const ExtendedVoteInfo = { typeUrl: "/tendermint.abci.ExtendedVoteInfo", value: ExtendedVoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedVoteInfo.typeUrl, ExtendedVoteInfo); function createBaseMisbehavior(): Misbehavior { return { type: 0, @@ -6160,9 +6241,11 @@ export const Misbehavior = { typeUrl: "/tendermint.abci.Misbehavior", value: Misbehavior.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Misbehavior.typeUrl, Misbehavior); function createBaseSnapshot(): Snapshot { return { height: BigInt(0), @@ -6278,6 +6361,6 @@ export const Snapshot = { typeUrl: "/tendermint.abci.Snapshot", value: Snapshot.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Snapshot.typeUrl, Snapshot); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/crypto/keys.ts b/libs/injectivejs/src/tendermint/crypto/keys.ts index 9dc8476b..c58639e4 100644 --- a/libs/injectivejs/src/tendermint/crypto/keys.ts +++ b/libs/injectivejs/src/tendermint/crypto/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** PublicKey defines the keys available for use with Validators */ export interface PublicKey { ed25519?: Uint8Array; @@ -98,6 +97,6 @@ export const PublicKey = { typeUrl: "/tendermint.crypto.PublicKey", value: PublicKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PublicKey.typeUrl, PublicKey); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/crypto/proof.ts b/libs/injectivejs/src/tendermint/crypto/proof.ts index 5f372fcf..b3eea7ae 100644 --- a/libs/injectivejs/src/tendermint/crypto/proof.ts +++ b/libs/injectivejs/src/tendermint/crypto/proof.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Proof { total: bigint; index: bigint; @@ -208,9 +207,9 @@ export const Proof = { typeUrl: "/tendermint.crypto.Proof", value: Proof.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proof.typeUrl, Proof); function createBaseValueOp(): ValueOp { return { key: new Uint8Array(), @@ -290,9 +289,11 @@ export const ValueOp = { typeUrl: "/tendermint.crypto.ValueOp", value: ValueOp.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValueOp.typeUrl, ValueOp); function createBaseDominoOp(): DominoOp { return { key: "", @@ -384,9 +385,9 @@ export const DominoOp = { typeUrl: "/tendermint.crypto.DominoOp", value: DominoOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DominoOp.typeUrl, DominoOp); function createBaseProofOp(): ProofOp { return { type: "", @@ -478,9 +479,9 @@ export const ProofOp = { typeUrl: "/tendermint.crypto.ProofOp", value: ProofOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProofOp.typeUrl, ProofOp); function createBaseProofOps(): ProofOps { return { ops: [] @@ -550,6 +551,8 @@ export const ProofOps = { typeUrl: "/tendermint.crypto.ProofOps", value: ProofOps.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOp.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ProofOps.typeUrl, ProofOps); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/types/block.ts b/libs/injectivejs/src/tendermint/types/block.ts index 16763b51..20ae4856 100644 --- a/libs/injectivejs/src/tendermint/types/block.ts +++ b/libs/injectivejs/src/tendermint/types/block.ts @@ -2,7 +2,6 @@ import { Header, HeaderAmino, Data, DataAmino, Commit, CommitAmino } from "./typ import { EvidenceList, EvidenceListAmino } from "./evidence"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Block { header: Header; data: Data; @@ -126,6 +125,11 @@ export const Block = { typeUrl: "/tendermint.types.Block", value: Block.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Data.registerTypeUrl(); + EvidenceList.registerTypeUrl(); + Commit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Block.typeUrl, Block); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/types/evidence.ts b/libs/injectivejs/src/tendermint/types/evidence.ts index 696b6c8a..bf7dd661 100644 --- a/libs/injectivejs/src/tendermint/types/evidence.ts +++ b/libs/injectivejs/src/tendermint/types/evidence.ts @@ -3,7 +3,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator, ValidatorAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; lightClientAttackEvidence?: LightClientAttackEvidence; @@ -161,9 +160,12 @@ export const Evidence = { typeUrl: "/tendermint.types.Evidence", value: Evidence.encode(message).finish() }; + }, + registerTypeUrl() { + DuplicateVoteEvidence.registerTypeUrl(); + LightClientAttackEvidence.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Evidence.typeUrl, Evidence); function createBaseDuplicateVoteEvidence(): DuplicateVoteEvidence { return { voteA: undefined, @@ -279,9 +281,11 @@ export const DuplicateVoteEvidence = { typeUrl: "/tendermint.types.DuplicateVoteEvidence", value: DuplicateVoteEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DuplicateVoteEvidence.typeUrl, DuplicateVoteEvidence); function createBaseLightClientAttackEvidence(): LightClientAttackEvidence { return { conflictingBlock: undefined, @@ -399,9 +403,12 @@ export const LightClientAttackEvidence = { typeUrl: "/tendermint.types.LightClientAttackEvidence", value: LightClientAttackEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + LightBlock.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightClientAttackEvidence.typeUrl, LightClientAttackEvidence); function createBaseEvidenceList(): EvidenceList { return { evidence: [] @@ -471,6 +478,8 @@ export const EvidenceList = { typeUrl: "/tendermint.types.EvidenceList", value: EvidenceList.encode(message).finish() }; + }, + registerTypeUrl() { + Evidence.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EvidenceList.typeUrl, EvidenceList); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/types/params.ts b/libs/injectivejs/src/tendermint/types/params.ts index 0b15190e..8f9291e4 100644 --- a/libs/injectivejs/src/tendermint/types/params.ts +++ b/libs/injectivejs/src/tendermint/types/params.ts @@ -1,7 +1,6 @@ import { Duration, DurationAmino } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. @@ -339,9 +338,15 @@ export const ConsensusParams = { typeUrl: "/tendermint.types.ConsensusParams", value: ConsensusParams.encode(message).finish() }; + }, + registerTypeUrl() { + BlockParams.registerTypeUrl(); + EvidenceParams.registerTypeUrl(); + ValidatorParams.registerTypeUrl(); + VersionParams.registerTypeUrl(); + ABCIParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConsensusParams.typeUrl, ConsensusParams); function createBaseBlockParams(): BlockParams { return { maxBytes: BigInt(0), @@ -421,9 +426,9 @@ export const BlockParams = { typeUrl: "/tendermint.types.BlockParams", value: BlockParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BlockParams.typeUrl, BlockParams); function createBaseEvidenceParams(): EvidenceParams { return { maxAgeNumBlocks: BigInt(0), @@ -515,9 +520,9 @@ export const EvidenceParams = { typeUrl: "/tendermint.types.EvidenceParams", value: EvidenceParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EvidenceParams.typeUrl, EvidenceParams); function createBaseValidatorParams(): ValidatorParams { return { pubKeyTypes: [] @@ -587,9 +592,9 @@ export const ValidatorParams = { typeUrl: "/tendermint.types.ValidatorParams", value: ValidatorParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorParams.typeUrl, ValidatorParams); function createBaseVersionParams(): VersionParams { return { app: BigInt(0) @@ -657,9 +662,9 @@ export const VersionParams = { typeUrl: "/tendermint.types.VersionParams", value: VersionParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VersionParams.typeUrl, VersionParams); function createBaseHashedParams(): HashedParams { return { blockMaxBytes: BigInt(0), @@ -739,9 +744,9 @@ export const HashedParams = { typeUrl: "/tendermint.types.HashedParams", value: HashedParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(HashedParams.typeUrl, HashedParams); function createBaseABCIParams(): ABCIParams { return { voteExtensionsEnableHeight: BigInt(0) @@ -809,6 +814,6 @@ export const ABCIParams = { typeUrl: "/tendermint.types.ABCIParams", value: ABCIParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ABCIParams.typeUrl, ABCIParams); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/types/types.ts b/libs/injectivejs/src/tendermint/types/types.ts index c44fd8af..2762a429 100644 --- a/libs/injectivejs/src/tendermint/types/types.ts +++ b/libs/injectivejs/src/tendermint/types/types.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { BlockIDFlag, ValidatorSet, ValidatorSetAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, toTimestamp, fromTimestamp, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** SignedMsgType is a type of signed message in the consensus. */ export enum SignedMsgType { SIGNED_MSG_TYPE_UNKNOWN = 0, @@ -542,9 +541,9 @@ export const PartSetHeader = { typeUrl: "/tendermint.types.PartSetHeader", value: PartSetHeader.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PartSetHeader.typeUrl, PartSetHeader); function createBasePart(): Part { return { index: 0, @@ -636,9 +635,11 @@ export const Part = { typeUrl: "/tendermint.types.Part", value: Part.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Part.typeUrl, Part); function createBaseBlockID(): BlockID { return { hash: new Uint8Array(), @@ -718,9 +719,11 @@ export const BlockID = { typeUrl: "/tendermint.types.BlockID", value: BlockID.encode(message).finish() }; + }, + registerTypeUrl() { + PartSetHeader.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockID.typeUrl, BlockID); function createBaseHeader(): Header { return { version: Consensus.fromPartial({}), @@ -944,9 +947,12 @@ export const Header = { typeUrl: "/tendermint.types.Header", value: Header.encode(message).finish() }; + }, + registerTypeUrl() { + Consensus.registerTypeUrl(); + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Header.typeUrl, Header); function createBaseData(): Data { return { txs: [] @@ -1016,9 +1022,9 @@ export const Data = { typeUrl: "/tendermint.types.Data", value: Data.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Data.typeUrl, Data); function createBaseVote(): Vote { return { type: 0, @@ -1194,9 +1200,11 @@ export const Vote = { typeUrl: "/tendermint.types.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); function createBaseCommit(): Commit { return { height: BigInt(0), @@ -1302,9 +1310,12 @@ export const Commit = { typeUrl: "/tendermint.types.Commit", value: Commit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + CommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commit.typeUrl, Commit); function createBaseCommitSig(): CommitSig { return { blockIdFlag: 0, @@ -1408,9 +1419,9 @@ export const CommitSig = { typeUrl: "/tendermint.types.CommitSig", value: CommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommitSig.typeUrl, CommitSig); function createBaseExtendedCommit(): ExtendedCommit { return { height: BigInt(0), @@ -1516,9 +1527,12 @@ export const ExtendedCommit = { typeUrl: "/tendermint.types.ExtendedCommit", value: ExtendedCommit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + ExtendedCommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommit.typeUrl, ExtendedCommit); function createBaseExtendedCommitSig(): ExtendedCommitSig { return { blockIdFlag: 0, @@ -1646,9 +1660,9 @@ export const ExtendedCommitSig = { typeUrl: "/tendermint.types.ExtendedCommitSig", value: ExtendedCommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtendedCommitSig.typeUrl, ExtendedCommitSig); function createBaseProposal(): Proposal { return { type: 0, @@ -1788,9 +1802,11 @@ export const Proposal = { typeUrl: "/tendermint.types.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); function createBaseSignedHeader(): SignedHeader { return { header: undefined, @@ -1870,9 +1886,12 @@ export const SignedHeader = { typeUrl: "/tendermint.types.SignedHeader", value: SignedHeader.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Commit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignedHeader.typeUrl, SignedHeader); function createBaseLightBlock(): LightBlock { return { signedHeader: undefined, @@ -1952,9 +1971,12 @@ export const LightBlock = { typeUrl: "/tendermint.types.LightBlock", value: LightBlock.encode(message).finish() }; + }, + registerTypeUrl() { + SignedHeader.registerTypeUrl(); + ValidatorSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightBlock.typeUrl, LightBlock); function createBaseBlockMeta(): BlockMeta { return { blockId: BlockID.fromPartial({}), @@ -2058,9 +2080,12 @@ export const BlockMeta = { typeUrl: "/tendermint.types.BlockMeta", value: BlockMeta.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + Header.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockMeta.typeUrl, BlockMeta); function createBaseTxProof(): TxProof { return { rootHash: new Uint8Array(), @@ -2152,6 +2177,8 @@ export const TxProof = { typeUrl: "/tendermint.types.TxProof", value: TxProof.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(TxProof.typeUrl, TxProof); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/types/validator.ts b/libs/injectivejs/src/tendermint/types/validator.ts index 0c652786..8a52ff10 100644 --- a/libs/injectivejs/src/tendermint/types/validator.ts +++ b/libs/injectivejs/src/tendermint/types/validator.ts @@ -1,7 +1,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** BlockIdFlag indicates which BlockID the signature is for */ export enum BlockIDFlag { /** BLOCK_ID_FLAG_UNKNOWN - indicates an error condition */ @@ -196,9 +195,11 @@ export const ValidatorSet = { typeUrl: "/tendermint.types.ValidatorSet", value: ValidatorSet.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSet.typeUrl, ValidatorSet); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -302,9 +303,11 @@ export const Validator = { typeUrl: "/tendermint.types.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseSimpleValidator(): SimpleValidator { return { pubKey: undefined, @@ -384,6 +387,8 @@ export const SimpleValidator = { typeUrl: "/tendermint.types.SimpleValidator", value: SimpleValidator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SimpleValidator.typeUrl, SimpleValidator); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/injectivejs/src/tendermint/version/types.ts b/libs/injectivejs/src/tendermint/version/types.ts index 824f3644..36154b74 100644 --- a/libs/injectivejs/src/tendermint/version/types.ts +++ b/libs/injectivejs/src/tendermint/version/types.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * App includes the protocol and software version for the application. * This information is included in ResponseInfo. The App.Protocol can be @@ -132,9 +131,9 @@ export const App = { typeUrl: "/tendermint.version.App", value: App.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(App.typeUrl, App); function createBaseConsensus(): Consensus { return { block: BigInt(0), @@ -214,6 +213,6 @@ export const Consensus = { typeUrl: "/tendermint.version.Consensus", value: Consensus.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Consensus.typeUrl, Consensus); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/injectivejs/src/types.ts b/libs/injectivejs/src/types.ts index 6983e34a..e44c8a75 100644 --- a/libs/injectivejs/src/types.ts +++ b/libs/injectivejs/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -48,6 +48,7 @@ export interface TelescopeGeneratedCodec< toProto?: (message: T) => Uint8Array; fromProtoMsg?: (message: ProtoMsg) => T; toProtoMsg?: (message: T) => Any; + registerTypeUrl?: () => void; } export type TelescopeGeneratedType< diff --git a/libs/injectivejs/src/utf8.ts b/libs/injectivejs/src/utf8.ts index 56735515..5fef278b 100644 --- a/libs/injectivejs/src/utf8.ts +++ b/libs/injectivejs/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/varint.ts b/libs/injectivejs/src/varint.ts index e06f5977..cab33130 100644 --- a/libs/injectivejs/src/varint.ts +++ b/libs/injectivejs/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/binary.ts b/libs/interchain-react/src/binary.ts index 7325addd..f9a515e4 100644 --- a/libs/interchain-react/src/binary.ts +++ b/libs/interchain-react/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/cosmos/auth/v1beta1/auth.ts b/libs/interchain-react/src/cosmos/auth/v1beta1/auth.ts index bd8ed990..85846fa2 100644 --- a/libs/interchain-react/src/cosmos/auth/v1beta1/auth.ts +++ b/libs/interchain-react/src/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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 @@ -222,10 +222,12 @@ export const BaseAccount = { typeUrl: "/cosmos.auth.v1beta1.BaseAccount", value: BaseAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); } }; -GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); function createBaseModuleAccount(): ModuleAccount { return { baseAccount: undefined, @@ -326,10 +328,13 @@ export const ModuleAccount = { typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", value: ModuleAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); + BaseAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); function createBaseModuleCredential(): ModuleCredential { return { moduleName: "", @@ -418,10 +423,9 @@ export const ModuleCredential = { typeUrl: "/cosmos.auth.v1beta1.ModuleCredential", value: ModuleCredential.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModuleCredential.typeUrl, ModuleCredential); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleCredential.aminoType, ModuleCredential.typeUrl); function createBaseParams(): Params { return { maxMemoCharacters: BigInt(0), @@ -544,7 +548,6 @@ export const Params = { typeUrl: "/cosmos.auth.v1beta1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/auth/v1beta1/query.rpc.func.ts b/libs/interchain-react/src/cosmos/auth/v1beta1/query.rpc.func.ts index 55204af9..174472fd 100644 --- a/libs/interchain-react/src/cosmos/auth/v1beta1/query.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/auth/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetAccounts = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetAccounts, @@ -17,7 +18,8 @@ export const createGetAccount = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetAccount, @@ -28,7 +30,8 @@ export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => bui decode: QueryAccountAddressByIDResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountAddressByID", - clientResolver + clientResolver, + deps: [QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse] }); export const useGetAccountAddressByID = buildUseQuery({ builderQueryFn: createGetAccountAddressByID, @@ -39,7 +42,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -50,7 +54,8 @@ export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQu decode: QueryModuleAccountsResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccounts", - clientResolver + clientResolver, + deps: [QueryModuleAccountsRequest, QueryModuleAccountsResponse] }); export const useGetModuleAccounts = buildUseQuery({ builderQueryFn: createGetModuleAccounts, @@ -61,7 +66,8 @@ export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => bu decode: QueryModuleAccountByNameResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccountByName", - clientResolver + clientResolver, + deps: [QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse] }); export const useGetModuleAccountByName = buildUseQuery({ builderQueryFn: createGetModuleAccountByName, @@ -72,7 +78,8 @@ export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuer decode: Bech32PrefixResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Bech32Prefix", - clientResolver + clientResolver, + deps: [Bech32PrefixRequest, Bech32PrefixResponse] }); export const useGetBech32Prefix = buildUseQuery({ builderQueryFn: createGetBech32Prefix, @@ -83,7 +90,8 @@ export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => b decode: AddressBytesToStringResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressBytesToString", - clientResolver + clientResolver, + deps: [AddressBytesToStringRequest, AddressBytesToStringResponse] }); export const useGetAddressBytesToString = buildUseQuery({ builderQueryFn: createGetAddressBytesToString, @@ -94,7 +102,8 @@ export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => b decode: AddressStringToBytesResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressStringToBytes", - clientResolver + clientResolver, + deps: [AddressStringToBytesRequest, AddressStringToBytesResponse] }); export const useGetAddressStringToBytes = buildUseQuery({ builderQueryFn: createGetAddressStringToBytes, @@ -105,7 +114,8 @@ export const createGetAccountInfo = (clientResolver?: RpcResolver) => buildQuery decode: QueryAccountInfoResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountInfo", - clientResolver + clientResolver, + deps: [QueryAccountInfoRequest, QueryAccountInfoResponse] }); export const useGetAccountInfo = buildUseQuery({ builderQueryFn: createGetAccountInfo, diff --git a/libs/interchain-react/src/cosmos/auth/v1beta1/query.ts b/libs/interchain-react/src/cosmos/auth/v1beta1/query.ts index 13eb3d8e..1074a756 100644 --- a/libs/interchain-react/src/cosmos/auth/v1beta1/query.ts +++ b/libs/interchain-react/src/cosmos/auth/v1beta1/query.ts @@ -3,8 +3,8 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth"; import { EthAccount, EthAccountProtoMsg } from "../../../injective/types/v1beta1/account"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. * @@ -557,10 +557,11 @@ export const QueryAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", value: QueryAccountsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsRequest.typeUrl, QueryAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsRequest.aminoType, QueryAccountsRequest.typeUrl); function createBaseQueryAccountsResponse(): QueryAccountsResponse { return { accounts: [], @@ -649,10 +650,13 @@ export const QueryAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", value: QueryAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsResponse.typeUrl, QueryAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsResponse.aminoType, QueryAccountsResponse.typeUrl); function createBaseQueryAccountRequest(): QueryAccountRequest { return { address: "" @@ -727,10 +731,9 @@ export const QueryAccountRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", value: QueryAccountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountRequest.typeUrl, QueryAccountRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountRequest.aminoType, QueryAccountRequest.typeUrl); function createBaseQueryAccountResponse(): QueryAccountResponse { return { account: undefined @@ -805,10 +808,12 @@ export const QueryAccountResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", value: QueryAccountResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountResponse.typeUrl, QueryAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountResponse.aminoType, QueryAccountResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -870,10 +875,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -948,10 +952,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest { return {}; } @@ -1013,10 +1018,9 @@ export const QueryModuleAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", value: QueryModuleAccountsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountsRequest.typeUrl, QueryModuleAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsRequest.aminoType, QueryModuleAccountsRequest.typeUrl); function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse { return { accounts: [] @@ -1093,10 +1097,11 @@ export const QueryModuleAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", value: QueryModuleAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountsResponse.typeUrl, QueryModuleAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsResponse.aminoType, QueryModuleAccountsResponse.typeUrl); function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRequest { return { name: "" @@ -1171,10 +1176,9 @@ export const QueryModuleAccountByNameRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", value: QueryModuleAccountByNameRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameRequest.typeUrl, QueryModuleAccountByNameRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameRequest.aminoType, QueryModuleAccountByNameRequest.typeUrl); function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameResponse { return { account: undefined @@ -1249,10 +1253,11 @@ export const QueryModuleAccountByNameResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", value: QueryModuleAccountByNameResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameResponse.typeUrl, QueryModuleAccountByNameResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameResponse.aminoType, QueryModuleAccountByNameResponse.typeUrl); function createBaseBech32PrefixRequest(): Bech32PrefixRequest { return {}; } @@ -1314,10 +1319,9 @@ export const Bech32PrefixRequest = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", value: Bech32PrefixRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixRequest.typeUrl, Bech32PrefixRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixRequest.aminoType, Bech32PrefixRequest.typeUrl); function createBaseBech32PrefixResponse(): Bech32PrefixResponse { return { bech32Prefix: "" @@ -1392,10 +1396,9 @@ export const Bech32PrefixResponse = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", value: Bech32PrefixResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixResponse.typeUrl, Bech32PrefixResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixResponse.aminoType, Bech32PrefixResponse.typeUrl); function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest { return { addressBytes: new Uint8Array() @@ -1470,10 +1473,9 @@ export const AddressBytesToStringRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", value: AddressBytesToStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringRequest.typeUrl, AddressBytesToStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringRequest.aminoType, AddressBytesToStringRequest.typeUrl); function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse { return { addressString: "" @@ -1548,10 +1550,9 @@ export const AddressBytesToStringResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", value: AddressBytesToStringResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringResponse.typeUrl, AddressBytesToStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringResponse.aminoType, AddressBytesToStringResponse.typeUrl); function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest { return { addressString: "" @@ -1626,10 +1627,9 @@ export const AddressStringToBytesRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", value: AddressStringToBytesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesRequest.typeUrl, AddressStringToBytesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesRequest.aminoType, AddressStringToBytesRequest.typeUrl); function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse { return { addressBytes: new Uint8Array() @@ -1704,10 +1704,9 @@ export const AddressStringToBytesResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", value: AddressStringToBytesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesResponse.typeUrl, AddressStringToBytesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesResponse.aminoType, AddressStringToBytesResponse.typeUrl); function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequest { return { id: BigInt(0), @@ -1794,10 +1793,9 @@ export const QueryAccountAddressByIDRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", value: QueryAccountAddressByIDRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDRequest.typeUrl, QueryAccountAddressByIDRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDRequest.aminoType, QueryAccountAddressByIDRequest.typeUrl); function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDResponse { return { accountAddress: "" @@ -1872,10 +1870,9 @@ export const QueryAccountAddressByIDResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", value: QueryAccountAddressByIDResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDResponse.typeUrl, QueryAccountAddressByIDResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDResponse.aminoType, QueryAccountAddressByIDResponse.typeUrl); function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest { return { address: "" @@ -1950,10 +1947,9 @@ export const QueryAccountInfoRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest", value: QueryAccountInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountInfoRequest.typeUrl, QueryAccountInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoRequest.aminoType, QueryAccountInfoRequest.typeUrl); function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse { return { info: undefined @@ -2028,7 +2024,8 @@ export const QueryAccountInfoResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse", value: QueryAccountInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryAccountInfoResponse.typeUrl, QueryAccountInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoResponse.aminoType, QueryAccountInfoResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/authz/v1beta1/authz.ts b/libs/interchain-react/src/cosmos/authz/v1beta1/authz.ts index e71c3fee..514977a6 100644 --- a/libs/interchain-react/src/cosmos/authz/v1beta1/authz.ts +++ b/libs/interchain-react/src/cosmos/authz/v1beta1/authz.ts @@ -1,5 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; +import { SendAuthorization, SendAuthorizationProtoMsg } from "../../bank/v1beta1/authz"; +import { StakeAuthorization, StakeAuthorizationProtoMsg } from "../../staking/v1beta1/authz"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; @@ -32,7 +34,7 @@ export interface GenericAuthorizationAminoMsg { * the provide method with expiration time. */ export interface Grant { - authorization?: GenericAuthorization | Any | undefined; + authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | 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` @@ -45,7 +47,7 @@ export interface GrantProtoMsg { value: Uint8Array; } export type GrantEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * Grant gives permissions to execute @@ -71,7 +73,7 @@ export interface GrantAminoMsg { export interface GrantAuthorization { granter: string; grantee: string; - authorization?: GenericAuthorization | Any | undefined; + authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | Any | undefined; expiration?: Date; } export interface GrantAuthorizationProtoMsg { @@ -79,7 +81,7 @@ export interface GrantAuthorizationProtoMsg { value: Uint8Array; } export type GrantAuthorizationEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * GrantAuthorization extends a grant with both the addresses of the grantee and granter. @@ -187,10 +189,12 @@ export const GenericAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", value: GenericAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); } }; -GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); function createBaseGrant(): Grant { return { authorization: undefined, @@ -277,10 +281,13 @@ export const Grant = { typeUrl: "/cosmos.authz.v1beta1.Grant", value: Grant.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); + SendAuthorization.registerTypeUrl(); + StakeAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Grant.typeUrl, Grant); -GlobalDecoderRegistry.registerAminoProtoMapping(Grant.aminoType, Grant.typeUrl); function createBaseGrantAuthorization(): GrantAuthorization { return { granter: "", @@ -391,10 +398,13 @@ export const GrantAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", value: GrantAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); + SendAuthorization.registerTypeUrl(); + StakeAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GrantAuthorization.typeUrl, GrantAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantAuthorization.aminoType, GrantAuthorization.typeUrl); function createBaseGrantQueueItem(): GrantQueueItem { return { msgTypeUrls: [] @@ -471,7 +481,6 @@ export const GrantQueueItem = { typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", value: GrantQueueItem.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GrantQueueItem.typeUrl, GrantQueueItem); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantQueueItem.aminoType, GrantQueueItem.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/authz/v1beta1/query.rpc.func.ts b/libs/interchain-react/src/cosmos/authz/v1beta1/query.rpc.func.ts new file mode 100644 index 00000000..a000a061 --- /dev/null +++ b/libs/interchain-react/src/cosmos/authz/v1beta1/query.rpc.func.ts @@ -0,0 +1,39 @@ +import { RpcResolver, buildQuery } from "../../../helper-func-types"; +import { buildUseQuery } from "../../../react-query"; +import { QueryGrantsRequest, QueryGrantsResponse, QueryGranterGrantsRequest, QueryGranterGrantsResponse, QueryGranteeGrantsRequest, QueryGranteeGrantsResponse } from "./query"; +export const createGetGrants = (clientResolver?: RpcResolver) => buildQuery({ + encode: QueryGrantsRequest.encode, + decode: QueryGrantsResponse.decode, + service: "cosmos.authz.v1beta1.Query", + method: "Grants", + clientResolver, + deps: [QueryGrantsRequest, QueryGrantsResponse] +}); +export const useGetGrants = buildUseQuery({ + builderQueryFn: createGetGrants, + queryKeyPrefix: "GrantsQuery" +}); +export const createGetGranterGrants = (clientResolver?: RpcResolver) => buildQuery({ + encode: QueryGranterGrantsRequest.encode, + decode: QueryGranterGrantsResponse.decode, + service: "cosmos.authz.v1beta1.Query", + method: "GranterGrants", + clientResolver, + deps: [QueryGranterGrantsRequest, QueryGranterGrantsResponse] +}); +export const useGetGranterGrants = buildUseQuery({ + builderQueryFn: createGetGranterGrants, + queryKeyPrefix: "GranterGrantsQuery" +}); +export const createGetGranteeGrants = (clientResolver?: RpcResolver) => buildQuery({ + encode: QueryGranteeGrantsRequest.encode, + decode: QueryGranteeGrantsResponse.decode, + service: "cosmos.authz.v1beta1.Query", + method: "GranteeGrants", + clientResolver, + deps: [QueryGranteeGrantsRequest, QueryGranteeGrantsResponse] +}); +export const useGetGranteeGrants = buildUseQuery({ + builderQueryFn: createGetGranteeGrants, + queryKeyPrefix: "GranteeGrantsQuery" +}); \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/authz/v1beta1/query.ts b/libs/interchain-react/src/cosmos/authz/v1beta1/query.ts new file mode 100644 index 00000000..96bc3f96 --- /dev/null +++ b/libs/interchain-react/src/cosmos/authz/v1beta1/query.ts @@ -0,0 +1,715 @@ +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; +import { Grant, GrantAmino, GrantAuthorization, GrantAuthorizationAmino } 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; +} +/** 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; +} +/** 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; +} +/** 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; +} +/** QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants 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/GranteeGrants 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; +} +/** 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; +} +function createBaseQueryGrantsRequest(): QueryGrantsRequest { + return { + granter: "", + grantee: "", + msgTypeUrl: "", + pagination: undefined + }; +} +export const QueryGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest", + aminoType: "cosmos-sdk/QueryGrantsRequest", + is(o: any): o is QueryGrantsRequest { + return o && (o.$typeUrl === QueryGrantsRequest.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msgTypeUrl === "string"); + }, + isAmino(o: any): o is QueryGrantsRequestAmino { + return o && (o.$typeUrl === QueryGrantsRequest.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msg_type_url === "string"); + }, + 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() + }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); + } +}; +function createBaseQueryGrantsResponse(): QueryGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse", + aminoType: "cosmos-sdk/QueryGrantsResponse", + is(o: any): o is QueryGrantsResponse { + return o && (o.$typeUrl === QueryGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || Grant.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGrantsResponseAmino { + return o && (o.$typeUrl === QueryGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || Grant.isAmino(o.grants[0]))); + }, + 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() + }; + }, + registerTypeUrl() { + Grant.registerTypeUrl(); + PageResponse.registerTypeUrl(); + } +}; +function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest { + return { + granter: "", + pagination: undefined + }; +} +export const QueryGranterGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest", + aminoType: "cosmos-sdk/QueryGranterGrantsRequest", + is(o: any): o is QueryGranterGrantsRequest { + return o && (o.$typeUrl === QueryGranterGrantsRequest.typeUrl || typeof o.granter === "string"); + }, + isAmino(o: any): o is QueryGranterGrantsRequestAmino { + return o && (o.$typeUrl === QueryGranterGrantsRequest.typeUrl || typeof o.granter === "string"); + }, + 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() + }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); + } +}; +function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGranterGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse", + aminoType: "cosmos-sdk/QueryGranterGrantsResponse", + is(o: any): o is QueryGranterGrantsResponse { + return o && (o.$typeUrl === QueryGranterGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGranterGrantsResponseAmino { + return o && (o.$typeUrl === QueryGranterGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.isAmino(o.grants[0]))); + }, + 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() + }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); + PageResponse.registerTypeUrl(); + } +}; +function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest { + return { + grantee: "", + pagination: undefined + }; +} +export const QueryGranteeGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest", + aminoType: "cosmos-sdk/QueryGranteeGrantsRequest", + is(o: any): o is QueryGranteeGrantsRequest { + return o && (o.$typeUrl === QueryGranteeGrantsRequest.typeUrl || typeof o.grantee === "string"); + }, + isAmino(o: any): o is QueryGranteeGrantsRequestAmino { + return o && (o.$typeUrl === QueryGranteeGrantsRequest.typeUrl || typeof o.grantee === "string"); + }, + 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() + }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); + } +}; +function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGranteeGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse", + aminoType: "cosmos-sdk/QueryGranteeGrantsResponse", + is(o: any): o is QueryGranteeGrantsResponse { + return o && (o.$typeUrl === QueryGranteeGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGranteeGrantsResponseAmino { + return o && (o.$typeUrl === QueryGranteeGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.isAmino(o.grants[0]))); + }, + 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() + }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); + PageResponse.registerTypeUrl(); + } +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts index de818f66..0f34bbad 100644 --- a/libs/interchain-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; export const createGrant = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgGrant.typeUrl, encoders: toEncoders(MsgGrant), - converters: toConverters(MsgGrant) + converters: toConverters(MsgGrant), + deps: [MsgGrant] }); export const useGrant = buildUseMutation({ builderMutationFn: createGrant @@ -15,7 +16,8 @@ export const createExec = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createExec @@ -24,7 +26,8 @@ export const createRevoke = (clientResolver?: SigningClientResolver) => buildTx< clientResolver, typeUrl: MsgRevoke.typeUrl, encoders: toEncoders(MsgRevoke), - converters: toConverters(MsgRevoke) + converters: toConverters(MsgRevoke), + deps: [MsgRevoke] }); export const useRevoke = buildUseMutation({ builderMutationFn: createRevoke diff --git a/libs/interchain-react/src/cosmos/authz/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/authz/v1beta1/tx.ts index 80640ebe..265830cc 100644 --- a/libs/interchain-react/src/cosmos/authz/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/authz/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Grant, GrantAmino } from "./authz"; import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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. @@ -237,10 +237,11 @@ export const MsgGrant = { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.encode(message).finish() }; + }, + registerTypeUrl() { + Grant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgGrant.typeUrl, MsgGrant); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrant.aminoType, MsgGrant.typeUrl); function createBaseMsgGrantResponse(): MsgGrantResponse { return {}; } @@ -302,10 +303,9 @@ export const MsgGrantResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", value: MsgGrantResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantResponse.typeUrl, MsgGrantResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantResponse.aminoType, MsgGrantResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { grantee: "", @@ -394,10 +394,9 @@ export const MsgExec = { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { results: [] @@ -474,10 +473,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgRevoke(): MsgRevoke { return { granter: "", @@ -576,10 +574,9 @@ export const MsgRevoke = { typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevoke.typeUrl, MsgRevoke); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevoke.aminoType, MsgRevoke.typeUrl); function createBaseMsgRevokeResponse(): MsgRevokeResponse { return {}; } @@ -641,7 +638,6 @@ export const MsgRevokeResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", value: MsgRevokeResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRevokeResponse.typeUrl, MsgRevokeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeResponse.aminoType, MsgRevokeResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/bank/v1beta1/authz.ts b/libs/interchain-react/src/cosmos/bank/v1beta1/authz.ts new file mode 100644 index 00000000..47807181 --- /dev/null +++ b/libs/interchain-react/src/cosmos/bank/v1beta1/authz.ts @@ -0,0 +1,141 @@ +import { Coin, CoinAmino } from "../../base/v1beta1/coin"; +import { BinaryReader, BinaryWriter } from "../../../binary"; +import { DeepPartial } from "../../../helpers"; +import { GlobalDecoderRegistry } from "../../../registry"; +/** + * SendAuthorization allows the grantee to spend up to spend_limit coins from + * the granter's account. + * + * Since: cosmos-sdk 0.43 + */ +export interface 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; +} +function createBaseSendAuthorization(): SendAuthorization { + return { + spendLimit: [], + allowList: [] + }; +} +export const SendAuthorization = { + typeUrl: "/cosmos.bank.v1beta1.SendAuthorization", + aminoType: "cosmos-sdk/SendAuthorization", + is(o: any): o is SendAuthorization { + return o && (o.$typeUrl === SendAuthorization.typeUrl || Array.isArray(o.spendLimit) && (!o.spendLimit.length || Coin.is(o.spendLimit[0])) && Array.isArray(o.allowList) && (!o.allowList.length || typeof o.allowList[0] === "string")); + }, + isAmino(o: any): o is SendAuthorizationAmino { + return o && (o.$typeUrl === SendAuthorization.typeUrl || Array.isArray(o.spend_limit) && (!o.spend_limit.length || Coin.isAmino(o.spend_limit[0])) && Array.isArray(o.allow_list) && (!o.allow_list.length || typeof o.allow_list[0] === "string")); + }, + 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() + }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SendAuthorization.typeUrl, SendAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(SendAuthorization.aminoType, SendAuthorization.typeUrl); + Coin.registerTypeUrl(); + } +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/bank/v1beta1/bank.ts b/libs/interchain-react/src/cosmos/bank/v1beta1/bank.ts index 2c115ba3..0deb436b 100644 --- a/libs/interchain-react/src/cosmos/bank/v1beta1/bank.ts +++ b/libs/interchain-react/src/cosmos/bank/v1beta1/bank.ts @@ -346,10 +346,11 @@ export const Params = { typeUrl: "/cosmos.bank.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseSendEnabled(): SendEnabled { return { denom: "", @@ -436,10 +437,9 @@ export const SendEnabled = { typeUrl: "/cosmos.bank.v1beta1.SendEnabled", value: SendEnabled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SendEnabled.typeUrl, SendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(SendEnabled.aminoType, SendEnabled.typeUrl); function createBaseInput(): Input { return { address: "", @@ -528,10 +528,11 @@ export const Input = { typeUrl: "/cosmos.bank.v1beta1.Input", value: Input.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Input.typeUrl, Input); -GlobalDecoderRegistry.registerAminoProtoMapping(Input.aminoType, Input.typeUrl); function createBaseOutput(): Output { return { address: "", @@ -620,10 +621,11 @@ export const Output = { typeUrl: "/cosmos.bank.v1beta1.Output", value: Output.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Output.typeUrl, Output); -GlobalDecoderRegistry.registerAminoProtoMapping(Output.aminoType, Output.typeUrl); function createBaseSupply(): Supply { return { total: [] @@ -700,10 +702,13 @@ export const Supply = { typeUrl: "/cosmos.bank.v1beta1.Supply", value: Supply.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(Supply.typeUrl, Supply); + GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Supply.typeUrl, Supply); -GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); function createBaseDenomUnit(): DenomUnit { return { denom: "", @@ -804,10 +809,9 @@ export const DenomUnit = { typeUrl: "/cosmos.bank.v1beta1.DenomUnit", value: DenomUnit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DenomUnit.typeUrl, DenomUnit); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomUnit.aminoType, DenomUnit.typeUrl); function createBaseMetadata(): Metadata { return { description: "", @@ -968,7 +972,8 @@ export const Metadata = { typeUrl: "/cosmos.bank.v1beta1.Metadata", value: Metadata.encode(message).finish() }; + }, + registerTypeUrl() { + DenomUnit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Metadata.typeUrl, Metadata); -GlobalDecoderRegistry.registerAminoProtoMapping(Metadata.aminoType, Metadata.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/bank/v1beta1/query.rpc.func.ts b/libs/interchain-react/src/cosmos/bank/v1beta1/query.rpc.func.ts index 3ba6a682..024880f8 100644 --- a/libs/interchain-react/src/cosmos/bank/v1beta1/query.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/bank/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetBalance = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetBalance, @@ -17,7 +18,8 @@ export const createGetAllBalances = (clientResolver?: RpcResolver) => buildQuery decode: QueryAllBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "AllBalances", - clientResolver + clientResolver, + deps: [QueryAllBalancesRequest, QueryAllBalancesResponse] }); export const useGetAllBalances = buildUseQuery({ builderQueryFn: createGetAllBalances, @@ -28,7 +30,8 @@ export const createGetSpendableBalances = (clientResolver?: RpcResolver) => buil decode: QuerySpendableBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalances", - clientResolver + clientResolver, + deps: [QuerySpendableBalancesRequest, QuerySpendableBalancesResponse] }); export const useGetSpendableBalances = buildUseQuery({ builderQueryFn: createGetSpendableBalances, @@ -39,7 +42,8 @@ export const createGetSpendableBalanceByDenom = (clientResolver?: RpcResolver) = decode: QuerySpendableBalanceByDenomResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalanceByDenom", - clientResolver + clientResolver, + deps: [QuerySpendableBalanceByDenomRequest, QuerySpendableBalanceByDenomResponse] }); export const useGetSpendableBalanceByDenom = buildUseQuery({ builderQueryFn: createGetSpendableBalanceByDenom, @@ -50,7 +54,8 @@ export const createGetTotalSupply = (clientResolver?: RpcResolver) => buildQuery decode: QueryTotalSupplyResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "TotalSupply", - clientResolver + clientResolver, + deps: [QueryTotalSupplyRequest, QueryTotalSupplyResponse] }); export const useGetTotalSupply = buildUseQuery({ builderQueryFn: createGetTotalSupply, @@ -61,7 +66,8 @@ export const createGetSupplyOf = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetSupplyOf, @@ -72,7 +78,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -83,7 +90,8 @@ export const createGetDenomMetadata = (clientResolver?: RpcResolver) => buildQue decode: QueryDenomMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadata", - clientResolver + clientResolver, + deps: [QueryDenomMetadataRequest, QueryDenomMetadataResponse] }); export const useGetDenomMetadata = buildUseQuery({ builderQueryFn: createGetDenomMetadata, @@ -94,7 +102,8 @@ export const createGetDenomMetadataByQueryString = (clientResolver?: RpcResolver decode: QueryDenomMetadataByQueryStringResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadataByQueryString", - clientResolver + clientResolver, + deps: [QueryDenomMetadataByQueryStringRequest, QueryDenomMetadataByQueryStringResponse] }); export const useGetDenomMetadataByQueryString = buildUseQuery({ builderQueryFn: createGetDenomMetadataByQueryString, @@ -105,7 +114,8 @@ export const createGetDenomsMetadata = (clientResolver?: RpcResolver) => buildQu decode: QueryDenomsMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomsMetadata", - clientResolver + clientResolver, + deps: [QueryDenomsMetadataRequest, QueryDenomsMetadataResponse] }); export const useGetDenomsMetadata = buildUseQuery({ builderQueryFn: createGetDenomsMetadata, @@ -116,7 +126,8 @@ export const createGetDenomOwners = (clientResolver?: RpcResolver) => buildQuery decode: QueryDenomOwnersResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwners", - clientResolver + clientResolver, + deps: [QueryDenomOwnersRequest, QueryDenomOwnersResponse] }); export const useGetDenomOwners = buildUseQuery({ builderQueryFn: createGetDenomOwners, @@ -127,7 +138,8 @@ export const createGetDenomOwnersByQuery = (clientResolver?: RpcResolver) => bui decode: QueryDenomOwnersByQueryResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwnersByQuery", - clientResolver + clientResolver, + deps: [QueryDenomOwnersByQueryRequest, QueryDenomOwnersByQueryResponse] }); export const useGetDenomOwnersByQuery = buildUseQuery({ builderQueryFn: createGetDenomOwnersByQuery, @@ -138,7 +150,8 @@ export const createGetSendEnabled = (clientResolver?: RpcResolver) => buildQuery decode: QuerySendEnabledResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SendEnabled", - clientResolver + clientResolver, + deps: [QuerySendEnabledRequest, QuerySendEnabledResponse] }); export const useGetSendEnabled = buildUseQuery({ builderQueryFn: createGetSendEnabled, diff --git a/libs/interchain-react/src/cosmos/bank/v1beta1/query.ts b/libs/interchain-react/src/cosmos/bank/v1beta1/query.ts index 45f3fa82..f8f232a5 100644 --- a/libs/interchain-react/src/cosmos/bank/v1beta1/query.ts +++ b/libs/interchain-react/src/cosmos/bank/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino, Metadata, MetadataAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ export interface QueryBalanceRequest { /** address is the address to query balances for. */ @@ -810,10 +809,9 @@ export const QueryBalanceRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", value: QueryBalanceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceRequest.typeUrl, QueryBalanceRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceRequest.aminoType, QueryBalanceRequest.typeUrl); function createBaseQueryBalanceResponse(): QueryBalanceResponse { return { balance: undefined @@ -888,10 +886,11 @@ export const QueryBalanceResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", value: QueryBalanceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceResponse.typeUrl, QueryBalanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceResponse.aminoType, QueryBalanceResponse.typeUrl); function createBaseQueryAllBalancesRequest(): QueryAllBalancesRequest { return { address: "", @@ -990,10 +989,11 @@ export const QueryAllBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", value: QueryAllBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesRequest.typeUrl, QueryAllBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesRequest.aminoType, QueryAllBalancesRequest.typeUrl); function createBaseQueryAllBalancesResponse(): QueryAllBalancesResponse { return { balances: [], @@ -1082,10 +1082,12 @@ export const QueryAllBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", value: QueryAllBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesResponse.typeUrl, QueryAllBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesResponse.aminoType, QueryAllBalancesResponse.typeUrl); function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { return { address: "", @@ -1172,10 +1174,11 @@ export const QuerySpendableBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", value: QuerySpendableBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesRequest.typeUrl, QuerySpendableBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesRequest.aminoType, QuerySpendableBalancesRequest.typeUrl); function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { return { balances: [], @@ -1264,10 +1267,12 @@ export const QuerySpendableBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", value: QuerySpendableBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesResponse.typeUrl, QuerySpendableBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesResponse.aminoType, QuerySpendableBalancesResponse.typeUrl); function createBaseQuerySpendableBalanceByDenomRequest(): QuerySpendableBalanceByDenomRequest { return { address: "", @@ -1354,10 +1359,9 @@ export const QuerySpendableBalanceByDenomRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", value: QuerySpendableBalanceByDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomRequest.typeUrl, QuerySpendableBalanceByDenomRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomRequest.aminoType, QuerySpendableBalanceByDenomRequest.typeUrl); function createBaseQuerySpendableBalanceByDenomResponse(): QuerySpendableBalanceByDenomResponse { return { balance: undefined @@ -1432,10 +1436,11 @@ export const QuerySpendableBalanceByDenomResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", value: QuerySpendableBalanceByDenomResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomResponse.typeUrl, QuerySpendableBalanceByDenomResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomResponse.aminoType, QuerySpendableBalanceByDenomResponse.typeUrl); function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { return { pagination: undefined @@ -1510,10 +1515,11 @@ export const QueryTotalSupplyRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", value: QueryTotalSupplyRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyRequest.typeUrl, QueryTotalSupplyRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyRequest.aminoType, QueryTotalSupplyRequest.typeUrl); function createBaseQueryTotalSupplyResponse(): QueryTotalSupplyResponse { return { supply: [], @@ -1602,10 +1608,12 @@ export const QueryTotalSupplyResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", value: QueryTotalSupplyResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyResponse.typeUrl, QueryTotalSupplyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyResponse.aminoType, QueryTotalSupplyResponse.typeUrl); function createBaseQuerySupplyOfRequest(): QuerySupplyOfRequest { return { denom: "" @@ -1680,10 +1688,9 @@ export const QuerySupplyOfRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", value: QuerySupplyOfRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySupplyOfRequest.typeUrl, QuerySupplyOfRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfRequest.aminoType, QuerySupplyOfRequest.typeUrl); function createBaseQuerySupplyOfResponse(): QuerySupplyOfResponse { return { amount: Coin.fromPartial({}) @@ -1758,10 +1765,11 @@ export const QuerySupplyOfResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", value: QuerySupplyOfResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySupplyOfResponse.typeUrl, QuerySupplyOfResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfResponse.aminoType, QuerySupplyOfResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -1823,10 +1831,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -1901,10 +1908,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDenomsMetadataRequest(): QueryDenomsMetadataRequest { return { pagination: undefined @@ -1979,10 +1987,11 @@ export const QueryDenomsMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", value: QueryDenomsMetadataRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataRequest.typeUrl, QueryDenomsMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataRequest.aminoType, QueryDenomsMetadataRequest.typeUrl); function createBaseQueryDenomsMetadataResponse(): QueryDenomsMetadataResponse { return { metadatas: [], @@ -2071,10 +2080,12 @@ export const QueryDenomsMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", value: QueryDenomsMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataResponse.typeUrl, QueryDenomsMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataResponse.aminoType, QueryDenomsMetadataResponse.typeUrl); function createBaseQueryDenomMetadataRequest(): QueryDenomMetadataRequest { return { denom: "" @@ -2149,10 +2160,9 @@ export const QueryDenomMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", value: QueryDenomMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataRequest.typeUrl, QueryDenomMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataRequest.aminoType, QueryDenomMetadataRequest.typeUrl); function createBaseQueryDenomMetadataResponse(): QueryDenomMetadataResponse { return { metadata: Metadata.fromPartial({}) @@ -2227,10 +2237,11 @@ export const QueryDenomMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", value: QueryDenomMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataResponse.typeUrl, QueryDenomMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataResponse.aminoType, QueryDenomMetadataResponse.typeUrl); function createBaseQueryDenomMetadataByQueryStringRequest(): QueryDenomMetadataByQueryStringRequest { return { denom: "" @@ -2305,10 +2316,9 @@ export const QueryDenomMetadataByQueryStringRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", value: QueryDenomMetadataByQueryStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringRequest.typeUrl, QueryDenomMetadataByQueryStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringRequest.aminoType, QueryDenomMetadataByQueryStringRequest.typeUrl); function createBaseQueryDenomMetadataByQueryStringResponse(): QueryDenomMetadataByQueryStringResponse { return { metadata: Metadata.fromPartial({}) @@ -2383,10 +2393,11 @@ export const QueryDenomMetadataByQueryStringResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", value: QueryDenomMetadataByQueryStringResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringResponse.typeUrl, QueryDenomMetadataByQueryStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringResponse.aminoType, QueryDenomMetadataByQueryStringResponse.typeUrl); function createBaseQueryDenomOwnersRequest(): QueryDenomOwnersRequest { return { denom: "", @@ -2473,10 +2484,11 @@ export const QueryDenomOwnersRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", value: QueryDenomOwnersRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersRequest.typeUrl, QueryDenomOwnersRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersRequest.aminoType, QueryDenomOwnersRequest.typeUrl); function createBaseDenomOwner(): DenomOwner { return { address: "", @@ -2563,10 +2575,11 @@ export const DenomOwner = { typeUrl: "/cosmos.bank.v1beta1.DenomOwner", value: DenomOwner.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DenomOwner.typeUrl, DenomOwner); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomOwner.aminoType, DenomOwner.typeUrl); function createBaseQueryDenomOwnersResponse(): QueryDenomOwnersResponse { return { denomOwners: [], @@ -2655,10 +2668,12 @@ export const QueryDenomOwnersResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", value: QueryDenomOwnersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersResponse.typeUrl, QueryDenomOwnersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersResponse.aminoType, QueryDenomOwnersResponse.typeUrl); function createBaseQueryDenomOwnersByQueryRequest(): QueryDenomOwnersByQueryRequest { return { denom: "", @@ -2745,10 +2760,11 @@ export const QueryDenomOwnersByQueryRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", value: QueryDenomOwnersByQueryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryRequest.typeUrl, QueryDenomOwnersByQueryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryRequest.aminoType, QueryDenomOwnersByQueryRequest.typeUrl); function createBaseQueryDenomOwnersByQueryResponse(): QueryDenomOwnersByQueryResponse { return { denomOwners: [], @@ -2837,10 +2853,12 @@ export const QueryDenomOwnersByQueryResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", value: QueryDenomOwnersByQueryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryResponse.typeUrl, QueryDenomOwnersByQueryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryResponse.aminoType, QueryDenomOwnersByQueryResponse.typeUrl); function createBaseQuerySendEnabledRequest(): QuerySendEnabledRequest { return { denoms: [], @@ -2929,10 +2947,11 @@ export const QuerySendEnabledRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledRequest", value: QuerySendEnabledRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySendEnabledRequest.typeUrl, QuerySendEnabledRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledRequest.aminoType, QuerySendEnabledRequest.typeUrl); function createBaseQuerySendEnabledResponse(): QuerySendEnabledResponse { return { sendEnabled: [], @@ -3021,7 +3040,9 @@ export const QuerySendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledResponse", value: QuerySendEnabledResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); + PageResponse.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QuerySendEnabledResponse.typeUrl, QuerySendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledResponse.aminoType, QuerySendEnabledResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts index aa76bfe3..08715cb8 100644 --- a/libs/interchain-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/bank/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSend, MsgMultiSend, MsgUpdateParams, MsgSetSendEnabled } from "./tx"; export const createSend = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSend.typeUrl, encoders: toEncoders(MsgSend), - converters: toConverters(MsgSend) + converters: toConverters(MsgSend), + deps: [MsgSend] }); export const useSend = buildUseMutation({ builderMutationFn: createSend @@ -15,7 +16,8 @@ export const createMultiSend = (clientResolver?: SigningClientResolver) => build clientResolver, typeUrl: MsgMultiSend.typeUrl, encoders: toEncoders(MsgMultiSend), - converters: toConverters(MsgMultiSend) + converters: toConverters(MsgMultiSend), + deps: [MsgMultiSend] }); export const useMultiSend = buildUseMutation({ builderMutationFn: createMultiSend @@ -24,7 +26,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -33,7 +36,8 @@ export const createSetSendEnabled = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSetSendEnabled.typeUrl, encoders: toEncoders(MsgSetSendEnabled), - converters: toConverters(MsgSetSendEnabled) + converters: toConverters(MsgSetSendEnabled), + deps: [MsgSetSendEnabled] }); export const useSetSendEnabled = buildUseMutation({ builderMutationFn: createSetSendEnabled diff --git a/libs/interchain-react/src/cosmos/bank/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/bank/v1beta1/tx.ts index afc67365..97a8d819 100644 --- a/libs/interchain-react/src/cosmos/bank/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/bank/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Input, InputAmino, Output, OutputAmino, Params, ParamsAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgSend represents a message to send coins from one account to another. */ export interface MsgSend { fromAddress: string; @@ -305,10 +304,11 @@ export const MsgSend = { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSend.typeUrl, MsgSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSend.aminoType, MsgSend.typeUrl); function createBaseMsgSendResponse(): MsgSendResponse { return {}; } @@ -370,10 +370,9 @@ export const MsgSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", value: MsgSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSendResponse.typeUrl, MsgSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSendResponse.aminoType, MsgSendResponse.typeUrl); function createBaseMsgMultiSend(): MsgMultiSend { return { inputs: [], @@ -464,10 +463,12 @@ export const MsgMultiSend = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.encode(message).finish() }; + }, + registerTypeUrl() { + Input.registerTypeUrl(); + Output.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgMultiSend.typeUrl, MsgMultiSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSend.aminoType, MsgMultiSend.typeUrl); function createBaseMsgMultiSendResponse(): MsgMultiSendResponse { return {}; } @@ -529,10 +530,9 @@ export const MsgMultiSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", value: MsgMultiSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMultiSendResponse.typeUrl, MsgMultiSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSendResponse.aminoType, MsgMultiSendResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -619,10 +619,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -684,10 +685,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSetSendEnabled(): MsgSetSendEnabled { return { authority: "", @@ -790,10 +790,11 @@ export const MsgSetSendEnabled = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", value: MsgSetSendEnabled.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSetSendEnabled.typeUrl, MsgSetSendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabled.aminoType, MsgSetSendEnabled.typeUrl); function createBaseMsgSetSendEnabledResponse(): MsgSetSendEnabledResponse { return {}; } @@ -855,7 +856,6 @@ export const MsgSetSendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", value: MsgSetSendEnabledResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgSetSendEnabledResponse.typeUrl, MsgSetSendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabledResponse.aminoType, MsgSetSendEnabledResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/base/abci/v1beta1/abci.ts b/libs/interchain-react/src/cosmos/base/abci/v1beta1/abci.ts index 06316ec9..f8346d6a 100644 --- a/libs/interchain-react/src/cosmos/base/abci/v1beta1/abci.ts +++ b/libs/interchain-react/src/cosmos/base/abci/v1beta1/abci.ts @@ -3,7 +3,6 @@ import { Event, EventAmino } from "../../../../tendermint/abci/types"; import { Block, BlockAmino } from "../../../../tendermint/types/block"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * TxResponse defines a structure containing relevant tx data and metadata. The * tags are stringified and the log is JSON decoded. @@ -644,10 +643,11 @@ export const TxResponse = { typeUrl: "/cosmos.base.abci.v1beta1.TxResponse", value: TxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResponse.typeUrl, TxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxResponse.aminoType, TxResponse.typeUrl); function createBaseABCIMessageLog(): ABCIMessageLog { return { msgIndex: 0, @@ -748,10 +748,11 @@ export const ABCIMessageLog = { typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog", value: ABCIMessageLog.encode(message).finish() }; + }, + registerTypeUrl() { + StringEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ABCIMessageLog.typeUrl, ABCIMessageLog); -GlobalDecoderRegistry.registerAminoProtoMapping(ABCIMessageLog.aminoType, ABCIMessageLog.typeUrl); function createBaseStringEvent(): StringEvent { return { type: "", @@ -840,10 +841,11 @@ export const StringEvent = { typeUrl: "/cosmos.base.abci.v1beta1.StringEvent", value: StringEvent.encode(message).finish() }; + }, + registerTypeUrl() { + Attribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StringEvent.typeUrl, StringEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(StringEvent.aminoType, StringEvent.typeUrl); function createBaseAttribute(): Attribute { return { key: "", @@ -930,10 +932,9 @@ export const Attribute = { typeUrl: "/cosmos.base.abci.v1beta1.Attribute", value: Attribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Attribute.typeUrl, Attribute); -GlobalDecoderRegistry.registerAminoProtoMapping(Attribute.aminoType, Attribute.typeUrl); function createBaseGasInfo(): GasInfo { return { gasWanted: BigInt(0), @@ -1020,10 +1021,9 @@ export const GasInfo = { typeUrl: "/cosmos.base.abci.v1beta1.GasInfo", value: GasInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GasInfo.typeUrl, GasInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GasInfo.aminoType, GasInfo.typeUrl); function createBaseResult(): Result { return { data: new Uint8Array(), @@ -1138,10 +1138,9 @@ export const Result = { typeUrl: "/cosmos.base.abci.v1beta1.Result", value: Result.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Result.typeUrl, Result); -GlobalDecoderRegistry.registerAminoProtoMapping(Result.aminoType, Result.typeUrl); function createBaseSimulationResponse(): SimulationResponse { return { gasInfo: GasInfo.fromPartial({}), @@ -1228,10 +1227,12 @@ export const SimulationResponse = { typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse", value: SimulationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulationResponse.typeUrl, SimulationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulationResponse.aminoType, SimulationResponse.typeUrl); function createBaseMsgData(): MsgData { return { msgType: "", @@ -1318,10 +1319,9 @@ export const MsgData = { typeUrl: "/cosmos.base.abci.v1beta1.MsgData", value: MsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgData.typeUrl, MsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgData.aminoType, MsgData.typeUrl); function createBaseTxMsgData(): TxMsgData { return { data: [], @@ -1412,10 +1412,9 @@ export const TxMsgData = { typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData", value: TxMsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxMsgData.typeUrl, TxMsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(TxMsgData.aminoType, TxMsgData.typeUrl); function createBaseSearchTxsResult(): SearchTxsResult { return { totalCount: BigInt(0), @@ -1552,10 +1551,11 @@ export const SearchTxsResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult", value: SearchTxsResult.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SearchTxsResult.typeUrl, SearchTxsResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchTxsResult.aminoType, SearchTxsResult.typeUrl); function createBaseSearchBlocksResult(): SearchBlocksResult { return { totalCount: BigInt(0), @@ -1692,7 +1692,8 @@ export const SearchBlocksResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchBlocksResult", value: SearchBlocksResult.encode(message).finish() }; + }, + registerTypeUrl() { + Block.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SearchBlocksResult.typeUrl, SearchBlocksResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchBlocksResult.aminoType, SearchBlocksResult.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/base/query/v1beta1/pagination.ts b/libs/interchain-react/src/cosmos/base/query/v1beta1/pagination.ts index 35272ec2..c0f45d3f 100644 --- a/libs/interchain-react/src/cosmos/base/query/v1beta1/pagination.ts +++ b/libs/interchain-react/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * PageRequest is to be embedded in gRPC request messages for efficient * pagination. Ex: @@ -265,10 +264,9 @@ export const PageRequest = { typeUrl: "/cosmos.base.query.v1beta1.PageRequest", value: PageRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PageRequest.typeUrl, PageRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(PageRequest.aminoType, PageRequest.typeUrl); function createBasePageResponse(): PageResponse { return { nextKey: new Uint8Array(), @@ -355,7 +353,6 @@ export const PageResponse = { typeUrl: "/cosmos.base.query.v1beta1.PageResponse", value: PageResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PageResponse.typeUrl, PageResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(PageResponse.aminoType, PageResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/base/v1beta1/coin.ts b/libs/interchain-react/src/cosmos/base/v1beta1/coin.ts index 155e8009..1b5f5906 100644 --- a/libs/interchain-react/src/cosmos/base/v1beta1/coin.ts +++ b/libs/interchain-react/src/cosmos/base/v1beta1/coin.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * Coin defines a token with a denomination and an amount. * @@ -187,10 +186,9 @@ export const Coin = { typeUrl: "/cosmos.base.v1beta1.Coin", value: Coin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Coin.typeUrl, Coin); -GlobalDecoderRegistry.registerAminoProtoMapping(Coin.aminoType, Coin.typeUrl); function createBaseDecCoin(): DecCoin { return { denom: "", @@ -277,10 +275,9 @@ export const DecCoin = { typeUrl: "/cosmos.base.v1beta1.DecCoin", value: DecCoin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecCoin.typeUrl, DecCoin); -GlobalDecoderRegistry.registerAminoProtoMapping(DecCoin.aminoType, DecCoin.typeUrl); function createBaseIntProto(): IntProto { return { int: "" @@ -355,10 +352,9 @@ export const IntProto = { typeUrl: "/cosmos.base.v1beta1.IntProto", value: IntProto.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IntProto.typeUrl, IntProto); -GlobalDecoderRegistry.registerAminoProtoMapping(IntProto.aminoType, IntProto.typeUrl); function createBaseDecProto(): DecProto { return { dec: "" @@ -433,7 +429,6 @@ export const DecProto = { typeUrl: "/cosmos.base.v1beta1.DecProto", value: DecProto.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(DecProto.typeUrl, DecProto); -GlobalDecoderRegistry.registerAminoProtoMapping(DecProto.aminoType, DecProto.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/crypto/ed25519/keys.ts b/libs/interchain-react/src/cosmos/crypto/ed25519/keys.ts index 6f544d77..5b8f8515 100644 --- a/libs/interchain-react/src/cosmos/crypto/ed25519/keys.ts +++ b/libs/interchain-react/src/cosmos/crypto/ed25519/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. * It's needed for Any serialization and SDK compatibility. @@ -125,10 +124,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.ed25519.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -203,7 +201,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.ed25519.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/libs/interchain-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 1d46639b..e8a32786 100644 --- a/libs/interchain-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/libs/interchain-react/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers @@ -129,10 +128,9 @@ export const MultiSignature = { typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature", value: MultiSignature.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MultiSignature.typeUrl, MultiSignature); -GlobalDecoderRegistry.registerAminoProtoMapping(MultiSignature.aminoType, MultiSignature.typeUrl); function createBaseCompactBitArray(): CompactBitArray { return { extraBitsStored: 0, @@ -219,7 +217,6 @@ export const CompactBitArray = { typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray", value: CompactBitArray.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CompactBitArray.typeUrl, CompactBitArray); -GlobalDecoderRegistry.registerAminoProtoMapping(CompactBitArray.aminoType, CompactBitArray.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/crypto/secp256k1/keys.ts b/libs/interchain-react/src/cosmos/crypto/secp256k1/keys.ts index c0fdd0ac..423d256f 100644 --- a/libs/interchain-react/src/cosmos/crypto/secp256k1/keys.ts +++ b/libs/interchain-react/src/cosmos/crypto/secp256k1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey defines a secp256k1 public key * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte @@ -119,10 +118,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256k1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -197,7 +195,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256k1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/crypto/secp256r1/keys.ts b/libs/interchain-react/src/cosmos/crypto/secp256r1/keys.ts index 6b1edf68..15e905e3 100644 --- a/libs/interchain-react/src/cosmos/crypto/secp256r1/keys.ts +++ b/libs/interchain-react/src/cosmos/crypto/secp256r1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** PubKey defines a secp256r1 ECDSA public key. */ export interface PubKey { /** @@ -117,10 +116,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256r1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { secret: new Uint8Array() @@ -195,7 +193,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256r1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/distribution/v1beta1/distribution.ts b/libs/interchain-react/src/cosmos/distribution/v1beta1/distribution.ts index fdf747a5..a9de2203 100644 --- a/libs/interchain-react/src/cosmos/distribution/v1beta1/distribution.ts +++ b/libs/interchain-react/src/cosmos/distribution/v1beta1/distribution.ts @@ -458,10 +458,9 @@ export const Params = { typeUrl: "/cosmos.distribution.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards { return { cumulativeRewardRatio: [], @@ -550,10 +549,11 @@ export const ValidatorHistoricalRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", value: ValidatorHistoricalRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorHistoricalRewards.typeUrl, ValidatorHistoricalRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorHistoricalRewards.aminoType, ValidatorHistoricalRewards.typeUrl); function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards { return { rewards: [], @@ -642,10 +642,11 @@ export const ValidatorCurrentRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", value: ValidatorCurrentRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorCurrentRewards.typeUrl, ValidatorCurrentRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorCurrentRewards.aminoType, ValidatorCurrentRewards.typeUrl); function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission { return { commission: [] @@ -722,10 +723,11 @@ export const ValidatorAccumulatedCommission = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", value: ValidatorAccumulatedCommission.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorAccumulatedCommission.typeUrl, ValidatorAccumulatedCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorAccumulatedCommission.aminoType, ValidatorAccumulatedCommission.typeUrl); function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards { return { rewards: [] @@ -802,10 +804,11 @@ export const ValidatorOutstandingRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", value: ValidatorOutstandingRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorOutstandingRewards.typeUrl, ValidatorOutstandingRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorOutstandingRewards.aminoType, ValidatorOutstandingRewards.typeUrl); function createBaseValidatorSlashEvent(): ValidatorSlashEvent { return { validatorPeriod: BigInt(0), @@ -892,10 +895,9 @@ export const ValidatorSlashEvent = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", value: ValidatorSlashEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorSlashEvent.typeUrl, ValidatorSlashEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvent.aminoType, ValidatorSlashEvent.typeUrl); function createBaseValidatorSlashEvents(): ValidatorSlashEvents { return { validatorSlashEvents: [] @@ -972,10 +974,11 @@ export const ValidatorSlashEvents = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", value: ValidatorSlashEvents.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorSlashEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSlashEvents.typeUrl, ValidatorSlashEvents); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvents.aminoType, ValidatorSlashEvents.typeUrl); function createBaseFeePool(): FeePool { return { communityPool: [] @@ -1052,10 +1055,11 @@ export const FeePool = { typeUrl: "/cosmos.distribution.v1beta1.FeePool", value: FeePool.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeePool.typeUrl, FeePool); -GlobalDecoderRegistry.registerAminoProtoMapping(FeePool.aminoType, FeePool.typeUrl); function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal { return { title: "", @@ -1168,10 +1172,13 @@ export const CommunityPoolSpendProposal = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", value: CommunityPoolSpendProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); function createBaseDelegatorStartingInfo(): DelegatorStartingInfo { return { previousPeriod: BigInt(0), @@ -1270,10 +1277,9 @@ export const DelegatorStartingInfo = { typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", value: DelegatorStartingInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DelegatorStartingInfo.typeUrl, DelegatorStartingInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegatorStartingInfo.aminoType, DelegatorStartingInfo.typeUrl); function createBaseDelegationDelegatorReward(): DelegationDelegatorReward { return { validatorAddress: "", @@ -1362,10 +1368,11 @@ export const DelegationDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", value: DelegationDelegatorReward.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationDelegatorReward.typeUrl, DelegationDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationDelegatorReward.aminoType, DelegationDelegatorReward.typeUrl); function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit { return { title: "", @@ -1488,7 +1495,9 @@ export const CommunityPoolSpendProposalWithDeposit = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", value: CommunityPoolSpendProposalWithDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); } -}; -GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts index 79204615..026741df 100644 --- a/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgUpdateParams, MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool } from "./tx"; export const createSetWithdrawAddress = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSetWithdrawAddress.typeUrl, encoders: toEncoders(MsgSetWithdrawAddress), - converters: toConverters(MsgSetWithdrawAddress) + converters: toConverters(MsgSetWithdrawAddress), + deps: [MsgSetWithdrawAddress] }); export const useSetWithdrawAddress = buildUseMutation({ builderMutationFn: createSetWithdrawAddress @@ -15,7 +16,8 @@ export const createWithdrawDelegatorReward = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgWithdrawDelegatorReward.typeUrl, encoders: toEncoders(MsgWithdrawDelegatorReward), - converters: toConverters(MsgWithdrawDelegatorReward) + converters: toConverters(MsgWithdrawDelegatorReward), + deps: [MsgWithdrawDelegatorReward] }); export const useWithdrawDelegatorReward = buildUseMutation({ builderMutationFn: createWithdrawDelegatorReward @@ -24,7 +26,8 @@ export const createWithdrawValidatorCommission = (clientResolver?: SigningClient clientResolver, typeUrl: MsgWithdrawValidatorCommission.typeUrl, encoders: toEncoders(MsgWithdrawValidatorCommission), - converters: toConverters(MsgWithdrawValidatorCommission) + converters: toConverters(MsgWithdrawValidatorCommission), + deps: [MsgWithdrawValidatorCommission] }); export const useWithdrawValidatorCommission = buildUseMutation({ builderMutationFn: createWithdrawValidatorCommission @@ -33,7 +36,8 @@ export const createFundCommunityPool = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgFundCommunityPool.typeUrl, encoders: toEncoders(MsgFundCommunityPool), - converters: toConverters(MsgFundCommunityPool) + converters: toConverters(MsgFundCommunityPool), + deps: [MsgFundCommunityPool] }); export const useFundCommunityPool = buildUseMutation({ builderMutationFn: createFundCommunityPool @@ -42,7 +46,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -51,7 +56,8 @@ export const createCommunityPoolSpend = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgCommunityPoolSpend.typeUrl, encoders: toEncoders(MsgCommunityPoolSpend), - converters: toConverters(MsgCommunityPoolSpend) + converters: toConverters(MsgCommunityPoolSpend), + deps: [MsgCommunityPoolSpend] }); export const useCommunityPoolSpend = buildUseMutation({ builderMutationFn: createCommunityPoolSpend @@ -60,7 +66,8 @@ export const createDepositValidatorRewardsPool = (clientResolver?: SigningClient clientResolver, typeUrl: MsgDepositValidatorRewardsPool.typeUrl, encoders: toEncoders(MsgDepositValidatorRewardsPool), - converters: toConverters(MsgDepositValidatorRewardsPool) + converters: toConverters(MsgDepositValidatorRewardsPool), + deps: [MsgDepositValidatorRewardsPool] }); export const useDepositValidatorRewardsPool = buildUseMutation({ builderMutationFn: createDepositValidatorRewardsPool diff --git a/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.ts index 64517d0b..565af23f 100644 --- a/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/distribution/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino } from "./distribution"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). @@ -429,10 +428,9 @@ export const MsgSetWithdrawAddress = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddress.typeUrl, MsgSetWithdrawAddress); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddress.aminoType, MsgSetWithdrawAddress.typeUrl); function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse { return {}; } @@ -494,10 +492,9 @@ export const MsgSetWithdrawAddressResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", value: MsgSetWithdrawAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddressResponse.typeUrl, MsgSetWithdrawAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddressResponse.aminoType, MsgSetWithdrawAddressResponse.typeUrl); function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { return { delegatorAddress: "", @@ -584,10 +581,9 @@ export const MsgWithdrawDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorReward.typeUrl, MsgWithdrawDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorReward.aminoType, MsgWithdrawDelegatorReward.typeUrl); function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse { return { amount: [] @@ -664,10 +660,11 @@ export const MsgWithdrawDelegatorRewardResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", value: MsgWithdrawDelegatorRewardResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorRewardResponse.typeUrl, MsgWithdrawDelegatorRewardResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorRewardResponse.aminoType, MsgWithdrawDelegatorRewardResponse.typeUrl); function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { return { validatorAddress: "" @@ -742,10 +739,9 @@ export const MsgWithdrawValidatorCommission = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommission.typeUrl, MsgWithdrawValidatorCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommission.aminoType, MsgWithdrawValidatorCommission.typeUrl); function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse { return { amount: [] @@ -822,10 +818,11 @@ export const MsgWithdrawValidatorCommissionResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", value: MsgWithdrawValidatorCommissionResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommissionResponse.typeUrl, MsgWithdrawValidatorCommissionResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommissionResponse.aminoType, MsgWithdrawValidatorCommissionResponse.typeUrl); function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { return { amount: [], @@ -914,10 +911,11 @@ export const MsgFundCommunityPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgFundCommunityPool.typeUrl, MsgFundCommunityPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPool.aminoType, MsgFundCommunityPool.typeUrl); function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse { return {}; } @@ -979,10 +977,9 @@ export const MsgFundCommunityPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", value: MsgFundCommunityPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgFundCommunityPoolResponse.typeUrl, MsgFundCommunityPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPoolResponse.aminoType, MsgFundCommunityPoolResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1069,10 +1066,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1134,10 +1132,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCommunityPoolSpend(): MsgCommunityPoolSpend { return { authority: "", @@ -1238,10 +1235,11 @@ export const MsgCommunityPoolSpend = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", value: MsgCommunityPoolSpend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpend.typeUrl, MsgCommunityPoolSpend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpend.aminoType, MsgCommunityPoolSpend.typeUrl); function createBaseMsgCommunityPoolSpendResponse(): MsgCommunityPoolSpendResponse { return {}; } @@ -1303,10 +1301,9 @@ export const MsgCommunityPoolSpendResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", value: MsgCommunityPoolSpendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpendResponse.typeUrl, MsgCommunityPoolSpendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpendResponse.aminoType, MsgCommunityPoolSpendResponse.typeUrl); function createBaseMsgDepositValidatorRewardsPool(): MsgDepositValidatorRewardsPool { return { depositor: "", @@ -1407,10 +1404,11 @@ export const MsgDepositValidatorRewardsPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", value: MsgDepositValidatorRewardsPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPool.typeUrl, MsgDepositValidatorRewardsPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPool.aminoType, MsgDepositValidatorRewardsPool.typeUrl); function createBaseMsgDepositValidatorRewardsPoolResponse(): MsgDepositValidatorRewardsPoolResponse { return {}; } @@ -1472,7 +1470,6 @@ export const MsgDepositValidatorRewardsPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", value: MsgDepositValidatorRewardsPoolResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPoolResponse.typeUrl, MsgDepositValidatorRewardsPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPoolResponse.aminoType, MsgDepositValidatorRewardsPoolResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts index 3cfc4271..70353a74 100644 --- a/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgGrantAllowance, MsgRevokeAllowance, MsgPruneAllowances } from "./tx"; export const createGrantAllowance = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgGrantAllowance.typeUrl, encoders: toEncoders(MsgGrantAllowance), - converters: toConverters(MsgGrantAllowance) + converters: toConverters(MsgGrantAllowance), + deps: [MsgGrantAllowance] }); export const useGrantAllowance = buildUseMutation({ builderMutationFn: createGrantAllowance @@ -15,7 +16,8 @@ export const createRevokeAllowance = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgRevokeAllowance.typeUrl, encoders: toEncoders(MsgRevokeAllowance), - converters: toConverters(MsgRevokeAllowance) + converters: toConverters(MsgRevokeAllowance), + deps: [MsgRevokeAllowance] }); export const useRevokeAllowance = buildUseMutation({ builderMutationFn: createRevokeAllowance @@ -24,7 +26,8 @@ export const createPruneAllowances = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgPruneAllowances.typeUrl, encoders: toEncoders(MsgPruneAllowances), - converters: toConverters(MsgPruneAllowances) + converters: toConverters(MsgPruneAllowances), + deps: [MsgPruneAllowances] }); export const usePruneAllowances = buildUseMutation({ builderMutationFn: createPruneAllowances diff --git a/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.ts index 9e674784..e5fd3d32 100644 --- a/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance * of fees from the account of Granter. @@ -227,10 +227,9 @@ export const MsgGrantAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowance.typeUrl, MsgGrantAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowance.aminoType, MsgGrantAllowance.typeUrl); function createBaseMsgGrantAllowanceResponse(): MsgGrantAllowanceResponse { return {}; } @@ -292,10 +291,9 @@ export const MsgGrantAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", value: MsgGrantAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowanceResponse.typeUrl, MsgGrantAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowanceResponse.aminoType, MsgGrantAllowanceResponse.typeUrl); function createBaseMsgRevokeAllowance(): MsgRevokeAllowance { return { granter: "", @@ -382,10 +380,9 @@ export const MsgRevokeAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowance.typeUrl, MsgRevokeAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowance.aminoType, MsgRevokeAllowance.typeUrl); function createBaseMsgRevokeAllowanceResponse(): MsgRevokeAllowanceResponse { return {}; } @@ -447,10 +444,9 @@ export const MsgRevokeAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", value: MsgRevokeAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowanceResponse.typeUrl, MsgRevokeAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowanceResponse.aminoType, MsgRevokeAllowanceResponse.typeUrl); function createBaseMsgPruneAllowances(): MsgPruneAllowances { return { pruner: "" @@ -525,10 +521,9 @@ export const MsgPruneAllowances = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances", value: MsgPruneAllowances.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAllowances.typeUrl, MsgPruneAllowances); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowances.aminoType, MsgPruneAllowances.typeUrl); function createBaseMsgPruneAllowancesResponse(): MsgPruneAllowancesResponse { return {}; } @@ -590,7 +585,6 @@ export const MsgPruneAllowancesResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", value: MsgPruneAllowancesResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAllowancesResponse.typeUrl, MsgPruneAllowancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowancesResponse.aminoType, MsgPruneAllowancesResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/gov/v1/gov.ts b/libs/interchain-react/src/cosmos/gov/v1/gov.ts index 434920f3..d762a109 100644 --- a/libs/interchain-react/src/cosmos/gov/v1/gov.ts +++ b/libs/interchain-react/src/cosmos/gov/v1/gov.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** VoteOption enumerates the valid vote options for a given governance proposal. */ export enum VoteOption { /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ @@ -719,10 +718,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -823,10 +821,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1073,10 +1072,12 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1187,10 +1188,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1303,10 +1303,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1395,10 +1396,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: undefined @@ -1473,10 +1475,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: "", @@ -1575,10 +1576,9 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1.TallyParams", value: TallyParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); function createBaseParams(): Params { return { minDeposit: [], @@ -1837,7 +1837,8 @@ export const Params = { typeUrl: "/cosmos.gov.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/gov/v1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/gov/v1/tx.rpc.func.ts index cb094f2e..1e23e126 100644 --- a/libs/interchain-react/src/cosmos/gov/v1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/gov/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSubmitProposal, MsgExecLegacyContent, MsgVote, MsgVoteWeighted, MsgDeposit, MsgUpdateParams, MsgCancelProposal } from "./tx"; export const createSubmitProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const useSubmitProposal = buildUseMutation({ builderMutationFn: createSubmitProposal @@ -15,7 +16,8 @@ export const createExecLegacyContent = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgExecLegacyContent.typeUrl, encoders: toEncoders(MsgExecLegacyContent), - converters: toConverters(MsgExecLegacyContent) + converters: toConverters(MsgExecLegacyContent), + deps: [MsgExecLegacyContent] }); export const useExecLegacyContent = buildUseMutation({ builderMutationFn: createExecLegacyContent @@ -24,7 +26,8 @@ export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createVote @@ -33,7 +36,8 @@ export const createVoteWeighted = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const useVoteWeighted = buildUseMutation({ builderMutationFn: createVoteWeighted @@ -42,7 +46,8 @@ export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const useDeposit = buildUseMutation({ builderMutationFn: createDeposit @@ -51,7 +56,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -60,7 +66,8 @@ export const createCancelProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgCancelProposal.typeUrl, encoders: toEncoders(MsgCancelProposal), - converters: toConverters(MsgCancelProposal) + converters: toConverters(MsgCancelProposal), + deps: [MsgCancelProposal] }); export const useCancelProposal = buildUseMutation({ builderMutationFn: createCancelProposal diff --git a/libs/interchain-react/src/cosmos/gov/v1/tx.ts b/libs/interchain-react/src/cosmos/gov/v1/tx.ts index d74ae580..37a98573 100644 --- a/libs/interchain-react/src/cosmos/gov/v1/tx.ts +++ b/libs/interchain-react/src/cosmos/gov/v1/tx.ts @@ -539,10 +539,11 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -617,10 +618,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgExecLegacyContent(): MsgExecLegacyContent { return { content: undefined, @@ -707,10 +707,15 @@ export const MsgExecLegacyContent = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", value: MsgExecLegacyContent.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecLegacyContent.typeUrl, MsgExecLegacyContent); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContent.aminoType, MsgExecLegacyContent.typeUrl); function createBaseMsgExecLegacyContentResponse(): MsgExecLegacyContentResponse { return {}; } @@ -772,10 +777,9 @@ export const MsgExecLegacyContentResponse = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", value: MsgExecLegacyContentResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecLegacyContentResponse.typeUrl, MsgExecLegacyContentResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContentResponse.aminoType, MsgExecLegacyContentResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -886,10 +890,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -951,10 +954,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -1067,10 +1069,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -1132,10 +1135,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -1236,10 +1238,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -1301,10 +1304,9 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1391,10 +1393,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.gov.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1456,10 +1459,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.gov.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCancelProposal(): MsgCancelProposal { return { proposalId: BigInt(0), @@ -1546,10 +1548,9 @@ export const MsgCancelProposal = { typeUrl: "/cosmos.gov.v1.MsgCancelProposal", value: MsgCancelProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelProposal.typeUrl, MsgCancelProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposal.aminoType, MsgCancelProposal.typeUrl); function createBaseMsgCancelProposalResponse(): MsgCancelProposalResponse { return { proposalId: BigInt(0), @@ -1648,7 +1649,6 @@ export const MsgCancelProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgCancelProposalResponse", value: MsgCancelProposalResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCancelProposalResponse.typeUrl, MsgCancelProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposalResponse.aminoType, MsgCancelProposalResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/gov/v1beta1/gov.ts b/libs/interchain-react/src/cosmos/gov/v1beta1/gov.ts index 1877915d..445e4fc6 100644 --- a/libs/interchain-react/src/cosmos/gov/v1beta1/gov.ts +++ b/libs/interchain-react/src/cosmos/gov/v1beta1/gov.ts @@ -544,10 +544,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseTextProposal(): TextProposal { return { title: "", @@ -634,10 +633,12 @@ export const TextProposal = { typeUrl: "/cosmos.gov.v1beta1.TextProposal", value: TextProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); } }; -GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -738,10 +739,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1beta1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { proposalId: BigInt(0), @@ -914,10 +916,17 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1beta1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TextProposal.registerTypeUrl(); + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yes: "", @@ -1028,10 +1037,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1beta1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1144,10 +1152,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1beta1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1236,10 +1245,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1beta1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: Duration.fromPartial({}) @@ -1314,10 +1324,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1beta1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: new Uint8Array(), @@ -1416,7 +1425,6 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1beta1.TallyParams", value: TallyParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/gov/v1beta1/query.rpc.func.ts b/libs/interchain-react/src/cosmos/gov/v1beta1/query.rpc.func.ts index 5add14c4..fc5de4b2 100644 --- a/libs/interchain-react/src/cosmos/gov/v1beta1/query.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/gov/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetProposal = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetProposal, @@ -17,7 +18,8 @@ export const createGetProposals = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetProposals, @@ -28,7 +30,8 @@ export const createGetVote = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetVote, @@ -39,7 +42,8 @@ export const createGetVotes = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetVotes, @@ -50,7 +54,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -61,7 +66,8 @@ export const createGetDeposit = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetDeposit, @@ -72,7 +78,8 @@ export const createGetDeposits = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetDeposits, @@ -83,7 +90,8 @@ export const createGetTallyResult = (clientResolver?: RpcResolver) => buildQuery decode: QueryTallyResultResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "TallyResult", - clientResolver + clientResolver, + deps: [QueryTallyResultRequest, QueryTallyResultResponse] }); export const useGetTallyResult = buildUseQuery({ builderQueryFn: createGetTallyResult, diff --git a/libs/interchain-react/src/cosmos/gov/v1beta1/query.ts b/libs/interchain-react/src/cosmos/gov/v1beta1/query.ts index 15053043..d4419837 100644 --- a/libs/interchain-react/src/cosmos/gov/v1beta1/query.ts +++ b/libs/interchain-react/src/cosmos/gov/v1beta1/query.ts @@ -2,7 +2,6 @@ import { ProposalStatus, Proposal, ProposalAmino, Vote, VoteAmino, VotingParams, import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ export interface QueryProposalRequest { /** proposal_id defines the unique id of the proposal. */ @@ -423,10 +422,9 @@ export const QueryProposalRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", value: QueryProposalRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryProposalRequest.typeUrl, QueryProposalRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalRequest.aminoType, QueryProposalRequest.typeUrl); function createBaseQueryProposalResponse(): QueryProposalResponse { return { proposal: Proposal.fromPartial({}) @@ -501,10 +499,11 @@ export const QueryProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", value: QueryProposalResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalResponse.typeUrl, QueryProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalResponse.aminoType, QueryProposalResponse.typeUrl); function createBaseQueryProposalsRequest(): QueryProposalsRequest { return { proposalStatus: 0, @@ -615,10 +614,11 @@ export const QueryProposalsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", value: QueryProposalsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsRequest.typeUrl, QueryProposalsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsRequest.aminoType, QueryProposalsRequest.typeUrl); function createBaseQueryProposalsResponse(): QueryProposalsResponse { return { proposals: [], @@ -707,10 +707,12 @@ export const QueryProposalsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", value: QueryProposalsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsResponse.typeUrl, QueryProposalsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsResponse.aminoType, QueryProposalsResponse.typeUrl); function createBaseQueryVoteRequest(): QueryVoteRequest { return { proposalId: BigInt(0), @@ -797,10 +799,9 @@ export const QueryVoteRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", value: QueryVoteRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryVoteRequest.typeUrl, QueryVoteRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteRequest.aminoType, QueryVoteRequest.typeUrl); function createBaseQueryVoteResponse(): QueryVoteResponse { return { vote: Vote.fromPartial({}) @@ -875,10 +876,11 @@ export const QueryVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", value: QueryVoteResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVoteResponse.typeUrl, QueryVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteResponse.aminoType, QueryVoteResponse.typeUrl); function createBaseQueryVotesRequest(): QueryVotesRequest { return { proposalId: BigInt(0), @@ -965,10 +967,11 @@ export const QueryVotesRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", value: QueryVotesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesRequest.typeUrl, QueryVotesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesRequest.aminoType, QueryVotesRequest.typeUrl); function createBaseQueryVotesResponse(): QueryVotesResponse { return { votes: [], @@ -1057,10 +1060,12 @@ export const QueryVotesResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", value: QueryVotesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesResponse.typeUrl, QueryVotesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesResponse.aminoType, QueryVotesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return { paramsType: "" @@ -1135,10 +1140,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { votingParams: VotingParams.fromPartial({}), @@ -1237,10 +1241,13 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + VotingParams.registerTypeUrl(); + DepositParams.registerTypeUrl(); + TallyParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDepositRequest(): QueryDepositRequest { return { proposalId: BigInt(0), @@ -1327,10 +1334,9 @@ export const QueryDepositRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", value: QueryDepositRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDepositRequest.typeUrl, QueryDepositRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositRequest.aminoType, QueryDepositRequest.typeUrl); function createBaseQueryDepositResponse(): QueryDepositResponse { return { deposit: Deposit.fromPartial({}) @@ -1405,10 +1411,11 @@ export const QueryDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", value: QueryDepositResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositResponse.typeUrl, QueryDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositResponse.aminoType, QueryDepositResponse.typeUrl); function createBaseQueryDepositsRequest(): QueryDepositsRequest { return { proposalId: BigInt(0), @@ -1495,10 +1502,11 @@ export const QueryDepositsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", value: QueryDepositsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsRequest.typeUrl, QueryDepositsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsRequest.aminoType, QueryDepositsRequest.typeUrl); function createBaseQueryDepositsResponse(): QueryDepositsResponse { return { deposits: [], @@ -1587,10 +1595,12 @@ export const QueryDepositsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", value: QueryDepositsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsResponse.typeUrl, QueryDepositsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsResponse.aminoType, QueryDepositsResponse.typeUrl); function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { return { proposalId: BigInt(0) @@ -1665,10 +1675,9 @@ export const QueryTallyResultRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", value: QueryTallyResultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTallyResultRequest.typeUrl, QueryTallyResultRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultRequest.aminoType, QueryTallyResultRequest.typeUrl); function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { return { tally: TallyResult.fromPartial({}) @@ -1743,7 +1752,8 @@ export const QueryTallyResultResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", value: QueryTallyResultResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryTallyResultResponse.typeUrl, QueryTallyResultResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultResponse.aminoType, QueryTallyResultResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts index ff3449ec..3dcafe92 100644 --- a/libs/interchain-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/gov/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; export const createSubmitProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const useSubmitProposal = buildUseMutation({ builderMutationFn: createSubmitProposal @@ -15,7 +16,8 @@ export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createVote @@ -24,7 +26,8 @@ export const createVoteWeighted = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const useVoteWeighted = buildUseMutation({ builderMutationFn: createVoteWeighted @@ -33,7 +36,8 @@ export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const useDeposit = buildUseMutation({ builderMutationFn: createDeposit diff --git a/libs/interchain-react/src/cosmos/gov/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/gov/v1beta1/tx.ts index 778766a5..0b6f8c4d 100644 --- a/libs/interchain-react/src/cosmos/gov/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/gov/v1beta1/tx.ts @@ -4,8 +4,8 @@ import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, TextProposal, import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution"; import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary * proposal Content. @@ -289,10 +289,16 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -367,10 +373,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -469,10 +474,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -534,10 +538,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -638,10 +641,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -703,10 +707,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -807,10 +810,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -872,7 +876,6 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/group/v1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/group/v1/tx.rpc.func.ts index 95673a00..c580c689 100644 --- a/libs/interchain-react/src/cosmos/group/v1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/group/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup } from "./tx"; export const createCreateGroup = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateGroup.typeUrl, encoders: toEncoders(MsgCreateGroup), - converters: toConverters(MsgCreateGroup) + converters: toConverters(MsgCreateGroup), + deps: [MsgCreateGroup] }); export const useCreateGroup = buildUseMutation({ builderMutationFn: createCreateGroup @@ -15,7 +16,8 @@ export const createUpdateGroupMembers = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgUpdateGroupMembers.typeUrl, encoders: toEncoders(MsgUpdateGroupMembers), - converters: toConverters(MsgUpdateGroupMembers) + converters: toConverters(MsgUpdateGroupMembers), + deps: [MsgUpdateGroupMembers] }); export const useUpdateGroupMembers = buildUseMutation({ builderMutationFn: createUpdateGroupMembers @@ -24,7 +26,8 @@ export const createUpdateGroupAdmin = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgUpdateGroupAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupAdmin), - converters: toConverters(MsgUpdateGroupAdmin) + converters: toConverters(MsgUpdateGroupAdmin), + deps: [MsgUpdateGroupAdmin] }); export const useUpdateGroupAdmin = buildUseMutation({ builderMutationFn: createUpdateGroupAdmin @@ -33,7 +36,8 @@ export const createUpdateGroupMetadata = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgUpdateGroupMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupMetadata), - converters: toConverters(MsgUpdateGroupMetadata) + converters: toConverters(MsgUpdateGroupMetadata), + deps: [MsgUpdateGroupMetadata] }); export const useUpdateGroupMetadata = buildUseMutation({ builderMutationFn: createUpdateGroupMetadata @@ -42,7 +46,8 @@ export const createCreateGroupPolicy = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgCreateGroupPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupPolicy), - converters: toConverters(MsgCreateGroupPolicy) + converters: toConverters(MsgCreateGroupPolicy), + deps: [MsgCreateGroupPolicy] }); export const useCreateGroupPolicy = buildUseMutation({ builderMutationFn: createCreateGroupPolicy @@ -51,7 +56,8 @@ export const createCreateGroupWithPolicy = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgCreateGroupWithPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupWithPolicy), - converters: toConverters(MsgCreateGroupWithPolicy) + converters: toConverters(MsgCreateGroupWithPolicy), + deps: [MsgCreateGroupWithPolicy] }); export const useCreateGroupWithPolicy = buildUseMutation({ builderMutationFn: createCreateGroupWithPolicy @@ -60,7 +66,8 @@ export const createUpdateGroupPolicyAdmin = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgUpdateGroupPolicyAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyAdmin), - converters: toConverters(MsgUpdateGroupPolicyAdmin) + converters: toConverters(MsgUpdateGroupPolicyAdmin), + deps: [MsgUpdateGroupPolicyAdmin] }); export const useUpdateGroupPolicyAdmin = buildUseMutation({ builderMutationFn: createUpdateGroupPolicyAdmin @@ -69,7 +76,8 @@ export const createUpdateGroupPolicyDecisionPolicy = (clientResolver?: SigningCl clientResolver, typeUrl: MsgUpdateGroupPolicyDecisionPolicy.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyDecisionPolicy), - converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy) + converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy), + deps: [MsgUpdateGroupPolicyDecisionPolicy] }); export const useUpdateGroupPolicyDecisionPolicy = buildUseMutation({ builderMutationFn: createUpdateGroupPolicyDecisionPolicy @@ -78,7 +86,8 @@ export const createUpdateGroupPolicyMetadata = (clientResolver?: SigningClientRe clientResolver, typeUrl: MsgUpdateGroupPolicyMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyMetadata), - converters: toConverters(MsgUpdateGroupPolicyMetadata) + converters: toConverters(MsgUpdateGroupPolicyMetadata), + deps: [MsgUpdateGroupPolicyMetadata] }); export const useUpdateGroupPolicyMetadata = buildUseMutation({ builderMutationFn: createUpdateGroupPolicyMetadata @@ -87,7 +96,8 @@ export const createSubmitProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const useSubmitProposal = buildUseMutation({ builderMutationFn: createSubmitProposal @@ -96,7 +106,8 @@ export const createWithdrawProposal = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgWithdrawProposal.typeUrl, encoders: toEncoders(MsgWithdrawProposal), - converters: toConverters(MsgWithdrawProposal) + converters: toConverters(MsgWithdrawProposal), + deps: [MsgWithdrawProposal] }); export const useWithdrawProposal = buildUseMutation({ builderMutationFn: createWithdrawProposal @@ -105,7 +116,8 @@ export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createVote @@ -114,7 +126,8 @@ export const createExec = (clientResolver?: SigningClientResolver) => buildTx({ builderMutationFn: createExec @@ -123,7 +136,8 @@ export const createLeaveGroup = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgLeaveGroup.typeUrl, encoders: toEncoders(MsgLeaveGroup), - converters: toConverters(MsgLeaveGroup) + converters: toConverters(MsgLeaveGroup), + deps: [MsgLeaveGroup] }); export const useLeaveGroup = buildUseMutation({ builderMutationFn: createLeaveGroup diff --git a/libs/interchain-react/src/cosmos/group/v1/tx.ts b/libs/interchain-react/src/cosmos/group/v1/tx.ts index 492b0084..a2e3714f 100644 --- a/libs/interchain-react/src/cosmos/group/v1/tx.ts +++ b/libs/interchain-react/src/cosmos/group/v1/tx.ts @@ -796,10 +796,11 @@ export const MsgCreateGroup = { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroup.typeUrl, MsgCreateGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroup.aminoType, MsgCreateGroup.typeUrl); function createBaseMsgCreateGroupResponse(): MsgCreateGroupResponse { return { groupId: BigInt(0) @@ -874,10 +875,9 @@ export const MsgCreateGroupResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", value: MsgCreateGroupResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupResponse.typeUrl, MsgCreateGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupResponse.aminoType, MsgCreateGroupResponse.typeUrl); function createBaseMsgUpdateGroupMembers(): MsgUpdateGroupMembers { return { admin: "", @@ -978,10 +978,11 @@ export const MsgUpdateGroupMembers = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembers.typeUrl, MsgUpdateGroupMembers); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembers.aminoType, MsgUpdateGroupMembers.typeUrl); function createBaseMsgUpdateGroupMembersResponse(): MsgUpdateGroupMembersResponse { return {}; } @@ -1043,10 +1044,9 @@ export const MsgUpdateGroupMembersResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", value: MsgUpdateGroupMembersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembersResponse.typeUrl, MsgUpdateGroupMembersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembersResponse.aminoType, MsgUpdateGroupMembersResponse.typeUrl); function createBaseMsgUpdateGroupAdmin(): MsgUpdateGroupAdmin { return { admin: "", @@ -1145,10 +1145,9 @@ export const MsgUpdateGroupAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdmin.typeUrl, MsgUpdateGroupAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdmin.aminoType, MsgUpdateGroupAdmin.typeUrl); function createBaseMsgUpdateGroupAdminResponse(): MsgUpdateGroupAdminResponse { return {}; } @@ -1210,10 +1209,9 @@ export const MsgUpdateGroupAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", value: MsgUpdateGroupAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdminResponse.typeUrl, MsgUpdateGroupAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdminResponse.aminoType, MsgUpdateGroupAdminResponse.typeUrl); function createBaseMsgUpdateGroupMetadata(): MsgUpdateGroupMetadata { return { admin: "", @@ -1312,10 +1310,9 @@ export const MsgUpdateGroupMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadata.typeUrl, MsgUpdateGroupMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadata.aminoType, MsgUpdateGroupMetadata.typeUrl); function createBaseMsgUpdateGroupMetadataResponse(): MsgUpdateGroupMetadataResponse { return {}; } @@ -1377,10 +1374,9 @@ export const MsgUpdateGroupMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", value: MsgUpdateGroupMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadataResponse.typeUrl, MsgUpdateGroupMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadataResponse.aminoType, MsgUpdateGroupMetadataResponse.typeUrl); function createBaseMsgCreateGroupPolicy(): MsgCreateGroupPolicy { return { admin: "", @@ -1491,10 +1487,12 @@ export const MsgCreateGroupPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicy.typeUrl, MsgCreateGroupPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicy.aminoType, MsgCreateGroupPolicy.typeUrl); function createBaseMsgCreateGroupPolicyResponse(): MsgCreateGroupPolicyResponse { return { address: "" @@ -1569,10 +1567,9 @@ export const MsgCreateGroupPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", value: MsgCreateGroupPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicyResponse.typeUrl, MsgCreateGroupPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicyResponse.aminoType, MsgCreateGroupPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyAdmin(): MsgUpdateGroupPolicyAdmin { return { admin: "", @@ -1671,10 +1668,9 @@ export const MsgUpdateGroupPolicyAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdmin.typeUrl, MsgUpdateGroupPolicyAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdmin.aminoType, MsgUpdateGroupPolicyAdmin.typeUrl); function createBaseMsgUpdateGroupPolicyAdminResponse(): MsgUpdateGroupPolicyAdminResponse { return {}; } @@ -1736,10 +1732,9 @@ export const MsgUpdateGroupPolicyAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", value: MsgUpdateGroupPolicyAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdminResponse.typeUrl, MsgUpdateGroupPolicyAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdminResponse.aminoType, MsgUpdateGroupPolicyAdminResponse.typeUrl); function createBaseMsgCreateGroupWithPolicy(): MsgCreateGroupWithPolicy { return { admin: "", @@ -1876,10 +1871,12 @@ export const MsgCreateGroupWithPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicy.typeUrl, MsgCreateGroupWithPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicy.aminoType, MsgCreateGroupWithPolicy.typeUrl); function createBaseMsgCreateGroupWithPolicyResponse(): MsgCreateGroupWithPolicyResponse { return { groupId: BigInt(0), @@ -1966,10 +1963,9 @@ export const MsgCreateGroupWithPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", value: MsgCreateGroupWithPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicyResponse.typeUrl, MsgCreateGroupWithPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicyResponse.aminoType, MsgCreateGroupWithPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicy(): MsgUpdateGroupPolicyDecisionPolicy { return { admin: "", @@ -2068,10 +2064,12 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicy.typeUrl, MsgUpdateGroupPolicyDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicy.aminoType, MsgUpdateGroupPolicyDecisionPolicy.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(): MsgUpdateGroupPolicyDecisionPolicyResponse { return {}; } @@ -2133,10 +2131,9 @@ export const MsgUpdateGroupPolicyDecisionPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", value: MsgUpdateGroupPolicyDecisionPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl, MsgUpdateGroupPolicyDecisionPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicyResponse.aminoType, MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyMetadata(): MsgUpdateGroupPolicyMetadata { return { admin: "", @@ -2235,10 +2232,9 @@ export const MsgUpdateGroupPolicyMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadata.typeUrl, MsgUpdateGroupPolicyMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadata.aminoType, MsgUpdateGroupPolicyMetadata.typeUrl); function createBaseMsgUpdateGroupPolicyMetadataResponse(): MsgUpdateGroupPolicyMetadataResponse { return {}; } @@ -2300,10 +2296,9 @@ export const MsgUpdateGroupPolicyMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", value: MsgUpdateGroupPolicyMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadataResponse.typeUrl, MsgUpdateGroupPolicyMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadataResponse.aminoType, MsgUpdateGroupPolicyMetadataResponse.typeUrl); function createBaseMsgSubmitProposal(): MsgSubmitProposal { return { groupPolicyAddress: "", @@ -2454,10 +2449,9 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -2532,10 +2526,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgWithdrawProposal(): MsgWithdrawProposal { return { proposalId: BigInt(0), @@ -2622,10 +2615,9 @@ export const MsgWithdrawProposal = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposal.typeUrl, MsgWithdrawProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposal.aminoType, MsgWithdrawProposal.typeUrl); function createBaseMsgWithdrawProposalResponse(): MsgWithdrawProposalResponse { return {}; } @@ -2687,10 +2679,9 @@ export const MsgWithdrawProposalResponse = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", value: MsgWithdrawProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposalResponse.typeUrl, MsgWithdrawProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposalResponse.aminoType, MsgWithdrawProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -2813,10 +2804,9 @@ export const MsgVote = { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -2878,10 +2868,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.group.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { proposalId: BigInt(0), @@ -2968,10 +2957,9 @@ export const MsgExec = { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { result: 0 @@ -3046,10 +3034,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.group.v1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgLeaveGroup(): MsgLeaveGroup { return { address: "", @@ -3136,10 +3123,9 @@ export const MsgLeaveGroup = { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgLeaveGroup.typeUrl, MsgLeaveGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroup.aminoType, MsgLeaveGroup.typeUrl); function createBaseMsgLeaveGroupResponse(): MsgLeaveGroupResponse { return {}; } @@ -3201,7 +3187,6 @@ export const MsgLeaveGroupResponse = { typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", value: MsgLeaveGroupResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgLeaveGroupResponse.typeUrl, MsgLeaveGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroupResponse.aminoType, MsgLeaveGroupResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/group/v1/types.ts b/libs/interchain-react/src/cosmos/group/v1/types.ts index f8e9c860..802939a6 100644 --- a/libs/interchain-react/src/cosmos/group/v1/types.ts +++ b/libs/interchain-react/src/cosmos/group/v1/types.ts @@ -847,10 +847,9 @@ export const Member = { typeUrl: "/cosmos.group.v1.Member", value: Member.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Member.typeUrl, Member); -GlobalDecoderRegistry.registerAminoProtoMapping(Member.aminoType, Member.typeUrl); function createBaseMemberRequest(): MemberRequest { return { address: "", @@ -949,10 +948,9 @@ export const MemberRequest = { typeUrl: "/cosmos.group.v1.MemberRequest", value: MemberRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MemberRequest.typeUrl, MemberRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(MemberRequest.aminoType, MemberRequest.typeUrl); function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy { return { threshold: "", @@ -1039,10 +1037,13 @@ export const ThresholdDecisionPolicy = { typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", value: ThresholdDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy { return { percentage: "", @@ -1129,10 +1130,13 @@ export const PercentageDecisionPolicy = { typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", value: PercentageDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); function createBaseDecisionPolicyWindows(): DecisionPolicyWindows { return { votingPeriod: Duration.fromPartial({}), @@ -1219,10 +1223,9 @@ export const DecisionPolicyWindows = { typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", value: DecisionPolicyWindows.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecisionPolicyWindows.typeUrl, DecisionPolicyWindows); -GlobalDecoderRegistry.registerAminoProtoMapping(DecisionPolicyWindows.aminoType, DecisionPolicyWindows.typeUrl); function createBaseGroupInfo(): GroupInfo { return { id: BigInt(0), @@ -1357,10 +1360,9 @@ export const GroupInfo = { typeUrl: "/cosmos.group.v1.GroupInfo", value: GroupInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GroupInfo.typeUrl, GroupInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupInfo.aminoType, GroupInfo.typeUrl); function createBaseGroupMember(): GroupMember { return { groupId: BigInt(0), @@ -1447,10 +1449,11 @@ export const GroupMember = { typeUrl: "/cosmos.group.v1.GroupMember", value: GroupMember.encode(message).finish() }; + }, + registerTypeUrl() { + Member.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupMember.typeUrl, GroupMember); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupMember.aminoType, GroupMember.typeUrl); function createBaseGroupPolicyInfo(): GroupPolicyInfo { return { address: "", @@ -1597,10 +1600,12 @@ export const GroupPolicyInfo = { typeUrl: "/cosmos.group.v1.GroupPolicyInfo", value: GroupPolicyInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupPolicyInfo.typeUrl, GroupPolicyInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupPolicyInfo.aminoType, GroupPolicyInfo.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1835,10 +1840,9 @@ export const Proposal = { typeUrl: "/cosmos.group.v1.Proposal", value: Proposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1949,10 +1953,9 @@ export const TallyResult = { typeUrl: "/cosmos.group.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -2075,7 +2078,6 @@ export const Vote = { typeUrl: "/cosmos.group.v1.Vote", value: Vote.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/ics23/v1/proofs.ts b/libs/interchain-react/src/cosmos/ics23/v1/proofs.ts index 27759bde..b02054e7 100644 --- a/libs/interchain-react/src/cosmos/ics23/v1/proofs.ts +++ b/libs/interchain-react/src/cosmos/ics23/v1/proofs.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum HashOp { /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ NO_HASH = 0, @@ -754,10 +753,12 @@ export const ExistenceProof = { typeUrl: "/cosmos.ics23.v1.ExistenceProof", value: ExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExistenceProof.typeUrl, ExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(ExistenceProof.aminoType, ExistenceProof.typeUrl); function createBaseNonExistenceProof(): NonExistenceProof { return { key: new Uint8Array(), @@ -856,10 +857,11 @@ export const NonExistenceProof = { typeUrl: "/cosmos.ics23.v1.NonExistenceProof", value: NonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(NonExistenceProof.typeUrl, NonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(NonExistenceProof.aminoType, NonExistenceProof.typeUrl); function createBaseCommitmentProof(): CommitmentProof { return { exist: undefined, @@ -970,10 +972,14 @@ export const CommitmentProof = { typeUrl: "/cosmos.ics23.v1.CommitmentProof", value: CommitmentProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); + BatchProof.registerTypeUrl(); + CompressedBatchProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitmentProof.typeUrl, CommitmentProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CommitmentProof.aminoType, CommitmentProof.typeUrl); function createBaseLeafOp(): LeafOp { return { hash: 0, @@ -1096,10 +1102,9 @@ export const LeafOp = { typeUrl: "/cosmos.ics23.v1.LeafOp", value: LeafOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LeafOp.typeUrl, LeafOp); -GlobalDecoderRegistry.registerAminoProtoMapping(LeafOp.aminoType, LeafOp.typeUrl); function createBaseInnerOp(): InnerOp { return { hash: 0, @@ -1198,10 +1203,9 @@ export const InnerOp = { typeUrl: "/cosmos.ics23.v1.InnerOp", value: InnerOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerOp.typeUrl, InnerOp); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerOp.aminoType, InnerOp.typeUrl); function createBaseProofSpec(): ProofSpec { return { leafSpec: undefined, @@ -1324,10 +1328,12 @@ export const ProofSpec = { typeUrl: "/cosmos.ics23.v1.ProofSpec", value: ProofSpec.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerSpec.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProofSpec.typeUrl, ProofSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(ProofSpec.aminoType, ProofSpec.typeUrl); function createBaseInnerSpec(): InnerSpec { return { childOrder: [], @@ -1473,10 +1479,9 @@ export const InnerSpec = { typeUrl: "/cosmos.ics23.v1.InnerSpec", value: InnerSpec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerSpec.typeUrl, InnerSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerSpec.aminoType, InnerSpec.typeUrl); function createBaseBatchProof(): BatchProof { return { entries: [] @@ -1553,10 +1558,11 @@ export const BatchProof = { typeUrl: "/cosmos.ics23.v1.BatchProof", value: BatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + BatchEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchProof.typeUrl, BatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchProof.aminoType, BatchProof.typeUrl); function createBaseBatchEntry(): BatchEntry { return { exist: undefined, @@ -1643,10 +1649,12 @@ export const BatchEntry = { typeUrl: "/cosmos.ics23.v1.BatchEntry", value: BatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchEntry.typeUrl, BatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchEntry.aminoType, BatchEntry.typeUrl); function createBaseCompressedBatchProof(): CompressedBatchProof { return { entries: [], @@ -1737,10 +1745,12 @@ export const CompressedBatchProof = { typeUrl: "/cosmos.ics23.v1.CompressedBatchProof", value: CompressedBatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedBatchEntry.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchProof.typeUrl, CompressedBatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchProof.aminoType, CompressedBatchProof.typeUrl); function createBaseCompressedBatchEntry(): CompressedBatchEntry { return { exist: undefined, @@ -1827,10 +1837,12 @@ export const CompressedBatchEntry = { typeUrl: "/cosmos.ics23.v1.CompressedBatchEntry", value: CompressedBatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); + CompressedNonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchEntry.typeUrl, CompressedBatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchEntry.aminoType, CompressedBatchEntry.typeUrl); function createBaseCompressedExistenceProof(): CompressedExistenceProof { return { key: new Uint8Array(), @@ -1952,10 +1964,11 @@ export const CompressedExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedExistenceProof", value: CompressedExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedExistenceProof.typeUrl, CompressedExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedExistenceProof.aminoType, CompressedExistenceProof.typeUrl); function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { return { key: new Uint8Array(), @@ -2054,7 +2067,8 @@ export const CompressedNonExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedNonExistenceProof", value: CompressedNonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(CompressedNonExistenceProof.typeUrl, CompressedNonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedNonExistenceProof.aminoType, CompressedNonExistenceProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/staking/v1beta1/authz.ts b/libs/interchain-react/src/cosmos/staking/v1beta1/authz.ts new file mode 100644 index 00000000..ecc893bd --- /dev/null +++ b/libs/interchain-react/src/cosmos/staking/v1beta1/authz.ts @@ -0,0 +1,326 @@ +import { Coin, CoinAmino } from "../../base/v1beta1/coin"; +import { isSet, DeepPartial } from "../../../helpers"; +import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; +/** + * AuthorizationType defines the type of staking module authorization type + * + * Since: cosmos-sdk 0.43 + */ +export enum AuthorizationType { + /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ + AUTHORIZATION_TYPE_UNSPECIFIED = 0, + /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ + AUTHORIZATION_TYPE_DELEGATE = 1, + /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ + AUTHORIZATION_TYPE_UNDELEGATE = 2, + /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ + AUTHORIZATION_TYPE_REDELEGATE = 3, + /** AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION - AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation */ + AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION = 4, + UNRECOGNIZED = -1, +} +export const AuthorizationTypeAmino = AuthorizationType; +export function authorizationTypeFromJSON(object: any): AuthorizationType { + switch (object) { + case 0: + case "AUTHORIZATION_TYPE_UNSPECIFIED": + return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED; + case 1: + case "AUTHORIZATION_TYPE_DELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE; + case 2: + case "AUTHORIZATION_TYPE_UNDELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE; + case 3: + case "AUTHORIZATION_TYPE_REDELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE; + case 4: + case "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION": + return AuthorizationType.AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION; + case -1: + case "UNRECOGNIZED": + default: + return AuthorizationType.UNRECOGNIZED; + } +} +export function authorizationTypeToJSON(object: AuthorizationType): string { + switch (object) { + case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED: + return "AUTHORIZATION_TYPE_UNSPECIFIED"; + case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE: + return "AUTHORIZATION_TYPE_DELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE: + return "AUTHORIZATION_TYPE_UNDELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: + return "AUTHORIZATION_TYPE_REDELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION: + return "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION"; + case AuthorizationType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +/** + * StakeAuthorization defines authorization for delegate/undelegate/redelegate. + * + * Since: cosmos-sdk 0.43 + */ +export interface StakeAuthorization { + /** + * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + * empty, there is no spend limit and any amount of coins can be delegated. + */ + maxTokens?: Coin; + /** + * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + * account. + */ + allowList?: StakeAuthorization_Validators; + /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ + denyList?: StakeAuthorization_Validators; + /** authorization_type defines one of AuthorizationType. */ + authorizationType: AuthorizationType; +} +export interface StakeAuthorizationProtoMsg { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization"; + value: Uint8Array; +} +/** + * StakeAuthorization defines authorization for delegate/undelegate/redelegate. + * + * Since: cosmos-sdk 0.43 + */ +export interface StakeAuthorizationAmino { + /** + * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + * empty, there is no spend limit and any amount of coins can be delegated. + */ + max_tokens?: CoinAmino; + /** + * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + * account. + */ + allow_list?: StakeAuthorization_ValidatorsAmino; + /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ + deny_list?: StakeAuthorization_ValidatorsAmino; + /** authorization_type defines one of AuthorizationType. */ + authorization_type: AuthorizationType; +} +export interface StakeAuthorizationAminoMsg { + type: "cosmos-sdk/StakeAuthorization"; + value: StakeAuthorizationAmino; +} +/** Validators defines list of validator addresses. */ +export interface StakeAuthorization_Validators { + address: string[]; +} +export interface StakeAuthorization_ValidatorsProtoMsg { + typeUrl: "/cosmos.staking.v1beta1.Validators"; + value: Uint8Array; +} +/** Validators defines list of validator addresses. */ +export interface StakeAuthorization_ValidatorsAmino { + address: string[]; +} +export interface StakeAuthorization_ValidatorsAminoMsg { + type: "cosmos-sdk/Validators"; + value: StakeAuthorization_ValidatorsAmino; +} +function createBaseStakeAuthorization(): StakeAuthorization { + return { + maxTokens: undefined, + allowList: undefined, + denyList: undefined, + authorizationType: 0 + }; +} +export const StakeAuthorization = { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", + aminoType: "cosmos-sdk/StakeAuthorization", + is(o: any): o is StakeAuthorization { + return o && (o.$typeUrl === StakeAuthorization.typeUrl || isSet(o.authorizationType)); + }, + isAmino(o: any): o is StakeAuthorizationAmino { + return o && (o.$typeUrl === StakeAuthorization.typeUrl || isSet(o.authorization_type)); + }, + encode(message: StakeAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.maxTokens !== undefined) { + Coin.encode(message.maxTokens, writer.uint32(10).fork()).ldelim(); + } + if (message.allowList !== undefined) { + StakeAuthorization_Validators.encode(message.allowList, writer.uint32(18).fork()).ldelim(); + } + if (message.denyList !== undefined) { + StakeAuthorization_Validators.encode(message.denyList, writer.uint32(26).fork()).ldelim(); + } + if (message.authorizationType !== 0) { + writer.uint32(32).int32(message.authorizationType); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStakeAuthorization(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxTokens = Coin.decode(reader, reader.uint32()); + break; + case 2: + message.allowList = StakeAuthorization_Validators.decode(reader, reader.uint32()); + break; + case 3: + message.denyList = StakeAuthorization_Validators.decode(reader, reader.uint32()); + break; + case 4: + message.authorizationType = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StakeAuthorization { + const message = createBaseStakeAuthorization(); + message.maxTokens = object.maxTokens !== undefined && object.maxTokens !== null ? Coin.fromPartial(object.maxTokens) : undefined; + message.allowList = object.allowList !== undefined && object.allowList !== null ? StakeAuthorization_Validators.fromPartial(object.allowList) : undefined; + message.denyList = object.denyList !== undefined && object.denyList !== null ? StakeAuthorization_Validators.fromPartial(object.denyList) : undefined; + message.authorizationType = object.authorizationType ?? 0; + return message; + }, + fromAmino(object: StakeAuthorizationAmino): StakeAuthorization { + const message = createBaseStakeAuthorization(); + if (object.max_tokens !== undefined && object.max_tokens !== null) { + message.maxTokens = Coin.fromAmino(object.max_tokens); + } + if (object.allow_list !== undefined && object.allow_list !== null) { + message.allowList = StakeAuthorization_Validators.fromAmino(object.allow_list); + } + if (object.deny_list !== undefined && object.deny_list !== null) { + message.denyList = StakeAuthorization_Validators.fromAmino(object.deny_list); + } + if (object.authorization_type !== undefined && object.authorization_type !== null) { + message.authorizationType = object.authorization_type; + } + return message; + }, + toAmino(message: StakeAuthorization): StakeAuthorizationAmino { + const obj: any = {}; + obj.max_tokens = message.maxTokens ? Coin.toAmino(message.maxTokens) : undefined; + obj.allow_list = message.allowList ? StakeAuthorization_Validators.toAmino(message.allowList) : undefined; + obj.deny_list = message.denyList ? StakeAuthorization_Validators.toAmino(message.denyList) : undefined; + obj.authorization_type = message.authorizationType === 0 ? undefined : message.authorizationType; + return obj; + }, + fromAminoMsg(object: StakeAuthorizationAminoMsg): StakeAuthorization { + return StakeAuthorization.fromAmino(object.value); + }, + toAminoMsg(message: StakeAuthorization): StakeAuthorizationAminoMsg { + return { + type: "cosmos-sdk/StakeAuthorization", + value: StakeAuthorization.toAmino(message) + }; + }, + fromProtoMsg(message: StakeAuthorizationProtoMsg): StakeAuthorization { + return StakeAuthorization.decode(message.value); + }, + toProto(message: StakeAuthorization): Uint8Array { + return StakeAuthorization.encode(message).finish(); + }, + toProtoMsg(message: StakeAuthorization): StakeAuthorizationProtoMsg { + return { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", + value: StakeAuthorization.encode(message).finish() + }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(StakeAuthorization.typeUrl, StakeAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(StakeAuthorization.aminoType, StakeAuthorization.typeUrl); + Coin.registerTypeUrl(); + StakeAuthorization_Validators.registerTypeUrl(); + } +}; +function createBaseStakeAuthorization_Validators(): StakeAuthorization_Validators { + return { + address: [] + }; +} +export const StakeAuthorization_Validators = { + typeUrl: "/cosmos.staking.v1beta1.Validators", + aminoType: "cosmos-sdk/Validators", + is(o: any): o is StakeAuthorization_Validators { + return o && (o.$typeUrl === StakeAuthorization_Validators.typeUrl || Array.isArray(o.address) && (!o.address.length || typeof o.address[0] === "string")); + }, + isAmino(o: any): o is StakeAuthorization_ValidatorsAmino { + return o && (o.$typeUrl === StakeAuthorization_Validators.typeUrl || Array.isArray(o.address) && (!o.address.length || typeof o.address[0] === "string")); + }, + encode(message: StakeAuthorization_Validators, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.address) { + writer.uint32(10).string(v!); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization_Validators { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStakeAuthorization_Validators(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StakeAuthorization_Validators { + const message = createBaseStakeAuthorization_Validators(); + message.address = object.address?.map(e => e) || []; + return message; + }, + fromAmino(object: StakeAuthorization_ValidatorsAmino): StakeAuthorization_Validators { + const message = createBaseStakeAuthorization_Validators(); + message.address = object.address?.map(e => e) || []; + return message; + }, + toAmino(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAmino { + const obj: any = {}; + if (message.address) { + obj.address = message.address.map(e => e); + } else { + obj.address = message.address; + } + return obj; + }, + fromAminoMsg(object: StakeAuthorization_ValidatorsAminoMsg): StakeAuthorization_Validators { + return StakeAuthorization_Validators.fromAmino(object.value); + }, + toAminoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAminoMsg { + return { + type: "cosmos-sdk/Validators", + value: StakeAuthorization_Validators.toAmino(message) + }; + }, + fromProtoMsg(message: StakeAuthorization_ValidatorsProtoMsg): StakeAuthorization_Validators { + return StakeAuthorization_Validators.decode(message.value); + }, + toProto(message: StakeAuthorization_Validators): Uint8Array { + return StakeAuthorization_Validators.encode(message).finish(); + }, + toProtoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsProtoMsg { + return { + typeUrl: "/cosmos.staking.v1beta1.Validators", + value: StakeAuthorization_Validators.encode(message).finish() + }; + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/staking/v1beta1/query.rpc.func.ts b/libs/interchain-react/src/cosmos/staking/v1beta1/query.rpc.func.ts index 0d3c0cfc..9673c3d2 100644 --- a/libs/interchain-react/src/cosmos/staking/v1beta1/query.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/staking/v1beta1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetValidators = (clientResolver?: RpcResolver) => buildQuery< decode: QueryValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Validators", - clientResolver + clientResolver, + deps: [QueryValidatorsRequest, QueryValidatorsResponse] }); export const useGetValidators = buildUseQuery({ builderQueryFn: createGetValidators, @@ -17,7 +18,8 @@ export const createGetValidator = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetValidator, @@ -28,7 +30,8 @@ export const createGetValidatorDelegations = (clientResolver?: RpcResolver) => b decode: QueryValidatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse] }); export const useGetValidatorDelegations = buildUseQuery({ builderQueryFn: createGetValidatorDelegations, @@ -39,7 +42,8 @@ export const createGetValidatorUnbondingDelegations = (clientResolver?: RpcResol decode: QueryValidatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse] }); export const useGetValidatorUnbondingDelegations = buildUseQuery({ builderQueryFn: createGetValidatorUnbondingDelegations, @@ -50,7 +54,8 @@ export const createGetDelegation = (clientResolver?: RpcResolver) => buildQuery< decode: QueryDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Delegation", - clientResolver + clientResolver, + deps: [QueryDelegationRequest, QueryDelegationResponse] }); export const useGetDelegation = buildUseQuery({ builderQueryFn: createGetDelegation, @@ -61,7 +66,8 @@ export const createGetUnbondingDelegation = (clientResolver?: RpcResolver) => bu decode: QueryUnbondingDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "UnbondingDelegation", - clientResolver + clientResolver, + deps: [QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse] }); export const useGetUnbondingDelegation = buildUseQuery({ builderQueryFn: createGetUnbondingDelegation, @@ -72,7 +78,8 @@ export const createGetDelegatorDelegations = (clientResolver?: RpcResolver) => b decode: QueryDelegatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse] }); export const useGetDelegatorDelegations = buildUseQuery({ builderQueryFn: createGetDelegatorDelegations, @@ -83,7 +90,8 @@ export const createGetDelegatorUnbondingDelegations = (clientResolver?: RpcResol decode: QueryDelegatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse] }); export const useGetDelegatorUnbondingDelegations = buildUseQuery({ builderQueryFn: createGetDelegatorUnbondingDelegations, @@ -94,7 +102,8 @@ export const createGetRedelegations = (clientResolver?: RpcResolver) => buildQue decode: QueryRedelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Redelegations", - clientResolver + clientResolver, + deps: [QueryRedelegationsRequest, QueryRedelegationsResponse] }); export const useGetRedelegations = buildUseQuery({ builderQueryFn: createGetRedelegations, @@ -105,7 +114,8 @@ export const createGetDelegatorValidators = (clientResolver?: RpcResolver) => bu decode: QueryDelegatorValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidators", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse] }); export const useGetDelegatorValidators = buildUseQuery({ builderQueryFn: createGetDelegatorValidators, @@ -116,7 +126,8 @@ export const createGetDelegatorValidator = (clientResolver?: RpcResolver) => bui decode: QueryDelegatorValidatorResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidator", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse] }); export const useGetDelegatorValidator = buildUseQuery({ builderQueryFn: createGetDelegatorValidator, @@ -127,7 +138,8 @@ export const createGetHistoricalInfo = (clientResolver?: RpcResolver) => buildQu decode: QueryHistoricalInfoResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "HistoricalInfo", - clientResolver + clientResolver, + deps: [QueryHistoricalInfoRequest, QueryHistoricalInfoResponse] }); export const useGetHistoricalInfo = buildUseQuery({ builderQueryFn: createGetHistoricalInfo, @@ -138,7 +150,8 @@ export const createGetPool = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetPool, @@ -149,7 +162,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, diff --git a/libs/interchain-react/src/cosmos/staking/v1beta1/query.ts b/libs/interchain-react/src/cosmos/staking/v1beta1/query.ts index f4754096..1b267bf2 100644 --- a/libs/interchain-react/src/cosmos/staking/v1beta1/query.ts +++ b/libs/interchain-react/src/cosmos/staking/v1beta1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { Validator, ValidatorAmino, DelegationResponse, DelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, RedelegationResponse, RedelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Pool, PoolAmino, Params, ParamsAmino } from "./staking"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ export interface QueryValidatorsRequest { /** status enables to query for validators matching a given status. */ @@ -757,10 +756,11 @@ export const QueryValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", value: QueryValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsRequest.typeUrl, QueryValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsRequest.aminoType, QueryValidatorsRequest.typeUrl); function createBaseQueryValidatorsResponse(): QueryValidatorsResponse { return { validators: [], @@ -849,10 +849,12 @@ export const QueryValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", value: QueryValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsResponse.typeUrl, QueryValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsResponse.aminoType, QueryValidatorsResponse.typeUrl); function createBaseQueryValidatorRequest(): QueryValidatorRequest { return { validatorAddr: "" @@ -927,10 +929,9 @@ export const QueryValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", value: QueryValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValidatorRequest.typeUrl, QueryValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorRequest.aminoType, QueryValidatorRequest.typeUrl); function createBaseQueryValidatorResponse(): QueryValidatorResponse { return { validator: Validator.fromPartial({}) @@ -1005,10 +1006,11 @@ export const QueryValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", value: QueryValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorResponse.typeUrl, QueryValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorResponse.aminoType, QueryValidatorResponse.typeUrl); function createBaseQueryValidatorDelegationsRequest(): QueryValidatorDelegationsRequest { return { validatorAddr: "", @@ -1095,10 +1097,11 @@ export const QueryValidatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", value: QueryValidatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsRequest.typeUrl, QueryValidatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsRequest.aminoType, QueryValidatorDelegationsRequest.typeUrl); function createBaseQueryValidatorDelegationsResponse(): QueryValidatorDelegationsResponse { return { delegationResponses: [], @@ -1187,10 +1190,12 @@ export const QueryValidatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", value: QueryValidatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsResponse.typeUrl, QueryValidatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsResponse.aminoType, QueryValidatorDelegationsResponse.typeUrl); function createBaseQueryValidatorUnbondingDelegationsRequest(): QueryValidatorUnbondingDelegationsRequest { return { validatorAddr: "", @@ -1277,10 +1282,11 @@ export const QueryValidatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", value: QueryValidatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsRequest.typeUrl, QueryValidatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsRequest.aminoType, QueryValidatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryValidatorUnbondingDelegationsResponse(): QueryValidatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -1369,10 +1375,12 @@ export const QueryValidatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", value: QueryValidatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsResponse.typeUrl, QueryValidatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsResponse.aminoType, QueryValidatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryDelegationRequest(): QueryDelegationRequest { return { delegatorAddr: "", @@ -1459,10 +1467,9 @@ export const QueryDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", value: QueryDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegationRequest.typeUrl, QueryDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationRequest.aminoType, QueryDelegationRequest.typeUrl); function createBaseQueryDelegationResponse(): QueryDelegationResponse { return { delegationResponse: undefined @@ -1537,10 +1544,11 @@ export const QueryDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", value: QueryDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegationResponse.typeUrl, QueryDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationResponse.aminoType, QueryDelegationResponse.typeUrl); function createBaseQueryUnbondingDelegationRequest(): QueryUnbondingDelegationRequest { return { delegatorAddr: "", @@ -1627,10 +1635,9 @@ export const QueryUnbondingDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", value: QueryUnbondingDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationRequest.typeUrl, QueryUnbondingDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationRequest.aminoType, QueryUnbondingDelegationRequest.typeUrl); function createBaseQueryUnbondingDelegationResponse(): QueryUnbondingDelegationResponse { return { unbond: UnbondingDelegation.fromPartial({}) @@ -1705,10 +1712,11 @@ export const QueryUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", value: QueryUnbondingDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationResponse.typeUrl, QueryUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationResponse.aminoType, QueryUnbondingDelegationResponse.typeUrl); function createBaseQueryDelegatorDelegationsRequest(): QueryDelegatorDelegationsRequest { return { delegatorAddr: "", @@ -1795,10 +1803,11 @@ export const QueryDelegatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", value: QueryDelegatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsRequest.typeUrl, QueryDelegatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsRequest.aminoType, QueryDelegatorDelegationsRequest.typeUrl); function createBaseQueryDelegatorDelegationsResponse(): QueryDelegatorDelegationsResponse { return { delegationResponses: [], @@ -1887,10 +1896,12 @@ export const QueryDelegatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", value: QueryDelegatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsResponse.typeUrl, QueryDelegatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsResponse.aminoType, QueryDelegatorDelegationsResponse.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsRequest(): QueryDelegatorUnbondingDelegationsRequest { return { delegatorAddr: "", @@ -1977,10 +1988,11 @@ export const QueryDelegatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", value: QueryDelegatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsRequest.typeUrl, QueryDelegatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsRequest.aminoType, QueryDelegatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsResponse(): QueryDelegatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -2069,10 +2081,12 @@ export const QueryDelegatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", value: QueryDelegatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsResponse.typeUrl, QueryDelegatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsResponse.aminoType, QueryDelegatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryRedelegationsRequest(): QueryRedelegationsRequest { return { delegatorAddr: "", @@ -2183,10 +2197,11 @@ export const QueryRedelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", value: QueryRedelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsRequest.typeUrl, QueryRedelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsRequest.aminoType, QueryRedelegationsRequest.typeUrl); function createBaseQueryRedelegationsResponse(): QueryRedelegationsResponse { return { redelegationResponses: [], @@ -2275,10 +2290,12 @@ export const QueryRedelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", value: QueryRedelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsResponse.typeUrl, QueryRedelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsResponse.aminoType, QueryRedelegationsResponse.typeUrl); function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { return { delegatorAddr: "", @@ -2365,10 +2382,11 @@ export const QueryDelegatorValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", value: QueryDelegatorValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsRequest.typeUrl, QueryDelegatorValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsRequest.aminoType, QueryDelegatorValidatorsRequest.typeUrl); function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { return { validators: [], @@ -2457,10 +2475,12 @@ export const QueryDelegatorValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", value: QueryDelegatorValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsResponse.typeUrl, QueryDelegatorValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsResponse.aminoType, QueryDelegatorValidatorsResponse.typeUrl); function createBaseQueryDelegatorValidatorRequest(): QueryDelegatorValidatorRequest { return { delegatorAddr: "", @@ -2547,10 +2567,9 @@ export const QueryDelegatorValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", value: QueryDelegatorValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorRequest.typeUrl, QueryDelegatorValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorRequest.aminoType, QueryDelegatorValidatorRequest.typeUrl); function createBaseQueryDelegatorValidatorResponse(): QueryDelegatorValidatorResponse { return { validator: Validator.fromPartial({}) @@ -2625,10 +2644,11 @@ export const QueryDelegatorValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", value: QueryDelegatorValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorResponse.typeUrl, QueryDelegatorValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorResponse.aminoType, QueryDelegatorValidatorResponse.typeUrl); function createBaseQueryHistoricalInfoRequest(): QueryHistoricalInfoRequest { return { height: BigInt(0) @@ -2703,10 +2723,9 @@ export const QueryHistoricalInfoRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", value: QueryHistoricalInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalInfoRequest.typeUrl, QueryHistoricalInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoRequest.aminoType, QueryHistoricalInfoRequest.typeUrl); function createBaseQueryHistoricalInfoResponse(): QueryHistoricalInfoResponse { return { hist: undefined @@ -2781,10 +2800,11 @@ export const QueryHistoricalInfoResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", value: QueryHistoricalInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + HistoricalInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalInfoResponse.typeUrl, QueryHistoricalInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoResponse.aminoType, QueryHistoricalInfoResponse.typeUrl); function createBaseQueryPoolRequest(): QueryPoolRequest { return {}; } @@ -2846,10 +2866,9 @@ export const QueryPoolRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", value: QueryPoolRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPoolRequest.typeUrl, QueryPoolRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolRequest.aminoType, QueryPoolRequest.typeUrl); function createBaseQueryPoolResponse(): QueryPoolResponse { return { pool: Pool.fromPartial({}) @@ -2924,10 +2943,11 @@ export const QueryPoolResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", value: QueryPoolResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Pool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPoolResponse.typeUrl, QueryPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolResponse.aminoType, QueryPoolResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2989,10 +3009,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -3067,7 +3086,8 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/staking/v1beta1/staking.ts b/libs/interchain-react/src/cosmos/staking/v1beta1/staking.ts index ab2a299e..1c7ac96e 100644 --- a/libs/interchain-react/src/cosmos/staking/v1beta1/staking.ts +++ b/libs/interchain-react/src/cosmos/staking/v1beta1/staking.ts @@ -5,8 +5,8 @@ import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; /** BondStatus is the status of a validator. */ export enum BondStatus { @@ -838,10 +838,12 @@ export const HistoricalInfo = { typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", value: HistoricalInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HistoricalInfo.typeUrl, HistoricalInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(HistoricalInfo.aminoType, HistoricalInfo.typeUrl); function createBaseCommissionRates(): CommissionRates { return { rate: "", @@ -940,10 +942,9 @@ export const CommissionRates = { typeUrl: "/cosmos.staking.v1beta1.CommissionRates", value: CommissionRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommissionRates.typeUrl, CommissionRates); -GlobalDecoderRegistry.registerAminoProtoMapping(CommissionRates.aminoType, CommissionRates.typeUrl); function createBaseCommission(): Commission { return { commissionRates: CommissionRates.fromPartial({}), @@ -1030,10 +1031,11 @@ export const Commission = { typeUrl: "/cosmos.staking.v1beta1.Commission", value: Commission.encode(message).finish() }; + }, + registerTypeUrl() { + CommissionRates.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commission.typeUrl, Commission); -GlobalDecoderRegistry.registerAminoProtoMapping(Commission.aminoType, Commission.typeUrl); function createBaseDescription(): Description { return { moniker: "", @@ -1156,10 +1158,9 @@ export const Description = { typeUrl: "/cosmos.staking.v1beta1.Description", value: Description.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Description.typeUrl, Description); -GlobalDecoderRegistry.registerAminoProtoMapping(Description.aminoType, Description.typeUrl); function createBaseValidator(): Validator { return { operatorAddress: "", @@ -1389,10 +1390,12 @@ export const Validator = { typeUrl: "/cosmos.staking.v1beta1.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); + Commission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); -GlobalDecoderRegistry.registerAminoProtoMapping(Validator.aminoType, Validator.typeUrl); function createBaseValAddresses(): ValAddresses { return { addresses: [] @@ -1469,10 +1472,9 @@ export const ValAddresses = { typeUrl: "/cosmos.staking.v1beta1.ValAddresses", value: ValAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValAddresses.typeUrl, ValAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(ValAddresses.aminoType, ValAddresses.typeUrl); function createBaseDVPair(): DVPair { return { delegatorAddress: "", @@ -1559,10 +1561,9 @@ export const DVPair = { typeUrl: "/cosmos.staking.v1beta1.DVPair", value: DVPair.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVPair.typeUrl, DVPair); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPair.aminoType, DVPair.typeUrl); function createBaseDVPairs(): DVPairs { return { pairs: [] @@ -1639,10 +1640,11 @@ export const DVPairs = { typeUrl: "/cosmos.staking.v1beta1.DVPairs", value: DVPairs.encode(message).finish() }; + }, + registerTypeUrl() { + DVPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVPairs.typeUrl, DVPairs); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPairs.aminoType, DVPairs.typeUrl); function createBaseDVVTriplet(): DVVTriplet { return { delegatorAddress: "", @@ -1741,10 +1743,9 @@ export const DVVTriplet = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", value: DVVTriplet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVVTriplet.typeUrl, DVVTriplet); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplet.aminoType, DVVTriplet.typeUrl); function createBaseDVVTriplets(): DVVTriplets { return { triplets: [] @@ -1821,10 +1822,11 @@ export const DVVTriplets = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", value: DVVTriplets.encode(message).finish() }; + }, + registerTypeUrl() { + DVVTriplet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVVTriplets.typeUrl, DVVTriplets); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplets.aminoType, DVVTriplets.typeUrl); function createBaseDelegation(): Delegation { return { delegatorAddress: "", @@ -1923,10 +1925,9 @@ export const Delegation = { typeUrl: "/cosmos.staking.v1beta1.Delegation", value: Delegation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Delegation.typeUrl, Delegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Delegation.aminoType, Delegation.typeUrl); function createBaseUnbondingDelegation(): UnbondingDelegation { return { delegatorAddress: "", @@ -2027,10 +2028,11 @@ export const UnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", value: UnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UnbondingDelegation.typeUrl, UnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegation.aminoType, UnbondingDelegation.typeUrl); function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry { return { creationHeight: BigInt(0), @@ -2165,10 +2167,9 @@ export const UnbondingDelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", value: UnbondingDelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UnbondingDelegationEntry.typeUrl, UnbondingDelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegationEntry.aminoType, UnbondingDelegationEntry.typeUrl); function createBaseRedelegationEntry(): RedelegationEntry { return { creationHeight: BigInt(0), @@ -2303,10 +2304,9 @@ export const RedelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", value: RedelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RedelegationEntry.typeUrl, RedelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntry.aminoType, RedelegationEntry.typeUrl); function createBaseRedelegation(): Redelegation { return { delegatorAddress: "", @@ -2419,10 +2419,11 @@ export const Redelegation = { typeUrl: "/cosmos.staking.v1beta1.Redelegation", value: Redelegation.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Redelegation.typeUrl, Redelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Redelegation.aminoType, Redelegation.typeUrl); function createBaseParams(): Params { return { unbondingTime: Duration.fromPartial({}), @@ -2557,10 +2558,9 @@ export const Params = { typeUrl: "/cosmos.staking.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseDelegationResponse(): DelegationResponse { return { delegation: Delegation.fromPartial({}), @@ -2647,10 +2647,12 @@ export const DelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", value: DelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Delegation.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationResponse.typeUrl, DelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationResponse.aminoType, DelegationResponse.typeUrl); function createBaseRedelegationEntryResponse(): RedelegationEntryResponse { return { redelegationEntry: RedelegationEntry.fromPartial({}), @@ -2737,10 +2739,11 @@ export const RedelegationEntryResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", value: RedelegationEntryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationEntryResponse.typeUrl, RedelegationEntryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntryResponse.aminoType, RedelegationEntryResponse.typeUrl); function createBaseRedelegationResponse(): RedelegationResponse { return { redelegation: Redelegation.fromPartial({}), @@ -2829,10 +2832,12 @@ export const RedelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", value: RedelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Redelegation.registerTypeUrl(); + RedelegationEntryResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationResponse.typeUrl, RedelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationResponse.aminoType, RedelegationResponse.typeUrl); function createBasePool(): Pool { return { notBondedTokens: "", @@ -2919,10 +2924,9 @@ export const Pool = { typeUrl: "/cosmos.staking.v1beta1.Pool", value: Pool.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Pool.typeUrl, Pool); -GlobalDecoderRegistry.registerAminoProtoMapping(Pool.aminoType, Pool.typeUrl); function createBaseValidatorUpdates(): ValidatorUpdates { return { updates: [] @@ -2999,7 +3003,8 @@ export const ValidatorUpdates = { typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates", value: ValidatorUpdates.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorUpdate.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ValidatorUpdates.typeUrl, ValidatorUpdates); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorUpdates.aminoType, ValidatorUpdates.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts index 78bf119c..85f1b7a8 100644 --- a/libs/interchain-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/staking/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation, MsgUpdateParams } from "./tx"; export const createCreateValidator = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateValidator.typeUrl, encoders: toEncoders(MsgCreateValidator), - converters: toConverters(MsgCreateValidator) + converters: toConverters(MsgCreateValidator), + deps: [MsgCreateValidator] }); export const useCreateValidator = buildUseMutation({ builderMutationFn: createCreateValidator @@ -15,7 +16,8 @@ export const createEditValidator = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgEditValidator.typeUrl, encoders: toEncoders(MsgEditValidator), - converters: toConverters(MsgEditValidator) + converters: toConverters(MsgEditValidator), + deps: [MsgEditValidator] }); export const useEditValidator = buildUseMutation({ builderMutationFn: createEditValidator @@ -24,7 +26,8 @@ export const createDelegate = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgDelegate.typeUrl, encoders: toEncoders(MsgDelegate), - converters: toConverters(MsgDelegate) + converters: toConverters(MsgDelegate), + deps: [MsgDelegate] }); export const useDelegate = buildUseMutation({ builderMutationFn: createDelegate @@ -33,7 +36,8 @@ export const createBeginRedelegate = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgBeginRedelegate.typeUrl, encoders: toEncoders(MsgBeginRedelegate), - converters: toConverters(MsgBeginRedelegate) + converters: toConverters(MsgBeginRedelegate), + deps: [MsgBeginRedelegate] }); export const useBeginRedelegate = buildUseMutation({ builderMutationFn: createBeginRedelegate @@ -42,7 +46,8 @@ export const createUndelegate = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgUndelegate.typeUrl, encoders: toEncoders(MsgUndelegate), - converters: toConverters(MsgUndelegate) + converters: toConverters(MsgUndelegate), + deps: [MsgUndelegate] }); export const useUndelegate = buildUseMutation({ builderMutationFn: createUndelegate @@ -51,7 +56,8 @@ export const createCancelUnbondingDelegation = (clientResolver?: SigningClientRe clientResolver, typeUrl: MsgCancelUnbondingDelegation.typeUrl, encoders: toEncoders(MsgCancelUnbondingDelegation), - converters: toConverters(MsgCancelUnbondingDelegation) + converters: toConverters(MsgCancelUnbondingDelegation), + deps: [MsgCancelUnbondingDelegation] }); export const useCancelUnbondingDelegation = buildUseMutation({ builderMutationFn: createCancelUnbondingDelegation @@ -60,7 +66,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/interchain-react/src/cosmos/staking/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/staking/v1beta1/tx.ts index ef9fba80..d25b942c 100644 --- a/libs/interchain-react/src/cosmos/staking/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/staking/v1beta1/tx.ts @@ -3,9 +3,9 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { description: Description; @@ -503,10 +503,11 @@ export const MsgCreateValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateValidator.typeUrl, MsgCreateValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidator.aminoType, MsgCreateValidator.typeUrl); function createBaseMsgCreateValidatorResponse(): MsgCreateValidatorResponse { return {}; } @@ -568,10 +569,9 @@ export const MsgCreateValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", value: MsgCreateValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateValidatorResponse.typeUrl, MsgCreateValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidatorResponse.aminoType, MsgCreateValidatorResponse.typeUrl); function createBaseMsgEditValidator(): MsgEditValidator { return { description: Description.fromPartial({}), @@ -682,10 +682,11 @@ export const MsgEditValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgEditValidator.typeUrl, MsgEditValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidator.aminoType, MsgEditValidator.typeUrl); function createBaseMsgEditValidatorResponse(): MsgEditValidatorResponse { return {}; } @@ -747,10 +748,9 @@ export const MsgEditValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", value: MsgEditValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEditValidatorResponse.typeUrl, MsgEditValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidatorResponse.aminoType, MsgEditValidatorResponse.typeUrl); function createBaseMsgDelegate(): MsgDelegate { return { delegatorAddress: "", @@ -849,10 +849,11 @@ export const MsgDelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDelegate.typeUrl, MsgDelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegate.aminoType, MsgDelegate.typeUrl); function createBaseMsgDelegateResponse(): MsgDelegateResponse { return {}; } @@ -914,10 +915,9 @@ export const MsgDelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", value: MsgDelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDelegateResponse.typeUrl, MsgDelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegateResponse.aminoType, MsgDelegateResponse.typeUrl); function createBaseMsgBeginRedelegate(): MsgBeginRedelegate { return { delegatorAddress: "", @@ -1028,10 +1028,11 @@ export const MsgBeginRedelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBeginRedelegate.typeUrl, MsgBeginRedelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegate.aminoType, MsgBeginRedelegate.typeUrl); function createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse { return { completionTime: new Date() @@ -1106,10 +1107,9 @@ export const MsgBeginRedelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", value: MsgBeginRedelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBeginRedelegateResponse.typeUrl, MsgBeginRedelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegateResponse.aminoType, MsgBeginRedelegateResponse.typeUrl); function createBaseMsgUndelegate(): MsgUndelegate { return { delegatorAddress: "", @@ -1208,10 +1208,11 @@ export const MsgUndelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegate.typeUrl, MsgUndelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegate.aminoType, MsgUndelegate.typeUrl); function createBaseMsgUndelegateResponse(): MsgUndelegateResponse { return { completionTime: new Date(), @@ -1298,10 +1299,11 @@ export const MsgUndelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", value: MsgUndelegateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegateResponse.typeUrl, MsgUndelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegateResponse.aminoType, MsgUndelegateResponse.typeUrl); function createBaseMsgCancelUnbondingDelegation(): MsgCancelUnbondingDelegation { return { delegatorAddress: "", @@ -1412,10 +1414,11 @@ export const MsgCancelUnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegation.typeUrl, MsgCancelUnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegation.aminoType, MsgCancelUnbondingDelegation.typeUrl); function createBaseMsgCancelUnbondingDelegationResponse(): MsgCancelUnbondingDelegationResponse { return {}; } @@ -1477,10 +1480,9 @@ export const MsgCancelUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", value: MsgCancelUnbondingDelegationResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegationResponse.typeUrl, MsgCancelUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegationResponse.aminoType, MsgCancelUnbondingDelegationResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1567,10 +1569,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1632,7 +1635,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/tx/signing/v1beta1/signing.ts b/libs/interchain-react/src/cosmos/tx/signing/v1beta1/signing.ts index 8c90655f..de70a246 100644 --- a/libs/interchain-react/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/libs/interchain-react/src/cosmos/tx/signing/v1beta1/signing.ts @@ -2,7 +2,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../../crypto/multisig/ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * SignMode represents a signing mode with its own security guarantees. * @@ -308,10 +307,11 @@ export const SignatureDescriptors = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors", value: SignatureDescriptors.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptors.typeUrl, SignatureDescriptors); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptors.aminoType, SignatureDescriptors.typeUrl); function createBaseSignatureDescriptor(): SignatureDescriptor { return { publicKey: undefined, @@ -410,10 +410,11 @@ export const SignatureDescriptor = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor", value: SignatureDescriptor.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor.typeUrl, SignatureDescriptor); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor.aminoType, SignatureDescriptor.typeUrl); function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { return { single: undefined, @@ -500,10 +501,12 @@ export const SignatureDescriptor_Data = { typeUrl: "/cosmos.tx.signing.v1beta1.Data", value: SignatureDescriptor_Data.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data_Single.registerTypeUrl(); + SignatureDescriptor_Data_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data.typeUrl, SignatureDescriptor_Data); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data.aminoType, SignatureDescriptor_Data.typeUrl); function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { return { mode: 0, @@ -590,10 +593,9 @@ export const SignatureDescriptor_Data_Single = { typeUrl: "/cosmos.tx.signing.v1beta1.Single", value: SignatureDescriptor_Data_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Single.typeUrl, SignatureDescriptor_Data_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Single.aminoType, SignatureDescriptor_Data_Single.typeUrl); function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { return { bitarray: undefined, @@ -682,7 +684,9 @@ export const SignatureDescriptor_Data_Multi = { typeUrl: "/cosmos.tx.signing.v1beta1.Multi", value: SignatureDescriptor_Data_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + SignatureDescriptor_Data.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Multi.typeUrl, SignatureDescriptor_Data_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Multi.aminoType, SignatureDescriptor_Data_Multi.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/tx/v1beta1/service.rpc.func.ts b/libs/interchain-react/src/cosmos/tx/v1beta1/service.rpc.func.ts index 4fb651f5..685a17ba 100644 --- a/libs/interchain-react/src/cosmos/tx/v1beta1/service.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/tx/v1beta1/service.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetSimulate = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetSimulate, @@ -17,7 +18,8 @@ export const createGetGetTx = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetGetTx, @@ -28,7 +30,8 @@ export const createGetBroadcastTx = (clientResolver?: RpcResolver) => buildQuery decode: BroadcastTxResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "BroadcastTx", - clientResolver + clientResolver, + deps: [BroadcastTxRequest, BroadcastTxResponse] }); export const useGetBroadcastTx = buildUseQuery({ builderQueryFn: createGetBroadcastTx, @@ -39,7 +42,8 @@ export const createGetGetTxsEvent = (clientResolver?: RpcResolver) => buildQuery decode: GetTxsEventResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetTxsEvent", - clientResolver + clientResolver, + deps: [GetTxsEventRequest, GetTxsEventResponse] }); export const useGetGetTxsEvent = buildUseQuery({ builderQueryFn: createGetGetTxsEvent, @@ -50,7 +54,8 @@ export const createGetGetBlockWithTxs = (clientResolver?: RpcResolver) => buildQ decode: GetBlockWithTxsResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetBlockWithTxs", - clientResolver + clientResolver, + deps: [GetBlockWithTxsRequest, GetBlockWithTxsResponse] }); export const useGetGetBlockWithTxs = buildUseQuery({ builderQueryFn: createGetGetBlockWithTxs, @@ -61,7 +66,8 @@ export const createGetTxDecode = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetTxDecode, @@ -72,7 +78,8 @@ export const createGetTxEncode = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetTxEncode, @@ -83,7 +90,8 @@ export const createGetTxEncodeAmino = (clientResolver?: RpcResolver) => buildQue decode: TxEncodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxEncodeAmino", - clientResolver + clientResolver, + deps: [TxEncodeAminoRequest, TxEncodeAminoResponse] }); export const useGetTxEncodeAmino = buildUseQuery({ builderQueryFn: createGetTxEncodeAmino, @@ -94,7 +102,8 @@ export const createGetTxDecodeAmino = (clientResolver?: RpcResolver) => buildQue decode: TxDecodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxDecodeAmino", - clientResolver + clientResolver, + deps: [TxDecodeAminoRequest, TxDecodeAminoResponse] }); export const useGetTxDecodeAmino = buildUseQuery({ builderQueryFn: createGetTxDecodeAmino, diff --git a/libs/interchain-react/src/cosmos/tx/v1beta1/service.ts b/libs/interchain-react/src/cosmos/tx/v1beta1/service.ts index 9c0eaf31..6a7f7c35 100644 --- a/libs/interchain-react/src/cosmos/tx/v1beta1/service.ts +++ b/libs/interchain-react/src/cosmos/tx/v1beta1/service.ts @@ -5,7 +5,6 @@ import { BlockID, BlockIDAmino } from "../../../tendermint/types/types"; import { Block, BlockAmino } from "../../../tendermint/types/block"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** OrderBy defines the sorting order */ export enum OrderBy { /** @@ -824,10 +823,11 @@ export const GetTxsEventRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest", value: GetTxsEventRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventRequest.typeUrl, GetTxsEventRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventRequest.aminoType, GetTxsEventRequest.typeUrl); function createBaseGetTxsEventResponse(): GetTxsEventResponse { return { txs: [], @@ -942,10 +942,13 @@ export const GetTxsEventResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse", value: GetTxsEventResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventResponse.typeUrl, GetTxsEventResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventResponse.aminoType, GetTxsEventResponse.typeUrl); function createBaseBroadcastTxRequest(): BroadcastTxRequest { return { txBytes: new Uint8Array(), @@ -1032,10 +1035,9 @@ export const BroadcastTxRequest = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest", value: BroadcastTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BroadcastTxRequest.typeUrl, BroadcastTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxRequest.aminoType, BroadcastTxRequest.typeUrl); function createBaseBroadcastTxResponse(): BroadcastTxResponse { return { txResponse: undefined @@ -1110,10 +1112,11 @@ export const BroadcastTxResponse = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse", value: BroadcastTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BroadcastTxResponse.typeUrl, BroadcastTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxResponse.aminoType, BroadcastTxResponse.typeUrl); function createBaseSimulateRequest(): SimulateRequest { return { tx: undefined, @@ -1200,10 +1203,11 @@ export const SimulateRequest = { typeUrl: "/cosmos.tx.v1beta1.SimulateRequest", value: SimulateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateRequest.typeUrl, SimulateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateRequest.aminoType, SimulateRequest.typeUrl); function createBaseSimulateResponse(): SimulateResponse { return { gasInfo: undefined, @@ -1290,10 +1294,12 @@ export const SimulateResponse = { typeUrl: "/cosmos.tx.v1beta1.SimulateResponse", value: SimulateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateResponse.typeUrl, SimulateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateResponse.aminoType, SimulateResponse.typeUrl); function createBaseGetTxRequest(): GetTxRequest { return { hash: "" @@ -1368,10 +1374,9 @@ export const GetTxRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxRequest", value: GetTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GetTxRequest.typeUrl, GetTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxRequest.aminoType, GetTxRequest.typeUrl); function createBaseGetTxResponse(): GetTxResponse { return { tx: undefined, @@ -1458,10 +1463,12 @@ export const GetTxResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxResponse", value: GetTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxResponse.typeUrl, GetTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxResponse.aminoType, GetTxResponse.typeUrl); function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { return { height: BigInt(0), @@ -1548,10 +1555,11 @@ export const GetBlockWithTxsRequest = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest", value: GetBlockWithTxsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsRequest.typeUrl, GetBlockWithTxsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsRequest.aminoType, GetBlockWithTxsRequest.typeUrl); function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { return { txs: [], @@ -1664,10 +1672,14 @@ export const GetBlockWithTxsResponse = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse", value: GetBlockWithTxsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + BlockID.registerTypeUrl(); + Block.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsResponse.typeUrl, GetBlockWithTxsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsResponse.aminoType, GetBlockWithTxsResponse.typeUrl); function createBaseTxDecodeRequest(): TxDecodeRequest { return { txBytes: new Uint8Array() @@ -1742,10 +1754,9 @@ export const TxDecodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeRequest", value: TxDecodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeRequest.typeUrl, TxDecodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeRequest.aminoType, TxDecodeRequest.typeUrl); function createBaseTxDecodeResponse(): TxDecodeResponse { return { tx: undefined @@ -1820,10 +1831,11 @@ export const TxDecodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeResponse", value: TxDecodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxDecodeResponse.typeUrl, TxDecodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeResponse.aminoType, TxDecodeResponse.typeUrl); function createBaseTxEncodeRequest(): TxEncodeRequest { return { tx: undefined @@ -1898,10 +1910,11 @@ export const TxEncodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeRequest", value: TxEncodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxEncodeRequest.typeUrl, TxEncodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeRequest.aminoType, TxEncodeRequest.typeUrl); function createBaseTxEncodeResponse(): TxEncodeResponse { return { txBytes: new Uint8Array() @@ -1976,10 +1989,9 @@ export const TxEncodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeResponse", value: TxEncodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeResponse.typeUrl, TxEncodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeResponse.aminoType, TxEncodeResponse.typeUrl); function createBaseTxEncodeAminoRequest(): TxEncodeAminoRequest { return { aminoJson: "" @@ -2054,10 +2066,9 @@ export const TxEncodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoRequest", value: TxEncodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoRequest.typeUrl, TxEncodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoRequest.aminoType, TxEncodeAminoRequest.typeUrl); function createBaseTxEncodeAminoResponse(): TxEncodeAminoResponse { return { aminoBinary: new Uint8Array() @@ -2132,10 +2143,9 @@ export const TxEncodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoResponse", value: TxEncodeAminoResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoResponse.typeUrl, TxEncodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoResponse.aminoType, TxEncodeAminoResponse.typeUrl); function createBaseTxDecodeAminoRequest(): TxDecodeAminoRequest { return { aminoBinary: new Uint8Array() @@ -2210,10 +2220,9 @@ export const TxDecodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoRequest", value: TxDecodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeAminoRequest.typeUrl, TxDecodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoRequest.aminoType, TxDecodeAminoRequest.typeUrl); function createBaseTxDecodeAminoResponse(): TxDecodeAminoResponse { return { aminoJson: "" @@ -2288,7 +2297,6 @@ export const TxDecodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoResponse", value: TxDecodeAminoResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TxDecodeAminoResponse.typeUrl, TxDecodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoResponse.aminoType, TxDecodeAminoResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/tx/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/tx/v1beta1/tx.ts index 6e8614bb..e0136f83 100644 --- a/libs/interchain-react/src/cosmos/tx/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/tx/v1beta1/tx.ts @@ -4,7 +4,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../crypto/multisig/v1b import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Tx is the standard type used for broadcasting transactions. */ export interface Tx { /** body is the processable content of the transaction */ @@ -747,10 +746,12 @@ export const Tx = { typeUrl: "/cosmos.tx.v1beta1.Tx", value: Tx.encode(message).finish() }; + }, + registerTypeUrl() { + TxBody.registerTypeUrl(); + AuthInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tx.typeUrl, Tx); -GlobalDecoderRegistry.registerAminoProtoMapping(Tx.aminoType, Tx.typeUrl); function createBaseTxRaw(): TxRaw { return { bodyBytes: new Uint8Array(), @@ -851,10 +852,9 @@ export const TxRaw = { typeUrl: "/cosmos.tx.v1beta1.TxRaw", value: TxRaw.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxRaw.typeUrl, TxRaw); -GlobalDecoderRegistry.registerAminoProtoMapping(TxRaw.aminoType, TxRaw.typeUrl); function createBaseSignDoc(): SignDoc { return { bodyBytes: new Uint8Array(), @@ -965,10 +965,9 @@ export const SignDoc = { typeUrl: "/cosmos.tx.v1beta1.SignDoc", value: SignDoc.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignDoc.typeUrl, SignDoc); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDoc.aminoType, SignDoc.typeUrl); function createBaseSignDocDirectAux(): SignDocDirectAux { return { bodyBytes: new Uint8Array(), @@ -1103,10 +1102,11 @@ export const SignDocDirectAux = { typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux", value: SignDocDirectAux.encode(message).finish() }; + }, + registerTypeUrl() { + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignDocDirectAux.typeUrl, SignDocDirectAux); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDocDirectAux.aminoType, SignDocDirectAux.typeUrl); function createBaseTxBody(): TxBody { return { messages: [], @@ -1235,10 +1235,9 @@ export const TxBody = { typeUrl: "/cosmos.tx.v1beta1.TxBody", value: TxBody.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxBody.typeUrl, TxBody); -GlobalDecoderRegistry.registerAminoProtoMapping(TxBody.aminoType, TxBody.typeUrl); function createBaseAuthInfo(): AuthInfo { return { signerInfos: [], @@ -1339,10 +1338,13 @@ export const AuthInfo = { typeUrl: "/cosmos.tx.v1beta1.AuthInfo", value: AuthInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SignerInfo.registerTypeUrl(); + Fee.registerTypeUrl(); + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AuthInfo.typeUrl, AuthInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(AuthInfo.aminoType, AuthInfo.typeUrl); function createBaseSignerInfo(): SignerInfo { return { publicKey: undefined, @@ -1441,10 +1443,11 @@ export const SignerInfo = { typeUrl: "/cosmos.tx.v1beta1.SignerInfo", value: SignerInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignerInfo.typeUrl, SignerInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(SignerInfo.aminoType, SignerInfo.typeUrl); function createBaseModeInfo(): ModeInfo { return { single: undefined, @@ -1531,10 +1534,12 @@ export const ModeInfo = { typeUrl: "/cosmos.tx.v1beta1.ModeInfo", value: ModeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo_Single.registerTypeUrl(); + ModeInfo_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo.typeUrl, ModeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo.aminoType, ModeInfo.typeUrl); function createBaseModeInfo_Single(): ModeInfo_Single { return { mode: 0 @@ -1609,10 +1614,9 @@ export const ModeInfo_Single = { typeUrl: "/cosmos.tx.v1beta1.Single", value: ModeInfo_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModeInfo_Single.typeUrl, ModeInfo_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Single.aminoType, ModeInfo_Single.typeUrl); function createBaseModeInfo_Multi(): ModeInfo_Multi { return { bitarray: undefined, @@ -1701,10 +1705,12 @@ export const ModeInfo_Multi = { typeUrl: "/cosmos.tx.v1beta1.Multi", value: ModeInfo_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo_Multi.typeUrl, ModeInfo_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Multi.aminoType, ModeInfo_Multi.typeUrl); function createBaseFee(): Fee { return { amount: [], @@ -1817,10 +1823,11 @@ export const Fee = { typeUrl: "/cosmos.tx.v1beta1.Fee", value: Fee.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Fee.typeUrl, Fee); -GlobalDecoderRegistry.registerAminoProtoMapping(Fee.aminoType, Fee.typeUrl); function createBaseTip(): Tip { return { amount: [], @@ -1909,10 +1916,11 @@ export const Tip = { typeUrl: "/cosmos.tx.v1beta1.Tip", value: Tip.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tip.typeUrl, Tip); -GlobalDecoderRegistry.registerAminoProtoMapping(Tip.aminoType, Tip.typeUrl); function createBaseAuxSignerData(): AuxSignerData { return { address: "", @@ -2023,7 +2031,8 @@ export const AuxSignerData = { typeUrl: "/cosmos.tx.v1beta1.AuxSignerData", value: AuxSignerData.encode(message).finish() }; + }, + registerTypeUrl() { + SignDocDirectAux.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AuxSignerData.typeUrl, AuxSignerData); -GlobalDecoderRegistry.registerAminoProtoMapping(AuxSignerData.aminoType, AuxSignerData.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/upgrade/v1beta1/upgrade.ts b/libs/interchain-react/src/cosmos/upgrade/v1beta1/upgrade.ts index c2adfcb7..add35514 100644 --- a/libs/interchain-react/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/libs/interchain-react/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -303,10 +303,9 @@ export const Plan = { typeUrl: "/cosmos.upgrade.v1beta1.Plan", value: Plan.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Plan.typeUrl, Plan); -GlobalDecoderRegistry.registerAminoProtoMapping(Plan.aminoType, Plan.typeUrl); function createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal { return { title: "", @@ -405,10 +404,13 @@ export const SoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", value: SoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); + Plan.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); function createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal { return { title: "", @@ -495,10 +497,12 @@ export const CancelSoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", value: CancelSoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); function createBaseModuleVersion(): ModuleVersion { return { name: "", @@ -585,7 +589,6 @@ export const ModuleVersion = { typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", value: ModuleVersion.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ModuleVersion.typeUrl, ModuleVersion); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleVersion.aminoType, ModuleVersion.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts b/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts index a0043688..d73007c6 100644 --- a/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount } from "./tx"; export const createCreateVestingAccount = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateVestingAccount.typeUrl, encoders: toEncoders(MsgCreateVestingAccount), - converters: toConverters(MsgCreateVestingAccount) + converters: toConverters(MsgCreateVestingAccount), + deps: [MsgCreateVestingAccount] }); export const useCreateVestingAccount = buildUseMutation({ builderMutationFn: createCreateVestingAccount @@ -15,7 +16,8 @@ export const createCreatePermanentLockedAccount = (clientResolver?: SigningClien clientResolver, typeUrl: MsgCreatePermanentLockedAccount.typeUrl, encoders: toEncoders(MsgCreatePermanentLockedAccount), - converters: toConverters(MsgCreatePermanentLockedAccount) + converters: toConverters(MsgCreatePermanentLockedAccount), + deps: [MsgCreatePermanentLockedAccount] }); export const useCreatePermanentLockedAccount = buildUseMutation({ builderMutationFn: createCreatePermanentLockedAccount @@ -24,7 +26,8 @@ export const createCreatePeriodicVestingAccount = (clientResolver?: SigningClien clientResolver, typeUrl: MsgCreatePeriodicVestingAccount.typeUrl, encoders: toEncoders(MsgCreatePeriodicVestingAccount), - converters: toConverters(MsgCreatePeriodicVestingAccount) + converters: toConverters(MsgCreatePeriodicVestingAccount), + deps: [MsgCreatePeriodicVestingAccount] }); export const useCreatePeriodicVestingAccount = buildUseMutation({ builderMutationFn: createCreatePeriodicVestingAccount diff --git a/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.ts b/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.ts index 4e9fcb3f..5354ddff 100644 --- a/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.ts +++ b/libs/interchain-react/src/cosmos/vesting/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Period, PeriodAmino } from "./vesting"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateVestingAccount defines a message that enables creating a vesting * account. @@ -277,10 +276,11 @@ export const MsgCreateVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateVestingAccount.typeUrl, MsgCreateVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccount.aminoType, MsgCreateVestingAccount.typeUrl); function createBaseMsgCreateVestingAccountResponse(): MsgCreateVestingAccountResponse { return {}; } @@ -342,10 +342,9 @@ export const MsgCreateVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", value: MsgCreateVestingAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateVestingAccountResponse.typeUrl, MsgCreateVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccountResponse.aminoType, MsgCreateVestingAccountResponse.typeUrl); function createBaseMsgCreatePermanentLockedAccount(): MsgCreatePermanentLockedAccount { return { fromAddress: "", @@ -446,10 +445,11 @@ export const MsgCreatePermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccount.typeUrl, MsgCreatePermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccount.aminoType, MsgCreatePermanentLockedAccount.typeUrl); function createBaseMsgCreatePermanentLockedAccountResponse(): MsgCreatePermanentLockedAccountResponse { return {}; } @@ -511,10 +511,9 @@ export const MsgCreatePermanentLockedAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", value: MsgCreatePermanentLockedAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccountResponse.typeUrl, MsgCreatePermanentLockedAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccountResponse.aminoType, MsgCreatePermanentLockedAccountResponse.typeUrl); function createBaseMsgCreatePeriodicVestingAccount(): MsgCreatePeriodicVestingAccount { return { fromAddress: "", @@ -627,10 +626,11 @@ export const MsgCreatePeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", value: MsgCreatePeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccount.typeUrl, MsgCreatePeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccount.aminoType, MsgCreatePeriodicVestingAccount.typeUrl); function createBaseMsgCreatePeriodicVestingAccountResponse(): MsgCreatePeriodicVestingAccountResponse { return {}; } @@ -692,7 +692,6 @@ export const MsgCreatePeriodicVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", value: MsgCreatePeriodicVestingAccountResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccountResponse.typeUrl, MsgCreatePeriodicVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccountResponse.aminoType, MsgCreatePeriodicVestingAccountResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos/vesting/v1beta1/vesting.ts b/libs/interchain-react/src/cosmos/vesting/v1beta1/vesting.ts index 91f05562..f886cac4 100644 --- a/libs/interchain-react/src/cosmos/vesting/v1beta1/vesting.ts +++ b/libs/interchain-react/src/cosmos/vesting/v1beta1/vesting.ts @@ -2,7 +2,6 @@ import { BaseAccount, BaseAccountAmino } from "../../auth/v1beta1/auth"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all * the necessary fields needed for any vesting account implementation. @@ -287,10 +286,12 @@ export const BaseVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", value: BaseVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BaseVestingAccount.typeUrl, BaseVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseVestingAccount.aminoType, BaseVestingAccount.typeUrl); function createBaseContinuousVestingAccount(): ContinuousVestingAccount { return { baseVestingAccount: undefined, @@ -377,10 +378,11 @@ export const ContinuousVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", value: ContinuousVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContinuousVestingAccount.typeUrl, ContinuousVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ContinuousVestingAccount.aminoType, ContinuousVestingAccount.typeUrl); function createBaseDelayedVestingAccount(): DelayedVestingAccount { return { baseVestingAccount: undefined @@ -455,10 +457,11 @@ export const DelayedVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", value: DelayedVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelayedVestingAccount.typeUrl, DelayedVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(DelayedVestingAccount.aminoType, DelayedVestingAccount.typeUrl); function createBasePeriod(): Period { return { length: BigInt(0), @@ -547,10 +550,11 @@ export const Period = { typeUrl: "/cosmos.vesting.v1beta1.Period", value: Period.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Period.typeUrl, Period); -GlobalDecoderRegistry.registerAminoProtoMapping(Period.aminoType, Period.typeUrl); function createBasePeriodicVestingAccount(): PeriodicVestingAccount { return { baseVestingAccount: undefined, @@ -651,10 +655,12 @@ export const PeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", value: PeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PeriodicVestingAccount.typeUrl, PeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PeriodicVestingAccount.aminoType, PeriodicVestingAccount.typeUrl); function createBasePermanentLockedAccount(): PermanentLockedAccount { return { baseVestingAccount: undefined @@ -729,7 +735,8 @@ export const PermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", value: PermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(PermanentLockedAccount.typeUrl, PermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PermanentLockedAccount.aminoType, PermanentLockedAccount.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmos_proto/cosmos.ts b/libs/interchain-react/src/cosmos_proto/cosmos.ts index 0a97877f..9c5ace2a 100644 --- a/libs/interchain-react/src/cosmos_proto/cosmos.ts +++ b/libs/interchain-react/src/cosmos_proto/cosmos.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../binary"; import { DeepPartial } from "../helpers"; -import { GlobalDecoderRegistry } from "../registry"; export enum ScalarType { SCALAR_TYPE_UNSPECIFIED = 0, SCALAR_TYPE_STRING = 1, @@ -231,9 +230,9 @@ export const InterfaceDescriptor = { typeUrl: "/cosmos_proto.InterfaceDescriptor", value: InterfaceDescriptor.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InterfaceDescriptor.typeUrl, InterfaceDescriptor); function createBaseScalarDescriptor(): ScalarDescriptor { return { name: "", @@ -336,6 +335,6 @@ export const ScalarDescriptor = { typeUrl: "/cosmos_proto.ScalarDescriptor", value: ScalarDescriptor.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ScalarDescriptor.typeUrl, ScalarDescriptor); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmwasm/wasm/v1/query.rpc.func.ts b/libs/interchain-react/src/cosmwasm/wasm/v1/query.rpc.func.ts index 19541ee4..32e4b695 100644 --- a/libs/interchain-react/src/cosmwasm/wasm/v1/query.rpc.func.ts +++ b/libs/interchain-react/src/cosmwasm/wasm/v1/query.rpc.func.ts @@ -6,7 +6,8 @@ export const createGetContractInfo = (clientResolver?: RpcResolver) => buildQuer decode: QueryContractInfoResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractInfo", - clientResolver + clientResolver, + deps: [QueryContractInfoRequest, QueryContractInfoResponse] }); export const useGetContractInfo = buildUseQuery({ builderQueryFn: createGetContractInfo, @@ -17,7 +18,8 @@ export const createGetContractHistory = (clientResolver?: RpcResolver) => buildQ decode: QueryContractHistoryResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractHistory", - clientResolver + clientResolver, + deps: [QueryContractHistoryRequest, QueryContractHistoryResponse] }); export const useGetContractHistory = buildUseQuery({ builderQueryFn: createGetContractHistory, @@ -28,7 +30,8 @@ export const createGetContractsByCode = (clientResolver?: RpcResolver) => buildQ decode: QueryContractsByCodeResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCode", - clientResolver + clientResolver, + deps: [QueryContractsByCodeRequest, QueryContractsByCodeResponse] }); export const useGetContractsByCode = buildUseQuery({ builderQueryFn: createGetContractsByCode, @@ -39,7 +42,8 @@ export const createGetAllContractState = (clientResolver?: RpcResolver) => build decode: QueryAllContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "AllContractState", - clientResolver + clientResolver, + deps: [QueryAllContractStateRequest, QueryAllContractStateResponse] }); export const useGetAllContractState = buildUseQuery({ builderQueryFn: createGetAllContractState, @@ -50,7 +54,8 @@ export const createGetRawContractState = (clientResolver?: RpcResolver) => build decode: QueryRawContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "RawContractState", - clientResolver + clientResolver, + deps: [QueryRawContractStateRequest, QueryRawContractStateResponse] }); export const useGetRawContractState = buildUseQuery({ builderQueryFn: createGetRawContractState, @@ -61,7 +66,8 @@ export const createGetSmartContractState = (clientResolver?: RpcResolver) => bui decode: QuerySmartContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "SmartContractState", - clientResolver + clientResolver, + deps: [QuerySmartContractStateRequest, QuerySmartContractStateResponse] }); export const useGetSmartContractState = buildUseQuery({ builderQueryFn: createGetSmartContractState, @@ -72,7 +78,8 @@ export const createGetCode = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetCode, @@ -83,7 +90,8 @@ export const createGetCodes = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetCodes, @@ -94,7 +102,8 @@ export const createGetCodeInfo = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetCodeInfo, @@ -105,7 +114,8 @@ export const createGetPinnedCodes = (clientResolver?: RpcResolver) => buildQuery decode: QueryPinnedCodesResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "PinnedCodes", - clientResolver + clientResolver, + deps: [QueryPinnedCodesRequest, QueryPinnedCodesResponse] }); export const useGetPinnedCodes = buildUseQuery({ builderQueryFn: createGetPinnedCodes, @@ -116,7 +126,8 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ builderQueryFn: createGetParams, @@ -127,7 +138,8 @@ export const createGetContractsByCreator = (clientResolver?: RpcResolver) => bui decode: QueryContractsByCreatorResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCreator", - clientResolver + clientResolver, + deps: [QueryContractsByCreatorRequest, QueryContractsByCreatorResponse] }); export const useGetContractsByCreator = buildUseQuery({ builderQueryFn: createGetContractsByCreator, @@ -138,7 +150,8 @@ export const createGetWasmLimitsConfig = (clientResolver?: RpcResolver) => build decode: QueryWasmLimitsConfigResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "WasmLimitsConfig", - clientResolver + clientResolver, + deps: [QueryWasmLimitsConfigRequest, QueryWasmLimitsConfigResponse] }); export const useGetWasmLimitsConfig = buildUseQuery({ builderQueryFn: createGetWasmLimitsConfig, @@ -149,7 +162,8 @@ export const createGetBuildAddress = (clientResolver?: RpcResolver) => buildQuer decode: QueryBuildAddressResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "BuildAddress", - clientResolver + clientResolver, + deps: [QueryBuildAddressRequest, QueryBuildAddressResponse] }); export const useGetBuildAddress = buildUseQuery({ builderQueryFn: createGetBuildAddress, diff --git a/libs/interchain-react/src/cosmwasm/wasm/v1/query.ts b/libs/interchain-react/src/cosmwasm/wasm/v1/query.ts index cd8c0b8e..4352cce0 100644 --- a/libs/interchain-react/src/cosmwasm/wasm/v1/query.ts +++ b/libs/interchain-react/src/cosmwasm/wasm/v1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { ContractInfo, ContractInfoAmino, ContractCodeHistoryEntry, ContractCodeHistoryEntryAmino, Model, ModelAmino, AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -774,10 +773,9 @@ export const QueryContractInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", value: QueryContractInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryContractInfoRequest.typeUrl, QueryContractInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoRequest.aminoType, QueryContractInfoRequest.typeUrl); function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { return { address: "", @@ -864,10 +862,11 @@ export const QueryContractInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", value: QueryContractInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractInfoResponse.typeUrl, QueryContractInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoResponse.aminoType, QueryContractInfoResponse.typeUrl); function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { return { address: "", @@ -954,10 +953,11 @@ export const QueryContractHistoryRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", value: QueryContractHistoryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryRequest.typeUrl, QueryContractHistoryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryRequest.aminoType, QueryContractHistoryRequest.typeUrl); function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse { return { entries: [], @@ -1046,10 +1046,12 @@ export const QueryContractHistoryResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", value: QueryContractHistoryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractCodeHistoryEntry.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryResponse.typeUrl, QueryContractHistoryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryResponse.aminoType, QueryContractHistoryResponse.typeUrl); function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { return { codeId: BigInt(0), @@ -1136,10 +1138,11 @@ export const QueryContractsByCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", value: QueryContractsByCodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeRequest.typeUrl, QueryContractsByCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeRequest.aminoType, QueryContractsByCodeRequest.typeUrl); function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse { return { contracts: [], @@ -1228,10 +1231,11 @@ export const QueryContractsByCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", value: QueryContractsByCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeResponse.typeUrl, QueryContractsByCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeResponse.aminoType, QueryContractsByCodeResponse.typeUrl); function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { return { address: "", @@ -1318,10 +1322,11 @@ export const QueryAllContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", value: QueryAllContractStateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateRequest.typeUrl, QueryAllContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateRequest.aminoType, QueryAllContractStateRequest.typeUrl); function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse { return { models: [], @@ -1410,10 +1415,12 @@ export const QueryAllContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", value: QueryAllContractStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Model.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateResponse.typeUrl, QueryAllContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateResponse.aminoType, QueryAllContractStateResponse.typeUrl); function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { return { address: "", @@ -1500,10 +1507,9 @@ export const QueryRawContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", value: QueryRawContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateRequest.typeUrl, QueryRawContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateRequest.aminoType, QueryRawContractStateRequest.typeUrl); function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse { return { data: new Uint8Array() @@ -1578,10 +1584,9 @@ export const QueryRawContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", value: QueryRawContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateResponse.typeUrl, QueryRawContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateResponse.aminoType, QueryRawContractStateResponse.typeUrl); function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { return { address: "", @@ -1668,10 +1673,9 @@ export const QuerySmartContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", value: QuerySmartContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateRequest.typeUrl, QuerySmartContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateRequest.aminoType, QuerySmartContractStateRequest.typeUrl); function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse { return { data: new Uint8Array() @@ -1746,10 +1750,9 @@ export const QuerySmartContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", value: QuerySmartContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateResponse.typeUrl, QuerySmartContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateResponse.aminoType, QuerySmartContractStateResponse.typeUrl); function createBaseQueryCodeRequest(): QueryCodeRequest { return { codeId: BigInt(0) @@ -1824,10 +1827,9 @@ export const QueryCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", value: QueryCodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeRequest.typeUrl, QueryCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeRequest.aminoType, QueryCodeRequest.typeUrl); function createBaseQueryCodeInfoRequest(): QueryCodeInfoRequest { return { codeId: BigInt(0) @@ -1902,10 +1904,9 @@ export const QueryCodeInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoRequest", value: QueryCodeInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeInfoRequest.typeUrl, QueryCodeInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoRequest.aminoType, QueryCodeInfoRequest.typeUrl); function createBaseQueryCodeInfoResponse(): QueryCodeInfoResponse { return { codeId: BigInt(0), @@ -2016,10 +2017,11 @@ export const QueryCodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoResponse", value: QueryCodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeInfoResponse.typeUrl, QueryCodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoResponse.aminoType, QueryCodeInfoResponse.typeUrl); function createBaseCodeInfoResponse(): CodeInfoResponse { return { codeId: BigInt(0), @@ -2130,10 +2132,11 @@ export const CodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", value: CodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfoResponse.typeUrl, CodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfoResponse.aminoType, CodeInfoResponse.typeUrl); function createBaseQueryCodeResponse(): QueryCodeResponse { return { codeInfo: undefined, @@ -2220,10 +2223,11 @@ export const QueryCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", value: QueryCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeResponse.typeUrl, QueryCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeResponse.aminoType, QueryCodeResponse.typeUrl); function createBaseQueryCodesRequest(): QueryCodesRequest { return { pagination: undefined @@ -2298,10 +2302,11 @@ export const QueryCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", value: QueryCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesRequest.typeUrl, QueryCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesRequest.aminoType, QueryCodesRequest.typeUrl); function createBaseQueryCodesResponse(): QueryCodesResponse { return { codeInfos: [], @@ -2390,10 +2395,12 @@ export const QueryCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", value: QueryCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesResponse.typeUrl, QueryCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesResponse.aminoType, QueryCodesResponse.typeUrl); function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { return { pagination: undefined @@ -2468,10 +2475,11 @@ export const QueryPinnedCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", value: QueryPinnedCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesRequest.typeUrl, QueryPinnedCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesRequest.aminoType, QueryPinnedCodesRequest.typeUrl); function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { return { codeIds: [], @@ -2569,10 +2577,11 @@ export const QueryPinnedCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", value: QueryPinnedCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesResponse.typeUrl, QueryPinnedCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesResponse.aminoType, QueryPinnedCodesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2634,10 +2643,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -2712,10 +2720,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest { return { creatorAddress: "", @@ -2802,10 +2811,11 @@ export const QueryContractsByCreatorRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest", value: QueryContractsByCreatorRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorRequest.typeUrl, QueryContractsByCreatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorRequest.aminoType, QueryContractsByCreatorRequest.typeUrl); function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorResponse { return { contractAddresses: [], @@ -2894,10 +2904,11 @@ export const QueryContractsByCreatorResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse", value: QueryContractsByCreatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorResponse.typeUrl, QueryContractsByCreatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorResponse.aminoType, QueryContractsByCreatorResponse.typeUrl); function createBaseQueryWasmLimitsConfigRequest(): QueryWasmLimitsConfigRequest { return {}; } @@ -2959,10 +2970,9 @@ export const QueryWasmLimitsConfigRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigRequest", value: QueryWasmLimitsConfigRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigRequest.typeUrl, QueryWasmLimitsConfigRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigRequest.aminoType, QueryWasmLimitsConfigRequest.typeUrl); function createBaseQueryWasmLimitsConfigResponse(): QueryWasmLimitsConfigResponse { return { config: "" @@ -3037,10 +3047,9 @@ export const QueryWasmLimitsConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigResponse", value: QueryWasmLimitsConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigResponse.typeUrl, QueryWasmLimitsConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigResponse.aminoType, QueryWasmLimitsConfigResponse.typeUrl); function createBaseQueryBuildAddressRequest(): QueryBuildAddressRequest { return { codeHash: "", @@ -3151,10 +3160,9 @@ export const QueryBuildAddressRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressRequest", value: QueryBuildAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBuildAddressRequest.typeUrl, QueryBuildAddressRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressRequest.aminoType, QueryBuildAddressRequest.typeUrl); function createBaseQueryBuildAddressResponse(): QueryBuildAddressResponse { return { address: "" @@ -3229,7 +3237,6 @@ export const QueryBuildAddressResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressResponse", value: QueryBuildAddressResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(QueryBuildAddressResponse.typeUrl, QueryBuildAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressResponse.aminoType, QueryBuildAddressResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts b/libs/interchain-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts index 82a34fc7..db479ca4 100644 --- a/libs/interchain-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts +++ b/libs/interchain-react/src/cosmwasm/wasm/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../helper-func-types"; -import { buildUseMutation } from "../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../react-query"; import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract, MsgRemoveCodeUploadParamsAddresses, MsgAddCodeUploadParamsAddresses, MsgStoreAndMigrateContract, MsgUpdateContractLabel } from "./tx"; export const createStoreCode = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgStoreCode.typeUrl, encoders: toEncoders(MsgStoreCode), - converters: toConverters(MsgStoreCode) + converters: toConverters(MsgStoreCode), + deps: [MsgStoreCode] }); export const useStoreCode = buildUseMutation({ builderMutationFn: createStoreCode @@ -15,7 +16,8 @@ export const createInstantiateContract = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgInstantiateContract.typeUrl, encoders: toEncoders(MsgInstantiateContract), - converters: toConverters(MsgInstantiateContract) + converters: toConverters(MsgInstantiateContract), + deps: [MsgInstantiateContract] }); export const useInstantiateContract = buildUseMutation({ builderMutationFn: createInstantiateContract @@ -24,7 +26,8 @@ export const createInstantiateContract2 = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgInstantiateContract2.typeUrl, encoders: toEncoders(MsgInstantiateContract2), - converters: toConverters(MsgInstantiateContract2) + converters: toConverters(MsgInstantiateContract2), + deps: [MsgInstantiateContract2] }); export const useInstantiateContract2 = buildUseMutation({ builderMutationFn: createInstantiateContract2 @@ -33,7 +36,8 @@ export const createExecuteContract = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgExecuteContract.typeUrl, encoders: toEncoders(MsgExecuteContract), - converters: toConverters(MsgExecuteContract) + converters: toConverters(MsgExecuteContract), + deps: [MsgExecuteContract] }); export const useExecuteContract = buildUseMutation({ builderMutationFn: createExecuteContract @@ -42,7 +46,8 @@ export const createMigrateContract = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgMigrateContract.typeUrl, encoders: toEncoders(MsgMigrateContract), - converters: toConverters(MsgMigrateContract) + converters: toConverters(MsgMigrateContract), + deps: [MsgMigrateContract] }); export const useMigrateContract = buildUseMutation({ builderMutationFn: createMigrateContract @@ -51,7 +56,8 @@ export const createUpdateAdmin = (clientResolver?: SigningClientResolver) => bui clientResolver, typeUrl: MsgUpdateAdmin.typeUrl, encoders: toEncoders(MsgUpdateAdmin), - converters: toConverters(MsgUpdateAdmin) + converters: toConverters(MsgUpdateAdmin), + deps: [MsgUpdateAdmin] }); export const useUpdateAdmin = buildUseMutation({ builderMutationFn: createUpdateAdmin @@ -60,7 +66,8 @@ export const createClearAdmin = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgClearAdmin.typeUrl, encoders: toEncoders(MsgClearAdmin), - converters: toConverters(MsgClearAdmin) + converters: toConverters(MsgClearAdmin), + deps: [MsgClearAdmin] }); export const useClearAdmin = buildUseMutation({ builderMutationFn: createClearAdmin @@ -69,7 +76,8 @@ export const createUpdateInstantiateConfig = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgUpdateInstantiateConfig.typeUrl, encoders: toEncoders(MsgUpdateInstantiateConfig), - converters: toConverters(MsgUpdateInstantiateConfig) + converters: toConverters(MsgUpdateInstantiateConfig), + deps: [MsgUpdateInstantiateConfig] }); export const useUpdateInstantiateConfig = buildUseMutation({ builderMutationFn: createUpdateInstantiateConfig @@ -78,7 +86,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams @@ -87,7 +96,8 @@ export const createSudoContract = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgSudoContract.typeUrl, encoders: toEncoders(MsgSudoContract), - converters: toConverters(MsgSudoContract) + converters: toConverters(MsgSudoContract), + deps: [MsgSudoContract] }); export const useSudoContract = buildUseMutation({ builderMutationFn: createSudoContract @@ -96,7 +106,8 @@ export const createPinCodes = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgPinCodes.typeUrl, encoders: toEncoders(MsgPinCodes), - converters: toConverters(MsgPinCodes) + converters: toConverters(MsgPinCodes), + deps: [MsgPinCodes] }); export const usePinCodes = buildUseMutation({ builderMutationFn: createPinCodes @@ -105,7 +116,8 @@ export const createUnpinCodes = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgUnpinCodes.typeUrl, encoders: toEncoders(MsgUnpinCodes), - converters: toConverters(MsgUnpinCodes) + converters: toConverters(MsgUnpinCodes), + deps: [MsgUnpinCodes] }); export const useUnpinCodes = buildUseMutation({ builderMutationFn: createUnpinCodes @@ -114,7 +126,8 @@ export const createStoreAndInstantiateContract = (clientResolver?: SigningClient clientResolver, typeUrl: MsgStoreAndInstantiateContract.typeUrl, encoders: toEncoders(MsgStoreAndInstantiateContract), - converters: toConverters(MsgStoreAndInstantiateContract) + converters: toConverters(MsgStoreAndInstantiateContract), + deps: [MsgStoreAndInstantiateContract] }); export const useStoreAndInstantiateContract = buildUseMutation({ builderMutationFn: createStoreAndInstantiateContract @@ -123,7 +136,8 @@ export const createRemoveCodeUploadParamsAddresses = (clientResolver?: SigningCl clientResolver, typeUrl: MsgRemoveCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgRemoveCodeUploadParamsAddresses), - converters: toConverters(MsgRemoveCodeUploadParamsAddresses) + converters: toConverters(MsgRemoveCodeUploadParamsAddresses), + deps: [MsgRemoveCodeUploadParamsAddresses] }); export const useRemoveCodeUploadParamsAddresses = buildUseMutation({ builderMutationFn: createRemoveCodeUploadParamsAddresses @@ -132,7 +146,8 @@ export const createAddCodeUploadParamsAddresses = (clientResolver?: SigningClien clientResolver, typeUrl: MsgAddCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgAddCodeUploadParamsAddresses), - converters: toConverters(MsgAddCodeUploadParamsAddresses) + converters: toConverters(MsgAddCodeUploadParamsAddresses), + deps: [MsgAddCodeUploadParamsAddresses] }); export const useAddCodeUploadParamsAddresses = buildUseMutation({ builderMutationFn: createAddCodeUploadParamsAddresses @@ -141,7 +156,8 @@ export const createStoreAndMigrateContract = (clientResolver?: SigningClientReso clientResolver, typeUrl: MsgStoreAndMigrateContract.typeUrl, encoders: toEncoders(MsgStoreAndMigrateContract), - converters: toConverters(MsgStoreAndMigrateContract) + converters: toConverters(MsgStoreAndMigrateContract), + deps: [MsgStoreAndMigrateContract] }); export const useStoreAndMigrateContract = buildUseMutation({ builderMutationFn: createStoreAndMigrateContract @@ -150,7 +166,8 @@ export const createUpdateContractLabel = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgUpdateContractLabel.typeUrl, encoders: toEncoders(MsgUpdateContractLabel), - converters: toConverters(MsgUpdateContractLabel) + converters: toConverters(MsgUpdateContractLabel), + deps: [MsgUpdateContractLabel] }); export const useUpdateContractLabel = buildUseMutation({ builderMutationFn: createUpdateContractLabel diff --git a/libs/interchain-react/src/cosmwasm/wasm/v1/tx.ts b/libs/interchain-react/src/cosmwasm/wasm/v1/tx.ts index c97c9907..4d1c7288 100644 --- a/libs/interchain-react/src/cosmwasm/wasm/v1/tx.ts +++ b/libs/interchain-react/src/cosmwasm/wasm/v1/tx.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { /** Sender is the actor that signed the messages */ @@ -1070,10 +1069,11 @@ export const MsgStoreCode = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreCode.typeUrl, MsgStoreCode); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCode.aminoType, MsgStoreCode.typeUrl); function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { return { codeId: BigInt(0), @@ -1160,10 +1160,9 @@ export const MsgStoreCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", value: MsgStoreCodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreCodeResponse.typeUrl, MsgStoreCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCodeResponse.aminoType, MsgStoreCodeResponse.typeUrl); function createBaseMsgInstantiateContract(): MsgInstantiateContract { return { sender: "", @@ -1300,10 +1299,11 @@ export const MsgInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract.typeUrl, MsgInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract.aminoType, MsgInstantiateContract.typeUrl); function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { return { address: "", @@ -1390,10 +1390,9 @@ export const MsgInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", value: MsgInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContractResponse.typeUrl, MsgInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContractResponse.aminoType, MsgInstantiateContractResponse.typeUrl); function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { return { sender: "", @@ -1554,10 +1553,11 @@ export const MsgInstantiateContract2 = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", value: MsgInstantiateContract2.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract2.typeUrl, MsgInstantiateContract2); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2.aminoType, MsgInstantiateContract2.typeUrl); function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { return { address: "", @@ -1644,10 +1644,9 @@ export const MsgInstantiateContract2Response = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", value: MsgInstantiateContract2Response.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContract2Response.typeUrl, MsgInstantiateContract2Response); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2Response.aminoType, MsgInstantiateContract2Response.typeUrl); function createBaseMsgExecuteContract(): MsgExecuteContract { return { sender: "", @@ -1760,10 +1759,11 @@ export const MsgExecuteContract = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecuteContract.typeUrl, MsgExecuteContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContract.aminoType, MsgExecuteContract.typeUrl); function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { return { data: new Uint8Array() @@ -1838,10 +1838,9 @@ export const MsgExecuteContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", value: MsgExecuteContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractResponse.typeUrl, MsgExecuteContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContractResponse.aminoType, MsgExecuteContractResponse.typeUrl); function createBaseMsgMigrateContract(): MsgMigrateContract { return { sender: "", @@ -1952,10 +1951,9 @@ export const MsgMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContract.typeUrl, MsgMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContract.aminoType, MsgMigrateContract.typeUrl); function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { return { data: new Uint8Array() @@ -2030,10 +2028,9 @@ export const MsgMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", value: MsgMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContractResponse.typeUrl, MsgMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContractResponse.aminoType, MsgMigrateContractResponse.typeUrl); function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { return { sender: "", @@ -2132,10 +2129,9 @@ export const MsgUpdateAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", value: MsgUpdateAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdmin.typeUrl, MsgUpdateAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdmin.aminoType, MsgUpdateAdmin.typeUrl); function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { return {}; } @@ -2197,10 +2193,9 @@ export const MsgUpdateAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", value: MsgUpdateAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdminResponse.typeUrl, MsgUpdateAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdminResponse.aminoType, MsgUpdateAdminResponse.typeUrl); function createBaseMsgClearAdmin(): MsgClearAdmin { return { sender: "", @@ -2287,10 +2282,9 @@ export const MsgClearAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdmin.typeUrl, MsgClearAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdmin.aminoType, MsgClearAdmin.typeUrl); function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { return {}; } @@ -2352,10 +2346,9 @@ export const MsgClearAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", value: MsgClearAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdminResponse.typeUrl, MsgClearAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdminResponse.aminoType, MsgClearAdminResponse.typeUrl); function createBaseMsgUpdateInstantiateConfig(): MsgUpdateInstantiateConfig { return { sender: "", @@ -2454,10 +2447,11 @@ export const MsgUpdateInstantiateConfig = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", value: MsgUpdateInstantiateConfig.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfig.typeUrl, MsgUpdateInstantiateConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfig.aminoType, MsgUpdateInstantiateConfig.typeUrl); function createBaseMsgUpdateInstantiateConfigResponse(): MsgUpdateInstantiateConfigResponse { return {}; } @@ -2519,10 +2513,9 @@ export const MsgUpdateInstantiateConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", value: MsgUpdateInstantiateConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfigResponse.typeUrl, MsgUpdateInstantiateConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfigResponse.aminoType, MsgUpdateInstantiateConfigResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2609,10 +2602,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2674,10 +2668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSudoContract(): MsgSudoContract { return { authority: "", @@ -2776,10 +2769,9 @@ export const MsgSudoContract = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", value: MsgSudoContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContract.typeUrl, MsgSudoContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContract.aminoType, MsgSudoContract.typeUrl); function createBaseMsgSudoContractResponse(): MsgSudoContractResponse { return { data: new Uint8Array() @@ -2854,10 +2846,9 @@ export const MsgSudoContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", value: MsgSudoContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContractResponse.typeUrl, MsgSudoContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContractResponse.aminoType, MsgSudoContractResponse.typeUrl); function createBaseMsgPinCodes(): MsgPinCodes { return { authority: "", @@ -2955,10 +2946,9 @@ export const MsgPinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", value: MsgPinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodes.typeUrl, MsgPinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodes.aminoType, MsgPinCodes.typeUrl); function createBaseMsgPinCodesResponse(): MsgPinCodesResponse { return {}; } @@ -3020,10 +3010,9 @@ export const MsgPinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", value: MsgPinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodesResponse.typeUrl, MsgPinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodesResponse.aminoType, MsgPinCodesResponse.typeUrl); function createBaseMsgUnpinCodes(): MsgUnpinCodes { return { authority: "", @@ -3121,10 +3110,9 @@ export const MsgUnpinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", value: MsgUnpinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodes.typeUrl, MsgUnpinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodes.aminoType, MsgUnpinCodes.typeUrl); function createBaseMsgUnpinCodesResponse(): MsgUnpinCodesResponse { return {}; } @@ -3186,10 +3174,9 @@ export const MsgUnpinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", value: MsgUnpinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodesResponse.typeUrl, MsgUnpinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodesResponse.aminoType, MsgUnpinCodesResponse.typeUrl); function createBaseMsgStoreAndInstantiateContract(): MsgStoreAndInstantiateContract { return { authority: "", @@ -3386,10 +3373,12 @@ export const MsgStoreAndInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", value: MsgStoreAndInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContract.typeUrl, MsgStoreAndInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContract.aminoType, MsgStoreAndInstantiateContract.typeUrl); function createBaseMsgStoreAndInstantiateContractResponse(): MsgStoreAndInstantiateContractResponse { return { address: "", @@ -3476,10 +3465,9 @@ export const MsgStoreAndInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", value: MsgStoreAndInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContractResponse.typeUrl, MsgStoreAndInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContractResponse.aminoType, MsgStoreAndInstantiateContractResponse.typeUrl); function createBaseMsgAddCodeUploadParamsAddresses(): MsgAddCodeUploadParamsAddresses { return { authority: "", @@ -3568,10 +3556,9 @@ export const MsgAddCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", value: MsgAddCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddresses.typeUrl, MsgAddCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddresses.aminoType, MsgAddCodeUploadParamsAddresses.typeUrl); function createBaseMsgAddCodeUploadParamsAddressesResponse(): MsgAddCodeUploadParamsAddressesResponse { return {}; } @@ -3633,10 +3620,9 @@ export const MsgAddCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", value: MsgAddCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddressesResponse.typeUrl, MsgAddCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddressesResponse.aminoType, MsgAddCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddresses(): MsgRemoveCodeUploadParamsAddresses { return { authority: "", @@ -3725,10 +3711,9 @@ export const MsgRemoveCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", value: MsgRemoveCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddresses.typeUrl, MsgRemoveCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddresses.aminoType, MsgRemoveCodeUploadParamsAddresses.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddressesResponse(): MsgRemoveCodeUploadParamsAddressesResponse { return {}; } @@ -3790,10 +3775,9 @@ export const MsgRemoveCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", value: MsgRemoveCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddressesResponse.typeUrl, MsgRemoveCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddressesResponse.aminoType, MsgRemoveCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgStoreAndMigrateContract(): MsgStoreAndMigrateContract { return { authority: "", @@ -3916,10 +3900,11 @@ export const MsgStoreAndMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", value: MsgStoreAndMigrateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContract.typeUrl, MsgStoreAndMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContract.aminoType, MsgStoreAndMigrateContract.typeUrl); function createBaseMsgStoreAndMigrateContractResponse(): MsgStoreAndMigrateContractResponse { return { codeId: BigInt(0), @@ -4018,10 +4003,9 @@ export const MsgStoreAndMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", value: MsgStoreAndMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContractResponse.typeUrl, MsgStoreAndMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContractResponse.aminoType, MsgStoreAndMigrateContractResponse.typeUrl); function createBaseMsgUpdateContractLabel(): MsgUpdateContractLabel { return { sender: "", @@ -4120,10 +4104,9 @@ export const MsgUpdateContractLabel = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", value: MsgUpdateContractLabel.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContractLabel.typeUrl, MsgUpdateContractLabel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabel.aminoType, MsgUpdateContractLabel.typeUrl); function createBaseMsgUpdateContractLabelResponse(): MsgUpdateContractLabelResponse { return {}; } @@ -4185,7 +4168,6 @@ export const MsgUpdateContractLabelResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", value: MsgUpdateContractLabelResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateContractLabelResponse.typeUrl, MsgUpdateContractLabelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabelResponse.aminoType, MsgUpdateContractLabelResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/cosmwasm/wasm/v1/types.ts b/libs/interchain-react/src/cosmwasm/wasm/v1/types.ts index 3dccb816..16d3b488 100644 --- a/libs/interchain-react/src/cosmwasm/wasm/v1/types.ts +++ b/libs/interchain-react/src/cosmwasm/wasm/v1/types.ts @@ -386,10 +386,9 @@ export const AccessTypeParam = { typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", value: AccessTypeParam.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessTypeParam.typeUrl, AccessTypeParam); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessTypeParam.aminoType, AccessTypeParam.typeUrl); function createBaseAccessConfig(): AccessConfig { return { permission: 0, @@ -478,10 +477,9 @@ export const AccessConfig = { typeUrl: "/cosmwasm.wasm.v1.AccessConfig", value: AccessConfig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessConfig.typeUrl, AccessConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessConfig.aminoType, AccessConfig.typeUrl); function createBaseParams(): Params { return { codeUploadAccess: AccessConfig.fromPartial({}), @@ -568,10 +566,11 @@ export const Params = { typeUrl: "/cosmwasm.wasm.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseCodeInfo(): CodeInfo { return { codeHash: new Uint8Array(), @@ -670,10 +669,11 @@ export const CodeInfo = { typeUrl: "/cosmwasm.wasm.v1.CodeInfo", value: CodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfo.typeUrl, CodeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfo.aminoType, CodeInfo.typeUrl); function createBaseContractInfo(): ContractInfo { return { codeId: BigInt(0), @@ -820,10 +820,9 @@ export const ContractInfo = { typeUrl: "/cosmwasm.wasm.v1.ContractInfo", value: ContractInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ContractInfo.typeUrl, ContractInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractInfo.aminoType, ContractInfo.typeUrl); function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { return { operation: 0, @@ -934,10 +933,11 @@ export const ContractCodeHistoryEntry = { typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", value: ContractCodeHistoryEntry.encode(message).finish() }; + }, + registerTypeUrl() { + AbsoluteTxPosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContractCodeHistoryEntry.typeUrl, ContractCodeHistoryEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractCodeHistoryEntry.aminoType, ContractCodeHistoryEntry.typeUrl); function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { return { blockHeight: BigInt(0), @@ -1024,10 +1024,9 @@ export const AbsoluteTxPosition = { typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", value: AbsoluteTxPosition.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AbsoluteTxPosition.typeUrl, AbsoluteTxPosition); -GlobalDecoderRegistry.registerAminoProtoMapping(AbsoluteTxPosition.aminoType, AbsoluteTxPosition.typeUrl); function createBaseModel(): Model { return { key: new Uint8Array(), @@ -1114,7 +1113,6 @@ export const Model = { typeUrl: "/cosmwasm.wasm.v1.Model", value: Model.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Model.typeUrl, Model); -GlobalDecoderRegistry.registerAminoProtoMapping(Model.aminoType, Model.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/extern.ts b/libs/interchain-react/src/extern.ts index c7325c58..7cbe4e00 100644 --- a/libs/interchain-react/src/extern.ts +++ b/libs/interchain-react/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/google/api/http.ts b/libs/interchain-react/src/google/api/http.ts index 3fd3a11b..92221c2c 100644 --- a/libs/interchain-react/src/google/api/http.ts +++ b/libs/interchain-react/src/google/api/http.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * Defines the HTTP configuration for an API service. It contains a list of * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method @@ -802,9 +801,11 @@ export const Http = { typeUrl: "/google.api.Http", value: Http.encode(message).finish() }; + }, + registerTypeUrl() { + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Http.typeUrl, Http); function createBaseHttpRule(): HttpRule { return { selector: "", @@ -982,9 +983,12 @@ export const HttpRule = { typeUrl: "/google.api.HttpRule", value: HttpRule.encode(message).finish() }; + }, + registerTypeUrl() { + CustomHttpPattern.registerTypeUrl(); + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HttpRule.typeUrl, HttpRule); function createBaseCustomHttpPattern(): CustomHttpPattern { return { kind: "", @@ -1064,6 +1068,6 @@ export const CustomHttpPattern = { typeUrl: "/google.api.CustomHttpPattern", value: CustomHttpPattern.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CustomHttpPattern.typeUrl, CustomHttpPattern); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/google/protobuf/any.ts b/libs/interchain-react/src/google/protobuf/any.ts index bbae1be1..ee7f0ff9 100644 --- a/libs/interchain-react/src/google/protobuf/any.ts +++ b/libs/interchain-react/src/google/protobuf/any.ts @@ -327,5 +327,6 @@ export const Any = { typeUrl: "/google.protobuf.Any", value: Any.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; \ No newline at end of file diff --git a/libs/interchain-react/src/google/protobuf/descriptor.ts b/libs/interchain-react/src/google/protobuf/descriptor.ts index 53b60923..486eb527 100644 --- a/libs/interchain-react/src/google/protobuf/descriptor.ts +++ b/libs/interchain-react/src/google/protobuf/descriptor.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** The full set of known editions. */ export enum Edition { /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ @@ -3156,9 +3155,11 @@ export const FileDescriptorSet = { typeUrl: "/google.protobuf.FileDescriptorSet", value: FileDescriptorSet.encode(message).finish() }; + }, + registerTypeUrl() { + FileDescriptorProto.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorSet.typeUrl, FileDescriptorSet); function createBaseFileDescriptorProto(): FileDescriptorProto { return { name: "", @@ -3402,9 +3403,16 @@ export const FileDescriptorProto = { typeUrl: "/google.protobuf.FileDescriptorProto", value: FileDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + ServiceDescriptorProto.registerTypeUrl(); + FieldDescriptorProto.registerTypeUrl(); + FileOptions.registerTypeUrl(); + SourceCodeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorProto.typeUrl, FileDescriptorProto); function createBaseDescriptorProto(): DescriptorProto { return { name: "", @@ -3596,9 +3604,17 @@ export const DescriptorProto = { typeUrl: "/google.protobuf.DescriptorProto", value: DescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldDescriptorProto.registerTypeUrl(); + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + DescriptorProto_ExtensionRange.registerTypeUrl(); + OneofDescriptorProto.registerTypeUrl(); + MessageOptions.registerTypeUrl(); + DescriptorProto_ReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto.typeUrl, DescriptorProto); function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { return { start: 0, @@ -3690,9 +3706,11 @@ export const DescriptorProto_ExtensionRange = { typeUrl: "/google.protobuf.ExtensionRange", value: DescriptorProto_ExtensionRange.encode(message).finish() }; + }, + registerTypeUrl() { + ExtensionRangeOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto_ExtensionRange.typeUrl, DescriptorProto_ExtensionRange); function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { return { start: 0, @@ -3772,9 +3790,9 @@ export const DescriptorProto_ReservedRange = { typeUrl: "/google.protobuf.ReservedRange", value: DescriptorProto_ReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DescriptorProto_ReservedRange.typeUrl, DescriptorProto_ReservedRange); function createBaseExtensionRangeOptions(): ExtensionRangeOptions { return { uninterpretedOption: [], @@ -3882,9 +3900,13 @@ export const ExtensionRangeOptions = { typeUrl: "/google.protobuf.ExtensionRangeOptions", value: ExtensionRangeOptions.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption.registerTypeUrl(); + ExtensionRangeOptions_Declaration.registerTypeUrl(); + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtensionRangeOptions.typeUrl, ExtensionRangeOptions); function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration { return { number: 0, @@ -4000,9 +4022,9 @@ export const ExtensionRangeOptions_Declaration = { typeUrl: "/google.protobuf.Declaration", value: ExtensionRangeOptions_Declaration.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtensionRangeOptions_Declaration.typeUrl, ExtensionRangeOptions_Declaration); function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { name: "", @@ -4190,9 +4212,11 @@ export const FieldDescriptorProto = { typeUrl: "/google.protobuf.FieldDescriptorProto", value: FieldDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldDescriptorProto.typeUrl, FieldDescriptorProto); function createBaseOneofDescriptorProto(): OneofDescriptorProto { return { name: "", @@ -4272,9 +4296,11 @@ export const OneofDescriptorProto = { typeUrl: "/google.protobuf.OneofDescriptorProto", value: OneofDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + OneofOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofDescriptorProto.typeUrl, OneofDescriptorProto); function createBaseEnumDescriptorProto(): EnumDescriptorProto { return { name: "", @@ -4396,9 +4422,13 @@ export const EnumDescriptorProto = { typeUrl: "/google.protobuf.EnumDescriptorProto", value: EnumDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueDescriptorProto.registerTypeUrl(); + EnumOptions.registerTypeUrl(); + EnumDescriptorProto_EnumReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumDescriptorProto.typeUrl, EnumDescriptorProto); function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { return { start: 0, @@ -4478,9 +4508,9 @@ export const EnumDescriptorProto_EnumReservedRange = { typeUrl: "/google.protobuf.EnumReservedRange", value: EnumDescriptorProto_EnumReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EnumDescriptorProto_EnumReservedRange.typeUrl, EnumDescriptorProto_EnumReservedRange); function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { return { name: "", @@ -4572,9 +4602,11 @@ export const EnumValueDescriptorProto = { typeUrl: "/google.protobuf.EnumValueDescriptorProto", value: EnumValueDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueDescriptorProto.typeUrl, EnumValueDescriptorProto); function createBaseServiceDescriptorProto(): ServiceDescriptorProto { return { name: "", @@ -4668,9 +4700,12 @@ export const ServiceDescriptorProto = { typeUrl: "/google.protobuf.ServiceDescriptorProto", value: ServiceDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodDescriptorProto.registerTypeUrl(); + ServiceOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceDescriptorProto.typeUrl, ServiceDescriptorProto); function createBaseMethodDescriptorProto(): MethodDescriptorProto { return { name: "", @@ -4798,9 +4833,11 @@ export const MethodDescriptorProto = { typeUrl: "/google.protobuf.MethodDescriptorProto", value: MethodDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodDescriptorProto.typeUrl, MethodDescriptorProto); function createBaseFileOptions(): FileOptions { return { javaPackage: "", @@ -5110,9 +5147,12 @@ export const FileOptions = { typeUrl: "/google.protobuf.FileOptions", value: FileOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileOptions.typeUrl, FileOptions); function createBaseMessageOptions(): MessageOptions { return { messageSetWireFormat: false, @@ -5254,9 +5294,12 @@ export const MessageOptions = { typeUrl: "/google.protobuf.MessageOptions", value: MessageOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MessageOptions.typeUrl, MessageOptions); function createBaseFieldOptions(): FieldOptions { return { ctype: 1, @@ -5495,9 +5538,14 @@ export const FieldOptions = { typeUrl: "/google.protobuf.FieldOptions", value: FieldOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions_EditionDefault.registerTypeUrl(); + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldOptions.typeUrl, FieldOptions); function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault { return { edition: 1, @@ -5577,9 +5625,9 @@ export const FieldOptions_EditionDefault = { typeUrl: "/google.protobuf.EditionDefault", value: FieldOptions_EditionDefault.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_EditionDefault.typeUrl, FieldOptions_EditionDefault); function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport { return { editionIntroduced: 1, @@ -5683,9 +5731,9 @@ export const FieldOptions_FeatureSupport = { typeUrl: "/google.protobuf.FeatureSupport", value: FieldOptions_FeatureSupport.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_FeatureSupport.typeUrl, FieldOptions_FeatureSupport); function createBaseOneofOptions(): OneofOptions { return { features: undefined, @@ -5767,9 +5815,12 @@ export const OneofOptions = { typeUrl: "/google.protobuf.OneofOptions", value: OneofOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofOptions.typeUrl, OneofOptions); function createBaseEnumOptions(): EnumOptions { return { allowAlias: false, @@ -5887,9 +5938,12 @@ export const EnumOptions = { typeUrl: "/google.protobuf.EnumOptions", value: EnumOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumOptions.typeUrl, EnumOptions); function createBaseEnumValueOptions(): EnumValueOptions { return { deprecated: false, @@ -6007,9 +6061,13 @@ export const EnumValueOptions = { typeUrl: "/google.protobuf.EnumValueOptions", value: EnumValueOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueOptions.typeUrl, EnumValueOptions); function createBaseServiceOptions(): ServiceOptions { return { features: undefined, @@ -6103,9 +6161,12 @@ export const ServiceOptions = { typeUrl: "/google.protobuf.ServiceOptions", value: ServiceOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceOptions.typeUrl, ServiceOptions); function createBaseMethodOptions(): MethodOptions { return { deprecated: false, @@ -6211,9 +6272,12 @@ export const MethodOptions = { typeUrl: "/google.protobuf.MethodOptions", value: MethodOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodOptions.typeUrl, MethodOptions); function createBaseUninterpretedOption(): UninterpretedOption { return { name: [], @@ -6355,9 +6419,11 @@ export const UninterpretedOption = { typeUrl: "/google.protobuf.UninterpretedOption", value: UninterpretedOption.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption_NamePart.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UninterpretedOption.typeUrl, UninterpretedOption); function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { return { namePart: "", @@ -6437,9 +6503,9 @@ export const UninterpretedOption_NamePart = { typeUrl: "/google.protobuf.NamePart", value: UninterpretedOption_NamePart.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UninterpretedOption_NamePart.typeUrl, UninterpretedOption_NamePart); function createBaseFeatureSet(): FeatureSet { return { fieldPresence: 1, @@ -6567,9 +6633,9 @@ export const FeatureSet = { typeUrl: "/google.protobuf.FeatureSet", value: FeatureSet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeatureSet.typeUrl, FeatureSet); function createBaseFeatureSetDefaults(): FeatureSetDefaults { return { defaults: [], @@ -6663,9 +6729,11 @@ export const FeatureSetDefaults = { typeUrl: "/google.protobuf.FeatureSetDefaults", value: FeatureSetDefaults.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSetDefaults_FeatureSetEditionDefault.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults.typeUrl, FeatureSetDefaults); function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault { return { edition: 1, @@ -6757,9 +6825,11 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = { typeUrl: "/google.protobuf.FeatureSetEditionDefault", value: FeatureSetDefaults_FeatureSetEditionDefault.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults_FeatureSetEditionDefault.typeUrl, FeatureSetDefaults_FeatureSetEditionDefault); function createBaseSourceCodeInfo(): SourceCodeInfo { return { location: [] @@ -6829,9 +6899,11 @@ export const SourceCodeInfo = { typeUrl: "/google.protobuf.SourceCodeInfo", value: SourceCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SourceCodeInfo_Location.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SourceCodeInfo.typeUrl, SourceCodeInfo); function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { return { path: [], @@ -6971,9 +7043,9 @@ export const SourceCodeInfo_Location = { typeUrl: "/google.protobuf.Location", value: SourceCodeInfo_Location.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SourceCodeInfo_Location.typeUrl, SourceCodeInfo_Location); function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { return { annotation: [] @@ -7043,9 +7115,11 @@ export const GeneratedCodeInfo = { typeUrl: "/google.protobuf.GeneratedCodeInfo", value: GeneratedCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + GeneratedCodeInfo_Annotation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GeneratedCodeInfo.typeUrl, GeneratedCodeInfo); function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { return { path: [], @@ -7172,6 +7246,6 @@ export const GeneratedCodeInfo_Annotation = { typeUrl: "/google.protobuf.Annotation", value: GeneratedCodeInfo_Annotation.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GeneratedCodeInfo_Annotation.typeUrl, GeneratedCodeInfo_Annotation); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/google/protobuf/duration.ts b/libs/interchain-react/src/google/protobuf/duration.ts index 6e3e301a..d7d60874 100644 --- a/libs/interchain-react/src/google/protobuf/duration.ts +++ b/libs/interchain-react/src/google/protobuf/duration.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Duration represents a signed, fixed-length span of time represented * as a count of seconds and fractions of seconds at nanosecond @@ -220,6 +219,6 @@ export const Duration = { typeUrl: "/google.protobuf.Duration", value: Duration.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Duration.typeUrl, Duration); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/google/protobuf/timestamp.ts b/libs/interchain-react/src/google/protobuf/timestamp.ts index d4d255b3..9e9baefe 100644 --- a/libs/interchain-react/src/google/protobuf/timestamp.ts +++ b/libs/interchain-react/src/google/protobuf/timestamp.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Timestamp represents a point in time independent of any time zone or local * calendar, encoded as a count of seconds and fractions of seconds at @@ -276,6 +275,6 @@ export const Timestamp = { typeUrl: "/google.protobuf.Timestamp", value: Timestamp.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Timestamp.typeUrl, Timestamp); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/helper-func-types.ts b/libs/interchain-react/src/helper-func-types.ts index 7c3f8421..a78ed1bc 100644 --- a/libs/interchain-react/src/helper-func-types.ts +++ b/libs/interchain-react/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -9,13 +9,16 @@ import { HttpEndpoint } from "@interchainjs/types"; import { BinaryReader, BinaryWriter } from "./binary"; import { getRpcClient } from "./extern"; import { isRpc, Rpc } from "./helpers"; +import { TelescopeGeneratedCodec } from "./types"; +import { GlobalDecoderRegistry } from "./registry"; export interface QueryBuilderOptions { encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter decode: (input: BinaryReader | Uint8Array, length?: number) => TRes service: string, method: string, - clientResolver?: RpcResolver + clientResolver?: RpcResolver, + deps?: TelescopeGeneratedCodec[], } export function buildQuery(opts: QueryBuilderOptions) { @@ -30,6 +33,8 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); + registerDependencies(opts.deps ?? []); + const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -73,6 +78,7 @@ export interface TxBuilderOptions { typeUrl: string, encoders?: Encoder[], converters?: AminoConverter[], + deps?: TelescopeGeneratedCodec[], } export function buildTx(opts: TxBuilderOptions) { @@ -94,6 +100,7 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); + registerDependencies(opts.deps ?? []); const data = [ { @@ -189,3 +196,9 @@ export interface AminoConverter { export type SigningClientResolver = string | HttpEndpoint | ISigningClient; export type RpcResolver = string | HttpEndpoint | Rpc ; + +function registerDependencies(deps: TelescopeGeneratedCodec[]) { + for (const dep of deps) { + dep.registerTypeUrl?.(); + } +} diff --git a/libs/interchain-react/src/helpers.ts b/libs/interchain-react/src/helpers.ts index 1f19575b..ab170adb 100644 --- a/libs/interchain-react/src/helpers.ts +++ b/libs/interchain-react/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/ibc/applications/transfer/v1/transfer.ts b/libs/interchain-react/src/ibc/applications/transfer/v1/transfer.ts index 12d6526c..8c1ecaaf 100644 --- a/libs/interchain-react/src/ibc/applications/transfer/v1/transfer.ts +++ b/libs/interchain-react/src/ibc/applications/transfer/v1/transfer.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Params defines the set of IBC transfer parameters. * NOTE: To prevent a single token from being transferred, set the @@ -185,10 +184,9 @@ export const Params = { typeUrl: "/ibc.applications.transfer.v1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseForwarding(): Forwarding { return { unwind: false, @@ -277,10 +275,11 @@ export const Forwarding = { typeUrl: "/ibc.applications.transfer.v1.Forwarding", value: Forwarding.encode(message).finish() }; + }, + registerTypeUrl() { + Hop.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Forwarding.typeUrl, Forwarding); -GlobalDecoderRegistry.registerAminoProtoMapping(Forwarding.aminoType, Forwarding.typeUrl); function createBaseHop(): Hop { return { portId: "", @@ -367,7 +366,6 @@ export const Hop = { typeUrl: "/ibc.applications.transfer.v1.Hop", value: Hop.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Hop.typeUrl, Hop); -GlobalDecoderRegistry.registerAminoProtoMapping(Hop.aminoType, Hop.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts b/libs/interchain-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts index 2e888d2c..cab032ea 100644 --- a/libs/interchain-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts +++ b/libs/interchain-react/src/ibc/applications/transfer/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgTransfer, MsgUpdateParams } from "./tx"; export const createTransfer = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTransfer.typeUrl, encoders: toEncoders(MsgTransfer), - converters: toConverters(MsgTransfer) + converters: toConverters(MsgTransfer), + deps: [MsgTransfer] }); export const useTransfer = buildUseMutation({ builderMutationFn: createTransfer @@ -15,7 +16,8 @@ export const createUpdateParams = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateParams = buildUseMutation({ builderMutationFn: createUpdateParams diff --git a/libs/interchain-react/src/ibc/applications/transfer/v1/tx.ts b/libs/interchain-react/src/ibc/applications/transfer/v1/tx.ts index f4fb581c..4a5d9355 100644 --- a/libs/interchain-react/src/ibc/applications/transfer/v1/tx.ts +++ b/libs/interchain-react/src/ibc/applications/transfer/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v import { Forwarding, ForwardingAmino } from "./transfer"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between * ICS20 enabled chains. See ICS Spec here: @@ -330,10 +329,13 @@ export const MsgTransfer = { typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + Height.registerTypeUrl(); + Forwarding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTransfer.typeUrl, MsgTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransfer.aminoType, MsgTransfer.typeUrl); function createBaseMsgTransferResponse(): MsgTransferResponse { return { sequence: BigInt(0) @@ -408,10 +410,9 @@ export const MsgTransferResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", value: MsgTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferResponse.typeUrl, MsgTransferResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransferResponse.aminoType, MsgTransferResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -498,10 +499,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -563,7 +565,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/channel/v1/channel.ts b/libs/interchain-react/src/ibc/core/channel/v1/channel.ts index 6965c083..aa87842c 100644 --- a/libs/interchain-react/src/ibc/core/channel/v1/channel.ts +++ b/libs/interchain-react/src/ibc/core/channel/v1/channel.ts @@ -1,7 +1,6 @@ import { Height, HeightAmino } from "../../client/v1/client"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a channel is in one of the following states: * CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED. @@ -614,10 +613,11 @@ export const Channel = { typeUrl: "/ibc.core.channel.v1.Channel", value: Channel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Channel.typeUrl, Channel); -GlobalDecoderRegistry.registerAminoProtoMapping(Channel.aminoType, Channel.typeUrl); function createBaseIdentifiedChannel(): IdentifiedChannel { return { state: 0, @@ -778,10 +778,11 @@ export const IdentifiedChannel = { typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", value: IdentifiedChannel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedChannel.typeUrl, IdentifiedChannel); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedChannel.aminoType, IdentifiedChannel.typeUrl); function createBaseCounterparty(): Counterparty { return { portId: "", @@ -868,10 +869,9 @@ export const Counterparty = { typeUrl: "/ibc.core.channel.v1.Counterparty", value: Counterparty.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBasePacket(): Packet { return { sequence: BigInt(0), @@ -1030,10 +1030,11 @@ export const Packet = { typeUrl: "/ibc.core.channel.v1.Packet", value: Packet.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Packet.typeUrl, Packet); -GlobalDecoderRegistry.registerAminoProtoMapping(Packet.aminoType, Packet.typeUrl); function createBasePacketState(): PacketState { return { portId: "", @@ -1144,10 +1145,9 @@ export const PacketState = { typeUrl: "/ibc.core.channel.v1.PacketState", value: PacketState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketState.typeUrl, PacketState); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketState.aminoType, PacketState.typeUrl); function createBasePacketId(): PacketId { return { portId: "", @@ -1246,10 +1246,9 @@ export const PacketId = { typeUrl: "/ibc.core.channel.v1.PacketId", value: PacketId.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketId.typeUrl, PacketId); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketId.aminoType, PacketId.typeUrl); function createBaseAcknowledgement(): Acknowledgement { return { result: undefined, @@ -1336,10 +1335,9 @@ export const Acknowledgement = { typeUrl: "/ibc.core.channel.v1.Acknowledgement", value: Acknowledgement.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Acknowledgement.typeUrl, Acknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(Acknowledgement.aminoType, Acknowledgement.typeUrl); function createBaseTimeout(): Timeout { return { height: Height.fromPartial({}), @@ -1426,10 +1424,11 @@ export const Timeout = { typeUrl: "/ibc.core.channel.v1.Timeout", value: Timeout.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Timeout.typeUrl, Timeout); -GlobalDecoderRegistry.registerAminoProtoMapping(Timeout.aminoType, Timeout.typeUrl); function createBaseParams(): Params { return { upgradeTimeout: Timeout.fromPartial({}) @@ -1504,7 +1503,8 @@ export const Params = { typeUrl: "/ibc.core.channel.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Timeout.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/channel/v1/tx.rpc.func.ts b/libs/interchain-react/src/ibc/core/channel/v1/tx.rpc.func.ts index a7fc06c2..a47e53ee 100644 --- a/libs/interchain-react/src/ibc/core/channel/v1/tx.rpc.func.ts +++ b/libs/interchain-react/src/ibc/core/channel/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement, MsgChannelUpgradeInit, MsgChannelUpgradeTry, MsgChannelUpgradeAck, MsgChannelUpgradeConfirm, MsgChannelUpgradeOpen, MsgChannelUpgradeTimeout, MsgChannelUpgradeCancel, MsgUpdateParams, MsgPruneAcknowledgements } from "./tx"; export const createChannelOpenInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenInit.typeUrl, encoders: toEncoders(MsgChannelOpenInit), - converters: toConverters(MsgChannelOpenInit) + converters: toConverters(MsgChannelOpenInit), + deps: [MsgChannelOpenInit] }); export const useChannelOpenInit = buildUseMutation({ builderMutationFn: createChannelOpenInit @@ -15,7 +16,8 @@ export const createChannelOpenTry = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgChannelOpenTry.typeUrl, encoders: toEncoders(MsgChannelOpenTry), - converters: toConverters(MsgChannelOpenTry) + converters: toConverters(MsgChannelOpenTry), + deps: [MsgChannelOpenTry] }); export const useChannelOpenTry = buildUseMutation({ builderMutationFn: createChannelOpenTry @@ -24,7 +26,8 @@ export const createChannelOpenAck = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgChannelOpenAck.typeUrl, encoders: toEncoders(MsgChannelOpenAck), - converters: toConverters(MsgChannelOpenAck) + converters: toConverters(MsgChannelOpenAck), + deps: [MsgChannelOpenAck] }); export const useChannelOpenAck = buildUseMutation({ builderMutationFn: createChannelOpenAck @@ -33,7 +36,8 @@ export const createChannelOpenConfirm = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelOpenConfirm.typeUrl, encoders: toEncoders(MsgChannelOpenConfirm), - converters: toConverters(MsgChannelOpenConfirm) + converters: toConverters(MsgChannelOpenConfirm), + deps: [MsgChannelOpenConfirm] }); export const useChannelOpenConfirm = buildUseMutation({ builderMutationFn: createChannelOpenConfirm @@ -42,7 +46,8 @@ export const createChannelCloseInit = (clientResolver?: SigningClientResolver) = clientResolver, typeUrl: MsgChannelCloseInit.typeUrl, encoders: toEncoders(MsgChannelCloseInit), - converters: toConverters(MsgChannelCloseInit) + converters: toConverters(MsgChannelCloseInit), + deps: [MsgChannelCloseInit] }); export const useChannelCloseInit = buildUseMutation({ builderMutationFn: createChannelCloseInit @@ -51,7 +56,8 @@ export const createChannelCloseConfirm = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgChannelCloseConfirm.typeUrl, encoders: toEncoders(MsgChannelCloseConfirm), - converters: toConverters(MsgChannelCloseConfirm) + converters: toConverters(MsgChannelCloseConfirm), + deps: [MsgChannelCloseConfirm] }); export const useChannelCloseConfirm = buildUseMutation({ builderMutationFn: createChannelCloseConfirm @@ -60,7 +66,8 @@ export const createRecvPacket = (clientResolver?: SigningClientResolver) => buil clientResolver, typeUrl: MsgRecvPacket.typeUrl, encoders: toEncoders(MsgRecvPacket), - converters: toConverters(MsgRecvPacket) + converters: toConverters(MsgRecvPacket), + deps: [MsgRecvPacket] }); export const useRecvPacket = buildUseMutation({ builderMutationFn: createRecvPacket @@ -69,7 +76,8 @@ export const createTimeout = (clientResolver?: SigningClientResolver) => buildTx clientResolver, typeUrl: MsgTimeout.typeUrl, encoders: toEncoders(MsgTimeout), - converters: toConverters(MsgTimeout) + converters: toConverters(MsgTimeout), + deps: [MsgTimeout] }); export const useTimeout = buildUseMutation({ builderMutationFn: createTimeout @@ -78,7 +86,8 @@ export const createTimeoutOnClose = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgTimeoutOnClose.typeUrl, encoders: toEncoders(MsgTimeoutOnClose), - converters: toConverters(MsgTimeoutOnClose) + converters: toConverters(MsgTimeoutOnClose), + deps: [MsgTimeoutOnClose] }); export const useTimeoutOnClose = buildUseMutation({ builderMutationFn: createTimeoutOnClose @@ -87,7 +96,8 @@ export const createAcknowledgement = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgAcknowledgement.typeUrl, encoders: toEncoders(MsgAcknowledgement), - converters: toConverters(MsgAcknowledgement) + converters: toConverters(MsgAcknowledgement), + deps: [MsgAcknowledgement] }); export const useAcknowledgement = buildUseMutation({ builderMutationFn: createAcknowledgement @@ -96,7 +106,8 @@ export const createChannelUpgradeInit = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeInit.typeUrl, encoders: toEncoders(MsgChannelUpgradeInit), - converters: toConverters(MsgChannelUpgradeInit) + converters: toConverters(MsgChannelUpgradeInit), + deps: [MsgChannelUpgradeInit] }); export const useChannelUpgradeInit = buildUseMutation({ builderMutationFn: createChannelUpgradeInit @@ -105,7 +116,8 @@ export const createChannelUpgradeTry = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeTry.typeUrl, encoders: toEncoders(MsgChannelUpgradeTry), - converters: toConverters(MsgChannelUpgradeTry) + converters: toConverters(MsgChannelUpgradeTry), + deps: [MsgChannelUpgradeTry] }); export const useChannelUpgradeTry = buildUseMutation({ builderMutationFn: createChannelUpgradeTry @@ -114,7 +126,8 @@ export const createChannelUpgradeAck = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeAck.typeUrl, encoders: toEncoders(MsgChannelUpgradeAck), - converters: toConverters(MsgChannelUpgradeAck) + converters: toConverters(MsgChannelUpgradeAck), + deps: [MsgChannelUpgradeAck] }); export const useChannelUpgradeAck = buildUseMutation({ builderMutationFn: createChannelUpgradeAck @@ -123,7 +136,8 @@ export const createChannelUpgradeConfirm = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgChannelUpgradeConfirm.typeUrl, encoders: toEncoders(MsgChannelUpgradeConfirm), - converters: toConverters(MsgChannelUpgradeConfirm) + converters: toConverters(MsgChannelUpgradeConfirm), + deps: [MsgChannelUpgradeConfirm] }); export const useChannelUpgradeConfirm = buildUseMutation({ builderMutationFn: createChannelUpgradeConfirm @@ -132,7 +146,8 @@ export const createChannelUpgradeOpen = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgChannelUpgradeOpen.typeUrl, encoders: toEncoders(MsgChannelUpgradeOpen), - converters: toConverters(MsgChannelUpgradeOpen) + converters: toConverters(MsgChannelUpgradeOpen), + deps: [MsgChannelUpgradeOpen] }); export const useChannelUpgradeOpen = buildUseMutation({ builderMutationFn: createChannelUpgradeOpen @@ -141,7 +156,8 @@ export const createChannelUpgradeTimeout = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgChannelUpgradeTimeout.typeUrl, encoders: toEncoders(MsgChannelUpgradeTimeout), - converters: toConverters(MsgChannelUpgradeTimeout) + converters: toConverters(MsgChannelUpgradeTimeout), + deps: [MsgChannelUpgradeTimeout] }); export const useChannelUpgradeTimeout = buildUseMutation({ builderMutationFn: createChannelUpgradeTimeout @@ -150,7 +166,8 @@ export const createChannelUpgradeCancel = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgChannelUpgradeCancel.typeUrl, encoders: toEncoders(MsgChannelUpgradeCancel), - converters: toConverters(MsgChannelUpgradeCancel) + converters: toConverters(MsgChannelUpgradeCancel), + deps: [MsgChannelUpgradeCancel] }); export const useChannelUpgradeCancel = buildUseMutation({ builderMutationFn: createChannelUpgradeCancel @@ -159,7 +176,8 @@ export const createUpdateChannelParams = (clientResolver?: SigningClientResolver clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateChannelParams = buildUseMutation({ builderMutationFn: createUpdateChannelParams @@ -168,7 +186,8 @@ export const createPruneAcknowledgements = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgPruneAcknowledgements.typeUrl, encoders: toEncoders(MsgPruneAcknowledgements), - converters: toConverters(MsgPruneAcknowledgements) + converters: toConverters(MsgPruneAcknowledgements), + deps: [MsgPruneAcknowledgements] }); export const usePruneAcknowledgements = buildUseMutation({ builderMutationFn: createPruneAcknowledgements diff --git a/libs/interchain-react/src/ibc/core/channel/v1/tx.ts b/libs/interchain-react/src/ibc/core/channel/v1/tx.ts index b7023355..b0ecaf62 100644 --- a/libs/interchain-react/src/ibc/core/channel/v1/tx.ts +++ b/libs/interchain-react/src/ibc/core/channel/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client import { UpgradeFields, UpgradeFieldsAmino, Upgrade, UpgradeAmino, ErrorReceipt, ErrorReceiptAmino } from "./upgrade"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** ResponseResultType defines the possible outcomes of the execution of a message */ export enum ResponseResultType { /** RESPONSE_RESULT_TYPE_UNSPECIFIED - Default zero value enumeration */ @@ -996,10 +995,11 @@ export const MsgChannelOpenInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", value: MsgChannelOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenInit.typeUrl, MsgChannelOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInit.aminoType, MsgChannelOpenInit.typeUrl); function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { return { channelId: "", @@ -1086,10 +1086,9 @@ export const MsgChannelOpenInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", value: MsgChannelOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenInitResponse.typeUrl, MsgChannelOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInitResponse.aminoType, MsgChannelOpenInitResponse.typeUrl); function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { return { portId: "", @@ -1236,10 +1235,12 @@ export const MsgChannelOpenTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", value: MsgChannelOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenTry.typeUrl, MsgChannelOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTry.aminoType, MsgChannelOpenTry.typeUrl); function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { return { version: "", @@ -1326,10 +1327,9 @@ export const MsgChannelOpenTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", value: MsgChannelOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenTryResponse.typeUrl, MsgChannelOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTryResponse.aminoType, MsgChannelOpenTryResponse.typeUrl); function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { return { portId: "", @@ -1476,10 +1476,11 @@ export const MsgChannelOpenAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", value: MsgChannelOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenAck.typeUrl, MsgChannelOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAck.aminoType, MsgChannelOpenAck.typeUrl); function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { return {}; } @@ -1541,10 +1542,9 @@ export const MsgChannelOpenAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", value: MsgChannelOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenAckResponse.typeUrl, MsgChannelOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAckResponse.aminoType, MsgChannelOpenAckResponse.typeUrl); function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { return { portId: "", @@ -1667,10 +1667,11 @@ export const MsgChannelOpenConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", value: MsgChannelOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirm.typeUrl, MsgChannelOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirm.aminoType, MsgChannelOpenConfirm.typeUrl); function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse { return {}; } @@ -1732,10 +1733,9 @@ export const MsgChannelOpenConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", value: MsgChannelOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirmResponse.typeUrl, MsgChannelOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirmResponse.aminoType, MsgChannelOpenConfirmResponse.typeUrl); function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { return { portId: "", @@ -1834,10 +1834,9 @@ export const MsgChannelCloseInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", value: MsgChannelCloseInit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInit.typeUrl, MsgChannelCloseInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInit.aminoType, MsgChannelCloseInit.typeUrl); function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { return {}; } @@ -1899,10 +1898,9 @@ export const MsgChannelCloseInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", value: MsgChannelCloseInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInitResponse.typeUrl, MsgChannelCloseInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInitResponse.aminoType, MsgChannelCloseInitResponse.typeUrl); function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { return { portId: "", @@ -2037,10 +2035,11 @@ export const MsgChannelCloseConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", value: MsgChannelCloseConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirm.typeUrl, MsgChannelCloseConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirm.aminoType, MsgChannelCloseConfirm.typeUrl); function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse { return {}; } @@ -2102,10 +2101,9 @@ export const MsgChannelCloseConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", value: MsgChannelCloseConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirmResponse.typeUrl, MsgChannelCloseConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirmResponse.aminoType, MsgChannelCloseConfirmResponse.typeUrl); function createBaseMsgRecvPacket(): MsgRecvPacket { return { packet: Packet.fromPartial({}), @@ -2216,10 +2214,12 @@ export const MsgRecvPacket = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", value: MsgRecvPacket.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRecvPacket.typeUrl, MsgRecvPacket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacket.aminoType, MsgRecvPacket.typeUrl); function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { return { result: 0 @@ -2294,10 +2294,9 @@ export const MsgRecvPacketResponse = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", value: MsgRecvPacketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecvPacketResponse.typeUrl, MsgRecvPacketResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacketResponse.aminoType, MsgRecvPacketResponse.typeUrl); function createBaseMsgTimeout(): MsgTimeout { return { packet: Packet.fromPartial({}), @@ -2420,10 +2419,12 @@ export const MsgTimeout = { typeUrl: "/ibc.core.channel.v1.MsgTimeout", value: MsgTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeout.typeUrl, MsgTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeout.aminoType, MsgTimeout.typeUrl); function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { return { result: 0 @@ -2498,10 +2499,9 @@ export const MsgTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", value: MsgTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutResponse.typeUrl, MsgTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutResponse.aminoType, MsgTimeoutResponse.typeUrl); function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { return { packet: Packet.fromPartial({}), @@ -2648,10 +2648,12 @@ export const MsgTimeoutOnClose = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", value: MsgTimeoutOnClose.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeoutOnClose.typeUrl, MsgTimeoutOnClose); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnClose.aminoType, MsgTimeoutOnClose.typeUrl); function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { return { result: 0 @@ -2726,10 +2728,9 @@ export const MsgTimeoutOnCloseResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", value: MsgTimeoutOnCloseResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutOnCloseResponse.typeUrl, MsgTimeoutOnCloseResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnCloseResponse.aminoType, MsgTimeoutOnCloseResponse.typeUrl); function createBaseMsgAcknowledgement(): MsgAcknowledgement { return { packet: Packet.fromPartial({}), @@ -2852,10 +2853,12 @@ export const MsgAcknowledgement = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", value: MsgAcknowledgement.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgAcknowledgement.typeUrl, MsgAcknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgement.aminoType, MsgAcknowledgement.typeUrl); function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { return { result: 0 @@ -2930,10 +2933,9 @@ export const MsgAcknowledgementResponse = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", value: MsgAcknowledgementResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcknowledgementResponse.typeUrl, MsgAcknowledgementResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgementResponse.aminoType, MsgAcknowledgementResponse.typeUrl); function createBaseMsgChannelUpgradeInit(): MsgChannelUpgradeInit { return { portId: "", @@ -3044,10 +3046,11 @@ export const MsgChannelUpgradeInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInit", value: MsgChannelUpgradeInit.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInit.typeUrl, MsgChannelUpgradeInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInit.aminoType, MsgChannelUpgradeInit.typeUrl); function createBaseMsgChannelUpgradeInitResponse(): MsgChannelUpgradeInitResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3134,10 +3137,11 @@ export const MsgChannelUpgradeInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse", value: MsgChannelUpgradeInitResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInitResponse.typeUrl, MsgChannelUpgradeInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInitResponse.aminoType, MsgChannelUpgradeInitResponse.typeUrl); function createBaseMsgChannelUpgradeTry(): MsgChannelUpgradeTry { return { portId: "", @@ -3310,10 +3314,12 @@ export const MsgChannelUpgradeTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTry", value: MsgChannelUpgradeTry.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTry.typeUrl, MsgChannelUpgradeTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTry.aminoType, MsgChannelUpgradeTry.typeUrl); function createBaseMsgChannelUpgradeTryResponse(): MsgChannelUpgradeTryResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3412,10 +3418,11 @@ export const MsgChannelUpgradeTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse", value: MsgChannelUpgradeTryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTryResponse.typeUrl, MsgChannelUpgradeTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTryResponse.aminoType, MsgChannelUpgradeTryResponse.typeUrl); function createBaseMsgChannelUpgradeAck(): MsgChannelUpgradeAck { return { portId: "", @@ -3562,10 +3569,12 @@ export const MsgChannelUpgradeAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAck", value: MsgChannelUpgradeAck.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAck.typeUrl, MsgChannelUpgradeAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAck.aminoType, MsgChannelUpgradeAck.typeUrl); function createBaseMsgChannelUpgradeAckResponse(): MsgChannelUpgradeAckResponse { return { result: 0 @@ -3640,10 +3649,9 @@ export const MsgChannelUpgradeAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse", value: MsgChannelUpgradeAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAckResponse.typeUrl, MsgChannelUpgradeAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAckResponse.aminoType, MsgChannelUpgradeAckResponse.typeUrl); function createBaseMsgChannelUpgradeConfirm(): MsgChannelUpgradeConfirm { return { portId: "", @@ -3802,10 +3810,12 @@ export const MsgChannelUpgradeConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirm", value: MsgChannelUpgradeConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirm.typeUrl, MsgChannelUpgradeConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirm.aminoType, MsgChannelUpgradeConfirm.typeUrl); function createBaseMsgChannelUpgradeConfirmResponse(): MsgChannelUpgradeConfirmResponse { return { result: 0 @@ -3880,10 +3890,9 @@ export const MsgChannelUpgradeConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", value: MsgChannelUpgradeConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirmResponse.typeUrl, MsgChannelUpgradeConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirmResponse.aminoType, MsgChannelUpgradeConfirmResponse.typeUrl); function createBaseMsgChannelUpgradeOpen(): MsgChannelUpgradeOpen { return { portId: "", @@ -4030,10 +4039,11 @@ export const MsgChannelUpgradeOpen = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpen", value: MsgChannelUpgradeOpen.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpen.typeUrl, MsgChannelUpgradeOpen); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpen.aminoType, MsgChannelUpgradeOpen.typeUrl); function createBaseMsgChannelUpgradeOpenResponse(): MsgChannelUpgradeOpenResponse { return {}; } @@ -4095,10 +4105,9 @@ export const MsgChannelUpgradeOpenResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", value: MsgChannelUpgradeOpenResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpenResponse.typeUrl, MsgChannelUpgradeOpenResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpenResponse.aminoType, MsgChannelUpgradeOpenResponse.typeUrl); function createBaseMsgChannelUpgradeTimeout(): MsgChannelUpgradeTimeout { return { portId: "", @@ -4233,10 +4242,12 @@ export const MsgChannelUpgradeTimeout = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeout", value: MsgChannelUpgradeTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeout.typeUrl, MsgChannelUpgradeTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeout.aminoType, MsgChannelUpgradeTimeout.typeUrl); function createBaseMsgChannelUpgradeTimeoutResponse(): MsgChannelUpgradeTimeoutResponse { return {}; } @@ -4298,10 +4309,9 @@ export const MsgChannelUpgradeTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", value: MsgChannelUpgradeTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeoutResponse.typeUrl, MsgChannelUpgradeTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeoutResponse.aminoType, MsgChannelUpgradeTimeoutResponse.typeUrl); function createBaseMsgChannelUpgradeCancel(): MsgChannelUpgradeCancel { return { portId: "", @@ -4436,10 +4446,12 @@ export const MsgChannelUpgradeCancel = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancel", value: MsgChannelUpgradeCancel.encode(message).finish() }; + }, + registerTypeUrl() { + ErrorReceipt.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancel.typeUrl, MsgChannelUpgradeCancel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancel.aminoType, MsgChannelUpgradeCancel.typeUrl); function createBaseMsgChannelUpgradeCancelResponse(): MsgChannelUpgradeCancelResponse { return {}; } @@ -4501,10 +4513,9 @@ export const MsgChannelUpgradeCancelResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", value: MsgChannelUpgradeCancelResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancelResponse.typeUrl, MsgChannelUpgradeCancelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancelResponse.aminoType, MsgChannelUpgradeCancelResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -4591,10 +4602,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -4656,10 +4668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgPruneAcknowledgements(): MsgPruneAcknowledgements { return { portId: "", @@ -4770,10 +4781,9 @@ export const MsgPruneAcknowledgements = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgements", value: MsgPruneAcknowledgements.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAcknowledgements.typeUrl, MsgPruneAcknowledgements); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgements.aminoType, MsgPruneAcknowledgements.typeUrl); function createBaseMsgPruneAcknowledgementsResponse(): MsgPruneAcknowledgementsResponse { return { totalPrunedSequences: BigInt(0), @@ -4860,7 +4870,6 @@ export const MsgPruneAcknowledgementsResponse = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", value: MsgPruneAcknowledgementsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAcknowledgementsResponse.typeUrl, MsgPruneAcknowledgementsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgementsResponse.aminoType, MsgPruneAcknowledgementsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/channel/v1/upgrade.ts b/libs/interchain-react/src/ibc/core/channel/v1/upgrade.ts index 8ce98e36..4b7a4477 100644 --- a/libs/interchain-react/src/ibc/core/channel/v1/upgrade.ts +++ b/libs/interchain-react/src/ibc/core/channel/v1/upgrade.ts @@ -1,7 +1,6 @@ import { Timeout, TimeoutAmino, Order } from "./channel"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Upgrade is a verifiable type which contains the relevant information * for an attempted upgrade. It provides the proposed changes to the channel @@ -188,10 +187,12 @@ export const Upgrade = { typeUrl: "/ibc.core.channel.v1.Upgrade", value: Upgrade.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Timeout.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Upgrade.typeUrl, Upgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(Upgrade.aminoType, Upgrade.typeUrl); function createBaseUpgradeFields(): UpgradeFields { return { ordering: 0, @@ -292,10 +293,9 @@ export const UpgradeFields = { typeUrl: "/ibc.core.channel.v1.UpgradeFields", value: UpgradeFields.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UpgradeFields.typeUrl, UpgradeFields); -GlobalDecoderRegistry.registerAminoProtoMapping(UpgradeFields.aminoType, UpgradeFields.typeUrl); function createBaseErrorReceipt(): ErrorReceipt { return { sequence: BigInt(0), @@ -382,7 +382,6 @@ export const ErrorReceipt = { typeUrl: "/ibc.core.channel.v1.ErrorReceipt", value: ErrorReceipt.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ErrorReceipt.typeUrl, ErrorReceipt); -GlobalDecoderRegistry.registerAminoProtoMapping(ErrorReceipt.aminoType, ErrorReceipt.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/client/v1/client.ts b/libs/interchain-react/src/ibc/core/client/v1/client.ts index f6c36539..326bb611 100644 --- a/libs/interchain-react/src/ibc/core/client/v1/client.ts +++ b/libs/interchain-react/src/ibc/core/client/v1/client.ts @@ -1,7 +1,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * IdentifiedClientState defines a client state with an additional client * identifier field. @@ -248,10 +247,9 @@ export const IdentifiedClientState = { typeUrl: "/ibc.core.client.v1.IdentifiedClientState", value: IdentifiedClientState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IdentifiedClientState.typeUrl, IdentifiedClientState); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedClientState.aminoType, IdentifiedClientState.typeUrl); function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { return { height: Height.fromPartial({}), @@ -338,10 +336,9 @@ export const ConsensusStateWithHeight = { typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", value: ConsensusStateWithHeight.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConsensusStateWithHeight.typeUrl, ConsensusStateWithHeight); -GlobalDecoderRegistry.registerAminoProtoMapping(ConsensusStateWithHeight.aminoType, ConsensusStateWithHeight.typeUrl); function createBaseClientConsensusStates(): ClientConsensusStates { return { clientId: "", @@ -430,10 +427,11 @@ export const ClientConsensusStates = { typeUrl: "/ibc.core.client.v1.ClientConsensusStates", value: ClientConsensusStates.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusStateWithHeight.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ClientConsensusStates.typeUrl, ClientConsensusStates); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientConsensusStates.aminoType, ClientConsensusStates.typeUrl); function createBaseHeight(): Height { return { revisionNumber: BigInt(0), @@ -516,10 +514,9 @@ export const Height = { typeUrl: "/ibc.core.client.v1.Height", value: Height.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Height.typeUrl, Height); -GlobalDecoderRegistry.registerAminoProtoMapping(Height.aminoType, Height.typeUrl); function createBaseParams(): Params { return { allowedClients: [] @@ -596,7 +593,6 @@ export const Params = { typeUrl: "/ibc.core.client.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/client/v1/tx.rpc.func.ts b/libs/interchain-react/src/ibc/core/client/v1/tx.rpc.func.ts index cf8b181c..7a754add 100644 --- a/libs/interchain-react/src/ibc/core/client/v1/tx.rpc.func.ts +++ b/libs/interchain-react/src/ibc/core/client/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour, MsgRecoverClient, MsgIBCSoftwareUpgrade, MsgUpdateParams } from "./tx"; export const createCreateClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateClient.typeUrl, encoders: toEncoders(MsgCreateClient), - converters: toConverters(MsgCreateClient) + converters: toConverters(MsgCreateClient), + deps: [MsgCreateClient] }); export const useCreateClient = buildUseMutation({ builderMutationFn: createCreateClient @@ -15,7 +16,8 @@ export const createUpdateClient = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgUpdateClient.typeUrl, encoders: toEncoders(MsgUpdateClient), - converters: toConverters(MsgUpdateClient) + converters: toConverters(MsgUpdateClient), + deps: [MsgUpdateClient] }); export const useUpdateClient = buildUseMutation({ builderMutationFn: createUpdateClient @@ -24,7 +26,8 @@ export const createUpgradeClient = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgUpgradeClient.typeUrl, encoders: toEncoders(MsgUpgradeClient), - converters: toConverters(MsgUpgradeClient) + converters: toConverters(MsgUpgradeClient), + deps: [MsgUpgradeClient] }); export const useUpgradeClient = buildUseMutation({ builderMutationFn: createUpgradeClient @@ -33,7 +36,8 @@ export const createSubmitMisbehaviour = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgSubmitMisbehaviour.typeUrl, encoders: toEncoders(MsgSubmitMisbehaviour), - converters: toConverters(MsgSubmitMisbehaviour) + converters: toConverters(MsgSubmitMisbehaviour), + deps: [MsgSubmitMisbehaviour] }); export const useSubmitMisbehaviour = buildUseMutation({ builderMutationFn: createSubmitMisbehaviour @@ -42,7 +46,8 @@ export const createRecoverClient = (clientResolver?: SigningClientResolver) => b clientResolver, typeUrl: MsgRecoverClient.typeUrl, encoders: toEncoders(MsgRecoverClient), - converters: toConverters(MsgRecoverClient) + converters: toConverters(MsgRecoverClient), + deps: [MsgRecoverClient] }); export const useRecoverClient = buildUseMutation({ builderMutationFn: createRecoverClient @@ -51,7 +56,8 @@ export const createIBCSoftwareUpgrade = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgIBCSoftwareUpgrade.typeUrl, encoders: toEncoders(MsgIBCSoftwareUpgrade), - converters: toConverters(MsgIBCSoftwareUpgrade) + converters: toConverters(MsgIBCSoftwareUpgrade), + deps: [MsgIBCSoftwareUpgrade] }); export const useIBCSoftwareUpgrade = buildUseMutation({ builderMutationFn: createIBCSoftwareUpgrade @@ -60,7 +66,8 @@ export const createUpdateClientParams = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateClientParams = buildUseMutation({ builderMutationFn: createUpdateClientParams diff --git a/libs/interchain-react/src/ibc/core/client/v1/tx.ts b/libs/interchain-react/src/ibc/core/client/v1/tx.ts index c0281aac..99b3dca1 100644 --- a/libs/interchain-react/src/ibc/core/client/v1/tx.ts +++ b/libs/interchain-react/src/ibc/core/client/v1/tx.ts @@ -3,7 +3,6 @@ import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import { Params, ParamsAmino } from "./client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** MsgCreateClient defines a message to create an IBC client */ export interface MsgCreateClient { /** light client state */ @@ -450,10 +449,9 @@ export const MsgCreateClient = { typeUrl: "/ibc.core.client.v1.MsgCreateClient", value: MsgCreateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClient.typeUrl, MsgCreateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClient.aminoType, MsgCreateClient.typeUrl); function createBaseMsgCreateClientResponse(): MsgCreateClientResponse { return { clientId: "" @@ -528,10 +526,9 @@ export const MsgCreateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", value: MsgCreateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClientResponse.typeUrl, MsgCreateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClientResponse.aminoType, MsgCreateClientResponse.typeUrl); function createBaseMsgUpdateClient(): MsgUpdateClient { return { clientId: "", @@ -630,10 +627,9 @@ export const MsgUpdateClient = { typeUrl: "/ibc.core.client.v1.MsgUpdateClient", value: MsgUpdateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClient.typeUrl, MsgUpdateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClient.aminoType, MsgUpdateClient.typeUrl); function createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse { return {}; } @@ -695,10 +691,9 @@ export const MsgUpdateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", value: MsgUpdateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClientResponse.typeUrl, MsgUpdateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClientResponse.aminoType, MsgUpdateClientResponse.typeUrl); function createBaseMsgUpgradeClient(): MsgUpgradeClient { return { clientId: "", @@ -833,10 +828,9 @@ export const MsgUpgradeClient = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", value: MsgUpgradeClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClient.typeUrl, MsgUpgradeClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClient.aminoType, MsgUpgradeClient.typeUrl); function createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse { return {}; } @@ -898,10 +892,9 @@ export const MsgUpgradeClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", value: MsgUpgradeClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClientResponse.typeUrl, MsgUpgradeClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClientResponse.aminoType, MsgUpgradeClientResponse.typeUrl); function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { return { clientId: "", @@ -1000,10 +993,9 @@ export const MsgSubmitMisbehaviour = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", value: MsgSubmitMisbehaviour.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviour.typeUrl, MsgSubmitMisbehaviour); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviour.aminoType, MsgSubmitMisbehaviour.typeUrl); function createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourResponse { return {}; } @@ -1065,10 +1057,9 @@ export const MsgSubmitMisbehaviourResponse = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", value: MsgSubmitMisbehaviourResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviourResponse.typeUrl, MsgSubmitMisbehaviourResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviourResponse.aminoType, MsgSubmitMisbehaviourResponse.typeUrl); function createBaseMsgRecoverClient(): MsgRecoverClient { return { subjectClientId: "", @@ -1167,10 +1158,9 @@ export const MsgRecoverClient = { typeUrl: "/ibc.core.client.v1.MsgRecoverClient", value: MsgRecoverClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClient.typeUrl, MsgRecoverClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClient.aminoType, MsgRecoverClient.typeUrl); function createBaseMsgRecoverClientResponse(): MsgRecoverClientResponse { return {}; } @@ -1232,10 +1222,9 @@ export const MsgRecoverClientResponse = { typeUrl: "/ibc.core.client.v1.MsgRecoverClientResponse", value: MsgRecoverClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClientResponse.typeUrl, MsgRecoverClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClientResponse.aminoType, MsgRecoverClientResponse.typeUrl); function createBaseMsgIBCSoftwareUpgrade(): MsgIBCSoftwareUpgrade { return { plan: Plan.fromPartial({}), @@ -1334,10 +1323,9 @@ export const MsgIBCSoftwareUpgrade = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgrade", value: MsgIBCSoftwareUpgrade.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgrade.typeUrl, MsgIBCSoftwareUpgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgrade.aminoType, MsgIBCSoftwareUpgrade.typeUrl); function createBaseMsgIBCSoftwareUpgradeResponse(): MsgIBCSoftwareUpgradeResponse { return {}; } @@ -1399,10 +1387,9 @@ export const MsgIBCSoftwareUpgradeResponse = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse", value: MsgIBCSoftwareUpgradeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgradeResponse.typeUrl, MsgIBCSoftwareUpgradeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgradeResponse.aminoType, MsgIBCSoftwareUpgradeResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1489,10 +1476,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.client.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1554,7 +1542,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/commitment/v1/commitment.ts b/libs/interchain-react/src/ibc/core/commitment/v1/commitment.ts index 051efcdf..b66229f3 100644 --- a/libs/interchain-react/src/ibc/core/commitment/v1/commitment.ts +++ b/libs/interchain-react/src/ibc/core/commitment/v1/commitment.ts @@ -1,7 +1,6 @@ import { CommitmentProof, CommitmentProofAmino } from "../../../../cosmos/ics23/v1/proofs"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MerkleRoot defines a merkle root hash. * In the Cosmos SDK, the AppHash of a block header becomes the root. @@ -150,10 +149,9 @@ export const MerkleRoot = { typeUrl: "/ibc.core.commitment.v1.MerkleRoot", value: MerkleRoot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerkleRoot.typeUrl, MerkleRoot); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleRoot.aminoType, MerkleRoot.typeUrl); function createBaseMerklePrefix(): MerklePrefix { return { keyPrefix: new Uint8Array() @@ -228,10 +226,9 @@ export const MerklePrefix = { typeUrl: "/ibc.core.commitment.v1.MerklePrefix", value: MerklePrefix.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerklePrefix.typeUrl, MerklePrefix); -GlobalDecoderRegistry.registerAminoProtoMapping(MerklePrefix.aminoType, MerklePrefix.typeUrl); function createBaseMerkleProof(): MerkleProof { return { proofs: [] @@ -308,7 +305,8 @@ export const MerkleProof = { typeUrl: "/ibc.core.commitment.v1.MerkleProof", value: MerkleProof.encode(message).finish() }; + }, + registerTypeUrl() { + CommitmentProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(MerkleProof.typeUrl, MerkleProof); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleProof.aminoType, MerkleProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/connection/v1/connection.ts b/libs/interchain-react/src/ibc/core/connection/v1/connection.ts index 1791709d..ed473558 100644 --- a/libs/interchain-react/src/ibc/core/connection/v1/connection.ts +++ b/libs/interchain-react/src/ibc/core/connection/v1/connection.ts @@ -1,7 +1,6 @@ import { MerklePrefix, MerklePrefixAmino } from "../../commitment/v1/commitment"; import { isSet, DeepPartial } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a connection is in one of the following states: * INIT, TRYOPEN, OPEN or UNINITIALIZED. @@ -420,10 +419,12 @@ export const ConnectionEnd = { typeUrl: "/ibc.core.connection.v1.ConnectionEnd", value: ConnectionEnd.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConnectionEnd.typeUrl, ConnectionEnd); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionEnd.aminoType, ConnectionEnd.typeUrl); function createBaseIdentifiedConnection(): IdentifiedConnection { return { id: "", @@ -560,10 +561,12 @@ export const IdentifiedConnection = { typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", value: IdentifiedConnection.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedConnection.typeUrl, IdentifiedConnection); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedConnection.aminoType, IdentifiedConnection.typeUrl); function createBaseCounterparty(): Counterparty { return { clientId: "", @@ -662,10 +665,11 @@ export const Counterparty = { typeUrl: "/ibc.core.connection.v1.Counterparty", value: Counterparty.encode(message).finish() }; + }, + registerTypeUrl() { + MerklePrefix.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBaseClientPaths(): ClientPaths { return { paths: [] @@ -742,10 +746,9 @@ export const ClientPaths = { typeUrl: "/ibc.core.connection.v1.ClientPaths", value: ClientPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ClientPaths.typeUrl, ClientPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientPaths.aminoType, ClientPaths.typeUrl); function createBaseConnectionPaths(): ConnectionPaths { return { clientId: "", @@ -834,10 +837,9 @@ export const ConnectionPaths = { typeUrl: "/ibc.core.connection.v1.ConnectionPaths", value: ConnectionPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConnectionPaths.typeUrl, ConnectionPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionPaths.aminoType, ConnectionPaths.typeUrl); function createBaseVersion(): Version { return { identifier: "", @@ -926,10 +928,9 @@ export const Version = { typeUrl: "/ibc.core.connection.v1.Version", value: Version.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Version.typeUrl, Version); -GlobalDecoderRegistry.registerAminoProtoMapping(Version.aminoType, Version.typeUrl); function createBaseParams(): Params { return { maxExpectedTimePerBlock: BigInt(0) @@ -1004,7 +1005,6 @@ export const Params = { typeUrl: "/ibc.core.connection.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/ibc/core/connection/v1/tx.rpc.func.ts b/libs/interchain-react/src/ibc/core/connection/v1/tx.rpc.func.ts index 2c81e862..7d58334e 100644 --- a/libs/interchain-react/src/ibc/core/connection/v1/tx.rpc.func.ts +++ b/libs/interchain-react/src/ibc/core/connection/v1/tx.rpc.func.ts @@ -1,12 +1,13 @@ import { buildTx, SigningClientResolver } from "../../../../helper-func-types"; -import { buildUseMutation } from "../../../../react-query"; import { toEncoders, toConverters } from "@interchainjs/cosmos/utils"; +import { buildUseMutation } from "../../../../react-query"; import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm, MsgUpdateParams } from "./tx"; export const createConnectionOpenInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenInit.typeUrl, encoders: toEncoders(MsgConnectionOpenInit), - converters: toConverters(MsgConnectionOpenInit) + converters: toConverters(MsgConnectionOpenInit), + deps: [MsgConnectionOpenInit] }); export const useConnectionOpenInit = buildUseMutation({ builderMutationFn: createConnectionOpenInit @@ -15,7 +16,8 @@ export const createConnectionOpenTry = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgConnectionOpenTry.typeUrl, encoders: toEncoders(MsgConnectionOpenTry), - converters: toConverters(MsgConnectionOpenTry) + converters: toConverters(MsgConnectionOpenTry), + deps: [MsgConnectionOpenTry] }); export const useConnectionOpenTry = buildUseMutation({ builderMutationFn: createConnectionOpenTry @@ -24,7 +26,8 @@ export const createConnectionOpenAck = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgConnectionOpenAck.typeUrl, encoders: toEncoders(MsgConnectionOpenAck), - converters: toConverters(MsgConnectionOpenAck) + converters: toConverters(MsgConnectionOpenAck), + deps: [MsgConnectionOpenAck] }); export const useConnectionOpenAck = buildUseMutation({ builderMutationFn: createConnectionOpenAck @@ -33,7 +36,8 @@ export const createConnectionOpenConfirm = (clientResolver?: SigningClientResolv clientResolver, typeUrl: MsgConnectionOpenConfirm.typeUrl, encoders: toEncoders(MsgConnectionOpenConfirm), - converters: toConverters(MsgConnectionOpenConfirm) + converters: toConverters(MsgConnectionOpenConfirm), + deps: [MsgConnectionOpenConfirm] }); export const useConnectionOpenConfirm = buildUseMutation({ builderMutationFn: createConnectionOpenConfirm @@ -42,7 +46,8 @@ export const createUpdateConnectionParams = (clientResolver?: SigningClientResol clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const useUpdateConnectionParams = buildUseMutation({ builderMutationFn: createUpdateConnectionParams diff --git a/libs/interchain-react/src/ibc/core/connection/v1/tx.ts b/libs/interchain-react/src/ibc/core/connection/v1/tx.ts index fd194d48..82afa89d 100644 --- a/libs/interchain-react/src/ibc/core/connection/v1/tx.ts +++ b/libs/interchain-react/src/ibc/core/connection/v1/tx.ts @@ -3,7 +3,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to * initialize a connection with Chain B. @@ -436,10 +435,12 @@ export const MsgConnectionOpenInit = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", value: MsgConnectionOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenInit.typeUrl, MsgConnectionOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInit.aminoType, MsgConnectionOpenInit.typeUrl); function createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitResponse { return {}; } @@ -501,10 +502,9 @@ export const MsgConnectionOpenInitResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", value: MsgConnectionOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenInitResponse.typeUrl, MsgConnectionOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInitResponse.aminoType, MsgConnectionOpenInitResponse.typeUrl); function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { return { clientId: "", @@ -725,10 +725,13 @@ export const MsgConnectionOpenTry = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", value: MsgConnectionOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenTry.typeUrl, MsgConnectionOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTry.aminoType, MsgConnectionOpenTry.typeUrl); function createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse { return {}; } @@ -790,10 +793,9 @@ export const MsgConnectionOpenTryResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", value: MsgConnectionOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenTryResponse.typeUrl, MsgConnectionOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTryResponse.aminoType, MsgConnectionOpenTryResponse.typeUrl); function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { return { connectionId: "", @@ -988,10 +990,11 @@ export const MsgConnectionOpenAck = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", value: MsgConnectionOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenAck.typeUrl, MsgConnectionOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAck.aminoType, MsgConnectionOpenAck.typeUrl); function createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse { return {}; } @@ -1053,10 +1056,9 @@ export const MsgConnectionOpenAckResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", value: MsgConnectionOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenAckResponse.typeUrl, MsgConnectionOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAckResponse.aminoType, MsgConnectionOpenAckResponse.typeUrl); function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { return { connectionId: "", @@ -1167,10 +1169,11 @@ export const MsgConnectionOpenConfirm = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", value: MsgConnectionOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirm.typeUrl, MsgConnectionOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirm.aminoType, MsgConnectionOpenConfirm.typeUrl); function createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmResponse { return {}; } @@ -1232,10 +1235,9 @@ export const MsgConnectionOpenConfirmResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", value: MsgConnectionOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirmResponse.typeUrl, MsgConnectionOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirmResponse.aminoType, MsgConnectionOpenConfirmResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1322,10 +1324,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1387,7 +1390,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/injective/types/v1beta1/account.ts b/libs/interchain-react/src/injective/types/v1beta1/account.ts index 08000833..a16b528f 100644 --- a/libs/interchain-react/src/injective/types/v1beta1/account.ts +++ b/libs/interchain-react/src/injective/types/v1beta1/account.ts @@ -1,7 +1,7 @@ import { BaseAccount, BaseAccountAmino } from "../../../cosmos/auth/v1beta1/auth"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * EthAccount implements the authtypes.AccountI interface and embeds an * authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. @@ -105,6 +105,9 @@ export const EthAccount = { typeUrl: "/injective.types.v1beta1.EthAccount", value: EthAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/react-query.ts b/libs/interchain-react/src/react-query.ts index 3c9ccabd..8b7f8844 100644 --- a/libs/interchain-react/src/react-query.ts +++ b/libs/interchain-react/src/react-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/registry.ts b/libs/interchain-react/src/registry.ts index dee026ae..e7f6497f 100644 --- a/libs/interchain-react/src/registry.ts +++ b/libs/interchain-react/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/tendermint/abci/types.ts b/libs/interchain-react/src/tendermint/abci/types.ts index 4759afd1..812f015a 100644 --- a/libs/interchain-react/src/tendermint/abci/types.ts +++ b/libs/interchain-react/src/tendermint/abci/types.ts @@ -5,7 +5,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BlockIDFlag } from "../types/validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export enum CheckTxType { NEW = 0, RECHECK = 1, @@ -1617,9 +1616,26 @@ export const Request = { typeUrl: "/tendermint.abci.Request", value: Request.encode(message).finish() }; + }, + registerTypeUrl() { + RequestEcho.registerTypeUrl(); + RequestFlush.registerTypeUrl(); + RequestInfo.registerTypeUrl(); + RequestInitChain.registerTypeUrl(); + RequestQuery.registerTypeUrl(); + RequestCheckTx.registerTypeUrl(); + RequestCommit.registerTypeUrl(); + RequestListSnapshots.registerTypeUrl(); + RequestOfferSnapshot.registerTypeUrl(); + RequestLoadSnapshotChunk.registerTypeUrl(); + RequestApplySnapshotChunk.registerTypeUrl(); + RequestPrepareProposal.registerTypeUrl(); + RequestProcessProposal.registerTypeUrl(); + RequestExtendVote.registerTypeUrl(); + RequestVerifyVoteExtension.registerTypeUrl(); + RequestFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Request.typeUrl, Request); function createBaseRequestEcho(): RequestEcho { return { message: "" @@ -1687,9 +1703,9 @@ export const RequestEcho = { typeUrl: "/tendermint.abci.RequestEcho", value: RequestEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestEcho.typeUrl, RequestEcho); function createBaseRequestFlush(): RequestFlush { return {}; } @@ -1744,9 +1760,9 @@ export const RequestFlush = { typeUrl: "/tendermint.abci.RequestFlush", value: RequestFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestFlush.typeUrl, RequestFlush); function createBaseRequestInfo(): RequestInfo { return { version: "", @@ -1850,9 +1866,9 @@ export const RequestInfo = { typeUrl: "/tendermint.abci.RequestInfo", value: RequestInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestInfo.typeUrl, RequestInfo); function createBaseRequestInitChain(): RequestInitChain { return { time: new Date(), @@ -1982,9 +1998,12 @@ export const RequestInitChain = { typeUrl: "/tendermint.abci.RequestInitChain", value: RequestInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestInitChain.typeUrl, RequestInitChain); function createBaseRequestQuery(): RequestQuery { return { data: new Uint8Array(), @@ -2088,9 +2107,9 @@ export const RequestQuery = { typeUrl: "/tendermint.abci.RequestQuery", value: RequestQuery.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestQuery.typeUrl, RequestQuery); function createBaseRequestCheckTx(): RequestCheckTx { return { tx: new Uint8Array(), @@ -2170,9 +2189,9 @@ export const RequestCheckTx = { typeUrl: "/tendermint.abci.RequestCheckTx", value: RequestCheckTx.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCheckTx.typeUrl, RequestCheckTx); function createBaseRequestCommit(): RequestCommit { return {}; } @@ -2227,9 +2246,9 @@ export const RequestCommit = { typeUrl: "/tendermint.abci.RequestCommit", value: RequestCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCommit.typeUrl, RequestCommit); function createBaseRequestListSnapshots(): RequestListSnapshots { return {}; } @@ -2284,9 +2303,9 @@ export const RequestListSnapshots = { typeUrl: "/tendermint.abci.RequestListSnapshots", value: RequestListSnapshots.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestListSnapshots.typeUrl, RequestListSnapshots); function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { return { snapshot: undefined, @@ -2366,9 +2385,11 @@ export const RequestOfferSnapshot = { typeUrl: "/tendermint.abci.RequestOfferSnapshot", value: RequestOfferSnapshot.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestOfferSnapshot.typeUrl, RequestOfferSnapshot); function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { return { height: BigInt(0), @@ -2460,9 +2481,9 @@ export const RequestLoadSnapshotChunk = { typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", value: RequestLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestLoadSnapshotChunk.typeUrl, RequestLoadSnapshotChunk); function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { return { index: 0, @@ -2554,9 +2575,9 @@ export const RequestApplySnapshotChunk = { typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", value: RequestApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestApplySnapshotChunk.typeUrl, RequestApplySnapshotChunk); function createBaseRequestPrepareProposal(): RequestPrepareProposal { return { maxTxBytes: BigInt(0), @@ -2712,9 +2733,12 @@ export const RequestPrepareProposal = { typeUrl: "/tendermint.abci.RequestPrepareProposal", value: RequestPrepareProposal.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedCommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestPrepareProposal.typeUrl, RequestPrepareProposal); function createBaseRequestProcessProposal(): RequestProcessProposal { return { txs: [], @@ -2870,9 +2894,12 @@ export const RequestProcessProposal = { typeUrl: "/tendermint.abci.RequestProcessProposal", value: RequestProcessProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestProcessProposal.typeUrl, RequestProcessProposal); function createBaseRequestExtendVote(): RequestExtendVote { return { hash: new Uint8Array(), @@ -3028,9 +3055,12 @@ export const RequestExtendVote = { typeUrl: "/tendermint.abci.RequestExtendVote", value: RequestExtendVote.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestExtendVote.typeUrl, RequestExtendVote); function createBaseRequestVerifyVoteExtension(): RequestVerifyVoteExtension { return { hash: new Uint8Array(), @@ -3134,9 +3164,9 @@ export const RequestVerifyVoteExtension = { typeUrl: "/tendermint.abci.RequestVerifyVoteExtension", value: RequestVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestVerifyVoteExtension.typeUrl, RequestVerifyVoteExtension); function createBaseRequestFinalizeBlock(): RequestFinalizeBlock { return { txs: [], @@ -3292,9 +3322,12 @@ export const RequestFinalizeBlock = { typeUrl: "/tendermint.abci.RequestFinalizeBlock", value: RequestFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestFinalizeBlock.typeUrl, RequestFinalizeBlock); function createBaseResponse(): Response { return { exception: undefined, @@ -3554,9 +3587,27 @@ export const Response = { typeUrl: "/tendermint.abci.Response", value: Response.encode(message).finish() }; + }, + registerTypeUrl() { + ResponseException.registerTypeUrl(); + ResponseEcho.registerTypeUrl(); + ResponseFlush.registerTypeUrl(); + ResponseInfo.registerTypeUrl(); + ResponseInitChain.registerTypeUrl(); + ResponseQuery.registerTypeUrl(); + ResponseCheckTx.registerTypeUrl(); + ResponseCommit.registerTypeUrl(); + ResponseListSnapshots.registerTypeUrl(); + ResponseOfferSnapshot.registerTypeUrl(); + ResponseLoadSnapshotChunk.registerTypeUrl(); + ResponseApplySnapshotChunk.registerTypeUrl(); + ResponsePrepareProposal.registerTypeUrl(); + ResponseProcessProposal.registerTypeUrl(); + ResponseExtendVote.registerTypeUrl(); + ResponseVerifyVoteExtension.registerTypeUrl(); + ResponseFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Response.typeUrl, Response); function createBaseResponseException(): ResponseException { return { error: "" @@ -3624,9 +3675,9 @@ export const ResponseException = { typeUrl: "/tendermint.abci.ResponseException", value: ResponseException.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseException.typeUrl, ResponseException); function createBaseResponseEcho(): ResponseEcho { return { message: "" @@ -3694,9 +3745,9 @@ export const ResponseEcho = { typeUrl: "/tendermint.abci.ResponseEcho", value: ResponseEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseEcho.typeUrl, ResponseEcho); function createBaseResponseFlush(): ResponseFlush { return {}; } @@ -3751,9 +3802,9 @@ export const ResponseFlush = { typeUrl: "/tendermint.abci.ResponseFlush", value: ResponseFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseFlush.typeUrl, ResponseFlush); function createBaseResponseInfo(): ResponseInfo { return { data: "", @@ -3869,9 +3920,9 @@ export const ResponseInfo = { typeUrl: "/tendermint.abci.ResponseInfo", value: ResponseInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseInfo.typeUrl, ResponseInfo); function createBaseResponseInitChain(): ResponseInitChain { return { consensusParams: undefined, @@ -3965,9 +4016,12 @@ export const ResponseInitChain = { typeUrl: "/tendermint.abci.ResponseInitChain", value: ResponseInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseInitChain.typeUrl, ResponseInitChain); function createBaseResponseQuery(): ResponseQuery { return { code: 0, @@ -4131,9 +4185,11 @@ export const ResponseQuery = { typeUrl: "/tendermint.abci.ResponseQuery", value: ResponseQuery.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOps.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseQuery.typeUrl, ResponseQuery); function createBaseResponseCheckTx(): ResponseCheckTx { return { code: 0, @@ -4287,9 +4343,11 @@ export const ResponseCheckTx = { typeUrl: "/tendermint.abci.ResponseCheckTx", value: ResponseCheckTx.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseCheckTx.typeUrl, ResponseCheckTx); function createBaseResponseCommit(): ResponseCommit { return { retainHeight: BigInt(0) @@ -4357,9 +4415,9 @@ export const ResponseCommit = { typeUrl: "/tendermint.abci.ResponseCommit", value: ResponseCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseCommit.typeUrl, ResponseCommit); function createBaseResponseListSnapshots(): ResponseListSnapshots { return { snapshots: [] @@ -4429,9 +4487,11 @@ export const ResponseListSnapshots = { typeUrl: "/tendermint.abci.ResponseListSnapshots", value: ResponseListSnapshots.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseListSnapshots.typeUrl, ResponseListSnapshots); function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { return { result: 0 @@ -4499,9 +4559,9 @@ export const ResponseOfferSnapshot = { typeUrl: "/tendermint.abci.ResponseOfferSnapshot", value: ResponseOfferSnapshot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseOfferSnapshot.typeUrl, ResponseOfferSnapshot); function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { return { chunk: new Uint8Array() @@ -4569,9 +4629,9 @@ export const ResponseLoadSnapshotChunk = { typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", value: ResponseLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseLoadSnapshotChunk.typeUrl, ResponseLoadSnapshotChunk); function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { return { result: 0, @@ -4676,9 +4736,9 @@ export const ResponseApplySnapshotChunk = { typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", value: ResponseApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseApplySnapshotChunk.typeUrl, ResponseApplySnapshotChunk); function createBaseResponsePrepareProposal(): ResponsePrepareProposal { return { txs: [] @@ -4748,9 +4808,9 @@ export const ResponsePrepareProposal = { typeUrl: "/tendermint.abci.ResponsePrepareProposal", value: ResponsePrepareProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponsePrepareProposal.typeUrl, ResponsePrepareProposal); function createBaseResponseProcessProposal(): ResponseProcessProposal { return { status: 0 @@ -4818,9 +4878,9 @@ export const ResponseProcessProposal = { typeUrl: "/tendermint.abci.ResponseProcessProposal", value: ResponseProcessProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseProcessProposal.typeUrl, ResponseProcessProposal); function createBaseResponseExtendVote(): ResponseExtendVote { return { voteExtension: new Uint8Array() @@ -4888,9 +4948,9 @@ export const ResponseExtendVote = { typeUrl: "/tendermint.abci.ResponseExtendVote", value: ResponseExtendVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseExtendVote.typeUrl, ResponseExtendVote); function createBaseResponseVerifyVoteExtension(): ResponseVerifyVoteExtension { return { status: 0 @@ -4958,9 +5018,9 @@ export const ResponseVerifyVoteExtension = { typeUrl: "/tendermint.abci.ResponseVerifyVoteExtension", value: ResponseVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseVerifyVoteExtension.typeUrl, ResponseVerifyVoteExtension); function createBaseResponseFinalizeBlock(): ResponseFinalizeBlock { return { events: [], @@ -5082,9 +5142,14 @@ export const ResponseFinalizeBlock = { typeUrl: "/tendermint.abci.ResponseFinalizeBlock", value: ResponseFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); + ExecTxResult.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); + ConsensusParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseFinalizeBlock.typeUrl, ResponseFinalizeBlock); function createBaseCommitInfo(): CommitInfo { return { round: 0, @@ -5166,9 +5231,11 @@ export const CommitInfo = { typeUrl: "/tendermint.abci.CommitInfo", value: CommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + VoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitInfo.typeUrl, CommitInfo); function createBaseExtendedCommitInfo(): ExtendedCommitInfo { return { round: 0, @@ -5250,9 +5317,11 @@ export const ExtendedCommitInfo = { typeUrl: "/tendermint.abci.ExtendedCommitInfo", value: ExtendedCommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedVoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommitInfo.typeUrl, ExtendedCommitInfo); function createBaseEvent(): Event { return { type: "", @@ -5334,9 +5403,11 @@ export const Event = { typeUrl: "/tendermint.abci.Event", value: Event.encode(message).finish() }; + }, + registerTypeUrl() { + EventAttribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Event.typeUrl, Event); function createBaseEventAttribute(): EventAttribute { return { key: "", @@ -5428,9 +5499,9 @@ export const EventAttribute = { typeUrl: "/tendermint.abci.EventAttribute", value: EventAttribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttribute.typeUrl, EventAttribute); function createBaseExecTxResult(): ExecTxResult { return { code: 0, @@ -5584,9 +5655,11 @@ export const ExecTxResult = { typeUrl: "/tendermint.abci.ExecTxResult", value: ExecTxResult.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExecTxResult.typeUrl, ExecTxResult); function createBaseTxResult(): TxResult { return { height: BigInt(0), @@ -5690,9 +5763,11 @@ export const TxResult = { typeUrl: "/tendermint.abci.TxResult", value: TxResult.encode(message).finish() }; + }, + registerTypeUrl() { + ExecTxResult.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResult.typeUrl, TxResult); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -5772,9 +5847,9 @@ export const Validator = { typeUrl: "/tendermint.abci.Validator", value: Validator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseValidatorUpdate(): ValidatorUpdate { return { pubKey: PublicKey.fromPartial({}), @@ -5854,9 +5929,11 @@ export const ValidatorUpdate = { typeUrl: "/tendermint.abci.ValidatorUpdate", value: ValidatorUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorUpdate.typeUrl, ValidatorUpdate); function createBaseVoteInfo(): VoteInfo { return { validator: Validator.fromPartial({}), @@ -5936,9 +6013,11 @@ export const VoteInfo = { typeUrl: "/tendermint.abci.VoteInfo", value: VoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(VoteInfo.typeUrl, VoteInfo); function createBaseExtendedVoteInfo(): ExtendedVoteInfo { return { validator: Validator.fromPartial({}), @@ -6042,9 +6121,11 @@ export const ExtendedVoteInfo = { typeUrl: "/tendermint.abci.ExtendedVoteInfo", value: ExtendedVoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedVoteInfo.typeUrl, ExtendedVoteInfo); function createBaseMisbehavior(): Misbehavior { return { type: 0, @@ -6160,9 +6241,11 @@ export const Misbehavior = { typeUrl: "/tendermint.abci.Misbehavior", value: Misbehavior.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Misbehavior.typeUrl, Misbehavior); function createBaseSnapshot(): Snapshot { return { height: BigInt(0), @@ -6278,6 +6361,6 @@ export const Snapshot = { typeUrl: "/tendermint.abci.Snapshot", value: Snapshot.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Snapshot.typeUrl, Snapshot); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/crypto/keys.ts b/libs/interchain-react/src/tendermint/crypto/keys.ts index 9dc8476b..c58639e4 100644 --- a/libs/interchain-react/src/tendermint/crypto/keys.ts +++ b/libs/interchain-react/src/tendermint/crypto/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** PublicKey defines the keys available for use with Validators */ export interface PublicKey { ed25519?: Uint8Array; @@ -98,6 +97,6 @@ export const PublicKey = { typeUrl: "/tendermint.crypto.PublicKey", value: PublicKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PublicKey.typeUrl, PublicKey); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/crypto/proof.ts b/libs/interchain-react/src/tendermint/crypto/proof.ts index 5f372fcf..b3eea7ae 100644 --- a/libs/interchain-react/src/tendermint/crypto/proof.ts +++ b/libs/interchain-react/src/tendermint/crypto/proof.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Proof { total: bigint; index: bigint; @@ -208,9 +207,9 @@ export const Proof = { typeUrl: "/tendermint.crypto.Proof", value: Proof.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proof.typeUrl, Proof); function createBaseValueOp(): ValueOp { return { key: new Uint8Array(), @@ -290,9 +289,11 @@ export const ValueOp = { typeUrl: "/tendermint.crypto.ValueOp", value: ValueOp.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValueOp.typeUrl, ValueOp); function createBaseDominoOp(): DominoOp { return { key: "", @@ -384,9 +385,9 @@ export const DominoOp = { typeUrl: "/tendermint.crypto.DominoOp", value: DominoOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DominoOp.typeUrl, DominoOp); function createBaseProofOp(): ProofOp { return { type: "", @@ -478,9 +479,9 @@ export const ProofOp = { typeUrl: "/tendermint.crypto.ProofOp", value: ProofOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProofOp.typeUrl, ProofOp); function createBaseProofOps(): ProofOps { return { ops: [] @@ -550,6 +551,8 @@ export const ProofOps = { typeUrl: "/tendermint.crypto.ProofOps", value: ProofOps.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOp.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ProofOps.typeUrl, ProofOps); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/types/block.ts b/libs/interchain-react/src/tendermint/types/block.ts index 16763b51..20ae4856 100644 --- a/libs/interchain-react/src/tendermint/types/block.ts +++ b/libs/interchain-react/src/tendermint/types/block.ts @@ -2,7 +2,6 @@ import { Header, HeaderAmino, Data, DataAmino, Commit, CommitAmino } from "./typ import { EvidenceList, EvidenceListAmino } from "./evidence"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Block { header: Header; data: Data; @@ -126,6 +125,11 @@ export const Block = { typeUrl: "/tendermint.types.Block", value: Block.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Data.registerTypeUrl(); + EvidenceList.registerTypeUrl(); + Commit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Block.typeUrl, Block); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/types/evidence.ts b/libs/interchain-react/src/tendermint/types/evidence.ts index 696b6c8a..bf7dd661 100644 --- a/libs/interchain-react/src/tendermint/types/evidence.ts +++ b/libs/interchain-react/src/tendermint/types/evidence.ts @@ -3,7 +3,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator, ValidatorAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; lightClientAttackEvidence?: LightClientAttackEvidence; @@ -161,9 +160,12 @@ export const Evidence = { typeUrl: "/tendermint.types.Evidence", value: Evidence.encode(message).finish() }; + }, + registerTypeUrl() { + DuplicateVoteEvidence.registerTypeUrl(); + LightClientAttackEvidence.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Evidence.typeUrl, Evidence); function createBaseDuplicateVoteEvidence(): DuplicateVoteEvidence { return { voteA: undefined, @@ -279,9 +281,11 @@ export const DuplicateVoteEvidence = { typeUrl: "/tendermint.types.DuplicateVoteEvidence", value: DuplicateVoteEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DuplicateVoteEvidence.typeUrl, DuplicateVoteEvidence); function createBaseLightClientAttackEvidence(): LightClientAttackEvidence { return { conflictingBlock: undefined, @@ -399,9 +403,12 @@ export const LightClientAttackEvidence = { typeUrl: "/tendermint.types.LightClientAttackEvidence", value: LightClientAttackEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + LightBlock.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightClientAttackEvidence.typeUrl, LightClientAttackEvidence); function createBaseEvidenceList(): EvidenceList { return { evidence: [] @@ -471,6 +478,8 @@ export const EvidenceList = { typeUrl: "/tendermint.types.EvidenceList", value: EvidenceList.encode(message).finish() }; + }, + registerTypeUrl() { + Evidence.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EvidenceList.typeUrl, EvidenceList); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/types/params.ts b/libs/interchain-react/src/tendermint/types/params.ts index 0b15190e..8f9291e4 100644 --- a/libs/interchain-react/src/tendermint/types/params.ts +++ b/libs/interchain-react/src/tendermint/types/params.ts @@ -1,7 +1,6 @@ import { Duration, DurationAmino } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. @@ -339,9 +338,15 @@ export const ConsensusParams = { typeUrl: "/tendermint.types.ConsensusParams", value: ConsensusParams.encode(message).finish() }; + }, + registerTypeUrl() { + BlockParams.registerTypeUrl(); + EvidenceParams.registerTypeUrl(); + ValidatorParams.registerTypeUrl(); + VersionParams.registerTypeUrl(); + ABCIParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConsensusParams.typeUrl, ConsensusParams); function createBaseBlockParams(): BlockParams { return { maxBytes: BigInt(0), @@ -421,9 +426,9 @@ export const BlockParams = { typeUrl: "/tendermint.types.BlockParams", value: BlockParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BlockParams.typeUrl, BlockParams); function createBaseEvidenceParams(): EvidenceParams { return { maxAgeNumBlocks: BigInt(0), @@ -515,9 +520,9 @@ export const EvidenceParams = { typeUrl: "/tendermint.types.EvidenceParams", value: EvidenceParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EvidenceParams.typeUrl, EvidenceParams); function createBaseValidatorParams(): ValidatorParams { return { pubKeyTypes: [] @@ -587,9 +592,9 @@ export const ValidatorParams = { typeUrl: "/tendermint.types.ValidatorParams", value: ValidatorParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorParams.typeUrl, ValidatorParams); function createBaseVersionParams(): VersionParams { return { app: BigInt(0) @@ -657,9 +662,9 @@ export const VersionParams = { typeUrl: "/tendermint.types.VersionParams", value: VersionParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VersionParams.typeUrl, VersionParams); function createBaseHashedParams(): HashedParams { return { blockMaxBytes: BigInt(0), @@ -739,9 +744,9 @@ export const HashedParams = { typeUrl: "/tendermint.types.HashedParams", value: HashedParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(HashedParams.typeUrl, HashedParams); function createBaseABCIParams(): ABCIParams { return { voteExtensionsEnableHeight: BigInt(0) @@ -809,6 +814,6 @@ export const ABCIParams = { typeUrl: "/tendermint.types.ABCIParams", value: ABCIParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ABCIParams.typeUrl, ABCIParams); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/types/types.ts b/libs/interchain-react/src/tendermint/types/types.ts index c44fd8af..2762a429 100644 --- a/libs/interchain-react/src/tendermint/types/types.ts +++ b/libs/interchain-react/src/tendermint/types/types.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { BlockIDFlag, ValidatorSet, ValidatorSetAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, toTimestamp, fromTimestamp, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** SignedMsgType is a type of signed message in the consensus. */ export enum SignedMsgType { SIGNED_MSG_TYPE_UNKNOWN = 0, @@ -542,9 +541,9 @@ export const PartSetHeader = { typeUrl: "/tendermint.types.PartSetHeader", value: PartSetHeader.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PartSetHeader.typeUrl, PartSetHeader); function createBasePart(): Part { return { index: 0, @@ -636,9 +635,11 @@ export const Part = { typeUrl: "/tendermint.types.Part", value: Part.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Part.typeUrl, Part); function createBaseBlockID(): BlockID { return { hash: new Uint8Array(), @@ -718,9 +719,11 @@ export const BlockID = { typeUrl: "/tendermint.types.BlockID", value: BlockID.encode(message).finish() }; + }, + registerTypeUrl() { + PartSetHeader.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockID.typeUrl, BlockID); function createBaseHeader(): Header { return { version: Consensus.fromPartial({}), @@ -944,9 +947,12 @@ export const Header = { typeUrl: "/tendermint.types.Header", value: Header.encode(message).finish() }; + }, + registerTypeUrl() { + Consensus.registerTypeUrl(); + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Header.typeUrl, Header); function createBaseData(): Data { return { txs: [] @@ -1016,9 +1022,9 @@ export const Data = { typeUrl: "/tendermint.types.Data", value: Data.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Data.typeUrl, Data); function createBaseVote(): Vote { return { type: 0, @@ -1194,9 +1200,11 @@ export const Vote = { typeUrl: "/tendermint.types.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); function createBaseCommit(): Commit { return { height: BigInt(0), @@ -1302,9 +1310,12 @@ export const Commit = { typeUrl: "/tendermint.types.Commit", value: Commit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + CommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commit.typeUrl, Commit); function createBaseCommitSig(): CommitSig { return { blockIdFlag: 0, @@ -1408,9 +1419,9 @@ export const CommitSig = { typeUrl: "/tendermint.types.CommitSig", value: CommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommitSig.typeUrl, CommitSig); function createBaseExtendedCommit(): ExtendedCommit { return { height: BigInt(0), @@ -1516,9 +1527,12 @@ export const ExtendedCommit = { typeUrl: "/tendermint.types.ExtendedCommit", value: ExtendedCommit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + ExtendedCommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommit.typeUrl, ExtendedCommit); function createBaseExtendedCommitSig(): ExtendedCommitSig { return { blockIdFlag: 0, @@ -1646,9 +1660,9 @@ export const ExtendedCommitSig = { typeUrl: "/tendermint.types.ExtendedCommitSig", value: ExtendedCommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtendedCommitSig.typeUrl, ExtendedCommitSig); function createBaseProposal(): Proposal { return { type: 0, @@ -1788,9 +1802,11 @@ export const Proposal = { typeUrl: "/tendermint.types.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); function createBaseSignedHeader(): SignedHeader { return { header: undefined, @@ -1870,9 +1886,12 @@ export const SignedHeader = { typeUrl: "/tendermint.types.SignedHeader", value: SignedHeader.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Commit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignedHeader.typeUrl, SignedHeader); function createBaseLightBlock(): LightBlock { return { signedHeader: undefined, @@ -1952,9 +1971,12 @@ export const LightBlock = { typeUrl: "/tendermint.types.LightBlock", value: LightBlock.encode(message).finish() }; + }, + registerTypeUrl() { + SignedHeader.registerTypeUrl(); + ValidatorSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightBlock.typeUrl, LightBlock); function createBaseBlockMeta(): BlockMeta { return { blockId: BlockID.fromPartial({}), @@ -2058,9 +2080,12 @@ export const BlockMeta = { typeUrl: "/tendermint.types.BlockMeta", value: BlockMeta.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + Header.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockMeta.typeUrl, BlockMeta); function createBaseTxProof(): TxProof { return { rootHash: new Uint8Array(), @@ -2152,6 +2177,8 @@ export const TxProof = { typeUrl: "/tendermint.types.TxProof", value: TxProof.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(TxProof.typeUrl, TxProof); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/types/validator.ts b/libs/interchain-react/src/tendermint/types/validator.ts index 0c652786..8a52ff10 100644 --- a/libs/interchain-react/src/tendermint/types/validator.ts +++ b/libs/interchain-react/src/tendermint/types/validator.ts @@ -1,7 +1,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** BlockIdFlag indicates which BlockID the signature is for */ export enum BlockIDFlag { /** BLOCK_ID_FLAG_UNKNOWN - indicates an error condition */ @@ -196,9 +195,11 @@ export const ValidatorSet = { typeUrl: "/tendermint.types.ValidatorSet", value: ValidatorSet.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSet.typeUrl, ValidatorSet); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -302,9 +303,11 @@ export const Validator = { typeUrl: "/tendermint.types.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseSimpleValidator(): SimpleValidator { return { pubKey: undefined, @@ -384,6 +387,8 @@ export const SimpleValidator = { typeUrl: "/tendermint.types.SimpleValidator", value: SimpleValidator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SimpleValidator.typeUrl, SimpleValidator); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchain-react/src/tendermint/version/types.ts b/libs/interchain-react/src/tendermint/version/types.ts index 824f3644..36154b74 100644 --- a/libs/interchain-react/src/tendermint/version/types.ts +++ b/libs/interchain-react/src/tendermint/version/types.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * App includes the protocol and software version for the application. * This information is included in ResponseInfo. The App.Protocol can be @@ -132,9 +131,9 @@ export const App = { typeUrl: "/tendermint.version.App", value: App.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(App.typeUrl, App); function createBaseConsensus(): Consensus { return { block: BigInt(0), @@ -214,6 +213,6 @@ export const Consensus = { typeUrl: "/tendermint.version.Consensus", value: Consensus.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Consensus.typeUrl, Consensus); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchain-react/src/types.ts b/libs/interchain-react/src/types.ts index 6983e34a..e44c8a75 100644 --- a/libs/interchain-react/src/types.ts +++ b/libs/interchain-react/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -48,6 +48,7 @@ export interface TelescopeGeneratedCodec< toProto?: (message: T) => Uint8Array; fromProtoMsg?: (message: ProtoMsg) => T; toProtoMsg?: (message: T) => Any; + registerTypeUrl?: () => void; } export type TelescopeGeneratedType< diff --git a/libs/interchain-react/src/utf8.ts b/libs/interchain-react/src/utf8.ts index 56735515..5fef278b 100644 --- a/libs/interchain-react/src/utf8.ts +++ b/libs/interchain-react/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/varint.ts b/libs/interchain-react/src/varint.ts index e06f5977..cab33130 100644 --- a/libs/interchain-react/src/varint.ts +++ b/libs/interchain-react/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/binary.ts b/libs/interchain-vue/src/binary.ts index 7325addd..f9a515e4 100644 --- a/libs/interchain-vue/src/binary.ts +++ b/libs/interchain-vue/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/cosmos/auth/v1beta1/auth.ts b/libs/interchain-vue/src/cosmos/auth/v1beta1/auth.ts index 1511165c..236320b9 100644 --- a/libs/interchain-vue/src/cosmos/auth/v1beta1/auth.ts +++ b/libs/interchain-vue/src/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * BaseAccount defines a base account type. It contains all the necessary fields diff --git a/libs/interchain-vue/src/cosmos/auth/v1beta1/query.ts b/libs/interchain-vue/src/cosmos/auth/v1beta1/query.ts index d4cd8225..50544a50 100644 --- a/libs/interchain-vue/src/cosmos/auth/v1beta1/query.ts +++ b/libs/interchain-vue/src/cosmos/auth/v1beta1/query.ts @@ -3,8 +3,8 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth"; import { EthAccount, EthAccountProtoMsg } from "../../../injective/types/v1beta1/account"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. diff --git a/libs/interchain-vue/src/cosmos/authz/v1beta1/authz.ts b/libs/interchain-vue/src/cosmos/authz/v1beta1/authz.ts index 3373cb76..61f00561 100644 --- a/libs/interchain-vue/src/cosmos/authz/v1beta1/authz.ts +++ b/libs/interchain-vue/src/cosmos/authz/v1beta1/authz.ts @@ -1,5 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; +import { SendAuthorization, SendAuthorizationProtoMsg } from "../../bank/v1beta1/authz"; +import { StakeAuthorization, StakeAuthorizationProtoMsg } from "../../staking/v1beta1/authz"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; @@ -36,7 +38,7 @@ export interface GenericAuthorizationAminoMsg { * the provide method with expiration time. */ export interface Grant { - authorization?: GenericAuthorization | Any | undefined; + authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | 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` @@ -45,7 +47,7 @@ export interface Grant { expiration?: Date; } export interface ReactiveGrant { - authorization?: ComputedRef; + authorization?: ComputedRef; expiration?: ComputedRef; } export interface GrantProtoMsg { @@ -53,7 +55,7 @@ export interface GrantProtoMsg { value: Uint8Array; } export type GrantEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * Grant gives permissions to execute @@ -79,13 +81,13 @@ export interface GrantAminoMsg { export interface GrantAuthorization { granter: string; grantee: string; - authorization?: GenericAuthorization | Any | undefined; + authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | Any | undefined; expiration?: Date; } export interface ReactiveGrantAuthorization { granter: ComputedRef; grantee: ComputedRef; - authorization?: ComputedRef; + authorization?: ComputedRef; expiration?: ComputedRef; } export interface GrantAuthorizationProtoMsg { @@ -93,7 +95,7 @@ export interface GrantAuthorizationProtoMsg { value: Uint8Array; } export type GrantAuthorizationEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * GrantAuthorization extends a grant with both the addresses of the grantee and granter. diff --git a/libs/interchain-vue/src/cosmos/authz/v1beta1/query.rpc.Query.ts b/libs/interchain-vue/src/cosmos/authz/v1beta1/query.rpc.Query.ts new file mode 100644 index 00000000..b9ad60a2 --- /dev/null +++ b/libs/interchain-vue/src/cosmos/authz/v1beta1/query.rpc.Query.ts @@ -0,0 +1,182 @@ +import { TxRpc } from "../../../types"; +import { BinaryReader } from "../../../binary"; +import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; +import { VueQueryParams } from "../../../vue-query"; +import { ComputedRef, computed, Ref } from "vue"; +import { useQuery } from "@tanstack/vue-query"; +import { QueryGrantsRequest, QueryGrantsResponse, QueryGranterGrantsRequest, QueryGranterGrantsResponse, QueryGranteeGrantsRequest, QueryGranteeGrantsResponse, ReactiveQueryGrantsRequest, ReactiveQueryGranterGrantsRequest, ReactiveQueryGranteeGrantsRequest } 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: TxRpc; + constructor(rpc: TxRpc) { + 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); + } + }; +}; +export interface UseGrantsQuery extends VueQueryParams { + request: ReactiveQueryGrantsRequest; +} +export interface UseGranterGrantsQuery extends VueQueryParams { + request: ReactiveQueryGranterGrantsRequest; +} +export interface UseGranteeGrantsQuery extends VueQueryParams { + request: ReactiveQueryGranteeGrantsRequest; +} +export const useQueryService = (rpc: Ref): ComputedRef => { + const _queryClients = new WeakMap(); + return computed(() => { + if (rpc.value) { + if (_queryClients.has(rpc.value)) { + return _queryClients.get(rpc.value); + } + const queryService = new QueryClientImpl(rpc.value); + _queryClients.set(rpc.value, queryService); + return queryService; + } + }); +}; +export const createRpcQueryHooks = (rpc: Ref) => { + const queryService = useQueryService(rpc); + const useGrants = ({ + request, + options + }: UseGrantsQuery) => { + const queryKey = ["grantsQuery", queryService]; + if (request) { + Object.values(request).forEach((val: any) => { + queryKey.push(val); + }); + } + return useQuery({ + queryKey, + queryFn: () => { + if (!queryService.value) throw new Error("Query Service not initialized"); + let params = ({} as any); + if (request) { + Object.entries(request).forEach(([key, val]) => { + params[key] = val.value; + }); + } + return queryService.value.grants(params); + }, + ...options + }); + }; + const useGranterGrants = ({ + request, + options + }: UseGranterGrantsQuery) => { + const queryKey = ["granterGrantsQuery", queryService]; + if (request) { + Object.values(request).forEach((val: any) => { + queryKey.push(val); + }); + } + return useQuery({ + queryKey, + queryFn: () => { + if (!queryService.value) throw new Error("Query Service not initialized"); + let params = ({} as any); + if (request) { + Object.entries(request).forEach(([key, val]) => { + params[key] = val.value; + }); + } + return queryService.value.granterGrants(params); + }, + ...options + }); + }; + const useGranteeGrants = ({ + request, + options + }: UseGranteeGrantsQuery) => { + const queryKey = ["granteeGrantsQuery", queryService]; + if (request) { + Object.values(request).forEach((val: any) => { + queryKey.push(val); + }); + } + return useQuery({ + queryKey, + queryFn: () => { + if (!queryService.value) throw new Error("Query Service not initialized"); + let params = ({} as any); + if (request) { + Object.entries(request).forEach(([key, val]) => { + params[key] = val.value; + }); + } + return queryService.value.granteeGrants(params); + }, + ...options + }); + }; + return { + /** Returns list of `Authorization`, granted to the grantee by the granter. */useGrants, + /** + * GranterGrants returns list of `GrantAuthorization`, granted by granter. + * + * Since: cosmos-sdk 0.46 + */ + useGranterGrants, + /** + * GranteeGrants returns a list of `GrantAuthorization` by grantee. + * + * Since: cosmos-sdk 0.46 + */ + useGranteeGrants + }; +}; \ No newline at end of file diff --git a/libs/interchain-vue/src/cosmos/authz/v1beta1/query.ts b/libs/interchain-vue/src/cosmos/authz/v1beta1/query.ts new file mode 100644 index 00000000..9fb959e5 --- /dev/null +++ b/libs/interchain-vue/src/cosmos/authz/v1beta1/query.ts @@ -0,0 +1,734 @@ +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; +import { Grant, GrantAmino, GrantAuthorization, GrantAuthorizationAmino } from "./authz"; +import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; +import { ComputedRef } from "vue"; +/** 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 ReactiveQueryGrantsRequest { + granter: ComputedRef; + grantee: ComputedRef; + msgTypeUrl: ComputedRef; + pagination?: ComputedRef; +} +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; +} +/** 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 ReactiveQueryGrantsResponse { + grants: ComputedRef; + pagination?: ComputedRef; +} +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; +} +/** 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 ReactiveQueryGranterGrantsRequest { + granter: ComputedRef; + pagination?: ComputedRef; +} +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; +} +/** 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 ReactiveQueryGranterGrantsResponse { + grants: ComputedRef; + pagination?: ComputedRef; +} +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; +} +/** QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. */ +export interface QueryGranteeGrantsRequest { + grantee: string; + /** pagination defines an pagination for the request. */ + pagination?: PageRequest; +} +export interface ReactiveQueryGranteeGrantsRequest { + grantee: ComputedRef; + pagination?: ComputedRef; +} +export interface QueryGranteeGrantsRequestProtoMsg { + typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest"; + value: Uint8Array; +} +/** QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants 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; +} +/** 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 ReactiveQueryGranteeGrantsResponse { + grants: ComputedRef; + pagination?: ComputedRef; +} +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; +} +function createBaseQueryGrantsRequest(): QueryGrantsRequest { + return { + granter: "", + grantee: "", + msgTypeUrl: "", + pagination: undefined + }; +} +export const QueryGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest", + aminoType: "cosmos-sdk/QueryGrantsRequest", + is(o: any): o is QueryGrantsRequest { + return o && (o.$typeUrl === QueryGrantsRequest.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msgTypeUrl === "string"); + }, + isAmino(o: any): o is QueryGrantsRequestAmino { + return o && (o.$typeUrl === QueryGrantsRequest.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msg_type_url === "string"); + }, + 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() + }; + } +}; +GlobalDecoderRegistry.register(QueryGrantsRequest.typeUrl, QueryGrantsRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(QueryGrantsRequest.aminoType, QueryGrantsRequest.typeUrl); +function createBaseQueryGrantsResponse(): QueryGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse", + aminoType: "cosmos-sdk/QueryGrantsResponse", + is(o: any): o is QueryGrantsResponse { + return o && (o.$typeUrl === QueryGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || Grant.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGrantsResponseAmino { + return o && (o.$typeUrl === QueryGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || Grant.isAmino(o.grants[0]))); + }, + 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() + }; + } +}; +GlobalDecoderRegistry.register(QueryGrantsResponse.typeUrl, QueryGrantsResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(QueryGrantsResponse.aminoType, QueryGrantsResponse.typeUrl); +function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest { + return { + granter: "", + pagination: undefined + }; +} +export const QueryGranterGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest", + aminoType: "cosmos-sdk/QueryGranterGrantsRequest", + is(o: any): o is QueryGranterGrantsRequest { + return o && (o.$typeUrl === QueryGranterGrantsRequest.typeUrl || typeof o.granter === "string"); + }, + isAmino(o: any): o is QueryGranterGrantsRequestAmino { + return o && (o.$typeUrl === QueryGranterGrantsRequest.typeUrl || typeof o.granter === "string"); + }, + 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() + }; + } +}; +GlobalDecoderRegistry.register(QueryGranterGrantsRequest.typeUrl, QueryGranterGrantsRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(QueryGranterGrantsRequest.aminoType, QueryGranterGrantsRequest.typeUrl); +function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGranterGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse", + aminoType: "cosmos-sdk/QueryGranterGrantsResponse", + is(o: any): o is QueryGranterGrantsResponse { + return o && (o.$typeUrl === QueryGranterGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGranterGrantsResponseAmino { + return o && (o.$typeUrl === QueryGranterGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.isAmino(o.grants[0]))); + }, + 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() + }; + } +}; +GlobalDecoderRegistry.register(QueryGranterGrantsResponse.typeUrl, QueryGranterGrantsResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(QueryGranterGrantsResponse.aminoType, QueryGranterGrantsResponse.typeUrl); +function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest { + return { + grantee: "", + pagination: undefined + }; +} +export const QueryGranteeGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest", + aminoType: "cosmos-sdk/QueryGranteeGrantsRequest", + is(o: any): o is QueryGranteeGrantsRequest { + return o && (o.$typeUrl === QueryGranteeGrantsRequest.typeUrl || typeof o.grantee === "string"); + }, + isAmino(o: any): o is QueryGranteeGrantsRequestAmino { + return o && (o.$typeUrl === QueryGranteeGrantsRequest.typeUrl || typeof o.grantee === "string"); + }, + 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() + }; + } +}; +GlobalDecoderRegistry.register(QueryGranteeGrantsRequest.typeUrl, QueryGranteeGrantsRequest); +GlobalDecoderRegistry.registerAminoProtoMapping(QueryGranteeGrantsRequest.aminoType, QueryGranteeGrantsRequest.typeUrl); +function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGranteeGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse", + aminoType: "cosmos-sdk/QueryGranteeGrantsResponse", + is(o: any): o is QueryGranteeGrantsResponse { + return o && (o.$typeUrl === QueryGranteeGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGranteeGrantsResponseAmino { + return o && (o.$typeUrl === QueryGranteeGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.isAmino(o.grants[0]))); + }, + 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() + }; + } +}; +GlobalDecoderRegistry.register(QueryGranteeGrantsResponse.typeUrl, QueryGranteeGrantsResponse); +GlobalDecoderRegistry.registerAminoProtoMapping(QueryGranteeGrantsResponse.aminoType, QueryGranteeGrantsResponse.typeUrl); \ No newline at end of file diff --git a/libs/interchain-vue/src/cosmos/authz/v1beta1/tx.ts b/libs/interchain-vue/src/cosmos/authz/v1beta1/tx.ts index 58031666..375f7350 100644 --- a/libs/interchain-vue/src/cosmos/authz/v1beta1/tx.ts +++ b/libs/interchain-vue/src/cosmos/authz/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Grant, GrantAmino } from "./authz"; import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * MsgGrant is a request type for Grant method. It declares authorization to the grantee diff --git a/libs/interchain-vue/src/cosmos/bank/v1beta1/authz.ts b/libs/interchain-vue/src/cosmos/bank/v1beta1/authz.ts new file mode 100644 index 00000000..94877082 --- /dev/null +++ b/libs/interchain-vue/src/cosmos/bank/v1beta1/authz.ts @@ -0,0 +1,143 @@ +import { Coin, CoinAmino } from "../../base/v1beta1/coin"; +import { BinaryReader, BinaryWriter } from "../../../binary"; +import { DeepPartial } from "../../../helpers"; +import { GlobalDecoderRegistry } from "../../../registry"; +import { ComputedRef } from "vue"; +/** + * SendAuthorization allows the grantee to spend up to spend_limit coins from + * the granter's account. + * + * Since: cosmos-sdk 0.43 + */ +export interface 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 ReactiveSendAuthorization { + spendLimit: ComputedRef; + allowList: ComputedRef; +} +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; +} +function createBaseSendAuthorization(): SendAuthorization { + return { + spendLimit: [], + allowList: [] + }; +} +export const SendAuthorization = { + typeUrl: "/cosmos.bank.v1beta1.SendAuthorization", + aminoType: "cosmos-sdk/SendAuthorization", + is(o: any): o is SendAuthorization { + return o && (o.$typeUrl === SendAuthorization.typeUrl || Array.isArray(o.spendLimit) && (!o.spendLimit.length || Coin.is(o.spendLimit[0])) && Array.isArray(o.allowList) && (!o.allowList.length || typeof o.allowList[0] === "string")); + }, + isAmino(o: any): o is SendAuthorizationAmino { + return o && (o.$typeUrl === SendAuthorization.typeUrl || Array.isArray(o.spend_limit) && (!o.spend_limit.length || Coin.isAmino(o.spend_limit[0])) && Array.isArray(o.allow_list) && (!o.allow_list.length || typeof o.allow_list[0] === "string")); + }, + 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() + }; + } +}; +GlobalDecoderRegistry.register(SendAuthorization.typeUrl, SendAuthorization); +GlobalDecoderRegistry.registerAminoProtoMapping(SendAuthorization.aminoType, SendAuthorization.typeUrl); \ No newline at end of file diff --git a/libs/interchain-vue/src/cosmos/base/abci/v1beta1/abci.ts b/libs/interchain-vue/src/cosmos/base/abci/v1beta1/abci.ts index 6678eb87..4477c71f 100644 --- a/libs/interchain-vue/src/cosmos/base/abci/v1beta1/abci.ts +++ b/libs/interchain-vue/src/cosmos/base/abci/v1beta1/abci.ts @@ -2,8 +2,8 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Event, EventAmino } from "../../../../tendermint/abci/types"; import { Block, BlockAmino } from "../../../../tendermint/types/block"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * TxResponse defines a structure containing relevant tx data and metadata. The diff --git a/libs/interchain-vue/src/cosmos/feegrant/v1beta1/tx.ts b/libs/interchain-vue/src/cosmos/feegrant/v1beta1/tx.ts index b4af7499..249479d9 100644 --- a/libs/interchain-vue/src/cosmos/feegrant/v1beta1/tx.ts +++ b/libs/interchain-vue/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance diff --git a/libs/interchain-vue/src/cosmos/gov/v1beta1/tx.ts b/libs/interchain-vue/src/cosmos/gov/v1beta1/tx.ts index e4d130d6..c0ae1bdd 100644 --- a/libs/interchain-vue/src/cosmos/gov/v1beta1/tx.ts +++ b/libs/interchain-vue/src/cosmos/gov/v1beta1/tx.ts @@ -4,8 +4,8 @@ import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, TextProposal, import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution"; import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary diff --git a/libs/interchain-vue/src/cosmos/ics23/v1/proofs.ts b/libs/interchain-vue/src/cosmos/ics23/v1/proofs.ts index 48f0412a..bdefd7f7 100644 --- a/libs/interchain-vue/src/cosmos/ics23/v1/proofs.ts +++ b/libs/interchain-vue/src/cosmos/ics23/v1/proofs.ts @@ -1,6 +1,6 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; export enum HashOp { /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ diff --git a/libs/interchain-vue/src/cosmos/rpc.query.ts b/libs/interchain-vue/src/cosmos/rpc.query.ts index a650d80e..3c4578e6 100644 --- a/libs/interchain-vue/src/cosmos/rpc.query.ts +++ b/libs/interchain-vue/src/cosmos/rpc.query.ts @@ -12,6 +12,9 @@ export const createRPCQueryClient = async ({ auth: { v1beta1: (await import("./auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) }, + authz: { + v1beta1: (await import("./authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) + }, bank: { v1beta1: (await import("./bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) }, diff --git a/libs/interchain-vue/src/cosmos/staking/v1beta1/authz.ts b/libs/interchain-vue/src/cosmos/staking/v1beta1/authz.ts new file mode 100644 index 00000000..70fed0c5 --- /dev/null +++ b/libs/interchain-vue/src/cosmos/staking/v1beta1/authz.ts @@ -0,0 +1,333 @@ +import { Coin, CoinAmino } from "../../base/v1beta1/coin"; +import { isSet, DeepPartial } from "../../../helpers"; +import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; +import { ComputedRef } from "vue"; +/** + * AuthorizationType defines the type of staking module authorization type + * + * Since: cosmos-sdk 0.43 + */ +export enum AuthorizationType { + /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ + AUTHORIZATION_TYPE_UNSPECIFIED = 0, + /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ + AUTHORIZATION_TYPE_DELEGATE = 1, + /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ + AUTHORIZATION_TYPE_UNDELEGATE = 2, + /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ + AUTHORIZATION_TYPE_REDELEGATE = 3, + /** AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION - AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation */ + AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION = 4, + UNRECOGNIZED = -1, +} +export const AuthorizationTypeAmino = AuthorizationType; +export function authorizationTypeFromJSON(object: any): AuthorizationType { + switch (object) { + case 0: + case "AUTHORIZATION_TYPE_UNSPECIFIED": + return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED; + case 1: + case "AUTHORIZATION_TYPE_DELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE; + case 2: + case "AUTHORIZATION_TYPE_UNDELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE; + case 3: + case "AUTHORIZATION_TYPE_REDELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE; + case 4: + case "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION": + return AuthorizationType.AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION; + case -1: + case "UNRECOGNIZED": + default: + return AuthorizationType.UNRECOGNIZED; + } +} +export function authorizationTypeToJSON(object: AuthorizationType): string { + switch (object) { + case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED: + return "AUTHORIZATION_TYPE_UNSPECIFIED"; + case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE: + return "AUTHORIZATION_TYPE_DELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE: + return "AUTHORIZATION_TYPE_UNDELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: + return "AUTHORIZATION_TYPE_REDELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION: + return "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION"; + case AuthorizationType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +/** + * StakeAuthorization defines authorization for delegate/undelegate/redelegate. + * + * Since: cosmos-sdk 0.43 + */ +export interface StakeAuthorization { + /** + * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + * empty, there is no spend limit and any amount of coins can be delegated. + */ + maxTokens?: Coin; + /** + * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + * account. + */ + allowList?: StakeAuthorization_Validators; + /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ + denyList?: StakeAuthorization_Validators; + /** authorization_type defines one of AuthorizationType. */ + authorizationType: AuthorizationType; +} +export interface ReactiveStakeAuthorization { + maxTokens?: ComputedRef; + allowList?: ComputedRef; + denyList?: ComputedRef; + authorizationType: ComputedRef; +} +export interface StakeAuthorizationProtoMsg { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization"; + value: Uint8Array; +} +/** + * StakeAuthorization defines authorization for delegate/undelegate/redelegate. + * + * Since: cosmos-sdk 0.43 + */ +export interface StakeAuthorizationAmino { + /** + * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + * empty, there is no spend limit and any amount of coins can be delegated. + */ + max_tokens?: CoinAmino; + /** + * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + * account. + */ + allow_list?: StakeAuthorization_ValidatorsAmino; + /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ + deny_list?: StakeAuthorization_ValidatorsAmino; + /** authorization_type defines one of AuthorizationType. */ + authorization_type: AuthorizationType; +} +export interface StakeAuthorizationAminoMsg { + type: "cosmos-sdk/StakeAuthorization"; + value: StakeAuthorizationAmino; +} +/** Validators defines list of validator addresses. */ +export interface StakeAuthorization_Validators { + address: string[]; +} +export interface ReactiveStakeAuthorization_Validators { + address: ComputedRef; +} +export interface StakeAuthorization_ValidatorsProtoMsg { + typeUrl: "/cosmos.staking.v1beta1.Validators"; + value: Uint8Array; +} +/** Validators defines list of validator addresses. */ +export interface StakeAuthorization_ValidatorsAmino { + address: string[]; +} +export interface StakeAuthorization_ValidatorsAminoMsg { + type: "cosmos-sdk/Validators"; + value: StakeAuthorization_ValidatorsAmino; +} +function createBaseStakeAuthorization(): StakeAuthorization { + return { + maxTokens: undefined, + allowList: undefined, + denyList: undefined, + authorizationType: 0 + }; +} +export const StakeAuthorization = { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", + aminoType: "cosmos-sdk/StakeAuthorization", + is(o: any): o is StakeAuthorization { + return o && (o.$typeUrl === StakeAuthorization.typeUrl || isSet(o.authorizationType)); + }, + isAmino(o: any): o is StakeAuthorizationAmino { + return o && (o.$typeUrl === StakeAuthorization.typeUrl || isSet(o.authorization_type)); + }, + encode(message: StakeAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.maxTokens !== undefined) { + Coin.encode(message.maxTokens, writer.uint32(10).fork()).ldelim(); + } + if (message.allowList !== undefined) { + StakeAuthorization_Validators.encode(message.allowList, writer.uint32(18).fork()).ldelim(); + } + if (message.denyList !== undefined) { + StakeAuthorization_Validators.encode(message.denyList, writer.uint32(26).fork()).ldelim(); + } + if (message.authorizationType !== 0) { + writer.uint32(32).int32(message.authorizationType); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStakeAuthorization(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxTokens = Coin.decode(reader, reader.uint32()); + break; + case 2: + message.allowList = StakeAuthorization_Validators.decode(reader, reader.uint32()); + break; + case 3: + message.denyList = StakeAuthorization_Validators.decode(reader, reader.uint32()); + break; + case 4: + message.authorizationType = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StakeAuthorization { + const message = createBaseStakeAuthorization(); + message.maxTokens = object.maxTokens !== undefined && object.maxTokens !== null ? Coin.fromPartial(object.maxTokens) : undefined; + message.allowList = object.allowList !== undefined && object.allowList !== null ? StakeAuthorization_Validators.fromPartial(object.allowList) : undefined; + message.denyList = object.denyList !== undefined && object.denyList !== null ? StakeAuthorization_Validators.fromPartial(object.denyList) : undefined; + message.authorizationType = object.authorizationType ?? 0; + return message; + }, + fromAmino(object: StakeAuthorizationAmino): StakeAuthorization { + const message = createBaseStakeAuthorization(); + if (object.max_tokens !== undefined && object.max_tokens !== null) { + message.maxTokens = Coin.fromAmino(object.max_tokens); + } + if (object.allow_list !== undefined && object.allow_list !== null) { + message.allowList = StakeAuthorization_Validators.fromAmino(object.allow_list); + } + if (object.deny_list !== undefined && object.deny_list !== null) { + message.denyList = StakeAuthorization_Validators.fromAmino(object.deny_list); + } + if (object.authorization_type !== undefined && object.authorization_type !== null) { + message.authorizationType = object.authorization_type; + } + return message; + }, + toAmino(message: StakeAuthorization): StakeAuthorizationAmino { + const obj: any = {}; + obj.max_tokens = message.maxTokens ? Coin.toAmino(message.maxTokens) : undefined; + obj.allow_list = message.allowList ? StakeAuthorization_Validators.toAmino(message.allowList) : undefined; + obj.deny_list = message.denyList ? StakeAuthorization_Validators.toAmino(message.denyList) : undefined; + obj.authorization_type = message.authorizationType === 0 ? undefined : message.authorizationType; + return obj; + }, + fromAminoMsg(object: StakeAuthorizationAminoMsg): StakeAuthorization { + return StakeAuthorization.fromAmino(object.value); + }, + toAminoMsg(message: StakeAuthorization): StakeAuthorizationAminoMsg { + return { + type: "cosmos-sdk/StakeAuthorization", + value: StakeAuthorization.toAmino(message) + }; + }, + fromProtoMsg(message: StakeAuthorizationProtoMsg): StakeAuthorization { + return StakeAuthorization.decode(message.value); + }, + toProto(message: StakeAuthorization): Uint8Array { + return StakeAuthorization.encode(message).finish(); + }, + toProtoMsg(message: StakeAuthorization): StakeAuthorizationProtoMsg { + return { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", + value: StakeAuthorization.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(StakeAuthorization.typeUrl, StakeAuthorization); +GlobalDecoderRegistry.registerAminoProtoMapping(StakeAuthorization.aminoType, StakeAuthorization.typeUrl); +function createBaseStakeAuthorization_Validators(): StakeAuthorization_Validators { + return { + address: [] + }; +} +export const StakeAuthorization_Validators = { + typeUrl: "/cosmos.staking.v1beta1.Validators", + aminoType: "cosmos-sdk/Validators", + is(o: any): o is StakeAuthorization_Validators { + return o && (o.$typeUrl === StakeAuthorization_Validators.typeUrl || Array.isArray(o.address) && (!o.address.length || typeof o.address[0] === "string")); + }, + isAmino(o: any): o is StakeAuthorization_ValidatorsAmino { + return o && (o.$typeUrl === StakeAuthorization_Validators.typeUrl || Array.isArray(o.address) && (!o.address.length || typeof o.address[0] === "string")); + }, + encode(message: StakeAuthorization_Validators, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.address) { + writer.uint32(10).string(v!); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization_Validators { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStakeAuthorization_Validators(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StakeAuthorization_Validators { + const message = createBaseStakeAuthorization_Validators(); + message.address = object.address?.map(e => e) || []; + return message; + }, + fromAmino(object: StakeAuthorization_ValidatorsAmino): StakeAuthorization_Validators { + const message = createBaseStakeAuthorization_Validators(); + message.address = object.address?.map(e => e) || []; + return message; + }, + toAmino(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAmino { + const obj: any = {}; + if (message.address) { + obj.address = message.address.map(e => e); + } else { + obj.address = message.address; + } + return obj; + }, + fromAminoMsg(object: StakeAuthorization_ValidatorsAminoMsg): StakeAuthorization_Validators { + return StakeAuthorization_Validators.fromAmino(object.value); + }, + toAminoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAminoMsg { + return { + type: "cosmos-sdk/Validators", + value: StakeAuthorization_Validators.toAmino(message) + }; + }, + fromProtoMsg(message: StakeAuthorization_ValidatorsProtoMsg): StakeAuthorization_Validators { + return StakeAuthorization_Validators.decode(message.value); + }, + toProto(message: StakeAuthorization_Validators): Uint8Array { + return StakeAuthorization_Validators.encode(message).finish(); + }, + toProtoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsProtoMsg { + return { + typeUrl: "/cosmos.staking.v1beta1.Validators", + value: StakeAuthorization_Validators.encode(message).finish() + }; + } +}; +GlobalDecoderRegistry.register(StakeAuthorization_Validators.typeUrl, StakeAuthorization_Validators); +GlobalDecoderRegistry.registerAminoProtoMapping(StakeAuthorization_Validators.aminoType, StakeAuthorization_Validators.typeUrl); \ No newline at end of file diff --git a/libs/interchain-vue/src/cosmos/staking/v1beta1/query.ts b/libs/interchain-vue/src/cosmos/staking/v1beta1/query.ts index a995580b..e81b1e3e 100644 --- a/libs/interchain-vue/src/cosmos/staking/v1beta1/query.ts +++ b/libs/interchain-vue/src/cosmos/staking/v1beta1/query.ts @@ -1,8 +1,8 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; import { Validator, ValidatorAmino, DelegationResponse, DelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, RedelegationResponse, RedelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Pool, PoolAmino, Params, ParamsAmino } from "./staking"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ export interface QueryValidatorsRequest { diff --git a/libs/interchain-vue/src/cosmos/staking/v1beta1/staking.ts b/libs/interchain-vue/src/cosmos/staking/v1beta1/staking.ts index 0b2f164a..d99e2c80 100644 --- a/libs/interchain-vue/src/cosmos/staking/v1beta1/staking.ts +++ b/libs/interchain-vue/src/cosmos/staking/v1beta1/staking.ts @@ -5,8 +5,8 @@ import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; import { ComputedRef } from "vue"; /** BondStatus is the status of a validator. */ diff --git a/libs/interchain-vue/src/cosmos/staking/v1beta1/tx.ts b/libs/interchain-vue/src/cosmos/staking/v1beta1/tx.ts index d397d34b..02daad17 100644 --- a/libs/interchain-vue/src/cosmos/staking/v1beta1/tx.ts +++ b/libs/interchain-vue/src/cosmos/staking/v1beta1/tx.ts @@ -3,9 +3,9 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { GlobalDecoderRegistry } from "../../../registry"; import { ComputedRef } from "vue"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { diff --git a/libs/interchain-vue/src/cosmos/tx/v1beta1/tx.ts b/libs/interchain-vue/src/cosmos/tx/v1beta1/tx.ts index 86b624e3..480c8921 100644 --- a/libs/interchain-vue/src/cosmos/tx/v1beta1/tx.ts +++ b/libs/interchain-vue/src/cosmos/tx/v1beta1/tx.ts @@ -3,8 +3,8 @@ import { SignMode } from "../signing/v1beta1/signing"; import { CompactBitArray, CompactBitArrayAmino } from "../../crypto/multisig/v1beta1/multisig"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; import { ComputedRef } from "vue"; /** Tx is the standard type used for broadcasting transactions. */ export interface Tx { diff --git a/libs/interchain-vue/src/cosmos/vesting/v1beta1/vesting.ts b/libs/interchain-vue/src/cosmos/vesting/v1beta1/vesting.ts index a032aafe..3e4118c2 100644 --- a/libs/interchain-vue/src/cosmos/vesting/v1beta1/vesting.ts +++ b/libs/interchain-vue/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,8 +1,8 @@ import { BaseAccount, BaseAccountAmino } from "../../auth/v1beta1/auth"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; import { ComputedRef } from "vue"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all diff --git a/libs/interchain-vue/src/cosmwasm/rpc.query.ts b/libs/interchain-vue/src/cosmwasm/rpc.query.ts index e302bcf3..9b7517e3 100644 --- a/libs/interchain-vue/src/cosmwasm/rpc.query.ts +++ b/libs/interchain-vue/src/cosmwasm/rpc.query.ts @@ -12,6 +12,9 @@ export const createRPCQueryClient = async ({ auth: { v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) }, + authz: { + v1beta1: (await import("../cosmos/authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) + }, bank: { v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) }, diff --git a/libs/interchain-vue/src/cosmwasm/wasm/v1/tx.ts b/libs/interchain-vue/src/cosmwasm/wasm/v1/tx.ts index ec31e4ab..78684ea0 100644 --- a/libs/interchain-vue/src/cosmwasm/wasm/v1/tx.ts +++ b/libs/interchain-vue/src/cosmwasm/wasm/v1/tx.ts @@ -1,9 +1,9 @@ import { AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; import { ComputedRef } from "vue"; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { diff --git a/libs/interchain-vue/src/extern.ts b/libs/interchain-vue/src/extern.ts index c844d6f0..2ceebef5 100644 --- a/libs/interchain-vue/src/extern.ts +++ b/libs/interchain-vue/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/helpers.ts b/libs/interchain-vue/src/helpers.ts index 1f19575b..ab170adb 100644 --- a/libs/interchain-vue/src/helpers.ts +++ b/libs/interchain-vue/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/ibc/applications/transfer/v1/tx.ts b/libs/interchain-vue/src/ibc/applications/transfer/v1/tx.ts index d44bd558..756b7b69 100644 --- a/libs/interchain-vue/src/ibc/applications/transfer/v1/tx.ts +++ b/libs/interchain-vue/src/ibc/applications/transfer/v1/tx.ts @@ -2,8 +2,8 @@ import { Coin, CoinAmino } from "../../../../cosmos/base/v1beta1/coin"; import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v1/client"; import { Forwarding, ForwardingAmino } from "./transfer"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between diff --git a/libs/interchain-vue/src/ibc/core/channel/v1/tx.ts b/libs/interchain-vue/src/ibc/core/channel/v1/tx.ts index 14ba4ea1..5584dc8a 100644 --- a/libs/interchain-vue/src/ibc/core/channel/v1/tx.ts +++ b/libs/interchain-vue/src/ibc/core/channel/v1/tx.ts @@ -2,8 +2,8 @@ import { Channel, ChannelAmino, Packet, PacketAmino, State } from "./channel"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { UpgradeFields, UpgradeFieldsAmino, Upgrade, UpgradeAmino, ErrorReceipt, ErrorReceiptAmino } from "./upgrade"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; import { ComputedRef } from "vue"; /** ResponseResultType defines the possible outcomes of the execution of a message */ export enum ResponseResultType { diff --git a/libs/interchain-vue/src/ibc/core/channel/v1/upgrade.ts b/libs/interchain-vue/src/ibc/core/channel/v1/upgrade.ts index 0b23f16a..91185340 100644 --- a/libs/interchain-vue/src/ibc/core/channel/v1/upgrade.ts +++ b/libs/interchain-vue/src/ibc/core/channel/v1/upgrade.ts @@ -1,7 +1,7 @@ import { Timeout, TimeoutAmino, Order } from "./channel"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, isSet } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, isSet } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * Upgrade is a verifiable type which contains the relevant information diff --git a/libs/interchain-vue/src/ibc/core/client/v1/client.ts b/libs/interchain-vue/src/ibc/core/client/v1/client.ts index 2d3f05d9..4846cb86 100644 --- a/libs/interchain-vue/src/ibc/core/client/v1/client.ts +++ b/libs/interchain-vue/src/ibc/core/client/v1/client.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * IdentifiedClientState defines a client state with an additional client diff --git a/libs/interchain-vue/src/ibc/core/client/v1/tx.ts b/libs/interchain-vue/src/ibc/core/client/v1/tx.ts index 26be87d5..43f9dd14 100644 --- a/libs/interchain-vue/src/ibc/core/client/v1/tx.ts +++ b/libs/interchain-vue/src/ibc/core/client/v1/tx.ts @@ -2,8 +2,8 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import { Params, ParamsAmino } from "./client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { ComputedRef } from "vue"; /** MsgCreateClient defines a message to create an IBC client */ export interface MsgCreateClient { diff --git a/libs/interchain-vue/src/ibc/core/connection/v1/tx.ts b/libs/interchain-vue/src/ibc/core/connection/v1/tx.ts index a2e74a8f..87869100 100644 --- a/libs/interchain-vue/src/ibc/core/connection/v1/tx.ts +++ b/libs/interchain-vue/src/ibc/core/connection/v1/tx.ts @@ -2,8 +2,8 @@ import { Counterparty, CounterpartyAmino, Version, VersionAmino } from "./connec import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { GlobalDecoderRegistry } from "../../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { ComputedRef } from "vue"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to diff --git a/libs/interchain-vue/src/injective/types/v1beta1/account.ts b/libs/interchain-vue/src/injective/types/v1beta1/account.ts index bdd747c6..5e15c851 100644 --- a/libs/interchain-vue/src/injective/types/v1beta1/account.ts +++ b/libs/interchain-vue/src/injective/types/v1beta1/account.ts @@ -1,7 +1,7 @@ import { BaseAccount, BaseAccountAmino } from "../../../cosmos/auth/v1beta1/auth"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { ComputedRef } from "vue"; /** * EthAccount implements the authtypes.AccountI interface and embeds an diff --git a/libs/interchain-vue/src/registry.ts b/libs/interchain-vue/src/registry.ts index dee026ae..e7f6497f 100644 --- a/libs/interchain-vue/src/registry.ts +++ b/libs/interchain-vue/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/tendermint/abci/types.ts b/libs/interchain-vue/src/tendermint/abci/types.ts index a1f4f26e..b7d76036 100644 --- a/libs/interchain-vue/src/tendermint/abci/types.ts +++ b/libs/interchain-vue/src/tendermint/abci/types.ts @@ -4,8 +4,8 @@ import { ProofOps, ProofOpsAmino } from "../crypto/proof"; import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BlockIDFlag } from "../types/validator"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; import { ComputedRef } from "vue"; export enum CheckTxType { NEW = 0, diff --git a/libs/interchain-vue/src/tendermint/types/block.ts b/libs/interchain-vue/src/tendermint/types/block.ts index f91a0f55..cf8af491 100644 --- a/libs/interchain-vue/src/tendermint/types/block.ts +++ b/libs/interchain-vue/src/tendermint/types/block.ts @@ -1,8 +1,8 @@ import { Header, HeaderAmino, Data, DataAmino, Commit, CommitAmino } from "./types"; import { EvidenceList, EvidenceListAmino } from "./evidence"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial } from "../../helpers"; import { ComputedRef } from "vue"; export interface Block { header: Header; diff --git a/libs/interchain-vue/src/tendermint/types/evidence.ts b/libs/interchain-vue/src/tendermint/types/evidence.ts index 67bfcd51..661b4f13 100644 --- a/libs/interchain-vue/src/tendermint/types/evidence.ts +++ b/libs/interchain-vue/src/tendermint/types/evidence.ts @@ -2,8 +2,8 @@ import { Vote, VoteAmino, LightBlock, LightBlockAmino } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator, ValidatorAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; import { ComputedRef } from "vue"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; diff --git a/libs/interchain-vue/src/tendermint/types/params.ts b/libs/interchain-vue/src/tendermint/types/params.ts index 6cc92e6f..16da8bfc 100644 --- a/libs/interchain-vue/src/tendermint/types/params.ts +++ b/libs/interchain-vue/src/tendermint/types/params.ts @@ -1,7 +1,7 @@ import { Duration, DurationAmino } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial } from "../../helpers"; import { ComputedRef } from "vue"; /** * ConsensusParams contains consensus critical parameters that determine the diff --git a/libs/interchain-vue/src/tendermint/types/validator.ts b/libs/interchain-vue/src/tendermint/types/validator.ts index d70aa67a..52f72f9d 100644 --- a/libs/interchain-vue/src/tendermint/types/validator.ts +++ b/libs/interchain-vue/src/tendermint/types/validator.ts @@ -1,7 +1,7 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; import { GlobalDecoderRegistry } from "../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; import { ComputedRef } from "vue"; /** BlockIdFlag indicates which BlockID the signature is for */ export enum BlockIDFlag { diff --git a/libs/interchain-vue/src/types.ts b/libs/interchain-vue/src/types.ts index 6983e34a..e44c8a75 100644 --- a/libs/interchain-vue/src/types.ts +++ b/libs/interchain-vue/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -48,6 +48,7 @@ export interface TelescopeGeneratedCodec< toProto?: (message: T) => Uint8Array; fromProtoMsg?: (message: ProtoMsg) => T; toProtoMsg?: (message: T) => Any; + registerTypeUrl?: () => void; } export type TelescopeGeneratedType< diff --git a/libs/interchain-vue/src/utf8.ts b/libs/interchain-vue/src/utf8.ts index 56735515..5fef278b 100644 --- a/libs/interchain-vue/src/utf8.ts +++ b/libs/interchain-vue/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/varint.ts b/libs/interchain-vue/src/varint.ts index e06f5977..cab33130 100644 --- a/libs/interchain-vue/src/varint.ts +++ b/libs/interchain-vue/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/vue-query.ts b/libs/interchain-vue/src/vue-query.ts index 09b35b29..7cf1f613 100644 --- a/libs/interchain-vue/src/vue-query.ts +++ b/libs/interchain-vue/src/vue-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/binary.ts b/libs/interchainjs/src/binary.ts index 7325addd..f9a515e4 100644 --- a/libs/interchainjs/src/binary.ts +++ b/libs/interchainjs/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/cosmos/auth/v1beta1/auth.ts b/libs/interchainjs/src/cosmos/auth/v1beta1/auth.ts index bd8ed990..85846fa2 100644 --- a/libs/interchainjs/src/cosmos/auth/v1beta1/auth.ts +++ b/libs/interchainjs/src/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ import { Any, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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 @@ -222,10 +222,12 @@ export const BaseAccount = { typeUrl: "/cosmos.auth.v1beta1.BaseAccount", value: BaseAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); } }; -GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl); function createBaseModuleAccount(): ModuleAccount { return { baseAccount: undefined, @@ -326,10 +328,13 @@ export const ModuleAccount = { typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", value: ModuleAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); + GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); + BaseAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl); function createBaseModuleCredential(): ModuleCredential { return { moduleName: "", @@ -418,10 +423,9 @@ export const ModuleCredential = { typeUrl: "/cosmos.auth.v1beta1.ModuleCredential", value: ModuleCredential.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModuleCredential.typeUrl, ModuleCredential); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleCredential.aminoType, ModuleCredential.typeUrl); function createBaseParams(): Params { return { maxMemoCharacters: BigInt(0), @@ -544,7 +548,6 @@ export const Params = { typeUrl: "/cosmos.auth.v1beta1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/auth/v1beta1/query.rpc.func.ts b/libs/interchainjs/src/cosmos/auth/v1beta1/query.rpc.func.ts index 9a6e4931..96ab73af 100644 --- a/libs/interchainjs/src/cosmos/auth/v1beta1/query.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/auth/v1beta1/query.rpc.func.ts @@ -5,68 +5,78 @@ export const createGetAccounts = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryAccountRequest.encode, decode: QueryAccountResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Account", - clientResolver + clientResolver, + deps: [QueryAccountRequest, QueryAccountResponse] }); export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAccountAddressByIDRequest.encode, decode: QueryAccountAddressByIDResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountAddressByID", - clientResolver + clientResolver, + deps: [QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleAccountsRequest.encode, decode: QueryModuleAccountsResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccounts", - clientResolver + clientResolver, + deps: [QueryModuleAccountsRequest, QueryModuleAccountsResponse] }); export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryModuleAccountByNameRequest.encode, decode: QueryModuleAccountByNameResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "ModuleAccountByName", - clientResolver + clientResolver, + deps: [QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse] }); export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuery({ encode: Bech32PrefixRequest.encode, decode: Bech32PrefixResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "Bech32Prefix", - clientResolver + clientResolver, + deps: [Bech32PrefixRequest, Bech32PrefixResponse] }); export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => buildQuery({ encode: AddressBytesToStringRequest.encode, decode: AddressBytesToStringResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressBytesToString", - clientResolver + clientResolver, + deps: [AddressBytesToStringRequest, AddressBytesToStringResponse] }); export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => buildQuery({ encode: AddressStringToBytesRequest.encode, decode: AddressStringToBytesResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AddressStringToBytes", - clientResolver + clientResolver, + deps: [AddressStringToBytesRequest, AddressStringToBytesResponse] }); export const createGetAccountInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAccountInfoRequest.encode, decode: QueryAccountInfoResponse.decode, service: "cosmos.auth.v1beta1.Query", method: "AccountInfo", - clientResolver + clientResolver, + deps: [QueryAccountInfoRequest, QueryAccountInfoResponse] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/auth/v1beta1/query.ts b/libs/interchainjs/src/cosmos/auth/v1beta1/query.ts index 13eb3d8e..1074a756 100644 --- a/libs/interchainjs/src/cosmos/auth/v1beta1/query.ts +++ b/libs/interchainjs/src/cosmos/auth/v1beta1/query.ts @@ -3,8 +3,8 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth"; import { EthAccount, EthAccountProtoMsg } from "../../../injective/types/v1beta1/account"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. * @@ -557,10 +557,11 @@ export const QueryAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", value: QueryAccountsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsRequest.typeUrl, QueryAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsRequest.aminoType, QueryAccountsRequest.typeUrl); function createBaseQueryAccountsResponse(): QueryAccountsResponse { return { accounts: [], @@ -649,10 +650,13 @@ export const QueryAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", value: QueryAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountsResponse.typeUrl, QueryAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsResponse.aminoType, QueryAccountsResponse.typeUrl); function createBaseQueryAccountRequest(): QueryAccountRequest { return { address: "" @@ -727,10 +731,9 @@ export const QueryAccountRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", value: QueryAccountRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountRequest.typeUrl, QueryAccountRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountRequest.aminoType, QueryAccountRequest.typeUrl); function createBaseQueryAccountResponse(): QueryAccountResponse { return { account: undefined @@ -805,10 +808,12 @@ export const QueryAccountResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", value: QueryAccountResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + EthAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAccountResponse.typeUrl, QueryAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountResponse.aminoType, QueryAccountResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -870,10 +875,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -948,10 +952,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest { return {}; } @@ -1013,10 +1018,9 @@ export const QueryModuleAccountsRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", value: QueryModuleAccountsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountsRequest.typeUrl, QueryModuleAccountsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsRequest.aminoType, QueryModuleAccountsRequest.typeUrl); function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse { return { accounts: [] @@ -1093,10 +1097,11 @@ export const QueryModuleAccountsResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", value: QueryModuleAccountsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountsResponse.typeUrl, QueryModuleAccountsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsResponse.aminoType, QueryModuleAccountsResponse.typeUrl); function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRequest { return { name: "" @@ -1171,10 +1176,9 @@ export const QueryModuleAccountByNameRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", value: QueryModuleAccountByNameRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameRequest.typeUrl, QueryModuleAccountByNameRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameRequest.aminoType, QueryModuleAccountByNameRequest.typeUrl); function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameResponse { return { account: undefined @@ -1249,10 +1253,11 @@ export const QueryModuleAccountByNameResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", value: QueryModuleAccountByNameResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ModuleAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryModuleAccountByNameResponse.typeUrl, QueryModuleAccountByNameResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameResponse.aminoType, QueryModuleAccountByNameResponse.typeUrl); function createBaseBech32PrefixRequest(): Bech32PrefixRequest { return {}; } @@ -1314,10 +1319,9 @@ export const Bech32PrefixRequest = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", value: Bech32PrefixRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixRequest.typeUrl, Bech32PrefixRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixRequest.aminoType, Bech32PrefixRequest.typeUrl); function createBaseBech32PrefixResponse(): Bech32PrefixResponse { return { bech32Prefix: "" @@ -1392,10 +1396,9 @@ export const Bech32PrefixResponse = { typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", value: Bech32PrefixResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Bech32PrefixResponse.typeUrl, Bech32PrefixResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixResponse.aminoType, Bech32PrefixResponse.typeUrl); function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest { return { addressBytes: new Uint8Array() @@ -1470,10 +1473,9 @@ export const AddressBytesToStringRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", value: AddressBytesToStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringRequest.typeUrl, AddressBytesToStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringRequest.aminoType, AddressBytesToStringRequest.typeUrl); function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse { return { addressString: "" @@ -1548,10 +1550,9 @@ export const AddressBytesToStringResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", value: AddressBytesToStringResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressBytesToStringResponse.typeUrl, AddressBytesToStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringResponse.aminoType, AddressBytesToStringResponse.typeUrl); function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest { return { addressString: "" @@ -1626,10 +1627,9 @@ export const AddressStringToBytesRequest = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", value: AddressStringToBytesRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesRequest.typeUrl, AddressStringToBytesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesRequest.aminoType, AddressStringToBytesRequest.typeUrl); function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse { return { addressBytes: new Uint8Array() @@ -1704,10 +1704,9 @@ export const AddressStringToBytesResponse = { typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", value: AddressStringToBytesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AddressStringToBytesResponse.typeUrl, AddressStringToBytesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesResponse.aminoType, AddressStringToBytesResponse.typeUrl); function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequest { return { id: BigInt(0), @@ -1794,10 +1793,9 @@ export const QueryAccountAddressByIDRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", value: QueryAccountAddressByIDRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDRequest.typeUrl, QueryAccountAddressByIDRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDRequest.aminoType, QueryAccountAddressByIDRequest.typeUrl); function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDResponse { return { accountAddress: "" @@ -1872,10 +1870,9 @@ export const QueryAccountAddressByIDResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", value: QueryAccountAddressByIDResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountAddressByIDResponse.typeUrl, QueryAccountAddressByIDResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDResponse.aminoType, QueryAccountAddressByIDResponse.typeUrl); function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest { return { address: "" @@ -1950,10 +1947,9 @@ export const QueryAccountInfoRequest = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest", value: QueryAccountInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryAccountInfoRequest.typeUrl, QueryAccountInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoRequest.aminoType, QueryAccountInfoRequest.typeUrl); function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse { return { info: undefined @@ -2028,7 +2024,8 @@ export const QueryAccountInfoResponse = { typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse", value: QueryAccountInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryAccountInfoResponse.typeUrl, QueryAccountInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoResponse.aminoType, QueryAccountInfoResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/authz/v1beta1/authz.ts b/libs/interchainjs/src/cosmos/authz/v1beta1/authz.ts index e71c3fee..514977a6 100644 --- a/libs/interchainjs/src/cosmos/authz/v1beta1/authz.ts +++ b/libs/interchainjs/src/cosmos/authz/v1beta1/authz.ts @@ -1,5 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; +import { SendAuthorization, SendAuthorizationProtoMsg } from "../../bank/v1beta1/authz"; +import { StakeAuthorization, StakeAuthorizationProtoMsg } from "../../staking/v1beta1/authz"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; @@ -32,7 +34,7 @@ export interface GenericAuthorizationAminoMsg { * the provide method with expiration time. */ export interface Grant { - authorization?: GenericAuthorization | Any | undefined; + authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | 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` @@ -45,7 +47,7 @@ export interface GrantProtoMsg { value: Uint8Array; } export type GrantEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * Grant gives permissions to execute @@ -71,7 +73,7 @@ export interface GrantAminoMsg { export interface GrantAuthorization { granter: string; grantee: string; - authorization?: GenericAuthorization | Any | undefined; + authorization?: GenericAuthorization | SendAuthorization | StakeAuthorization | Any | undefined; expiration?: Date; } export interface GrantAuthorizationProtoMsg { @@ -79,7 +81,7 @@ export interface GrantAuthorizationProtoMsg { value: Uint8Array; } export type GrantAuthorizationEncoded = Omit & { - authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined; + authorization?: GenericAuthorizationProtoMsg | SendAuthorizationProtoMsg | StakeAuthorizationProtoMsg | AnyProtoMsg | undefined; }; /** * GrantAuthorization extends a grant with both the addresses of the grantee and granter. @@ -187,10 +189,12 @@ export const GenericAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", value: GenericAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); } }; -GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl); function createBaseGrant(): Grant { return { authorization: undefined, @@ -277,10 +281,13 @@ export const Grant = { typeUrl: "/cosmos.authz.v1beta1.Grant", value: Grant.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); + SendAuthorization.registerTypeUrl(); + StakeAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Grant.typeUrl, Grant); -GlobalDecoderRegistry.registerAminoProtoMapping(Grant.aminoType, Grant.typeUrl); function createBaseGrantAuthorization(): GrantAuthorization { return { granter: "", @@ -391,10 +398,13 @@ export const GrantAuthorization = { typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", value: GrantAuthorization.encode(message).finish() }; + }, + registerTypeUrl() { + GenericAuthorization.registerTypeUrl(); + SendAuthorization.registerTypeUrl(); + StakeAuthorization.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GrantAuthorization.typeUrl, GrantAuthorization); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantAuthorization.aminoType, GrantAuthorization.typeUrl); function createBaseGrantQueueItem(): GrantQueueItem { return { msgTypeUrls: [] @@ -471,7 +481,6 @@ export const GrantQueueItem = { typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", value: GrantQueueItem.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GrantQueueItem.typeUrl, GrantQueueItem); -GlobalDecoderRegistry.registerAminoProtoMapping(GrantQueueItem.aminoType, GrantQueueItem.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/authz/v1beta1/query.rpc.func.ts b/libs/interchainjs/src/cosmos/authz/v1beta1/query.rpc.func.ts new file mode 100644 index 00000000..cbb9526e --- /dev/null +++ b/libs/interchainjs/src/cosmos/authz/v1beta1/query.rpc.func.ts @@ -0,0 +1,26 @@ +import { RpcResolver, buildQuery } from "../../../helper-func-types"; +import { QueryGrantsRequest, QueryGrantsResponse, QueryGranterGrantsRequest, QueryGranterGrantsResponse, QueryGranteeGrantsRequest, QueryGranteeGrantsResponse } from "./query"; +export const createGetGrants = (clientResolver?: RpcResolver) => buildQuery({ + encode: QueryGrantsRequest.encode, + decode: QueryGrantsResponse.decode, + service: "cosmos.authz.v1beta1.Query", + method: "Grants", + clientResolver, + deps: [QueryGrantsRequest, QueryGrantsResponse] +}); +export const createGetGranterGrants = (clientResolver?: RpcResolver) => buildQuery({ + encode: QueryGranterGrantsRequest.encode, + decode: QueryGranterGrantsResponse.decode, + service: "cosmos.authz.v1beta1.Query", + method: "GranterGrants", + clientResolver, + deps: [QueryGranterGrantsRequest, QueryGranterGrantsResponse] +}); +export const createGetGranteeGrants = (clientResolver?: RpcResolver) => buildQuery({ + encode: QueryGranteeGrantsRequest.encode, + decode: QueryGranteeGrantsResponse.decode, + service: "cosmos.authz.v1beta1.Query", + method: "GranteeGrants", + clientResolver, + deps: [QueryGranteeGrantsRequest, QueryGranteeGrantsResponse] +}); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/authz/v1beta1/query.ts b/libs/interchainjs/src/cosmos/authz/v1beta1/query.ts new file mode 100644 index 00000000..96bc3f96 --- /dev/null +++ b/libs/interchainjs/src/cosmos/authz/v1beta1/query.ts @@ -0,0 +1,715 @@ +import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; +import { Grant, GrantAmino, GrantAuthorization, GrantAuthorizationAmino } 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; +} +/** 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; +} +/** 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; +} +/** 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; +} +/** QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants 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/GranteeGrants 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; +} +/** 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; +} +function createBaseQueryGrantsRequest(): QueryGrantsRequest { + return { + granter: "", + grantee: "", + msgTypeUrl: "", + pagination: undefined + }; +} +export const QueryGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest", + aminoType: "cosmos-sdk/QueryGrantsRequest", + is(o: any): o is QueryGrantsRequest { + return o && (o.$typeUrl === QueryGrantsRequest.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msgTypeUrl === "string"); + }, + isAmino(o: any): o is QueryGrantsRequestAmino { + return o && (o.$typeUrl === QueryGrantsRequest.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msg_type_url === "string"); + }, + 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() + }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); + } +}; +function createBaseQueryGrantsResponse(): QueryGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse", + aminoType: "cosmos-sdk/QueryGrantsResponse", + is(o: any): o is QueryGrantsResponse { + return o && (o.$typeUrl === QueryGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || Grant.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGrantsResponseAmino { + return o && (o.$typeUrl === QueryGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || Grant.isAmino(o.grants[0]))); + }, + 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() + }; + }, + registerTypeUrl() { + Grant.registerTypeUrl(); + PageResponse.registerTypeUrl(); + } +}; +function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest { + return { + granter: "", + pagination: undefined + }; +} +export const QueryGranterGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest", + aminoType: "cosmos-sdk/QueryGranterGrantsRequest", + is(o: any): o is QueryGranterGrantsRequest { + return o && (o.$typeUrl === QueryGranterGrantsRequest.typeUrl || typeof o.granter === "string"); + }, + isAmino(o: any): o is QueryGranterGrantsRequestAmino { + return o && (o.$typeUrl === QueryGranterGrantsRequest.typeUrl || typeof o.granter === "string"); + }, + 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() + }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); + } +}; +function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGranterGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse", + aminoType: "cosmos-sdk/QueryGranterGrantsResponse", + is(o: any): o is QueryGranterGrantsResponse { + return o && (o.$typeUrl === QueryGranterGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGranterGrantsResponseAmino { + return o && (o.$typeUrl === QueryGranterGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.isAmino(o.grants[0]))); + }, + 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() + }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); + PageResponse.registerTypeUrl(); + } +}; +function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest { + return { + grantee: "", + pagination: undefined + }; +} +export const QueryGranteeGrantsRequest = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest", + aminoType: "cosmos-sdk/QueryGranteeGrantsRequest", + is(o: any): o is QueryGranteeGrantsRequest { + return o && (o.$typeUrl === QueryGranteeGrantsRequest.typeUrl || typeof o.grantee === "string"); + }, + isAmino(o: any): o is QueryGranteeGrantsRequestAmino { + return o && (o.$typeUrl === QueryGranteeGrantsRequest.typeUrl || typeof o.grantee === "string"); + }, + 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() + }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); + } +}; +function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse { + return { + grants: [], + pagination: undefined + }; +} +export const QueryGranteeGrantsResponse = { + typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse", + aminoType: "cosmos-sdk/QueryGranteeGrantsResponse", + is(o: any): o is QueryGranteeGrantsResponse { + return o && (o.$typeUrl === QueryGranteeGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.is(o.grants[0]))); + }, + isAmino(o: any): o is QueryGranteeGrantsResponseAmino { + return o && (o.$typeUrl === QueryGranteeGrantsResponse.typeUrl || Array.isArray(o.grants) && (!o.grants.length || GrantAuthorization.isAmino(o.grants[0]))); + }, + 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() + }; + }, + registerTypeUrl() { + GrantAuthorization.registerTypeUrl(); + PageResponse.registerTypeUrl(); + } +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/authz/v1beta1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/authz/v1beta1/tx.rpc.func.ts index 18006a6c..7c896912 100644 --- a/libs/interchainjs/src/cosmos/authz/v1beta1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/authz/v1beta1/tx.rpc.func.ts @@ -5,17 +5,20 @@ export const createGrant = (clientResolver?: SigningClientResolver) => buildTx buildTx({ clientResolver, typeUrl: MsgExec.typeUrl, encoders: toEncoders(MsgExec), - converters: toConverters(MsgExec) + converters: toConverters(MsgExec), + deps: [MsgExec] }); export const createRevoke = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRevoke.typeUrl, encoders: toEncoders(MsgRevoke), - converters: toConverters(MsgRevoke) + converters: toConverters(MsgRevoke), + deps: [MsgRevoke] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/authz/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/authz/v1beta1/tx.ts index 80640ebe..265830cc 100644 --- a/libs/interchainjs/src/cosmos/authz/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/authz/v1beta1/tx.ts @@ -1,8 +1,8 @@ import { Grant, GrantAmino } from "./authz"; import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { 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. @@ -237,10 +237,11 @@ export const MsgGrant = { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.encode(message).finish() }; + }, + registerTypeUrl() { + Grant.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgGrant.typeUrl, MsgGrant); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrant.aminoType, MsgGrant.typeUrl); function createBaseMsgGrantResponse(): MsgGrantResponse { return {}; } @@ -302,10 +303,9 @@ export const MsgGrantResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", value: MsgGrantResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantResponse.typeUrl, MsgGrantResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantResponse.aminoType, MsgGrantResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { grantee: "", @@ -394,10 +394,9 @@ export const MsgExec = { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { results: [] @@ -474,10 +473,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgRevoke(): MsgRevoke { return { granter: "", @@ -576,10 +574,9 @@ export const MsgRevoke = { typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevoke.typeUrl, MsgRevoke); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevoke.aminoType, MsgRevoke.typeUrl); function createBaseMsgRevokeResponse(): MsgRevokeResponse { return {}; } @@ -641,7 +638,6 @@ export const MsgRevokeResponse = { typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", value: MsgRevokeResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgRevokeResponse.typeUrl, MsgRevokeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeResponse.aminoType, MsgRevokeResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/bank/v1beta1/authz.ts b/libs/interchainjs/src/cosmos/bank/v1beta1/authz.ts new file mode 100644 index 00000000..47807181 --- /dev/null +++ b/libs/interchainjs/src/cosmos/bank/v1beta1/authz.ts @@ -0,0 +1,141 @@ +import { Coin, CoinAmino } from "../../base/v1beta1/coin"; +import { BinaryReader, BinaryWriter } from "../../../binary"; +import { DeepPartial } from "../../../helpers"; +import { GlobalDecoderRegistry } from "../../../registry"; +/** + * SendAuthorization allows the grantee to spend up to spend_limit coins from + * the granter's account. + * + * Since: cosmos-sdk 0.43 + */ +export interface 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; +} +function createBaseSendAuthorization(): SendAuthorization { + return { + spendLimit: [], + allowList: [] + }; +} +export const SendAuthorization = { + typeUrl: "/cosmos.bank.v1beta1.SendAuthorization", + aminoType: "cosmos-sdk/SendAuthorization", + is(o: any): o is SendAuthorization { + return o && (o.$typeUrl === SendAuthorization.typeUrl || Array.isArray(o.spendLimit) && (!o.spendLimit.length || Coin.is(o.spendLimit[0])) && Array.isArray(o.allowList) && (!o.allowList.length || typeof o.allowList[0] === "string")); + }, + isAmino(o: any): o is SendAuthorizationAmino { + return o && (o.$typeUrl === SendAuthorization.typeUrl || Array.isArray(o.spend_limit) && (!o.spend_limit.length || Coin.isAmino(o.spend_limit[0])) && Array.isArray(o.allow_list) && (!o.allow_list.length || typeof o.allow_list[0] === "string")); + }, + 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() + }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SendAuthorization.typeUrl, SendAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(SendAuthorization.aminoType, SendAuthorization.typeUrl); + Coin.registerTypeUrl(); + } +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/bank/v1beta1/bank.ts b/libs/interchainjs/src/cosmos/bank/v1beta1/bank.ts index 2c115ba3..0deb436b 100644 --- a/libs/interchainjs/src/cosmos/bank/v1beta1/bank.ts +++ b/libs/interchainjs/src/cosmos/bank/v1beta1/bank.ts @@ -346,10 +346,11 @@ export const Params = { typeUrl: "/cosmos.bank.v1beta1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseSendEnabled(): SendEnabled { return { denom: "", @@ -436,10 +437,9 @@ export const SendEnabled = { typeUrl: "/cosmos.bank.v1beta1.SendEnabled", value: SendEnabled.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SendEnabled.typeUrl, SendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(SendEnabled.aminoType, SendEnabled.typeUrl); function createBaseInput(): Input { return { address: "", @@ -528,10 +528,11 @@ export const Input = { typeUrl: "/cosmos.bank.v1beta1.Input", value: Input.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Input.typeUrl, Input); -GlobalDecoderRegistry.registerAminoProtoMapping(Input.aminoType, Input.typeUrl); function createBaseOutput(): Output { return { address: "", @@ -620,10 +621,11 @@ export const Output = { typeUrl: "/cosmos.bank.v1beta1.Output", value: Output.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Output.typeUrl, Output); -GlobalDecoderRegistry.registerAminoProtoMapping(Output.aminoType, Output.typeUrl); function createBaseSupply(): Supply { return { total: [] @@ -700,10 +702,13 @@ export const Supply = { typeUrl: "/cosmos.bank.v1beta1.Supply", value: Supply.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(Supply.typeUrl, Supply); + GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Supply.typeUrl, Supply); -GlobalDecoderRegistry.registerAminoProtoMapping(Supply.aminoType, Supply.typeUrl); function createBaseDenomUnit(): DenomUnit { return { denom: "", @@ -804,10 +809,9 @@ export const DenomUnit = { typeUrl: "/cosmos.bank.v1beta1.DenomUnit", value: DenomUnit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DenomUnit.typeUrl, DenomUnit); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomUnit.aminoType, DenomUnit.typeUrl); function createBaseMetadata(): Metadata { return { description: "", @@ -968,7 +972,8 @@ export const Metadata = { typeUrl: "/cosmos.bank.v1beta1.Metadata", value: Metadata.encode(message).finish() }; + }, + registerTypeUrl() { + DenomUnit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Metadata.typeUrl, Metadata); -GlobalDecoderRegistry.registerAminoProtoMapping(Metadata.aminoType, Metadata.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/bank/v1beta1/query.rpc.func.ts b/libs/interchainjs/src/cosmos/bank/v1beta1/query.rpc.func.ts index dc21baf8..70281597 100644 --- a/libs/interchainjs/src/cosmos/bank/v1beta1/query.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/bank/v1beta1/query.rpc.func.ts @@ -5,89 +5,102 @@ export const createGetBalance = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryAllBalancesRequest.encode, decode: QueryAllBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "AllBalances", - clientResolver + clientResolver, + deps: [QueryAllBalancesRequest, QueryAllBalancesResponse] }); export const createGetSpendableBalances = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpendableBalancesRequest.encode, decode: QuerySpendableBalancesResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalances", - clientResolver + clientResolver, + deps: [QuerySpendableBalancesRequest, QuerySpendableBalancesResponse] }); export const createGetSpendableBalanceByDenom = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySpendableBalanceByDenomRequest.encode, decode: QuerySpendableBalanceByDenomResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SpendableBalanceByDenom", - clientResolver + clientResolver, + deps: [QuerySpendableBalanceByDenomRequest, QuerySpendableBalanceByDenomResponse] }); export const createGetTotalSupply = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTotalSupplyRequest.encode, decode: QueryTotalSupplyResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "TotalSupply", - clientResolver + clientResolver, + deps: [QueryTotalSupplyRequest, QueryTotalSupplyResponse] }); export const createGetSupplyOf = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySupplyOfRequest.encode, decode: QuerySupplyOfResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SupplyOf", - clientResolver + clientResolver, + deps: [QuerySupplyOfRequest, QuerySupplyOfResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetDenomMetadata = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomMetadataRequest.encode, decode: QueryDenomMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadata", - clientResolver + clientResolver, + deps: [QueryDenomMetadataRequest, QueryDenomMetadataResponse] }); export const createGetDenomMetadataByQueryString = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomMetadataByQueryStringRequest.encode, decode: QueryDenomMetadataByQueryStringResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomMetadataByQueryString", - clientResolver + clientResolver, + deps: [QueryDenomMetadataByQueryStringRequest, QueryDenomMetadataByQueryStringResponse] }); export const createGetDenomsMetadata = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomsMetadataRequest.encode, decode: QueryDenomsMetadataResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomsMetadata", - clientResolver + clientResolver, + deps: [QueryDenomsMetadataRequest, QueryDenomsMetadataResponse] }); export const createGetDenomOwners = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomOwnersRequest.encode, decode: QueryDenomOwnersResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwners", - clientResolver + clientResolver, + deps: [QueryDenomOwnersRequest, QueryDenomOwnersResponse] }); export const createGetDenomOwnersByQuery = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDenomOwnersByQueryRequest.encode, decode: QueryDenomOwnersByQueryResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "DenomOwnersByQuery", - clientResolver + clientResolver, + deps: [QueryDenomOwnersByQueryRequest, QueryDenomOwnersByQueryResponse] }); export const createGetSendEnabled = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySendEnabledRequest.encode, decode: QuerySendEnabledResponse.decode, service: "cosmos.bank.v1beta1.Query", method: "SendEnabled", - clientResolver + clientResolver, + deps: [QuerySendEnabledRequest, QuerySendEnabledResponse] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/bank/v1beta1/query.ts b/libs/interchainjs/src/cosmos/bank/v1beta1/query.ts index 45f3fa82..f8f232a5 100644 --- a/libs/interchainjs/src/cosmos/bank/v1beta1/query.ts +++ b/libs/interchainjs/src/cosmos/bank/v1beta1/query.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino, Metadata, MetadataAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ export interface QueryBalanceRequest { /** address is the address to query balances for. */ @@ -810,10 +809,9 @@ export const QueryBalanceRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", value: QueryBalanceRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBalanceRequest.typeUrl, QueryBalanceRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceRequest.aminoType, QueryBalanceRequest.typeUrl); function createBaseQueryBalanceResponse(): QueryBalanceResponse { return { balance: undefined @@ -888,10 +886,11 @@ export const QueryBalanceResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", value: QueryBalanceResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryBalanceResponse.typeUrl, QueryBalanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBalanceResponse.aminoType, QueryBalanceResponse.typeUrl); function createBaseQueryAllBalancesRequest(): QueryAllBalancesRequest { return { address: "", @@ -990,10 +989,11 @@ export const QueryAllBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", value: QueryAllBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesRequest.typeUrl, QueryAllBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesRequest.aminoType, QueryAllBalancesRequest.typeUrl); function createBaseQueryAllBalancesResponse(): QueryAllBalancesResponse { return { balances: [], @@ -1082,10 +1082,12 @@ export const QueryAllBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", value: QueryAllBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllBalancesResponse.typeUrl, QueryAllBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllBalancesResponse.aminoType, QueryAllBalancesResponse.typeUrl); function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { return { address: "", @@ -1172,10 +1174,11 @@ export const QuerySpendableBalancesRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", value: QuerySpendableBalancesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesRequest.typeUrl, QuerySpendableBalancesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesRequest.aminoType, QuerySpendableBalancesRequest.typeUrl); function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { return { balances: [], @@ -1264,10 +1267,12 @@ export const QuerySpendableBalancesResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", value: QuerySpendableBalancesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalancesResponse.typeUrl, QuerySpendableBalancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalancesResponse.aminoType, QuerySpendableBalancesResponse.typeUrl); function createBaseQuerySpendableBalanceByDenomRequest(): QuerySpendableBalanceByDenomRequest { return { address: "", @@ -1354,10 +1359,9 @@ export const QuerySpendableBalanceByDenomRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", value: QuerySpendableBalanceByDenomRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomRequest.typeUrl, QuerySpendableBalanceByDenomRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomRequest.aminoType, QuerySpendableBalanceByDenomRequest.typeUrl); function createBaseQuerySpendableBalanceByDenomResponse(): QuerySpendableBalanceByDenomResponse { return { balance: undefined @@ -1432,10 +1436,11 @@ export const QuerySpendableBalanceByDenomResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", value: QuerySpendableBalanceByDenomResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySpendableBalanceByDenomResponse.typeUrl, QuerySpendableBalanceByDenomResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySpendableBalanceByDenomResponse.aminoType, QuerySpendableBalanceByDenomResponse.typeUrl); function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { return { pagination: undefined @@ -1510,10 +1515,11 @@ export const QueryTotalSupplyRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", value: QueryTotalSupplyRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyRequest.typeUrl, QueryTotalSupplyRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyRequest.aminoType, QueryTotalSupplyRequest.typeUrl); function createBaseQueryTotalSupplyResponse(): QueryTotalSupplyResponse { return { supply: [], @@ -1602,10 +1608,12 @@ export const QueryTotalSupplyResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", value: QueryTotalSupplyResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryTotalSupplyResponse.typeUrl, QueryTotalSupplyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTotalSupplyResponse.aminoType, QueryTotalSupplyResponse.typeUrl); function createBaseQuerySupplyOfRequest(): QuerySupplyOfRequest { return { denom: "" @@ -1680,10 +1688,9 @@ export const QuerySupplyOfRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", value: QuerySupplyOfRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySupplyOfRequest.typeUrl, QuerySupplyOfRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfRequest.aminoType, QuerySupplyOfRequest.typeUrl); function createBaseQuerySupplyOfResponse(): QuerySupplyOfResponse { return { amount: Coin.fromPartial({}) @@ -1758,10 +1765,11 @@ export const QuerySupplyOfResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", value: QuerySupplyOfResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySupplyOfResponse.typeUrl, QuerySupplyOfResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySupplyOfResponse.aminoType, QuerySupplyOfResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -1823,10 +1831,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -1901,10 +1908,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDenomsMetadataRequest(): QueryDenomsMetadataRequest { return { pagination: undefined @@ -1979,10 +1987,11 @@ export const QueryDenomsMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", value: QueryDenomsMetadataRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataRequest.typeUrl, QueryDenomsMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataRequest.aminoType, QueryDenomsMetadataRequest.typeUrl); function createBaseQueryDenomsMetadataResponse(): QueryDenomsMetadataResponse { return { metadatas: [], @@ -2071,10 +2080,12 @@ export const QueryDenomsMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", value: QueryDenomsMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomsMetadataResponse.typeUrl, QueryDenomsMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomsMetadataResponse.aminoType, QueryDenomsMetadataResponse.typeUrl); function createBaseQueryDenomMetadataRequest(): QueryDenomMetadataRequest { return { denom: "" @@ -2149,10 +2160,9 @@ export const QueryDenomMetadataRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", value: QueryDenomMetadataRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataRequest.typeUrl, QueryDenomMetadataRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataRequest.aminoType, QueryDenomMetadataRequest.typeUrl); function createBaseQueryDenomMetadataResponse(): QueryDenomMetadataResponse { return { metadata: Metadata.fromPartial({}) @@ -2227,10 +2237,11 @@ export const QueryDenomMetadataResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", value: QueryDenomMetadataResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataResponse.typeUrl, QueryDenomMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataResponse.aminoType, QueryDenomMetadataResponse.typeUrl); function createBaseQueryDenomMetadataByQueryStringRequest(): QueryDenomMetadataByQueryStringRequest { return { denom: "" @@ -2305,10 +2316,9 @@ export const QueryDenomMetadataByQueryStringRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", value: QueryDenomMetadataByQueryStringRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringRequest.typeUrl, QueryDenomMetadataByQueryStringRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringRequest.aminoType, QueryDenomMetadataByQueryStringRequest.typeUrl); function createBaseQueryDenomMetadataByQueryStringResponse(): QueryDenomMetadataByQueryStringResponse { return { metadata: Metadata.fromPartial({}) @@ -2383,10 +2393,11 @@ export const QueryDenomMetadataByQueryStringResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", value: QueryDenomMetadataByQueryStringResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Metadata.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomMetadataByQueryStringResponse.typeUrl, QueryDenomMetadataByQueryStringResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomMetadataByQueryStringResponse.aminoType, QueryDenomMetadataByQueryStringResponse.typeUrl); function createBaseQueryDenomOwnersRequest(): QueryDenomOwnersRequest { return { denom: "", @@ -2473,10 +2484,11 @@ export const QueryDenomOwnersRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", value: QueryDenomOwnersRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersRequest.typeUrl, QueryDenomOwnersRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersRequest.aminoType, QueryDenomOwnersRequest.typeUrl); function createBaseDenomOwner(): DenomOwner { return { address: "", @@ -2563,10 +2575,11 @@ export const DenomOwner = { typeUrl: "/cosmos.bank.v1beta1.DenomOwner", value: DenomOwner.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DenomOwner.typeUrl, DenomOwner); -GlobalDecoderRegistry.registerAminoProtoMapping(DenomOwner.aminoType, DenomOwner.typeUrl); function createBaseQueryDenomOwnersResponse(): QueryDenomOwnersResponse { return { denomOwners: [], @@ -2655,10 +2668,12 @@ export const QueryDenomOwnersResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", value: QueryDenomOwnersResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersResponse.typeUrl, QueryDenomOwnersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersResponse.aminoType, QueryDenomOwnersResponse.typeUrl); function createBaseQueryDenomOwnersByQueryRequest(): QueryDenomOwnersByQueryRequest { return { denom: "", @@ -2745,10 +2760,11 @@ export const QueryDenomOwnersByQueryRequest = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", value: QueryDenomOwnersByQueryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryRequest.typeUrl, QueryDenomOwnersByQueryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryRequest.aminoType, QueryDenomOwnersByQueryRequest.typeUrl); function createBaseQueryDenomOwnersByQueryResponse(): QueryDenomOwnersByQueryResponse { return { denomOwners: [], @@ -2837,10 +2853,12 @@ export const QueryDenomOwnersByQueryResponse = { typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", value: QueryDenomOwnersByQueryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DenomOwner.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDenomOwnersByQueryResponse.typeUrl, QueryDenomOwnersByQueryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDenomOwnersByQueryResponse.aminoType, QueryDenomOwnersByQueryResponse.typeUrl); function createBaseQuerySendEnabledRequest(): QuerySendEnabledRequest { return { denoms: [], @@ -2929,10 +2947,11 @@ export const QuerySendEnabledRequest = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledRequest", value: QuerySendEnabledRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QuerySendEnabledRequest.typeUrl, QuerySendEnabledRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledRequest.aminoType, QuerySendEnabledRequest.typeUrl); function createBaseQuerySendEnabledResponse(): QuerySendEnabledResponse { return { sendEnabled: [], @@ -3021,7 +3040,9 @@ export const QuerySendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.QuerySendEnabledResponse", value: QuerySendEnabledResponse.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); + PageResponse.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QuerySendEnabledResponse.typeUrl, QuerySendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySendEnabledResponse.aminoType, QuerySendEnabledResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/bank/v1beta1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/bank/v1beta1/tx.rpc.func.ts index fa81e316..e63f91ea 100644 --- a/libs/interchainjs/src/cosmos/bank/v1beta1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/bank/v1beta1/tx.rpc.func.ts @@ -5,23 +5,27 @@ export const createSend = (clientResolver?: SigningClientResolver) => buildTx buildTx({ clientResolver, typeUrl: MsgMultiSend.typeUrl, encoders: toEncoders(MsgMultiSend), - converters: toConverters(MsgMultiSend) + converters: toConverters(MsgMultiSend), + deps: [MsgMultiSend] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createSetSendEnabled = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSetSendEnabled.typeUrl, encoders: toEncoders(MsgSetSendEnabled), - converters: toConverters(MsgSetSendEnabled) + converters: toConverters(MsgSetSendEnabled), + deps: [MsgSetSendEnabled] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/bank/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/bank/v1beta1/tx.ts index afc67365..97a8d819 100644 --- a/libs/interchainjs/src/cosmos/bank/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/bank/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Input, InputAmino, Output, OutputAmino, Params, ParamsAmino, SendEnabled, SendEnabledAmino } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgSend represents a message to send coins from one account to another. */ export interface MsgSend { fromAddress: string; @@ -305,10 +304,11 @@ export const MsgSend = { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSend.typeUrl, MsgSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSend.aminoType, MsgSend.typeUrl); function createBaseMsgSendResponse(): MsgSendResponse { return {}; } @@ -370,10 +370,9 @@ export const MsgSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", value: MsgSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSendResponse.typeUrl, MsgSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSendResponse.aminoType, MsgSendResponse.typeUrl); function createBaseMsgMultiSend(): MsgMultiSend { return { inputs: [], @@ -464,10 +463,12 @@ export const MsgMultiSend = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.encode(message).finish() }; + }, + registerTypeUrl() { + Input.registerTypeUrl(); + Output.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgMultiSend.typeUrl, MsgMultiSend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSend.aminoType, MsgMultiSend.typeUrl); function createBaseMsgMultiSendResponse(): MsgMultiSendResponse { return {}; } @@ -529,10 +530,9 @@ export const MsgMultiSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", value: MsgMultiSendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMultiSendResponse.typeUrl, MsgMultiSendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMultiSendResponse.aminoType, MsgMultiSendResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -619,10 +619,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -684,10 +685,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSetSendEnabled(): MsgSetSendEnabled { return { authority: "", @@ -790,10 +790,11 @@ export const MsgSetSendEnabled = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", value: MsgSetSendEnabled.encode(message).finish() }; + }, + registerTypeUrl() { + SendEnabled.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSetSendEnabled.typeUrl, MsgSetSendEnabled); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabled.aminoType, MsgSetSendEnabled.typeUrl); function createBaseMsgSetSendEnabledResponse(): MsgSetSendEnabledResponse { return {}; } @@ -855,7 +856,6 @@ export const MsgSetSendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", value: MsgSetSendEnabledResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgSetSendEnabledResponse.typeUrl, MsgSetSendEnabledResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetSendEnabledResponse.aminoType, MsgSetSendEnabledResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/base/abci/v1beta1/abci.ts b/libs/interchainjs/src/cosmos/base/abci/v1beta1/abci.ts index 06316ec9..f8346d6a 100644 --- a/libs/interchainjs/src/cosmos/base/abci/v1beta1/abci.ts +++ b/libs/interchainjs/src/cosmos/base/abci/v1beta1/abci.ts @@ -3,7 +3,6 @@ import { Event, EventAmino } from "../../../../tendermint/abci/types"; import { Block, BlockAmino } from "../../../../tendermint/types/block"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * TxResponse defines a structure containing relevant tx data and metadata. The * tags are stringified and the log is JSON decoded. @@ -644,10 +643,11 @@ export const TxResponse = { typeUrl: "/cosmos.base.abci.v1beta1.TxResponse", value: TxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResponse.typeUrl, TxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxResponse.aminoType, TxResponse.typeUrl); function createBaseABCIMessageLog(): ABCIMessageLog { return { msgIndex: 0, @@ -748,10 +748,11 @@ export const ABCIMessageLog = { typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog", value: ABCIMessageLog.encode(message).finish() }; + }, + registerTypeUrl() { + StringEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ABCIMessageLog.typeUrl, ABCIMessageLog); -GlobalDecoderRegistry.registerAminoProtoMapping(ABCIMessageLog.aminoType, ABCIMessageLog.typeUrl); function createBaseStringEvent(): StringEvent { return { type: "", @@ -840,10 +841,11 @@ export const StringEvent = { typeUrl: "/cosmos.base.abci.v1beta1.StringEvent", value: StringEvent.encode(message).finish() }; + }, + registerTypeUrl() { + Attribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(StringEvent.typeUrl, StringEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(StringEvent.aminoType, StringEvent.typeUrl); function createBaseAttribute(): Attribute { return { key: "", @@ -930,10 +932,9 @@ export const Attribute = { typeUrl: "/cosmos.base.abci.v1beta1.Attribute", value: Attribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Attribute.typeUrl, Attribute); -GlobalDecoderRegistry.registerAminoProtoMapping(Attribute.aminoType, Attribute.typeUrl); function createBaseGasInfo(): GasInfo { return { gasWanted: BigInt(0), @@ -1020,10 +1021,9 @@ export const GasInfo = { typeUrl: "/cosmos.base.abci.v1beta1.GasInfo", value: GasInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GasInfo.typeUrl, GasInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GasInfo.aminoType, GasInfo.typeUrl); function createBaseResult(): Result { return { data: new Uint8Array(), @@ -1138,10 +1138,9 @@ export const Result = { typeUrl: "/cosmos.base.abci.v1beta1.Result", value: Result.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Result.typeUrl, Result); -GlobalDecoderRegistry.registerAminoProtoMapping(Result.aminoType, Result.typeUrl); function createBaseSimulationResponse(): SimulationResponse { return { gasInfo: GasInfo.fromPartial({}), @@ -1228,10 +1227,12 @@ export const SimulationResponse = { typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse", value: SimulationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulationResponse.typeUrl, SimulationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulationResponse.aminoType, SimulationResponse.typeUrl); function createBaseMsgData(): MsgData { return { msgType: "", @@ -1318,10 +1319,9 @@ export const MsgData = { typeUrl: "/cosmos.base.abci.v1beta1.MsgData", value: MsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgData.typeUrl, MsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgData.aminoType, MsgData.typeUrl); function createBaseTxMsgData(): TxMsgData { return { data: [], @@ -1412,10 +1412,9 @@ export const TxMsgData = { typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData", value: TxMsgData.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxMsgData.typeUrl, TxMsgData); -GlobalDecoderRegistry.registerAminoProtoMapping(TxMsgData.aminoType, TxMsgData.typeUrl); function createBaseSearchTxsResult(): SearchTxsResult { return { totalCount: BigInt(0), @@ -1552,10 +1551,11 @@ export const SearchTxsResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult", value: SearchTxsResult.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SearchTxsResult.typeUrl, SearchTxsResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchTxsResult.aminoType, SearchTxsResult.typeUrl); function createBaseSearchBlocksResult(): SearchBlocksResult { return { totalCount: BigInt(0), @@ -1692,7 +1692,8 @@ export const SearchBlocksResult = { typeUrl: "/cosmos.base.abci.v1beta1.SearchBlocksResult", value: SearchBlocksResult.encode(message).finish() }; + }, + registerTypeUrl() { + Block.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SearchBlocksResult.typeUrl, SearchBlocksResult); -GlobalDecoderRegistry.registerAminoProtoMapping(SearchBlocksResult.aminoType, SearchBlocksResult.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/base/query/v1beta1/pagination.ts b/libs/interchainjs/src/cosmos/base/query/v1beta1/pagination.ts index 35272ec2..c0f45d3f 100644 --- a/libs/interchainjs/src/cosmos/base/query/v1beta1/pagination.ts +++ b/libs/interchainjs/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * PageRequest is to be embedded in gRPC request messages for efficient * pagination. Ex: @@ -265,10 +264,9 @@ export const PageRequest = { typeUrl: "/cosmos.base.query.v1beta1.PageRequest", value: PageRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PageRequest.typeUrl, PageRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(PageRequest.aminoType, PageRequest.typeUrl); function createBasePageResponse(): PageResponse { return { nextKey: new Uint8Array(), @@ -355,7 +353,6 @@ export const PageResponse = { typeUrl: "/cosmos.base.query.v1beta1.PageResponse", value: PageResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PageResponse.typeUrl, PageResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(PageResponse.aminoType, PageResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/base/v1beta1/coin.ts b/libs/interchainjs/src/cosmos/base/v1beta1/coin.ts index 155e8009..1b5f5906 100644 --- a/libs/interchainjs/src/cosmos/base/v1beta1/coin.ts +++ b/libs/interchainjs/src/cosmos/base/v1beta1/coin.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * Coin defines a token with a denomination and an amount. * @@ -187,10 +186,9 @@ export const Coin = { typeUrl: "/cosmos.base.v1beta1.Coin", value: Coin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Coin.typeUrl, Coin); -GlobalDecoderRegistry.registerAminoProtoMapping(Coin.aminoType, Coin.typeUrl); function createBaseDecCoin(): DecCoin { return { denom: "", @@ -277,10 +275,9 @@ export const DecCoin = { typeUrl: "/cosmos.base.v1beta1.DecCoin", value: DecCoin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecCoin.typeUrl, DecCoin); -GlobalDecoderRegistry.registerAminoProtoMapping(DecCoin.aminoType, DecCoin.typeUrl); function createBaseIntProto(): IntProto { return { int: "" @@ -355,10 +352,9 @@ export const IntProto = { typeUrl: "/cosmos.base.v1beta1.IntProto", value: IntProto.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IntProto.typeUrl, IntProto); -GlobalDecoderRegistry.registerAminoProtoMapping(IntProto.aminoType, IntProto.typeUrl); function createBaseDecProto(): DecProto { return { dec: "" @@ -433,7 +429,6 @@ export const DecProto = { typeUrl: "/cosmos.base.v1beta1.DecProto", value: DecProto.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(DecProto.typeUrl, DecProto); -GlobalDecoderRegistry.registerAminoProtoMapping(DecProto.aminoType, DecProto.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/crypto/ed25519/keys.ts b/libs/interchainjs/src/cosmos/crypto/ed25519/keys.ts index 6f544d77..5b8f8515 100644 --- a/libs/interchainjs/src/cosmos/crypto/ed25519/keys.ts +++ b/libs/interchainjs/src/cosmos/crypto/ed25519/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. * It's needed for Any serialization and SDK compatibility. @@ -125,10 +124,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.ed25519.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -203,7 +201,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.ed25519.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/libs/interchainjs/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 1d46639b..e8a32786 100644 --- a/libs/interchainjs/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/libs/interchainjs/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers @@ -129,10 +128,9 @@ export const MultiSignature = { typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature", value: MultiSignature.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MultiSignature.typeUrl, MultiSignature); -GlobalDecoderRegistry.registerAminoProtoMapping(MultiSignature.aminoType, MultiSignature.typeUrl); function createBaseCompactBitArray(): CompactBitArray { return { extraBitsStored: 0, @@ -219,7 +217,6 @@ export const CompactBitArray = { typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray", value: CompactBitArray.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CompactBitArray.typeUrl, CompactBitArray); -GlobalDecoderRegistry.registerAminoProtoMapping(CompactBitArray.aminoType, CompactBitArray.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/crypto/secp256k1/keys.ts b/libs/interchainjs/src/cosmos/crypto/secp256k1/keys.ts index c0fdd0ac..423d256f 100644 --- a/libs/interchainjs/src/cosmos/crypto/secp256k1/keys.ts +++ b/libs/interchainjs/src/cosmos/crypto/secp256k1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * PubKey defines a secp256k1 public key * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte @@ -119,10 +118,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256k1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { key: new Uint8Array() @@ -197,7 +195,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256k1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/crypto/secp256r1/keys.ts b/libs/interchainjs/src/cosmos/crypto/secp256r1/keys.ts index 6b1edf68..15e905e3 100644 --- a/libs/interchainjs/src/cosmos/crypto/secp256r1/keys.ts +++ b/libs/interchainjs/src/cosmos/crypto/secp256r1/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** PubKey defines a secp256r1 ECDSA public key. */ export interface PubKey { /** @@ -117,10 +116,9 @@ export const PubKey = { typeUrl: "/cosmos.crypto.secp256r1.PubKey", value: PubKey.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl); function createBasePrivKey(): PrivKey { return { secret: new Uint8Array() @@ -195,7 +193,6 @@ export const PrivKey = { typeUrl: "/cosmos.crypto.secp256r1.PrivKey", value: PrivKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey); -GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/distribution/v1beta1/distribution.ts b/libs/interchainjs/src/cosmos/distribution/v1beta1/distribution.ts index fdf747a5..a9de2203 100644 --- a/libs/interchainjs/src/cosmos/distribution/v1beta1/distribution.ts +++ b/libs/interchainjs/src/cosmos/distribution/v1beta1/distribution.ts @@ -458,10 +458,9 @@ export const Params = { typeUrl: "/cosmos.distribution.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards { return { cumulativeRewardRatio: [], @@ -550,10 +549,11 @@ export const ValidatorHistoricalRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", value: ValidatorHistoricalRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorHistoricalRewards.typeUrl, ValidatorHistoricalRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorHistoricalRewards.aminoType, ValidatorHistoricalRewards.typeUrl); function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards { return { rewards: [], @@ -642,10 +642,11 @@ export const ValidatorCurrentRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", value: ValidatorCurrentRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorCurrentRewards.typeUrl, ValidatorCurrentRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorCurrentRewards.aminoType, ValidatorCurrentRewards.typeUrl); function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission { return { commission: [] @@ -722,10 +723,11 @@ export const ValidatorAccumulatedCommission = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", value: ValidatorAccumulatedCommission.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorAccumulatedCommission.typeUrl, ValidatorAccumulatedCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorAccumulatedCommission.aminoType, ValidatorAccumulatedCommission.typeUrl); function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards { return { rewards: [] @@ -802,10 +804,11 @@ export const ValidatorOutstandingRewards = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", value: ValidatorOutstandingRewards.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorOutstandingRewards.typeUrl, ValidatorOutstandingRewards); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorOutstandingRewards.aminoType, ValidatorOutstandingRewards.typeUrl); function createBaseValidatorSlashEvent(): ValidatorSlashEvent { return { validatorPeriod: BigInt(0), @@ -892,10 +895,9 @@ export const ValidatorSlashEvent = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", value: ValidatorSlashEvent.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorSlashEvent.typeUrl, ValidatorSlashEvent); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvent.aminoType, ValidatorSlashEvent.typeUrl); function createBaseValidatorSlashEvents(): ValidatorSlashEvents { return { validatorSlashEvents: [] @@ -972,10 +974,11 @@ export const ValidatorSlashEvents = { typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", value: ValidatorSlashEvents.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorSlashEvent.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSlashEvents.typeUrl, ValidatorSlashEvents); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorSlashEvents.aminoType, ValidatorSlashEvents.typeUrl); function createBaseFeePool(): FeePool { return { communityPool: [] @@ -1052,10 +1055,11 @@ export const FeePool = { typeUrl: "/cosmos.distribution.v1beta1.FeePool", value: FeePool.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeePool.typeUrl, FeePool); -GlobalDecoderRegistry.registerAminoProtoMapping(FeePool.aminoType, FeePool.typeUrl); function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal { return { title: "", @@ -1168,10 +1172,13 @@ export const CommunityPoolSpendProposal = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", value: CommunityPoolSpendProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommunityPoolSpendProposal.typeUrl, CommunityPoolSpendProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposal.aminoType, CommunityPoolSpendProposal.typeUrl); function createBaseDelegatorStartingInfo(): DelegatorStartingInfo { return { previousPeriod: BigInt(0), @@ -1270,10 +1277,9 @@ export const DelegatorStartingInfo = { typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", value: DelegatorStartingInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DelegatorStartingInfo.typeUrl, DelegatorStartingInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegatorStartingInfo.aminoType, DelegatorStartingInfo.typeUrl); function createBaseDelegationDelegatorReward(): DelegationDelegatorReward { return { validatorAddress: "", @@ -1362,10 +1368,11 @@ export const DelegationDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", value: DelegationDelegatorReward.encode(message).finish() }; + }, + registerTypeUrl() { + DecCoin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationDelegatorReward.typeUrl, DelegationDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationDelegatorReward.aminoType, DelegationDelegatorReward.typeUrl); function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit { return { title: "", @@ -1488,7 +1495,9 @@ export const CommunityPoolSpendProposalWithDeposit = { typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", value: CommunityPoolSpendProposalWithDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); + GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); } -}; -GlobalDecoderRegistry.register(CommunityPoolSpendProposalWithDeposit.typeUrl, CommunityPoolSpendProposalWithDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(CommunityPoolSpendProposalWithDeposit.aminoType, CommunityPoolSpendProposalWithDeposit.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts index 0323b14d..28bf1510 100644 --- a/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createSetWithdrawAddress = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgSetWithdrawAddress.typeUrl, encoders: toEncoders(MsgSetWithdrawAddress), - converters: toConverters(MsgSetWithdrawAddress) + converters: toConverters(MsgSetWithdrawAddress), + deps: [MsgSetWithdrawAddress] }); export const createWithdrawDelegatorReward = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawDelegatorReward.typeUrl, encoders: toEncoders(MsgWithdrawDelegatorReward), - converters: toConverters(MsgWithdrawDelegatorReward) + converters: toConverters(MsgWithdrawDelegatorReward), + deps: [MsgWithdrawDelegatorReward] }); export const createWithdrawValidatorCommission = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawValidatorCommission.typeUrl, encoders: toEncoders(MsgWithdrawValidatorCommission), - converters: toConverters(MsgWithdrawValidatorCommission) + converters: toConverters(MsgWithdrawValidatorCommission), + deps: [MsgWithdrawValidatorCommission] }); export const createFundCommunityPool = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgFundCommunityPool.typeUrl, encoders: toEncoders(MsgFundCommunityPool), - converters: toConverters(MsgFundCommunityPool) + converters: toConverters(MsgFundCommunityPool), + deps: [MsgFundCommunityPool] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createCommunityPoolSpend = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCommunityPoolSpend.typeUrl, encoders: toEncoders(MsgCommunityPoolSpend), - converters: toConverters(MsgCommunityPoolSpend) + converters: toConverters(MsgCommunityPoolSpend), + deps: [MsgCommunityPoolSpend] }); export const createDepositValidatorRewardsPool = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDepositValidatorRewardsPool.typeUrl, encoders: toEncoders(MsgDepositValidatorRewardsPool), - converters: toConverters(MsgDepositValidatorRewardsPool) + converters: toConverters(MsgDepositValidatorRewardsPool), + deps: [MsgDepositValidatorRewardsPool] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.ts index 64517d0b..565af23f 100644 --- a/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/distribution/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Params, ParamsAmino } from "./distribution"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). @@ -429,10 +428,9 @@ export const MsgSetWithdrawAddress = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddress.typeUrl, MsgSetWithdrawAddress); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddress.aminoType, MsgSetWithdrawAddress.typeUrl); function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse { return {}; } @@ -494,10 +492,9 @@ export const MsgSetWithdrawAddressResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", value: MsgSetWithdrawAddressResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSetWithdrawAddressResponse.typeUrl, MsgSetWithdrawAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddressResponse.aminoType, MsgSetWithdrawAddressResponse.typeUrl); function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { return { delegatorAddress: "", @@ -584,10 +581,9 @@ export const MsgWithdrawDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorReward.typeUrl, MsgWithdrawDelegatorReward); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorReward.aminoType, MsgWithdrawDelegatorReward.typeUrl); function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse { return { amount: [] @@ -664,10 +660,11 @@ export const MsgWithdrawDelegatorRewardResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", value: MsgWithdrawDelegatorRewardResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawDelegatorRewardResponse.typeUrl, MsgWithdrawDelegatorRewardResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorRewardResponse.aminoType, MsgWithdrawDelegatorRewardResponse.typeUrl); function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { return { validatorAddress: "" @@ -742,10 +739,9 @@ export const MsgWithdrawValidatorCommission = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommission.typeUrl, MsgWithdrawValidatorCommission); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommission.aminoType, MsgWithdrawValidatorCommission.typeUrl); function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse { return { amount: [] @@ -822,10 +818,11 @@ export const MsgWithdrawValidatorCommissionResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", value: MsgWithdrawValidatorCommissionResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgWithdrawValidatorCommissionResponse.typeUrl, MsgWithdrawValidatorCommissionResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommissionResponse.aminoType, MsgWithdrawValidatorCommissionResponse.typeUrl); function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { return { amount: [], @@ -914,10 +911,11 @@ export const MsgFundCommunityPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgFundCommunityPool.typeUrl, MsgFundCommunityPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPool.aminoType, MsgFundCommunityPool.typeUrl); function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse { return {}; } @@ -979,10 +977,9 @@ export const MsgFundCommunityPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", value: MsgFundCommunityPoolResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgFundCommunityPoolResponse.typeUrl, MsgFundCommunityPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPoolResponse.aminoType, MsgFundCommunityPoolResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1069,10 +1066,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1134,10 +1132,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCommunityPoolSpend(): MsgCommunityPoolSpend { return { authority: "", @@ -1238,10 +1235,11 @@ export const MsgCommunityPoolSpend = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", value: MsgCommunityPoolSpend.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpend.typeUrl, MsgCommunityPoolSpend); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpend.aminoType, MsgCommunityPoolSpend.typeUrl); function createBaseMsgCommunityPoolSpendResponse(): MsgCommunityPoolSpendResponse { return {}; } @@ -1303,10 +1301,9 @@ export const MsgCommunityPoolSpendResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", value: MsgCommunityPoolSpendResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCommunityPoolSpendResponse.typeUrl, MsgCommunityPoolSpendResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCommunityPoolSpendResponse.aminoType, MsgCommunityPoolSpendResponse.typeUrl); function createBaseMsgDepositValidatorRewardsPool(): MsgDepositValidatorRewardsPool { return { depositor: "", @@ -1407,10 +1404,11 @@ export const MsgDepositValidatorRewardsPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", value: MsgDepositValidatorRewardsPool.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPool.typeUrl, MsgDepositValidatorRewardsPool); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPool.aminoType, MsgDepositValidatorRewardsPool.typeUrl); function createBaseMsgDepositValidatorRewardsPoolResponse(): MsgDepositValidatorRewardsPoolResponse { return {}; } @@ -1472,7 +1470,6 @@ export const MsgDepositValidatorRewardsPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", value: MsgDepositValidatorRewardsPoolResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositValidatorRewardsPoolResponse.typeUrl, MsgDepositValidatorRewardsPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositValidatorRewardsPoolResponse.aminoType, MsgDepositValidatorRewardsPoolResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts index aa73f97f..344d1149 100644 --- a/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts @@ -5,17 +5,20 @@ export const createGrantAllowance = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgGrantAllowance.typeUrl, encoders: toEncoders(MsgGrantAllowance), - converters: toConverters(MsgGrantAllowance) + converters: toConverters(MsgGrantAllowance), + deps: [MsgGrantAllowance] }); export const createRevokeAllowance = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRevokeAllowance.typeUrl, encoders: toEncoders(MsgRevokeAllowance), - converters: toConverters(MsgRevokeAllowance) + converters: toConverters(MsgRevokeAllowance), + deps: [MsgRevokeAllowance] }); export const createPruneAllowances = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgPruneAllowances.typeUrl, encoders: toEncoders(MsgPruneAllowances), - converters: toConverters(MsgPruneAllowances) + converters: toConverters(MsgPruneAllowances), + deps: [MsgPruneAllowances] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.ts index 9e674784..e5fd3d32 100644 --- a/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial } from "../../../helpers"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance * of fees from the account of Granter. @@ -227,10 +227,9 @@ export const MsgGrantAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowance.typeUrl, MsgGrantAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowance.aminoType, MsgGrantAllowance.typeUrl); function createBaseMsgGrantAllowanceResponse(): MsgGrantAllowanceResponse { return {}; } @@ -292,10 +291,9 @@ export const MsgGrantAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", value: MsgGrantAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgGrantAllowanceResponse.typeUrl, MsgGrantAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantAllowanceResponse.aminoType, MsgGrantAllowanceResponse.typeUrl); function createBaseMsgRevokeAllowance(): MsgRevokeAllowance { return { granter: "", @@ -382,10 +380,9 @@ export const MsgRevokeAllowance = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowance.typeUrl, MsgRevokeAllowance); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowance.aminoType, MsgRevokeAllowance.typeUrl); function createBaseMsgRevokeAllowanceResponse(): MsgRevokeAllowanceResponse { return {}; } @@ -447,10 +444,9 @@ export const MsgRevokeAllowanceResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", value: MsgRevokeAllowanceResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRevokeAllowanceResponse.typeUrl, MsgRevokeAllowanceResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeAllowanceResponse.aminoType, MsgRevokeAllowanceResponse.typeUrl); function createBaseMsgPruneAllowances(): MsgPruneAllowances { return { pruner: "" @@ -525,10 +521,9 @@ export const MsgPruneAllowances = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances", value: MsgPruneAllowances.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAllowances.typeUrl, MsgPruneAllowances); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowances.aminoType, MsgPruneAllowances.typeUrl); function createBaseMsgPruneAllowancesResponse(): MsgPruneAllowancesResponse { return {}; } @@ -590,7 +585,6 @@ export const MsgPruneAllowancesResponse = { typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", value: MsgPruneAllowancesResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAllowancesResponse.typeUrl, MsgPruneAllowancesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAllowancesResponse.aminoType, MsgPruneAllowancesResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1/gov.ts b/libs/interchainjs/src/cosmos/gov/v1/gov.ts index 434920f3..d762a109 100644 --- a/libs/interchainjs/src/cosmos/gov/v1/gov.ts +++ b/libs/interchainjs/src/cosmos/gov/v1/gov.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** VoteOption enumerates the valid vote options for a given governance proposal. */ export enum VoteOption { /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ @@ -719,10 +718,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -823,10 +821,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1073,10 +1072,12 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1187,10 +1188,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1303,10 +1303,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1395,10 +1396,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: undefined @@ -1473,10 +1475,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: "", @@ -1575,10 +1576,9 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1.TallyParams", value: TallyParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); function createBaseParams(): Params { return { minDeposit: [], @@ -1837,7 +1837,8 @@ export const Params = { typeUrl: "/cosmos.gov.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/gov/v1/tx.rpc.func.ts index 0fe35d3a..21c06ac1 100644 --- a/libs/interchainjs/src/cosmos/gov/v1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/gov/v1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createSubmitProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const createExecLegacyContent = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExecLegacyContent.typeUrl, encoders: toEncoders(MsgExecLegacyContent), - converters: toConverters(MsgExecLegacyContent) + converters: toConverters(MsgExecLegacyContent), + deps: [MsgExecLegacyContent] }); export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVote.typeUrl, encoders: toEncoders(MsgVote), - converters: toConverters(MsgVote) + converters: toConverters(MsgVote), + deps: [MsgVote] }); export const createVoteWeighted = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createCancelProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelProposal.typeUrl, encoders: toEncoders(MsgCancelProposal), - converters: toConverters(MsgCancelProposal) + converters: toConverters(MsgCancelProposal), + deps: [MsgCancelProposal] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1/tx.ts b/libs/interchainjs/src/cosmos/gov/v1/tx.ts index d74ae580..37a98573 100644 --- a/libs/interchainjs/src/cosmos/gov/v1/tx.ts +++ b/libs/interchainjs/src/cosmos/gov/v1/tx.ts @@ -539,10 +539,11 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -617,10 +618,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgExecLegacyContent(): MsgExecLegacyContent { return { content: undefined, @@ -707,10 +707,15 @@ export const MsgExecLegacyContent = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", value: MsgExecLegacyContent.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecLegacyContent.typeUrl, MsgExecLegacyContent); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContent.aminoType, MsgExecLegacyContent.typeUrl); function createBaseMsgExecLegacyContentResponse(): MsgExecLegacyContentResponse { return {}; } @@ -772,10 +777,9 @@ export const MsgExecLegacyContentResponse = { typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", value: MsgExecLegacyContentResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecLegacyContentResponse.typeUrl, MsgExecLegacyContentResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecLegacyContentResponse.aminoType, MsgExecLegacyContentResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -886,10 +890,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -951,10 +954,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -1067,10 +1069,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -1132,10 +1135,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -1236,10 +1238,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -1301,10 +1304,9 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1391,10 +1393,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.gov.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1456,10 +1459,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.gov.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgCancelProposal(): MsgCancelProposal { return { proposalId: BigInt(0), @@ -1546,10 +1548,9 @@ export const MsgCancelProposal = { typeUrl: "/cosmos.gov.v1.MsgCancelProposal", value: MsgCancelProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelProposal.typeUrl, MsgCancelProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposal.aminoType, MsgCancelProposal.typeUrl); function createBaseMsgCancelProposalResponse(): MsgCancelProposalResponse { return { proposalId: BigInt(0), @@ -1648,7 +1649,6 @@ export const MsgCancelProposalResponse = { typeUrl: "/cosmos.gov.v1.MsgCancelProposalResponse", value: MsgCancelProposalResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCancelProposalResponse.typeUrl, MsgCancelProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelProposalResponse.aminoType, MsgCancelProposalResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1beta1/gov.ts b/libs/interchainjs/src/cosmos/gov/v1beta1/gov.ts index 1877915d..445e4fc6 100644 --- a/libs/interchainjs/src/cosmos/gov/v1beta1/gov.ts +++ b/libs/interchainjs/src/cosmos/gov/v1beta1/gov.ts @@ -544,10 +544,9 @@ export const WeightedVoteOption = { typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", value: WeightedVoteOption.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption); -GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl); function createBaseTextProposal(): TextProposal { return { title: "", @@ -634,10 +633,12 @@ export const TextProposal = { typeUrl: "/cosmos.gov.v1beta1.TextProposal", value: TextProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); } }; -GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl); function createBaseDeposit(): Deposit { return { proposalId: BigInt(0), @@ -738,10 +739,11 @@ export const Deposit = { typeUrl: "/cosmos.gov.v1beta1.Deposit", value: Deposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit); -GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl); function createBaseProposal(): Proposal { return { proposalId: BigInt(0), @@ -914,10 +916,17 @@ export const Proposal = { typeUrl: "/cosmos.gov.v1beta1.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + TextProposal.registerTypeUrl(); + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + TallyResult.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yes: "", @@ -1028,10 +1037,9 @@ export const TallyResult = { typeUrl: "/cosmos.gov.v1beta1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -1144,10 +1152,11 @@ export const Vote = { typeUrl: "/cosmos.gov.v1beta1.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); function createBaseDepositParams(): DepositParams { return { minDeposit: [], @@ -1236,10 +1245,11 @@ export const DepositParams = { typeUrl: "/cosmos.gov.v1beta1.DepositParams", value: DepositParams.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams); -GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl); function createBaseVotingParams(): VotingParams { return { votingPeriod: Duration.fromPartial({}) @@ -1314,10 +1324,9 @@ export const VotingParams = { typeUrl: "/cosmos.gov.v1beta1.VotingParams", value: VotingParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams); -GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl); function createBaseTallyParams(): TallyParams { return { quorum: new Uint8Array(), @@ -1416,7 +1425,6 @@ export const TallyParams = { typeUrl: "/cosmos.gov.v1beta1.TallyParams", value: TallyParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1beta1/query.rpc.func.ts b/libs/interchainjs/src/cosmos/gov/v1beta1/query.rpc.func.ts index eadeddd8..93896ba8 100644 --- a/libs/interchainjs/src/cosmos/gov/v1beta1/query.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/gov/v1beta1/query.rpc.func.ts @@ -5,54 +5,62 @@ export const createGetProposal = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: QueryProposalsRequest.encode, decode: QueryProposalsResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Proposals", - clientResolver + clientResolver, + deps: [QueryProposalsRequest, QueryProposalsResponse] }); export const createGetVote = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryVoteRequest.encode, decode: QueryVoteResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Vote", - clientResolver + clientResolver, + deps: [QueryVoteRequest, QueryVoteResponse] }); export const createGetVotes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryVotesRequest.encode, decode: QueryVotesResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Votes", - clientResolver + clientResolver, + deps: [QueryVotesRequest, QueryVotesResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetDeposit = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDepositRequest.encode, decode: QueryDepositResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Deposit", - clientResolver + clientResolver, + deps: [QueryDepositRequest, QueryDepositResponse] }); export const createGetDeposits = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDepositsRequest.encode, decode: QueryDepositsResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "Deposits", - clientResolver + clientResolver, + deps: [QueryDepositsRequest, QueryDepositsResponse] }); export const createGetTallyResult = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryTallyResultRequest.encode, decode: QueryTallyResultResponse.decode, service: "cosmos.gov.v1beta1.Query", method: "TallyResult", - clientResolver + clientResolver, + deps: [QueryTallyResultRequest, QueryTallyResultResponse] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1beta1/query.ts b/libs/interchainjs/src/cosmos/gov/v1beta1/query.ts index 15053043..d4419837 100644 --- a/libs/interchainjs/src/cosmos/gov/v1beta1/query.ts +++ b/libs/interchainjs/src/cosmos/gov/v1beta1/query.ts @@ -2,7 +2,6 @@ import { ProposalStatus, Proposal, ProposalAmino, Vote, VoteAmino, VotingParams, import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ export interface QueryProposalRequest { /** proposal_id defines the unique id of the proposal. */ @@ -423,10 +422,9 @@ export const QueryProposalRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", value: QueryProposalRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryProposalRequest.typeUrl, QueryProposalRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalRequest.aminoType, QueryProposalRequest.typeUrl); function createBaseQueryProposalResponse(): QueryProposalResponse { return { proposal: Proposal.fromPartial({}) @@ -501,10 +499,11 @@ export const QueryProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", value: QueryProposalResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalResponse.typeUrl, QueryProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalResponse.aminoType, QueryProposalResponse.typeUrl); function createBaseQueryProposalsRequest(): QueryProposalsRequest { return { proposalStatus: 0, @@ -615,10 +614,11 @@ export const QueryProposalsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", value: QueryProposalsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsRequest.typeUrl, QueryProposalsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsRequest.aminoType, QueryProposalsRequest.typeUrl); function createBaseQueryProposalsResponse(): QueryProposalsResponse { return { proposals: [], @@ -707,10 +707,12 @@ export const QueryProposalsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", value: QueryProposalsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Proposal.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryProposalsResponse.typeUrl, QueryProposalsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryProposalsResponse.aminoType, QueryProposalsResponse.typeUrl); function createBaseQueryVoteRequest(): QueryVoteRequest { return { proposalId: BigInt(0), @@ -797,10 +799,9 @@ export const QueryVoteRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", value: QueryVoteRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryVoteRequest.typeUrl, QueryVoteRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteRequest.aminoType, QueryVoteRequest.typeUrl); function createBaseQueryVoteResponse(): QueryVoteResponse { return { vote: Vote.fromPartial({}) @@ -875,10 +876,11 @@ export const QueryVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", value: QueryVoteResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVoteResponse.typeUrl, QueryVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVoteResponse.aminoType, QueryVoteResponse.typeUrl); function createBaseQueryVotesRequest(): QueryVotesRequest { return { proposalId: BigInt(0), @@ -965,10 +967,11 @@ export const QueryVotesRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", value: QueryVotesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesRequest.typeUrl, QueryVotesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesRequest.aminoType, QueryVotesRequest.typeUrl); function createBaseQueryVotesResponse(): QueryVotesResponse { return { votes: [], @@ -1057,10 +1060,12 @@ export const QueryVotesResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", value: QueryVotesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryVotesResponse.typeUrl, QueryVotesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryVotesResponse.aminoType, QueryVotesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return { paramsType: "" @@ -1135,10 +1140,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { votingParams: VotingParams.fromPartial({}), @@ -1237,10 +1241,13 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + VotingParams.registerTypeUrl(); + DepositParams.registerTypeUrl(); + TallyParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryDepositRequest(): QueryDepositRequest { return { proposalId: BigInt(0), @@ -1327,10 +1334,9 @@ export const QueryDepositRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", value: QueryDepositRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDepositRequest.typeUrl, QueryDepositRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositRequest.aminoType, QueryDepositRequest.typeUrl); function createBaseQueryDepositResponse(): QueryDepositResponse { return { deposit: Deposit.fromPartial({}) @@ -1405,10 +1411,11 @@ export const QueryDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", value: QueryDepositResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositResponse.typeUrl, QueryDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositResponse.aminoType, QueryDepositResponse.typeUrl); function createBaseQueryDepositsRequest(): QueryDepositsRequest { return { proposalId: BigInt(0), @@ -1495,10 +1502,11 @@ export const QueryDepositsRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", value: QueryDepositsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsRequest.typeUrl, QueryDepositsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsRequest.aminoType, QueryDepositsRequest.typeUrl); function createBaseQueryDepositsResponse(): QueryDepositsResponse { return { deposits: [], @@ -1587,10 +1595,12 @@ export const QueryDepositsResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", value: QueryDepositsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Deposit.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDepositsResponse.typeUrl, QueryDepositsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDepositsResponse.aminoType, QueryDepositsResponse.typeUrl); function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { return { proposalId: BigInt(0) @@ -1665,10 +1675,9 @@ export const QueryTallyResultRequest = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", value: QueryTallyResultRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryTallyResultRequest.typeUrl, QueryTallyResultRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultRequest.aminoType, QueryTallyResultRequest.typeUrl); function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { return { tally: TallyResult.fromPartial({}) @@ -1743,7 +1752,8 @@ export const QueryTallyResultResponse = { typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", value: QueryTallyResultResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TallyResult.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryTallyResultResponse.typeUrl, QueryTallyResultResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryTallyResultResponse.aminoType, QueryTallyResultResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1beta1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/gov/v1beta1/tx.rpc.func.ts index 222ecb6c..aecdfcb7 100644 --- a/libs/interchainjs/src/cosmos/gov/v1beta1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/gov/v1beta1/tx.rpc.func.ts @@ -5,23 +5,27 @@ export const createSubmitProposal = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVote.typeUrl, encoders: toEncoders(MsgVote), - converters: toConverters(MsgVote) + converters: toConverters(MsgVote), + deps: [MsgVote] }); export const createVoteWeighted = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVoteWeighted.typeUrl, encoders: toEncoders(MsgVoteWeighted), - converters: toConverters(MsgVoteWeighted) + converters: toConverters(MsgVoteWeighted), + deps: [MsgVoteWeighted] }); export const createDeposit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDeposit.typeUrl, encoders: toEncoders(MsgDeposit), - converters: toConverters(MsgDeposit) + converters: toConverters(MsgDeposit), + deps: [MsgDeposit] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/gov/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/gov/v1beta1/tx.ts index 778766a5..0b6f8c4d 100644 --- a/libs/interchainjs/src/cosmos/gov/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/gov/v1beta1/tx.ts @@ -4,8 +4,8 @@ import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, TextProposal, import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution"; import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, isSet } from "../../../helpers"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary * proposal Content. @@ -289,10 +289,16 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommunityPoolSpendProposal.registerTypeUrl(); + CommunityPoolSpendProposalWithDeposit.registerTypeUrl(); + TextProposal.registerTypeUrl(); + SoftwareUpgradeProposal.registerTypeUrl(); + CancelSoftwareUpgradeProposal.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -367,10 +373,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -469,10 +474,9 @@ export const MsgVote = { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -534,10 +538,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgVoteWeighted(): MsgVoteWeighted { return { proposalId: BigInt(0), @@ -638,10 +641,11 @@ export const MsgVoteWeighted = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.encode(message).finish() }; + }, + registerTypeUrl() { + WeightedVoteOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgVoteWeighted.typeUrl, MsgVoteWeighted); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeighted.aminoType, MsgVoteWeighted.typeUrl); function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { return {}; } @@ -703,10 +707,9 @@ export const MsgVoteWeightedResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", value: MsgVoteWeightedResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteWeightedResponse.typeUrl, MsgVoteWeightedResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteWeightedResponse.aminoType, MsgVoteWeightedResponse.typeUrl); function createBaseMsgDeposit(): MsgDeposit { return { proposalId: BigInt(0), @@ -807,10 +810,11 @@ export const MsgDeposit = { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDeposit.typeUrl, MsgDeposit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDeposit.aminoType, MsgDeposit.typeUrl); function createBaseMsgDepositResponse(): MsgDepositResponse { return {}; } @@ -872,7 +876,6 @@ export const MsgDepositResponse = { typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", value: MsgDepositResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgDepositResponse.typeUrl, MsgDepositResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDepositResponse.aminoType, MsgDepositResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/group/v1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/group/v1/tx.rpc.func.ts index 28648bdd..b04f9190 100644 --- a/libs/interchainjs/src/cosmos/group/v1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/group/v1/tx.rpc.func.ts @@ -5,83 +5,97 @@ export const createCreateGroup = (clientResolver?: SigningClientResolver) => bui clientResolver, typeUrl: MsgCreateGroup.typeUrl, encoders: toEncoders(MsgCreateGroup), - converters: toConverters(MsgCreateGroup) + converters: toConverters(MsgCreateGroup), + deps: [MsgCreateGroup] }); export const createUpdateGroupMembers = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupMembers.typeUrl, encoders: toEncoders(MsgUpdateGroupMembers), - converters: toConverters(MsgUpdateGroupMembers) + converters: toConverters(MsgUpdateGroupMembers), + deps: [MsgUpdateGroupMembers] }); export const createUpdateGroupAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupAdmin), - converters: toConverters(MsgUpdateGroupAdmin) + converters: toConverters(MsgUpdateGroupAdmin), + deps: [MsgUpdateGroupAdmin] }); export const createUpdateGroupMetadata = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupMetadata), - converters: toConverters(MsgUpdateGroupMetadata) + converters: toConverters(MsgUpdateGroupMetadata), + deps: [MsgUpdateGroupMetadata] }); export const createCreateGroupPolicy = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateGroupPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupPolicy), - converters: toConverters(MsgCreateGroupPolicy) + converters: toConverters(MsgCreateGroupPolicy), + deps: [MsgCreateGroupPolicy] }); export const createCreateGroupWithPolicy = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreateGroupWithPolicy.typeUrl, encoders: toEncoders(MsgCreateGroupWithPolicy), - converters: toConverters(MsgCreateGroupWithPolicy) + converters: toConverters(MsgCreateGroupWithPolicy), + deps: [MsgCreateGroupWithPolicy] }); export const createUpdateGroupPolicyAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupPolicyAdmin.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyAdmin), - converters: toConverters(MsgUpdateGroupPolicyAdmin) + converters: toConverters(MsgUpdateGroupPolicyAdmin), + deps: [MsgUpdateGroupPolicyAdmin] }); export const createUpdateGroupPolicyDecisionPolicy = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupPolicyDecisionPolicy.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyDecisionPolicy), - converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy) + converters: toConverters(MsgUpdateGroupPolicyDecisionPolicy), + deps: [MsgUpdateGroupPolicyDecisionPolicy] }); export const createUpdateGroupPolicyMetadata = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateGroupPolicyMetadata.typeUrl, encoders: toEncoders(MsgUpdateGroupPolicyMetadata), - converters: toConverters(MsgUpdateGroupPolicyMetadata) + converters: toConverters(MsgUpdateGroupPolicyMetadata), + deps: [MsgUpdateGroupPolicyMetadata] }); export const createSubmitProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitProposal.typeUrl, encoders: toEncoders(MsgSubmitProposal), - converters: toConverters(MsgSubmitProposal) + converters: toConverters(MsgSubmitProposal), + deps: [MsgSubmitProposal] }); export const createWithdrawProposal = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgWithdrawProposal.typeUrl, encoders: toEncoders(MsgWithdrawProposal), - converters: toConverters(MsgWithdrawProposal) + converters: toConverters(MsgWithdrawProposal), + deps: [MsgWithdrawProposal] }); export const createVote = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgVote.typeUrl, encoders: toEncoders(MsgVote), - converters: toConverters(MsgVote) + converters: toConverters(MsgVote), + deps: [MsgVote] }); export const createExec = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExec.typeUrl, encoders: toEncoders(MsgExec), - converters: toConverters(MsgExec) + converters: toConverters(MsgExec), + deps: [MsgExec] }); export const createLeaveGroup = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgLeaveGroup.typeUrl, encoders: toEncoders(MsgLeaveGroup), - converters: toConverters(MsgLeaveGroup) + converters: toConverters(MsgLeaveGroup), + deps: [MsgLeaveGroup] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/group/v1/tx.ts b/libs/interchainjs/src/cosmos/group/v1/tx.ts index 492b0084..a2e3714f 100644 --- a/libs/interchainjs/src/cosmos/group/v1/tx.ts +++ b/libs/interchainjs/src/cosmos/group/v1/tx.ts @@ -796,10 +796,11 @@ export const MsgCreateGroup = { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroup.typeUrl, MsgCreateGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroup.aminoType, MsgCreateGroup.typeUrl); function createBaseMsgCreateGroupResponse(): MsgCreateGroupResponse { return { groupId: BigInt(0) @@ -874,10 +875,9 @@ export const MsgCreateGroupResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", value: MsgCreateGroupResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupResponse.typeUrl, MsgCreateGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupResponse.aminoType, MsgCreateGroupResponse.typeUrl); function createBaseMsgUpdateGroupMembers(): MsgUpdateGroupMembers { return { admin: "", @@ -978,10 +978,11 @@ export const MsgUpdateGroupMembers = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.encode(message).finish() }; + }, + registerTypeUrl() { + MemberRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembers.typeUrl, MsgUpdateGroupMembers); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembers.aminoType, MsgUpdateGroupMembers.typeUrl); function createBaseMsgUpdateGroupMembersResponse(): MsgUpdateGroupMembersResponse { return {}; } @@ -1043,10 +1044,9 @@ export const MsgUpdateGroupMembersResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", value: MsgUpdateGroupMembersResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMembersResponse.typeUrl, MsgUpdateGroupMembersResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMembersResponse.aminoType, MsgUpdateGroupMembersResponse.typeUrl); function createBaseMsgUpdateGroupAdmin(): MsgUpdateGroupAdmin { return { admin: "", @@ -1145,10 +1145,9 @@ export const MsgUpdateGroupAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdmin.typeUrl, MsgUpdateGroupAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdmin.aminoType, MsgUpdateGroupAdmin.typeUrl); function createBaseMsgUpdateGroupAdminResponse(): MsgUpdateGroupAdminResponse { return {}; } @@ -1210,10 +1209,9 @@ export const MsgUpdateGroupAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", value: MsgUpdateGroupAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupAdminResponse.typeUrl, MsgUpdateGroupAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupAdminResponse.aminoType, MsgUpdateGroupAdminResponse.typeUrl); function createBaseMsgUpdateGroupMetadata(): MsgUpdateGroupMetadata { return { admin: "", @@ -1312,10 +1310,9 @@ export const MsgUpdateGroupMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadata.typeUrl, MsgUpdateGroupMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadata.aminoType, MsgUpdateGroupMetadata.typeUrl); function createBaseMsgUpdateGroupMetadataResponse(): MsgUpdateGroupMetadataResponse { return {}; } @@ -1377,10 +1374,9 @@ export const MsgUpdateGroupMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", value: MsgUpdateGroupMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupMetadataResponse.typeUrl, MsgUpdateGroupMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupMetadataResponse.aminoType, MsgUpdateGroupMetadataResponse.typeUrl); function createBaseMsgCreateGroupPolicy(): MsgCreateGroupPolicy { return { admin: "", @@ -1491,10 +1487,12 @@ export const MsgCreateGroupPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicy.typeUrl, MsgCreateGroupPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicy.aminoType, MsgCreateGroupPolicy.typeUrl); function createBaseMsgCreateGroupPolicyResponse(): MsgCreateGroupPolicyResponse { return { address: "" @@ -1569,10 +1567,9 @@ export const MsgCreateGroupPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", value: MsgCreateGroupPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupPolicyResponse.typeUrl, MsgCreateGroupPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupPolicyResponse.aminoType, MsgCreateGroupPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyAdmin(): MsgUpdateGroupPolicyAdmin { return { admin: "", @@ -1671,10 +1668,9 @@ export const MsgUpdateGroupPolicyAdmin = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdmin.typeUrl, MsgUpdateGroupPolicyAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdmin.aminoType, MsgUpdateGroupPolicyAdmin.typeUrl); function createBaseMsgUpdateGroupPolicyAdminResponse(): MsgUpdateGroupPolicyAdminResponse { return {}; } @@ -1736,10 +1732,9 @@ export const MsgUpdateGroupPolicyAdminResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", value: MsgUpdateGroupPolicyAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyAdminResponse.typeUrl, MsgUpdateGroupPolicyAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyAdminResponse.aminoType, MsgUpdateGroupPolicyAdminResponse.typeUrl); function createBaseMsgCreateGroupWithPolicy(): MsgCreateGroupWithPolicy { return { admin: "", @@ -1876,10 +1871,12 @@ export const MsgCreateGroupWithPolicy = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicy.typeUrl, MsgCreateGroupWithPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicy.aminoType, MsgCreateGroupWithPolicy.typeUrl); function createBaseMsgCreateGroupWithPolicyResponse(): MsgCreateGroupWithPolicyResponse { return { groupId: BigInt(0), @@ -1966,10 +1963,9 @@ export const MsgCreateGroupWithPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", value: MsgCreateGroupWithPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateGroupWithPolicyResponse.typeUrl, MsgCreateGroupWithPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateGroupWithPolicyResponse.aminoType, MsgCreateGroupWithPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicy(): MsgUpdateGroupPolicyDecisionPolicy { return { admin: "", @@ -2068,10 +2064,12 @@ export const MsgUpdateGroupPolicyDecisionPolicy = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicy.typeUrl, MsgUpdateGroupPolicyDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicy.aminoType, MsgUpdateGroupPolicyDecisionPolicy.typeUrl); function createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(): MsgUpdateGroupPolicyDecisionPolicyResponse { return {}; } @@ -2133,10 +2131,9 @@ export const MsgUpdateGroupPolicyDecisionPolicyResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", value: MsgUpdateGroupPolicyDecisionPolicyResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl, MsgUpdateGroupPolicyDecisionPolicyResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyDecisionPolicyResponse.aminoType, MsgUpdateGroupPolicyDecisionPolicyResponse.typeUrl); function createBaseMsgUpdateGroupPolicyMetadata(): MsgUpdateGroupPolicyMetadata { return { admin: "", @@ -2235,10 +2232,9 @@ export const MsgUpdateGroupPolicyMetadata = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadata.typeUrl, MsgUpdateGroupPolicyMetadata); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadata.aminoType, MsgUpdateGroupPolicyMetadata.typeUrl); function createBaseMsgUpdateGroupPolicyMetadataResponse(): MsgUpdateGroupPolicyMetadataResponse { return {}; } @@ -2300,10 +2296,9 @@ export const MsgUpdateGroupPolicyMetadataResponse = { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", value: MsgUpdateGroupPolicyMetadataResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateGroupPolicyMetadataResponse.typeUrl, MsgUpdateGroupPolicyMetadataResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateGroupPolicyMetadataResponse.aminoType, MsgUpdateGroupPolicyMetadataResponse.typeUrl); function createBaseMsgSubmitProposal(): MsgSubmitProposal { return { groupPolicyAddress: "", @@ -2454,10 +2449,9 @@ export const MsgSubmitProposal = { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposal.typeUrl, MsgSubmitProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposal.aminoType, MsgSubmitProposal.typeUrl); function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { return { proposalId: BigInt(0) @@ -2532,10 +2526,9 @@ export const MsgSubmitProposalResponse = { typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", value: MsgSubmitProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitProposalResponse.typeUrl, MsgSubmitProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitProposalResponse.aminoType, MsgSubmitProposalResponse.typeUrl); function createBaseMsgWithdrawProposal(): MsgWithdrawProposal { return { proposalId: BigInt(0), @@ -2622,10 +2615,9 @@ export const MsgWithdrawProposal = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposal.typeUrl, MsgWithdrawProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposal.aminoType, MsgWithdrawProposal.typeUrl); function createBaseMsgWithdrawProposalResponse(): MsgWithdrawProposalResponse { return {}; } @@ -2687,10 +2679,9 @@ export const MsgWithdrawProposalResponse = { typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", value: MsgWithdrawProposalResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgWithdrawProposalResponse.typeUrl, MsgWithdrawProposalResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawProposalResponse.aminoType, MsgWithdrawProposalResponse.typeUrl); function createBaseMsgVote(): MsgVote { return { proposalId: BigInt(0), @@ -2813,10 +2804,9 @@ export const MsgVote = { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVote.typeUrl, MsgVote); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVote.aminoType, MsgVote.typeUrl); function createBaseMsgVoteResponse(): MsgVoteResponse { return {}; } @@ -2878,10 +2868,9 @@ export const MsgVoteResponse = { typeUrl: "/cosmos.group.v1.MsgVoteResponse", value: MsgVoteResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgVoteResponse.typeUrl, MsgVoteResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgVoteResponse.aminoType, MsgVoteResponse.typeUrl); function createBaseMsgExec(): MsgExec { return { proposalId: BigInt(0), @@ -2968,10 +2957,9 @@ export const MsgExec = { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl); function createBaseMsgExecResponse(): MsgExecResponse { return { result: 0 @@ -3046,10 +3034,9 @@ export const MsgExecResponse = { typeUrl: "/cosmos.group.v1.MsgExecResponse", value: MsgExecResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl); function createBaseMsgLeaveGroup(): MsgLeaveGroup { return { address: "", @@ -3136,10 +3123,9 @@ export const MsgLeaveGroup = { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgLeaveGroup.typeUrl, MsgLeaveGroup); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroup.aminoType, MsgLeaveGroup.typeUrl); function createBaseMsgLeaveGroupResponse(): MsgLeaveGroupResponse { return {}; } @@ -3201,7 +3187,6 @@ export const MsgLeaveGroupResponse = { typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", value: MsgLeaveGroupResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgLeaveGroupResponse.typeUrl, MsgLeaveGroupResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgLeaveGroupResponse.aminoType, MsgLeaveGroupResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/group/v1/types.ts b/libs/interchainjs/src/cosmos/group/v1/types.ts index f8e9c860..802939a6 100644 --- a/libs/interchainjs/src/cosmos/group/v1/types.ts +++ b/libs/interchainjs/src/cosmos/group/v1/types.ts @@ -847,10 +847,9 @@ export const Member = { typeUrl: "/cosmos.group.v1.Member", value: Member.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Member.typeUrl, Member); -GlobalDecoderRegistry.registerAminoProtoMapping(Member.aminoType, Member.typeUrl); function createBaseMemberRequest(): MemberRequest { return { address: "", @@ -949,10 +948,9 @@ export const MemberRequest = { typeUrl: "/cosmos.group.v1.MemberRequest", value: MemberRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MemberRequest.typeUrl, MemberRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(MemberRequest.aminoType, MemberRequest.typeUrl); function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy { return { threshold: "", @@ -1039,10 +1037,13 @@ export const ThresholdDecisionPolicy = { typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", value: ThresholdDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ThresholdDecisionPolicy.typeUrl, ThresholdDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(ThresholdDecisionPolicy.aminoType, ThresholdDecisionPolicy.typeUrl); function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy { return { percentage: "", @@ -1129,10 +1130,13 @@ export const PercentageDecisionPolicy = { typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", value: PercentageDecisionPolicy.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); + GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); + DecisionPolicyWindows.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PercentageDecisionPolicy.typeUrl, PercentageDecisionPolicy); -GlobalDecoderRegistry.registerAminoProtoMapping(PercentageDecisionPolicy.aminoType, PercentageDecisionPolicy.typeUrl); function createBaseDecisionPolicyWindows(): DecisionPolicyWindows { return { votingPeriod: Duration.fromPartial({}), @@ -1219,10 +1223,9 @@ export const DecisionPolicyWindows = { typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", value: DecisionPolicyWindows.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DecisionPolicyWindows.typeUrl, DecisionPolicyWindows); -GlobalDecoderRegistry.registerAminoProtoMapping(DecisionPolicyWindows.aminoType, DecisionPolicyWindows.typeUrl); function createBaseGroupInfo(): GroupInfo { return { id: BigInt(0), @@ -1357,10 +1360,9 @@ export const GroupInfo = { typeUrl: "/cosmos.group.v1.GroupInfo", value: GroupInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GroupInfo.typeUrl, GroupInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupInfo.aminoType, GroupInfo.typeUrl); function createBaseGroupMember(): GroupMember { return { groupId: BigInt(0), @@ -1447,10 +1449,11 @@ export const GroupMember = { typeUrl: "/cosmos.group.v1.GroupMember", value: GroupMember.encode(message).finish() }; + }, + registerTypeUrl() { + Member.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupMember.typeUrl, GroupMember); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupMember.aminoType, GroupMember.typeUrl); function createBaseGroupPolicyInfo(): GroupPolicyInfo { return { address: "", @@ -1597,10 +1600,12 @@ export const GroupPolicyInfo = { typeUrl: "/cosmos.group.v1.GroupPolicyInfo", value: GroupPolicyInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ThresholdDecisionPolicy.registerTypeUrl(); + PercentageDecisionPolicy.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GroupPolicyInfo.typeUrl, GroupPolicyInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(GroupPolicyInfo.aminoType, GroupPolicyInfo.typeUrl); function createBaseProposal(): Proposal { return { id: BigInt(0), @@ -1835,10 +1840,9 @@ export const Proposal = { typeUrl: "/cosmos.group.v1.Proposal", value: Proposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); -GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl); function createBaseTallyResult(): TallyResult { return { yesCount: "", @@ -1949,10 +1953,9 @@ export const TallyResult = { typeUrl: "/cosmos.group.v1.TallyResult", value: TallyResult.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult); -GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl); function createBaseVote(): Vote { return { proposalId: BigInt(0), @@ -2075,7 +2078,6 @@ export const Vote = { typeUrl: "/cosmos.group.v1.Vote", value: Vote.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); -GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/ics23/v1/proofs.ts b/libs/interchainjs/src/cosmos/ics23/v1/proofs.ts index 27759bde..b02054e7 100644 --- a/libs/interchainjs/src/cosmos/ics23/v1/proofs.ts +++ b/libs/interchainjs/src/cosmos/ics23/v1/proofs.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; export enum HashOp { /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ NO_HASH = 0, @@ -754,10 +753,12 @@ export const ExistenceProof = { typeUrl: "/cosmos.ics23.v1.ExistenceProof", value: ExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExistenceProof.typeUrl, ExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(ExistenceProof.aminoType, ExistenceProof.typeUrl); function createBaseNonExistenceProof(): NonExistenceProof { return { key: new Uint8Array(), @@ -856,10 +857,11 @@ export const NonExistenceProof = { typeUrl: "/cosmos.ics23.v1.NonExistenceProof", value: NonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(NonExistenceProof.typeUrl, NonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(NonExistenceProof.aminoType, NonExistenceProof.typeUrl); function createBaseCommitmentProof(): CommitmentProof { return { exist: undefined, @@ -970,10 +972,14 @@ export const CommitmentProof = { typeUrl: "/cosmos.ics23.v1.CommitmentProof", value: CommitmentProof.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); + BatchProof.registerTypeUrl(); + CompressedBatchProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitmentProof.typeUrl, CommitmentProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CommitmentProof.aminoType, CommitmentProof.typeUrl); function createBaseLeafOp(): LeafOp { return { hash: 0, @@ -1096,10 +1102,9 @@ export const LeafOp = { typeUrl: "/cosmos.ics23.v1.LeafOp", value: LeafOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(LeafOp.typeUrl, LeafOp); -GlobalDecoderRegistry.registerAminoProtoMapping(LeafOp.aminoType, LeafOp.typeUrl); function createBaseInnerOp(): InnerOp { return { hash: 0, @@ -1198,10 +1203,9 @@ export const InnerOp = { typeUrl: "/cosmos.ics23.v1.InnerOp", value: InnerOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerOp.typeUrl, InnerOp); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerOp.aminoType, InnerOp.typeUrl); function createBaseProofSpec(): ProofSpec { return { leafSpec: undefined, @@ -1324,10 +1328,12 @@ export const ProofSpec = { typeUrl: "/cosmos.ics23.v1.ProofSpec", value: ProofSpec.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); + InnerSpec.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ProofSpec.typeUrl, ProofSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(ProofSpec.aminoType, ProofSpec.typeUrl); function createBaseInnerSpec(): InnerSpec { return { childOrder: [], @@ -1473,10 +1479,9 @@ export const InnerSpec = { typeUrl: "/cosmos.ics23.v1.InnerSpec", value: InnerSpec.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InnerSpec.typeUrl, InnerSpec); -GlobalDecoderRegistry.registerAminoProtoMapping(InnerSpec.aminoType, InnerSpec.typeUrl); function createBaseBatchProof(): BatchProof { return { entries: [] @@ -1553,10 +1558,11 @@ export const BatchProof = { typeUrl: "/cosmos.ics23.v1.BatchProof", value: BatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + BatchEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchProof.typeUrl, BatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchProof.aminoType, BatchProof.typeUrl); function createBaseBatchEntry(): BatchEntry { return { exist: undefined, @@ -1643,10 +1649,12 @@ export const BatchEntry = { typeUrl: "/cosmos.ics23.v1.BatchEntry", value: BatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + ExistenceProof.registerTypeUrl(); + NonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BatchEntry.typeUrl, BatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(BatchEntry.aminoType, BatchEntry.typeUrl); function createBaseCompressedBatchProof(): CompressedBatchProof { return { entries: [], @@ -1737,10 +1745,12 @@ export const CompressedBatchProof = { typeUrl: "/cosmos.ics23.v1.CompressedBatchProof", value: CompressedBatchProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedBatchEntry.registerTypeUrl(); + InnerOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchProof.typeUrl, CompressedBatchProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchProof.aminoType, CompressedBatchProof.typeUrl); function createBaseCompressedBatchEntry(): CompressedBatchEntry { return { exist: undefined, @@ -1827,10 +1837,12 @@ export const CompressedBatchEntry = { typeUrl: "/cosmos.ics23.v1.CompressedBatchEntry", value: CompressedBatchEntry.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); + CompressedNonExistenceProof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedBatchEntry.typeUrl, CompressedBatchEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedBatchEntry.aminoType, CompressedBatchEntry.typeUrl); function createBaseCompressedExistenceProof(): CompressedExistenceProof { return { key: new Uint8Array(), @@ -1952,10 +1964,11 @@ export const CompressedExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedExistenceProof", value: CompressedExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + LeafOp.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CompressedExistenceProof.typeUrl, CompressedExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedExistenceProof.aminoType, CompressedExistenceProof.typeUrl); function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { return { key: new Uint8Array(), @@ -2054,7 +2067,8 @@ export const CompressedNonExistenceProof = { typeUrl: "/cosmos.ics23.v1.CompressedNonExistenceProof", value: CompressedNonExistenceProof.encode(message).finish() }; + }, + registerTypeUrl() { + CompressedExistenceProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(CompressedNonExistenceProof.typeUrl, CompressedNonExistenceProof); -GlobalDecoderRegistry.registerAminoProtoMapping(CompressedNonExistenceProof.aminoType, CompressedNonExistenceProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/staking/v1beta1/authz.ts b/libs/interchainjs/src/cosmos/staking/v1beta1/authz.ts new file mode 100644 index 00000000..ecc893bd --- /dev/null +++ b/libs/interchainjs/src/cosmos/staking/v1beta1/authz.ts @@ -0,0 +1,326 @@ +import { Coin, CoinAmino } from "../../base/v1beta1/coin"; +import { isSet, DeepPartial } from "../../../helpers"; +import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; +/** + * AuthorizationType defines the type of staking module authorization type + * + * Since: cosmos-sdk 0.43 + */ +export enum AuthorizationType { + /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ + AUTHORIZATION_TYPE_UNSPECIFIED = 0, + /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ + AUTHORIZATION_TYPE_DELEGATE = 1, + /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ + AUTHORIZATION_TYPE_UNDELEGATE = 2, + /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ + AUTHORIZATION_TYPE_REDELEGATE = 3, + /** AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION - AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation */ + AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION = 4, + UNRECOGNIZED = -1, +} +export const AuthorizationTypeAmino = AuthorizationType; +export function authorizationTypeFromJSON(object: any): AuthorizationType { + switch (object) { + case 0: + case "AUTHORIZATION_TYPE_UNSPECIFIED": + return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED; + case 1: + case "AUTHORIZATION_TYPE_DELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE; + case 2: + case "AUTHORIZATION_TYPE_UNDELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE; + case 3: + case "AUTHORIZATION_TYPE_REDELEGATE": + return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE; + case 4: + case "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION": + return AuthorizationType.AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION; + case -1: + case "UNRECOGNIZED": + default: + return AuthorizationType.UNRECOGNIZED; + } +} +export function authorizationTypeToJSON(object: AuthorizationType): string { + switch (object) { + case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED: + return "AUTHORIZATION_TYPE_UNSPECIFIED"; + case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE: + return "AUTHORIZATION_TYPE_DELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE: + return "AUTHORIZATION_TYPE_UNDELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: + return "AUTHORIZATION_TYPE_REDELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION: + return "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION"; + case AuthorizationType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +/** + * StakeAuthorization defines authorization for delegate/undelegate/redelegate. + * + * Since: cosmos-sdk 0.43 + */ +export interface StakeAuthorization { + /** + * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + * empty, there is no spend limit and any amount of coins can be delegated. + */ + maxTokens?: Coin; + /** + * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + * account. + */ + allowList?: StakeAuthorization_Validators; + /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ + denyList?: StakeAuthorization_Validators; + /** authorization_type defines one of AuthorizationType. */ + authorizationType: AuthorizationType; +} +export interface StakeAuthorizationProtoMsg { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization"; + value: Uint8Array; +} +/** + * StakeAuthorization defines authorization for delegate/undelegate/redelegate. + * + * Since: cosmos-sdk 0.43 + */ +export interface StakeAuthorizationAmino { + /** + * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + * empty, there is no spend limit and any amount of coins can be delegated. + */ + max_tokens?: CoinAmino; + /** + * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + * account. + */ + allow_list?: StakeAuthorization_ValidatorsAmino; + /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ + deny_list?: StakeAuthorization_ValidatorsAmino; + /** authorization_type defines one of AuthorizationType. */ + authorization_type: AuthorizationType; +} +export interface StakeAuthorizationAminoMsg { + type: "cosmos-sdk/StakeAuthorization"; + value: StakeAuthorizationAmino; +} +/** Validators defines list of validator addresses. */ +export interface StakeAuthorization_Validators { + address: string[]; +} +export interface StakeAuthorization_ValidatorsProtoMsg { + typeUrl: "/cosmos.staking.v1beta1.Validators"; + value: Uint8Array; +} +/** Validators defines list of validator addresses. */ +export interface StakeAuthorization_ValidatorsAmino { + address: string[]; +} +export interface StakeAuthorization_ValidatorsAminoMsg { + type: "cosmos-sdk/Validators"; + value: StakeAuthorization_ValidatorsAmino; +} +function createBaseStakeAuthorization(): StakeAuthorization { + return { + maxTokens: undefined, + allowList: undefined, + denyList: undefined, + authorizationType: 0 + }; +} +export const StakeAuthorization = { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", + aminoType: "cosmos-sdk/StakeAuthorization", + is(o: any): o is StakeAuthorization { + return o && (o.$typeUrl === StakeAuthorization.typeUrl || isSet(o.authorizationType)); + }, + isAmino(o: any): o is StakeAuthorizationAmino { + return o && (o.$typeUrl === StakeAuthorization.typeUrl || isSet(o.authorization_type)); + }, + encode(message: StakeAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + if (message.maxTokens !== undefined) { + Coin.encode(message.maxTokens, writer.uint32(10).fork()).ldelim(); + } + if (message.allowList !== undefined) { + StakeAuthorization_Validators.encode(message.allowList, writer.uint32(18).fork()).ldelim(); + } + if (message.denyList !== undefined) { + StakeAuthorization_Validators.encode(message.denyList, writer.uint32(26).fork()).ldelim(); + } + if (message.authorizationType !== 0) { + writer.uint32(32).int32(message.authorizationType); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStakeAuthorization(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxTokens = Coin.decode(reader, reader.uint32()); + break; + case 2: + message.allowList = StakeAuthorization_Validators.decode(reader, reader.uint32()); + break; + case 3: + message.denyList = StakeAuthorization_Validators.decode(reader, reader.uint32()); + break; + case 4: + message.authorizationType = (reader.int32() as any); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StakeAuthorization { + const message = createBaseStakeAuthorization(); + message.maxTokens = object.maxTokens !== undefined && object.maxTokens !== null ? Coin.fromPartial(object.maxTokens) : undefined; + message.allowList = object.allowList !== undefined && object.allowList !== null ? StakeAuthorization_Validators.fromPartial(object.allowList) : undefined; + message.denyList = object.denyList !== undefined && object.denyList !== null ? StakeAuthorization_Validators.fromPartial(object.denyList) : undefined; + message.authorizationType = object.authorizationType ?? 0; + return message; + }, + fromAmino(object: StakeAuthorizationAmino): StakeAuthorization { + const message = createBaseStakeAuthorization(); + if (object.max_tokens !== undefined && object.max_tokens !== null) { + message.maxTokens = Coin.fromAmino(object.max_tokens); + } + if (object.allow_list !== undefined && object.allow_list !== null) { + message.allowList = StakeAuthorization_Validators.fromAmino(object.allow_list); + } + if (object.deny_list !== undefined && object.deny_list !== null) { + message.denyList = StakeAuthorization_Validators.fromAmino(object.deny_list); + } + if (object.authorization_type !== undefined && object.authorization_type !== null) { + message.authorizationType = object.authorization_type; + } + return message; + }, + toAmino(message: StakeAuthorization): StakeAuthorizationAmino { + const obj: any = {}; + obj.max_tokens = message.maxTokens ? Coin.toAmino(message.maxTokens) : undefined; + obj.allow_list = message.allowList ? StakeAuthorization_Validators.toAmino(message.allowList) : undefined; + obj.deny_list = message.denyList ? StakeAuthorization_Validators.toAmino(message.denyList) : undefined; + obj.authorization_type = message.authorizationType === 0 ? undefined : message.authorizationType; + return obj; + }, + fromAminoMsg(object: StakeAuthorizationAminoMsg): StakeAuthorization { + return StakeAuthorization.fromAmino(object.value); + }, + toAminoMsg(message: StakeAuthorization): StakeAuthorizationAminoMsg { + return { + type: "cosmos-sdk/StakeAuthorization", + value: StakeAuthorization.toAmino(message) + }; + }, + fromProtoMsg(message: StakeAuthorizationProtoMsg): StakeAuthorization { + return StakeAuthorization.decode(message.value); + }, + toProto(message: StakeAuthorization): Uint8Array { + return StakeAuthorization.encode(message).finish(); + }, + toProtoMsg(message: StakeAuthorization): StakeAuthorizationProtoMsg { + return { + typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", + value: StakeAuthorization.encode(message).finish() + }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(StakeAuthorization.typeUrl, StakeAuthorization); + GlobalDecoderRegistry.registerAminoProtoMapping(StakeAuthorization.aminoType, StakeAuthorization.typeUrl); + Coin.registerTypeUrl(); + StakeAuthorization_Validators.registerTypeUrl(); + } +}; +function createBaseStakeAuthorization_Validators(): StakeAuthorization_Validators { + return { + address: [] + }; +} +export const StakeAuthorization_Validators = { + typeUrl: "/cosmos.staking.v1beta1.Validators", + aminoType: "cosmos-sdk/Validators", + is(o: any): o is StakeAuthorization_Validators { + return o && (o.$typeUrl === StakeAuthorization_Validators.typeUrl || Array.isArray(o.address) && (!o.address.length || typeof o.address[0] === "string")); + }, + isAmino(o: any): o is StakeAuthorization_ValidatorsAmino { + return o && (o.$typeUrl === StakeAuthorization_Validators.typeUrl || Array.isArray(o.address) && (!o.address.length || typeof o.address[0] === "string")); + }, + encode(message: StakeAuthorization_Validators, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { + for (const v of message.address) { + writer.uint32(10).string(v!); + } + return writer; + }, + decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization_Validators { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStakeAuthorization_Validators(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromPartial(object: DeepPartial): StakeAuthorization_Validators { + const message = createBaseStakeAuthorization_Validators(); + message.address = object.address?.map(e => e) || []; + return message; + }, + fromAmino(object: StakeAuthorization_ValidatorsAmino): StakeAuthorization_Validators { + const message = createBaseStakeAuthorization_Validators(); + message.address = object.address?.map(e => e) || []; + return message; + }, + toAmino(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAmino { + const obj: any = {}; + if (message.address) { + obj.address = message.address.map(e => e); + } else { + obj.address = message.address; + } + return obj; + }, + fromAminoMsg(object: StakeAuthorization_ValidatorsAminoMsg): StakeAuthorization_Validators { + return StakeAuthorization_Validators.fromAmino(object.value); + }, + toAminoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAminoMsg { + return { + type: "cosmos-sdk/Validators", + value: StakeAuthorization_Validators.toAmino(message) + }; + }, + fromProtoMsg(message: StakeAuthorization_ValidatorsProtoMsg): StakeAuthorization_Validators { + return StakeAuthorization_Validators.decode(message.value); + }, + toProto(message: StakeAuthorization_Validators): Uint8Array { + return StakeAuthorization_Validators.encode(message).finish(); + }, + toProtoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsProtoMsg { + return { + typeUrl: "/cosmos.staking.v1beta1.Validators", + value: StakeAuthorization_Validators.encode(message).finish() + }; + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/staking/v1beta1/query.rpc.func.ts b/libs/interchainjs/src/cosmos/staking/v1beta1/query.rpc.func.ts index d870abdc..679c908c 100644 --- a/libs/interchainjs/src/cosmos/staking/v1beta1/query.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/staking/v1beta1/query.rpc.func.ts @@ -5,96 +5,110 @@ export const createGetValidators = (clientResolver?: RpcResolver) => buildQuery< decode: QueryValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Validators", - clientResolver + clientResolver, + deps: [QueryValidatorsRequest, QueryValidatorsResponse] }); export const createGetValidator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValidatorRequest.encode, decode: QueryValidatorResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Validator", - clientResolver + clientResolver, + deps: [QueryValidatorRequest, QueryValidatorResponse] }); export const createGetValidatorDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValidatorDelegationsRequest.encode, decode: QueryValidatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse] }); export const createGetValidatorUnbondingDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryValidatorUnbondingDelegationsRequest.encode, decode: QueryValidatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "ValidatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse] }); export const createGetDelegation = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegationRequest.encode, decode: QueryDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Delegation", - clientResolver + clientResolver, + deps: [QueryDelegationRequest, QueryDelegationResponse] }); export const createGetUnbondingDelegation = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryUnbondingDelegationRequest.encode, decode: QueryUnbondingDelegationResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "UnbondingDelegation", - clientResolver + clientResolver, + deps: [QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse] }); export const createGetDelegatorDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorDelegationsRequest.encode, decode: QueryDelegatorDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse] }); export const createGetDelegatorUnbondingDelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorUnbondingDelegationsRequest.encode, decode: QueryDelegatorUnbondingDelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorUnbondingDelegations", - clientResolver + clientResolver, + deps: [QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse] }); export const createGetRedelegations = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryRedelegationsRequest.encode, decode: QueryRedelegationsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Redelegations", - clientResolver + clientResolver, + deps: [QueryRedelegationsRequest, QueryRedelegationsResponse] }); export const createGetDelegatorValidators = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorValidatorsRequest.encode, decode: QueryDelegatorValidatorsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidators", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse] }); export const createGetDelegatorValidator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryDelegatorValidatorRequest.encode, decode: QueryDelegatorValidatorResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "DelegatorValidator", - clientResolver + clientResolver, + deps: [QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse] }); export const createGetHistoricalInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryHistoricalInfoRequest.encode, decode: QueryHistoricalInfoResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "HistoricalInfo", - clientResolver + clientResolver, + deps: [QueryHistoricalInfoRequest, QueryHistoricalInfoResponse] }); export const createGetPool = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPoolRequest.encode, decode: QueryPoolResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Pool", - clientResolver + clientResolver, + deps: [QueryPoolRequest, QueryPoolResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmos.staking.v1beta1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/staking/v1beta1/query.ts b/libs/interchainjs/src/cosmos/staking/v1beta1/query.ts index f4754096..1b267bf2 100644 --- a/libs/interchainjs/src/cosmos/staking/v1beta1/query.ts +++ b/libs/interchainjs/src/cosmos/staking/v1beta1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { Validator, ValidatorAmino, DelegationResponse, DelegationResponseAmino, UnbondingDelegation, UnbondingDelegationAmino, RedelegationResponse, RedelegationResponseAmino, HistoricalInfo, HistoricalInfoAmino, Pool, PoolAmino, Params, ParamsAmino } from "./staking"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ export interface QueryValidatorsRequest { /** status enables to query for validators matching a given status. */ @@ -757,10 +756,11 @@ export const QueryValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", value: QueryValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsRequest.typeUrl, QueryValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsRequest.aminoType, QueryValidatorsRequest.typeUrl); function createBaseQueryValidatorsResponse(): QueryValidatorsResponse { return { validators: [], @@ -849,10 +849,12 @@ export const QueryValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", value: QueryValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorsResponse.typeUrl, QueryValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorsResponse.aminoType, QueryValidatorsResponse.typeUrl); function createBaseQueryValidatorRequest(): QueryValidatorRequest { return { validatorAddr: "" @@ -927,10 +929,9 @@ export const QueryValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", value: QueryValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryValidatorRequest.typeUrl, QueryValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorRequest.aminoType, QueryValidatorRequest.typeUrl); function createBaseQueryValidatorResponse(): QueryValidatorResponse { return { validator: Validator.fromPartial({}) @@ -1005,10 +1006,11 @@ export const QueryValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", value: QueryValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorResponse.typeUrl, QueryValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorResponse.aminoType, QueryValidatorResponse.typeUrl); function createBaseQueryValidatorDelegationsRequest(): QueryValidatorDelegationsRequest { return { validatorAddr: "", @@ -1095,10 +1097,11 @@ export const QueryValidatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", value: QueryValidatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsRequest.typeUrl, QueryValidatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsRequest.aminoType, QueryValidatorDelegationsRequest.typeUrl); function createBaseQueryValidatorDelegationsResponse(): QueryValidatorDelegationsResponse { return { delegationResponses: [], @@ -1187,10 +1190,12 @@ export const QueryValidatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", value: QueryValidatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorDelegationsResponse.typeUrl, QueryValidatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorDelegationsResponse.aminoType, QueryValidatorDelegationsResponse.typeUrl); function createBaseQueryValidatorUnbondingDelegationsRequest(): QueryValidatorUnbondingDelegationsRequest { return { validatorAddr: "", @@ -1277,10 +1282,11 @@ export const QueryValidatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", value: QueryValidatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsRequest.typeUrl, QueryValidatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsRequest.aminoType, QueryValidatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryValidatorUnbondingDelegationsResponse(): QueryValidatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -1369,10 +1375,12 @@ export const QueryValidatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", value: QueryValidatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryValidatorUnbondingDelegationsResponse.typeUrl, QueryValidatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryValidatorUnbondingDelegationsResponse.aminoType, QueryValidatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryDelegationRequest(): QueryDelegationRequest { return { delegatorAddr: "", @@ -1459,10 +1467,9 @@ export const QueryDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", value: QueryDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegationRequest.typeUrl, QueryDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationRequest.aminoType, QueryDelegationRequest.typeUrl); function createBaseQueryDelegationResponse(): QueryDelegationResponse { return { delegationResponse: undefined @@ -1537,10 +1544,11 @@ export const QueryDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", value: QueryDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegationResponse.typeUrl, QueryDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegationResponse.aminoType, QueryDelegationResponse.typeUrl); function createBaseQueryUnbondingDelegationRequest(): QueryUnbondingDelegationRequest { return { delegatorAddr: "", @@ -1627,10 +1635,9 @@ export const QueryUnbondingDelegationRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", value: QueryUnbondingDelegationRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationRequest.typeUrl, QueryUnbondingDelegationRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationRequest.aminoType, QueryUnbondingDelegationRequest.typeUrl); function createBaseQueryUnbondingDelegationResponse(): QueryUnbondingDelegationResponse { return { unbond: UnbondingDelegation.fromPartial({}) @@ -1705,10 +1712,11 @@ export const QueryUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", value: QueryUnbondingDelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryUnbondingDelegationResponse.typeUrl, QueryUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryUnbondingDelegationResponse.aminoType, QueryUnbondingDelegationResponse.typeUrl); function createBaseQueryDelegatorDelegationsRequest(): QueryDelegatorDelegationsRequest { return { delegatorAddr: "", @@ -1795,10 +1803,11 @@ export const QueryDelegatorDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", value: QueryDelegatorDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsRequest.typeUrl, QueryDelegatorDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsRequest.aminoType, QueryDelegatorDelegationsRequest.typeUrl); function createBaseQueryDelegatorDelegationsResponse(): QueryDelegatorDelegationsResponse { return { delegationResponses: [], @@ -1887,10 +1896,12 @@ export const QueryDelegatorDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", value: QueryDelegatorDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + DelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorDelegationsResponse.typeUrl, QueryDelegatorDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorDelegationsResponse.aminoType, QueryDelegatorDelegationsResponse.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsRequest(): QueryDelegatorUnbondingDelegationsRequest { return { delegatorAddr: "", @@ -1977,10 +1988,11 @@ export const QueryDelegatorUnbondingDelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", value: QueryDelegatorUnbondingDelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsRequest.typeUrl, QueryDelegatorUnbondingDelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsRequest.aminoType, QueryDelegatorUnbondingDelegationsRequest.typeUrl); function createBaseQueryDelegatorUnbondingDelegationsResponse(): QueryDelegatorUnbondingDelegationsResponse { return { unbondingResponses: [], @@ -2069,10 +2081,12 @@ export const QueryDelegatorUnbondingDelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", value: QueryDelegatorUnbondingDelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegation.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorUnbondingDelegationsResponse.typeUrl, QueryDelegatorUnbondingDelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorUnbondingDelegationsResponse.aminoType, QueryDelegatorUnbondingDelegationsResponse.typeUrl); function createBaseQueryRedelegationsRequest(): QueryRedelegationsRequest { return { delegatorAddr: "", @@ -2183,10 +2197,11 @@ export const QueryRedelegationsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", value: QueryRedelegationsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsRequest.typeUrl, QueryRedelegationsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsRequest.aminoType, QueryRedelegationsRequest.typeUrl); function createBaseQueryRedelegationsResponse(): QueryRedelegationsResponse { return { redelegationResponses: [], @@ -2275,10 +2290,12 @@ export const QueryRedelegationsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", value: QueryRedelegationsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryRedelegationsResponse.typeUrl, QueryRedelegationsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRedelegationsResponse.aminoType, QueryRedelegationsResponse.typeUrl); function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { return { delegatorAddr: "", @@ -2365,10 +2382,11 @@ export const QueryDelegatorValidatorsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", value: QueryDelegatorValidatorsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsRequest.typeUrl, QueryDelegatorValidatorsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsRequest.aminoType, QueryDelegatorValidatorsRequest.typeUrl); function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { return { validators: [], @@ -2457,10 +2475,12 @@ export const QueryDelegatorValidatorsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", value: QueryDelegatorValidatorsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorsResponse.typeUrl, QueryDelegatorValidatorsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorsResponse.aminoType, QueryDelegatorValidatorsResponse.typeUrl); function createBaseQueryDelegatorValidatorRequest(): QueryDelegatorValidatorRequest { return { delegatorAddr: "", @@ -2547,10 +2567,9 @@ export const QueryDelegatorValidatorRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", value: QueryDelegatorValidatorRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorRequest.typeUrl, QueryDelegatorValidatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorRequest.aminoType, QueryDelegatorValidatorRequest.typeUrl); function createBaseQueryDelegatorValidatorResponse(): QueryDelegatorValidatorResponse { return { validator: Validator.fromPartial({}) @@ -2625,10 +2644,11 @@ export const QueryDelegatorValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", value: QueryDelegatorValidatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryDelegatorValidatorResponse.typeUrl, QueryDelegatorValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryDelegatorValidatorResponse.aminoType, QueryDelegatorValidatorResponse.typeUrl); function createBaseQueryHistoricalInfoRequest(): QueryHistoricalInfoRequest { return { height: BigInt(0) @@ -2703,10 +2723,9 @@ export const QueryHistoricalInfoRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", value: QueryHistoricalInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryHistoricalInfoRequest.typeUrl, QueryHistoricalInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoRequest.aminoType, QueryHistoricalInfoRequest.typeUrl); function createBaseQueryHistoricalInfoResponse(): QueryHistoricalInfoResponse { return { hist: undefined @@ -2781,10 +2800,11 @@ export const QueryHistoricalInfoResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", value: QueryHistoricalInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + HistoricalInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryHistoricalInfoResponse.typeUrl, QueryHistoricalInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryHistoricalInfoResponse.aminoType, QueryHistoricalInfoResponse.typeUrl); function createBaseQueryPoolRequest(): QueryPoolRequest { return {}; } @@ -2846,10 +2866,9 @@ export const QueryPoolRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", value: QueryPoolRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryPoolRequest.typeUrl, QueryPoolRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolRequest.aminoType, QueryPoolRequest.typeUrl); function createBaseQueryPoolResponse(): QueryPoolResponse { return { pool: Pool.fromPartial({}) @@ -2924,10 +2943,11 @@ export const QueryPoolResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", value: QueryPoolResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Pool.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPoolResponse.typeUrl, QueryPoolResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPoolResponse.aminoType, QueryPoolResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2989,10 +3009,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -3067,7 +3086,8 @@ export const QueryParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/staking/v1beta1/staking.ts b/libs/interchainjs/src/cosmos/staking/v1beta1/staking.ts index ab2a299e..1c7ac96e 100644 --- a/libs/interchainjs/src/cosmos/staking/v1beta1/staking.ts +++ b/libs/interchainjs/src/cosmos/staking/v1beta1/staking.ts @@ -5,8 +5,8 @@ import { Duration, DurationAmino } from "../../../google/protobuf/duration"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, toTimestamp, fromTimestamp, isSet } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; /** BondStatus is the status of a validator. */ export enum BondStatus { @@ -838,10 +838,12 @@ export const HistoricalInfo = { typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", value: HistoricalInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HistoricalInfo.typeUrl, HistoricalInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(HistoricalInfo.aminoType, HistoricalInfo.typeUrl); function createBaseCommissionRates(): CommissionRates { return { rate: "", @@ -940,10 +942,9 @@ export const CommissionRates = { typeUrl: "/cosmos.staking.v1beta1.CommissionRates", value: CommissionRates.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommissionRates.typeUrl, CommissionRates); -GlobalDecoderRegistry.registerAminoProtoMapping(CommissionRates.aminoType, CommissionRates.typeUrl); function createBaseCommission(): Commission { return { commissionRates: CommissionRates.fromPartial({}), @@ -1030,10 +1031,11 @@ export const Commission = { typeUrl: "/cosmos.staking.v1beta1.Commission", value: Commission.encode(message).finish() }; + }, + registerTypeUrl() { + CommissionRates.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commission.typeUrl, Commission); -GlobalDecoderRegistry.registerAminoProtoMapping(Commission.aminoType, Commission.typeUrl); function createBaseDescription(): Description { return { moniker: "", @@ -1156,10 +1158,9 @@ export const Description = { typeUrl: "/cosmos.staking.v1beta1.Description", value: Description.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Description.typeUrl, Description); -GlobalDecoderRegistry.registerAminoProtoMapping(Description.aminoType, Description.typeUrl); function createBaseValidator(): Validator { return { operatorAddress: "", @@ -1389,10 +1390,12 @@ export const Validator = { typeUrl: "/cosmos.staking.v1beta1.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); + Commission.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); -GlobalDecoderRegistry.registerAminoProtoMapping(Validator.aminoType, Validator.typeUrl); function createBaseValAddresses(): ValAddresses { return { addresses: [] @@ -1469,10 +1472,9 @@ export const ValAddresses = { typeUrl: "/cosmos.staking.v1beta1.ValAddresses", value: ValAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValAddresses.typeUrl, ValAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(ValAddresses.aminoType, ValAddresses.typeUrl); function createBaseDVPair(): DVPair { return { delegatorAddress: "", @@ -1559,10 +1561,9 @@ export const DVPair = { typeUrl: "/cosmos.staking.v1beta1.DVPair", value: DVPair.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVPair.typeUrl, DVPair); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPair.aminoType, DVPair.typeUrl); function createBaseDVPairs(): DVPairs { return { pairs: [] @@ -1639,10 +1640,11 @@ export const DVPairs = { typeUrl: "/cosmos.staking.v1beta1.DVPairs", value: DVPairs.encode(message).finish() }; + }, + registerTypeUrl() { + DVPair.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVPairs.typeUrl, DVPairs); -GlobalDecoderRegistry.registerAminoProtoMapping(DVPairs.aminoType, DVPairs.typeUrl); function createBaseDVVTriplet(): DVVTriplet { return { delegatorAddress: "", @@ -1741,10 +1743,9 @@ export const DVVTriplet = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", value: DVVTriplet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DVVTriplet.typeUrl, DVVTriplet); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplet.aminoType, DVVTriplet.typeUrl); function createBaseDVVTriplets(): DVVTriplets { return { triplets: [] @@ -1821,10 +1822,11 @@ export const DVVTriplets = { typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", value: DVVTriplets.encode(message).finish() }; + }, + registerTypeUrl() { + DVVTriplet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DVVTriplets.typeUrl, DVVTriplets); -GlobalDecoderRegistry.registerAminoProtoMapping(DVVTriplets.aminoType, DVVTriplets.typeUrl); function createBaseDelegation(): Delegation { return { delegatorAddress: "", @@ -1923,10 +1925,9 @@ export const Delegation = { typeUrl: "/cosmos.staking.v1beta1.Delegation", value: Delegation.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Delegation.typeUrl, Delegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Delegation.aminoType, Delegation.typeUrl); function createBaseUnbondingDelegation(): UnbondingDelegation { return { delegatorAddress: "", @@ -2027,10 +2028,11 @@ export const UnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", value: UnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + UnbondingDelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UnbondingDelegation.typeUrl, UnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegation.aminoType, UnbondingDelegation.typeUrl); function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry { return { creationHeight: BigInt(0), @@ -2165,10 +2167,9 @@ export const UnbondingDelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", value: UnbondingDelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UnbondingDelegationEntry.typeUrl, UnbondingDelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(UnbondingDelegationEntry.aminoType, UnbondingDelegationEntry.typeUrl); function createBaseRedelegationEntry(): RedelegationEntry { return { creationHeight: BigInt(0), @@ -2303,10 +2304,9 @@ export const RedelegationEntry = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", value: RedelegationEntry.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RedelegationEntry.typeUrl, RedelegationEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntry.aminoType, RedelegationEntry.typeUrl); function createBaseRedelegation(): Redelegation { return { delegatorAddress: "", @@ -2419,10 +2419,11 @@ export const Redelegation = { typeUrl: "/cosmos.staking.v1beta1.Redelegation", value: Redelegation.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Redelegation.typeUrl, Redelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(Redelegation.aminoType, Redelegation.typeUrl); function createBaseParams(): Params { return { unbondingTime: Duration.fromPartial({}), @@ -2557,10 +2558,9 @@ export const Params = { typeUrl: "/cosmos.staking.v1beta1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseDelegationResponse(): DelegationResponse { return { delegation: Delegation.fromPartial({}), @@ -2647,10 +2647,12 @@ export const DelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", value: DelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Delegation.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelegationResponse.typeUrl, DelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(DelegationResponse.aminoType, DelegationResponse.typeUrl); function createBaseRedelegationEntryResponse(): RedelegationEntryResponse { return { redelegationEntry: RedelegationEntry.fromPartial({}), @@ -2737,10 +2739,11 @@ export const RedelegationEntryResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", value: RedelegationEntryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + RedelegationEntry.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationEntryResponse.typeUrl, RedelegationEntryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationEntryResponse.aminoType, RedelegationEntryResponse.typeUrl); function createBaseRedelegationResponse(): RedelegationResponse { return { redelegation: Redelegation.fromPartial({}), @@ -2829,10 +2832,12 @@ export const RedelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", value: RedelegationResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Redelegation.registerTypeUrl(); + RedelegationEntryResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RedelegationResponse.typeUrl, RedelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(RedelegationResponse.aminoType, RedelegationResponse.typeUrl); function createBasePool(): Pool { return { notBondedTokens: "", @@ -2919,10 +2924,9 @@ export const Pool = { typeUrl: "/cosmos.staking.v1beta1.Pool", value: Pool.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Pool.typeUrl, Pool); -GlobalDecoderRegistry.registerAminoProtoMapping(Pool.aminoType, Pool.typeUrl); function createBaseValidatorUpdates(): ValidatorUpdates { return { updates: [] @@ -2999,7 +3003,8 @@ export const ValidatorUpdates = { typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates", value: ValidatorUpdates.encode(message).finish() }; + }, + registerTypeUrl() { + ValidatorUpdate.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ValidatorUpdates.typeUrl, ValidatorUpdates); -GlobalDecoderRegistry.registerAminoProtoMapping(ValidatorUpdates.aminoType, ValidatorUpdates.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/staking/v1beta1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/staking/v1beta1/tx.rpc.func.ts index 81244bbe..98ad73ff 100644 --- a/libs/interchainjs/src/cosmos/staking/v1beta1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/staking/v1beta1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createCreateValidator = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgCreateValidator.typeUrl, encoders: toEncoders(MsgCreateValidator), - converters: toConverters(MsgCreateValidator) + converters: toConverters(MsgCreateValidator), + deps: [MsgCreateValidator] }); export const createEditValidator = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgEditValidator.typeUrl, encoders: toEncoders(MsgEditValidator), - converters: toConverters(MsgEditValidator) + converters: toConverters(MsgEditValidator), + deps: [MsgEditValidator] }); export const createDelegate = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgDelegate.typeUrl, encoders: toEncoders(MsgDelegate), - converters: toConverters(MsgDelegate) + converters: toConverters(MsgDelegate), + deps: [MsgDelegate] }); export const createBeginRedelegate = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgBeginRedelegate.typeUrl, encoders: toEncoders(MsgBeginRedelegate), - converters: toConverters(MsgBeginRedelegate) + converters: toConverters(MsgBeginRedelegate), + deps: [MsgBeginRedelegate] }); export const createUndelegate = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUndelegate.typeUrl, encoders: toEncoders(MsgUndelegate), - converters: toConverters(MsgUndelegate) + converters: toConverters(MsgUndelegate), + deps: [MsgUndelegate] }); export const createCancelUnbondingDelegation = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCancelUnbondingDelegation.typeUrl, encoders: toEncoders(MsgCancelUnbondingDelegation), - converters: toConverters(MsgCancelUnbondingDelegation) + converters: toConverters(MsgCancelUnbondingDelegation), + deps: [MsgCancelUnbondingDelegation] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/staking/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/staking/v1beta1/tx.ts index ef9fba80..d25b942c 100644 --- a/libs/interchainjs/src/cosmos/staking/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/staking/v1beta1/tx.ts @@ -3,9 +3,9 @@ import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { BinaryReader, BinaryWriter } from "../../../binary"; +import { GlobalDecoderRegistry } from "../../../registry"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { description: Description; @@ -503,10 +503,11 @@ export const MsgCreateValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateValidator.typeUrl, MsgCreateValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidator.aminoType, MsgCreateValidator.typeUrl); function createBaseMsgCreateValidatorResponse(): MsgCreateValidatorResponse { return {}; } @@ -568,10 +569,9 @@ export const MsgCreateValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", value: MsgCreateValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateValidatorResponse.typeUrl, MsgCreateValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateValidatorResponse.aminoType, MsgCreateValidatorResponse.typeUrl); function createBaseMsgEditValidator(): MsgEditValidator { return { description: Description.fromPartial({}), @@ -682,10 +682,11 @@ export const MsgEditValidator = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.encode(message).finish() }; + }, + registerTypeUrl() { + Description.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgEditValidator.typeUrl, MsgEditValidator); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidator.aminoType, MsgEditValidator.typeUrl); function createBaseMsgEditValidatorResponse(): MsgEditValidatorResponse { return {}; } @@ -747,10 +748,9 @@ export const MsgEditValidatorResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", value: MsgEditValidatorResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgEditValidatorResponse.typeUrl, MsgEditValidatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgEditValidatorResponse.aminoType, MsgEditValidatorResponse.typeUrl); function createBaseMsgDelegate(): MsgDelegate { return { delegatorAddress: "", @@ -849,10 +849,11 @@ export const MsgDelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgDelegate.typeUrl, MsgDelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegate.aminoType, MsgDelegate.typeUrl); function createBaseMsgDelegateResponse(): MsgDelegateResponse { return {}; } @@ -914,10 +915,9 @@ export const MsgDelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", value: MsgDelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgDelegateResponse.typeUrl, MsgDelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgDelegateResponse.aminoType, MsgDelegateResponse.typeUrl); function createBaseMsgBeginRedelegate(): MsgBeginRedelegate { return { delegatorAddress: "", @@ -1028,10 +1028,11 @@ export const MsgBeginRedelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgBeginRedelegate.typeUrl, MsgBeginRedelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegate.aminoType, MsgBeginRedelegate.typeUrl); function createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse { return { completionTime: new Date() @@ -1106,10 +1107,9 @@ export const MsgBeginRedelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", value: MsgBeginRedelegateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgBeginRedelegateResponse.typeUrl, MsgBeginRedelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgBeginRedelegateResponse.aminoType, MsgBeginRedelegateResponse.typeUrl); function createBaseMsgUndelegate(): MsgUndelegate { return { delegatorAddress: "", @@ -1208,10 +1208,11 @@ export const MsgUndelegate = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegate.typeUrl, MsgUndelegate); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegate.aminoType, MsgUndelegate.typeUrl); function createBaseMsgUndelegateResponse(): MsgUndelegateResponse { return { completionTime: new Date(), @@ -1298,10 +1299,11 @@ export const MsgUndelegateResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", value: MsgUndelegateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUndelegateResponse.typeUrl, MsgUndelegateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUndelegateResponse.aminoType, MsgUndelegateResponse.typeUrl); function createBaseMsgCancelUnbondingDelegation(): MsgCancelUnbondingDelegation { return { delegatorAddress: "", @@ -1412,10 +1414,11 @@ export const MsgCancelUnbondingDelegation = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegation.typeUrl, MsgCancelUnbondingDelegation); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegation.aminoType, MsgCancelUnbondingDelegation.typeUrl); function createBaseMsgCancelUnbondingDelegationResponse(): MsgCancelUnbondingDelegationResponse { return {}; } @@ -1477,10 +1480,9 @@ export const MsgCancelUnbondingDelegationResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", value: MsgCancelUnbondingDelegationResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCancelUnbondingDelegationResponse.typeUrl, MsgCancelUnbondingDelegationResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCancelUnbondingDelegationResponse.aminoType, MsgCancelUnbondingDelegationResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -1567,10 +1569,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1632,7 +1635,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.staking.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/tx/signing/v1beta1/signing.ts b/libs/interchainjs/src/cosmos/tx/signing/v1beta1/signing.ts index 8c90655f..de70a246 100644 --- a/libs/interchainjs/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/libs/interchainjs/src/cosmos/tx/signing/v1beta1/signing.ts @@ -2,7 +2,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../../crypto/multisig/ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * SignMode represents a signing mode with its own security guarantees. * @@ -308,10 +307,11 @@ export const SignatureDescriptors = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors", value: SignatureDescriptors.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptors.typeUrl, SignatureDescriptors); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptors.aminoType, SignatureDescriptors.typeUrl); function createBaseSignatureDescriptor(): SignatureDescriptor { return { publicKey: undefined, @@ -410,10 +410,11 @@ export const SignatureDescriptor = { typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor", value: SignatureDescriptor.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor.typeUrl, SignatureDescriptor); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor.aminoType, SignatureDescriptor.typeUrl); function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { return { single: undefined, @@ -500,10 +501,12 @@ export const SignatureDescriptor_Data = { typeUrl: "/cosmos.tx.signing.v1beta1.Data", value: SignatureDescriptor_Data.encode(message).finish() }; + }, + registerTypeUrl() { + SignatureDescriptor_Data_Single.registerTypeUrl(); + SignatureDescriptor_Data_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data.typeUrl, SignatureDescriptor_Data); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data.aminoType, SignatureDescriptor_Data.typeUrl); function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { return { mode: 0, @@ -590,10 +593,9 @@ export const SignatureDescriptor_Data_Single = { typeUrl: "/cosmos.tx.signing.v1beta1.Single", value: SignatureDescriptor_Data_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Single.typeUrl, SignatureDescriptor_Data_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Single.aminoType, SignatureDescriptor_Data_Single.typeUrl); function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { return { bitarray: undefined, @@ -682,7 +684,9 @@ export const SignatureDescriptor_Data_Multi = { typeUrl: "/cosmos.tx.signing.v1beta1.Multi", value: SignatureDescriptor_Data_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + SignatureDescriptor_Data.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SignatureDescriptor_Data_Multi.typeUrl, SignatureDescriptor_Data_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(SignatureDescriptor_Data_Multi.aminoType, SignatureDescriptor_Data_Multi.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/tx/v1beta1/service.rpc.func.ts b/libs/interchainjs/src/cosmos/tx/v1beta1/service.rpc.func.ts index a13635e1..096bfb4f 100644 --- a/libs/interchainjs/src/cosmos/tx/v1beta1/service.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/tx/v1beta1/service.rpc.func.ts @@ -5,61 +5,70 @@ export const createGetSimulate = (clientResolver?: RpcResolver) => buildQuery buildQuery({ encode: GetTxRequest.encode, decode: GetTxResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetTx", - clientResolver + clientResolver, + deps: [GetTxRequest, GetTxResponse] }); export const createGetBroadcastTx = (clientResolver?: RpcResolver) => buildQuery({ encode: BroadcastTxRequest.encode, decode: BroadcastTxResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "BroadcastTx", - clientResolver + clientResolver, + deps: [BroadcastTxRequest, BroadcastTxResponse] }); export const createGetGetTxsEvent = (clientResolver?: RpcResolver) => buildQuery({ encode: GetTxsEventRequest.encode, decode: GetTxsEventResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetTxsEvent", - clientResolver + clientResolver, + deps: [GetTxsEventRequest, GetTxsEventResponse] }); export const createGetGetBlockWithTxs = (clientResolver?: RpcResolver) => buildQuery({ encode: GetBlockWithTxsRequest.encode, decode: GetBlockWithTxsResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "GetBlockWithTxs", - clientResolver + clientResolver, + deps: [GetBlockWithTxsRequest, GetBlockWithTxsResponse] }); export const createGetTxDecode = (clientResolver?: RpcResolver) => buildQuery({ encode: TxDecodeRequest.encode, decode: TxDecodeResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxDecode", - clientResolver + clientResolver, + deps: [TxDecodeRequest, TxDecodeResponse] }); export const createGetTxEncode = (clientResolver?: RpcResolver) => buildQuery({ encode: TxEncodeRequest.encode, decode: TxEncodeResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxEncode", - clientResolver + clientResolver, + deps: [TxEncodeRequest, TxEncodeResponse] }); export const createGetTxEncodeAmino = (clientResolver?: RpcResolver) => buildQuery({ encode: TxEncodeAminoRequest.encode, decode: TxEncodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxEncodeAmino", - clientResolver + clientResolver, + deps: [TxEncodeAminoRequest, TxEncodeAminoResponse] }); export const createGetTxDecodeAmino = (clientResolver?: RpcResolver) => buildQuery({ encode: TxDecodeAminoRequest.encode, decode: TxDecodeAminoResponse.decode, service: "cosmos.tx.v1beta1.Service", method: "TxDecodeAmino", - clientResolver + clientResolver, + deps: [TxDecodeAminoRequest, TxDecodeAminoResponse] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/tx/v1beta1/service.ts b/libs/interchainjs/src/cosmos/tx/v1beta1/service.ts index 9c0eaf31..6a7f7c35 100644 --- a/libs/interchainjs/src/cosmos/tx/v1beta1/service.ts +++ b/libs/interchainjs/src/cosmos/tx/v1beta1/service.ts @@ -5,7 +5,6 @@ import { BlockID, BlockIDAmino } from "../../../tendermint/types/types"; import { Block, BlockAmino } from "../../../tendermint/types/block"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { GlobalDecoderRegistry } from "../../../registry"; /** OrderBy defines the sorting order */ export enum OrderBy { /** @@ -824,10 +823,11 @@ export const GetTxsEventRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest", value: GetTxsEventRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventRequest.typeUrl, GetTxsEventRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventRequest.aminoType, GetTxsEventRequest.typeUrl); function createBaseGetTxsEventResponse(): GetTxsEventResponse { return { txs: [], @@ -942,10 +942,13 @@ export const GetTxsEventResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse", value: GetTxsEventResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxsEventResponse.typeUrl, GetTxsEventResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxsEventResponse.aminoType, GetTxsEventResponse.typeUrl); function createBaseBroadcastTxRequest(): BroadcastTxRequest { return { txBytes: new Uint8Array(), @@ -1032,10 +1035,9 @@ export const BroadcastTxRequest = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest", value: BroadcastTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BroadcastTxRequest.typeUrl, BroadcastTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxRequest.aminoType, BroadcastTxRequest.typeUrl); function createBaseBroadcastTxResponse(): BroadcastTxResponse { return { txResponse: undefined @@ -1110,10 +1112,11 @@ export const BroadcastTxResponse = { typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse", value: BroadcastTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BroadcastTxResponse.typeUrl, BroadcastTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(BroadcastTxResponse.aminoType, BroadcastTxResponse.typeUrl); function createBaseSimulateRequest(): SimulateRequest { return { tx: undefined, @@ -1200,10 +1203,11 @@ export const SimulateRequest = { typeUrl: "/cosmos.tx.v1beta1.SimulateRequest", value: SimulateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateRequest.typeUrl, SimulateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateRequest.aminoType, SimulateRequest.typeUrl); function createBaseSimulateResponse(): SimulateResponse { return { gasInfo: undefined, @@ -1290,10 +1294,12 @@ export const SimulateResponse = { typeUrl: "/cosmos.tx.v1beta1.SimulateResponse", value: SimulateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + GasInfo.registerTypeUrl(); + Result.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SimulateResponse.typeUrl, SimulateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(SimulateResponse.aminoType, SimulateResponse.typeUrl); function createBaseGetTxRequest(): GetTxRequest { return { hash: "" @@ -1368,10 +1374,9 @@ export const GetTxRequest = { typeUrl: "/cosmos.tx.v1beta1.GetTxRequest", value: GetTxRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(GetTxRequest.typeUrl, GetTxRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxRequest.aminoType, GetTxRequest.typeUrl); function createBaseGetTxResponse(): GetTxResponse { return { tx: undefined, @@ -1458,10 +1463,12 @@ export const GetTxResponse = { typeUrl: "/cosmos.tx.v1beta1.GetTxResponse", value: GetTxResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + TxResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetTxResponse.typeUrl, GetTxResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetTxResponse.aminoType, GetTxResponse.typeUrl); function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { return { height: BigInt(0), @@ -1548,10 +1555,11 @@ export const GetBlockWithTxsRequest = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest", value: GetBlockWithTxsRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsRequest.typeUrl, GetBlockWithTxsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsRequest.aminoType, GetBlockWithTxsRequest.typeUrl); function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { return { txs: [], @@ -1664,10 +1672,14 @@ export const GetBlockWithTxsResponse = { typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse", value: GetBlockWithTxsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); + BlockID.registerTypeUrl(); + Block.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GetBlockWithTxsResponse.typeUrl, GetBlockWithTxsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(GetBlockWithTxsResponse.aminoType, GetBlockWithTxsResponse.typeUrl); function createBaseTxDecodeRequest(): TxDecodeRequest { return { txBytes: new Uint8Array() @@ -1742,10 +1754,9 @@ export const TxDecodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeRequest", value: TxDecodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeRequest.typeUrl, TxDecodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeRequest.aminoType, TxDecodeRequest.typeUrl); function createBaseTxDecodeResponse(): TxDecodeResponse { return { tx: undefined @@ -1820,10 +1831,11 @@ export const TxDecodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeResponse", value: TxDecodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxDecodeResponse.typeUrl, TxDecodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeResponse.aminoType, TxDecodeResponse.typeUrl); function createBaseTxEncodeRequest(): TxEncodeRequest { return { tx: undefined @@ -1898,10 +1910,11 @@ export const TxEncodeRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeRequest", value: TxEncodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + Tx.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxEncodeRequest.typeUrl, TxEncodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeRequest.aminoType, TxEncodeRequest.typeUrl); function createBaseTxEncodeResponse(): TxEncodeResponse { return { txBytes: new Uint8Array() @@ -1976,10 +1989,9 @@ export const TxEncodeResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeResponse", value: TxEncodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeResponse.typeUrl, TxEncodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeResponse.aminoType, TxEncodeResponse.typeUrl); function createBaseTxEncodeAminoRequest(): TxEncodeAminoRequest { return { aminoJson: "" @@ -2054,10 +2066,9 @@ export const TxEncodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoRequest", value: TxEncodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoRequest.typeUrl, TxEncodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoRequest.aminoType, TxEncodeAminoRequest.typeUrl); function createBaseTxEncodeAminoResponse(): TxEncodeAminoResponse { return { aminoBinary: new Uint8Array() @@ -2132,10 +2143,9 @@ export const TxEncodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxEncodeAminoResponse", value: TxEncodeAminoResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxEncodeAminoResponse.typeUrl, TxEncodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxEncodeAminoResponse.aminoType, TxEncodeAminoResponse.typeUrl); function createBaseTxDecodeAminoRequest(): TxDecodeAminoRequest { return { aminoBinary: new Uint8Array() @@ -2210,10 +2220,9 @@ export const TxDecodeAminoRequest = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoRequest", value: TxDecodeAminoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxDecodeAminoRequest.typeUrl, TxDecodeAminoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoRequest.aminoType, TxDecodeAminoRequest.typeUrl); function createBaseTxDecodeAminoResponse(): TxDecodeAminoResponse { return { aminoJson: "" @@ -2288,7 +2297,6 @@ export const TxDecodeAminoResponse = { typeUrl: "/cosmos.tx.v1beta1.TxDecodeAminoResponse", value: TxDecodeAminoResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(TxDecodeAminoResponse.typeUrl, TxDecodeAminoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(TxDecodeAminoResponse.aminoType, TxDecodeAminoResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/tx/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/tx/v1beta1/tx.ts index 6e8614bb..e0136f83 100644 --- a/libs/interchainjs/src/cosmos/tx/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/tx/v1beta1/tx.ts @@ -4,7 +4,6 @@ import { CompactBitArray, CompactBitArrayAmino } from "../../crypto/multisig/v1b import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** Tx is the standard type used for broadcasting transactions. */ export interface Tx { /** body is the processable content of the transaction */ @@ -747,10 +746,12 @@ export const Tx = { typeUrl: "/cosmos.tx.v1beta1.Tx", value: Tx.encode(message).finish() }; + }, + registerTypeUrl() { + TxBody.registerTypeUrl(); + AuthInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tx.typeUrl, Tx); -GlobalDecoderRegistry.registerAminoProtoMapping(Tx.aminoType, Tx.typeUrl); function createBaseTxRaw(): TxRaw { return { bodyBytes: new Uint8Array(), @@ -851,10 +852,9 @@ export const TxRaw = { typeUrl: "/cosmos.tx.v1beta1.TxRaw", value: TxRaw.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxRaw.typeUrl, TxRaw); -GlobalDecoderRegistry.registerAminoProtoMapping(TxRaw.aminoType, TxRaw.typeUrl); function createBaseSignDoc(): SignDoc { return { bodyBytes: new Uint8Array(), @@ -965,10 +965,9 @@ export const SignDoc = { typeUrl: "/cosmos.tx.v1beta1.SignDoc", value: SignDoc.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SignDoc.typeUrl, SignDoc); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDoc.aminoType, SignDoc.typeUrl); function createBaseSignDocDirectAux(): SignDocDirectAux { return { bodyBytes: new Uint8Array(), @@ -1103,10 +1102,11 @@ export const SignDocDirectAux = { typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux", value: SignDocDirectAux.encode(message).finish() }; + }, + registerTypeUrl() { + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignDocDirectAux.typeUrl, SignDocDirectAux); -GlobalDecoderRegistry.registerAminoProtoMapping(SignDocDirectAux.aminoType, SignDocDirectAux.typeUrl); function createBaseTxBody(): TxBody { return { messages: [], @@ -1235,10 +1235,9 @@ export const TxBody = { typeUrl: "/cosmos.tx.v1beta1.TxBody", value: TxBody.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(TxBody.typeUrl, TxBody); -GlobalDecoderRegistry.registerAminoProtoMapping(TxBody.aminoType, TxBody.typeUrl); function createBaseAuthInfo(): AuthInfo { return { signerInfos: [], @@ -1339,10 +1338,13 @@ export const AuthInfo = { typeUrl: "/cosmos.tx.v1beta1.AuthInfo", value: AuthInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SignerInfo.registerTypeUrl(); + Fee.registerTypeUrl(); + Tip.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(AuthInfo.typeUrl, AuthInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(AuthInfo.aminoType, AuthInfo.typeUrl); function createBaseSignerInfo(): SignerInfo { return { publicKey: undefined, @@ -1441,10 +1443,11 @@ export const SignerInfo = { typeUrl: "/cosmos.tx.v1beta1.SignerInfo", value: SignerInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignerInfo.typeUrl, SignerInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(SignerInfo.aminoType, SignerInfo.typeUrl); function createBaseModeInfo(): ModeInfo { return { single: undefined, @@ -1531,10 +1534,12 @@ export const ModeInfo = { typeUrl: "/cosmos.tx.v1beta1.ModeInfo", value: ModeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ModeInfo_Single.registerTypeUrl(); + ModeInfo_Multi.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo.typeUrl, ModeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo.aminoType, ModeInfo.typeUrl); function createBaseModeInfo_Single(): ModeInfo_Single { return { mode: 0 @@ -1609,10 +1614,9 @@ export const ModeInfo_Single = { typeUrl: "/cosmos.tx.v1beta1.Single", value: ModeInfo_Single.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ModeInfo_Single.typeUrl, ModeInfo_Single); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Single.aminoType, ModeInfo_Single.typeUrl); function createBaseModeInfo_Multi(): ModeInfo_Multi { return { bitarray: undefined, @@ -1701,10 +1705,12 @@ export const ModeInfo_Multi = { typeUrl: "/cosmos.tx.v1beta1.Multi", value: ModeInfo_Multi.encode(message).finish() }; + }, + registerTypeUrl() { + CompactBitArray.registerTypeUrl(); + ModeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ModeInfo_Multi.typeUrl, ModeInfo_Multi); -GlobalDecoderRegistry.registerAminoProtoMapping(ModeInfo_Multi.aminoType, ModeInfo_Multi.typeUrl); function createBaseFee(): Fee { return { amount: [], @@ -1817,10 +1823,11 @@ export const Fee = { typeUrl: "/cosmos.tx.v1beta1.Fee", value: Fee.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Fee.typeUrl, Fee); -GlobalDecoderRegistry.registerAminoProtoMapping(Fee.aminoType, Fee.typeUrl); function createBaseTip(): Tip { return { amount: [], @@ -1909,10 +1916,11 @@ export const Tip = { typeUrl: "/cosmos.tx.v1beta1.Tip", value: Tip.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Tip.typeUrl, Tip); -GlobalDecoderRegistry.registerAminoProtoMapping(Tip.aminoType, Tip.typeUrl); function createBaseAuxSignerData(): AuxSignerData { return { address: "", @@ -2023,7 +2031,8 @@ export const AuxSignerData = { typeUrl: "/cosmos.tx.v1beta1.AuxSignerData", value: AuxSignerData.encode(message).finish() }; + }, + registerTypeUrl() { + SignDocDirectAux.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(AuxSignerData.typeUrl, AuxSignerData); -GlobalDecoderRegistry.registerAminoProtoMapping(AuxSignerData.aminoType, AuxSignerData.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/upgrade/v1beta1/upgrade.ts b/libs/interchainjs/src/cosmos/upgrade/v1beta1/upgrade.ts index c2adfcb7..add35514 100644 --- a/libs/interchainjs/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/libs/interchainjs/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -303,10 +303,9 @@ export const Plan = { typeUrl: "/cosmos.upgrade.v1beta1.Plan", value: Plan.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Plan.typeUrl, Plan); -GlobalDecoderRegistry.registerAminoProtoMapping(Plan.aminoType, Plan.typeUrl); function createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal { return { title: "", @@ -405,10 +404,13 @@ export const SoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", value: SoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); + Plan.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SoftwareUpgradeProposal.typeUrl, SoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(SoftwareUpgradeProposal.aminoType, SoftwareUpgradeProposal.typeUrl); function createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal { return { title: "", @@ -495,10 +497,12 @@ export const CancelSoftwareUpgradeProposal = { typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", value: CancelSoftwareUpgradeProposal.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); + GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); } }; -GlobalDecoderRegistry.register(CancelSoftwareUpgradeProposal.typeUrl, CancelSoftwareUpgradeProposal); -GlobalDecoderRegistry.registerAminoProtoMapping(CancelSoftwareUpgradeProposal.aminoType, CancelSoftwareUpgradeProposal.typeUrl); function createBaseModuleVersion(): ModuleVersion { return { name: "", @@ -585,7 +589,6 @@ export const ModuleVersion = { typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", value: ModuleVersion.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ModuleVersion.typeUrl, ModuleVersion); -GlobalDecoderRegistry.registerAminoProtoMapping(ModuleVersion.aminoType, ModuleVersion.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts b/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts index 49328086..d693bff4 100644 --- a/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.rpc.func.ts @@ -5,17 +5,20 @@ export const createCreateVestingAccount = (clientResolver?: SigningClientResolve clientResolver, typeUrl: MsgCreateVestingAccount.typeUrl, encoders: toEncoders(MsgCreateVestingAccount), - converters: toConverters(MsgCreateVestingAccount) + converters: toConverters(MsgCreateVestingAccount), + deps: [MsgCreateVestingAccount] }); export const createCreatePermanentLockedAccount = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreatePermanentLockedAccount.typeUrl, encoders: toEncoders(MsgCreatePermanentLockedAccount), - converters: toConverters(MsgCreatePermanentLockedAccount) + converters: toConverters(MsgCreatePermanentLockedAccount), + deps: [MsgCreatePermanentLockedAccount] }); export const createCreatePeriodicVestingAccount = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgCreatePeriodicVestingAccount.typeUrl, encoders: toEncoders(MsgCreatePeriodicVestingAccount), - converters: toConverters(MsgCreatePeriodicVestingAccount) + converters: toConverters(MsgCreatePeriodicVestingAccount), + deps: [MsgCreatePeriodicVestingAccount] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.ts b/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.ts index 4e9fcb3f..5354ddff 100644 --- a/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.ts +++ b/libs/interchainjs/src/cosmos/vesting/v1beta1/tx.ts @@ -2,7 +2,6 @@ import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { Period, PeriodAmino } from "./vesting"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * MsgCreateVestingAccount defines a message that enables creating a vesting * account. @@ -277,10 +276,11 @@ export const MsgCreateVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreateVestingAccount.typeUrl, MsgCreateVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccount.aminoType, MsgCreateVestingAccount.typeUrl); function createBaseMsgCreateVestingAccountResponse(): MsgCreateVestingAccountResponse { return {}; } @@ -342,10 +342,9 @@ export const MsgCreateVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", value: MsgCreateVestingAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateVestingAccountResponse.typeUrl, MsgCreateVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateVestingAccountResponse.aminoType, MsgCreateVestingAccountResponse.typeUrl); function createBaseMsgCreatePermanentLockedAccount(): MsgCreatePermanentLockedAccount { return { fromAddress: "", @@ -446,10 +445,11 @@ export const MsgCreatePermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccount.typeUrl, MsgCreatePermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccount.aminoType, MsgCreatePermanentLockedAccount.typeUrl); function createBaseMsgCreatePermanentLockedAccountResponse(): MsgCreatePermanentLockedAccountResponse { return {}; } @@ -511,10 +511,9 @@ export const MsgCreatePermanentLockedAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", value: MsgCreatePermanentLockedAccountResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreatePermanentLockedAccountResponse.typeUrl, MsgCreatePermanentLockedAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePermanentLockedAccountResponse.aminoType, MsgCreatePermanentLockedAccountResponse.typeUrl); function createBaseMsgCreatePeriodicVestingAccount(): MsgCreatePeriodicVestingAccount { return { fromAddress: "", @@ -627,10 +626,11 @@ export const MsgCreatePeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", value: MsgCreatePeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccount.typeUrl, MsgCreatePeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccount.aminoType, MsgCreatePeriodicVestingAccount.typeUrl); function createBaseMsgCreatePeriodicVestingAccountResponse(): MsgCreatePeriodicVestingAccountResponse { return {}; } @@ -692,7 +692,6 @@ export const MsgCreatePeriodicVestingAccountResponse = { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", value: MsgCreatePeriodicVestingAccountResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgCreatePeriodicVestingAccountResponse.typeUrl, MsgCreatePeriodicVestingAccountResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreatePeriodicVestingAccountResponse.aminoType, MsgCreatePeriodicVestingAccountResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos/vesting/v1beta1/vesting.ts b/libs/interchainjs/src/cosmos/vesting/v1beta1/vesting.ts index 91f05562..f886cac4 100644 --- a/libs/interchainjs/src/cosmos/vesting/v1beta1/vesting.ts +++ b/libs/interchainjs/src/cosmos/vesting/v1beta1/vesting.ts @@ -2,7 +2,6 @@ import { BaseAccount, BaseAccountAmino } from "../../auth/v1beta1/auth"; import { Coin, CoinAmino } from "../../base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all * the necessary fields needed for any vesting account implementation. @@ -287,10 +286,12 @@ export const BaseVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", value: BaseVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseAccount.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BaseVestingAccount.typeUrl, BaseVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(BaseVestingAccount.aminoType, BaseVestingAccount.typeUrl); function createBaseContinuousVestingAccount(): ContinuousVestingAccount { return { baseVestingAccount: undefined, @@ -377,10 +378,11 @@ export const ContinuousVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", value: ContinuousVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContinuousVestingAccount.typeUrl, ContinuousVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(ContinuousVestingAccount.aminoType, ContinuousVestingAccount.typeUrl); function createBaseDelayedVestingAccount(): DelayedVestingAccount { return { baseVestingAccount: undefined @@ -455,10 +457,11 @@ export const DelayedVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", value: DelayedVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DelayedVestingAccount.typeUrl, DelayedVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(DelayedVestingAccount.aminoType, DelayedVestingAccount.typeUrl); function createBasePeriod(): Period { return { length: BigInt(0), @@ -547,10 +550,11 @@ export const Period = { typeUrl: "/cosmos.vesting.v1beta1.Period", value: Period.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Period.typeUrl, Period); -GlobalDecoderRegistry.registerAminoProtoMapping(Period.aminoType, Period.typeUrl); function createBasePeriodicVestingAccount(): PeriodicVestingAccount { return { baseVestingAccount: undefined, @@ -651,10 +655,12 @@ export const PeriodicVestingAccount = { typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", value: PeriodicVestingAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); + Period.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(PeriodicVestingAccount.typeUrl, PeriodicVestingAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PeriodicVestingAccount.aminoType, PeriodicVestingAccount.typeUrl); function createBasePermanentLockedAccount(): PermanentLockedAccount { return { baseVestingAccount: undefined @@ -729,7 +735,8 @@ export const PermanentLockedAccount = { typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", value: PermanentLockedAccount.encode(message).finish() }; + }, + registerTypeUrl() { + BaseVestingAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(PermanentLockedAccount.typeUrl, PermanentLockedAccount); -GlobalDecoderRegistry.registerAminoProtoMapping(PermanentLockedAccount.aminoType, PermanentLockedAccount.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmos_proto/cosmos.ts b/libs/interchainjs/src/cosmos_proto/cosmos.ts index 0a97877f..9c5ace2a 100644 --- a/libs/interchainjs/src/cosmos_proto/cosmos.ts +++ b/libs/interchainjs/src/cosmos_proto/cosmos.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../binary"; import { DeepPartial } from "../helpers"; -import { GlobalDecoderRegistry } from "../registry"; export enum ScalarType { SCALAR_TYPE_UNSPECIFIED = 0, SCALAR_TYPE_STRING = 1, @@ -231,9 +230,9 @@ export const InterfaceDescriptor = { typeUrl: "/cosmos_proto.InterfaceDescriptor", value: InterfaceDescriptor.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(InterfaceDescriptor.typeUrl, InterfaceDescriptor); function createBaseScalarDescriptor(): ScalarDescriptor { return { name: "", @@ -336,6 +335,6 @@ export const ScalarDescriptor = { typeUrl: "/cosmos_proto.ScalarDescriptor", value: ScalarDescriptor.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ScalarDescriptor.typeUrl, ScalarDescriptor); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmwasm/wasm/v1/query.rpc.func.ts b/libs/interchainjs/src/cosmwasm/wasm/v1/query.rpc.func.ts index 8a0c89f5..eff06fce 100644 --- a/libs/interchainjs/src/cosmwasm/wasm/v1/query.rpc.func.ts +++ b/libs/interchainjs/src/cosmwasm/wasm/v1/query.rpc.func.ts @@ -5,96 +5,110 @@ export const createGetContractInfo = (clientResolver?: RpcResolver) => buildQuer decode: QueryContractInfoResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractInfo", - clientResolver + clientResolver, + deps: [QueryContractInfoRequest, QueryContractInfoResponse] }); export const createGetContractHistory = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryContractHistoryRequest.encode, decode: QueryContractHistoryResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractHistory", - clientResolver + clientResolver, + deps: [QueryContractHistoryRequest, QueryContractHistoryResponse] }); export const createGetContractsByCode = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryContractsByCodeRequest.encode, decode: QueryContractsByCodeResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCode", - clientResolver + clientResolver, + deps: [QueryContractsByCodeRequest, QueryContractsByCodeResponse] }); export const createGetAllContractState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryAllContractStateRequest.encode, decode: QueryAllContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "AllContractState", - clientResolver + clientResolver, + deps: [QueryAllContractStateRequest, QueryAllContractStateResponse] }); export const createGetRawContractState = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryRawContractStateRequest.encode, decode: QueryRawContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "RawContractState", - clientResolver + clientResolver, + deps: [QueryRawContractStateRequest, QueryRawContractStateResponse] }); export const createGetSmartContractState = (clientResolver?: RpcResolver) => buildQuery({ encode: QuerySmartContractStateRequest.encode, decode: QuerySmartContractStateResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "SmartContractState", - clientResolver + clientResolver, + deps: [QuerySmartContractStateRequest, QuerySmartContractStateResponse] }); export const createGetCode = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCodeRequest.encode, decode: QueryCodeResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "Code", - clientResolver + clientResolver, + deps: [QueryCodeRequest, QueryCodeResponse] }); export const createGetCodes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCodesRequest.encode, decode: QueryCodesResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "Codes", - clientResolver + clientResolver, + deps: [QueryCodesRequest, QueryCodesResponse] }); export const createGetCodeInfo = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryCodeInfoRequest.encode, decode: QueryCodeInfoResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "CodeInfo", - clientResolver + clientResolver, + deps: [QueryCodeInfoRequest, QueryCodeInfoResponse] }); export const createGetPinnedCodes = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryPinnedCodesRequest.encode, decode: QueryPinnedCodesResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "PinnedCodes", - clientResolver + clientResolver, + deps: [QueryPinnedCodesRequest, QueryPinnedCodesResponse] }); export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryParamsRequest.encode, decode: QueryParamsResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "Params", - clientResolver + clientResolver, + deps: [QueryParamsRequest, QueryParamsResponse] }); export const createGetContractsByCreator = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryContractsByCreatorRequest.encode, decode: QueryContractsByCreatorResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "ContractsByCreator", - clientResolver + clientResolver, + deps: [QueryContractsByCreatorRequest, QueryContractsByCreatorResponse] }); export const createGetWasmLimitsConfig = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryWasmLimitsConfigRequest.encode, decode: QueryWasmLimitsConfigResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "WasmLimitsConfig", - clientResolver + clientResolver, + deps: [QueryWasmLimitsConfigRequest, QueryWasmLimitsConfigResponse] }); export const createGetBuildAddress = (clientResolver?: RpcResolver) => buildQuery({ encode: QueryBuildAddressRequest.encode, decode: QueryBuildAddressResponse.decode, service: "cosmwasm.wasm.v1.Query", method: "BuildAddress", - clientResolver + clientResolver, + deps: [QueryBuildAddressRequest, QueryBuildAddressResponse] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmwasm/wasm/v1/query.ts b/libs/interchainjs/src/cosmwasm/wasm/v1/query.ts index cd8c0b8e..4352cce0 100644 --- a/libs/interchainjs/src/cosmwasm/wasm/v1/query.ts +++ b/libs/interchainjs/src/cosmwasm/wasm/v1/query.ts @@ -2,7 +2,6 @@ import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from " import { ContractInfo, ContractInfoAmino, ContractCodeHistoryEntry, ContractCodeHistoryEntryAmino, Model, ModelAmino, AccessConfig, AccessConfigAmino, Params, ParamsAmino } from "./types"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { GlobalDecoderRegistry } from "../../../registry"; import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -774,10 +773,9 @@ export const QueryContractInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", value: QueryContractInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryContractInfoRequest.typeUrl, QueryContractInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoRequest.aminoType, QueryContractInfoRequest.typeUrl); function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { return { address: "", @@ -864,10 +862,11 @@ export const QueryContractInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", value: QueryContractInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractInfoResponse.typeUrl, QueryContractInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractInfoResponse.aminoType, QueryContractInfoResponse.typeUrl); function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { return { address: "", @@ -954,10 +953,11 @@ export const QueryContractHistoryRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", value: QueryContractHistoryRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryRequest.typeUrl, QueryContractHistoryRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryRequest.aminoType, QueryContractHistoryRequest.typeUrl); function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse { return { entries: [], @@ -1046,10 +1046,12 @@ export const QueryContractHistoryResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", value: QueryContractHistoryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + ContractCodeHistoryEntry.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractHistoryResponse.typeUrl, QueryContractHistoryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractHistoryResponse.aminoType, QueryContractHistoryResponse.typeUrl); function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { return { codeId: BigInt(0), @@ -1136,10 +1138,11 @@ export const QueryContractsByCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", value: QueryContractsByCodeRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeRequest.typeUrl, QueryContractsByCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeRequest.aminoType, QueryContractsByCodeRequest.typeUrl); function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse { return { contracts: [], @@ -1228,10 +1231,11 @@ export const QueryContractsByCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", value: QueryContractsByCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCodeResponse.typeUrl, QueryContractsByCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCodeResponse.aminoType, QueryContractsByCodeResponse.typeUrl); function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { return { address: "", @@ -1318,10 +1322,11 @@ export const QueryAllContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", value: QueryAllContractStateRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateRequest.typeUrl, QueryAllContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateRequest.aminoType, QueryAllContractStateRequest.typeUrl); function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse { return { models: [], @@ -1410,10 +1415,12 @@ export const QueryAllContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", value: QueryAllContractStateResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Model.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryAllContractStateResponse.typeUrl, QueryAllContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryAllContractStateResponse.aminoType, QueryAllContractStateResponse.typeUrl); function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { return { address: "", @@ -1500,10 +1507,9 @@ export const QueryRawContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", value: QueryRawContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateRequest.typeUrl, QueryRawContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateRequest.aminoType, QueryRawContractStateRequest.typeUrl); function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse { return { data: new Uint8Array() @@ -1578,10 +1584,9 @@ export const QueryRawContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", value: QueryRawContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryRawContractStateResponse.typeUrl, QueryRawContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryRawContractStateResponse.aminoType, QueryRawContractStateResponse.typeUrl); function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { return { address: "", @@ -1668,10 +1673,9 @@ export const QuerySmartContractStateRequest = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", value: QuerySmartContractStateRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateRequest.typeUrl, QuerySmartContractStateRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateRequest.aminoType, QuerySmartContractStateRequest.typeUrl); function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse { return { data: new Uint8Array() @@ -1746,10 +1750,9 @@ export const QuerySmartContractStateResponse = { typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", value: QuerySmartContractStateResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QuerySmartContractStateResponse.typeUrl, QuerySmartContractStateResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QuerySmartContractStateResponse.aminoType, QuerySmartContractStateResponse.typeUrl); function createBaseQueryCodeRequest(): QueryCodeRequest { return { codeId: BigInt(0) @@ -1824,10 +1827,9 @@ export const QueryCodeRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", value: QueryCodeRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeRequest.typeUrl, QueryCodeRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeRequest.aminoType, QueryCodeRequest.typeUrl); function createBaseQueryCodeInfoRequest(): QueryCodeInfoRequest { return { codeId: BigInt(0) @@ -1902,10 +1904,9 @@ export const QueryCodeInfoRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoRequest", value: QueryCodeInfoRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryCodeInfoRequest.typeUrl, QueryCodeInfoRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoRequest.aminoType, QueryCodeInfoRequest.typeUrl); function createBaseQueryCodeInfoResponse(): QueryCodeInfoResponse { return { codeId: BigInt(0), @@ -2016,10 +2017,11 @@ export const QueryCodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeInfoResponse", value: QueryCodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeInfoResponse.typeUrl, QueryCodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeInfoResponse.aminoType, QueryCodeInfoResponse.typeUrl); function createBaseCodeInfoResponse(): CodeInfoResponse { return { codeId: BigInt(0), @@ -2130,10 +2132,11 @@ export const CodeInfoResponse = { typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", value: CodeInfoResponse.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfoResponse.typeUrl, CodeInfoResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfoResponse.aminoType, CodeInfoResponse.typeUrl); function createBaseQueryCodeResponse(): QueryCodeResponse { return { codeInfo: undefined, @@ -2220,10 +2223,11 @@ export const QueryCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", value: QueryCodeResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodeResponse.typeUrl, QueryCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodeResponse.aminoType, QueryCodeResponse.typeUrl); function createBaseQueryCodesRequest(): QueryCodesRequest { return { pagination: undefined @@ -2298,10 +2302,11 @@ export const QueryCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", value: QueryCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesRequest.typeUrl, QueryCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesRequest.aminoType, QueryCodesRequest.typeUrl); function createBaseQueryCodesResponse(): QueryCodesResponse { return { codeInfos: [], @@ -2390,10 +2395,12 @@ export const QueryCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", value: QueryCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + CodeInfoResponse.registerTypeUrl(); + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryCodesResponse.typeUrl, QueryCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryCodesResponse.aminoType, QueryCodesResponse.typeUrl); function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { return { pagination: undefined @@ -2468,10 +2475,11 @@ export const QueryPinnedCodesRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", value: QueryPinnedCodesRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesRequest.typeUrl, QueryPinnedCodesRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesRequest.aminoType, QueryPinnedCodesRequest.typeUrl); function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { return { codeIds: [], @@ -2569,10 +2577,11 @@ export const QueryPinnedCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", value: QueryPinnedCodesResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryPinnedCodesResponse.typeUrl, QueryPinnedCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryPinnedCodesResponse.aminoType, QueryPinnedCodesResponse.typeUrl); function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -2634,10 +2643,9 @@ export const QueryParamsRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl); function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) @@ -2712,10 +2720,11 @@ export const QueryParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl); function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest { return { creatorAddress: "", @@ -2802,10 +2811,11 @@ export const QueryContractsByCreatorRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest", value: QueryContractsByCreatorRequest.encode(message).finish() }; + }, + registerTypeUrl() { + PageRequest.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorRequest.typeUrl, QueryContractsByCreatorRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorRequest.aminoType, QueryContractsByCreatorRequest.typeUrl); function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorResponse { return { contractAddresses: [], @@ -2894,10 +2904,11 @@ export const QueryContractsByCreatorResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse", value: QueryContractsByCreatorResponse.encode(message).finish() }; + }, + registerTypeUrl() { + PageResponse.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(QueryContractsByCreatorResponse.typeUrl, QueryContractsByCreatorResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryContractsByCreatorResponse.aminoType, QueryContractsByCreatorResponse.typeUrl); function createBaseQueryWasmLimitsConfigRequest(): QueryWasmLimitsConfigRequest { return {}; } @@ -2959,10 +2970,9 @@ export const QueryWasmLimitsConfigRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigRequest", value: QueryWasmLimitsConfigRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigRequest.typeUrl, QueryWasmLimitsConfigRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigRequest.aminoType, QueryWasmLimitsConfigRequest.typeUrl); function createBaseQueryWasmLimitsConfigResponse(): QueryWasmLimitsConfigResponse { return { config: "" @@ -3037,10 +3047,9 @@ export const QueryWasmLimitsConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryWasmLimitsConfigResponse", value: QueryWasmLimitsConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryWasmLimitsConfigResponse.typeUrl, QueryWasmLimitsConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryWasmLimitsConfigResponse.aminoType, QueryWasmLimitsConfigResponse.typeUrl); function createBaseQueryBuildAddressRequest(): QueryBuildAddressRequest { return { codeHash: "", @@ -3151,10 +3160,9 @@ export const QueryBuildAddressRequest = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressRequest", value: QueryBuildAddressRequest.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(QueryBuildAddressRequest.typeUrl, QueryBuildAddressRequest); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressRequest.aminoType, QueryBuildAddressRequest.typeUrl); function createBaseQueryBuildAddressResponse(): QueryBuildAddressResponse { return { address: "" @@ -3229,7 +3237,6 @@ export const QueryBuildAddressResponse = { typeUrl: "/cosmwasm.wasm.v1.QueryBuildAddressResponse", value: QueryBuildAddressResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(QueryBuildAddressResponse.typeUrl, QueryBuildAddressResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(QueryBuildAddressResponse.aminoType, QueryBuildAddressResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmwasm/wasm/v1/tx.rpc.func.ts b/libs/interchainjs/src/cosmwasm/wasm/v1/tx.rpc.func.ts index 61f2ed80..5c34fb61 100644 --- a/libs/interchainjs/src/cosmwasm/wasm/v1/tx.rpc.func.ts +++ b/libs/interchainjs/src/cosmwasm/wasm/v1/tx.rpc.func.ts @@ -5,101 +5,118 @@ export const createStoreCode = (clientResolver?: SigningClientResolver) => build clientResolver, typeUrl: MsgStoreCode.typeUrl, encoders: toEncoders(MsgStoreCode), - converters: toConverters(MsgStoreCode) + converters: toConverters(MsgStoreCode), + deps: [MsgStoreCode] }); export const createInstantiateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantiateContract.typeUrl, encoders: toEncoders(MsgInstantiateContract), - converters: toConverters(MsgInstantiateContract) + converters: toConverters(MsgInstantiateContract), + deps: [MsgInstantiateContract] }); export const createInstantiateContract2 = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgInstantiateContract2.typeUrl, encoders: toEncoders(MsgInstantiateContract2), - converters: toConverters(MsgInstantiateContract2) + converters: toConverters(MsgInstantiateContract2), + deps: [MsgInstantiateContract2] }); export const createExecuteContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgExecuteContract.typeUrl, encoders: toEncoders(MsgExecuteContract), - converters: toConverters(MsgExecuteContract) + converters: toConverters(MsgExecuteContract), + deps: [MsgExecuteContract] }); export const createMigrateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgMigrateContract.typeUrl, encoders: toEncoders(MsgMigrateContract), - converters: toConverters(MsgMigrateContract) + converters: toConverters(MsgMigrateContract), + deps: [MsgMigrateContract] }); export const createUpdateAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateAdmin.typeUrl, encoders: toEncoders(MsgUpdateAdmin), - converters: toConverters(MsgUpdateAdmin) + converters: toConverters(MsgUpdateAdmin), + deps: [MsgUpdateAdmin] }); export const createClearAdmin = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgClearAdmin.typeUrl, encoders: toEncoders(MsgClearAdmin), - converters: toConverters(MsgClearAdmin) + converters: toConverters(MsgClearAdmin), + deps: [MsgClearAdmin] }); export const createUpdateInstantiateConfig = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateInstantiateConfig.typeUrl, encoders: toEncoders(MsgUpdateInstantiateConfig), - converters: toConverters(MsgUpdateInstantiateConfig) + converters: toConverters(MsgUpdateInstantiateConfig), + deps: [MsgUpdateInstantiateConfig] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createSudoContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSudoContract.typeUrl, encoders: toEncoders(MsgSudoContract), - converters: toConverters(MsgSudoContract) + converters: toConverters(MsgSudoContract), + deps: [MsgSudoContract] }); export const createPinCodes = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgPinCodes.typeUrl, encoders: toEncoders(MsgPinCodes), - converters: toConverters(MsgPinCodes) + converters: toConverters(MsgPinCodes), + deps: [MsgPinCodes] }); export const createUnpinCodes = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUnpinCodes.typeUrl, encoders: toEncoders(MsgUnpinCodes), - converters: toConverters(MsgUnpinCodes) + converters: toConverters(MsgUnpinCodes), + deps: [MsgUnpinCodes] }); export const createStoreAndInstantiateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgStoreAndInstantiateContract.typeUrl, encoders: toEncoders(MsgStoreAndInstantiateContract), - converters: toConverters(MsgStoreAndInstantiateContract) + converters: toConverters(MsgStoreAndInstantiateContract), + deps: [MsgStoreAndInstantiateContract] }); export const createRemoveCodeUploadParamsAddresses = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRemoveCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgRemoveCodeUploadParamsAddresses), - converters: toConverters(MsgRemoveCodeUploadParamsAddresses) + converters: toConverters(MsgRemoveCodeUploadParamsAddresses), + deps: [MsgRemoveCodeUploadParamsAddresses] }); export const createAddCodeUploadParamsAddresses = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgAddCodeUploadParamsAddresses.typeUrl, encoders: toEncoders(MsgAddCodeUploadParamsAddresses), - converters: toConverters(MsgAddCodeUploadParamsAddresses) + converters: toConverters(MsgAddCodeUploadParamsAddresses), + deps: [MsgAddCodeUploadParamsAddresses] }); export const createStoreAndMigrateContract = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgStoreAndMigrateContract.typeUrl, encoders: toEncoders(MsgStoreAndMigrateContract), - converters: toConverters(MsgStoreAndMigrateContract) + converters: toConverters(MsgStoreAndMigrateContract), + deps: [MsgStoreAndMigrateContract] }); export const createUpdateContractLabel = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateContractLabel.typeUrl, encoders: toEncoders(MsgUpdateContractLabel), - converters: toConverters(MsgUpdateContractLabel) + converters: toConverters(MsgUpdateContractLabel), + deps: [MsgUpdateContractLabel] }); \ No newline at end of file diff --git a/libs/interchainjs/src/cosmwasm/wasm/v1/tx.ts b/libs/interchainjs/src/cosmwasm/wasm/v1/tx.ts index c97c9907..4d1c7288 100644 --- a/libs/interchainjs/src/cosmwasm/wasm/v1/tx.ts +++ b/libs/interchainjs/src/cosmwasm/wasm/v1/tx.ts @@ -3,7 +3,6 @@ import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -import { GlobalDecoderRegistry } from "../../../registry"; /** MsgStoreCode submit Wasm code to the system */ export interface MsgStoreCode { /** Sender is the actor that signed the messages */ @@ -1070,10 +1069,11 @@ export const MsgStoreCode = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreCode.typeUrl, MsgStoreCode); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCode.aminoType, MsgStoreCode.typeUrl); function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { return { codeId: BigInt(0), @@ -1160,10 +1160,9 @@ export const MsgStoreCodeResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", value: MsgStoreCodeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreCodeResponse.typeUrl, MsgStoreCodeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreCodeResponse.aminoType, MsgStoreCodeResponse.typeUrl); function createBaseMsgInstantiateContract(): MsgInstantiateContract { return { sender: "", @@ -1300,10 +1299,11 @@ export const MsgInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract.typeUrl, MsgInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract.aminoType, MsgInstantiateContract.typeUrl); function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { return { address: "", @@ -1390,10 +1390,9 @@ export const MsgInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", value: MsgInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContractResponse.typeUrl, MsgInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContractResponse.aminoType, MsgInstantiateContractResponse.typeUrl); function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { return { sender: "", @@ -1554,10 +1553,11 @@ export const MsgInstantiateContract2 = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", value: MsgInstantiateContract2.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgInstantiateContract2.typeUrl, MsgInstantiateContract2); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2.aminoType, MsgInstantiateContract2.typeUrl); function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { return { address: "", @@ -1644,10 +1644,9 @@ export const MsgInstantiateContract2Response = { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2Response", value: MsgInstantiateContract2Response.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgInstantiateContract2Response.typeUrl, MsgInstantiateContract2Response); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgInstantiateContract2Response.aminoType, MsgInstantiateContract2Response.typeUrl); function createBaseMsgExecuteContract(): MsgExecuteContract { return { sender: "", @@ -1760,10 +1759,11 @@ export const MsgExecuteContract = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgExecuteContract.typeUrl, MsgExecuteContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContract.aminoType, MsgExecuteContract.typeUrl); function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { return { data: new Uint8Array() @@ -1838,10 +1838,9 @@ export const MsgExecuteContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", value: MsgExecuteContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgExecuteContractResponse.typeUrl, MsgExecuteContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecuteContractResponse.aminoType, MsgExecuteContractResponse.typeUrl); function createBaseMsgMigrateContract(): MsgMigrateContract { return { sender: "", @@ -1952,10 +1951,9 @@ export const MsgMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContract.typeUrl, MsgMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContract.aminoType, MsgMigrateContract.typeUrl); function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { return { data: new Uint8Array() @@ -2030,10 +2028,9 @@ export const MsgMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", value: MsgMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgMigrateContractResponse.typeUrl, MsgMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgMigrateContractResponse.aminoType, MsgMigrateContractResponse.typeUrl); function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { return { sender: "", @@ -2132,10 +2129,9 @@ export const MsgUpdateAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", value: MsgUpdateAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdmin.typeUrl, MsgUpdateAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdmin.aminoType, MsgUpdateAdmin.typeUrl); function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { return {}; } @@ -2197,10 +2193,9 @@ export const MsgUpdateAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", value: MsgUpdateAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateAdminResponse.typeUrl, MsgUpdateAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateAdminResponse.aminoType, MsgUpdateAdminResponse.typeUrl); function createBaseMsgClearAdmin(): MsgClearAdmin { return { sender: "", @@ -2287,10 +2282,9 @@ export const MsgClearAdmin = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdmin.typeUrl, MsgClearAdmin); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdmin.aminoType, MsgClearAdmin.typeUrl); function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { return {}; } @@ -2352,10 +2346,9 @@ export const MsgClearAdminResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", value: MsgClearAdminResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgClearAdminResponse.typeUrl, MsgClearAdminResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgClearAdminResponse.aminoType, MsgClearAdminResponse.typeUrl); function createBaseMsgUpdateInstantiateConfig(): MsgUpdateInstantiateConfig { return { sender: "", @@ -2454,10 +2447,11 @@ export const MsgUpdateInstantiateConfig = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", value: MsgUpdateInstantiateConfig.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfig.typeUrl, MsgUpdateInstantiateConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfig.aminoType, MsgUpdateInstantiateConfig.typeUrl); function createBaseMsgUpdateInstantiateConfigResponse(): MsgUpdateInstantiateConfigResponse { return {}; } @@ -2519,10 +2513,9 @@ export const MsgUpdateInstantiateConfigResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", value: MsgUpdateInstantiateConfigResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateInstantiateConfigResponse.typeUrl, MsgUpdateInstantiateConfigResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateInstantiateConfigResponse.aminoType, MsgUpdateInstantiateConfigResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -2609,10 +2602,11 @@ export const MsgUpdateParams = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -2674,10 +2668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgSudoContract(): MsgSudoContract { return { authority: "", @@ -2776,10 +2769,9 @@ export const MsgSudoContract = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", value: MsgSudoContract.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContract.typeUrl, MsgSudoContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContract.aminoType, MsgSudoContract.typeUrl); function createBaseMsgSudoContractResponse(): MsgSudoContractResponse { return { data: new Uint8Array() @@ -2854,10 +2846,9 @@ export const MsgSudoContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContractResponse", value: MsgSudoContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSudoContractResponse.typeUrl, MsgSudoContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSudoContractResponse.aminoType, MsgSudoContractResponse.typeUrl); function createBaseMsgPinCodes(): MsgPinCodes { return { authority: "", @@ -2955,10 +2946,9 @@ export const MsgPinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", value: MsgPinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodes.typeUrl, MsgPinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodes.aminoType, MsgPinCodes.typeUrl); function createBaseMsgPinCodesResponse(): MsgPinCodesResponse { return {}; } @@ -3020,10 +3010,9 @@ export const MsgPinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgPinCodesResponse", value: MsgPinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPinCodesResponse.typeUrl, MsgPinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPinCodesResponse.aminoType, MsgPinCodesResponse.typeUrl); function createBaseMsgUnpinCodes(): MsgUnpinCodes { return { authority: "", @@ -3121,10 +3110,9 @@ export const MsgUnpinCodes = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", value: MsgUnpinCodes.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodes.typeUrl, MsgUnpinCodes); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodes.aminoType, MsgUnpinCodes.typeUrl); function createBaseMsgUnpinCodesResponse(): MsgUnpinCodesResponse { return {}; } @@ -3186,10 +3174,9 @@ export const MsgUnpinCodesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodesResponse", value: MsgUnpinCodesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUnpinCodesResponse.typeUrl, MsgUnpinCodesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUnpinCodesResponse.aminoType, MsgUnpinCodesResponse.typeUrl); function createBaseMsgStoreAndInstantiateContract(): MsgStoreAndInstantiateContract { return { authority: "", @@ -3386,10 +3373,12 @@ export const MsgStoreAndInstantiateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", value: MsgStoreAndInstantiateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); + Coin.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContract.typeUrl, MsgStoreAndInstantiateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContract.aminoType, MsgStoreAndInstantiateContract.typeUrl); function createBaseMsgStoreAndInstantiateContractResponse(): MsgStoreAndInstantiateContractResponse { return { address: "", @@ -3476,10 +3465,9 @@ export const MsgStoreAndInstantiateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", value: MsgStoreAndInstantiateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndInstantiateContractResponse.typeUrl, MsgStoreAndInstantiateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndInstantiateContractResponse.aminoType, MsgStoreAndInstantiateContractResponse.typeUrl); function createBaseMsgAddCodeUploadParamsAddresses(): MsgAddCodeUploadParamsAddresses { return { authority: "", @@ -3568,10 +3556,9 @@ export const MsgAddCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", value: MsgAddCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddresses.typeUrl, MsgAddCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddresses.aminoType, MsgAddCodeUploadParamsAddresses.typeUrl); function createBaseMsgAddCodeUploadParamsAddressesResponse(): MsgAddCodeUploadParamsAddressesResponse { return {}; } @@ -3633,10 +3620,9 @@ export const MsgAddCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", value: MsgAddCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAddCodeUploadParamsAddressesResponse.typeUrl, MsgAddCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAddCodeUploadParamsAddressesResponse.aminoType, MsgAddCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddresses(): MsgRemoveCodeUploadParamsAddresses { return { authority: "", @@ -3725,10 +3711,9 @@ export const MsgRemoveCodeUploadParamsAddresses = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", value: MsgRemoveCodeUploadParamsAddresses.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddresses.typeUrl, MsgRemoveCodeUploadParamsAddresses); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddresses.aminoType, MsgRemoveCodeUploadParamsAddresses.typeUrl); function createBaseMsgRemoveCodeUploadParamsAddressesResponse(): MsgRemoveCodeUploadParamsAddressesResponse { return {}; } @@ -3790,10 +3775,9 @@ export const MsgRemoveCodeUploadParamsAddressesResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", value: MsgRemoveCodeUploadParamsAddressesResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRemoveCodeUploadParamsAddressesResponse.typeUrl, MsgRemoveCodeUploadParamsAddressesResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRemoveCodeUploadParamsAddressesResponse.aminoType, MsgRemoveCodeUploadParamsAddressesResponse.typeUrl); function createBaseMsgStoreAndMigrateContract(): MsgStoreAndMigrateContract { return { authority: "", @@ -3916,10 +3900,11 @@ export const MsgStoreAndMigrateContract = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", value: MsgStoreAndMigrateContract.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContract.typeUrl, MsgStoreAndMigrateContract); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContract.aminoType, MsgStoreAndMigrateContract.typeUrl); function createBaseMsgStoreAndMigrateContractResponse(): MsgStoreAndMigrateContractResponse { return { codeId: BigInt(0), @@ -4018,10 +4003,9 @@ export const MsgStoreAndMigrateContractResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", value: MsgStoreAndMigrateContractResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgStoreAndMigrateContractResponse.typeUrl, MsgStoreAndMigrateContractResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgStoreAndMigrateContractResponse.aminoType, MsgStoreAndMigrateContractResponse.typeUrl); function createBaseMsgUpdateContractLabel(): MsgUpdateContractLabel { return { sender: "", @@ -4120,10 +4104,9 @@ export const MsgUpdateContractLabel = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabel", value: MsgUpdateContractLabel.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateContractLabel.typeUrl, MsgUpdateContractLabel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabel.aminoType, MsgUpdateContractLabel.typeUrl); function createBaseMsgUpdateContractLabelResponse(): MsgUpdateContractLabelResponse { return {}; } @@ -4185,7 +4168,6 @@ export const MsgUpdateContractLabelResponse = { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", value: MsgUpdateContractLabelResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateContractLabelResponse.typeUrl, MsgUpdateContractLabelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateContractLabelResponse.aminoType, MsgUpdateContractLabelResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/cosmwasm/wasm/v1/types.ts b/libs/interchainjs/src/cosmwasm/wasm/v1/types.ts index 3dccb816..16d3b488 100644 --- a/libs/interchainjs/src/cosmwasm/wasm/v1/types.ts +++ b/libs/interchainjs/src/cosmwasm/wasm/v1/types.ts @@ -386,10 +386,9 @@ export const AccessTypeParam = { typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", value: AccessTypeParam.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessTypeParam.typeUrl, AccessTypeParam); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessTypeParam.aminoType, AccessTypeParam.typeUrl); function createBaseAccessConfig(): AccessConfig { return { permission: 0, @@ -478,10 +477,9 @@ export const AccessConfig = { typeUrl: "/cosmwasm.wasm.v1.AccessConfig", value: AccessConfig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AccessConfig.typeUrl, AccessConfig); -GlobalDecoderRegistry.registerAminoProtoMapping(AccessConfig.aminoType, AccessConfig.typeUrl); function createBaseParams(): Params { return { codeUploadAccess: AccessConfig.fromPartial({}), @@ -568,10 +566,11 @@ export const Params = { typeUrl: "/cosmwasm.wasm.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseCodeInfo(): CodeInfo { return { codeHash: new Uint8Array(), @@ -670,10 +669,11 @@ export const CodeInfo = { typeUrl: "/cosmwasm.wasm.v1.CodeInfo", value: CodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + AccessConfig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CodeInfo.typeUrl, CodeInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(CodeInfo.aminoType, CodeInfo.typeUrl); function createBaseContractInfo(): ContractInfo { return { codeId: BigInt(0), @@ -820,10 +820,9 @@ export const ContractInfo = { typeUrl: "/cosmwasm.wasm.v1.ContractInfo", value: ContractInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ContractInfo.typeUrl, ContractInfo); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractInfo.aminoType, ContractInfo.typeUrl); function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { return { operation: 0, @@ -934,10 +933,11 @@ export const ContractCodeHistoryEntry = { typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", value: ContractCodeHistoryEntry.encode(message).finish() }; + }, + registerTypeUrl() { + AbsoluteTxPosition.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ContractCodeHistoryEntry.typeUrl, ContractCodeHistoryEntry); -GlobalDecoderRegistry.registerAminoProtoMapping(ContractCodeHistoryEntry.aminoType, ContractCodeHistoryEntry.typeUrl); function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { return { blockHeight: BigInt(0), @@ -1024,10 +1024,9 @@ export const AbsoluteTxPosition = { typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", value: AbsoluteTxPosition.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(AbsoluteTxPosition.typeUrl, AbsoluteTxPosition); -GlobalDecoderRegistry.registerAminoProtoMapping(AbsoluteTxPosition.aminoType, AbsoluteTxPosition.typeUrl); function createBaseModel(): Model { return { key: new Uint8Array(), @@ -1114,7 +1113,6 @@ export const Model = { typeUrl: "/cosmwasm.wasm.v1.Model", value: Model.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Model.typeUrl, Model); -GlobalDecoderRegistry.registerAminoProtoMapping(Model.aminoType, Model.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/extern.ts b/libs/interchainjs/src/extern.ts index c7325c58..7cbe4e00 100644 --- a/libs/interchainjs/src/extern.ts +++ b/libs/interchainjs/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/google/api/http.ts b/libs/interchainjs/src/google/api/http.ts index 3fd3a11b..92221c2c 100644 --- a/libs/interchainjs/src/google/api/http.ts +++ b/libs/interchainjs/src/google/api/http.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * Defines the HTTP configuration for an API service. It contains a list of * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method @@ -802,9 +801,11 @@ export const Http = { typeUrl: "/google.api.Http", value: Http.encode(message).finish() }; + }, + registerTypeUrl() { + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Http.typeUrl, Http); function createBaseHttpRule(): HttpRule { return { selector: "", @@ -982,9 +983,12 @@ export const HttpRule = { typeUrl: "/google.api.HttpRule", value: HttpRule.encode(message).finish() }; + }, + registerTypeUrl() { + CustomHttpPattern.registerTypeUrl(); + HttpRule.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(HttpRule.typeUrl, HttpRule); function createBaseCustomHttpPattern(): CustomHttpPattern { return { kind: "", @@ -1064,6 +1068,6 @@ export const CustomHttpPattern = { typeUrl: "/google.api.CustomHttpPattern", value: CustomHttpPattern.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(CustomHttpPattern.typeUrl, CustomHttpPattern); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/google/protobuf/any.ts b/libs/interchainjs/src/google/protobuf/any.ts index bbae1be1..ee7f0ff9 100644 --- a/libs/interchainjs/src/google/protobuf/any.ts +++ b/libs/interchainjs/src/google/protobuf/any.ts @@ -327,5 +327,6 @@ export const Any = { typeUrl: "/google.protobuf.Any", value: Any.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; \ No newline at end of file diff --git a/libs/interchainjs/src/google/protobuf/descriptor.ts b/libs/interchainjs/src/google/protobuf/descriptor.ts index 53b60923..486eb527 100644 --- a/libs/interchainjs/src/google/protobuf/descriptor.ts +++ b/libs/interchainjs/src/google/protobuf/descriptor.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** The full set of known editions. */ export enum Edition { /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ @@ -3156,9 +3155,11 @@ export const FileDescriptorSet = { typeUrl: "/google.protobuf.FileDescriptorSet", value: FileDescriptorSet.encode(message).finish() }; + }, + registerTypeUrl() { + FileDescriptorProto.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorSet.typeUrl, FileDescriptorSet); function createBaseFileDescriptorProto(): FileDescriptorProto { return { name: "", @@ -3402,9 +3403,16 @@ export const FileDescriptorProto = { typeUrl: "/google.protobuf.FileDescriptorProto", value: FileDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + ServiceDescriptorProto.registerTypeUrl(); + FieldDescriptorProto.registerTypeUrl(); + FileOptions.registerTypeUrl(); + SourceCodeInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileDescriptorProto.typeUrl, FileDescriptorProto); function createBaseDescriptorProto(): DescriptorProto { return { name: "", @@ -3596,9 +3604,17 @@ export const DescriptorProto = { typeUrl: "/google.protobuf.DescriptorProto", value: DescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldDescriptorProto.registerTypeUrl(); + DescriptorProto.registerTypeUrl(); + EnumDescriptorProto.registerTypeUrl(); + DescriptorProto_ExtensionRange.registerTypeUrl(); + OneofDescriptorProto.registerTypeUrl(); + MessageOptions.registerTypeUrl(); + DescriptorProto_ReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto.typeUrl, DescriptorProto); function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { return { start: 0, @@ -3690,9 +3706,11 @@ export const DescriptorProto_ExtensionRange = { typeUrl: "/google.protobuf.ExtensionRange", value: DescriptorProto_ExtensionRange.encode(message).finish() }; + }, + registerTypeUrl() { + ExtensionRangeOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DescriptorProto_ExtensionRange.typeUrl, DescriptorProto_ExtensionRange); function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { return { start: 0, @@ -3772,9 +3790,9 @@ export const DescriptorProto_ReservedRange = { typeUrl: "/google.protobuf.ReservedRange", value: DescriptorProto_ReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DescriptorProto_ReservedRange.typeUrl, DescriptorProto_ReservedRange); function createBaseExtensionRangeOptions(): ExtensionRangeOptions { return { uninterpretedOption: [], @@ -3882,9 +3900,13 @@ export const ExtensionRangeOptions = { typeUrl: "/google.protobuf.ExtensionRangeOptions", value: ExtensionRangeOptions.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption.registerTypeUrl(); + ExtensionRangeOptions_Declaration.registerTypeUrl(); + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtensionRangeOptions.typeUrl, ExtensionRangeOptions); function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration { return { number: 0, @@ -4000,9 +4022,9 @@ export const ExtensionRangeOptions_Declaration = { typeUrl: "/google.protobuf.Declaration", value: ExtensionRangeOptions_Declaration.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtensionRangeOptions_Declaration.typeUrl, ExtensionRangeOptions_Declaration); function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { name: "", @@ -4190,9 +4212,11 @@ export const FieldDescriptorProto = { typeUrl: "/google.protobuf.FieldDescriptorProto", value: FieldDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldDescriptorProto.typeUrl, FieldDescriptorProto); function createBaseOneofDescriptorProto(): OneofDescriptorProto { return { name: "", @@ -4272,9 +4296,11 @@ export const OneofDescriptorProto = { typeUrl: "/google.protobuf.OneofDescriptorProto", value: OneofDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + OneofOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofDescriptorProto.typeUrl, OneofDescriptorProto); function createBaseEnumDescriptorProto(): EnumDescriptorProto { return { name: "", @@ -4396,9 +4422,13 @@ export const EnumDescriptorProto = { typeUrl: "/google.protobuf.EnumDescriptorProto", value: EnumDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueDescriptorProto.registerTypeUrl(); + EnumOptions.registerTypeUrl(); + EnumDescriptorProto_EnumReservedRange.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumDescriptorProto.typeUrl, EnumDescriptorProto); function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { return { start: 0, @@ -4478,9 +4508,9 @@ export const EnumDescriptorProto_EnumReservedRange = { typeUrl: "/google.protobuf.EnumReservedRange", value: EnumDescriptorProto_EnumReservedRange.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EnumDescriptorProto_EnumReservedRange.typeUrl, EnumDescriptorProto_EnumReservedRange); function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { return { name: "", @@ -4572,9 +4602,11 @@ export const EnumValueDescriptorProto = { typeUrl: "/google.protobuf.EnumValueDescriptorProto", value: EnumValueDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + EnumValueOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueDescriptorProto.typeUrl, EnumValueDescriptorProto); function createBaseServiceDescriptorProto(): ServiceDescriptorProto { return { name: "", @@ -4668,9 +4700,12 @@ export const ServiceDescriptorProto = { typeUrl: "/google.protobuf.ServiceDescriptorProto", value: ServiceDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodDescriptorProto.registerTypeUrl(); + ServiceOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceDescriptorProto.typeUrl, ServiceDescriptorProto); function createBaseMethodDescriptorProto(): MethodDescriptorProto { return { name: "", @@ -4798,9 +4833,11 @@ export const MethodDescriptorProto = { typeUrl: "/google.protobuf.MethodDescriptorProto", value: MethodDescriptorProto.encode(message).finish() }; + }, + registerTypeUrl() { + MethodOptions.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodDescriptorProto.typeUrl, MethodDescriptorProto); function createBaseFileOptions(): FileOptions { return { javaPackage: "", @@ -5110,9 +5147,12 @@ export const FileOptions = { typeUrl: "/google.protobuf.FileOptions", value: FileOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FileOptions.typeUrl, FileOptions); function createBaseMessageOptions(): MessageOptions { return { messageSetWireFormat: false, @@ -5254,9 +5294,12 @@ export const MessageOptions = { typeUrl: "/google.protobuf.MessageOptions", value: MessageOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MessageOptions.typeUrl, MessageOptions); function createBaseFieldOptions(): FieldOptions { return { ctype: 1, @@ -5495,9 +5538,14 @@ export const FieldOptions = { typeUrl: "/google.protobuf.FieldOptions", value: FieldOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FieldOptions_EditionDefault.registerTypeUrl(); + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FieldOptions.typeUrl, FieldOptions); function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault { return { edition: 1, @@ -5577,9 +5625,9 @@ export const FieldOptions_EditionDefault = { typeUrl: "/google.protobuf.EditionDefault", value: FieldOptions_EditionDefault.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_EditionDefault.typeUrl, FieldOptions_EditionDefault); function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport { return { editionIntroduced: 1, @@ -5683,9 +5731,9 @@ export const FieldOptions_FeatureSupport = { typeUrl: "/google.protobuf.FeatureSupport", value: FieldOptions_FeatureSupport.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FieldOptions_FeatureSupport.typeUrl, FieldOptions_FeatureSupport); function createBaseOneofOptions(): OneofOptions { return { features: undefined, @@ -5767,9 +5815,12 @@ export const OneofOptions = { typeUrl: "/google.protobuf.OneofOptions", value: OneofOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(OneofOptions.typeUrl, OneofOptions); function createBaseEnumOptions(): EnumOptions { return { allowAlias: false, @@ -5887,9 +5938,12 @@ export const EnumOptions = { typeUrl: "/google.protobuf.EnumOptions", value: EnumOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumOptions.typeUrl, EnumOptions); function createBaseEnumValueOptions(): EnumValueOptions { return { deprecated: false, @@ -6007,9 +6061,13 @@ export const EnumValueOptions = { typeUrl: "/google.protobuf.EnumValueOptions", value: EnumValueOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + FieldOptions_FeatureSupport.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(EnumValueOptions.typeUrl, EnumValueOptions); function createBaseServiceOptions(): ServiceOptions { return { features: undefined, @@ -6103,9 +6161,12 @@ export const ServiceOptions = { typeUrl: "/google.protobuf.ServiceOptions", value: ServiceOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ServiceOptions.typeUrl, ServiceOptions); function createBaseMethodOptions(): MethodOptions { return { deprecated: false, @@ -6211,9 +6272,12 @@ export const MethodOptions = { typeUrl: "/google.protobuf.MethodOptions", value: MethodOptions.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); + UninterpretedOption.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MethodOptions.typeUrl, MethodOptions); function createBaseUninterpretedOption(): UninterpretedOption { return { name: [], @@ -6355,9 +6419,11 @@ export const UninterpretedOption = { typeUrl: "/google.protobuf.UninterpretedOption", value: UninterpretedOption.encode(message).finish() }; + }, + registerTypeUrl() { + UninterpretedOption_NamePart.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(UninterpretedOption.typeUrl, UninterpretedOption); function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { return { namePart: "", @@ -6437,9 +6503,9 @@ export const UninterpretedOption_NamePart = { typeUrl: "/google.protobuf.NamePart", value: UninterpretedOption_NamePart.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UninterpretedOption_NamePart.typeUrl, UninterpretedOption_NamePart); function createBaseFeatureSet(): FeatureSet { return { fieldPresence: 1, @@ -6567,9 +6633,9 @@ export const FeatureSet = { typeUrl: "/google.protobuf.FeatureSet", value: FeatureSet.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(FeatureSet.typeUrl, FeatureSet); function createBaseFeatureSetDefaults(): FeatureSetDefaults { return { defaults: [], @@ -6663,9 +6729,11 @@ export const FeatureSetDefaults = { typeUrl: "/google.protobuf.FeatureSetDefaults", value: FeatureSetDefaults.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSetDefaults_FeatureSetEditionDefault.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults.typeUrl, FeatureSetDefaults); function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault { return { edition: 1, @@ -6757,9 +6825,11 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = { typeUrl: "/google.protobuf.FeatureSetEditionDefault", value: FeatureSetDefaults_FeatureSetEditionDefault.encode(message).finish() }; + }, + registerTypeUrl() { + FeatureSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(FeatureSetDefaults_FeatureSetEditionDefault.typeUrl, FeatureSetDefaults_FeatureSetEditionDefault); function createBaseSourceCodeInfo(): SourceCodeInfo { return { location: [] @@ -6829,9 +6899,11 @@ export const SourceCodeInfo = { typeUrl: "/google.protobuf.SourceCodeInfo", value: SourceCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + SourceCodeInfo_Location.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SourceCodeInfo.typeUrl, SourceCodeInfo); function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { return { path: [], @@ -6971,9 +7043,9 @@ export const SourceCodeInfo_Location = { typeUrl: "/google.protobuf.Location", value: SourceCodeInfo_Location.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(SourceCodeInfo_Location.typeUrl, SourceCodeInfo_Location); function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { return { annotation: [] @@ -7043,9 +7115,11 @@ export const GeneratedCodeInfo = { typeUrl: "/google.protobuf.GeneratedCodeInfo", value: GeneratedCodeInfo.encode(message).finish() }; + }, + registerTypeUrl() { + GeneratedCodeInfo_Annotation.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(GeneratedCodeInfo.typeUrl, GeneratedCodeInfo); function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { return { path: [], @@ -7172,6 +7246,6 @@ export const GeneratedCodeInfo_Annotation = { typeUrl: "/google.protobuf.Annotation", value: GeneratedCodeInfo_Annotation.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(GeneratedCodeInfo_Annotation.typeUrl, GeneratedCodeInfo_Annotation); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/google/protobuf/duration.ts b/libs/interchainjs/src/google/protobuf/duration.ts index 6e3e301a..d7d60874 100644 --- a/libs/interchainjs/src/google/protobuf/duration.ts +++ b/libs/interchainjs/src/google/protobuf/duration.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Duration represents a signed, fixed-length span of time represented * as a count of seconds and fractions of seconds at nanosecond @@ -220,6 +219,6 @@ export const Duration = { typeUrl: "/google.protobuf.Duration", value: Duration.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Duration.typeUrl, Duration); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/google/protobuf/timestamp.ts b/libs/interchainjs/src/google/protobuf/timestamp.ts index d4d255b3..9e9baefe 100644 --- a/libs/interchainjs/src/google/protobuf/timestamp.ts +++ b/libs/interchainjs/src/google/protobuf/timestamp.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * A Timestamp represents a point in time independent of any time zone or local * calendar, encoded as a count of seconds and fractions of seconds at @@ -276,6 +275,6 @@ export const Timestamp = { typeUrl: "/google.protobuf.Timestamp", value: Timestamp.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Timestamp.typeUrl, Timestamp); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/helper-func-types.ts b/libs/interchainjs/src/helper-func-types.ts index 7c3f8421..a78ed1bc 100644 --- a/libs/interchainjs/src/helper-func-types.ts +++ b/libs/interchainjs/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -9,13 +9,16 @@ import { HttpEndpoint } from "@interchainjs/types"; import { BinaryReader, BinaryWriter } from "./binary"; import { getRpcClient } from "./extern"; import { isRpc, Rpc } from "./helpers"; +import { TelescopeGeneratedCodec } from "./types"; +import { GlobalDecoderRegistry } from "./registry"; export interface QueryBuilderOptions { encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter decode: (input: BinaryReader | Uint8Array, length?: number) => TRes service: string, method: string, - clientResolver?: RpcResolver + clientResolver?: RpcResolver, + deps?: TelescopeGeneratedCodec[], } export function buildQuery(opts: QueryBuilderOptions) { @@ -30,6 +33,8 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); + registerDependencies(opts.deps ?? []); + const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -73,6 +78,7 @@ export interface TxBuilderOptions { typeUrl: string, encoders?: Encoder[], converters?: AminoConverter[], + deps?: TelescopeGeneratedCodec[], } export function buildTx(opts: TxBuilderOptions) { @@ -94,6 +100,7 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); + registerDependencies(opts.deps ?? []); const data = [ { @@ -189,3 +196,9 @@ export interface AminoConverter { export type SigningClientResolver = string | HttpEndpoint | ISigningClient; export type RpcResolver = string | HttpEndpoint | Rpc ; + +function registerDependencies(deps: TelescopeGeneratedCodec[]) { + for (const dep of deps) { + dep.registerTypeUrl?.(); + } +} diff --git a/libs/interchainjs/src/helpers.ts b/libs/interchainjs/src/helpers.ts index 1f19575b..ab170adb 100644 --- a/libs/interchainjs/src/helpers.ts +++ b/libs/interchainjs/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/ibc/applications/transfer/v1/transfer.ts b/libs/interchainjs/src/ibc/applications/transfer/v1/transfer.ts index 12d6526c..8c1ecaaf 100644 --- a/libs/interchainjs/src/ibc/applications/transfer/v1/transfer.ts +++ b/libs/interchainjs/src/ibc/applications/transfer/v1/transfer.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Params defines the set of IBC transfer parameters. * NOTE: To prevent a single token from being transferred, set the @@ -185,10 +184,9 @@ export const Params = { typeUrl: "/ibc.applications.transfer.v1.Params", value: Params.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); function createBaseForwarding(): Forwarding { return { unwind: false, @@ -277,10 +275,11 @@ export const Forwarding = { typeUrl: "/ibc.applications.transfer.v1.Forwarding", value: Forwarding.encode(message).finish() }; + }, + registerTypeUrl() { + Hop.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Forwarding.typeUrl, Forwarding); -GlobalDecoderRegistry.registerAminoProtoMapping(Forwarding.aminoType, Forwarding.typeUrl); function createBaseHop(): Hop { return { portId: "", @@ -367,7 +366,6 @@ export const Hop = { typeUrl: "/ibc.applications.transfer.v1.Hop", value: Hop.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Hop.typeUrl, Hop); -GlobalDecoderRegistry.registerAminoProtoMapping(Hop.aminoType, Hop.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/applications/transfer/v1/tx.rpc.func.ts b/libs/interchainjs/src/ibc/applications/transfer/v1/tx.rpc.func.ts index 72028384..c38aa495 100644 --- a/libs/interchainjs/src/ibc/applications/transfer/v1/tx.rpc.func.ts +++ b/libs/interchainjs/src/ibc/applications/transfer/v1/tx.rpc.func.ts @@ -5,11 +5,13 @@ export const createTransfer = (clientResolver?: SigningClientResolver) => buildT clientResolver, typeUrl: MsgTransfer.typeUrl, encoders: toEncoders(MsgTransfer), - converters: toConverters(MsgTransfer) + converters: toConverters(MsgTransfer), + deps: [MsgTransfer] }); export const createUpdateParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/applications/transfer/v1/tx.ts b/libs/interchainjs/src/ibc/applications/transfer/v1/tx.ts index f4fb581c..4a5d9355 100644 --- a/libs/interchainjs/src/ibc/applications/transfer/v1/tx.ts +++ b/libs/interchainjs/src/ibc/applications/transfer/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v import { Forwarding, ForwardingAmino } from "./transfer"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between * ICS20 enabled chains. See ICS Spec here: @@ -330,10 +329,13 @@ export const MsgTransfer = { typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.encode(message).finish() }; + }, + registerTypeUrl() { + Coin.registerTypeUrl(); + Height.registerTypeUrl(); + Forwarding.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTransfer.typeUrl, MsgTransfer); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransfer.aminoType, MsgTransfer.typeUrl); function createBaseMsgTransferResponse(): MsgTransferResponse { return { sequence: BigInt(0) @@ -408,10 +410,9 @@ export const MsgTransferResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", value: MsgTransferResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTransferResponse.typeUrl, MsgTransferResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTransferResponse.aminoType, MsgTransferResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -498,10 +499,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -563,7 +565,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/channel/v1/channel.ts b/libs/interchainjs/src/ibc/core/channel/v1/channel.ts index 6965c083..aa87842c 100644 --- a/libs/interchainjs/src/ibc/core/channel/v1/channel.ts +++ b/libs/interchainjs/src/ibc/core/channel/v1/channel.ts @@ -1,7 +1,6 @@ import { Height, HeightAmino } from "../../client/v1/client"; import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a channel is in one of the following states: * CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED. @@ -614,10 +613,11 @@ export const Channel = { typeUrl: "/ibc.core.channel.v1.Channel", value: Channel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Channel.typeUrl, Channel); -GlobalDecoderRegistry.registerAminoProtoMapping(Channel.aminoType, Channel.typeUrl); function createBaseIdentifiedChannel(): IdentifiedChannel { return { state: 0, @@ -778,10 +778,11 @@ export const IdentifiedChannel = { typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", value: IdentifiedChannel.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedChannel.typeUrl, IdentifiedChannel); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedChannel.aminoType, IdentifiedChannel.typeUrl); function createBaseCounterparty(): Counterparty { return { portId: "", @@ -868,10 +869,9 @@ export const Counterparty = { typeUrl: "/ibc.core.channel.v1.Counterparty", value: Counterparty.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBasePacket(): Packet { return { sequence: BigInt(0), @@ -1030,10 +1030,11 @@ export const Packet = { typeUrl: "/ibc.core.channel.v1.Packet", value: Packet.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Packet.typeUrl, Packet); -GlobalDecoderRegistry.registerAminoProtoMapping(Packet.aminoType, Packet.typeUrl); function createBasePacketState(): PacketState { return { portId: "", @@ -1144,10 +1145,9 @@ export const PacketState = { typeUrl: "/ibc.core.channel.v1.PacketState", value: PacketState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketState.typeUrl, PacketState); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketState.aminoType, PacketState.typeUrl); function createBasePacketId(): PacketId { return { portId: "", @@ -1246,10 +1246,9 @@ export const PacketId = { typeUrl: "/ibc.core.channel.v1.PacketId", value: PacketId.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PacketId.typeUrl, PacketId); -GlobalDecoderRegistry.registerAminoProtoMapping(PacketId.aminoType, PacketId.typeUrl); function createBaseAcknowledgement(): Acknowledgement { return { result: undefined, @@ -1336,10 +1335,9 @@ export const Acknowledgement = { typeUrl: "/ibc.core.channel.v1.Acknowledgement", value: Acknowledgement.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Acknowledgement.typeUrl, Acknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(Acknowledgement.aminoType, Acknowledgement.typeUrl); function createBaseTimeout(): Timeout { return { height: Height.fromPartial({}), @@ -1426,10 +1424,11 @@ export const Timeout = { typeUrl: "/ibc.core.channel.v1.Timeout", value: Timeout.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Timeout.typeUrl, Timeout); -GlobalDecoderRegistry.registerAminoProtoMapping(Timeout.aminoType, Timeout.typeUrl); function createBaseParams(): Params { return { upgradeTimeout: Timeout.fromPartial({}) @@ -1504,7 +1503,8 @@ export const Params = { typeUrl: "/ibc.core.channel.v1.Params", value: Params.encode(message).finish() }; + }, + registerTypeUrl() { + Timeout.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/channel/v1/tx.rpc.func.ts b/libs/interchainjs/src/ibc/core/channel/v1/tx.rpc.func.ts index 92917fb9..10dad0fc 100644 --- a/libs/interchainjs/src/ibc/core/channel/v1/tx.rpc.func.ts +++ b/libs/interchainjs/src/ibc/core/channel/v1/tx.rpc.func.ts @@ -5,113 +5,132 @@ export const createChannelOpenInit = (clientResolver?: SigningClientResolver) => clientResolver, typeUrl: MsgChannelOpenInit.typeUrl, encoders: toEncoders(MsgChannelOpenInit), - converters: toConverters(MsgChannelOpenInit) + converters: toConverters(MsgChannelOpenInit), + deps: [MsgChannelOpenInit] }); export const createChannelOpenTry = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenTry.typeUrl, encoders: toEncoders(MsgChannelOpenTry), - converters: toConverters(MsgChannelOpenTry) + converters: toConverters(MsgChannelOpenTry), + deps: [MsgChannelOpenTry] }); export const createChannelOpenAck = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenAck.typeUrl, encoders: toEncoders(MsgChannelOpenAck), - converters: toConverters(MsgChannelOpenAck) + converters: toConverters(MsgChannelOpenAck), + deps: [MsgChannelOpenAck] }); export const createChannelOpenConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelOpenConfirm.typeUrl, encoders: toEncoders(MsgChannelOpenConfirm), - converters: toConverters(MsgChannelOpenConfirm) + converters: toConverters(MsgChannelOpenConfirm), + deps: [MsgChannelOpenConfirm] }); export const createChannelCloseInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelCloseInit.typeUrl, encoders: toEncoders(MsgChannelCloseInit), - converters: toConverters(MsgChannelCloseInit) + converters: toConverters(MsgChannelCloseInit), + deps: [MsgChannelCloseInit] }); export const createChannelCloseConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelCloseConfirm.typeUrl, encoders: toEncoders(MsgChannelCloseConfirm), - converters: toConverters(MsgChannelCloseConfirm) + converters: toConverters(MsgChannelCloseConfirm), + deps: [MsgChannelCloseConfirm] }); export const createRecvPacket = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRecvPacket.typeUrl, encoders: toEncoders(MsgRecvPacket), - converters: toConverters(MsgRecvPacket) + converters: toConverters(MsgRecvPacket), + deps: [MsgRecvPacket] }); export const createTimeout = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTimeout.typeUrl, encoders: toEncoders(MsgTimeout), - converters: toConverters(MsgTimeout) + converters: toConverters(MsgTimeout), + deps: [MsgTimeout] }); export const createTimeoutOnClose = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgTimeoutOnClose.typeUrl, encoders: toEncoders(MsgTimeoutOnClose), - converters: toConverters(MsgTimeoutOnClose) + converters: toConverters(MsgTimeoutOnClose), + deps: [MsgTimeoutOnClose] }); export const createAcknowledgement = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgAcknowledgement.typeUrl, encoders: toEncoders(MsgAcknowledgement), - converters: toConverters(MsgAcknowledgement) + converters: toConverters(MsgAcknowledgement), + deps: [MsgAcknowledgement] }); export const createChannelUpgradeInit = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeInit.typeUrl, encoders: toEncoders(MsgChannelUpgradeInit), - converters: toConverters(MsgChannelUpgradeInit) + converters: toConverters(MsgChannelUpgradeInit), + deps: [MsgChannelUpgradeInit] }); export const createChannelUpgradeTry = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeTry.typeUrl, encoders: toEncoders(MsgChannelUpgradeTry), - converters: toConverters(MsgChannelUpgradeTry) + converters: toConverters(MsgChannelUpgradeTry), + deps: [MsgChannelUpgradeTry] }); export const createChannelUpgradeAck = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeAck.typeUrl, encoders: toEncoders(MsgChannelUpgradeAck), - converters: toConverters(MsgChannelUpgradeAck) + converters: toConverters(MsgChannelUpgradeAck), + deps: [MsgChannelUpgradeAck] }); export const createChannelUpgradeConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeConfirm.typeUrl, encoders: toEncoders(MsgChannelUpgradeConfirm), - converters: toConverters(MsgChannelUpgradeConfirm) + converters: toConverters(MsgChannelUpgradeConfirm), + deps: [MsgChannelUpgradeConfirm] }); export const createChannelUpgradeOpen = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeOpen.typeUrl, encoders: toEncoders(MsgChannelUpgradeOpen), - converters: toConverters(MsgChannelUpgradeOpen) + converters: toConverters(MsgChannelUpgradeOpen), + deps: [MsgChannelUpgradeOpen] }); export const createChannelUpgradeTimeout = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeTimeout.typeUrl, encoders: toEncoders(MsgChannelUpgradeTimeout), - converters: toConverters(MsgChannelUpgradeTimeout) + converters: toConverters(MsgChannelUpgradeTimeout), + deps: [MsgChannelUpgradeTimeout] }); export const createChannelUpgradeCancel = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgChannelUpgradeCancel.typeUrl, encoders: toEncoders(MsgChannelUpgradeCancel), - converters: toConverters(MsgChannelUpgradeCancel) + converters: toConverters(MsgChannelUpgradeCancel), + deps: [MsgChannelUpgradeCancel] }); export const createUpdateChannelParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); export const createPruneAcknowledgements = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgPruneAcknowledgements.typeUrl, encoders: toEncoders(MsgPruneAcknowledgements), - converters: toConverters(MsgPruneAcknowledgements) + converters: toConverters(MsgPruneAcknowledgements), + deps: [MsgPruneAcknowledgements] }); \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/channel/v1/tx.ts b/libs/interchainjs/src/ibc/core/channel/v1/tx.ts index b7023355..b0ecaf62 100644 --- a/libs/interchainjs/src/ibc/core/channel/v1/tx.ts +++ b/libs/interchainjs/src/ibc/core/channel/v1/tx.ts @@ -3,7 +3,6 @@ import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client import { UpgradeFields, UpgradeFieldsAmino, Upgrade, UpgradeAmino, ErrorReceipt, ErrorReceiptAmino } from "./upgrade"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** ResponseResultType defines the possible outcomes of the execution of a message */ export enum ResponseResultType { /** RESPONSE_RESULT_TYPE_UNSPECIFIED - Default zero value enumeration */ @@ -996,10 +995,11 @@ export const MsgChannelOpenInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", value: MsgChannelOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenInit.typeUrl, MsgChannelOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInit.aminoType, MsgChannelOpenInit.typeUrl); function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { return { channelId: "", @@ -1086,10 +1086,9 @@ export const MsgChannelOpenInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", value: MsgChannelOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenInitResponse.typeUrl, MsgChannelOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenInitResponse.aminoType, MsgChannelOpenInitResponse.typeUrl); function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { return { portId: "", @@ -1236,10 +1235,12 @@ export const MsgChannelOpenTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", value: MsgChannelOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenTry.typeUrl, MsgChannelOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTry.aminoType, MsgChannelOpenTry.typeUrl); function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { return { version: "", @@ -1326,10 +1327,9 @@ export const MsgChannelOpenTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", value: MsgChannelOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenTryResponse.typeUrl, MsgChannelOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenTryResponse.aminoType, MsgChannelOpenTryResponse.typeUrl); function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { return { portId: "", @@ -1476,10 +1476,11 @@ export const MsgChannelOpenAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", value: MsgChannelOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenAck.typeUrl, MsgChannelOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAck.aminoType, MsgChannelOpenAck.typeUrl); function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { return {}; } @@ -1541,10 +1542,9 @@ export const MsgChannelOpenAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", value: MsgChannelOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenAckResponse.typeUrl, MsgChannelOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenAckResponse.aminoType, MsgChannelOpenAckResponse.typeUrl); function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { return { portId: "", @@ -1667,10 +1667,11 @@ export const MsgChannelOpenConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", value: MsgChannelOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirm.typeUrl, MsgChannelOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirm.aminoType, MsgChannelOpenConfirm.typeUrl); function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse { return {}; } @@ -1732,10 +1733,9 @@ export const MsgChannelOpenConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", value: MsgChannelOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelOpenConfirmResponse.typeUrl, MsgChannelOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelOpenConfirmResponse.aminoType, MsgChannelOpenConfirmResponse.typeUrl); function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { return { portId: "", @@ -1834,10 +1834,9 @@ export const MsgChannelCloseInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", value: MsgChannelCloseInit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInit.typeUrl, MsgChannelCloseInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInit.aminoType, MsgChannelCloseInit.typeUrl); function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { return {}; } @@ -1899,10 +1898,9 @@ export const MsgChannelCloseInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", value: MsgChannelCloseInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseInitResponse.typeUrl, MsgChannelCloseInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseInitResponse.aminoType, MsgChannelCloseInitResponse.typeUrl); function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { return { portId: "", @@ -2037,10 +2035,11 @@ export const MsgChannelCloseConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", value: MsgChannelCloseConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirm.typeUrl, MsgChannelCloseConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirm.aminoType, MsgChannelCloseConfirm.typeUrl); function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse { return {}; } @@ -2102,10 +2101,9 @@ export const MsgChannelCloseConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", value: MsgChannelCloseConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelCloseConfirmResponse.typeUrl, MsgChannelCloseConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelCloseConfirmResponse.aminoType, MsgChannelCloseConfirmResponse.typeUrl); function createBaseMsgRecvPacket(): MsgRecvPacket { return { packet: Packet.fromPartial({}), @@ -2216,10 +2214,12 @@ export const MsgRecvPacket = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", value: MsgRecvPacket.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgRecvPacket.typeUrl, MsgRecvPacket); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacket.aminoType, MsgRecvPacket.typeUrl); function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { return { result: 0 @@ -2294,10 +2294,9 @@ export const MsgRecvPacketResponse = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", value: MsgRecvPacketResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecvPacketResponse.typeUrl, MsgRecvPacketResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecvPacketResponse.aminoType, MsgRecvPacketResponse.typeUrl); function createBaseMsgTimeout(): MsgTimeout { return { packet: Packet.fromPartial({}), @@ -2420,10 +2419,12 @@ export const MsgTimeout = { typeUrl: "/ibc.core.channel.v1.MsgTimeout", value: MsgTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeout.typeUrl, MsgTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeout.aminoType, MsgTimeout.typeUrl); function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { return { result: 0 @@ -2498,10 +2499,9 @@ export const MsgTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", value: MsgTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutResponse.typeUrl, MsgTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutResponse.aminoType, MsgTimeoutResponse.typeUrl); function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { return { packet: Packet.fromPartial({}), @@ -2648,10 +2648,12 @@ export const MsgTimeoutOnClose = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", value: MsgTimeoutOnClose.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgTimeoutOnClose.typeUrl, MsgTimeoutOnClose); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnClose.aminoType, MsgTimeoutOnClose.typeUrl); function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { return { result: 0 @@ -2726,10 +2728,9 @@ export const MsgTimeoutOnCloseResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", value: MsgTimeoutOnCloseResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgTimeoutOnCloseResponse.typeUrl, MsgTimeoutOnCloseResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgTimeoutOnCloseResponse.aminoType, MsgTimeoutOnCloseResponse.typeUrl); function createBaseMsgAcknowledgement(): MsgAcknowledgement { return { packet: Packet.fromPartial({}), @@ -2852,10 +2853,12 @@ export const MsgAcknowledgement = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", value: MsgAcknowledgement.encode(message).finish() }; + }, + registerTypeUrl() { + Packet.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgAcknowledgement.typeUrl, MsgAcknowledgement); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgement.aminoType, MsgAcknowledgement.typeUrl); function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { return { result: 0 @@ -2930,10 +2933,9 @@ export const MsgAcknowledgementResponse = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", value: MsgAcknowledgementResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgAcknowledgementResponse.typeUrl, MsgAcknowledgementResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgAcknowledgementResponse.aminoType, MsgAcknowledgementResponse.typeUrl); function createBaseMsgChannelUpgradeInit(): MsgChannelUpgradeInit { return { portId: "", @@ -3044,10 +3046,11 @@ export const MsgChannelUpgradeInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInit", value: MsgChannelUpgradeInit.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInit.typeUrl, MsgChannelUpgradeInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInit.aminoType, MsgChannelUpgradeInit.typeUrl); function createBaseMsgChannelUpgradeInitResponse(): MsgChannelUpgradeInitResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3134,10 +3137,11 @@ export const MsgChannelUpgradeInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse", value: MsgChannelUpgradeInitResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeInitResponse.typeUrl, MsgChannelUpgradeInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeInitResponse.aminoType, MsgChannelUpgradeInitResponse.typeUrl); function createBaseMsgChannelUpgradeTry(): MsgChannelUpgradeTry { return { portId: "", @@ -3310,10 +3314,12 @@ export const MsgChannelUpgradeTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTry", value: MsgChannelUpgradeTry.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTry.typeUrl, MsgChannelUpgradeTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTry.aminoType, MsgChannelUpgradeTry.typeUrl); function createBaseMsgChannelUpgradeTryResponse(): MsgChannelUpgradeTryResponse { return { upgrade: Upgrade.fromPartial({}), @@ -3412,10 +3418,11 @@ export const MsgChannelUpgradeTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse", value: MsgChannelUpgradeTryResponse.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTryResponse.typeUrl, MsgChannelUpgradeTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTryResponse.aminoType, MsgChannelUpgradeTryResponse.typeUrl); function createBaseMsgChannelUpgradeAck(): MsgChannelUpgradeAck { return { portId: "", @@ -3562,10 +3569,12 @@ export const MsgChannelUpgradeAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAck", value: MsgChannelUpgradeAck.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAck.typeUrl, MsgChannelUpgradeAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAck.aminoType, MsgChannelUpgradeAck.typeUrl); function createBaseMsgChannelUpgradeAckResponse(): MsgChannelUpgradeAckResponse { return { result: 0 @@ -3640,10 +3649,9 @@ export const MsgChannelUpgradeAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse", value: MsgChannelUpgradeAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeAckResponse.typeUrl, MsgChannelUpgradeAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeAckResponse.aminoType, MsgChannelUpgradeAckResponse.typeUrl); function createBaseMsgChannelUpgradeConfirm(): MsgChannelUpgradeConfirm { return { portId: "", @@ -3802,10 +3810,12 @@ export const MsgChannelUpgradeConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirm", value: MsgChannelUpgradeConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Upgrade.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirm.typeUrl, MsgChannelUpgradeConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirm.aminoType, MsgChannelUpgradeConfirm.typeUrl); function createBaseMsgChannelUpgradeConfirmResponse(): MsgChannelUpgradeConfirmResponse { return { result: 0 @@ -3880,10 +3890,9 @@ export const MsgChannelUpgradeConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", value: MsgChannelUpgradeConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeConfirmResponse.typeUrl, MsgChannelUpgradeConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeConfirmResponse.aminoType, MsgChannelUpgradeConfirmResponse.typeUrl); function createBaseMsgChannelUpgradeOpen(): MsgChannelUpgradeOpen { return { portId: "", @@ -4030,10 +4039,11 @@ export const MsgChannelUpgradeOpen = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpen", value: MsgChannelUpgradeOpen.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpen.typeUrl, MsgChannelUpgradeOpen); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpen.aminoType, MsgChannelUpgradeOpen.typeUrl); function createBaseMsgChannelUpgradeOpenResponse(): MsgChannelUpgradeOpenResponse { return {}; } @@ -4095,10 +4105,9 @@ export const MsgChannelUpgradeOpenResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", value: MsgChannelUpgradeOpenResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeOpenResponse.typeUrl, MsgChannelUpgradeOpenResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeOpenResponse.aminoType, MsgChannelUpgradeOpenResponse.typeUrl); function createBaseMsgChannelUpgradeTimeout(): MsgChannelUpgradeTimeout { return { portId: "", @@ -4233,10 +4242,12 @@ export const MsgChannelUpgradeTimeout = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeout", value: MsgChannelUpgradeTimeout.encode(message).finish() }; + }, + registerTypeUrl() { + Channel.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeout.typeUrl, MsgChannelUpgradeTimeout); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeout.aminoType, MsgChannelUpgradeTimeout.typeUrl); function createBaseMsgChannelUpgradeTimeoutResponse(): MsgChannelUpgradeTimeoutResponse { return {}; } @@ -4298,10 +4309,9 @@ export const MsgChannelUpgradeTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", value: MsgChannelUpgradeTimeoutResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeTimeoutResponse.typeUrl, MsgChannelUpgradeTimeoutResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeTimeoutResponse.aminoType, MsgChannelUpgradeTimeoutResponse.typeUrl); function createBaseMsgChannelUpgradeCancel(): MsgChannelUpgradeCancel { return { portId: "", @@ -4436,10 +4446,12 @@ export const MsgChannelUpgradeCancel = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancel", value: MsgChannelUpgradeCancel.encode(message).finish() }; + }, + registerTypeUrl() { + ErrorReceipt.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancel.typeUrl, MsgChannelUpgradeCancel); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancel.aminoType, MsgChannelUpgradeCancel.typeUrl); function createBaseMsgChannelUpgradeCancelResponse(): MsgChannelUpgradeCancelResponse { return {}; } @@ -4501,10 +4513,9 @@ export const MsgChannelUpgradeCancelResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", value: MsgChannelUpgradeCancelResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgChannelUpgradeCancelResponse.typeUrl, MsgChannelUpgradeCancelResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgChannelUpgradeCancelResponse.aminoType, MsgChannelUpgradeCancelResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", @@ -4591,10 +4602,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -4656,10 +4668,9 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.channel.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); function createBaseMsgPruneAcknowledgements(): MsgPruneAcknowledgements { return { portId: "", @@ -4770,10 +4781,9 @@ export const MsgPruneAcknowledgements = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgements", value: MsgPruneAcknowledgements.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgPruneAcknowledgements.typeUrl, MsgPruneAcknowledgements); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgements.aminoType, MsgPruneAcknowledgements.typeUrl); function createBaseMsgPruneAcknowledgementsResponse(): MsgPruneAcknowledgementsResponse { return { totalPrunedSequences: BigInt(0), @@ -4860,7 +4870,6 @@ export const MsgPruneAcknowledgementsResponse = { typeUrl: "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", value: MsgPruneAcknowledgementsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgPruneAcknowledgementsResponse.typeUrl, MsgPruneAcknowledgementsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgPruneAcknowledgementsResponse.aminoType, MsgPruneAcknowledgementsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/channel/v1/upgrade.ts b/libs/interchainjs/src/ibc/core/channel/v1/upgrade.ts index 8ce98e36..4b7a4477 100644 --- a/libs/interchainjs/src/ibc/core/channel/v1/upgrade.ts +++ b/libs/interchainjs/src/ibc/core/channel/v1/upgrade.ts @@ -1,7 +1,6 @@ import { Timeout, TimeoutAmino, Order } from "./channel"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, isSet } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * Upgrade is a verifiable type which contains the relevant information * for an attempted upgrade. It provides the proposed changes to the channel @@ -188,10 +187,12 @@ export const Upgrade = { typeUrl: "/ibc.core.channel.v1.Upgrade", value: Upgrade.encode(message).finish() }; + }, + registerTypeUrl() { + UpgradeFields.registerTypeUrl(); + Timeout.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Upgrade.typeUrl, Upgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(Upgrade.aminoType, Upgrade.typeUrl); function createBaseUpgradeFields(): UpgradeFields { return { ordering: 0, @@ -292,10 +293,9 @@ export const UpgradeFields = { typeUrl: "/ibc.core.channel.v1.UpgradeFields", value: UpgradeFields.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(UpgradeFields.typeUrl, UpgradeFields); -GlobalDecoderRegistry.registerAminoProtoMapping(UpgradeFields.aminoType, UpgradeFields.typeUrl); function createBaseErrorReceipt(): ErrorReceipt { return { sequence: BigInt(0), @@ -382,7 +382,6 @@ export const ErrorReceipt = { typeUrl: "/ibc.core.channel.v1.ErrorReceipt", value: ErrorReceipt.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ErrorReceipt.typeUrl, ErrorReceipt); -GlobalDecoderRegistry.registerAminoProtoMapping(ErrorReceipt.aminoType, ErrorReceipt.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/client/v1/client.ts b/libs/interchainjs/src/ibc/core/client/v1/client.ts index f6c36539..326bb611 100644 --- a/libs/interchainjs/src/ibc/core/client/v1/client.ts +++ b/libs/interchainjs/src/ibc/core/client/v1/client.ts @@ -1,7 +1,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * IdentifiedClientState defines a client state with an additional client * identifier field. @@ -248,10 +247,9 @@ export const IdentifiedClientState = { typeUrl: "/ibc.core.client.v1.IdentifiedClientState", value: IdentifiedClientState.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(IdentifiedClientState.typeUrl, IdentifiedClientState); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedClientState.aminoType, IdentifiedClientState.typeUrl); function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { return { height: Height.fromPartial({}), @@ -338,10 +336,9 @@ export const ConsensusStateWithHeight = { typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", value: ConsensusStateWithHeight.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConsensusStateWithHeight.typeUrl, ConsensusStateWithHeight); -GlobalDecoderRegistry.registerAminoProtoMapping(ConsensusStateWithHeight.aminoType, ConsensusStateWithHeight.typeUrl); function createBaseClientConsensusStates(): ClientConsensusStates { return { clientId: "", @@ -430,10 +427,11 @@ export const ClientConsensusStates = { typeUrl: "/ibc.core.client.v1.ClientConsensusStates", value: ClientConsensusStates.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusStateWithHeight.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ClientConsensusStates.typeUrl, ClientConsensusStates); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientConsensusStates.aminoType, ClientConsensusStates.typeUrl); function createBaseHeight(): Height { return { revisionNumber: BigInt(0), @@ -516,10 +514,9 @@ export const Height = { typeUrl: "/ibc.core.client.v1.Height", value: Height.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Height.typeUrl, Height); -GlobalDecoderRegistry.registerAminoProtoMapping(Height.aminoType, Height.typeUrl); function createBaseParams(): Params { return { allowedClients: [] @@ -596,7 +593,6 @@ export const Params = { typeUrl: "/ibc.core.client.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/client/v1/tx.rpc.func.ts b/libs/interchainjs/src/ibc/core/client/v1/tx.rpc.func.ts index a178d5d2..456651dd 100644 --- a/libs/interchainjs/src/ibc/core/client/v1/tx.rpc.func.ts +++ b/libs/interchainjs/src/ibc/core/client/v1/tx.rpc.func.ts @@ -5,41 +5,48 @@ export const createCreateClient = (clientResolver?: SigningClientResolver) => bu clientResolver, typeUrl: MsgCreateClient.typeUrl, encoders: toEncoders(MsgCreateClient), - converters: toConverters(MsgCreateClient) + converters: toConverters(MsgCreateClient), + deps: [MsgCreateClient] }); export const createUpdateClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateClient.typeUrl, encoders: toEncoders(MsgUpdateClient), - converters: toConverters(MsgUpdateClient) + converters: toConverters(MsgUpdateClient), + deps: [MsgUpdateClient] }); export const createUpgradeClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpgradeClient.typeUrl, encoders: toEncoders(MsgUpgradeClient), - converters: toConverters(MsgUpgradeClient) + converters: toConverters(MsgUpgradeClient), + deps: [MsgUpgradeClient] }); export const createSubmitMisbehaviour = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgSubmitMisbehaviour.typeUrl, encoders: toEncoders(MsgSubmitMisbehaviour), - converters: toConverters(MsgSubmitMisbehaviour) + converters: toConverters(MsgSubmitMisbehaviour), + deps: [MsgSubmitMisbehaviour] }); export const createRecoverClient = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgRecoverClient.typeUrl, encoders: toEncoders(MsgRecoverClient), - converters: toConverters(MsgRecoverClient) + converters: toConverters(MsgRecoverClient), + deps: [MsgRecoverClient] }); export const createIBCSoftwareUpgrade = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgIBCSoftwareUpgrade.typeUrl, encoders: toEncoders(MsgIBCSoftwareUpgrade), - converters: toConverters(MsgIBCSoftwareUpgrade) + converters: toConverters(MsgIBCSoftwareUpgrade), + deps: [MsgIBCSoftwareUpgrade] }); export const createUpdateClientParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/client/v1/tx.ts b/libs/interchainjs/src/ibc/core/client/v1/tx.ts index c0281aac..99b3dca1 100644 --- a/libs/interchainjs/src/ibc/core/client/v1/tx.ts +++ b/libs/interchainjs/src/ibc/core/client/v1/tx.ts @@ -3,7 +3,6 @@ import { Plan, PlanAmino } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import { Params, ParamsAmino } from "./client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** MsgCreateClient defines a message to create an IBC client */ export interface MsgCreateClient { /** light client state */ @@ -450,10 +449,9 @@ export const MsgCreateClient = { typeUrl: "/ibc.core.client.v1.MsgCreateClient", value: MsgCreateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClient.typeUrl, MsgCreateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClient.aminoType, MsgCreateClient.typeUrl); function createBaseMsgCreateClientResponse(): MsgCreateClientResponse { return { clientId: "" @@ -528,10 +526,9 @@ export const MsgCreateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", value: MsgCreateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgCreateClientResponse.typeUrl, MsgCreateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgCreateClientResponse.aminoType, MsgCreateClientResponse.typeUrl); function createBaseMsgUpdateClient(): MsgUpdateClient { return { clientId: "", @@ -630,10 +627,9 @@ export const MsgUpdateClient = { typeUrl: "/ibc.core.client.v1.MsgUpdateClient", value: MsgUpdateClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClient.typeUrl, MsgUpdateClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClient.aminoType, MsgUpdateClient.typeUrl); function createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse { return {}; } @@ -695,10 +691,9 @@ export const MsgUpdateClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", value: MsgUpdateClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpdateClientResponse.typeUrl, MsgUpdateClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateClientResponse.aminoType, MsgUpdateClientResponse.typeUrl); function createBaseMsgUpgradeClient(): MsgUpgradeClient { return { clientId: "", @@ -833,10 +828,9 @@ export const MsgUpgradeClient = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", value: MsgUpgradeClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClient.typeUrl, MsgUpgradeClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClient.aminoType, MsgUpgradeClient.typeUrl); function createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse { return {}; } @@ -898,10 +892,9 @@ export const MsgUpgradeClientResponse = { typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", value: MsgUpgradeClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgUpgradeClientResponse.typeUrl, MsgUpgradeClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpgradeClientResponse.aminoType, MsgUpgradeClientResponse.typeUrl); function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { return { clientId: "", @@ -1000,10 +993,9 @@ export const MsgSubmitMisbehaviour = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", value: MsgSubmitMisbehaviour.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviour.typeUrl, MsgSubmitMisbehaviour); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviour.aminoType, MsgSubmitMisbehaviour.typeUrl); function createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourResponse { return {}; } @@ -1065,10 +1057,9 @@ export const MsgSubmitMisbehaviourResponse = { typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", value: MsgSubmitMisbehaviourResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgSubmitMisbehaviourResponse.typeUrl, MsgSubmitMisbehaviourResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgSubmitMisbehaviourResponse.aminoType, MsgSubmitMisbehaviourResponse.typeUrl); function createBaseMsgRecoverClient(): MsgRecoverClient { return { subjectClientId: "", @@ -1167,10 +1158,9 @@ export const MsgRecoverClient = { typeUrl: "/ibc.core.client.v1.MsgRecoverClient", value: MsgRecoverClient.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClient.typeUrl, MsgRecoverClient); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClient.aminoType, MsgRecoverClient.typeUrl); function createBaseMsgRecoverClientResponse(): MsgRecoverClientResponse { return {}; } @@ -1232,10 +1222,9 @@ export const MsgRecoverClientResponse = { typeUrl: "/ibc.core.client.v1.MsgRecoverClientResponse", value: MsgRecoverClientResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgRecoverClientResponse.typeUrl, MsgRecoverClientResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgRecoverClientResponse.aminoType, MsgRecoverClientResponse.typeUrl); function createBaseMsgIBCSoftwareUpgrade(): MsgIBCSoftwareUpgrade { return { plan: Plan.fromPartial({}), @@ -1334,10 +1323,9 @@ export const MsgIBCSoftwareUpgrade = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgrade", value: MsgIBCSoftwareUpgrade.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgrade.typeUrl, MsgIBCSoftwareUpgrade); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgrade.aminoType, MsgIBCSoftwareUpgrade.typeUrl); function createBaseMsgIBCSoftwareUpgradeResponse(): MsgIBCSoftwareUpgradeResponse { return {}; } @@ -1399,10 +1387,9 @@ export const MsgIBCSoftwareUpgradeResponse = { typeUrl: "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse", value: MsgIBCSoftwareUpgradeResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgIBCSoftwareUpgradeResponse.typeUrl, MsgIBCSoftwareUpgradeResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgIBCSoftwareUpgradeResponse.aminoType, MsgIBCSoftwareUpgradeResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1489,10 +1476,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.client.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1554,7 +1542,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.client.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/commitment/v1/commitment.ts b/libs/interchainjs/src/ibc/core/commitment/v1/commitment.ts index 051efcdf..b66229f3 100644 --- a/libs/interchainjs/src/ibc/core/commitment/v1/commitment.ts +++ b/libs/interchainjs/src/ibc/core/commitment/v1/commitment.ts @@ -1,7 +1,6 @@ import { CommitmentProof, CommitmentProofAmino } from "../../../../cosmos/ics23/v1/proofs"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MerkleRoot defines a merkle root hash. * In the Cosmos SDK, the AppHash of a block header becomes the root. @@ -150,10 +149,9 @@ export const MerkleRoot = { typeUrl: "/ibc.core.commitment.v1.MerkleRoot", value: MerkleRoot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerkleRoot.typeUrl, MerkleRoot); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleRoot.aminoType, MerkleRoot.typeUrl); function createBaseMerklePrefix(): MerklePrefix { return { keyPrefix: new Uint8Array() @@ -228,10 +226,9 @@ export const MerklePrefix = { typeUrl: "/ibc.core.commitment.v1.MerklePrefix", value: MerklePrefix.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MerklePrefix.typeUrl, MerklePrefix); -GlobalDecoderRegistry.registerAminoProtoMapping(MerklePrefix.aminoType, MerklePrefix.typeUrl); function createBaseMerkleProof(): MerkleProof { return { proofs: [] @@ -308,7 +305,8 @@ export const MerkleProof = { typeUrl: "/ibc.core.commitment.v1.MerkleProof", value: MerkleProof.encode(message).finish() }; + }, + registerTypeUrl() { + CommitmentProof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(MerkleProof.typeUrl, MerkleProof); -GlobalDecoderRegistry.registerAminoProtoMapping(MerkleProof.aminoType, MerkleProof.typeUrl); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/connection/v1/connection.ts b/libs/interchainjs/src/ibc/core/connection/v1/connection.ts index 1791709d..ed473558 100644 --- a/libs/interchainjs/src/ibc/core/connection/v1/connection.ts +++ b/libs/interchainjs/src/ibc/core/connection/v1/connection.ts @@ -1,7 +1,6 @@ import { MerklePrefix, MerklePrefixAmino } from "../../commitment/v1/commitment"; import { isSet, DeepPartial } from "../../../../helpers"; import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * State defines if a connection is in one of the following states: * INIT, TRYOPEN, OPEN or UNINITIALIZED. @@ -420,10 +419,12 @@ export const ConnectionEnd = { typeUrl: "/ibc.core.connection.v1.ConnectionEnd", value: ConnectionEnd.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConnectionEnd.typeUrl, ConnectionEnd); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionEnd.aminoType, ConnectionEnd.typeUrl); function createBaseIdentifiedConnection(): IdentifiedConnection { return { id: "", @@ -560,10 +561,12 @@ export const IdentifiedConnection = { typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", value: IdentifiedConnection.encode(message).finish() }; + }, + registerTypeUrl() { + Version.registerTypeUrl(); + Counterparty.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(IdentifiedConnection.typeUrl, IdentifiedConnection); -GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedConnection.aminoType, IdentifiedConnection.typeUrl); function createBaseCounterparty(): Counterparty { return { clientId: "", @@ -662,10 +665,11 @@ export const Counterparty = { typeUrl: "/ibc.core.connection.v1.Counterparty", value: Counterparty.encode(message).finish() }; + }, + registerTypeUrl() { + MerklePrefix.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Counterparty.typeUrl, Counterparty); -GlobalDecoderRegistry.registerAminoProtoMapping(Counterparty.aminoType, Counterparty.typeUrl); function createBaseClientPaths(): ClientPaths { return { paths: [] @@ -742,10 +746,9 @@ export const ClientPaths = { typeUrl: "/ibc.core.connection.v1.ClientPaths", value: ClientPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ClientPaths.typeUrl, ClientPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ClientPaths.aminoType, ClientPaths.typeUrl); function createBaseConnectionPaths(): ConnectionPaths { return { clientId: "", @@ -834,10 +837,9 @@ export const ConnectionPaths = { typeUrl: "/ibc.core.connection.v1.ConnectionPaths", value: ConnectionPaths.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ConnectionPaths.typeUrl, ConnectionPaths); -GlobalDecoderRegistry.registerAminoProtoMapping(ConnectionPaths.aminoType, ConnectionPaths.typeUrl); function createBaseVersion(): Version { return { identifier: "", @@ -926,10 +928,9 @@ export const Version = { typeUrl: "/ibc.core.connection.v1.Version", value: Version.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Version.typeUrl, Version); -GlobalDecoderRegistry.registerAminoProtoMapping(Version.aminoType, Version.typeUrl); function createBaseParams(): Params { return { maxExpectedTimePerBlock: BigInt(0) @@ -1004,7 +1005,6 @@ export const Params = { typeUrl: "/ibc.core.connection.v1.Params", value: Params.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Params.typeUrl, Params); -GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/connection/v1/tx.rpc.func.ts b/libs/interchainjs/src/ibc/core/connection/v1/tx.rpc.func.ts index c6b7e37d..6ee23357 100644 --- a/libs/interchainjs/src/ibc/core/connection/v1/tx.rpc.func.ts +++ b/libs/interchainjs/src/ibc/core/connection/v1/tx.rpc.func.ts @@ -5,29 +5,34 @@ export const createConnectionOpenInit = (clientResolver?: SigningClientResolver) clientResolver, typeUrl: MsgConnectionOpenInit.typeUrl, encoders: toEncoders(MsgConnectionOpenInit), - converters: toConverters(MsgConnectionOpenInit) + converters: toConverters(MsgConnectionOpenInit), + deps: [MsgConnectionOpenInit] }); export const createConnectionOpenTry = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenTry.typeUrl, encoders: toEncoders(MsgConnectionOpenTry), - converters: toConverters(MsgConnectionOpenTry) + converters: toConverters(MsgConnectionOpenTry), + deps: [MsgConnectionOpenTry] }); export const createConnectionOpenAck = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenAck.typeUrl, encoders: toEncoders(MsgConnectionOpenAck), - converters: toConverters(MsgConnectionOpenAck) + converters: toConverters(MsgConnectionOpenAck), + deps: [MsgConnectionOpenAck] }); export const createConnectionOpenConfirm = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgConnectionOpenConfirm.typeUrl, encoders: toEncoders(MsgConnectionOpenConfirm), - converters: toConverters(MsgConnectionOpenConfirm) + converters: toConverters(MsgConnectionOpenConfirm), + deps: [MsgConnectionOpenConfirm] }); export const createUpdateConnectionParams = (clientResolver?: SigningClientResolver) => buildTx({ clientResolver, typeUrl: MsgUpdateParams.typeUrl, encoders: toEncoders(MsgUpdateParams), - converters: toConverters(MsgUpdateParams) + converters: toConverters(MsgUpdateParams), + deps: [MsgUpdateParams] }); \ No newline at end of file diff --git a/libs/interchainjs/src/ibc/core/connection/v1/tx.ts b/libs/interchainjs/src/ibc/core/connection/v1/tx.ts index fd194d48..82afa89d 100644 --- a/libs/interchainjs/src/ibc/core/connection/v1/tx.ts +++ b/libs/interchainjs/src/ibc/core/connection/v1/tx.ts @@ -3,7 +3,6 @@ import { Any, AnyAmino } from "../../../../google/protobuf/any"; import { Height, HeightAmino, Params, ParamsAmino } from "../../client/v1/client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -import { GlobalDecoderRegistry } from "../../../../registry"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to * initialize a connection with Chain B. @@ -436,10 +435,12 @@ export const MsgConnectionOpenInit = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", value: MsgConnectionOpenInit.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenInit.typeUrl, MsgConnectionOpenInit); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInit.aminoType, MsgConnectionOpenInit.typeUrl); function createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitResponse { return {}; } @@ -501,10 +502,9 @@ export const MsgConnectionOpenInitResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", value: MsgConnectionOpenInitResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenInitResponse.typeUrl, MsgConnectionOpenInitResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenInitResponse.aminoType, MsgConnectionOpenInitResponse.typeUrl); function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { return { clientId: "", @@ -725,10 +725,13 @@ export const MsgConnectionOpenTry = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", value: MsgConnectionOpenTry.encode(message).finish() }; + }, + registerTypeUrl() { + Counterparty.registerTypeUrl(); + Version.registerTypeUrl(); + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenTry.typeUrl, MsgConnectionOpenTry); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTry.aminoType, MsgConnectionOpenTry.typeUrl); function createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse { return {}; } @@ -790,10 +793,9 @@ export const MsgConnectionOpenTryResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", value: MsgConnectionOpenTryResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenTryResponse.typeUrl, MsgConnectionOpenTryResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenTryResponse.aminoType, MsgConnectionOpenTryResponse.typeUrl); function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { return { connectionId: "", @@ -988,10 +990,11 @@ export const MsgConnectionOpenAck = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", value: MsgConnectionOpenAck.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenAck.typeUrl, MsgConnectionOpenAck); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAck.aminoType, MsgConnectionOpenAck.typeUrl); function createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse { return {}; } @@ -1053,10 +1056,9 @@ export const MsgConnectionOpenAckResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", value: MsgConnectionOpenAckResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenAckResponse.typeUrl, MsgConnectionOpenAckResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenAckResponse.aminoType, MsgConnectionOpenAckResponse.typeUrl); function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { return { connectionId: "", @@ -1167,10 +1169,11 @@ export const MsgConnectionOpenConfirm = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", value: MsgConnectionOpenConfirm.encode(message).finish() }; + }, + registerTypeUrl() { + Height.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirm.typeUrl, MsgConnectionOpenConfirm); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirm.aminoType, MsgConnectionOpenConfirm.typeUrl); function createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmResponse { return {}; } @@ -1232,10 +1235,9 @@ export const MsgConnectionOpenConfirmResponse = { typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", value: MsgConnectionOpenConfirmResponse.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(MsgConnectionOpenConfirmResponse.typeUrl, MsgConnectionOpenConfirmResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgConnectionOpenConfirmResponse.aminoType, MsgConnectionOpenConfirmResponse.typeUrl); function createBaseMsgUpdateParams(): MsgUpdateParams { return { signer: "", @@ -1322,10 +1324,11 @@ export const MsgUpdateParams = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; + }, + registerTypeUrl() { + Params.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(MsgUpdateParams.typeUrl, MsgUpdateParams); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParams.aminoType, MsgUpdateParams.typeUrl); function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } @@ -1387,7 +1390,6 @@ export const MsgUpdateParamsResponse = { typeUrl: "/ibc.core.connection.v1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(MsgUpdateParamsResponse.typeUrl, MsgUpdateParamsResponse); -GlobalDecoderRegistry.registerAminoProtoMapping(MsgUpdateParamsResponse.aminoType, MsgUpdateParamsResponse.typeUrl); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/injective/types/v1beta1/account.ts b/libs/interchainjs/src/injective/types/v1beta1/account.ts index 08000833..a16b528f 100644 --- a/libs/interchainjs/src/injective/types/v1beta1/account.ts +++ b/libs/interchainjs/src/injective/types/v1beta1/account.ts @@ -1,7 +1,7 @@ import { BaseAccount, BaseAccountAmino } from "../../../cosmos/auth/v1beta1/auth"; import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; import { GlobalDecoderRegistry } from "../../../registry"; +import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; /** * EthAccount implements the authtypes.AccountI interface and embeds an * authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. @@ -105,6 +105,9 @@ export const EthAccount = { typeUrl: "/injective.types.v1beta1.EthAccount", value: EthAccount.encode(message).finish() }; + }, + registerTypeUrl() { + GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); + BaseAccount.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EthAccount.typeUrl, EthAccount); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/registry.ts b/libs/interchainjs/src/registry.ts index dee026ae..e7f6497f 100644 --- a/libs/interchainjs/src/registry.ts +++ b/libs/interchainjs/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/tendermint/abci/types.ts b/libs/interchainjs/src/tendermint/abci/types.ts index 4759afd1..812f015a 100644 --- a/libs/interchainjs/src/tendermint/abci/types.ts +++ b/libs/interchainjs/src/tendermint/abci/types.ts @@ -5,7 +5,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BlockIDFlag } from "../types/validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export enum CheckTxType { NEW = 0, RECHECK = 1, @@ -1617,9 +1616,26 @@ export const Request = { typeUrl: "/tendermint.abci.Request", value: Request.encode(message).finish() }; + }, + registerTypeUrl() { + RequestEcho.registerTypeUrl(); + RequestFlush.registerTypeUrl(); + RequestInfo.registerTypeUrl(); + RequestInitChain.registerTypeUrl(); + RequestQuery.registerTypeUrl(); + RequestCheckTx.registerTypeUrl(); + RequestCommit.registerTypeUrl(); + RequestListSnapshots.registerTypeUrl(); + RequestOfferSnapshot.registerTypeUrl(); + RequestLoadSnapshotChunk.registerTypeUrl(); + RequestApplySnapshotChunk.registerTypeUrl(); + RequestPrepareProposal.registerTypeUrl(); + RequestProcessProposal.registerTypeUrl(); + RequestExtendVote.registerTypeUrl(); + RequestVerifyVoteExtension.registerTypeUrl(); + RequestFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Request.typeUrl, Request); function createBaseRequestEcho(): RequestEcho { return { message: "" @@ -1687,9 +1703,9 @@ export const RequestEcho = { typeUrl: "/tendermint.abci.RequestEcho", value: RequestEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestEcho.typeUrl, RequestEcho); function createBaseRequestFlush(): RequestFlush { return {}; } @@ -1744,9 +1760,9 @@ export const RequestFlush = { typeUrl: "/tendermint.abci.RequestFlush", value: RequestFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestFlush.typeUrl, RequestFlush); function createBaseRequestInfo(): RequestInfo { return { version: "", @@ -1850,9 +1866,9 @@ export const RequestInfo = { typeUrl: "/tendermint.abci.RequestInfo", value: RequestInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestInfo.typeUrl, RequestInfo); function createBaseRequestInitChain(): RequestInitChain { return { time: new Date(), @@ -1982,9 +1998,12 @@ export const RequestInitChain = { typeUrl: "/tendermint.abci.RequestInitChain", value: RequestInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestInitChain.typeUrl, RequestInitChain); function createBaseRequestQuery(): RequestQuery { return { data: new Uint8Array(), @@ -2088,9 +2107,9 @@ export const RequestQuery = { typeUrl: "/tendermint.abci.RequestQuery", value: RequestQuery.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestQuery.typeUrl, RequestQuery); function createBaseRequestCheckTx(): RequestCheckTx { return { tx: new Uint8Array(), @@ -2170,9 +2189,9 @@ export const RequestCheckTx = { typeUrl: "/tendermint.abci.RequestCheckTx", value: RequestCheckTx.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCheckTx.typeUrl, RequestCheckTx); function createBaseRequestCommit(): RequestCommit { return {}; } @@ -2227,9 +2246,9 @@ export const RequestCommit = { typeUrl: "/tendermint.abci.RequestCommit", value: RequestCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestCommit.typeUrl, RequestCommit); function createBaseRequestListSnapshots(): RequestListSnapshots { return {}; } @@ -2284,9 +2303,9 @@ export const RequestListSnapshots = { typeUrl: "/tendermint.abci.RequestListSnapshots", value: RequestListSnapshots.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestListSnapshots.typeUrl, RequestListSnapshots); function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { return { snapshot: undefined, @@ -2366,9 +2385,11 @@ export const RequestOfferSnapshot = { typeUrl: "/tendermint.abci.RequestOfferSnapshot", value: RequestOfferSnapshot.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestOfferSnapshot.typeUrl, RequestOfferSnapshot); function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { return { height: BigInt(0), @@ -2460,9 +2481,9 @@ export const RequestLoadSnapshotChunk = { typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", value: RequestLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestLoadSnapshotChunk.typeUrl, RequestLoadSnapshotChunk); function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { return { index: 0, @@ -2554,9 +2575,9 @@ export const RequestApplySnapshotChunk = { typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", value: RequestApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestApplySnapshotChunk.typeUrl, RequestApplySnapshotChunk); function createBaseRequestPrepareProposal(): RequestPrepareProposal { return { maxTxBytes: BigInt(0), @@ -2712,9 +2733,12 @@ export const RequestPrepareProposal = { typeUrl: "/tendermint.abci.RequestPrepareProposal", value: RequestPrepareProposal.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedCommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestPrepareProposal.typeUrl, RequestPrepareProposal); function createBaseRequestProcessProposal(): RequestProcessProposal { return { txs: [], @@ -2870,9 +2894,12 @@ export const RequestProcessProposal = { typeUrl: "/tendermint.abci.RequestProcessProposal", value: RequestProcessProposal.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestProcessProposal.typeUrl, RequestProcessProposal); function createBaseRequestExtendVote(): RequestExtendVote { return { hash: new Uint8Array(), @@ -3028,9 +3055,12 @@ export const RequestExtendVote = { typeUrl: "/tendermint.abci.RequestExtendVote", value: RequestExtendVote.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestExtendVote.typeUrl, RequestExtendVote); function createBaseRequestVerifyVoteExtension(): RequestVerifyVoteExtension { return { hash: new Uint8Array(), @@ -3134,9 +3164,9 @@ export const RequestVerifyVoteExtension = { typeUrl: "/tendermint.abci.RequestVerifyVoteExtension", value: RequestVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(RequestVerifyVoteExtension.typeUrl, RequestVerifyVoteExtension); function createBaseRequestFinalizeBlock(): RequestFinalizeBlock { return { txs: [], @@ -3292,9 +3322,12 @@ export const RequestFinalizeBlock = { typeUrl: "/tendermint.abci.RequestFinalizeBlock", value: RequestFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + CommitInfo.registerTypeUrl(); + Misbehavior.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(RequestFinalizeBlock.typeUrl, RequestFinalizeBlock); function createBaseResponse(): Response { return { exception: undefined, @@ -3554,9 +3587,27 @@ export const Response = { typeUrl: "/tendermint.abci.Response", value: Response.encode(message).finish() }; + }, + registerTypeUrl() { + ResponseException.registerTypeUrl(); + ResponseEcho.registerTypeUrl(); + ResponseFlush.registerTypeUrl(); + ResponseInfo.registerTypeUrl(); + ResponseInitChain.registerTypeUrl(); + ResponseQuery.registerTypeUrl(); + ResponseCheckTx.registerTypeUrl(); + ResponseCommit.registerTypeUrl(); + ResponseListSnapshots.registerTypeUrl(); + ResponseOfferSnapshot.registerTypeUrl(); + ResponseLoadSnapshotChunk.registerTypeUrl(); + ResponseApplySnapshotChunk.registerTypeUrl(); + ResponsePrepareProposal.registerTypeUrl(); + ResponseProcessProposal.registerTypeUrl(); + ResponseExtendVote.registerTypeUrl(); + ResponseVerifyVoteExtension.registerTypeUrl(); + ResponseFinalizeBlock.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Response.typeUrl, Response); function createBaseResponseException(): ResponseException { return { error: "" @@ -3624,9 +3675,9 @@ export const ResponseException = { typeUrl: "/tendermint.abci.ResponseException", value: ResponseException.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseException.typeUrl, ResponseException); function createBaseResponseEcho(): ResponseEcho { return { message: "" @@ -3694,9 +3745,9 @@ export const ResponseEcho = { typeUrl: "/tendermint.abci.ResponseEcho", value: ResponseEcho.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseEcho.typeUrl, ResponseEcho); function createBaseResponseFlush(): ResponseFlush { return {}; } @@ -3751,9 +3802,9 @@ export const ResponseFlush = { typeUrl: "/tendermint.abci.ResponseFlush", value: ResponseFlush.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseFlush.typeUrl, ResponseFlush); function createBaseResponseInfo(): ResponseInfo { return { data: "", @@ -3869,9 +3920,9 @@ export const ResponseInfo = { typeUrl: "/tendermint.abci.ResponseInfo", value: ResponseInfo.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseInfo.typeUrl, ResponseInfo); function createBaseResponseInitChain(): ResponseInitChain { return { consensusParams: undefined, @@ -3965,9 +4016,12 @@ export const ResponseInitChain = { typeUrl: "/tendermint.abci.ResponseInitChain", value: ResponseInitChain.encode(message).finish() }; + }, + registerTypeUrl() { + ConsensusParams.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseInitChain.typeUrl, ResponseInitChain); function createBaseResponseQuery(): ResponseQuery { return { code: 0, @@ -4131,9 +4185,11 @@ export const ResponseQuery = { typeUrl: "/tendermint.abci.ResponseQuery", value: ResponseQuery.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOps.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseQuery.typeUrl, ResponseQuery); function createBaseResponseCheckTx(): ResponseCheckTx { return { code: 0, @@ -4287,9 +4343,11 @@ export const ResponseCheckTx = { typeUrl: "/tendermint.abci.ResponseCheckTx", value: ResponseCheckTx.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseCheckTx.typeUrl, ResponseCheckTx); function createBaseResponseCommit(): ResponseCommit { return { retainHeight: BigInt(0) @@ -4357,9 +4415,9 @@ export const ResponseCommit = { typeUrl: "/tendermint.abci.ResponseCommit", value: ResponseCommit.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseCommit.typeUrl, ResponseCommit); function createBaseResponseListSnapshots(): ResponseListSnapshots { return { snapshots: [] @@ -4429,9 +4487,11 @@ export const ResponseListSnapshots = { typeUrl: "/tendermint.abci.ResponseListSnapshots", value: ResponseListSnapshots.encode(message).finish() }; + }, + registerTypeUrl() { + Snapshot.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseListSnapshots.typeUrl, ResponseListSnapshots); function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { return { result: 0 @@ -4499,9 +4559,9 @@ export const ResponseOfferSnapshot = { typeUrl: "/tendermint.abci.ResponseOfferSnapshot", value: ResponseOfferSnapshot.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseOfferSnapshot.typeUrl, ResponseOfferSnapshot); function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { return { chunk: new Uint8Array() @@ -4569,9 +4629,9 @@ export const ResponseLoadSnapshotChunk = { typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", value: ResponseLoadSnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseLoadSnapshotChunk.typeUrl, ResponseLoadSnapshotChunk); function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { return { result: 0, @@ -4676,9 +4736,9 @@ export const ResponseApplySnapshotChunk = { typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", value: ResponseApplySnapshotChunk.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseApplySnapshotChunk.typeUrl, ResponseApplySnapshotChunk); function createBaseResponsePrepareProposal(): ResponsePrepareProposal { return { txs: [] @@ -4748,9 +4808,9 @@ export const ResponsePrepareProposal = { typeUrl: "/tendermint.abci.ResponsePrepareProposal", value: ResponsePrepareProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponsePrepareProposal.typeUrl, ResponsePrepareProposal); function createBaseResponseProcessProposal(): ResponseProcessProposal { return { status: 0 @@ -4818,9 +4878,9 @@ export const ResponseProcessProposal = { typeUrl: "/tendermint.abci.ResponseProcessProposal", value: ResponseProcessProposal.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseProcessProposal.typeUrl, ResponseProcessProposal); function createBaseResponseExtendVote(): ResponseExtendVote { return { voteExtension: new Uint8Array() @@ -4888,9 +4948,9 @@ export const ResponseExtendVote = { typeUrl: "/tendermint.abci.ResponseExtendVote", value: ResponseExtendVote.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseExtendVote.typeUrl, ResponseExtendVote); function createBaseResponseVerifyVoteExtension(): ResponseVerifyVoteExtension { return { status: 0 @@ -4958,9 +5018,9 @@ export const ResponseVerifyVoteExtension = { typeUrl: "/tendermint.abci.ResponseVerifyVoteExtension", value: ResponseVerifyVoteExtension.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ResponseVerifyVoteExtension.typeUrl, ResponseVerifyVoteExtension); function createBaseResponseFinalizeBlock(): ResponseFinalizeBlock { return { events: [], @@ -5082,9 +5142,14 @@ export const ResponseFinalizeBlock = { typeUrl: "/tendermint.abci.ResponseFinalizeBlock", value: ResponseFinalizeBlock.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); + ExecTxResult.registerTypeUrl(); + ValidatorUpdate.registerTypeUrl(); + ConsensusParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ResponseFinalizeBlock.typeUrl, ResponseFinalizeBlock); function createBaseCommitInfo(): CommitInfo { return { round: 0, @@ -5166,9 +5231,11 @@ export const CommitInfo = { typeUrl: "/tendermint.abci.CommitInfo", value: CommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + VoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(CommitInfo.typeUrl, CommitInfo); function createBaseExtendedCommitInfo(): ExtendedCommitInfo { return { round: 0, @@ -5250,9 +5317,11 @@ export const ExtendedCommitInfo = { typeUrl: "/tendermint.abci.ExtendedCommitInfo", value: ExtendedCommitInfo.encode(message).finish() }; + }, + registerTypeUrl() { + ExtendedVoteInfo.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommitInfo.typeUrl, ExtendedCommitInfo); function createBaseEvent(): Event { return { type: "", @@ -5334,9 +5403,11 @@ export const Event = { typeUrl: "/tendermint.abci.Event", value: Event.encode(message).finish() }; + }, + registerTypeUrl() { + EventAttribute.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Event.typeUrl, Event); function createBaseEventAttribute(): EventAttribute { return { key: "", @@ -5428,9 +5499,9 @@ export const EventAttribute = { typeUrl: "/tendermint.abci.EventAttribute", value: EventAttribute.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EventAttribute.typeUrl, EventAttribute); function createBaseExecTxResult(): ExecTxResult { return { code: 0, @@ -5584,9 +5655,11 @@ export const ExecTxResult = { typeUrl: "/tendermint.abci.ExecTxResult", value: ExecTxResult.encode(message).finish() }; + }, + registerTypeUrl() { + Event.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExecTxResult.typeUrl, ExecTxResult); function createBaseTxResult(): TxResult { return { height: BigInt(0), @@ -5690,9 +5763,11 @@ export const TxResult = { typeUrl: "/tendermint.abci.TxResult", value: TxResult.encode(message).finish() }; + }, + registerTypeUrl() { + ExecTxResult.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(TxResult.typeUrl, TxResult); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -5772,9 +5847,9 @@ export const Validator = { typeUrl: "/tendermint.abci.Validator", value: Validator.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseValidatorUpdate(): ValidatorUpdate { return { pubKey: PublicKey.fromPartial({}), @@ -5854,9 +5929,11 @@ export const ValidatorUpdate = { typeUrl: "/tendermint.abci.ValidatorUpdate", value: ValidatorUpdate.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorUpdate.typeUrl, ValidatorUpdate); function createBaseVoteInfo(): VoteInfo { return { validator: Validator.fromPartial({}), @@ -5936,9 +6013,11 @@ export const VoteInfo = { typeUrl: "/tendermint.abci.VoteInfo", value: VoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(VoteInfo.typeUrl, VoteInfo); function createBaseExtendedVoteInfo(): ExtendedVoteInfo { return { validator: Validator.fromPartial({}), @@ -6042,9 +6121,11 @@ export const ExtendedVoteInfo = { typeUrl: "/tendermint.abci.ExtendedVoteInfo", value: ExtendedVoteInfo.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedVoteInfo.typeUrl, ExtendedVoteInfo); function createBaseMisbehavior(): Misbehavior { return { type: 0, @@ -6160,9 +6241,11 @@ export const Misbehavior = { typeUrl: "/tendermint.abci.Misbehavior", value: Misbehavior.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Misbehavior.typeUrl, Misbehavior); function createBaseSnapshot(): Snapshot { return { height: BigInt(0), @@ -6278,6 +6361,6 @@ export const Snapshot = { typeUrl: "/tendermint.abci.Snapshot", value: Snapshot.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Snapshot.typeUrl, Snapshot); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/crypto/keys.ts b/libs/interchainjs/src/tendermint/crypto/keys.ts index 9dc8476b..c58639e4 100644 --- a/libs/interchainjs/src/tendermint/crypto/keys.ts +++ b/libs/interchainjs/src/tendermint/crypto/keys.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** PublicKey defines the keys available for use with Validators */ export interface PublicKey { ed25519?: Uint8Array; @@ -98,6 +97,6 @@ export const PublicKey = { typeUrl: "/tendermint.crypto.PublicKey", value: PublicKey.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(PublicKey.typeUrl, PublicKey); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/crypto/proof.ts b/libs/interchainjs/src/tendermint/crypto/proof.ts index 5f372fcf..b3eea7ae 100644 --- a/libs/interchainjs/src/tendermint/crypto/proof.ts +++ b/libs/interchainjs/src/tendermint/crypto/proof.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Proof { total: bigint; index: bigint; @@ -208,9 +207,9 @@ export const Proof = { typeUrl: "/tendermint.crypto.Proof", value: Proof.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Proof.typeUrl, Proof); function createBaseValueOp(): ValueOp { return { key: new Uint8Array(), @@ -290,9 +289,11 @@ export const ValueOp = { typeUrl: "/tendermint.crypto.ValueOp", value: ValueOp.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValueOp.typeUrl, ValueOp); function createBaseDominoOp(): DominoOp { return { key: "", @@ -384,9 +385,9 @@ export const DominoOp = { typeUrl: "/tendermint.crypto.DominoOp", value: DominoOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(DominoOp.typeUrl, DominoOp); function createBaseProofOp(): ProofOp { return { type: "", @@ -478,9 +479,9 @@ export const ProofOp = { typeUrl: "/tendermint.crypto.ProofOp", value: ProofOp.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ProofOp.typeUrl, ProofOp); function createBaseProofOps(): ProofOps { return { ops: [] @@ -550,6 +551,8 @@ export const ProofOps = { typeUrl: "/tendermint.crypto.ProofOps", value: ProofOps.encode(message).finish() }; + }, + registerTypeUrl() { + ProofOp.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(ProofOps.typeUrl, ProofOps); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/types/block.ts b/libs/interchainjs/src/tendermint/types/block.ts index 16763b51..20ae4856 100644 --- a/libs/interchainjs/src/tendermint/types/block.ts +++ b/libs/interchainjs/src/tendermint/types/block.ts @@ -2,7 +2,6 @@ import { Header, HeaderAmino, Data, DataAmino, Commit, CommitAmino } from "./typ import { EvidenceList, EvidenceListAmino } from "./evidence"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Block { header: Header; data: Data; @@ -126,6 +125,11 @@ export const Block = { typeUrl: "/tendermint.types.Block", value: Block.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Data.registerTypeUrl(); + EvidenceList.registerTypeUrl(); + Commit.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(Block.typeUrl, Block); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/types/evidence.ts b/libs/interchainjs/src/tendermint/types/evidence.ts index 696b6c8a..bf7dd661 100644 --- a/libs/interchainjs/src/tendermint/types/evidence.ts +++ b/libs/interchainjs/src/tendermint/types/evidence.ts @@ -3,7 +3,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator, ValidatorAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; lightClientAttackEvidence?: LightClientAttackEvidence; @@ -161,9 +160,12 @@ export const Evidence = { typeUrl: "/tendermint.types.Evidence", value: Evidence.encode(message).finish() }; + }, + registerTypeUrl() { + DuplicateVoteEvidence.registerTypeUrl(); + LightClientAttackEvidence.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Evidence.typeUrl, Evidence); function createBaseDuplicateVoteEvidence(): DuplicateVoteEvidence { return { voteA: undefined, @@ -279,9 +281,11 @@ export const DuplicateVoteEvidence = { typeUrl: "/tendermint.types.DuplicateVoteEvidence", value: DuplicateVoteEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + Vote.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(DuplicateVoteEvidence.typeUrl, DuplicateVoteEvidence); function createBaseLightClientAttackEvidence(): LightClientAttackEvidence { return { conflictingBlock: undefined, @@ -399,9 +403,12 @@ export const LightClientAttackEvidence = { typeUrl: "/tendermint.types.LightClientAttackEvidence", value: LightClientAttackEvidence.encode(message).finish() }; + }, + registerTypeUrl() { + LightBlock.registerTypeUrl(); + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightClientAttackEvidence.typeUrl, LightClientAttackEvidence); function createBaseEvidenceList(): EvidenceList { return { evidence: [] @@ -471,6 +478,8 @@ export const EvidenceList = { typeUrl: "/tendermint.types.EvidenceList", value: EvidenceList.encode(message).finish() }; + }, + registerTypeUrl() { + Evidence.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(EvidenceList.typeUrl, EvidenceList); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/types/params.ts b/libs/interchainjs/src/tendermint/types/params.ts index 0b15190e..8f9291e4 100644 --- a/libs/interchainjs/src/tendermint/types/params.ts +++ b/libs/interchainjs/src/tendermint/types/params.ts @@ -1,7 +1,6 @@ import { Duration, DurationAmino } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. @@ -339,9 +338,15 @@ export const ConsensusParams = { typeUrl: "/tendermint.types.ConsensusParams", value: ConsensusParams.encode(message).finish() }; + }, + registerTypeUrl() { + BlockParams.registerTypeUrl(); + EvidenceParams.registerTypeUrl(); + ValidatorParams.registerTypeUrl(); + VersionParams.registerTypeUrl(); + ABCIParams.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ConsensusParams.typeUrl, ConsensusParams); function createBaseBlockParams(): BlockParams { return { maxBytes: BigInt(0), @@ -421,9 +426,9 @@ export const BlockParams = { typeUrl: "/tendermint.types.BlockParams", value: BlockParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(BlockParams.typeUrl, BlockParams); function createBaseEvidenceParams(): EvidenceParams { return { maxAgeNumBlocks: BigInt(0), @@ -515,9 +520,9 @@ export const EvidenceParams = { typeUrl: "/tendermint.types.EvidenceParams", value: EvidenceParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(EvidenceParams.typeUrl, EvidenceParams); function createBaseValidatorParams(): ValidatorParams { return { pubKeyTypes: [] @@ -587,9 +592,9 @@ export const ValidatorParams = { typeUrl: "/tendermint.types.ValidatorParams", value: ValidatorParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ValidatorParams.typeUrl, ValidatorParams); function createBaseVersionParams(): VersionParams { return { app: BigInt(0) @@ -657,9 +662,9 @@ export const VersionParams = { typeUrl: "/tendermint.types.VersionParams", value: VersionParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(VersionParams.typeUrl, VersionParams); function createBaseHashedParams(): HashedParams { return { blockMaxBytes: BigInt(0), @@ -739,9 +744,9 @@ export const HashedParams = { typeUrl: "/tendermint.types.HashedParams", value: HashedParams.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(HashedParams.typeUrl, HashedParams); function createBaseABCIParams(): ABCIParams { return { voteExtensionsEnableHeight: BigInt(0) @@ -809,6 +814,6 @@ export const ABCIParams = { typeUrl: "/tendermint.types.ABCIParams", value: ABCIParams.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(ABCIParams.typeUrl, ABCIParams); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/types/types.ts b/libs/interchainjs/src/tendermint/types/types.ts index c44fd8af..2762a429 100644 --- a/libs/interchainjs/src/tendermint/types/types.ts +++ b/libs/interchainjs/src/tendermint/types/types.ts @@ -4,7 +4,6 @@ import { Timestamp } from "../../google/protobuf/timestamp"; import { BlockIDFlag, ValidatorSet, ValidatorSetAmino } from "./validator"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes, toTimestamp, fromTimestamp, isSet } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** SignedMsgType is a type of signed message in the consensus. */ export enum SignedMsgType { SIGNED_MSG_TYPE_UNKNOWN = 0, @@ -542,9 +541,9 @@ export const PartSetHeader = { typeUrl: "/tendermint.types.PartSetHeader", value: PartSetHeader.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(PartSetHeader.typeUrl, PartSetHeader); function createBasePart(): Part { return { index: 0, @@ -636,9 +635,11 @@ export const Part = { typeUrl: "/tendermint.types.Part", value: Part.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Part.typeUrl, Part); function createBaseBlockID(): BlockID { return { hash: new Uint8Array(), @@ -718,9 +719,11 @@ export const BlockID = { typeUrl: "/tendermint.types.BlockID", value: BlockID.encode(message).finish() }; + }, + registerTypeUrl() { + PartSetHeader.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockID.typeUrl, BlockID); function createBaseHeader(): Header { return { version: Consensus.fromPartial({}), @@ -944,9 +947,12 @@ export const Header = { typeUrl: "/tendermint.types.Header", value: Header.encode(message).finish() }; + }, + registerTypeUrl() { + Consensus.registerTypeUrl(); + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Header.typeUrl, Header); function createBaseData(): Data { return { txs: [] @@ -1016,9 +1022,9 @@ export const Data = { typeUrl: "/tendermint.types.Data", value: Data.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(Data.typeUrl, Data); function createBaseVote(): Vote { return { type: 0, @@ -1194,9 +1200,11 @@ export const Vote = { typeUrl: "/tendermint.types.Vote", value: Vote.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Vote.typeUrl, Vote); function createBaseCommit(): Commit { return { height: BigInt(0), @@ -1302,9 +1310,12 @@ export const Commit = { typeUrl: "/tendermint.types.Commit", value: Commit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + CommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Commit.typeUrl, Commit); function createBaseCommitSig(): CommitSig { return { blockIdFlag: 0, @@ -1408,9 +1419,9 @@ export const CommitSig = { typeUrl: "/tendermint.types.CommitSig", value: CommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(CommitSig.typeUrl, CommitSig); function createBaseExtendedCommit(): ExtendedCommit { return { height: BigInt(0), @@ -1516,9 +1527,12 @@ export const ExtendedCommit = { typeUrl: "/tendermint.types.ExtendedCommit", value: ExtendedCommit.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + ExtendedCommitSig.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ExtendedCommit.typeUrl, ExtendedCommit); function createBaseExtendedCommitSig(): ExtendedCommitSig { return { blockIdFlag: 0, @@ -1646,9 +1660,9 @@ export const ExtendedCommitSig = { typeUrl: "/tendermint.types.ExtendedCommitSig", value: ExtendedCommitSig.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(ExtendedCommitSig.typeUrl, ExtendedCommitSig); function createBaseProposal(): Proposal { return { type: 0, @@ -1788,9 +1802,11 @@ export const Proposal = { typeUrl: "/tendermint.types.Proposal", value: Proposal.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal); function createBaseSignedHeader(): SignedHeader { return { header: undefined, @@ -1870,9 +1886,12 @@ export const SignedHeader = { typeUrl: "/tendermint.types.SignedHeader", value: SignedHeader.encode(message).finish() }; + }, + registerTypeUrl() { + Header.registerTypeUrl(); + Commit.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(SignedHeader.typeUrl, SignedHeader); function createBaseLightBlock(): LightBlock { return { signedHeader: undefined, @@ -1952,9 +1971,12 @@ export const LightBlock = { typeUrl: "/tendermint.types.LightBlock", value: LightBlock.encode(message).finish() }; + }, + registerTypeUrl() { + SignedHeader.registerTypeUrl(); + ValidatorSet.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(LightBlock.typeUrl, LightBlock); function createBaseBlockMeta(): BlockMeta { return { blockId: BlockID.fromPartial({}), @@ -2058,9 +2080,12 @@ export const BlockMeta = { typeUrl: "/tendermint.types.BlockMeta", value: BlockMeta.encode(message).finish() }; + }, + registerTypeUrl() { + BlockID.registerTypeUrl(); + Header.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(BlockMeta.typeUrl, BlockMeta); function createBaseTxProof(): TxProof { return { rootHash: new Uint8Array(), @@ -2152,6 +2177,8 @@ export const TxProof = { typeUrl: "/tendermint.types.TxProof", value: TxProof.encode(message).finish() }; + }, + registerTypeUrl() { + Proof.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(TxProof.typeUrl, TxProof); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/types/validator.ts b/libs/interchainjs/src/tendermint/types/validator.ts index 0c652786..8a52ff10 100644 --- a/libs/interchainjs/src/tendermint/types/validator.ts +++ b/libs/interchainjs/src/tendermint/types/validator.ts @@ -1,7 +1,6 @@ import { PublicKey, PublicKeyAmino } from "../crypto/keys"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** BlockIdFlag indicates which BlockID the signature is for */ export enum BlockIDFlag { /** BLOCK_ID_FLAG_UNKNOWN - indicates an error condition */ @@ -196,9 +195,11 @@ export const ValidatorSet = { typeUrl: "/tendermint.types.ValidatorSet", value: ValidatorSet.encode(message).finish() }; + }, + registerTypeUrl() { + Validator.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(ValidatorSet.typeUrl, ValidatorSet); function createBaseValidator(): Validator { return { address: new Uint8Array(), @@ -302,9 +303,11 @@ export const Validator = { typeUrl: "/tendermint.types.Validator", value: Validator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } }; -GlobalDecoderRegistry.register(Validator.typeUrl, Validator); function createBaseSimpleValidator(): SimpleValidator { return { pubKey: undefined, @@ -384,6 +387,8 @@ export const SimpleValidator = { typeUrl: "/tendermint.types.SimpleValidator", value: SimpleValidator.encode(message).finish() }; + }, + registerTypeUrl() { + PublicKey.registerTypeUrl(); } -}; -GlobalDecoderRegistry.register(SimpleValidator.typeUrl, SimpleValidator); \ No newline at end of file +}; \ No newline at end of file diff --git a/libs/interchainjs/src/tendermint/version/types.ts b/libs/interchainjs/src/tendermint/version/types.ts index 824f3644..36154b74 100644 --- a/libs/interchainjs/src/tendermint/version/types.ts +++ b/libs/interchainjs/src/tendermint/version/types.ts @@ -1,6 +1,5 @@ import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; -import { GlobalDecoderRegistry } from "../../registry"; /** * App includes the protocol and software version for the application. * This information is included in ResponseInfo. The App.Protocol can be @@ -132,9 +131,9 @@ export const App = { typeUrl: "/tendermint.version.App", value: App.encode(message).finish() }; - } + }, + registerTypeUrl() {} }; -GlobalDecoderRegistry.register(App.typeUrl, App); function createBaseConsensus(): Consensus { return { block: BigInt(0), @@ -214,6 +213,6 @@ export const Consensus = { typeUrl: "/tendermint.version.Consensus", value: Consensus.encode(message).finish() }; - } -}; -GlobalDecoderRegistry.register(Consensus.typeUrl, Consensus); \ No newline at end of file + }, + registerTypeUrl() {} +}; \ No newline at end of file diff --git a/libs/interchainjs/src/types.ts b/libs/interchainjs/src/types.ts index 6983e34a..e44c8a75 100644 --- a/libs/interchainjs/src/types.ts +++ b/libs/interchainjs/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -48,6 +48,7 @@ export interface TelescopeGeneratedCodec< toProto?: (message: T) => Uint8Array; fromProtoMsg?: (message: ProtoMsg) => T; toProtoMsg?: (message: T) => Any; + registerTypeUrl?: () => void; } export type TelescopeGeneratedType< diff --git a/libs/interchainjs/src/utf8.ts b/libs/interchainjs/src/utf8.ts index 56735515..5fef278b 100644 --- a/libs/interchainjs/src/utf8.ts +++ b/libs/interchainjs/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/varint.ts b/libs/interchainjs/src/varint.ts index e06f5977..cab33130 100644 --- a/libs/interchainjs/src/varint.ts +++ b/libs/interchainjs/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.3 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/starship/__tests__/authz.test.ts b/libs/interchainjs/starship/__tests__/authz.test.ts new file mode 100644 index 00000000..01e3c44c --- /dev/null +++ b/libs/interchainjs/starship/__tests__/authz.test.ts @@ -0,0 +1,471 @@ +import { generateMnemonic } from "@confio/relayer/build/lib/helpers"; +import { assertIsDeliverTxSuccess } from "@cosmjs/stargate"; +import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; + +import "./setup.test"; +import { + GenericAuthorization, + Grant, +} from "interchainjs/cosmos/authz/v1beta1/authz"; +import { + MsgExec, + MsgGrant, + MsgRevoke, +} from "interchainjs/cosmos/authz/v1beta1/tx"; +import { SendAuthorization } from "interchainjs/cosmos/bank/v1beta1/authz"; +import { MsgVote } from "interchainjs/cosmos/gov/v1beta1/tx"; +import { QueryGrantsRequest } from "interchainjs/cosmos/authz/v1beta1/query"; +import { MsgSend } from "interchainjs/cosmos/bank/v1beta1/tx"; + +describe("Authz testing", () => { + let wallet1, address1, denom; + let wallet2, address2; + let wallet3, address3; + let chainInfo, getCoin, getRpcEndpoint, creditFromFaucet; + let expiration; + + // Variables used accross testcases + + beforeAll(async () => { + ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = + useChain("cosmos")); + denom = getCoin().base; + + // Initialize wallet + wallet1 = await DirectSecp256k1HdWallet.fromMnemonic(generateMnemonic(), { + prefix: chainInfo.chain.bech32_prefix, + }); + address1 = (await wallet1.getAccounts())[0].address; + + wallet2 = await DirectSecp256k1HdWallet.fromMnemonic(generateMnemonic(), { + prefix: chainInfo.chain.bech32_prefix, + }); + address2 = (await wallet2.getAccounts())[0].address; + + wallet3 = await DirectSecp256k1HdWallet.fromMnemonic(generateMnemonic(), { + prefix: chainInfo.chain.bech32_prefix, + }); + address3 = (await wallet3.getAccounts())[0].address; + + // Transfer osmosis and ibc tokens to address, send only osmo to address + await creditFromFaucet(address1); + await creditFromFaucet(address2); + await creditFromFaucet(address3); + + expiration = new Date(); + expiration.setDate(expiration.getDate() + 1); + + console.log(`address1: ${address1}, address2: ${address2}, address3: ${address3}, expiration: ${expiration}`) + }, 200000); + + it("check address1 has tokens", async () => { + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + address: address1, + denom, + }); + + expect(balance?.amount).toEqual("10000000000"); + }, 200000); + + it("check address2 has tokens", async () => { + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + address: address2, + denom, + }); + + expect(balance?.amount).toEqual("10000000000"); + }, 200000); + + it("check address3 has tokens", async () => { + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + address: address3, + denom, + }); + + expect(balance?.amount).toEqual("10000000000"); + }, 200000); + + it("grant address2 Send Auth with limits", async () => { + const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ + rpcEndpoint: getRpcEndpoint(), + signer: wallet1, + }); + + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const fee = { + amount: [ + { + denom, + amount: "100000", + }, + ], + gas: "550000", + }; + + const msg = MsgGrant.fromPartial({ + granter: address1, + grantee: address2, + grant: Grant.fromPartial({ + authorization: SendAuthorization.fromPartial({ + spendLimit: [ + { + denom: denom, + amount: "1000000", + }, + ], + }), + expiration: expiration, + }), + }); + + const result = await msgClient1.cosmos.authz.v1beta1.grant( + address1, + msg, + fee + ); + + assertIsDeliverTxSuccess(result); + + const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + grantee: address2, + }); + + expect(authsResults?.grants?.length).toBeGreaterThan(0); + + const auth = authsResults.grants[0].authorization; + + expect(SendAuthorization.is(auth)).toBeTruthy(); + + if (SendAuthorization.is(auth)) { + expect(auth.spendLimit[0].amount).toBe("1000000"); + } + }, 200000); + + it("grant address3 Generic Send Auth", async () => { + const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ + rpcEndpoint: getRpcEndpoint(), + signer: wallet1, + }); + + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const fee = { + amount: [ + { + denom, + amount: "100000", + }, + ], + gas: "550000", + }; + + const msg = MsgGrant.fromPartial({ + granter: address1, + grantee: address3, + grant: Grant.fromPartial({ + authorization: GenericAuthorization.fromPartial({ + msg: MsgSend.typeUrl, + }), + expiration: expiration, + }), + }); + + const result = await msgClient1.cosmos.authz.v1beta1.grant( + address1, + msg, + fee + ); + + assertIsDeliverTxSuccess(result); + + const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + grantee: address3, + }); + + expect(authsResults?.grants?.length).toBeGreaterThan(0); + + const auth = authsResults.grants[0].authorization; + + expect(GenericAuthorization.is(auth)).toBeTruthy(); + + if (GenericAuthorization.is(auth)) { + expect(auth.msg).toBe(MsgSend.typeUrl); + } + }, 200000); + + it("grant address2 Generic Vote Auth", async () => { + const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ + rpcEndpoint: getRpcEndpoint(), + signer: wallet1, + }); + + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const fee = { + amount: [ + { + denom, + amount: "100000", + }, + ], + gas: "550000", + }; + + const msg = MsgGrant.fromPartial({ + granter: address1, + grantee: address2, + grant: Grant.fromPartial({ + authorization: GenericAuthorization.fromPartial({ + msg: MsgVote.typeUrl, + }), + expiration: expiration, + }), + }); + + const result = await msgClient1.cosmos.authz.v1beta1.grant( + address1, + msg, + fee + ); + + assertIsDeliverTxSuccess(result); + + const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + grantee: address2, + }); + + expect(authsResults?.grants?.length).toBeGreaterThan(0); + + const auth = authsResults.grants[1].authorization; + + expect(GenericAuthorization.is(auth)).toBeTruthy(); + + if (GenericAuthorization.is(auth)) { + expect(auth.msg).toBe(MsgVote.typeUrl); + } + }, 200000); + + it("get address2 auths", async () => { + await sleep(1000) + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + console.log(`granter: ${address1}, grantee: ${address2}, msg: ${MsgVote.typeUrl}`) + await sleep(1000) + const authsResults = await queryClient.cosmos.authz.v1beta1.grants(QueryGrantsRequest.fromPartial({ + granter: address1, + grantee: address2, + msgTypeUrl: MsgVote.typeUrl + })); + + console.log(authsResults); + + }, 2000000); + + it("exec address2 send", async () => { + const msgClient2 = await cosmos.ClientFactory.createRPCMsgExtensions({ + rpcEndpoint: getRpcEndpoint(), + signer: wallet2, + }); + + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const fee = { + amount: [ + { + denom, + amount: "100000", + }, + ], + gas: "550000", + }; + + const msg = MsgExec.fromPartial({ + grantee: address2, + msgs: [ + MsgSend.toProtoMsg( + MsgSend.fromPartial({ + fromAddress: address1, + toAddress: address2, + amount: [ + { + denom, + amount: "90000", + }, + ], + }) + ), + ], + }); + + const result = await msgClient2.cosmos.authz.v1beta1.exec( + address2, + msg, + fee + ); + + assertIsDeliverTxSuccess(result); + + const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + address: address2, + denom, + }); + + console.log(balance) + + expect(balance?.amount).toEqual("9999990000"); // not 10000000000, due to fees deduction + }, 2000000); + + it("revoke address2 vote auth", async () => { + const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ + rpcEndpoint: getRpcEndpoint(), + signer: wallet1, + }); + + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const fee = { + amount: [ + { + denom, + amount: "100000", + }, + ], + gas: "550000", + }; + + const msg = MsgRevoke.fromPartial({ + granter: address1, + grantee: address2, + msgTypeUrl: MsgVote.typeUrl, + }); + + const result = await msgClient1.cosmos.authz.v1beta1.revoke( + address1, + msg, + fee + ); + + assertIsDeliverTxSuccess(result); + + const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + grantee: address2, + }); + + expect(authsResults?.grants?.length).toBe(1); + + const auth = authsResults.grants[0].authorization; + + expect(SendAuthorization.is(auth)).toBeTruthy(); + + if (SendAuthorization.is(auth)) { + expect(auth.spendLimit[0].amount).toBe("910000"); // not 1000000 due to fees + } + }, 200000); + + it("revoke address3 generic send auth", async () => { + const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ + rpcEndpoint: getRpcEndpoint(), + signer: wallet1, + }); + + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const fee = { + amount: [ + { + denom, + amount: "100000", + }, + ], + gas: "550000", + }; + + const msg = MsgRevoke.fromPartial({ + granter: address1, + grantee: address3, + msgTypeUrl: MsgSend.typeUrl, + }); + + const result = await msgClient1.cosmos.authz.v1beta1.revoke( + address1, + msg, + fee + ); + + assertIsDeliverTxSuccess(result); + + const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + grantee: address3, + }); + + expect(authsResults?.grants?.length).toBe(0); + }, 200000); + + it("revoke address2 send auth", async () => { + const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ + rpcEndpoint: getRpcEndpoint(), + signer: wallet1, + }); + + const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ + rpcEndpoint: getRpcEndpoint(), + }); + + const fee = { + amount: [ + { + denom, + amount: "100000", + }, + ], + gas: "550000", + }; + + const msg = MsgRevoke.fromPartial({ + granter: address1, + grantee: address2, + msgTypeUrl: MsgSend.typeUrl, + }); + + const result = await msgClient1.cosmos.authz.v1beta1.revoke( + address1, + msg, + fee + ); + + assertIsDeliverTxSuccess(result); + + const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + grantee: address2, + }); + + expect(authsResults?.grants?.length).toBe(0); + }, 200000); +}); diff --git a/package.json b/package.json index 90bf280a..7267f2fd 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@chain-registry/client": "1.18.1", "@confio/relayer": "^0.12.0", "@cosmjs/crypto": "^0.32.2", - "@cosmology/telescope": "^1.11.3", + "@cosmology/telescope": "^1.11.6", "@injectivelabs/networks": "^1.14.13", "@injectivelabs/sdk-ts": "^1.14.13", "@injectivelabs/wallet-ts": "^1.14.13", diff --git a/protos/interchainjs/cosmos/authz/v1beta1/query.proto b/protos/interchainjs/cosmos/authz/v1beta1/query.proto new file mode 100644 index 00000000..fcd56815 --- /dev/null +++ b/protos/interchainjs/cosmos/authz/v1beta1/query.proto @@ -0,0 +1,82 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/authz/v1beta1/authz.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// Query defines the gRPC querier service. +service Query { + // Returns list of `Authorization`, granted to the grantee by the granter. + rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { + option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; + } + + // GranterGrants returns list of `GrantAuthorization`, granted by granter. + // + // Since: cosmos-sdk 0.46 + rpc GranterGrants(QueryGranterGrantsRequest) returns (QueryGranterGrantsResponse) { + option (google.api.http).get = "/cosmos/authz/v1beta1/grants/granter/{granter}"; + } + + // GranteeGrants returns a list of `GrantAuthorization` by grantee. + // + // Since: cosmos-sdk 0.46 + rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { + option (google.api.http).get = "/cosmos/authz/v1beta1/grants/grantee/{grantee}"; + } +} + +// QueryGrantsRequest is the request type for the Query/Grants RPC method. +message QueryGrantsRequest { + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // Optional, msg_type_url, when set, will query only grants matching given msg type. + string msg_type_url = 3; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. +message QueryGrantsResponse { + // authorizations is a list of grants granted for grantee by granter. + repeated Grant grants = 1; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. +message QueryGranterGrantsRequest { + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. +message QueryGranterGrantsResponse { + // grants is a list of grants granted by the granter. + repeated GrantAuthorization grants = 1; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. +message QueryGranteeGrantsRequest { + string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. +message QueryGranteeGrantsResponse { + // grants is a list of grants granted to the grantee. + repeated GrantAuthorization grants = 1; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/protos/interchainjs/cosmos/bank/v1beta1/authz.proto b/protos/interchainjs/cosmos/bank/v1beta1/authz.proto new file mode 100644 index 00000000..d42c619a --- /dev/null +++ b/protos/interchainjs/cosmos/bank/v1beta1/authz.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// SendAuthorization allows the grantee to spend up to spend_limit coins from +// the granter's account. +// +// Since: cosmos-sdk 0.43 +message SendAuthorization { + option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization"; + option (amino.name) = "cosmos-sdk/SendAuthorization"; + + repeated cosmos.base.v1beta1.Coin spend_limit = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // 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 + repeated string allow_list = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} diff --git a/protos/interchainjs/cosmos/staking/v1beta1/authz.proto b/protos/interchainjs/cosmos/staking/v1beta1/authz.proto new file mode 100644 index 00000000..409280c1 --- /dev/null +++ b/protos/interchainjs/cosmos/staking/v1beta1/authz.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// StakeAuthorization defines authorization for delegate/undelegate/redelegate. +// +// Since: cosmos-sdk 0.43 +message StakeAuthorization { + option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization"; + option (amino.name) = "cosmos-sdk/StakeAuthorization"; + + // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + // empty, there is no spend limit and any amount of coins can be delegated. + cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; + // validators is the oneof that represents either allow_list or deny_list + oneof validators { + // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + // account. + Validators allow_list = 2 [(amino.oneof_name) = "cosmos-sdk/StakeAuthorization/AllowList"]; + // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. + Validators deny_list = 3 [(amino.oneof_name) = "cosmos-sdk/StakeAuthorization/DenyList"]; + } + // Validators defines list of validator addresses. + message Validators { + repeated string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + } + // authorization_type defines one of AuthorizationType. + AuthorizationType authorization_type = 4; +} + +// AuthorizationType defines the type of staking module authorization type +// +// Since: cosmos-sdk 0.43 +enum AuthorizationType { + // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + AUTHORIZATION_TYPE_UNSPECIFIED = 0; + // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + AUTHORIZATION_TYPE_DELEGATE = 1; + // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate + AUTHORIZATION_TYPE_UNDELEGATE = 2; + // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate + AUTHORIZATION_TYPE_REDELEGATE = 3; + // AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation + AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION = 4; +} diff --git a/scripts/.protod.config.json b/scripts/.protod.config.json index 41f3ef2d..d93b986c 100644 --- a/scripts/.protod.config.json +++ b/scripts/.protod.config.json @@ -19,7 +19,9 @@ "cosmos/crypto/secp256r1/keys.proto", "cosmos/crypto/ed25519/keys.proto", "cosmos/authz/v1beta1/tx.proto", + "cosmos/authz/v1beta1/query.proto", "cosmos/bank/v1beta1/tx.proto", + "cosmos/bank/v1beta1/authz.proto", "cosmos/distribution/v1beta1/tx.proto", "cosmos/feegrant/v1beta1/tx.proto", "cosmos/gov/v1beta1/tx.proto", @@ -30,6 +32,7 @@ "cosmos/auth/v1beta1/query.proto", "cosmos/bank/v1beta1/query.proto", "cosmos/staking/v1beta1/query.proto", + "cosmos/staking/v1beta1/authz.proto", "cosmos/gov/v1beta1/query.proto", "cosmos/tx/v1beta1/service.proto", "cosmos/tx/v1beta1/tx.proto", diff --git a/scripts/inj-react.telescope.json b/scripts/inj-react.telescope.json index 96c8094d..35d8dcc7 100644 --- a/scripts/inj-react.telescope.json +++ b/scripts/inj-react.telescope.json @@ -59,12 +59,14 @@ "enabled": false }, "helperFuncCreators": { - "enabled": true, - "genCustomHooks": true + "enabled": true, + "useGlobalDecoderRegistry": true, + "genCustomHooks": true }, "interfaces": { "enabled": true, "useGlobalDecoderRegistry": true, + "registerAllDecodersToGlobal": false, "useUnionTypes": true }, "aminoEncoding": { diff --git a/scripts/inj.telescope.json b/scripts/inj.telescope.json index 40e6935d..895fd0be 100644 --- a/scripts/inj.telescope.json +++ b/scripts/inj.telescope.json @@ -59,12 +59,14 @@ "enabled": false }, "helperFuncCreators": { - "enabled": true, - "genCustomHooks": false + "enabled": true, + "useGlobalDecoderRegistry": true, + "genCustomHooks": false }, "interfaces": { "enabled": true, "useGlobalDecoderRegistry": true, + "registerAllDecodersToGlobal": false, "useUnionTypes": true }, "aminoEncoding": { diff --git a/scripts/interchain-react.telescope.json b/scripts/interchain-react.telescope.json index e942f730..ac1e1559 100644 --- a/scripts/interchain-react.telescope.json +++ b/scripts/interchain-react.telescope.json @@ -59,12 +59,14 @@ "enabled": false }, "helperFuncCreators": { - "enabled": true, - "genCustomHooks": true + "enabled": true, + "useGlobalDecoderRegistry": true, + "genCustomHooks": true }, "interfaces": { "enabled": true, "useGlobalDecoderRegistry": true, + "registerAllDecodersToGlobal": false, "useUnionTypes": true }, "aminoEncoding": { diff --git a/scripts/interchainjs.telescope.json b/scripts/interchainjs.telescope.json index 98176b02..538f46d7 100644 --- a/scripts/interchainjs.telescope.json +++ b/scripts/interchainjs.telescope.json @@ -59,12 +59,14 @@ "enabled": false }, "helperFuncCreators": { - "enabled": true, - "genCustomHooks": false + "enabled": true, + "useGlobalDecoderRegistry": true, + "genCustomHooks": false }, "interfaces": { "enabled": true, "useGlobalDecoderRegistry": true, + "registerAllDecodersToGlobal": false, "useUnionTypes": true }, "aminoEncoding": { diff --git a/yarn.lock b/yarn.lock index d9e0827a..3370e14b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1719,25 +1719,25 @@ resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.32.4.tgz#a9a717c9fd7b1984d9cefdd0ef6c6f254060c671" integrity sha512-D1Yc+Zy8oL/hkUkFUL/bwxvuDBzRGpc4cF7/SkdhxX4iHpSLgdOuTt1mhCh9+kl6NQREy9t7SYZ6xeW5gFe60w== -"@cosmology/ast@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@cosmology/ast/-/ast-1.9.1.tgz#29487643ca780d9c3d71088ede693a7935ecc22f" - integrity sha512-VROPogZiTPzvmOjXMk9TXHOhgWW1f3Pxakg6QqSj3p/TZzmH+xk06ZMGCVhPDuXMyh3/ILIqsL5X+UPZM3wOpw== +"@cosmology/ast@^1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@cosmology/ast/-/ast-1.9.3.tgz#682698684fb0d6f6386e968f8973485b586a624d" + integrity sha512-9/tNleALWXDeFJNrU11mqfusQ/B6HuibVvtGjjWmBWE9EIoK9MfmnJ0VRvKvfcnHczGkh5zD2cqE8LZ0T9mYYQ== dependencies: "@babel/types" "7.23.6" - "@cosmology/types" "^1.11.1" - "@cosmology/utils" "^1.9.1" + "@cosmology/types" "^1.11.2" + "@cosmology/utils" "^1.9.2" case "1.6.3" dotty "0.1.2" -"@cosmology/proto-parser@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@cosmology/proto-parser/-/proto-parser-1.9.1.tgz#ce152712e08749b6a8613dd3a6ca986fe864b929" - integrity sha512-AgGYGwFEO25EWje+PjIJ0fEPnu/xBi4i0hAR64IukCASG4LX52m+sTQXPgb8VevLsgXqhiG91W4S3yUNOtDifw== +"@cosmology/proto-parser@^1.9.2": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@cosmology/proto-parser/-/proto-parser-1.9.2.tgz#76e7ace6540076a3a29ef4fde18c1c76cfc5e5b8" + integrity sha512-ek+OC4QtXr1Jfio43v3B3xrvzspLzs9qe6Igt6tx2OUja4ns3IbeRrwcOA53dHKMxdE1JpDWxCgpwkVEVpMJXQ== dependencies: "@cosmology/protobufjs" "7.3.2" - "@cosmology/types" "^1.11.1" - "@cosmology/utils" "^1.9.1" + "@cosmology/types" "^1.11.2" + "@cosmology/utils" "^1.9.2" dotty "0.1.2" fast-json-patch "3.1.1" glob "8.0.3" @@ -1763,19 +1763,19 @@ "@types/node" ">=13.7.0" long "^5.0.0" -"@cosmology/telescope@^1.11.3": - version "1.11.3" - resolved "https://registry.yarnpkg.com/@cosmology/telescope/-/telescope-1.11.3.tgz#c7934aee7dcbaa994ebfb9fb1ab02c4fd36162a4" - integrity sha512-Fe/PeFsqtizvkthg5Gk5eCE2e0n23/gFDtr1fX3HURFqo0Yvi6F7/ObdJJrDpJZ0fKBT4zxoSNTGAmKfFS0LsA== +"@cosmology/telescope@^1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@cosmology/telescope/-/telescope-1.11.6.tgz#40a03f0c3afd0eaee607548c1c0b594ba3c41e93" + integrity sha512-2e5TmnsMPm9nxViPT3Qpbv7Cv1TW/5matImGUW4LcpQZxh3SFYbf8h5v7AdkNXk5Gyv/fKTTYgV5sURr5pZn/g== dependencies: "@babel/generator" "^7.23.6" "@babel/parser" "^7.23.6" "@babel/traverse" "7.23.6" "@babel/types" "7.23.6" - "@cosmology/ast" "^1.9.1" - "@cosmology/proto-parser" "^1.9.1" - "@cosmology/types" "^1.11.1" - "@cosmology/utils" "^1.9.1" + "@cosmology/ast" "^1.9.3" + "@cosmology/proto-parser" "^1.9.2" + "@cosmology/types" "^1.11.2" + "@cosmology/utils" "^1.9.2" "@cosmwasm/ts-codegen" "0.35.7" "@types/parse-package-name" "0.1.0" case "1.6.3" @@ -1793,20 +1793,20 @@ rimraf "5.0.0" yaml "^2.3.4" -"@cosmology/types@^1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@cosmology/types/-/types-1.11.1.tgz#9454892b3fc584e23842076b157c41ec5265481e" - integrity sha512-WDD1ltC6lwH72xW50iZedoz0CQiUFdrSEAjCK5x7dh7tIX1+ZL8grmbXpSNCDiNOlPD4NTj0Kw0C+WN/urv++A== +"@cosmology/types@^1.11.2": + version "1.11.2" + resolved "https://registry.yarnpkg.com/@cosmology/types/-/types-1.11.2.tgz#ec8d451d16bb841fd1f9325dd52f9ef3a61f4f1e" + integrity sha512-FyHmHZ0hCb2CyIS95nS7yGQKxIcxm8yWyvupNkSNl6vQm1GmebPJwgRe85nAcRygxTEJ/tT9FiT/Ww9N/mdiqA== dependencies: case "1.6.3" fast-json-patch "3.1.1" -"@cosmology/utils@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@cosmology/utils/-/utils-1.9.1.tgz#3169f0458d40c0dc12b133a179c300902584510e" - integrity sha512-Hh3ElEs9bUUaDu74Fppmb39EA1A8mu35OoltA+viteogPvZN7WFJkzVXYVqJVQ8i7xo8GPok3evYe9kfskvJCQ== +"@cosmology/utils@^1.9.2": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@cosmology/utils/-/utils-1.9.2.tgz#265bb1ebf12054ae0a88498e85eab46c4f38f398" + integrity sha512-P1Ytn/90FCENtIHrtUIz+TcLpSAf6euSf6nK6OT0AH7Zs5T/ypsWC6Qkb2z2OV785eu0QKHv+V7nvi3tJ1k49w== dependencies: - "@cosmology/types" "^1.11.1" + "@cosmology/types" "^1.11.2" dotty "0.1.2" "@cosmostation/extension-client@^0.1.15": From e4dabd84be651d418cb8680a25bfb1133e9c8cd4 Mon Sep 17 00:00:00 2001 From: Zetazzz Date: Thu, 2 Jan 2025 17:01:29 +0800 Subject: [PATCH 2/2] authz starship tests --- .vscode/launch.json | 16 ++ libs/injective-react/src/binary.ts | 2 +- libs/injective-react/src/extern.ts | 2 +- libs/injective-react/src/helper-func-types.ts | 9 +- libs/injective-react/src/helpers.ts | 2 +- libs/injective-react/src/react-query.ts | 2 +- libs/injective-react/src/registry.ts | 2 +- libs/injective-react/src/types.ts | 2 +- libs/injective-react/src/utf8.ts | 2 +- libs/injective-react/src/varint.ts | 2 +- libs/injective-vue/src/binary.ts | 2 +- libs/injective-vue/src/extern.ts | 2 +- libs/injective-vue/src/helpers.ts | 2 +- libs/injective-vue/src/registry.ts | 2 +- libs/injective-vue/src/types.ts | 2 +- libs/injective-vue/src/utf8.ts | 2 +- libs/injective-vue/src/varint.ts | 2 +- libs/injective-vue/src/vue-query.ts | 2 +- libs/injectivejs/src/binary.ts | 2 +- libs/injectivejs/src/extern.ts | 2 +- libs/injectivejs/src/helper-func-types.ts | 9 +- libs/injectivejs/src/helpers.ts | 2 +- libs/injectivejs/src/registry.ts | 2 +- libs/injectivejs/src/types.ts | 2 +- libs/injectivejs/src/utf8.ts | 2 +- libs/injectivejs/src/varint.ts | 2 +- libs/interchain-react/src/binary.ts | 2 +- libs/interchain-react/src/extern.ts | 2 +- .../interchain-react/src/helper-func-types.ts | 9 +- libs/interchain-react/src/helpers.ts | 2 +- libs/interchain-react/src/react-query.ts | 2 +- libs/interchain-react/src/registry.ts | 2 +- libs/interchain-react/src/types.ts | 2 +- libs/interchain-react/src/utf8.ts | 2 +- libs/interchain-react/src/varint.ts | 2 +- libs/interchain-vue/src/binary.ts | 2 +- libs/interchain-vue/src/extern.ts | 2 +- libs/interchain-vue/src/helpers.ts | 2 +- libs/interchain-vue/src/registry.ts | 2 +- libs/interchain-vue/src/types.ts | 2 +- libs/interchain-vue/src/utf8.ts | 2 +- libs/interchain-vue/src/varint.ts | 2 +- libs/interchain-vue/src/vue-query.ts | 2 +- libs/interchainjs/src/binary.ts | 2 +- libs/interchainjs/src/extern.ts | 2 +- libs/interchainjs/src/helper-func-types.ts | 9 +- libs/interchainjs/src/helpers.ts | 2 +- libs/interchainjs/src/registry.ts | 2 +- libs/interchainjs/src/types.ts | 2 +- libs/interchainjs/src/utf8.ts | 2 +- libs/interchainjs/src/varint.ts | 2 +- .../starship/__tests__/authz.test.ts | 246 ++++++++---------- package.json | 2 +- yarn.lock | 8 +- 54 files changed, 193 insertions(+), 207 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 96f2feba..65decffb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -84,6 +84,22 @@ "cwd": "${workspaceFolder}/libs/interchainjs", "internalConsoleOptions": "neverOpen" }, + { + "type": "node", + "request": "launch", + "name": "Debug Jest Tests in Interchainjs authz", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "args": [ + "--config", + "./jest.starship.config.js", + "--verbose", + "--bail", + "starship/__tests__/authz.test.ts" + ], + "console": "integratedTerminal", + "cwd": "${workspaceFolder}/libs/interchainjs", + "internalConsoleOptions": "neverOpen" + }, { "type": "node", "request": "launch", diff --git a/libs/injective-react/src/binary.ts b/libs/injective-react/src/binary.ts index f9a515e4..c43d43dd 100644 --- a/libs/injective-react/src/binary.ts +++ b/libs/injective-react/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/extern.ts b/libs/injective-react/src/extern.ts index 7cbe4e00..7c302393 100644 --- a/libs/injective-react/src/extern.ts +++ b/libs/injective-react/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/helper-func-types.ts b/libs/injective-react/src/helper-func-types.ts index a78ed1bc..ece526a8 100644 --- a/libs/injective-react/src/helper-func-types.ts +++ b/libs/injective-react/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -22,6 +22,8 @@ export interface QueryBuilderOptions { } export function buildQuery(opts: QueryBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async (request: TReq) => { let rpc: Rpc | undefined; @@ -33,8 +35,6 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); - registerDependencies(opts.deps ?? []); - const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -82,6 +82,8 @@ export interface TxBuilderOptions { } export function buildTx(opts: TxBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async ( signerAddress: string, message: TMsg, @@ -100,7 +102,6 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); - registerDependencies(opts.deps ?? []); const data = [ { diff --git a/libs/injective-react/src/helpers.ts b/libs/injective-react/src/helpers.ts index ab170adb..56de9bdf 100644 --- a/libs/injective-react/src/helpers.ts +++ b/libs/injective-react/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/react-query.ts b/libs/injective-react/src/react-query.ts index 8b7f8844..42a92f1e 100644 --- a/libs/injective-react/src/react-query.ts +++ b/libs/injective-react/src/react-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/registry.ts b/libs/injective-react/src/registry.ts index e7f6497f..1c617f4e 100644 --- a/libs/injective-react/src/registry.ts +++ b/libs/injective-react/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/types.ts b/libs/injective-react/src/types.ts index e44c8a75..5e2aedd4 100644 --- a/libs/injective-react/src/types.ts +++ b/libs/injective-react/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/utf8.ts b/libs/injective-react/src/utf8.ts index 5fef278b..6daf748d 100644 --- a/libs/injective-react/src/utf8.ts +++ b/libs/injective-react/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-react/src/varint.ts b/libs/injective-react/src/varint.ts index cab33130..0dd27345 100644 --- a/libs/injective-react/src/varint.ts +++ b/libs/injective-react/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/binary.ts b/libs/injective-vue/src/binary.ts index f9a515e4..c43d43dd 100644 --- a/libs/injective-vue/src/binary.ts +++ b/libs/injective-vue/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/extern.ts b/libs/injective-vue/src/extern.ts index 2ceebef5..bdeb765e 100644 --- a/libs/injective-vue/src/extern.ts +++ b/libs/injective-vue/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/helpers.ts b/libs/injective-vue/src/helpers.ts index ab170adb..56de9bdf 100644 --- a/libs/injective-vue/src/helpers.ts +++ b/libs/injective-vue/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/registry.ts b/libs/injective-vue/src/registry.ts index e7f6497f..1c617f4e 100644 --- a/libs/injective-vue/src/registry.ts +++ b/libs/injective-vue/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/types.ts b/libs/injective-vue/src/types.ts index e44c8a75..5e2aedd4 100644 --- a/libs/injective-vue/src/types.ts +++ b/libs/injective-vue/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/utf8.ts b/libs/injective-vue/src/utf8.ts index 5fef278b..6daf748d 100644 --- a/libs/injective-vue/src/utf8.ts +++ b/libs/injective-vue/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/varint.ts b/libs/injective-vue/src/varint.ts index cab33130..0dd27345 100644 --- a/libs/injective-vue/src/varint.ts +++ b/libs/injective-vue/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injective-vue/src/vue-query.ts b/libs/injective-vue/src/vue-query.ts index 7cf1f613..45f87848 100644 --- a/libs/injective-vue/src/vue-query.ts +++ b/libs/injective-vue/src/vue-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/binary.ts b/libs/injectivejs/src/binary.ts index f9a515e4..c43d43dd 100644 --- a/libs/injectivejs/src/binary.ts +++ b/libs/injectivejs/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/extern.ts b/libs/injectivejs/src/extern.ts index 7cbe4e00..7c302393 100644 --- a/libs/injectivejs/src/extern.ts +++ b/libs/injectivejs/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/helper-func-types.ts b/libs/injectivejs/src/helper-func-types.ts index a78ed1bc..ece526a8 100644 --- a/libs/injectivejs/src/helper-func-types.ts +++ b/libs/injectivejs/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -22,6 +22,8 @@ export interface QueryBuilderOptions { } export function buildQuery(opts: QueryBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async (request: TReq) => { let rpc: Rpc | undefined; @@ -33,8 +35,6 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); - registerDependencies(opts.deps ?? []); - const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -82,6 +82,8 @@ export interface TxBuilderOptions { } export function buildTx(opts: TxBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async ( signerAddress: string, message: TMsg, @@ -100,7 +102,6 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); - registerDependencies(opts.deps ?? []); const data = [ { diff --git a/libs/injectivejs/src/helpers.ts b/libs/injectivejs/src/helpers.ts index ab170adb..56de9bdf 100644 --- a/libs/injectivejs/src/helpers.ts +++ b/libs/injectivejs/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/registry.ts b/libs/injectivejs/src/registry.ts index e7f6497f..1c617f4e 100644 --- a/libs/injectivejs/src/registry.ts +++ b/libs/injectivejs/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/types.ts b/libs/injectivejs/src/types.ts index e44c8a75..5e2aedd4 100644 --- a/libs/injectivejs/src/types.ts +++ b/libs/injectivejs/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/utf8.ts b/libs/injectivejs/src/utf8.ts index 5fef278b..6daf748d 100644 --- a/libs/injectivejs/src/utf8.ts +++ b/libs/injectivejs/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/injectivejs/src/varint.ts b/libs/injectivejs/src/varint.ts index cab33130..0dd27345 100644 --- a/libs/injectivejs/src/varint.ts +++ b/libs/injectivejs/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/binary.ts b/libs/interchain-react/src/binary.ts index f9a515e4..c43d43dd 100644 --- a/libs/interchain-react/src/binary.ts +++ b/libs/interchain-react/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/extern.ts b/libs/interchain-react/src/extern.ts index 7cbe4e00..7c302393 100644 --- a/libs/interchain-react/src/extern.ts +++ b/libs/interchain-react/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/helper-func-types.ts b/libs/interchain-react/src/helper-func-types.ts index a78ed1bc..ece526a8 100644 --- a/libs/interchain-react/src/helper-func-types.ts +++ b/libs/interchain-react/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -22,6 +22,8 @@ export interface QueryBuilderOptions { } export function buildQuery(opts: QueryBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async (request: TReq) => { let rpc: Rpc | undefined; @@ -33,8 +35,6 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); - registerDependencies(opts.deps ?? []); - const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -82,6 +82,8 @@ export interface TxBuilderOptions { } export function buildTx(opts: TxBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async ( signerAddress: string, message: TMsg, @@ -100,7 +102,6 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); - registerDependencies(opts.deps ?? []); const data = [ { diff --git a/libs/interchain-react/src/helpers.ts b/libs/interchain-react/src/helpers.ts index ab170adb..56de9bdf 100644 --- a/libs/interchain-react/src/helpers.ts +++ b/libs/interchain-react/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/react-query.ts b/libs/interchain-react/src/react-query.ts index 8b7f8844..42a92f1e 100644 --- a/libs/interchain-react/src/react-query.ts +++ b/libs/interchain-react/src/react-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/registry.ts b/libs/interchain-react/src/registry.ts index e7f6497f..1c617f4e 100644 --- a/libs/interchain-react/src/registry.ts +++ b/libs/interchain-react/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/types.ts b/libs/interchain-react/src/types.ts index e44c8a75..5e2aedd4 100644 --- a/libs/interchain-react/src/types.ts +++ b/libs/interchain-react/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/utf8.ts b/libs/interchain-react/src/utf8.ts index 5fef278b..6daf748d 100644 --- a/libs/interchain-react/src/utf8.ts +++ b/libs/interchain-react/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-react/src/varint.ts b/libs/interchain-react/src/varint.ts index cab33130..0dd27345 100644 --- a/libs/interchain-react/src/varint.ts +++ b/libs/interchain-react/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/binary.ts b/libs/interchain-vue/src/binary.ts index f9a515e4..c43d43dd 100644 --- a/libs/interchain-vue/src/binary.ts +++ b/libs/interchain-vue/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/extern.ts b/libs/interchain-vue/src/extern.ts index 2ceebef5..bdeb765e 100644 --- a/libs/interchain-vue/src/extern.ts +++ b/libs/interchain-vue/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/helpers.ts b/libs/interchain-vue/src/helpers.ts index ab170adb..56de9bdf 100644 --- a/libs/interchain-vue/src/helpers.ts +++ b/libs/interchain-vue/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/registry.ts b/libs/interchain-vue/src/registry.ts index e7f6497f..1c617f4e 100644 --- a/libs/interchain-vue/src/registry.ts +++ b/libs/interchain-vue/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/types.ts b/libs/interchain-vue/src/types.ts index e44c8a75..5e2aedd4 100644 --- a/libs/interchain-vue/src/types.ts +++ b/libs/interchain-vue/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/utf8.ts b/libs/interchain-vue/src/utf8.ts index 5fef278b..6daf748d 100644 --- a/libs/interchain-vue/src/utf8.ts +++ b/libs/interchain-vue/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/varint.ts b/libs/interchain-vue/src/varint.ts index cab33130..0dd27345 100644 --- a/libs/interchain-vue/src/varint.ts +++ b/libs/interchain-vue/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchain-vue/src/vue-query.ts b/libs/interchain-vue/src/vue-query.ts index 7cf1f613..45f87848 100644 --- a/libs/interchain-vue/src/vue-query.ts +++ b/libs/interchain-vue/src/vue-query.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/binary.ts b/libs/interchainjs/src/binary.ts index f9a515e4..c43d43dd 100644 --- a/libs/interchainjs/src/binary.ts +++ b/libs/interchainjs/src/binary.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/extern.ts b/libs/interchainjs/src/extern.ts index 7cbe4e00..7c302393 100644 --- a/libs/interchainjs/src/extern.ts +++ b/libs/interchainjs/src/extern.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/helper-func-types.ts b/libs/interchainjs/src/helper-func-types.ts index a78ed1bc..ece526a8 100644 --- a/libs/interchainjs/src/helper-func-types.ts +++ b/libs/interchainjs/src/helper-func-types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ @@ -22,6 +22,8 @@ export interface QueryBuilderOptions { } export function buildQuery(opts: QueryBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async (request: TReq) => { let rpc: Rpc | undefined; @@ -33,8 +35,6 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); - registerDependencies(opts.deps ?? []); - const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); return opts.decode(response); @@ -82,6 +82,8 @@ export interface TxBuilderOptions { } export function buildTx(opts: TxBuilderOptions) { + registerDependencies(opts.deps ?? []); + return async ( signerAddress: string, message: TMsg, @@ -100,7 +102,6 @@ export function buildTx(opts: TxBuilderOptions) { //register all related encoders and converters client.addEncoders(opts.encoders ?? []); client.addConverters(opts.converters ?? []); - registerDependencies(opts.deps ?? []); const data = [ { diff --git a/libs/interchainjs/src/helpers.ts b/libs/interchainjs/src/helpers.ts index ab170adb..56de9bdf 100644 --- a/libs/interchainjs/src/helpers.ts +++ b/libs/interchainjs/src/helpers.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/registry.ts b/libs/interchainjs/src/registry.ts index e7f6497f..1c617f4e 100644 --- a/libs/interchainjs/src/registry.ts +++ b/libs/interchainjs/src/registry.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/types.ts b/libs/interchainjs/src/types.ts index e44c8a75..5e2aedd4 100644 --- a/libs/interchainjs/src/types.ts +++ b/libs/interchainjs/src/types.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/utf8.ts b/libs/interchainjs/src/utf8.ts index 5fef278b..6daf748d 100644 --- a/libs/interchainjs/src/utf8.ts +++ b/libs/interchainjs/src/utf8.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/src/varint.ts b/libs/interchainjs/src/varint.ts index cab33130..0dd27345 100644 --- a/libs/interchainjs/src/varint.ts +++ b/libs/interchainjs/src/varint.ts @@ -1,5 +1,5 @@ /** -* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.6 +* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.7 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or npm scripts command that is used to regenerate this bundle. */ diff --git a/libs/interchainjs/starship/__tests__/authz.test.ts b/libs/interchainjs/starship/__tests__/authz.test.ts index 01e3c44c..52aaa826 100644 --- a/libs/interchainjs/starship/__tests__/authz.test.ts +++ b/libs/interchainjs/starship/__tests__/authz.test.ts @@ -1,8 +1,10 @@ +import "./setup.test"; + import { generateMnemonic } from "@confio/relayer/build/lib/helpers"; import { assertIsDeliverTxSuccess } from "@cosmjs/stargate"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; +import { useChain } from 'starshipjs'; -import "./setup.test"; import { GenericAuthorization, Grant, @@ -14,39 +16,96 @@ import { } from "interchainjs/cosmos/authz/v1beta1/tx"; import { SendAuthorization } from "interchainjs/cosmos/bank/v1beta1/authz"; import { MsgVote } from "interchainjs/cosmos/gov/v1beta1/tx"; -import { QueryGrantsRequest } from "interchainjs/cosmos/authz/v1beta1/query"; +import { QueryGranteeGrantsRequest, QueryGranteeGrantsResponse } from "interchainjs/cosmos/authz/v1beta1/query"; import { MsgSend } from "interchainjs/cosmos/bank/v1beta1/tx"; +import { Secp256k1HDWallet } from "@interchainjs/cosmos/wallets/secp256k1hd"; +import { SigningClient as CosmosSigningClient } from '@interchainjs/cosmos/signing-client'; +import { QueryBalanceRequest, QueryBalanceResponse } from 'interchainjs/cosmos/bank/v1beta1/query'; + +import { createGetBalance } from "interchainjs/cosmos/bank/v1beta1/query.rpc.func"; +import { DeliverTxResponse, StdFee } from "@interchainjs/types"; +import { createGrant, createExec, createRevoke } from "interchainjs/cosmos/authz/v1beta1/tx.rpc.func"; +import { createGetGranteeGrants } from "interchainjs/cosmos/authz/v1beta1/query.rpc.func"; +import { DirectGenericOfflineSigner } from "@interchainjs/cosmos/types/wallet"; + +const cosmosHdPath = "m/44'/118'/0'/0/0"; describe("Authz testing", () => { - let wallet1, address1, denom; - let wallet2, address2; - let wallet3, address3; - let chainInfo, getCoin, getRpcEndpoint, creditFromFaucet; - let expiration; + let wallet1: Secp256k1HDWallet, address1: string, denom: string; + let wallet2: Secp256k1HDWallet, address2: string; + let wallet3: Secp256k1HDWallet, address3: string; + let commonPrefix: string, chainInfo, getCoin, getRpcEndpoint: () => Promise, creditFromFaucet; + let expiration: Date; + + let getBalance: (request: QueryBalanceRequest) => Promise; + let getGranteeGrants: (request: QueryGranteeGrantsRequest) => Promise; + + let grant1: (signerAddress: string, message: MsgGrant, fee: StdFee | "auto", memo: string) => Promise; + let exec2: (signerAddress: string, message: MsgExec, fee: StdFee | "auto", memo: string) => Promise; + let revoke1: (signerAddress: string, message: MsgRevoke, fee: StdFee | "auto", memo: string) => Promise; // Variables used accross testcases beforeAll(async () => { ({ chainInfo, getCoin, getRpcEndpoint, creditFromFaucet } = - useChain("cosmos")); - denom = getCoin().base; + useChain("osmosis")); + denom = (await getCoin()).base; + + commonPrefix = chainInfo?.chain?.bech32_prefix; + + const rpcEndpoint = await getRpcEndpoint(); + getBalance = createGetBalance(rpcEndpoint); + getGranteeGrants = createGetGranteeGrants(rpcEndpoint); // Initialize wallet - wallet1 = await DirectSecp256k1HdWallet.fromMnemonic(generateMnemonic(), { - prefix: chainInfo.chain.bech32_prefix, - }); + wallet1 = await Secp256k1HDWallet.fromMnemonic(generateMnemonic(), [ + { + prefix: commonPrefix, + hdPath: cosmosHdPath, + }, + ]); address1 = (await wallet1.getAccounts())[0].address; + const signingClient1 = await CosmosSigningClient.connectWithSigner( + await getRpcEndpoint(), + new DirectGenericOfflineSigner(wallet1), + { + broadcast: { + checkTx: true, + deliverTx: true, + }, + } + ); - wallet2 = await DirectSecp256k1HdWallet.fromMnemonic(generateMnemonic(), { - prefix: chainInfo.chain.bech32_prefix, - }); + wallet2 = await Secp256k1HDWallet.fromMnemonic(generateMnemonic(), [ + { + prefix: commonPrefix, + hdPath: cosmosHdPath, + }, + ]); address2 = (await wallet2.getAccounts())[0].address; + const signingClient2 = await CosmosSigningClient.connectWithSigner( + await getRpcEndpoint(), + new DirectGenericOfflineSigner(wallet2), + { + broadcast: { + checkTx: true, + deliverTx: true, + }, + } + ); - wallet3 = await DirectSecp256k1HdWallet.fromMnemonic(generateMnemonic(), { - prefix: chainInfo.chain.bech32_prefix, - }); + wallet3 = await Secp256k1HDWallet.fromMnemonic(generateMnemonic(), [ + { + prefix: commonPrefix, + hdPath: cosmosHdPath, + }, + ]); address3 = (await wallet3.getAccounts())[0].address; + grant1 = createGrant(signingClient1); + exec2 = createExec(signingClient2); + revoke1 = createRevoke(signingClient1); + // Transfer osmosis and ibc tokens to address, send only osmo to address await creditFromFaucet(address1); await creditFromFaucet(address2); @@ -59,11 +118,7 @@ describe("Authz testing", () => { }, 200000); it("check address1 has tokens", async () => { - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - - const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + const { balance } = await getBalance({ address: address1, denom, }); @@ -72,11 +127,7 @@ describe("Authz testing", () => { }, 200000); it("check address2 has tokens", async () => { - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - - const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + const { balance } = await getBalance({ address: address2, denom, }); @@ -85,11 +136,7 @@ describe("Authz testing", () => { }, 200000); it("check address3 has tokens", async () => { - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - - const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + const { balance } = await getBalance({ address: address3, denom, }); @@ -98,15 +145,6 @@ describe("Authz testing", () => { }, 200000); it("grant address2 Send Auth with limits", async () => { - const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ - rpcEndpoint: getRpcEndpoint(), - signer: wallet1, - }); - - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - const fee = { amount: [ { @@ -133,15 +171,11 @@ describe("Authz testing", () => { }), }); - const result = await msgClient1.cosmos.authz.v1beta1.grant( - address1, - msg, - fee - ); + const result = await grant1(address1, msg, fee, "grant address2 Send Auth with limits"); assertIsDeliverTxSuccess(result); - const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + const authsResults = await getGranteeGrants({ grantee: address2, }); @@ -157,15 +191,6 @@ describe("Authz testing", () => { }, 200000); it("grant address3 Generic Send Auth", async () => { - const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ - rpcEndpoint: getRpcEndpoint(), - signer: wallet1, - }); - - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - const fee = { amount: [ { @@ -187,15 +212,16 @@ describe("Authz testing", () => { }), }); - const result = await msgClient1.cosmos.authz.v1beta1.grant( + const result = await grant1( address1, msg, - fee + fee, + "grant address3 Generic Send Auth" ); assertIsDeliverTxSuccess(result); - const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + const authsResults = await getGranteeGrants({ grantee: address3, }); @@ -211,15 +237,6 @@ describe("Authz testing", () => { }, 200000); it("grant address2 Generic Vote Auth", async () => { - const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ - rpcEndpoint: getRpcEndpoint(), - signer: wallet1, - }); - - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - const fee = { amount: [ { @@ -241,15 +258,16 @@ describe("Authz testing", () => { }), }); - const result = await msgClient1.cosmos.authz.v1beta1.grant( + const result = await grant1( address1, msg, - fee + fee, + "grant address2 Generic Vote Auth" ); assertIsDeliverTxSuccess(result); - const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + const authsResults = await getGranteeGrants({ grantee: address2, }); @@ -264,34 +282,7 @@ describe("Authz testing", () => { } }, 200000); - it("get address2 auths", async () => { - await sleep(1000) - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - - console.log(`granter: ${address1}, grantee: ${address2}, msg: ${MsgVote.typeUrl}`) - await sleep(1000) - const authsResults = await queryClient.cosmos.authz.v1beta1.grants(QueryGrantsRequest.fromPartial({ - granter: address1, - grantee: address2, - msgTypeUrl: MsgVote.typeUrl - })); - - console.log(authsResults); - - }, 2000000); - it("exec address2 send", async () => { - const msgClient2 = await cosmos.ClientFactory.createRPCMsgExtensions({ - rpcEndpoint: getRpcEndpoint(), - signer: wallet2, - }); - - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - const fee = { amount: [ { @@ -320,34 +311,24 @@ describe("Authz testing", () => { ], }); - const result = await msgClient2.cosmos.authz.v1beta1.exec( + const result = await exec2( address2, msg, - fee + fee, + "exec address2 send" ); assertIsDeliverTxSuccess(result); - const { balance } = await queryClient.cosmos.bank.v1beta1.balance({ + const { balance } = await getBalance({ address: address2, denom, }); - console.log(balance) - expect(balance?.amount).toEqual("9999990000"); // not 10000000000, due to fees deduction }, 2000000); it("revoke address2 vote auth", async () => { - const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ - rpcEndpoint: getRpcEndpoint(), - signer: wallet1, - }); - - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - const fee = { amount: [ { @@ -364,15 +345,16 @@ describe("Authz testing", () => { msgTypeUrl: MsgVote.typeUrl, }); - const result = await msgClient1.cosmos.authz.v1beta1.revoke( + const result = await revoke1( address1, msg, - fee + fee, + "revoke address2 vote auth" ); assertIsDeliverTxSuccess(result); - const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + const authsResults = await getGranteeGrants({ grantee: address2, }); @@ -388,15 +370,6 @@ describe("Authz testing", () => { }, 200000); it("revoke address3 generic send auth", async () => { - const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ - rpcEndpoint: getRpcEndpoint(), - signer: wallet1, - }); - - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - const fee = { amount: [ { @@ -413,15 +386,16 @@ describe("Authz testing", () => { msgTypeUrl: MsgSend.typeUrl, }); - const result = await msgClient1.cosmos.authz.v1beta1.revoke( + const result = await revoke1( address1, msg, - fee + fee, + "revoke address3 generic send auth" ); assertIsDeliverTxSuccess(result); - const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + const authsResults = await getGranteeGrants({ grantee: address3, }); @@ -429,15 +403,6 @@ describe("Authz testing", () => { }, 200000); it("revoke address2 send auth", async () => { - const msgClient1 = await cosmos.ClientFactory.createRPCMsgExtensions({ - rpcEndpoint: getRpcEndpoint(), - signer: wallet1, - }); - - const queryClient = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: getRpcEndpoint(), - }); - const fee = { amount: [ { @@ -454,15 +419,16 @@ describe("Authz testing", () => { msgTypeUrl: MsgSend.typeUrl, }); - const result = await msgClient1.cosmos.authz.v1beta1.revoke( + const result = await revoke1( address1, msg, - fee + fee, + "revoke address2 send auth" ); assertIsDeliverTxSuccess(result); - const authsResults = await queryClient.cosmos.authz.v1beta1.granteeGrants({ + const authsResults = await getGranteeGrants({ grantee: address2, }); diff --git a/package.json b/package.json index 7267f2fd..ad51f253 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@chain-registry/client": "1.18.1", "@confio/relayer": "^0.12.0", "@cosmjs/crypto": "^0.32.2", - "@cosmology/telescope": "^1.11.6", + "@cosmology/telescope": "^1.11.7", "@injectivelabs/networks": "^1.14.13", "@injectivelabs/sdk-ts": "^1.14.13", "@injectivelabs/wallet-ts": "^1.14.13", diff --git a/yarn.lock b/yarn.lock index 3370e14b..951e85b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1763,10 +1763,10 @@ "@types/node" ">=13.7.0" long "^5.0.0" -"@cosmology/telescope@^1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@cosmology/telescope/-/telescope-1.11.6.tgz#40a03f0c3afd0eaee607548c1c0b594ba3c41e93" - integrity sha512-2e5TmnsMPm9nxViPT3Qpbv7Cv1TW/5matImGUW4LcpQZxh3SFYbf8h5v7AdkNXk5Gyv/fKTTYgV5sURr5pZn/g== +"@cosmology/telescope@^1.11.7": + version "1.11.7" + resolved "https://registry.yarnpkg.com/@cosmology/telescope/-/telescope-1.11.7.tgz#66db4fc7b1bff7811c1620a76ad5d4c874ceb2be" + integrity sha512-wBTTypagr2Lgh4onOIWIiQ96iLfL6Qe8uIS0yGosp2r2XPjT3AWCOu5s/9C5X2dzhD1a1Vl6wxTMdyzPF+1hng== dependencies: "@babel/generator" "^7.23.6" "@babel/parser" "^7.23.6"