@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,80 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../../binary";
|
|
2
|
+
import { DeepPartial } from "../../../../helpers";
|
|
3
|
+
import { GlobalDecoderRegistry } from "../../../../registry";
|
|
4
|
+
/** Module is the config object for the genutil module. */
|
|
5
|
+
export interface Module {}
|
|
6
|
+
export interface ModuleProtoMsg {
|
|
7
|
+
typeUrl: "/cosmos.genutil.module.v1.Module";
|
|
8
|
+
value: Uint8Array;
|
|
9
|
+
}
|
|
10
|
+
/** Module is the config object for the genutil module. */
|
|
11
|
+
export interface ModuleAmino {}
|
|
12
|
+
export interface ModuleAminoMsg {
|
|
13
|
+
type: "cosmos-sdk/Module";
|
|
14
|
+
value: ModuleAmino;
|
|
15
|
+
}
|
|
16
|
+
function createBaseModule(): Module {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
export const Module = {
|
|
20
|
+
typeUrl: "/cosmos.genutil.module.v1.Module",
|
|
21
|
+
aminoType: "cosmos-sdk/Module",
|
|
22
|
+
is(o: any): o is Module {
|
|
23
|
+
return o && o.$typeUrl === Module.typeUrl;
|
|
24
|
+
},
|
|
25
|
+
isAmino(o: any): o is ModuleAmino {
|
|
26
|
+
return o && o.$typeUrl === Module.typeUrl;
|
|
27
|
+
},
|
|
28
|
+
encode(_: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
29
|
+
return writer;
|
|
30
|
+
},
|
|
31
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Module {
|
|
32
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
33
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
34
|
+
const message = createBaseModule();
|
|
35
|
+
while (reader.pos < end) {
|
|
36
|
+
const tag = reader.uint32();
|
|
37
|
+
switch (tag >>> 3) {
|
|
38
|
+
default:
|
|
39
|
+
reader.skipType(tag & 7);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return message;
|
|
44
|
+
},
|
|
45
|
+
fromPartial(_: DeepPartial<Module>): Module {
|
|
46
|
+
const message = createBaseModule();
|
|
47
|
+
return message;
|
|
48
|
+
},
|
|
49
|
+
fromAmino(_: ModuleAmino): Module {
|
|
50
|
+
const message = createBaseModule();
|
|
51
|
+
return message;
|
|
52
|
+
},
|
|
53
|
+
toAmino(_: Module): ModuleAmino {
|
|
54
|
+
const obj: any = {};
|
|
55
|
+
return obj;
|
|
56
|
+
},
|
|
57
|
+
fromAminoMsg(object: ModuleAminoMsg): Module {
|
|
58
|
+
return Module.fromAmino(object.value);
|
|
59
|
+
},
|
|
60
|
+
toAminoMsg(message: Module): ModuleAminoMsg {
|
|
61
|
+
return {
|
|
62
|
+
type: "cosmos-sdk/Module",
|
|
63
|
+
value: Module.toAmino(message)
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
fromProtoMsg(message: ModuleProtoMsg): Module {
|
|
67
|
+
return Module.decode(message.value);
|
|
68
|
+
},
|
|
69
|
+
toProto(message: Module): Uint8Array {
|
|
70
|
+
return Module.encode(message).finish();
|
|
71
|
+
},
|
|
72
|
+
toProtoMsg(message: Module): ModuleProtoMsg {
|
|
73
|
+
return {
|
|
74
|
+
typeUrl: "/cosmos.genutil.module.v1.Module",
|
|
75
|
+
value: Module.encode(message).finish()
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
GlobalDecoderRegistry.register(Module.typeUrl, Module);
|
|
80
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Module.aminoType, Module.typeUrl);
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
|
|
3
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
4
|
+
/** GenesisState defines the raw genesis transaction in JSON. */
|
|
5
|
+
export interface GenesisState {
|
|
6
|
+
/** gen_txs defines the genesis transactions. */
|
|
7
|
+
genTxs: Uint8Array[];
|
|
8
|
+
}
|
|
9
|
+
export interface GenesisStateProtoMsg {
|
|
10
|
+
typeUrl: "/cosmos.genutil.v1beta1.GenesisState";
|
|
11
|
+
value: Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
/** GenesisState defines the raw genesis transaction in JSON. */
|
|
14
|
+
export interface GenesisStateAmino {
|
|
15
|
+
/** gen_txs defines the genesis transactions. */
|
|
16
|
+
gen_txs: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface GenesisStateAminoMsg {
|
|
19
|
+
type: "cosmos-sdk/GenesisState";
|
|
20
|
+
value: GenesisStateAmino;
|
|
21
|
+
}
|
|
22
|
+
function createBaseGenesisState(): GenesisState {
|
|
23
|
+
return {
|
|
24
|
+
genTxs: []
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export const GenesisState = {
|
|
28
|
+
typeUrl: "/cosmos.genutil.v1beta1.GenesisState",
|
|
29
|
+
aminoType: "cosmos-sdk/GenesisState",
|
|
30
|
+
is(o: any): o is GenesisState {
|
|
31
|
+
return o && (o.$typeUrl === GenesisState.typeUrl || Array.isArray(o.genTxs) && (!o.genTxs.length || o.genTxs[0] instanceof Uint8Array || typeof o.genTxs[0] === "string"));
|
|
32
|
+
},
|
|
33
|
+
isAmino(o: any): o is GenesisStateAmino {
|
|
34
|
+
return o && (o.$typeUrl === GenesisState.typeUrl || Array.isArray(o.gen_txs) && (!o.gen_txs.length || o.gen_txs[0] instanceof Uint8Array || typeof o.gen_txs[0] === "string"));
|
|
35
|
+
},
|
|
36
|
+
encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
37
|
+
for (const v of message.genTxs) {
|
|
38
|
+
writer.uint32(10).bytes(v!);
|
|
39
|
+
}
|
|
40
|
+
return writer;
|
|
41
|
+
},
|
|
42
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GenesisState {
|
|
43
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
44
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
45
|
+
const message = createBaseGenesisState();
|
|
46
|
+
while (reader.pos < end) {
|
|
47
|
+
const tag = reader.uint32();
|
|
48
|
+
switch (tag >>> 3) {
|
|
49
|
+
case 1:
|
|
50
|
+
message.genTxs.push(reader.bytes());
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
reader.skipType(tag & 7);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return message;
|
|
58
|
+
},
|
|
59
|
+
fromPartial(object: DeepPartial<GenesisState>): GenesisState {
|
|
60
|
+
const message = createBaseGenesisState();
|
|
61
|
+
message.genTxs = object.genTxs?.map(e => e) || [];
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
fromAmino(object: GenesisStateAmino): GenesisState {
|
|
65
|
+
const message = createBaseGenesisState();
|
|
66
|
+
message.genTxs = object.gen_txs?.map(e => bytesFromBase64(e)) || [];
|
|
67
|
+
return message;
|
|
68
|
+
},
|
|
69
|
+
toAmino(message: GenesisState): GenesisStateAmino {
|
|
70
|
+
const obj: any = {};
|
|
71
|
+
if (message.genTxs) {
|
|
72
|
+
obj.gen_txs = message.genTxs.map(e => base64FromBytes(e));
|
|
73
|
+
} else {
|
|
74
|
+
obj.gen_txs = message.genTxs;
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
},
|
|
78
|
+
fromAminoMsg(object: GenesisStateAminoMsg): GenesisState {
|
|
79
|
+
return GenesisState.fromAmino(object.value);
|
|
80
|
+
},
|
|
81
|
+
toAminoMsg(message: GenesisState): GenesisStateAminoMsg {
|
|
82
|
+
return {
|
|
83
|
+
type: "cosmos-sdk/GenesisState",
|
|
84
|
+
value: GenesisState.toAmino(message)
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
fromProtoMsg(message: GenesisStateProtoMsg): GenesisState {
|
|
88
|
+
return GenesisState.decode(message.value);
|
|
89
|
+
},
|
|
90
|
+
toProto(message: GenesisState): Uint8Array {
|
|
91
|
+
return GenesisState.encode(message).finish();
|
|
92
|
+
},
|
|
93
|
+
toProtoMsg(message: GenesisState): GenesisStateProtoMsg {
|
|
94
|
+
return {
|
|
95
|
+
typeUrl: "/cosmos.genutil.v1beta1.GenesisState",
|
|
96
|
+
value: GenesisState.encode(message).finish()
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState);
|
|
101
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(GenesisState.aminoType, GenesisState.typeUrl);
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../../binary";
|
|
2
|
+
import { DeepPartial } from "../../../../helpers";
|
|
3
|
+
import { GlobalDecoderRegistry } from "../../../../registry";
|
|
4
|
+
/** Module is the config object of the gov module. */
|
|
5
|
+
export interface Module {
|
|
6
|
+
/**
|
|
7
|
+
* max_metadata_len defines the maximum proposal metadata length.
|
|
8
|
+
* Defaults to 255 if not explicitly set.
|
|
9
|
+
*/
|
|
10
|
+
maxMetadataLen: bigint;
|
|
11
|
+
/** authority defines the custom module authority. If not set, defaults to the governance module. */
|
|
12
|
+
authority: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ModuleProtoMsg {
|
|
15
|
+
typeUrl: "/cosmos.gov.module.v1.Module";
|
|
16
|
+
value: Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
/** Module is the config object of the gov module. */
|
|
19
|
+
export interface ModuleAmino {
|
|
20
|
+
/**
|
|
21
|
+
* max_metadata_len defines the maximum proposal metadata length.
|
|
22
|
+
* Defaults to 255 if not explicitly set.
|
|
23
|
+
*/
|
|
24
|
+
max_metadata_len: string;
|
|
25
|
+
/** authority defines the custom module authority. If not set, defaults to the governance module. */
|
|
26
|
+
authority: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ModuleAminoMsg {
|
|
29
|
+
type: "cosmos-sdk/Module";
|
|
30
|
+
value: ModuleAmino;
|
|
31
|
+
}
|
|
32
|
+
function createBaseModule(): Module {
|
|
33
|
+
return {
|
|
34
|
+
maxMetadataLen: BigInt(0),
|
|
35
|
+
authority: ""
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export const Module = {
|
|
39
|
+
typeUrl: "/cosmos.gov.module.v1.Module",
|
|
40
|
+
aminoType: "cosmos-sdk/Module",
|
|
41
|
+
is(o: any): o is Module {
|
|
42
|
+
return o && (o.$typeUrl === Module.typeUrl || typeof o.maxMetadataLen === "bigint" && typeof o.authority === "string");
|
|
43
|
+
},
|
|
44
|
+
isAmino(o: any): o is ModuleAmino {
|
|
45
|
+
return o && (o.$typeUrl === Module.typeUrl || typeof o.max_metadata_len === "bigint" && typeof o.authority === "string");
|
|
46
|
+
},
|
|
47
|
+
encode(message: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
48
|
+
if (message.maxMetadataLen !== BigInt(0)) {
|
|
49
|
+
writer.uint32(8).uint64(message.maxMetadataLen);
|
|
50
|
+
}
|
|
51
|
+
if (message.authority !== "") {
|
|
52
|
+
writer.uint32(18).string(message.authority);
|
|
53
|
+
}
|
|
54
|
+
return writer;
|
|
55
|
+
},
|
|
56
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Module {
|
|
57
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
58
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
59
|
+
const message = createBaseModule();
|
|
60
|
+
while (reader.pos < end) {
|
|
61
|
+
const tag = reader.uint32();
|
|
62
|
+
switch (tag >>> 3) {
|
|
63
|
+
case 1:
|
|
64
|
+
message.maxMetadataLen = reader.uint64();
|
|
65
|
+
break;
|
|
66
|
+
case 2:
|
|
67
|
+
message.authority = reader.string();
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
reader.skipType(tag & 7);
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return message;
|
|
75
|
+
},
|
|
76
|
+
fromPartial(object: DeepPartial<Module>): Module {
|
|
77
|
+
const message = createBaseModule();
|
|
78
|
+
message.maxMetadataLen = object.maxMetadataLen !== undefined && object.maxMetadataLen !== null ? BigInt(object.maxMetadataLen.toString()) : BigInt(0);
|
|
79
|
+
message.authority = object.authority ?? "";
|
|
80
|
+
return message;
|
|
81
|
+
},
|
|
82
|
+
fromAmino(object: ModuleAmino): Module {
|
|
83
|
+
const message = createBaseModule();
|
|
84
|
+
if (object.max_metadata_len !== undefined && object.max_metadata_len !== null) {
|
|
85
|
+
message.maxMetadataLen = BigInt(object.max_metadata_len);
|
|
86
|
+
}
|
|
87
|
+
if (object.authority !== undefined && object.authority !== null) {
|
|
88
|
+
message.authority = object.authority;
|
|
89
|
+
}
|
|
90
|
+
return message;
|
|
91
|
+
},
|
|
92
|
+
toAmino(message: Module): ModuleAmino {
|
|
93
|
+
const obj: any = {};
|
|
94
|
+
obj.max_metadata_len = message.maxMetadataLen !== BigInt(0) ? message.maxMetadataLen?.toString() : undefined;
|
|
95
|
+
obj.authority = message.authority === "" ? undefined : message.authority;
|
|
96
|
+
return obj;
|
|
97
|
+
},
|
|
98
|
+
fromAminoMsg(object: ModuleAminoMsg): Module {
|
|
99
|
+
return Module.fromAmino(object.value);
|
|
100
|
+
},
|
|
101
|
+
toAminoMsg(message: Module): ModuleAminoMsg {
|
|
102
|
+
return {
|
|
103
|
+
type: "cosmos-sdk/Module",
|
|
104
|
+
value: Module.toAmino(message)
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
fromProtoMsg(message: ModuleProtoMsg): Module {
|
|
108
|
+
return Module.decode(message.value);
|
|
109
|
+
},
|
|
110
|
+
toProto(message: Module): Uint8Array {
|
|
111
|
+
return Module.encode(message).finish();
|
|
112
|
+
},
|
|
113
|
+
toProtoMsg(message: Module): ModuleProtoMsg {
|
|
114
|
+
return {
|
|
115
|
+
typeUrl: "/cosmos.gov.module.v1.Module",
|
|
116
|
+
value: Module.encode(message).finish()
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
GlobalDecoderRegistry.register(Module.typeUrl, Module);
|
|
121
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Module.aminoType, Module.typeUrl);
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { Deposit, DepositAmino, Vote, VoteAmino, Proposal, ProposalAmino, DepositParams, DepositParamsAmino, VotingParams, VotingParamsAmino, TallyParams, TallyParamsAmino, Params, ParamsAmino } from "./gov";
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
3
|
+
import { DeepPartial } from "../../../helpers";
|
|
4
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
5
|
+
/** GenesisState defines the gov module's genesis state. */
|
|
6
|
+
export interface GenesisState {
|
|
7
|
+
/** starting_proposal_id is the ID of the starting proposal. */
|
|
8
|
+
startingProposalId: bigint;
|
|
9
|
+
/** deposits defines all the deposits present at genesis. */
|
|
10
|
+
deposits: Deposit[];
|
|
11
|
+
/** votes defines all the votes present at genesis. */
|
|
12
|
+
votes: Vote[];
|
|
13
|
+
/** proposals defines all the proposals present at genesis. */
|
|
14
|
+
proposals: Proposal[];
|
|
15
|
+
/**
|
|
16
|
+
* Deprecated: Prefer to use `params` instead.
|
|
17
|
+
* deposit_params defines all the paramaters of related to deposit.
|
|
18
|
+
*/
|
|
19
|
+
/** @deprecated */
|
|
20
|
+
depositParams?: DepositParams;
|
|
21
|
+
/**
|
|
22
|
+
* Deprecated: Prefer to use `params` instead.
|
|
23
|
+
* voting_params defines all the paramaters of related to voting.
|
|
24
|
+
*/
|
|
25
|
+
/** @deprecated */
|
|
26
|
+
votingParams?: VotingParams;
|
|
27
|
+
/**
|
|
28
|
+
* Deprecated: Prefer to use `params` instead.
|
|
29
|
+
* tally_params defines all the paramaters of related to tally.
|
|
30
|
+
*/
|
|
31
|
+
/** @deprecated */
|
|
32
|
+
tallyParams?: TallyParams;
|
|
33
|
+
/**
|
|
34
|
+
* params defines all the paramaters of x/gov module.
|
|
35
|
+
*
|
|
36
|
+
* Since: cosmos-sdk 0.47
|
|
37
|
+
*/
|
|
38
|
+
params?: Params;
|
|
39
|
+
/**
|
|
40
|
+
* The constitution allows builders to lay a foundation and define purpose.
|
|
41
|
+
* This is an immutable string set in genesis.
|
|
42
|
+
* There are no amendments, to go outside of scope, just fork.
|
|
43
|
+
* constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals.
|
|
44
|
+
*
|
|
45
|
+
* Since: cosmos-sdk 0.50
|
|
46
|
+
*/
|
|
47
|
+
constitution: string;
|
|
48
|
+
}
|
|
49
|
+
export interface GenesisStateProtoMsg {
|
|
50
|
+
typeUrl: "/cosmos.gov.v1.GenesisState";
|
|
51
|
+
value: Uint8Array;
|
|
52
|
+
}
|
|
53
|
+
/** GenesisState defines the gov module's genesis state. */
|
|
54
|
+
export interface GenesisStateAmino {
|
|
55
|
+
/** starting_proposal_id is the ID of the starting proposal. */
|
|
56
|
+
starting_proposal_id: string;
|
|
57
|
+
/** deposits defines all the deposits present at genesis. */
|
|
58
|
+
deposits: DepositAmino[];
|
|
59
|
+
/** votes defines all the votes present at genesis. */
|
|
60
|
+
votes: VoteAmino[];
|
|
61
|
+
/** proposals defines all the proposals present at genesis. */
|
|
62
|
+
proposals: ProposalAmino[];
|
|
63
|
+
/**
|
|
64
|
+
* Deprecated: Prefer to use `params` instead.
|
|
65
|
+
* deposit_params defines all the paramaters of related to deposit.
|
|
66
|
+
*/
|
|
67
|
+
/** @deprecated */
|
|
68
|
+
deposit_params?: DepositParamsAmino;
|
|
69
|
+
/**
|
|
70
|
+
* Deprecated: Prefer to use `params` instead.
|
|
71
|
+
* voting_params defines all the paramaters of related to voting.
|
|
72
|
+
*/
|
|
73
|
+
/** @deprecated */
|
|
74
|
+
voting_params?: VotingParamsAmino;
|
|
75
|
+
/**
|
|
76
|
+
* Deprecated: Prefer to use `params` instead.
|
|
77
|
+
* tally_params defines all the paramaters of related to tally.
|
|
78
|
+
*/
|
|
79
|
+
/** @deprecated */
|
|
80
|
+
tally_params?: TallyParamsAmino;
|
|
81
|
+
/**
|
|
82
|
+
* params defines all the paramaters of x/gov module.
|
|
83
|
+
*
|
|
84
|
+
* Since: cosmos-sdk 0.47
|
|
85
|
+
*/
|
|
86
|
+
params?: ParamsAmino;
|
|
87
|
+
/**
|
|
88
|
+
* The constitution allows builders to lay a foundation and define purpose.
|
|
89
|
+
* This is an immutable string set in genesis.
|
|
90
|
+
* There are no amendments, to go outside of scope, just fork.
|
|
91
|
+
* constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals.
|
|
92
|
+
*
|
|
93
|
+
* Since: cosmos-sdk 0.50
|
|
94
|
+
*/
|
|
95
|
+
constitution: string;
|
|
96
|
+
}
|
|
97
|
+
export interface GenesisStateAminoMsg {
|
|
98
|
+
type: "cosmos-sdk/v1/GenesisState";
|
|
99
|
+
value: GenesisStateAmino;
|
|
100
|
+
}
|
|
101
|
+
function createBaseGenesisState(): GenesisState {
|
|
102
|
+
return {
|
|
103
|
+
startingProposalId: BigInt(0),
|
|
104
|
+
deposits: [],
|
|
105
|
+
votes: [],
|
|
106
|
+
proposals: [],
|
|
107
|
+
depositParams: undefined,
|
|
108
|
+
votingParams: undefined,
|
|
109
|
+
tallyParams: undefined,
|
|
110
|
+
params: undefined,
|
|
111
|
+
constitution: ""
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export const GenesisState = {
|
|
115
|
+
typeUrl: "/cosmos.gov.v1.GenesisState",
|
|
116
|
+
aminoType: "cosmos-sdk/v1/GenesisState",
|
|
117
|
+
is(o: any): o is GenesisState {
|
|
118
|
+
return o && (o.$typeUrl === GenesisState.typeUrl || typeof o.startingProposalId === "bigint" && Array.isArray(o.deposits) && (!o.deposits.length || Deposit.is(o.deposits[0])) && Array.isArray(o.votes) && (!o.votes.length || Vote.is(o.votes[0])) && Array.isArray(o.proposals) && (!o.proposals.length || Proposal.is(o.proposals[0])) && typeof o.constitution === "string");
|
|
119
|
+
},
|
|
120
|
+
isAmino(o: any): o is GenesisStateAmino {
|
|
121
|
+
return o && (o.$typeUrl === GenesisState.typeUrl || typeof o.starting_proposal_id === "bigint" && Array.isArray(o.deposits) && (!o.deposits.length || Deposit.isAmino(o.deposits[0])) && Array.isArray(o.votes) && (!o.votes.length || Vote.isAmino(o.votes[0])) && Array.isArray(o.proposals) && (!o.proposals.length || Proposal.isAmino(o.proposals[0])) && typeof o.constitution === "string");
|
|
122
|
+
},
|
|
123
|
+
encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
124
|
+
if (message.startingProposalId !== BigInt(0)) {
|
|
125
|
+
writer.uint32(8).uint64(message.startingProposalId);
|
|
126
|
+
}
|
|
127
|
+
for (const v of message.deposits) {
|
|
128
|
+
Deposit.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
129
|
+
}
|
|
130
|
+
for (const v of message.votes) {
|
|
131
|
+
Vote.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
132
|
+
}
|
|
133
|
+
for (const v of message.proposals) {
|
|
134
|
+
Proposal.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
135
|
+
}
|
|
136
|
+
if (message.depositParams !== undefined) {
|
|
137
|
+
DepositParams.encode(message.depositParams, writer.uint32(42).fork()).ldelim();
|
|
138
|
+
}
|
|
139
|
+
if (message.votingParams !== undefined) {
|
|
140
|
+
VotingParams.encode(message.votingParams, writer.uint32(50).fork()).ldelim();
|
|
141
|
+
}
|
|
142
|
+
if (message.tallyParams !== undefined) {
|
|
143
|
+
TallyParams.encode(message.tallyParams, writer.uint32(58).fork()).ldelim();
|
|
144
|
+
}
|
|
145
|
+
if (message.params !== undefined) {
|
|
146
|
+
Params.encode(message.params, writer.uint32(66).fork()).ldelim();
|
|
147
|
+
}
|
|
148
|
+
if (message.constitution !== "") {
|
|
149
|
+
writer.uint32(74).string(message.constitution);
|
|
150
|
+
}
|
|
151
|
+
return writer;
|
|
152
|
+
},
|
|
153
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GenesisState {
|
|
154
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
155
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
156
|
+
const message = createBaseGenesisState();
|
|
157
|
+
while (reader.pos < end) {
|
|
158
|
+
const tag = reader.uint32();
|
|
159
|
+
switch (tag >>> 3) {
|
|
160
|
+
case 1:
|
|
161
|
+
message.startingProposalId = reader.uint64();
|
|
162
|
+
break;
|
|
163
|
+
case 2:
|
|
164
|
+
message.deposits.push(Deposit.decode(reader, reader.uint32()));
|
|
165
|
+
break;
|
|
166
|
+
case 3:
|
|
167
|
+
message.votes.push(Vote.decode(reader, reader.uint32()));
|
|
168
|
+
break;
|
|
169
|
+
case 4:
|
|
170
|
+
message.proposals.push(Proposal.decode(reader, reader.uint32()));
|
|
171
|
+
break;
|
|
172
|
+
case 5:
|
|
173
|
+
message.depositParams = DepositParams.decode(reader, reader.uint32());
|
|
174
|
+
break;
|
|
175
|
+
case 6:
|
|
176
|
+
message.votingParams = VotingParams.decode(reader, reader.uint32());
|
|
177
|
+
break;
|
|
178
|
+
case 7:
|
|
179
|
+
message.tallyParams = TallyParams.decode(reader, reader.uint32());
|
|
180
|
+
break;
|
|
181
|
+
case 8:
|
|
182
|
+
message.params = Params.decode(reader, reader.uint32());
|
|
183
|
+
break;
|
|
184
|
+
case 9:
|
|
185
|
+
message.constitution = reader.string();
|
|
186
|
+
break;
|
|
187
|
+
default:
|
|
188
|
+
reader.skipType(tag & 7);
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return message;
|
|
193
|
+
},
|
|
194
|
+
fromPartial(object: DeepPartial<GenesisState>): GenesisState {
|
|
195
|
+
const message = createBaseGenesisState();
|
|
196
|
+
message.startingProposalId = object.startingProposalId !== undefined && object.startingProposalId !== null ? BigInt(object.startingProposalId.toString()) : BigInt(0);
|
|
197
|
+
message.deposits = object.deposits?.map(e => Deposit.fromPartial(e)) || [];
|
|
198
|
+
message.votes = object.votes?.map(e => Vote.fromPartial(e)) || [];
|
|
199
|
+
message.proposals = object.proposals?.map(e => Proposal.fromPartial(e)) || [];
|
|
200
|
+
message.depositParams = object.depositParams !== undefined && object.depositParams !== null ? DepositParams.fromPartial(object.depositParams) : undefined;
|
|
201
|
+
message.votingParams = object.votingParams !== undefined && object.votingParams !== null ? VotingParams.fromPartial(object.votingParams) : undefined;
|
|
202
|
+
message.tallyParams = object.tallyParams !== undefined && object.tallyParams !== null ? TallyParams.fromPartial(object.tallyParams) : undefined;
|
|
203
|
+
message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined;
|
|
204
|
+
message.constitution = object.constitution ?? "";
|
|
205
|
+
return message;
|
|
206
|
+
},
|
|
207
|
+
fromAmino(object: GenesisStateAmino): GenesisState {
|
|
208
|
+
const message = createBaseGenesisState();
|
|
209
|
+
if (object.starting_proposal_id !== undefined && object.starting_proposal_id !== null) {
|
|
210
|
+
message.startingProposalId = BigInt(object.starting_proposal_id);
|
|
211
|
+
}
|
|
212
|
+
message.deposits = object.deposits?.map(e => Deposit.fromAmino(e)) || [];
|
|
213
|
+
message.votes = object.votes?.map(e => Vote.fromAmino(e)) || [];
|
|
214
|
+
message.proposals = object.proposals?.map(e => Proposal.fromAmino(e)) || [];
|
|
215
|
+
if (object.deposit_params !== undefined && object.deposit_params !== null) {
|
|
216
|
+
message.depositParams = DepositParams.fromAmino(object.deposit_params);
|
|
217
|
+
}
|
|
218
|
+
if (object.voting_params !== undefined && object.voting_params !== null) {
|
|
219
|
+
message.votingParams = VotingParams.fromAmino(object.voting_params);
|
|
220
|
+
}
|
|
221
|
+
if (object.tally_params !== undefined && object.tally_params !== null) {
|
|
222
|
+
message.tallyParams = TallyParams.fromAmino(object.tally_params);
|
|
223
|
+
}
|
|
224
|
+
if (object.params !== undefined && object.params !== null) {
|
|
225
|
+
message.params = Params.fromAmino(object.params);
|
|
226
|
+
}
|
|
227
|
+
if (object.constitution !== undefined && object.constitution !== null) {
|
|
228
|
+
message.constitution = object.constitution;
|
|
229
|
+
}
|
|
230
|
+
return message;
|
|
231
|
+
},
|
|
232
|
+
toAmino(message: GenesisState): GenesisStateAmino {
|
|
233
|
+
const obj: any = {};
|
|
234
|
+
obj.starting_proposal_id = message.startingProposalId !== BigInt(0) ? message.startingProposalId?.toString() : undefined;
|
|
235
|
+
if (message.deposits) {
|
|
236
|
+
obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e) : undefined);
|
|
237
|
+
} else {
|
|
238
|
+
obj.deposits = message.deposits;
|
|
239
|
+
}
|
|
240
|
+
if (message.votes) {
|
|
241
|
+
obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined);
|
|
242
|
+
} else {
|
|
243
|
+
obj.votes = message.votes;
|
|
244
|
+
}
|
|
245
|
+
if (message.proposals) {
|
|
246
|
+
obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e) : undefined);
|
|
247
|
+
} else {
|
|
248
|
+
obj.proposals = message.proposals;
|
|
249
|
+
}
|
|
250
|
+
obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams) : undefined;
|
|
251
|
+
obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams) : undefined;
|
|
252
|
+
obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams) : undefined;
|
|
253
|
+
obj.params = message.params ? Params.toAmino(message.params) : undefined;
|
|
254
|
+
obj.constitution = message.constitution === "" ? undefined : message.constitution;
|
|
255
|
+
return obj;
|
|
256
|
+
},
|
|
257
|
+
fromAminoMsg(object: GenesisStateAminoMsg): GenesisState {
|
|
258
|
+
return GenesisState.fromAmino(object.value);
|
|
259
|
+
},
|
|
260
|
+
toAminoMsg(message: GenesisState): GenesisStateAminoMsg {
|
|
261
|
+
return {
|
|
262
|
+
type: "cosmos-sdk/v1/GenesisState",
|
|
263
|
+
value: GenesisState.toAmino(message)
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
fromProtoMsg(message: GenesisStateProtoMsg): GenesisState {
|
|
267
|
+
return GenesisState.decode(message.value);
|
|
268
|
+
},
|
|
269
|
+
toProto(message: GenesisState): Uint8Array {
|
|
270
|
+
return GenesisState.encode(message).finish();
|
|
271
|
+
},
|
|
272
|
+
toProtoMsg(message: GenesisState): GenesisStateProtoMsg {
|
|
273
|
+
return {
|
|
274
|
+
typeUrl: "/cosmos.gov.v1.GenesisState",
|
|
275
|
+
value: GenesisState.encode(message).finish()
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
GlobalDecoderRegistry.register(GenesisState.typeUrl, GenesisState);
|
|
280
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(GenesisState.aminoType, GenesisState.typeUrl);
|