@xpla/xpla-react 1.7.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +47 -0
- package/src/amino/amino.ts +1 -0
- package/src/binary.ts +534 -0
- package/src/cosmos/app/runtime/v1alpha1/module.ts +423 -0
- package/src/cosmos/app/runtime/v2/module.ts +589 -0
- package/src/cosmos/app/v1alpha1/config.ts +422 -0
- package/src/cosmos/app/v1alpha1/module.ts +461 -0
- package/src/cosmos/app/v1alpha1/query.rpc.func.ts +14 -0
- package/src/cosmos/app/v1alpha1/query.ts +177 -0
- package/src/cosmos/auth/module/v1/module.ts +253 -0
- package/src/cosmos/auth/v1beta1/accounts.ts +226 -0
- package/src/cosmos/auth/v1beta1/auth.ts +550 -0
- package/src/cosmos/auth/v1beta1/genesis.ts +119 -0
- package/src/cosmos/auth/v1beta1/query.rpc.func.ts +113 -0
- package/src/cosmos/auth/v1beta1/query.ts +2034 -0
- package/src/cosmos/auth/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/auth/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/auth/v1beta1/tx.ts +219 -0
- package/src/cosmos/authz/module/v1/module.ts +80 -0
- package/src/cosmos/authz/v1beta1/authz.ts +481 -0
- package/src/cosmos/authz/v1beta1/event.ts +259 -0
- package/src/cosmos/authz/v1beta1/genesis.ts +100 -0
- package/src/cosmos/authz/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/authz/v1beta1/query.ts +707 -0
- package/src/cosmos/authz/v1beta1/tx.registry.ts +65 -0
- package/src/cosmos/authz/v1beta1/tx.rpc.func.ts +31 -0
- package/src/cosmos/authz/v1beta1/tx.ts +647 -0
- package/src/cosmos/autocli/v1/options.ts +1145 -0
- package/src/cosmos/autocli/v1/query.rpc.func.ts +14 -0
- package/src/cosmos/autocli/v1/query.ts +288 -0
- package/src/cosmos/bank/module/v1/module.ts +153 -0
- package/src/cosmos/bank/v1beta1/authz.ts +138 -0
- package/src/cosmos/bank/v1beta1/bank.ts +974 -0
- package/src/cosmos/bank/v1beta1/genesis.ts +307 -0
- package/src/cosmos/bank/v1beta1/query.rpc.func.ts +146 -0
- package/src/cosmos/bank/v1beta1/query.ts +3027 -0
- package/src/cosmos/bank/v1beta1/tx.registry.ts +83 -0
- package/src/cosmos/bank/v1beta1/tx.rpc.func.ts +40 -0
- package/src/cosmos/bank/v1beta1/tx.ts +861 -0
- package/src/cosmos/base/abci/v1beta1/abci.ts +1698 -0
- package/src/cosmos/base/grpc/v2/service.rpc.func.ts +25 -0
- package/src/cosmos/base/grpc/v2/service.ts +473 -0
- package/src/cosmos/base/node/v1beta1/query.rpc.func.ts +25 -0
- package/src/cosmos/base/node/v1beta1/query.ts +454 -0
- package/src/cosmos/base/query/v1beta1/pagination.ts +361 -0
- package/src/cosmos/base/reflection/v1beta1/reflection.rpc.func.ts +25 -0
- package/src/cosmos/base/reflection/v1beta1/reflection.ts +382 -0
- package/src/cosmos/base/reflection/v2alpha1/reflection.rpc.func.ts +69 -0
- package/src/cosmos/base/reflection/v2alpha1/reflection.ts +2727 -0
- package/src/cosmos/base/tendermint/v1beta1/query.rpc.func.ts +80 -0
- package/src/cosmos/base/tendermint/v1beta1/query.ts +2302 -0
- package/src/cosmos/base/tendermint/v1beta1/types.ts +455 -0
- package/src/cosmos/base/v1beta1/coin.ts +439 -0
- package/src/cosmos/circuit/module/v1/module.ts +99 -0
- package/src/cosmos/circuit/v1/query.rpc.func.ts +36 -0
- package/src/cosmos/circuit/v1/query.ts +574 -0
- package/src/cosmos/circuit/v1/tx.registry.ts +65 -0
- package/src/cosmos/circuit/v1/tx.rpc.func.ts +31 -0
- package/src/cosmos/circuit/v1/tx.ts +676 -0
- package/src/cosmos/circuit/v1/types.ts +413 -0
- package/src/cosmos/consensus/module/v1/module.ts +99 -0
- package/src/cosmos/consensus/v1/query.rpc.func.ts +14 -0
- package/src/cosmos/consensus/v1/query.ts +185 -0
- package/src/cosmos/consensus/v1/tx.registry.ts +29 -0
- package/src/cosmos/consensus/v1/tx.rpc.func.ts +13 -0
- package/src/cosmos/consensus/v1/tx.ts +255 -0
- package/src/cosmos/crisis/module/v1/module.ts +115 -0
- package/src/cosmos/crisis/v1beta1/genesis.ts +106 -0
- package/src/cosmos/crisis/v1beta1/tx.registry.ts +47 -0
- package/src/cosmos/crisis/v1beta1/tx.rpc.func.ts +22 -0
- package/src/cosmos/crisis/v1beta1/tx.ts +416 -0
- package/src/cosmos/crypto/ed25519/keys.ts +209 -0
- package/src/cosmos/crypto/hd/v1/hd.ts +169 -0
- package/src/cosmos/crypto/keyring/v1/record.ts +529 -0
- package/src/cosmos/crypto/multisig/keys.ts +122 -0
- package/src/cosmos/crypto/multisig/v1beta1/multisig.ts +225 -0
- package/src/cosmos/crypto/secp256k1/keys.ts +203 -0
- package/src/cosmos/crypto/secp256r1/keys.ts +201 -0
- package/src/cosmos/distribution/module/v1/module.ts +113 -0
- package/src/cosmos/distribution/v1beta1/distribution.ts +1494 -0
- package/src/cosmos/distribution/v1beta1/genesis.ts +1129 -0
- package/src/cosmos/distribution/v1beta1/query.rpc.func.ts +113 -0
- package/src/cosmos/distribution/v1beta1/query.ts +2126 -0
- package/src/cosmos/distribution/v1beta1/tx.registry.ts +137 -0
- package/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +67 -0
- package/src/cosmos/distribution/v1beta1/tx.ts +1478 -0
- package/src/cosmos/evidence/module/v1/module.ts +80 -0
- package/src/cosmos/evidence/v1beta1/evidence.ts +154 -0
- package/src/cosmos/evidence/v1beta1/genesis.ts +102 -0
- package/src/cosmos/evidence/v1beta1/query.rpc.func.ts +25 -0
- package/src/cosmos/evidence/v1beta1/query.ts +451 -0
- package/src/cosmos/evidence/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/evidence/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/evidence/v1beta1/tx.ts +221 -0
- package/src/cosmos/feegrant/module/v1/module.ts +80 -0
- package/src/cosmos/feegrant/v1beta1/feegrant.ts +573 -0
- package/src/cosmos/feegrant/v1beta1/genesis.ts +100 -0
- package/src/cosmos/feegrant/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/feegrant/v1beta1/query.ts +677 -0
- package/src/cosmos/feegrant/v1beta1/tx.registry.ts +65 -0
- package/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +31 -0
- package/src/cosmos/feegrant/v1beta1/tx.ts +597 -0
- package/src/cosmos/genutil/module/v1/module.ts +80 -0
- package/src/cosmos/genutil/v1beta1/genesis.ts +101 -0
- package/src/cosmos/gov/module/v1/module.ts +121 -0
- package/src/cosmos/gov/v1/genesis.ts +280 -0
- package/src/cosmos/gov/v1/gov.ts +1843 -0
- package/src/cosmos/gov/v1/query.rpc.func.ts +102 -0
- package/src/cosmos/gov/v1/query.ts +1970 -0
- package/src/cosmos/gov/v1/tx.registry.ts +137 -0
- package/src/cosmos/gov/v1/tx.rpc.func.ts +67 -0
- package/src/cosmos/gov/v1/tx.ts +1657 -0
- package/src/cosmos/gov/v1beta1/genesis.ts +202 -0
- package/src/cosmos/gov/v1beta1/gov.ts +1425 -0
- package/src/cosmos/gov/v1beta1/query.rpc.func.ts +91 -0
- package/src/cosmos/gov/v1beta1/query.ts +1749 -0
- package/src/cosmos/gov/v1beta1/tx.registry.ts +83 -0
- package/src/cosmos/gov/v1beta1/tx.rpc.func.ts +40 -0
- package/src/cosmos/gov/v1beta1/tx.ts +881 -0
- package/src/cosmos/group/module/v1/module.ts +128 -0
- package/src/cosmos/group/v1/events.ts +1044 -0
- package/src/cosmos/group/v1/genesis.ts +240 -0
- package/src/cosmos/group/v1/query.rpc.func.ts +157 -0
- package/src/cosmos/group/v1/query.ts +3015 -0
- package/src/cosmos/group/v1/tx.registry.ts +263 -0
- package/src/cosmos/group/v1/tx.rpc.func.ts +130 -0
- package/src/cosmos/group/v1/tx.ts +3207 -0
- package/src/cosmos/group/v1/types.ts +2081 -0
- package/src/cosmos/ics23/v1/proofs.ts +2060 -0
- package/src/cosmos/mint/module/v1/module.ts +113 -0
- package/src/cosmos/mint/v1beta1/genesis.ts +116 -0
- package/src/cosmos/mint/v1beta1/mint.ts +291 -0
- package/src/cosmos/mint/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/mint/v1beta1/query.ts +541 -0
- package/src/cosmos/mint/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/mint/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/mint/v1beta1/tx.ts +219 -0
- package/src/cosmos/msg/textual/v1/textual.ts +1 -0
- package/src/cosmos/msg/v1/msg.ts +1 -0
- package/src/cosmos/nft/module/v1/module.ts +80 -0
- package/src/cosmos/nft/v1beta1/event.ts +403 -0
- package/src/cosmos/nft/v1beta1/genesis.ts +234 -0
- package/src/cosmos/nft/v1beta1/nft.ts +356 -0
- package/src/cosmos/nft/v1beta1/query.rpc.func.ts +80 -0
- package/src/cosmos/nft/v1beta1/query.ts +1465 -0
- package/src/cosmos/nft/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/nft/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/nft/v1beta1/tx.ts +224 -0
- package/src/cosmos/orm/module/v1alpha1/module.ts +88 -0
- package/src/cosmos/orm/query/v1alpha1/query.rpc.func.ts +25 -0
- package/src/cosmos/orm/query/v1alpha1/query.ts +993 -0
- package/src/cosmos/orm/v1/orm.ts +589 -0
- package/src/cosmos/orm/v1alpha1/schema.ts +325 -0
- package/src/cosmos/params/module/v1/module.ts +80 -0
- package/src/cosmos/params/v1beta1/params.ts +255 -0
- package/src/cosmos/params/v1beta1/query.rpc.func.ts +25 -0
- package/src/cosmos/params/v1beta1/query.ts +525 -0
- package/src/cosmos/query/v1/query.ts +1 -0
- package/src/cosmos/reflection/v1/reflection.rpc.func.ts +14 -0
- package/src/cosmos/reflection/v1/reflection.ts +179 -0
- package/src/cosmos/slashing/module/v1/module.ts +99 -0
- package/src/cosmos/slashing/v1beta1/genesis.ts +492 -0
- package/src/cosmos/slashing/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/slashing/v1beta1/query.ts +598 -0
- package/src/cosmos/slashing/v1beta1/slashing.ts +357 -0
- package/src/cosmos/slashing/v1beta1/tx.registry.ts +47 -0
- package/src/cosmos/slashing/v1beta1/tx.rpc.func.ts +22 -0
- package/src/cosmos/slashing/v1beta1/tx.ts +390 -0
- package/src/cosmos/staking/module/v1/module.ts +157 -0
- package/src/cosmos/staking/v1beta1/authz.ts +323 -0
- package/src/cosmos/staking/v1beta1/genesis.ts +346 -0
- package/src/cosmos/staking/v1beta1/query.rpc.func.ts +157 -0
- package/src/cosmos/staking/v1beta1/query.ts +3073 -0
- package/src/cosmos/staking/v1beta1/staking.ts +3005 -0
- package/src/cosmos/staking/v1beta1/tx.registry.ts +137 -0
- package/src/cosmos/staking/v1beta1/tx.rpc.func.ts +67 -0
- package/src/cosmos/staking/v1beta1/tx.ts +1638 -0
- package/src/cosmos/store/internal/kv/v1beta1/kv.ts +207 -0
- package/src/cosmos/store/snapshots/v1/snapshot.ts +863 -0
- package/src/cosmos/store/snapshots/v2/snapshot.ts +823 -0
- package/src/cosmos/store/streaming/abci/grpc.ts +393 -0
- package/src/cosmos/store/v1beta1/commit_info.ts +362 -0
- package/src/cosmos/store/v1beta1/listening.ts +286 -0
- package/src/cosmos/streaming/v1/grpc.ts +985 -0
- package/src/cosmos/tx/config/v1/config.ts +127 -0
- package/src/cosmos/tx/signing/v1beta1/signing.ts +688 -0
- package/src/cosmos/tx/v1beta1/service.rpc.func.ts +102 -0
- package/src/cosmos/tx/v1beta1/service.ts +2294 -0
- package/src/cosmos/tx/v1beta1/tx.ts +2029 -0
- package/src/cosmos/upgrade/module/v1/module.ts +99 -0
- package/src/cosmos/upgrade/v1beta1/query.rpc.func.ts +58 -0
- package/src/cosmos/upgrade/v1beta1/query.ts +1016 -0
- package/src/cosmos/upgrade/v1beta1/tx.registry.ts +47 -0
- package/src/cosmos/upgrade/v1beta1/tx.rpc.func.ts +22 -0
- package/src/cosmos/upgrade/v1beta1/tx.ts +398 -0
- package/src/cosmos/upgrade/v1beta1/upgrade.ts +591 -0
- package/src/cosmos/validate/module/v1/module.ts +80 -0
- package/src/cosmos/vesting/module/v1/module.ts +80 -0
- package/src/cosmos/vesting/v1beta1/tx.registry.ts +65 -0
- package/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +31 -0
- package/src/cosmos/vesting/v1beta1/tx.ts +698 -0
- package/src/cosmos/vesting/v1beta1/vesting.ts +735 -0
- package/src/cosmos_proto/cosmos.ts +341 -0
- package/src/cosmwasm/wasm/v1/authz.ts +1231 -0
- package/src/cosmwasm/wasm/v1/genesis.ts +532 -0
- package/src/cosmwasm/wasm/v1/ibc.ts +355 -0
- package/src/cosmwasm/wasm/v1/proposal_legacy.ts +2432 -0
- package/src/cosmwasm/wasm/v1/query.rpc.func.ts +124 -0
- package/src/cosmwasm/wasm/v1/query.ts +2560 -0
- package/src/cosmwasm/wasm/v1/tx.registry.ts +317 -0
- package/src/cosmwasm/wasm/v1/tx.rpc.func.ts +157 -0
- package/src/cosmwasm/wasm/v1/tx.ts +4191 -0
- package/src/cosmwasm/wasm/v1/types.ts +1120 -0
- package/src/ethermint/crypto/v1/ethsecp256k1/keys.ts +193 -0
- package/src/ethermint/evm/v1/events.ts +485 -0
- package/src/ethermint/evm/v1/evm.ts +1590 -0
- package/src/ethermint/evm/v1/genesis.ts +240 -0
- package/src/ethermint/evm/v1/query.rpc.func.ts +136 -0
- package/src/ethermint/evm/v1/query.ts +2535 -0
- package/src/ethermint/evm/v1/tx.registry.ts +47 -0
- package/src/ethermint/evm/v1/tx.rpc.func.ts +22 -0
- package/src/ethermint/evm/v1/tx.ts +1333 -0
- package/src/ethermint/feemarket/v1/events.ts +195 -0
- package/src/ethermint/feemarket/v1/feemarket.ts +213 -0
- package/src/ethermint/feemarket/v1/genesis.ts +114 -0
- package/src/ethermint/feemarket/v1/query.rpc.func.ts +36 -0
- package/src/ethermint/feemarket/v1/query.ts +487 -0
- package/src/ethermint/feemarket/v1/tx.registry.ts +29 -0
- package/src/ethermint/feemarket/v1/tx.rpc.func.ts +13 -0
- package/src/ethermint/feemarket/v1/tx.ts +197 -0
- package/src/ethermint/types/v1/account.ts +114 -0
- package/src/ethermint/types/v1/dynamic_fee.ts +91 -0
- package/src/ethermint/types/v1/indexer.ts +205 -0
- package/src/ethermint/types/v1/web3.ts +147 -0
- package/src/extern.ts +38 -0
- package/src/gogoproto/gogo.ts +1 -0
- package/src/google/api/annotations.ts +1 -0
- package/src/google/api/http.ts +1069 -0
- package/src/google/protobuf/any.ts +331 -0
- package/src/google/protobuf/descriptor.ts +7177 -0
- package/src/google/protobuf/duration.ts +225 -0
- package/src/google/protobuf/timestamp.ts +281 -0
- package/src/helper-func-types.ts +191 -0
- package/src/helpers.ts +259 -0
- package/src/ibc/applications/fee/v1/ack.ts +131 -0
- package/src/ibc/applications/fee/v1/fee.ts +481 -0
- package/src/ibc/applications/fee/v1/genesis.ts +661 -0
- package/src/ibc/applications/fee/v1/metadata.ts +121 -0
- package/src/ibc/applications/fee/v1/query.rpc.func.ts +113 -0
- package/src/ibc/applications/fee/v1/query.ts +2134 -0
- package/src/ibc/applications/fee/v1/tx.registry.ts +83 -0
- package/src/ibc/applications/fee/v1/tx.rpc.func.ts +40 -0
- package/src/ibc/applications/fee/v1/tx.ts +889 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +105 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/query.rpc.func.ts +25 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/query.ts +379 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts +65 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/tx.rpc.func.ts +31 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/tx.ts +685 -0
- package/src/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +661 -0
- package/src/ibc/applications/interchain_accounts/host/v1/host.ts +253 -0
- package/src/ibc/applications/interchain_accounts/host/v1/query.rpc.func.ts +14 -0
- package/src/ibc/applications/interchain_accounts/host/v1/query.ts +177 -0
- package/src/ibc/applications/interchain_accounts/host/v1/tx.registry.ts +47 -0
- package/src/ibc/applications/interchain_accounts/host/v1/tx.rpc.func.ts +22 -0
- package/src/ibc/applications/interchain_accounts/host/v1/tx.ts +429 -0
- package/src/ibc/applications/interchain_accounts/v1/account.ts +112 -0
- package/src/ibc/applications/interchain_accounts/v1/metadata.ts +191 -0
- package/src/ibc/applications/interchain_accounts/v1/packet.ts +259 -0
- package/src/ibc/applications/transfer/v1/authz.ts +280 -0
- package/src/ibc/applications/transfer/v1/genesis.ts +153 -0
- package/src/ibc/applications/transfer/v1/query.rpc.func.ts +69 -0
- package/src/ibc/applications/transfer/v1/query.ts +1205 -0
- package/src/ibc/applications/transfer/v1/transfer.ts +261 -0
- package/src/ibc/applications/transfer/v1/tx.registry.ts +47 -0
- package/src/ibc/applications/transfer/v1/tx.rpc.func.ts +22 -0
- package/src/ibc/applications/transfer/v1/tx.ts +532 -0
- package/src/ibc/applications/transfer/v2/packet.ts +171 -0
- package/src/ibc/core/channel/v1/channel.ts +1510 -0
- package/src/ibc/core/channel/v1/genesis.ts +354 -0
- package/src/ibc/core/channel/v1/query.rpc.func.ts +190 -0
- package/src/ibc/core/channel/v1/query.ts +4354 -0
- package/src/ibc/core/channel/v1/tx.registry.ts +353 -0
- package/src/ibc/core/channel/v1/tx.rpc.func.ts +175 -0
- package/src/ibc/core/channel/v1/tx.ts +4866 -0
- package/src/ibc/core/channel/v1/upgrade.ts +388 -0
- package/src/ibc/core/client/v1/client.ts +927 -0
- package/src/ibc/core/client/v1/genesis.ts +426 -0
- package/src/ibc/core/client/v1/query.rpc.func.ts +113 -0
- package/src/ibc/core/client/v1/query.ts +2280 -0
- package/src/ibc/core/client/v1/tx.registry.ts +137 -0
- package/src/ibc/core/client/v1/tx.rpc.func.ts +67 -0
- package/src/ibc/core/client/v1/tx.ts +1543 -0
- package/src/ibc/core/commitment/v1/commitment.ts +418 -0
- package/src/ibc/core/connection/v1/connection.ts +1010 -0
- package/src/ibc/core/connection/v1/genesis.ts +146 -0
- package/src/ibc/core/connection/v1/query.rpc.func.ts +69 -0
- package/src/ibc/core/connection/v1/query.ts +1408 -0
- package/src/ibc/core/connection/v1/tx.registry.ts +101 -0
- package/src/ibc/core/connection/v1/tx.rpc.func.ts +49 -0
- package/src/ibc/core/connection/v1/tx.ts +1365 -0
- package/src/ibc/core/types/v1/genesis.ts +137 -0
- package/src/ibc/lightclients/localhost/v2/localhost.ts +100 -0
- package/src/ibc/lightclients/solomachine/v2/solomachine.ts +2103 -0
- package/src/ibc/lightclients/solomachine/v3/solomachine.ts +1070 -0
- package/src/ibc/lightclients/tendermint/v1/tendermint.ts +838 -0
- package/src/ibc/lightclients/wasm/v1/genesis.ts +197 -0
- package/src/ibc/lightclients/wasm/v1/query.rpc.func.ts +25 -0
- package/src/ibc/lightclients/wasm/v1/query.ts +404 -0
- package/src/ibc/lightclients/wasm/v1/tx.registry.ts +65 -0
- package/src/ibc/lightclients/wasm/v1/tx.rpc.func.ts +31 -0
- package/src/ibc/lightclients/wasm/v1/tx.ts +621 -0
- package/src/ibc/lightclients/wasm/v1/wasm.ts +438 -0
- package/src/react-query.ts +185 -0
- package/src/registry.ts +218 -0
- package/src/tendermint/abci/types.ts +6283 -0
- package/src/tendermint/crypto/keys.ts +103 -0
- package/src/tendermint/crypto/proof.ts +555 -0
- package/src/tendermint/p2p/types.ts +507 -0
- package/src/tendermint/types/block.ts +131 -0
- package/src/tendermint/types/evidence.ts +476 -0
- package/src/tendermint/types/params.ts +814 -0
- package/src/tendermint/types/types.ts +2157 -0
- package/src/tendermint/types/validator.ts +389 -0
- package/src/tendermint/version/types.ts +219 -0
- package/src/types.ts +155 -0
- package/src/utf8.ts +148 -0
- package/src/varint.ts +488 -0
- package/src/xpla/reward/v1beta1/genesis.ts +92 -0
- package/src/xpla/reward/v1beta1/query.rpc.func.ts +25 -0
- package/src/xpla/reward/v1beta1/query.ts +333 -0
- package/src/xpla/reward/v1beta1/reward.ts +153 -0
- package/src/xpla/reward/v1beta1/tx.registry.ts +47 -0
- package/src/xpla/reward/v1beta1/tx.rpc.func.ts +22 -0
- package/src/xpla/reward/v1beta1/tx.ts +391 -0
- package/src/xpla/volunteer/v1beta1/genesis.ts +92 -0
- package/src/xpla/volunteer/v1beta1/proposal.ts +649 -0
- package/src/xpla/volunteer/v1beta1/query.rpc.func.ts +14 -0
- package/src/xpla/volunteer/v1beta1/query.ts +160 -0
- package/src/xpla/volunteer/v1beta1/tx.registry.ts +47 -0
- package/src/xpla/volunteer/v1beta1/tx.rpc.func.ts +22 -0
- package/src/xpla/volunteer/v1beta1/tx.ts +448 -0
- package/src/xpla/volunteer/v1beta1/volunteervalidator.ts +107 -0
- package/tsconfig.esm.json +10 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
import { Coin, CoinAmino } from "../../base/v1beta1/coin";
|
|
2
|
+
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
3
|
+
import { Duration, DurationAmino } from "../../../google/protobuf/duration";
|
|
4
|
+
import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
|
|
5
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
6
|
+
import { toTimestamp, fromTimestamp, DeepPartial } from "../../../helpers";
|
|
7
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
8
|
+
/**
|
|
9
|
+
* BasicAllowance implements Allowance with a one-time grant of coins
|
|
10
|
+
* that optionally expires. The grantee can use up to SpendLimit to cover fees.
|
|
11
|
+
*/
|
|
12
|
+
export interface BasicAllowance {
|
|
13
|
+
/**
|
|
14
|
+
* spend_limit specifies the maximum amount of coins that can be spent
|
|
15
|
+
* by this allowance and will be updated as coins are spent. If it is
|
|
16
|
+
* empty, there is no spend limit and any amount of coins can be spent.
|
|
17
|
+
*/
|
|
18
|
+
spendLimit: Coin[];
|
|
19
|
+
/** expiration specifies an optional time when this allowance expires */
|
|
20
|
+
expiration?: Date;
|
|
21
|
+
}
|
|
22
|
+
export interface BasicAllowanceProtoMsg {
|
|
23
|
+
typeUrl: "/cosmos.feegrant.v1beta1.BasicAllowance";
|
|
24
|
+
value: Uint8Array;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* BasicAllowance implements Allowance with a one-time grant of coins
|
|
28
|
+
* that optionally expires. The grantee can use up to SpendLimit to cover fees.
|
|
29
|
+
*/
|
|
30
|
+
export interface BasicAllowanceAmino {
|
|
31
|
+
/**
|
|
32
|
+
* spend_limit specifies the maximum amount of coins that can be spent
|
|
33
|
+
* by this allowance and will be updated as coins are spent. If it is
|
|
34
|
+
* empty, there is no spend limit and any amount of coins can be spent.
|
|
35
|
+
*/
|
|
36
|
+
spend_limit: CoinAmino[];
|
|
37
|
+
/** expiration specifies an optional time when this allowance expires */
|
|
38
|
+
expiration?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface BasicAllowanceAminoMsg {
|
|
41
|
+
type: "cosmos-sdk/BasicAllowance";
|
|
42
|
+
value: BasicAllowanceAmino;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* PeriodicAllowance extends Allowance to allow for both a maximum cap,
|
|
46
|
+
* as well as a limit per time period.
|
|
47
|
+
*/
|
|
48
|
+
export interface PeriodicAllowance {
|
|
49
|
+
/** basic specifies a struct of `BasicAllowance` */
|
|
50
|
+
basic: BasicAllowance;
|
|
51
|
+
/**
|
|
52
|
+
* period specifies the time duration in which period_spend_limit coins can
|
|
53
|
+
* be spent before that allowance is reset
|
|
54
|
+
*/
|
|
55
|
+
period: Duration;
|
|
56
|
+
/**
|
|
57
|
+
* period_spend_limit specifies the maximum number of coins that can be spent
|
|
58
|
+
* in the period
|
|
59
|
+
*/
|
|
60
|
+
periodSpendLimit: Coin[];
|
|
61
|
+
/** period_can_spend is the number of coins left to be spent before the period_reset time */
|
|
62
|
+
periodCanSpend: Coin[];
|
|
63
|
+
/**
|
|
64
|
+
* period_reset is the time at which this period resets and a new one begins,
|
|
65
|
+
* it is calculated from the start time of the first transaction after the
|
|
66
|
+
* last period ended
|
|
67
|
+
*/
|
|
68
|
+
periodReset: Date;
|
|
69
|
+
}
|
|
70
|
+
export interface PeriodicAllowanceProtoMsg {
|
|
71
|
+
typeUrl: "/cosmos.feegrant.v1beta1.PeriodicAllowance";
|
|
72
|
+
value: Uint8Array;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* PeriodicAllowance extends Allowance to allow for both a maximum cap,
|
|
76
|
+
* as well as a limit per time period.
|
|
77
|
+
*/
|
|
78
|
+
export interface PeriodicAllowanceAmino {
|
|
79
|
+
/** basic specifies a struct of `BasicAllowance` */
|
|
80
|
+
basic: BasicAllowanceAmino;
|
|
81
|
+
/**
|
|
82
|
+
* period specifies the time duration in which period_spend_limit coins can
|
|
83
|
+
* be spent before that allowance is reset
|
|
84
|
+
*/
|
|
85
|
+
period: DurationAmino;
|
|
86
|
+
/**
|
|
87
|
+
* period_spend_limit specifies the maximum number of coins that can be spent
|
|
88
|
+
* in the period
|
|
89
|
+
*/
|
|
90
|
+
period_spend_limit: CoinAmino[];
|
|
91
|
+
/** period_can_spend is the number of coins left to be spent before the period_reset time */
|
|
92
|
+
period_can_spend: CoinAmino[];
|
|
93
|
+
/**
|
|
94
|
+
* period_reset is the time at which this period resets and a new one begins,
|
|
95
|
+
* it is calculated from the start time of the first transaction after the
|
|
96
|
+
* last period ended
|
|
97
|
+
*/
|
|
98
|
+
period_reset: string;
|
|
99
|
+
}
|
|
100
|
+
export interface PeriodicAllowanceAminoMsg {
|
|
101
|
+
type: "cosmos-sdk/PeriodicAllowance";
|
|
102
|
+
value: PeriodicAllowanceAmino;
|
|
103
|
+
}
|
|
104
|
+
/** AllowedMsgAllowance creates allowance only for specified message types. */
|
|
105
|
+
export interface AllowedMsgAllowance {
|
|
106
|
+
/** allowance can be any of basic and periodic fee allowance. */
|
|
107
|
+
allowance?: BasicAllowance | PeriodicAllowance | AllowedMsgAllowance | Any | undefined;
|
|
108
|
+
/** allowed_messages are the messages for which the grantee has the access. */
|
|
109
|
+
allowedMessages: string[];
|
|
110
|
+
}
|
|
111
|
+
export interface AllowedMsgAllowanceProtoMsg {
|
|
112
|
+
typeUrl: "/cosmos.feegrant.v1beta1.AllowedMsgAllowance";
|
|
113
|
+
value: Uint8Array;
|
|
114
|
+
}
|
|
115
|
+
export type AllowedMsgAllowanceEncoded = Omit<AllowedMsgAllowance, "allowance"> & {
|
|
116
|
+
/** allowance can be any of basic and periodic fee allowance. */allowance?: BasicAllowanceProtoMsg | PeriodicAllowanceProtoMsg | AllowedMsgAllowanceProtoMsg | AnyProtoMsg | undefined;
|
|
117
|
+
};
|
|
118
|
+
/** AllowedMsgAllowance creates allowance only for specified message types. */
|
|
119
|
+
export interface AllowedMsgAllowanceAmino {
|
|
120
|
+
/** allowance can be any of basic and periodic fee allowance. */
|
|
121
|
+
allowance?: AnyAmino;
|
|
122
|
+
/** allowed_messages are the messages for which the grantee has the access. */
|
|
123
|
+
allowed_messages: string[];
|
|
124
|
+
}
|
|
125
|
+
export interface AllowedMsgAllowanceAminoMsg {
|
|
126
|
+
type: "cosmos-sdk/AllowedMsgAllowance";
|
|
127
|
+
value: AllowedMsgAllowanceAmino;
|
|
128
|
+
}
|
|
129
|
+
/** Grant is stored in the KVStore to record a grant with full context */
|
|
130
|
+
export interface Grant {
|
|
131
|
+
/** granter is the address of the user granting an allowance of their funds. */
|
|
132
|
+
granter: string;
|
|
133
|
+
/** grantee is the address of the user being granted an allowance of another user's funds. */
|
|
134
|
+
grantee: string;
|
|
135
|
+
/** allowance can be any of basic, periodic, allowed fee allowance. */
|
|
136
|
+
allowance?: BasicAllowance | PeriodicAllowance | AllowedMsgAllowance | Any | undefined;
|
|
137
|
+
}
|
|
138
|
+
export interface GrantProtoMsg {
|
|
139
|
+
typeUrl: "/cosmos.feegrant.v1beta1.Grant";
|
|
140
|
+
value: Uint8Array;
|
|
141
|
+
}
|
|
142
|
+
export type GrantEncoded = Omit<Grant, "allowance"> & {
|
|
143
|
+
/** allowance can be any of basic, periodic, allowed fee allowance. */allowance?: BasicAllowanceProtoMsg | PeriodicAllowanceProtoMsg | AllowedMsgAllowanceProtoMsg | AnyProtoMsg | undefined;
|
|
144
|
+
};
|
|
145
|
+
/** Grant is stored in the KVStore to record a grant with full context */
|
|
146
|
+
export interface GrantAmino {
|
|
147
|
+
/** granter is the address of the user granting an allowance of their funds. */
|
|
148
|
+
granter: string;
|
|
149
|
+
/** grantee is the address of the user being granted an allowance of another user's funds. */
|
|
150
|
+
grantee: string;
|
|
151
|
+
/** allowance can be any of basic, periodic, allowed fee allowance. */
|
|
152
|
+
allowance?: AnyAmino;
|
|
153
|
+
}
|
|
154
|
+
export interface GrantAminoMsg {
|
|
155
|
+
type: "cosmos-sdk/Grant";
|
|
156
|
+
value: GrantAmino;
|
|
157
|
+
}
|
|
158
|
+
function createBaseBasicAllowance(): BasicAllowance {
|
|
159
|
+
return {
|
|
160
|
+
spendLimit: [],
|
|
161
|
+
expiration: undefined
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
export const BasicAllowance = {
|
|
165
|
+
typeUrl: "/cosmos.feegrant.v1beta1.BasicAllowance",
|
|
166
|
+
aminoType: "cosmos-sdk/BasicAllowance",
|
|
167
|
+
is(o: any): o is BasicAllowance {
|
|
168
|
+
return o && (o.$typeUrl === BasicAllowance.typeUrl || Array.isArray(o.spendLimit) && (!o.spendLimit.length || Coin.is(o.spendLimit[0])));
|
|
169
|
+
},
|
|
170
|
+
isAmino(o: any): o is BasicAllowanceAmino {
|
|
171
|
+
return o && (o.$typeUrl === BasicAllowance.typeUrl || Array.isArray(o.spend_limit) && (!o.spend_limit.length || Coin.isAmino(o.spend_limit[0])));
|
|
172
|
+
},
|
|
173
|
+
encode(message: BasicAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
174
|
+
for (const v of message.spendLimit) {
|
|
175
|
+
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
176
|
+
}
|
|
177
|
+
if (message.expiration !== undefined) {
|
|
178
|
+
Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim();
|
|
179
|
+
}
|
|
180
|
+
return writer;
|
|
181
|
+
},
|
|
182
|
+
decode(input: BinaryReader | Uint8Array, length?: number): BasicAllowance {
|
|
183
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
184
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
185
|
+
const message = createBaseBasicAllowance();
|
|
186
|
+
while (reader.pos < end) {
|
|
187
|
+
const tag = reader.uint32();
|
|
188
|
+
switch (tag >>> 3) {
|
|
189
|
+
case 1:
|
|
190
|
+
message.spendLimit.push(Coin.decode(reader, reader.uint32()));
|
|
191
|
+
break;
|
|
192
|
+
case 2:
|
|
193
|
+
message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
194
|
+
break;
|
|
195
|
+
default:
|
|
196
|
+
reader.skipType(tag & 7);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return message;
|
|
201
|
+
},
|
|
202
|
+
fromPartial(object: DeepPartial<BasicAllowance>): BasicAllowance {
|
|
203
|
+
const message = createBaseBasicAllowance();
|
|
204
|
+
message.spendLimit = object.spendLimit?.map(e => Coin.fromPartial(e)) || [];
|
|
205
|
+
message.expiration = object.expiration ?? undefined;
|
|
206
|
+
return message;
|
|
207
|
+
},
|
|
208
|
+
fromAmino(object: BasicAllowanceAmino): BasicAllowance {
|
|
209
|
+
const message = createBaseBasicAllowance();
|
|
210
|
+
message.spendLimit = object.spend_limit?.map(e => Coin.fromAmino(e)) || [];
|
|
211
|
+
if (object.expiration !== undefined && object.expiration !== null) {
|
|
212
|
+
message.expiration = fromTimestamp(Timestamp.fromAmino(object.expiration));
|
|
213
|
+
}
|
|
214
|
+
return message;
|
|
215
|
+
},
|
|
216
|
+
toAmino(message: BasicAllowance): BasicAllowanceAmino {
|
|
217
|
+
const obj: any = {};
|
|
218
|
+
if (message.spendLimit) {
|
|
219
|
+
obj.spend_limit = message.spendLimit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
220
|
+
} else {
|
|
221
|
+
obj.spend_limit = message.spendLimit;
|
|
222
|
+
}
|
|
223
|
+
obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined;
|
|
224
|
+
return obj;
|
|
225
|
+
},
|
|
226
|
+
fromAminoMsg(object: BasicAllowanceAminoMsg): BasicAllowance {
|
|
227
|
+
return BasicAllowance.fromAmino(object.value);
|
|
228
|
+
},
|
|
229
|
+
toAminoMsg(message: BasicAllowance): BasicAllowanceAminoMsg {
|
|
230
|
+
return {
|
|
231
|
+
type: "cosmos-sdk/BasicAllowance",
|
|
232
|
+
value: BasicAllowance.toAmino(message)
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
fromProtoMsg(message: BasicAllowanceProtoMsg): BasicAllowance {
|
|
236
|
+
return BasicAllowance.decode(message.value);
|
|
237
|
+
},
|
|
238
|
+
toProto(message: BasicAllowance): Uint8Array {
|
|
239
|
+
return BasicAllowance.encode(message).finish();
|
|
240
|
+
},
|
|
241
|
+
toProtoMsg(message: BasicAllowance): BasicAllowanceProtoMsg {
|
|
242
|
+
return {
|
|
243
|
+
typeUrl: "/cosmos.feegrant.v1beta1.BasicAllowance",
|
|
244
|
+
value: BasicAllowance.encode(message).finish()
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
GlobalDecoderRegistry.register(BasicAllowance.typeUrl, BasicAllowance);
|
|
249
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(BasicAllowance.aminoType, BasicAllowance.typeUrl);
|
|
250
|
+
function createBasePeriodicAllowance(): PeriodicAllowance {
|
|
251
|
+
return {
|
|
252
|
+
basic: BasicAllowance.fromPartial({}),
|
|
253
|
+
period: Duration.fromPartial({}),
|
|
254
|
+
periodSpendLimit: [],
|
|
255
|
+
periodCanSpend: [],
|
|
256
|
+
periodReset: new Date()
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
export const PeriodicAllowance = {
|
|
260
|
+
typeUrl: "/cosmos.feegrant.v1beta1.PeriodicAllowance",
|
|
261
|
+
aminoType: "cosmos-sdk/PeriodicAllowance",
|
|
262
|
+
is(o: any): o is PeriodicAllowance {
|
|
263
|
+
return o && (o.$typeUrl === PeriodicAllowance.typeUrl || BasicAllowance.is(o.basic) && Duration.is(o.period) && Array.isArray(o.periodSpendLimit) && (!o.periodSpendLimit.length || Coin.is(o.periodSpendLimit[0])) && Array.isArray(o.periodCanSpend) && (!o.periodCanSpend.length || Coin.is(o.periodCanSpend[0])) && Timestamp.is(o.periodReset));
|
|
264
|
+
},
|
|
265
|
+
isAmino(o: any): o is PeriodicAllowanceAmino {
|
|
266
|
+
return o && (o.$typeUrl === PeriodicAllowance.typeUrl || BasicAllowance.isAmino(o.basic) && Duration.isAmino(o.period) && Array.isArray(o.period_spend_limit) && (!o.period_spend_limit.length || Coin.isAmino(o.period_spend_limit[0])) && Array.isArray(o.period_can_spend) && (!o.period_can_spend.length || Coin.isAmino(o.period_can_spend[0])) && Timestamp.isAmino(o.period_reset));
|
|
267
|
+
},
|
|
268
|
+
encode(message: PeriodicAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
269
|
+
if (message.basic !== undefined) {
|
|
270
|
+
BasicAllowance.encode(message.basic, writer.uint32(10).fork()).ldelim();
|
|
271
|
+
}
|
|
272
|
+
if (message.period !== undefined) {
|
|
273
|
+
Duration.encode(message.period, writer.uint32(18).fork()).ldelim();
|
|
274
|
+
}
|
|
275
|
+
for (const v of message.periodSpendLimit) {
|
|
276
|
+
Coin.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
277
|
+
}
|
|
278
|
+
for (const v of message.periodCanSpend) {
|
|
279
|
+
Coin.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
280
|
+
}
|
|
281
|
+
if (message.periodReset !== undefined) {
|
|
282
|
+
Timestamp.encode(toTimestamp(message.periodReset), writer.uint32(42).fork()).ldelim();
|
|
283
|
+
}
|
|
284
|
+
return writer;
|
|
285
|
+
},
|
|
286
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PeriodicAllowance {
|
|
287
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
288
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
289
|
+
const message = createBasePeriodicAllowance();
|
|
290
|
+
while (reader.pos < end) {
|
|
291
|
+
const tag = reader.uint32();
|
|
292
|
+
switch (tag >>> 3) {
|
|
293
|
+
case 1:
|
|
294
|
+
message.basic = BasicAllowance.decode(reader, reader.uint32());
|
|
295
|
+
break;
|
|
296
|
+
case 2:
|
|
297
|
+
message.period = Duration.decode(reader, reader.uint32());
|
|
298
|
+
break;
|
|
299
|
+
case 3:
|
|
300
|
+
message.periodSpendLimit.push(Coin.decode(reader, reader.uint32()));
|
|
301
|
+
break;
|
|
302
|
+
case 4:
|
|
303
|
+
message.periodCanSpend.push(Coin.decode(reader, reader.uint32()));
|
|
304
|
+
break;
|
|
305
|
+
case 5:
|
|
306
|
+
message.periodReset = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
307
|
+
break;
|
|
308
|
+
default:
|
|
309
|
+
reader.skipType(tag & 7);
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return message;
|
|
314
|
+
},
|
|
315
|
+
fromPartial(object: DeepPartial<PeriodicAllowance>): PeriodicAllowance {
|
|
316
|
+
const message = createBasePeriodicAllowance();
|
|
317
|
+
message.basic = object.basic !== undefined && object.basic !== null ? BasicAllowance.fromPartial(object.basic) : undefined;
|
|
318
|
+
message.period = object.period !== undefined && object.period !== null ? Duration.fromPartial(object.period) : undefined;
|
|
319
|
+
message.periodSpendLimit = object.periodSpendLimit?.map(e => Coin.fromPartial(e)) || [];
|
|
320
|
+
message.periodCanSpend = object.periodCanSpend?.map(e => Coin.fromPartial(e)) || [];
|
|
321
|
+
message.periodReset = object.periodReset ?? undefined;
|
|
322
|
+
return message;
|
|
323
|
+
},
|
|
324
|
+
fromAmino(object: PeriodicAllowanceAmino): PeriodicAllowance {
|
|
325
|
+
const message = createBasePeriodicAllowance();
|
|
326
|
+
if (object.basic !== undefined && object.basic !== null) {
|
|
327
|
+
message.basic = BasicAllowance.fromAmino(object.basic);
|
|
328
|
+
}
|
|
329
|
+
if (object.period !== undefined && object.period !== null) {
|
|
330
|
+
message.period = Duration.fromAmino(object.period);
|
|
331
|
+
}
|
|
332
|
+
message.periodSpendLimit = object.period_spend_limit?.map(e => Coin.fromAmino(e)) || [];
|
|
333
|
+
message.periodCanSpend = object.period_can_spend?.map(e => Coin.fromAmino(e)) || [];
|
|
334
|
+
if (object.period_reset !== undefined && object.period_reset !== null) {
|
|
335
|
+
message.periodReset = fromTimestamp(Timestamp.fromAmino(object.period_reset));
|
|
336
|
+
}
|
|
337
|
+
return message;
|
|
338
|
+
},
|
|
339
|
+
toAmino(message: PeriodicAllowance): PeriodicAllowanceAmino {
|
|
340
|
+
const obj: any = {};
|
|
341
|
+
obj.basic = message.basic ? BasicAllowance.toAmino(message.basic) : BasicAllowance.toAmino(BasicAllowance.fromPartial({}));
|
|
342
|
+
obj.period = message.period ? Duration.toAmino(message.period) : Duration.toAmino(Duration.fromPartial({}));
|
|
343
|
+
if (message.periodSpendLimit) {
|
|
344
|
+
obj.period_spend_limit = message.periodSpendLimit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
345
|
+
} else {
|
|
346
|
+
obj.period_spend_limit = message.periodSpendLimit;
|
|
347
|
+
}
|
|
348
|
+
if (message.periodCanSpend) {
|
|
349
|
+
obj.period_can_spend = message.periodCanSpend.map(e => e ? Coin.toAmino(e) : undefined);
|
|
350
|
+
} else {
|
|
351
|
+
obj.period_can_spend = message.periodCanSpend;
|
|
352
|
+
}
|
|
353
|
+
obj.period_reset = message.periodReset ? Timestamp.toAmino(toTimestamp(message.periodReset)) : new Date();
|
|
354
|
+
return obj;
|
|
355
|
+
},
|
|
356
|
+
fromAminoMsg(object: PeriodicAllowanceAminoMsg): PeriodicAllowance {
|
|
357
|
+
return PeriodicAllowance.fromAmino(object.value);
|
|
358
|
+
},
|
|
359
|
+
toAminoMsg(message: PeriodicAllowance): PeriodicAllowanceAminoMsg {
|
|
360
|
+
return {
|
|
361
|
+
type: "cosmos-sdk/PeriodicAllowance",
|
|
362
|
+
value: PeriodicAllowance.toAmino(message)
|
|
363
|
+
};
|
|
364
|
+
},
|
|
365
|
+
fromProtoMsg(message: PeriodicAllowanceProtoMsg): PeriodicAllowance {
|
|
366
|
+
return PeriodicAllowance.decode(message.value);
|
|
367
|
+
},
|
|
368
|
+
toProto(message: PeriodicAllowance): Uint8Array {
|
|
369
|
+
return PeriodicAllowance.encode(message).finish();
|
|
370
|
+
},
|
|
371
|
+
toProtoMsg(message: PeriodicAllowance): PeriodicAllowanceProtoMsg {
|
|
372
|
+
return {
|
|
373
|
+
typeUrl: "/cosmos.feegrant.v1beta1.PeriodicAllowance",
|
|
374
|
+
value: PeriodicAllowance.encode(message).finish()
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
GlobalDecoderRegistry.register(PeriodicAllowance.typeUrl, PeriodicAllowance);
|
|
379
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(PeriodicAllowance.aminoType, PeriodicAllowance.typeUrl);
|
|
380
|
+
function createBaseAllowedMsgAllowance(): AllowedMsgAllowance {
|
|
381
|
+
return {
|
|
382
|
+
allowance: undefined,
|
|
383
|
+
allowedMessages: []
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
export const AllowedMsgAllowance = {
|
|
387
|
+
typeUrl: "/cosmos.feegrant.v1beta1.AllowedMsgAllowance",
|
|
388
|
+
aminoType: "cosmos-sdk/AllowedMsgAllowance",
|
|
389
|
+
is(o: any): o is AllowedMsgAllowance {
|
|
390
|
+
return o && (o.$typeUrl === AllowedMsgAllowance.typeUrl || Array.isArray(o.allowedMessages) && (!o.allowedMessages.length || typeof o.allowedMessages[0] === "string"));
|
|
391
|
+
},
|
|
392
|
+
isAmino(o: any): o is AllowedMsgAllowanceAmino {
|
|
393
|
+
return o && (o.$typeUrl === AllowedMsgAllowance.typeUrl || Array.isArray(o.allowed_messages) && (!o.allowed_messages.length || typeof o.allowed_messages[0] === "string"));
|
|
394
|
+
},
|
|
395
|
+
encode(message: AllowedMsgAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
396
|
+
if (message.allowance !== undefined) {
|
|
397
|
+
Any.encode(GlobalDecoderRegistry.wrapAny(message.allowance), writer.uint32(10).fork()).ldelim();
|
|
398
|
+
}
|
|
399
|
+
for (const v of message.allowedMessages) {
|
|
400
|
+
writer.uint32(18).string(v!);
|
|
401
|
+
}
|
|
402
|
+
return writer;
|
|
403
|
+
},
|
|
404
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AllowedMsgAllowance {
|
|
405
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
406
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
407
|
+
const message = createBaseAllowedMsgAllowance();
|
|
408
|
+
while (reader.pos < end) {
|
|
409
|
+
const tag = reader.uint32();
|
|
410
|
+
switch (tag >>> 3) {
|
|
411
|
+
case 1:
|
|
412
|
+
message.allowance = GlobalDecoderRegistry.unwrapAny(reader);
|
|
413
|
+
break;
|
|
414
|
+
case 2:
|
|
415
|
+
message.allowedMessages.push(reader.string());
|
|
416
|
+
break;
|
|
417
|
+
default:
|
|
418
|
+
reader.skipType(tag & 7);
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return message;
|
|
423
|
+
},
|
|
424
|
+
fromPartial(object: DeepPartial<AllowedMsgAllowance>): AllowedMsgAllowance {
|
|
425
|
+
const message = createBaseAllowedMsgAllowance();
|
|
426
|
+
message.allowance = object.allowance !== undefined && object.allowance !== null ? GlobalDecoderRegistry.fromPartial(object.allowance) : undefined;
|
|
427
|
+
message.allowedMessages = object.allowedMessages?.map(e => e) || [];
|
|
428
|
+
return message;
|
|
429
|
+
},
|
|
430
|
+
fromAmino(object: AllowedMsgAllowanceAmino): AllowedMsgAllowance {
|
|
431
|
+
const message = createBaseAllowedMsgAllowance();
|
|
432
|
+
if (object.allowance !== undefined && object.allowance !== null) {
|
|
433
|
+
message.allowance = GlobalDecoderRegistry.fromAminoMsg(object.allowance);
|
|
434
|
+
}
|
|
435
|
+
message.allowedMessages = object.allowed_messages?.map(e => e) || [];
|
|
436
|
+
return message;
|
|
437
|
+
},
|
|
438
|
+
toAmino(message: AllowedMsgAllowance): AllowedMsgAllowanceAmino {
|
|
439
|
+
const obj: any = {};
|
|
440
|
+
obj.allowance = message.allowance ? GlobalDecoderRegistry.toAminoMsg(message.allowance) : undefined;
|
|
441
|
+
if (message.allowedMessages) {
|
|
442
|
+
obj.allowed_messages = message.allowedMessages.map(e => e);
|
|
443
|
+
} else {
|
|
444
|
+
obj.allowed_messages = message.allowedMessages;
|
|
445
|
+
}
|
|
446
|
+
return obj;
|
|
447
|
+
},
|
|
448
|
+
fromAminoMsg(object: AllowedMsgAllowanceAminoMsg): AllowedMsgAllowance {
|
|
449
|
+
return AllowedMsgAllowance.fromAmino(object.value);
|
|
450
|
+
},
|
|
451
|
+
toAminoMsg(message: AllowedMsgAllowance): AllowedMsgAllowanceAminoMsg {
|
|
452
|
+
return {
|
|
453
|
+
type: "cosmos-sdk/AllowedMsgAllowance",
|
|
454
|
+
value: AllowedMsgAllowance.toAmino(message)
|
|
455
|
+
};
|
|
456
|
+
},
|
|
457
|
+
fromProtoMsg(message: AllowedMsgAllowanceProtoMsg): AllowedMsgAllowance {
|
|
458
|
+
return AllowedMsgAllowance.decode(message.value);
|
|
459
|
+
},
|
|
460
|
+
toProto(message: AllowedMsgAllowance): Uint8Array {
|
|
461
|
+
return AllowedMsgAllowance.encode(message).finish();
|
|
462
|
+
},
|
|
463
|
+
toProtoMsg(message: AllowedMsgAllowance): AllowedMsgAllowanceProtoMsg {
|
|
464
|
+
return {
|
|
465
|
+
typeUrl: "/cosmos.feegrant.v1beta1.AllowedMsgAllowance",
|
|
466
|
+
value: AllowedMsgAllowance.encode(message).finish()
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
GlobalDecoderRegistry.register(AllowedMsgAllowance.typeUrl, AllowedMsgAllowance);
|
|
471
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(AllowedMsgAllowance.aminoType, AllowedMsgAllowance.typeUrl);
|
|
472
|
+
function createBaseGrant(): Grant {
|
|
473
|
+
return {
|
|
474
|
+
granter: "",
|
|
475
|
+
grantee: "",
|
|
476
|
+
allowance: undefined
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
export const Grant = {
|
|
480
|
+
typeUrl: "/cosmos.feegrant.v1beta1.Grant",
|
|
481
|
+
aminoType: "cosmos-sdk/Grant",
|
|
482
|
+
is(o: any): o is Grant {
|
|
483
|
+
return o && (o.$typeUrl === Grant.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string");
|
|
484
|
+
},
|
|
485
|
+
isAmino(o: any): o is GrantAmino {
|
|
486
|
+
return o && (o.$typeUrl === Grant.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string");
|
|
487
|
+
},
|
|
488
|
+
encode(message: Grant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
489
|
+
if (message.granter !== "") {
|
|
490
|
+
writer.uint32(10).string(message.granter);
|
|
491
|
+
}
|
|
492
|
+
if (message.grantee !== "") {
|
|
493
|
+
writer.uint32(18).string(message.grantee);
|
|
494
|
+
}
|
|
495
|
+
if (message.allowance !== undefined) {
|
|
496
|
+
Any.encode(GlobalDecoderRegistry.wrapAny(message.allowance), writer.uint32(26).fork()).ldelim();
|
|
497
|
+
}
|
|
498
|
+
return writer;
|
|
499
|
+
},
|
|
500
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Grant {
|
|
501
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
502
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
503
|
+
const message = createBaseGrant();
|
|
504
|
+
while (reader.pos < end) {
|
|
505
|
+
const tag = reader.uint32();
|
|
506
|
+
switch (tag >>> 3) {
|
|
507
|
+
case 1:
|
|
508
|
+
message.granter = reader.string();
|
|
509
|
+
break;
|
|
510
|
+
case 2:
|
|
511
|
+
message.grantee = reader.string();
|
|
512
|
+
break;
|
|
513
|
+
case 3:
|
|
514
|
+
message.allowance = GlobalDecoderRegistry.unwrapAny(reader);
|
|
515
|
+
break;
|
|
516
|
+
default:
|
|
517
|
+
reader.skipType(tag & 7);
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
return message;
|
|
522
|
+
},
|
|
523
|
+
fromPartial(object: DeepPartial<Grant>): Grant {
|
|
524
|
+
const message = createBaseGrant();
|
|
525
|
+
message.granter = object.granter ?? "";
|
|
526
|
+
message.grantee = object.grantee ?? "";
|
|
527
|
+
message.allowance = object.allowance !== undefined && object.allowance !== null ? GlobalDecoderRegistry.fromPartial(object.allowance) : undefined;
|
|
528
|
+
return message;
|
|
529
|
+
},
|
|
530
|
+
fromAmino(object: GrantAmino): Grant {
|
|
531
|
+
const message = createBaseGrant();
|
|
532
|
+
if (object.granter !== undefined && object.granter !== null) {
|
|
533
|
+
message.granter = object.granter;
|
|
534
|
+
}
|
|
535
|
+
if (object.grantee !== undefined && object.grantee !== null) {
|
|
536
|
+
message.grantee = object.grantee;
|
|
537
|
+
}
|
|
538
|
+
if (object.allowance !== undefined && object.allowance !== null) {
|
|
539
|
+
message.allowance = GlobalDecoderRegistry.fromAminoMsg(object.allowance);
|
|
540
|
+
}
|
|
541
|
+
return message;
|
|
542
|
+
},
|
|
543
|
+
toAmino(message: Grant): GrantAmino {
|
|
544
|
+
const obj: any = {};
|
|
545
|
+
obj.granter = message.granter === "" ? undefined : message.granter;
|
|
546
|
+
obj.grantee = message.grantee === "" ? undefined : message.grantee;
|
|
547
|
+
obj.allowance = message.allowance ? GlobalDecoderRegistry.toAminoMsg(message.allowance) : undefined;
|
|
548
|
+
return obj;
|
|
549
|
+
},
|
|
550
|
+
fromAminoMsg(object: GrantAminoMsg): Grant {
|
|
551
|
+
return Grant.fromAmino(object.value);
|
|
552
|
+
},
|
|
553
|
+
toAminoMsg(message: Grant): GrantAminoMsg {
|
|
554
|
+
return {
|
|
555
|
+
type: "cosmos-sdk/Grant",
|
|
556
|
+
value: Grant.toAmino(message)
|
|
557
|
+
};
|
|
558
|
+
},
|
|
559
|
+
fromProtoMsg(message: GrantProtoMsg): Grant {
|
|
560
|
+
return Grant.decode(message.value);
|
|
561
|
+
},
|
|
562
|
+
toProto(message: Grant): Uint8Array {
|
|
563
|
+
return Grant.encode(message).finish();
|
|
564
|
+
},
|
|
565
|
+
toProtoMsg(message: Grant): GrantProtoMsg {
|
|
566
|
+
return {
|
|
567
|
+
typeUrl: "/cosmos.feegrant.v1beta1.Grant",
|
|
568
|
+
value: Grant.encode(message).finish()
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
GlobalDecoderRegistry.register(Grant.typeUrl, Grant);
|
|
573
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Grant.aminoType, Grant.typeUrl);
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Grant, GrantAmino } from "./feegrant";
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
3
|
+
import { DeepPartial } from "../../../helpers";
|
|
4
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
5
|
+
/** GenesisState contains a set of fee allowances, persisted from the store */
|
|
6
|
+
export interface GenesisState {
|
|
7
|
+
allowances: Grant[];
|
|
8
|
+
}
|
|
9
|
+
export interface GenesisStateProtoMsg {
|
|
10
|
+
typeUrl: "/cosmos.feegrant.v1beta1.GenesisState";
|
|
11
|
+
value: Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
/** GenesisState contains a set of fee allowances, persisted from the store */
|
|
14
|
+
export interface GenesisStateAmino {
|
|
15
|
+
allowances: GrantAmino[];
|
|
16
|
+
}
|
|
17
|
+
export interface GenesisStateAminoMsg {
|
|
18
|
+
type: "cosmos-sdk/GenesisState";
|
|
19
|
+
value: GenesisStateAmino;
|
|
20
|
+
}
|
|
21
|
+
function createBaseGenesisState(): GenesisState {
|
|
22
|
+
return {
|
|
23
|
+
allowances: []
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export const GenesisState = {
|
|
27
|
+
typeUrl: "/cosmos.feegrant.v1beta1.GenesisState",
|
|
28
|
+
aminoType: "cosmos-sdk/GenesisState",
|
|
29
|
+
is(o: any): o is GenesisState {
|
|
30
|
+
return o && (o.$typeUrl === GenesisState.typeUrl || Array.isArray(o.allowances) && (!o.allowances.length || Grant.is(o.allowances[0])));
|
|
31
|
+
},
|
|
32
|
+
isAmino(o: any): o is GenesisStateAmino {
|
|
33
|
+
return o && (o.$typeUrl === GenesisState.typeUrl || Array.isArray(o.allowances) && (!o.allowances.length || Grant.isAmino(o.allowances[0])));
|
|
34
|
+
},
|
|
35
|
+
encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
36
|
+
for (const v of message.allowances) {
|
|
37
|
+
Grant.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
38
|
+
}
|
|
39
|
+
return writer;
|
|
40
|
+
},
|
|
41
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GenesisState {
|
|
42
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
43
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
44
|
+
const message = createBaseGenesisState();
|
|
45
|
+
while (reader.pos < end) {
|
|
46
|
+
const tag = reader.uint32();
|
|
47
|
+
switch (tag >>> 3) {
|
|
48
|
+
case 1:
|
|
49
|
+
message.allowances.push(Grant.decode(reader, reader.uint32()));
|
|
50
|
+
break;
|
|
51
|
+
default:
|
|
52
|
+
reader.skipType(tag & 7);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return message;
|
|
57
|
+
},
|
|
58
|
+
fromPartial(object: DeepPartial<GenesisState>): GenesisState {
|
|
59
|
+
const message = createBaseGenesisState();
|
|
60
|
+
message.allowances = object.allowances?.map(e => Grant.fromPartial(e)) || [];
|
|
61
|
+
return message;
|
|
62
|
+
},
|
|
63
|
+
fromAmino(object: GenesisStateAmino): GenesisState {
|
|
64
|
+
const message = createBaseGenesisState();
|
|
65
|
+
message.allowances = object.allowances?.map(e => Grant.fromAmino(e)) || [];
|
|
66
|
+
return message;
|
|
67
|
+
},
|
|
68
|
+
toAmino(message: GenesisState): GenesisStateAmino {
|
|
69
|
+
const obj: any = {};
|
|
70
|
+
if (message.allowances) {
|
|
71
|
+
obj.allowances = message.allowances.map(e => e ? Grant.toAmino(e) : undefined);
|
|
72
|
+
} else {
|
|
73
|
+
obj.allowances = message.allowances;
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
},
|
|
77
|
+
fromAminoMsg(object: GenesisStateAminoMsg): GenesisState {
|
|
78
|
+
return GenesisState.fromAmino(object.value);
|
|
79
|
+
},
|
|
80
|
+
toAminoMsg(message: GenesisState): GenesisStateAminoMsg {
|
|
81
|
+
return {
|
|
82
|
+
type: "cosmos-sdk/GenesisState",
|
|
83
|
+
value: GenesisState.toAmino(message)
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
fromProtoMsg(message: GenesisStateProtoMsg): GenesisState {
|
|
87
|
+
return GenesisState.decode(message.value);
|
|
88
|
+
},
|
|
89
|
+
toProto(message: GenesisState): Uint8Array {
|
|
90
|
+
return GenesisState.encode(message).finish();
|
|
91
|
+
},
|
|
92
|
+
toProtoMsg(message: GenesisState): GenesisStateProtoMsg {
|
|
93
|
+
return {
|
|
94
|
+
typeUrl: "/cosmos.feegrant.v1beta1.GenesisState",
|
|
95
|
+
value: GenesisState.encode(message).finish()
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState);
|
|
100
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(GenesisState.aminoType, GenesisState.typeUrl);
|