@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,1425 @@
|
|
|
1
|
+
import { Coin, CoinAmino } from "../../base/v1beta1/coin";
|
|
2
|
+
import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
|
|
3
|
+
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
4
|
+
import { Duration, DurationAmino } from "../../../google/protobuf/duration";
|
|
5
|
+
import { ClientUpdateProposal, ClientUpdateProposalProtoMsg, UpgradeProposal, UpgradeProposalProtoMsg } from "../../../ibc/core/client/v1/client";
|
|
6
|
+
import { StoreCodeProposal, StoreCodeProposalProtoMsg, InstantiateContractProposal, InstantiateContractProposalProtoMsg, InstantiateContract2Proposal, InstantiateContract2ProposalProtoMsg, MigrateContractProposal, MigrateContractProposalProtoMsg, SudoContractProposal, SudoContractProposalProtoMsg, ExecuteContractProposal, ExecuteContractProposalProtoMsg, UpdateAdminProposal, UpdateAdminProposalProtoMsg, ClearAdminProposal, ClearAdminProposalProtoMsg, PinCodesProposal, PinCodesProposalProtoMsg, UnpinCodesProposal, UnpinCodesProposalProtoMsg, UpdateInstantiateConfigProposal, UpdateInstantiateConfigProposalProtoMsg, StoreAndInstantiateContractProposal, StoreAndInstantiateContractProposalProtoMsg } from "../../../cosmwasm/wasm/v1/proposal_legacy";
|
|
7
|
+
import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade";
|
|
8
|
+
import { ParameterChangeProposal, ParameterChangeProposalProtoMsg } from "../../params/v1beta1/params";
|
|
9
|
+
import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution";
|
|
10
|
+
import { isSet, DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes } from "../../../helpers";
|
|
11
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
12
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
13
|
+
/** VoteOption enumerates the valid vote options for a given governance proposal. */
|
|
14
|
+
export enum VoteOption {
|
|
15
|
+
/** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
|
|
16
|
+
VOTE_OPTION_UNSPECIFIED = 0,
|
|
17
|
+
/** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
|
|
18
|
+
VOTE_OPTION_YES = 1,
|
|
19
|
+
/** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
|
|
20
|
+
VOTE_OPTION_ABSTAIN = 2,
|
|
21
|
+
/** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
|
|
22
|
+
VOTE_OPTION_NO = 3,
|
|
23
|
+
/** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
|
|
24
|
+
VOTE_OPTION_NO_WITH_VETO = 4,
|
|
25
|
+
UNRECOGNIZED = -1,
|
|
26
|
+
}
|
|
27
|
+
export const VoteOptionAmino = VoteOption;
|
|
28
|
+
export function voteOptionFromJSON(object: any): VoteOption {
|
|
29
|
+
switch (object) {
|
|
30
|
+
case 0:
|
|
31
|
+
case "VOTE_OPTION_UNSPECIFIED":
|
|
32
|
+
return VoteOption.VOTE_OPTION_UNSPECIFIED;
|
|
33
|
+
case 1:
|
|
34
|
+
case "VOTE_OPTION_YES":
|
|
35
|
+
return VoteOption.VOTE_OPTION_YES;
|
|
36
|
+
case 2:
|
|
37
|
+
case "VOTE_OPTION_ABSTAIN":
|
|
38
|
+
return VoteOption.VOTE_OPTION_ABSTAIN;
|
|
39
|
+
case 3:
|
|
40
|
+
case "VOTE_OPTION_NO":
|
|
41
|
+
return VoteOption.VOTE_OPTION_NO;
|
|
42
|
+
case 4:
|
|
43
|
+
case "VOTE_OPTION_NO_WITH_VETO":
|
|
44
|
+
return VoteOption.VOTE_OPTION_NO_WITH_VETO;
|
|
45
|
+
case -1:
|
|
46
|
+
case "UNRECOGNIZED":
|
|
47
|
+
default:
|
|
48
|
+
return VoteOption.UNRECOGNIZED;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export function voteOptionToJSON(object: VoteOption): string {
|
|
52
|
+
switch (object) {
|
|
53
|
+
case VoteOption.VOTE_OPTION_UNSPECIFIED:
|
|
54
|
+
return "VOTE_OPTION_UNSPECIFIED";
|
|
55
|
+
case VoteOption.VOTE_OPTION_YES:
|
|
56
|
+
return "VOTE_OPTION_YES";
|
|
57
|
+
case VoteOption.VOTE_OPTION_ABSTAIN:
|
|
58
|
+
return "VOTE_OPTION_ABSTAIN";
|
|
59
|
+
case VoteOption.VOTE_OPTION_NO:
|
|
60
|
+
return "VOTE_OPTION_NO";
|
|
61
|
+
case VoteOption.VOTE_OPTION_NO_WITH_VETO:
|
|
62
|
+
return "VOTE_OPTION_NO_WITH_VETO";
|
|
63
|
+
case VoteOption.UNRECOGNIZED:
|
|
64
|
+
default:
|
|
65
|
+
return "UNRECOGNIZED";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** ProposalStatus enumerates the valid statuses of a proposal. */
|
|
69
|
+
export enum ProposalStatus {
|
|
70
|
+
/** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
|
|
71
|
+
PROPOSAL_STATUS_UNSPECIFIED = 0,
|
|
72
|
+
/**
|
|
73
|
+
* PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
|
74
|
+
* period.
|
|
75
|
+
*/
|
|
76
|
+
PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,
|
|
77
|
+
/**
|
|
78
|
+
* PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
|
79
|
+
* period.
|
|
80
|
+
*/
|
|
81
|
+
PROPOSAL_STATUS_VOTING_PERIOD = 2,
|
|
82
|
+
/**
|
|
83
|
+
* PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
|
84
|
+
* passed.
|
|
85
|
+
*/
|
|
86
|
+
PROPOSAL_STATUS_PASSED = 3,
|
|
87
|
+
/**
|
|
88
|
+
* PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
|
89
|
+
* been rejected.
|
|
90
|
+
*/
|
|
91
|
+
PROPOSAL_STATUS_REJECTED = 4,
|
|
92
|
+
/**
|
|
93
|
+
* PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
|
94
|
+
* failed.
|
|
95
|
+
*/
|
|
96
|
+
PROPOSAL_STATUS_FAILED = 5,
|
|
97
|
+
UNRECOGNIZED = -1,
|
|
98
|
+
}
|
|
99
|
+
export const ProposalStatusAmino = ProposalStatus;
|
|
100
|
+
export function proposalStatusFromJSON(object: any): ProposalStatus {
|
|
101
|
+
switch (object) {
|
|
102
|
+
case 0:
|
|
103
|
+
case "PROPOSAL_STATUS_UNSPECIFIED":
|
|
104
|
+
return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
|
|
105
|
+
case 1:
|
|
106
|
+
case "PROPOSAL_STATUS_DEPOSIT_PERIOD":
|
|
107
|
+
return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;
|
|
108
|
+
case 2:
|
|
109
|
+
case "PROPOSAL_STATUS_VOTING_PERIOD":
|
|
110
|
+
return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;
|
|
111
|
+
case 3:
|
|
112
|
+
case "PROPOSAL_STATUS_PASSED":
|
|
113
|
+
return ProposalStatus.PROPOSAL_STATUS_PASSED;
|
|
114
|
+
case 4:
|
|
115
|
+
case "PROPOSAL_STATUS_REJECTED":
|
|
116
|
+
return ProposalStatus.PROPOSAL_STATUS_REJECTED;
|
|
117
|
+
case 5:
|
|
118
|
+
case "PROPOSAL_STATUS_FAILED":
|
|
119
|
+
return ProposalStatus.PROPOSAL_STATUS_FAILED;
|
|
120
|
+
case -1:
|
|
121
|
+
case "UNRECOGNIZED":
|
|
122
|
+
default:
|
|
123
|
+
return ProposalStatus.UNRECOGNIZED;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export function proposalStatusToJSON(object: ProposalStatus): string {
|
|
127
|
+
switch (object) {
|
|
128
|
+
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
|
129
|
+
return "PROPOSAL_STATUS_UNSPECIFIED";
|
|
130
|
+
case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:
|
|
131
|
+
return "PROPOSAL_STATUS_DEPOSIT_PERIOD";
|
|
132
|
+
case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:
|
|
133
|
+
return "PROPOSAL_STATUS_VOTING_PERIOD";
|
|
134
|
+
case ProposalStatus.PROPOSAL_STATUS_PASSED:
|
|
135
|
+
return "PROPOSAL_STATUS_PASSED";
|
|
136
|
+
case ProposalStatus.PROPOSAL_STATUS_REJECTED:
|
|
137
|
+
return "PROPOSAL_STATUS_REJECTED";
|
|
138
|
+
case ProposalStatus.PROPOSAL_STATUS_FAILED:
|
|
139
|
+
return "PROPOSAL_STATUS_FAILED";
|
|
140
|
+
case ProposalStatus.UNRECOGNIZED:
|
|
141
|
+
default:
|
|
142
|
+
return "UNRECOGNIZED";
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* WeightedVoteOption defines a unit of vote for vote split.
|
|
147
|
+
*
|
|
148
|
+
* Since: cosmos-sdk 0.43
|
|
149
|
+
*/
|
|
150
|
+
export interface WeightedVoteOption {
|
|
151
|
+
/** option defines the valid vote options, it must not contain duplicate vote options. */
|
|
152
|
+
option: VoteOption;
|
|
153
|
+
/** weight is the vote weight associated with the vote option. */
|
|
154
|
+
weight: string;
|
|
155
|
+
}
|
|
156
|
+
export interface WeightedVoteOptionProtoMsg {
|
|
157
|
+
typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption";
|
|
158
|
+
value: Uint8Array;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* WeightedVoteOption defines a unit of vote for vote split.
|
|
162
|
+
*
|
|
163
|
+
* Since: cosmos-sdk 0.43
|
|
164
|
+
*/
|
|
165
|
+
export interface WeightedVoteOptionAmino {
|
|
166
|
+
/** option defines the valid vote options, it must not contain duplicate vote options. */
|
|
167
|
+
option: VoteOption;
|
|
168
|
+
/** weight is the vote weight associated with the vote option. */
|
|
169
|
+
weight: string;
|
|
170
|
+
}
|
|
171
|
+
export interface WeightedVoteOptionAminoMsg {
|
|
172
|
+
type: "cosmos-sdk/WeightedVoteOption";
|
|
173
|
+
value: WeightedVoteOptionAmino;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* TextProposal defines a standard text proposal whose changes need to be
|
|
177
|
+
* manually updated in case of approval.
|
|
178
|
+
*/
|
|
179
|
+
export interface TextProposal {
|
|
180
|
+
/** title of the proposal. */
|
|
181
|
+
title: string;
|
|
182
|
+
/** description associated with the proposal. */
|
|
183
|
+
description: string;
|
|
184
|
+
}
|
|
185
|
+
export interface TextProposalProtoMsg {
|
|
186
|
+
typeUrl: "/cosmos.gov.v1beta1.TextProposal";
|
|
187
|
+
value: Uint8Array;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* TextProposal defines a standard text proposal whose changes need to be
|
|
191
|
+
* manually updated in case of approval.
|
|
192
|
+
*/
|
|
193
|
+
export interface TextProposalAmino {
|
|
194
|
+
/** title of the proposal. */
|
|
195
|
+
title: string;
|
|
196
|
+
/** description associated with the proposal. */
|
|
197
|
+
description: string;
|
|
198
|
+
}
|
|
199
|
+
export interface TextProposalAminoMsg {
|
|
200
|
+
type: "cosmos-sdk/TextProposal";
|
|
201
|
+
value: TextProposalAmino;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Deposit defines an amount deposited by an account address to an active
|
|
205
|
+
* proposal.
|
|
206
|
+
*/
|
|
207
|
+
export interface Deposit {
|
|
208
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
209
|
+
proposalId: bigint;
|
|
210
|
+
/** depositor defines the deposit addresses from the proposals. */
|
|
211
|
+
depositor: string;
|
|
212
|
+
/** amount to be deposited by depositor. */
|
|
213
|
+
amount: Coin[];
|
|
214
|
+
}
|
|
215
|
+
export interface DepositProtoMsg {
|
|
216
|
+
typeUrl: "/cosmos.gov.v1beta1.Deposit";
|
|
217
|
+
value: Uint8Array;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Deposit defines an amount deposited by an account address to an active
|
|
221
|
+
* proposal.
|
|
222
|
+
*/
|
|
223
|
+
export interface DepositAmino {
|
|
224
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
225
|
+
proposal_id: string;
|
|
226
|
+
/** depositor defines the deposit addresses from the proposals. */
|
|
227
|
+
depositor: string;
|
|
228
|
+
/** amount to be deposited by depositor. */
|
|
229
|
+
amount: CoinAmino[];
|
|
230
|
+
}
|
|
231
|
+
export interface DepositAminoMsg {
|
|
232
|
+
type: "cosmos-sdk/Deposit";
|
|
233
|
+
value: DepositAmino;
|
|
234
|
+
}
|
|
235
|
+
/** Proposal defines the core field members of a governance proposal. */
|
|
236
|
+
export interface Proposal {
|
|
237
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
238
|
+
proposalId: bigint;
|
|
239
|
+
/** content is the proposal's content. */
|
|
240
|
+
content?: TextProposal | ClientUpdateProposal | UpgradeProposal | StoreCodeProposal | InstantiateContractProposal | InstantiateContract2Proposal | MigrateContractProposal | SudoContractProposal | ExecuteContractProposal | UpdateAdminProposal | ClearAdminProposal | PinCodesProposal | UnpinCodesProposal | UpdateInstantiateConfigProposal | StoreAndInstantiateContractProposal | SoftwareUpgradeProposal | CancelSoftwareUpgradeProposal | ParameterChangeProposal | CommunityPoolSpendProposal | CommunityPoolSpendProposalWithDeposit | Any | undefined;
|
|
241
|
+
/** status defines the proposal status. */
|
|
242
|
+
status: ProposalStatus;
|
|
243
|
+
/**
|
|
244
|
+
* final_tally_result is the final tally result of the proposal. When
|
|
245
|
+
* querying a proposal via gRPC, this field is not populated until the
|
|
246
|
+
* proposal's voting period has ended.
|
|
247
|
+
*/
|
|
248
|
+
finalTallyResult: TallyResult;
|
|
249
|
+
/** submit_time is the time of proposal submission. */
|
|
250
|
+
submitTime: Date;
|
|
251
|
+
/** deposit_end_time is the end time for deposition. */
|
|
252
|
+
depositEndTime: Date;
|
|
253
|
+
/** total_deposit is the total deposit on the proposal. */
|
|
254
|
+
totalDeposit: Coin[];
|
|
255
|
+
/** voting_start_time is the starting time to vote on a proposal. */
|
|
256
|
+
votingStartTime: Date;
|
|
257
|
+
/** voting_end_time is the end time of voting on a proposal. */
|
|
258
|
+
votingEndTime: Date;
|
|
259
|
+
}
|
|
260
|
+
export interface ProposalProtoMsg {
|
|
261
|
+
typeUrl: "/cosmos.gov.v1beta1.Proposal";
|
|
262
|
+
value: Uint8Array;
|
|
263
|
+
}
|
|
264
|
+
export type ProposalEncoded = Omit<Proposal, "content"> & {
|
|
265
|
+
/** content is the proposal's content. */content?: TextProposalProtoMsg | ClientUpdateProposalProtoMsg | UpgradeProposalProtoMsg | StoreCodeProposalProtoMsg | InstantiateContractProposalProtoMsg | InstantiateContract2ProposalProtoMsg | MigrateContractProposalProtoMsg | SudoContractProposalProtoMsg | ExecuteContractProposalProtoMsg | UpdateAdminProposalProtoMsg | ClearAdminProposalProtoMsg | PinCodesProposalProtoMsg | UnpinCodesProposalProtoMsg | UpdateInstantiateConfigProposalProtoMsg | StoreAndInstantiateContractProposalProtoMsg | SoftwareUpgradeProposalProtoMsg | CancelSoftwareUpgradeProposalProtoMsg | ParameterChangeProposalProtoMsg | CommunityPoolSpendProposalProtoMsg | CommunityPoolSpendProposalWithDepositProtoMsg | AnyProtoMsg | undefined;
|
|
266
|
+
};
|
|
267
|
+
/** Proposal defines the core field members of a governance proposal. */
|
|
268
|
+
export interface ProposalAmino {
|
|
269
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
270
|
+
proposal_id: string;
|
|
271
|
+
/** content is the proposal's content. */
|
|
272
|
+
content?: AnyAmino;
|
|
273
|
+
/** status defines the proposal status. */
|
|
274
|
+
status: ProposalStatus;
|
|
275
|
+
/**
|
|
276
|
+
* final_tally_result is the final tally result of the proposal. When
|
|
277
|
+
* querying a proposal via gRPC, this field is not populated until the
|
|
278
|
+
* proposal's voting period has ended.
|
|
279
|
+
*/
|
|
280
|
+
final_tally_result: TallyResultAmino;
|
|
281
|
+
/** submit_time is the time of proposal submission. */
|
|
282
|
+
submit_time: string;
|
|
283
|
+
/** deposit_end_time is the end time for deposition. */
|
|
284
|
+
deposit_end_time: string;
|
|
285
|
+
/** total_deposit is the total deposit on the proposal. */
|
|
286
|
+
total_deposit: CoinAmino[];
|
|
287
|
+
/** voting_start_time is the starting time to vote on a proposal. */
|
|
288
|
+
voting_start_time: string;
|
|
289
|
+
/** voting_end_time is the end time of voting on a proposal. */
|
|
290
|
+
voting_end_time: string;
|
|
291
|
+
}
|
|
292
|
+
export interface ProposalAminoMsg {
|
|
293
|
+
type: "cosmos-sdk/Proposal";
|
|
294
|
+
value: ProposalAmino;
|
|
295
|
+
}
|
|
296
|
+
/** TallyResult defines a standard tally for a governance proposal. */
|
|
297
|
+
export interface TallyResult {
|
|
298
|
+
/** yes is the number of yes votes on a proposal. */
|
|
299
|
+
yes: string;
|
|
300
|
+
/** abstain is the number of abstain votes on a proposal. */
|
|
301
|
+
abstain: string;
|
|
302
|
+
/** no is the number of no votes on a proposal. */
|
|
303
|
+
no: string;
|
|
304
|
+
/** no_with_veto is the number of no with veto votes on a proposal. */
|
|
305
|
+
noWithVeto: string;
|
|
306
|
+
}
|
|
307
|
+
export interface TallyResultProtoMsg {
|
|
308
|
+
typeUrl: "/cosmos.gov.v1beta1.TallyResult";
|
|
309
|
+
value: Uint8Array;
|
|
310
|
+
}
|
|
311
|
+
/** TallyResult defines a standard tally for a governance proposal. */
|
|
312
|
+
export interface TallyResultAmino {
|
|
313
|
+
/** yes is the number of yes votes on a proposal. */
|
|
314
|
+
yes: string;
|
|
315
|
+
/** abstain is the number of abstain votes on a proposal. */
|
|
316
|
+
abstain: string;
|
|
317
|
+
/** no is the number of no votes on a proposal. */
|
|
318
|
+
no: string;
|
|
319
|
+
/** no_with_veto is the number of no with veto votes on a proposal. */
|
|
320
|
+
no_with_veto: string;
|
|
321
|
+
}
|
|
322
|
+
export interface TallyResultAminoMsg {
|
|
323
|
+
type: "cosmos-sdk/TallyResult";
|
|
324
|
+
value: TallyResultAmino;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Vote defines a vote on a governance proposal.
|
|
328
|
+
* A Vote consists of a proposal ID, the voter, and the vote option.
|
|
329
|
+
*/
|
|
330
|
+
export interface Vote {
|
|
331
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
332
|
+
proposalId: bigint;
|
|
333
|
+
/** voter is the voter address of the proposal. */
|
|
334
|
+
voter: string;
|
|
335
|
+
/**
|
|
336
|
+
* Deprecated: Prefer to use `options` instead. This field is set in queries
|
|
337
|
+
* if and only if `len(options) == 1` and that option has weight 1. In all
|
|
338
|
+
* other cases, this field will default to VOTE_OPTION_UNSPECIFIED.
|
|
339
|
+
*/
|
|
340
|
+
/** @deprecated */
|
|
341
|
+
option: VoteOption;
|
|
342
|
+
/**
|
|
343
|
+
* options is the weighted vote options.
|
|
344
|
+
*
|
|
345
|
+
* Since: cosmos-sdk 0.43
|
|
346
|
+
*/
|
|
347
|
+
options: WeightedVoteOption[];
|
|
348
|
+
}
|
|
349
|
+
export interface VoteProtoMsg {
|
|
350
|
+
typeUrl: "/cosmos.gov.v1beta1.Vote";
|
|
351
|
+
value: Uint8Array;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Vote defines a vote on a governance proposal.
|
|
355
|
+
* A Vote consists of a proposal ID, the voter, and the vote option.
|
|
356
|
+
*/
|
|
357
|
+
export interface VoteAmino {
|
|
358
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
359
|
+
proposal_id: string;
|
|
360
|
+
/** voter is the voter address of the proposal. */
|
|
361
|
+
voter: string;
|
|
362
|
+
/**
|
|
363
|
+
* Deprecated: Prefer to use `options` instead. This field is set in queries
|
|
364
|
+
* if and only if `len(options) == 1` and that option has weight 1. In all
|
|
365
|
+
* other cases, this field will default to VOTE_OPTION_UNSPECIFIED.
|
|
366
|
+
*/
|
|
367
|
+
/** @deprecated */
|
|
368
|
+
option: VoteOption;
|
|
369
|
+
/**
|
|
370
|
+
* options is the weighted vote options.
|
|
371
|
+
*
|
|
372
|
+
* Since: cosmos-sdk 0.43
|
|
373
|
+
*/
|
|
374
|
+
options: WeightedVoteOptionAmino[];
|
|
375
|
+
}
|
|
376
|
+
export interface VoteAminoMsg {
|
|
377
|
+
type: "cosmos-sdk/Vote";
|
|
378
|
+
value: VoteAmino;
|
|
379
|
+
}
|
|
380
|
+
/** DepositParams defines the params for deposits on governance proposals. */
|
|
381
|
+
export interface DepositParams {
|
|
382
|
+
/** Minimum deposit for a proposal to enter voting period. */
|
|
383
|
+
minDeposit: Coin[];
|
|
384
|
+
/**
|
|
385
|
+
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
386
|
+
* months.
|
|
387
|
+
*/
|
|
388
|
+
maxDepositPeriod: Duration;
|
|
389
|
+
}
|
|
390
|
+
export interface DepositParamsProtoMsg {
|
|
391
|
+
typeUrl: "/cosmos.gov.v1beta1.DepositParams";
|
|
392
|
+
value: Uint8Array;
|
|
393
|
+
}
|
|
394
|
+
/** DepositParams defines the params for deposits on governance proposals. */
|
|
395
|
+
export interface DepositParamsAmino {
|
|
396
|
+
/** Minimum deposit for a proposal to enter voting period. */
|
|
397
|
+
min_deposit: CoinAmino[];
|
|
398
|
+
/**
|
|
399
|
+
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
400
|
+
* months.
|
|
401
|
+
*/
|
|
402
|
+
max_deposit_period: DurationAmino;
|
|
403
|
+
}
|
|
404
|
+
export interface DepositParamsAminoMsg {
|
|
405
|
+
type: "cosmos-sdk/DepositParams";
|
|
406
|
+
value: DepositParamsAmino;
|
|
407
|
+
}
|
|
408
|
+
/** VotingParams defines the params for voting on governance proposals. */
|
|
409
|
+
export interface VotingParams {
|
|
410
|
+
/** Duration of the voting period. */
|
|
411
|
+
votingPeriod: Duration;
|
|
412
|
+
}
|
|
413
|
+
export interface VotingParamsProtoMsg {
|
|
414
|
+
typeUrl: "/cosmos.gov.v1beta1.VotingParams";
|
|
415
|
+
value: Uint8Array;
|
|
416
|
+
}
|
|
417
|
+
/** VotingParams defines the params for voting on governance proposals. */
|
|
418
|
+
export interface VotingParamsAmino {
|
|
419
|
+
/** Duration of the voting period. */
|
|
420
|
+
voting_period: DurationAmino;
|
|
421
|
+
}
|
|
422
|
+
export interface VotingParamsAminoMsg {
|
|
423
|
+
type: "cosmos-sdk/VotingParams";
|
|
424
|
+
value: VotingParamsAmino;
|
|
425
|
+
}
|
|
426
|
+
/** TallyParams defines the params for tallying votes on governance proposals. */
|
|
427
|
+
export interface TallyParams {
|
|
428
|
+
/**
|
|
429
|
+
* Minimum percentage of total stake needed to vote for a result to be
|
|
430
|
+
* considered valid.
|
|
431
|
+
*/
|
|
432
|
+
quorum: Uint8Array;
|
|
433
|
+
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
434
|
+
threshold: Uint8Array;
|
|
435
|
+
/**
|
|
436
|
+
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
437
|
+
* vetoed. Default value: 1/3.
|
|
438
|
+
*/
|
|
439
|
+
vetoThreshold: Uint8Array;
|
|
440
|
+
}
|
|
441
|
+
export interface TallyParamsProtoMsg {
|
|
442
|
+
typeUrl: "/cosmos.gov.v1beta1.TallyParams";
|
|
443
|
+
value: Uint8Array;
|
|
444
|
+
}
|
|
445
|
+
/** TallyParams defines the params for tallying votes on governance proposals. */
|
|
446
|
+
export interface TallyParamsAmino {
|
|
447
|
+
/**
|
|
448
|
+
* Minimum percentage of total stake needed to vote for a result to be
|
|
449
|
+
* considered valid.
|
|
450
|
+
*/
|
|
451
|
+
quorum: string;
|
|
452
|
+
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
453
|
+
threshold: string;
|
|
454
|
+
/**
|
|
455
|
+
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
456
|
+
* vetoed. Default value: 1/3.
|
|
457
|
+
*/
|
|
458
|
+
veto_threshold: string;
|
|
459
|
+
}
|
|
460
|
+
export interface TallyParamsAminoMsg {
|
|
461
|
+
type: "cosmos-sdk/TallyParams";
|
|
462
|
+
value: TallyParamsAmino;
|
|
463
|
+
}
|
|
464
|
+
function createBaseWeightedVoteOption(): WeightedVoteOption {
|
|
465
|
+
return {
|
|
466
|
+
option: 0,
|
|
467
|
+
weight: ""
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
export const WeightedVoteOption = {
|
|
471
|
+
typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption",
|
|
472
|
+
aminoType: "cosmos-sdk/WeightedVoteOption",
|
|
473
|
+
is(o: any): o is WeightedVoteOption {
|
|
474
|
+
return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string");
|
|
475
|
+
},
|
|
476
|
+
isAmino(o: any): o is WeightedVoteOptionAmino {
|
|
477
|
+
return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string");
|
|
478
|
+
},
|
|
479
|
+
encode(message: WeightedVoteOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
480
|
+
if (message.option !== 0) {
|
|
481
|
+
writer.uint32(8).int32(message.option);
|
|
482
|
+
}
|
|
483
|
+
if (message.weight !== "") {
|
|
484
|
+
writer.uint32(18).string(message.weight);
|
|
485
|
+
}
|
|
486
|
+
return writer;
|
|
487
|
+
},
|
|
488
|
+
decode(input: BinaryReader | Uint8Array, length?: number): WeightedVoteOption {
|
|
489
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
490
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
491
|
+
const message = createBaseWeightedVoteOption();
|
|
492
|
+
while (reader.pos < end) {
|
|
493
|
+
const tag = reader.uint32();
|
|
494
|
+
switch (tag >>> 3) {
|
|
495
|
+
case 1:
|
|
496
|
+
message.option = reader.int32() as any;
|
|
497
|
+
break;
|
|
498
|
+
case 2:
|
|
499
|
+
message.weight = reader.string();
|
|
500
|
+
break;
|
|
501
|
+
default:
|
|
502
|
+
reader.skipType(tag & 7);
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return message;
|
|
507
|
+
},
|
|
508
|
+
fromPartial(object: DeepPartial<WeightedVoteOption>): WeightedVoteOption {
|
|
509
|
+
const message = createBaseWeightedVoteOption();
|
|
510
|
+
message.option = object.option ?? 0;
|
|
511
|
+
message.weight = object.weight ?? "";
|
|
512
|
+
return message;
|
|
513
|
+
},
|
|
514
|
+
fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption {
|
|
515
|
+
const message = createBaseWeightedVoteOption();
|
|
516
|
+
if (object.option !== undefined && object.option !== null) {
|
|
517
|
+
message.option = object.option;
|
|
518
|
+
}
|
|
519
|
+
if (object.weight !== undefined && object.weight !== null) {
|
|
520
|
+
message.weight = object.weight;
|
|
521
|
+
}
|
|
522
|
+
return message;
|
|
523
|
+
},
|
|
524
|
+
toAmino(message: WeightedVoteOption): WeightedVoteOptionAmino {
|
|
525
|
+
const obj: any = {};
|
|
526
|
+
obj.option = message.option === 0 ? undefined : message.option;
|
|
527
|
+
obj.weight = message.weight ?? "";
|
|
528
|
+
return obj;
|
|
529
|
+
},
|
|
530
|
+
fromAminoMsg(object: WeightedVoteOptionAminoMsg): WeightedVoteOption {
|
|
531
|
+
return WeightedVoteOption.fromAmino(object.value);
|
|
532
|
+
},
|
|
533
|
+
toAminoMsg(message: WeightedVoteOption): WeightedVoteOptionAminoMsg {
|
|
534
|
+
return {
|
|
535
|
+
type: "cosmos-sdk/WeightedVoteOption",
|
|
536
|
+
value: WeightedVoteOption.toAmino(message)
|
|
537
|
+
};
|
|
538
|
+
},
|
|
539
|
+
fromProtoMsg(message: WeightedVoteOptionProtoMsg): WeightedVoteOption {
|
|
540
|
+
return WeightedVoteOption.decode(message.value);
|
|
541
|
+
},
|
|
542
|
+
toProto(message: WeightedVoteOption): Uint8Array {
|
|
543
|
+
return WeightedVoteOption.encode(message).finish();
|
|
544
|
+
},
|
|
545
|
+
toProtoMsg(message: WeightedVoteOption): WeightedVoteOptionProtoMsg {
|
|
546
|
+
return {
|
|
547
|
+
typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption",
|
|
548
|
+
value: WeightedVoteOption.encode(message).finish()
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption);
|
|
553
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl);
|
|
554
|
+
function createBaseTextProposal(): TextProposal {
|
|
555
|
+
return {
|
|
556
|
+
title: "",
|
|
557
|
+
description: ""
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
export const TextProposal = {
|
|
561
|
+
typeUrl: "/cosmos.gov.v1beta1.TextProposal",
|
|
562
|
+
aminoType: "cosmos-sdk/TextProposal",
|
|
563
|
+
is(o: any): o is TextProposal {
|
|
564
|
+
return o && (o.$typeUrl === TextProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string");
|
|
565
|
+
},
|
|
566
|
+
isAmino(o: any): o is TextProposalAmino {
|
|
567
|
+
return o && (o.$typeUrl === TextProposal.typeUrl || typeof o.title === "string" && typeof o.description === "string");
|
|
568
|
+
},
|
|
569
|
+
encode(message: TextProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
570
|
+
if (message.title !== "") {
|
|
571
|
+
writer.uint32(10).string(message.title);
|
|
572
|
+
}
|
|
573
|
+
if (message.description !== "") {
|
|
574
|
+
writer.uint32(18).string(message.description);
|
|
575
|
+
}
|
|
576
|
+
return writer;
|
|
577
|
+
},
|
|
578
|
+
decode(input: BinaryReader | Uint8Array, length?: number): TextProposal {
|
|
579
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
580
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
581
|
+
const message = createBaseTextProposal();
|
|
582
|
+
while (reader.pos < end) {
|
|
583
|
+
const tag = reader.uint32();
|
|
584
|
+
switch (tag >>> 3) {
|
|
585
|
+
case 1:
|
|
586
|
+
message.title = reader.string();
|
|
587
|
+
break;
|
|
588
|
+
case 2:
|
|
589
|
+
message.description = reader.string();
|
|
590
|
+
break;
|
|
591
|
+
default:
|
|
592
|
+
reader.skipType(tag & 7);
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
return message;
|
|
597
|
+
},
|
|
598
|
+
fromPartial(object: DeepPartial<TextProposal>): TextProposal {
|
|
599
|
+
const message = createBaseTextProposal();
|
|
600
|
+
message.title = object.title ?? "";
|
|
601
|
+
message.description = object.description ?? "";
|
|
602
|
+
return message;
|
|
603
|
+
},
|
|
604
|
+
fromAmino(object: TextProposalAmino): TextProposal {
|
|
605
|
+
const message = createBaseTextProposal();
|
|
606
|
+
if (object.title !== undefined && object.title !== null) {
|
|
607
|
+
message.title = object.title;
|
|
608
|
+
}
|
|
609
|
+
if (object.description !== undefined && object.description !== null) {
|
|
610
|
+
message.description = object.description;
|
|
611
|
+
}
|
|
612
|
+
return message;
|
|
613
|
+
},
|
|
614
|
+
toAmino(message: TextProposal): TextProposalAmino {
|
|
615
|
+
const obj: any = {};
|
|
616
|
+
obj.title = message.title === "" ? undefined : message.title;
|
|
617
|
+
obj.description = message.description === "" ? undefined : message.description;
|
|
618
|
+
return obj;
|
|
619
|
+
},
|
|
620
|
+
fromAminoMsg(object: TextProposalAminoMsg): TextProposal {
|
|
621
|
+
return TextProposal.fromAmino(object.value);
|
|
622
|
+
},
|
|
623
|
+
toAminoMsg(message: TextProposal): TextProposalAminoMsg {
|
|
624
|
+
return {
|
|
625
|
+
type: "cosmos-sdk/TextProposal",
|
|
626
|
+
value: TextProposal.toAmino(message)
|
|
627
|
+
};
|
|
628
|
+
},
|
|
629
|
+
fromProtoMsg(message: TextProposalProtoMsg): TextProposal {
|
|
630
|
+
return TextProposal.decode(message.value);
|
|
631
|
+
},
|
|
632
|
+
toProto(message: TextProposal): Uint8Array {
|
|
633
|
+
return TextProposal.encode(message).finish();
|
|
634
|
+
},
|
|
635
|
+
toProtoMsg(message: TextProposal): TextProposalProtoMsg {
|
|
636
|
+
return {
|
|
637
|
+
typeUrl: "/cosmos.gov.v1beta1.TextProposal",
|
|
638
|
+
value: TextProposal.encode(message).finish()
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
GlobalDecoderRegistry.register(TextProposal.typeUrl, TextProposal);
|
|
643
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(TextProposal.aminoType, TextProposal.typeUrl);
|
|
644
|
+
function createBaseDeposit(): Deposit {
|
|
645
|
+
return {
|
|
646
|
+
proposalId: BigInt(0),
|
|
647
|
+
depositor: "",
|
|
648
|
+
amount: []
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
export const Deposit = {
|
|
652
|
+
typeUrl: "/cosmos.gov.v1beta1.Deposit",
|
|
653
|
+
aminoType: "cosmos-sdk/Deposit",
|
|
654
|
+
is(o: any): o is Deposit {
|
|
655
|
+
return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposalId === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])));
|
|
656
|
+
},
|
|
657
|
+
isAmino(o: any): o is DepositAmino {
|
|
658
|
+
return o && (o.$typeUrl === Deposit.typeUrl || typeof o.proposal_id === "bigint" && typeof o.depositor === "string" && Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])));
|
|
659
|
+
},
|
|
660
|
+
encode(message: Deposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
661
|
+
if (message.proposalId !== BigInt(0)) {
|
|
662
|
+
writer.uint32(8).uint64(message.proposalId);
|
|
663
|
+
}
|
|
664
|
+
if (message.depositor !== "") {
|
|
665
|
+
writer.uint32(18).string(message.depositor);
|
|
666
|
+
}
|
|
667
|
+
for (const v of message.amount) {
|
|
668
|
+
Coin.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
669
|
+
}
|
|
670
|
+
return writer;
|
|
671
|
+
},
|
|
672
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Deposit {
|
|
673
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
674
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
675
|
+
const message = createBaseDeposit();
|
|
676
|
+
while (reader.pos < end) {
|
|
677
|
+
const tag = reader.uint32();
|
|
678
|
+
switch (tag >>> 3) {
|
|
679
|
+
case 1:
|
|
680
|
+
message.proposalId = reader.uint64();
|
|
681
|
+
break;
|
|
682
|
+
case 2:
|
|
683
|
+
message.depositor = reader.string();
|
|
684
|
+
break;
|
|
685
|
+
case 3:
|
|
686
|
+
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
687
|
+
break;
|
|
688
|
+
default:
|
|
689
|
+
reader.skipType(tag & 7);
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
return message;
|
|
694
|
+
},
|
|
695
|
+
fromPartial(object: DeepPartial<Deposit>): Deposit {
|
|
696
|
+
const message = createBaseDeposit();
|
|
697
|
+
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
698
|
+
message.depositor = object.depositor ?? "";
|
|
699
|
+
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
|
|
700
|
+
return message;
|
|
701
|
+
},
|
|
702
|
+
fromAmino(object: DepositAmino): Deposit {
|
|
703
|
+
const message = createBaseDeposit();
|
|
704
|
+
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
705
|
+
message.proposalId = BigInt(object.proposal_id);
|
|
706
|
+
}
|
|
707
|
+
if (object.depositor !== undefined && object.depositor !== null) {
|
|
708
|
+
message.depositor = object.depositor;
|
|
709
|
+
}
|
|
710
|
+
message.amount = object.amount?.map(e => Coin.fromAmino(e)) || [];
|
|
711
|
+
return message;
|
|
712
|
+
},
|
|
713
|
+
toAmino(message: Deposit): DepositAmino {
|
|
714
|
+
const obj: any = {};
|
|
715
|
+
obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
|
|
716
|
+
obj.depositor = message.depositor === "" ? undefined : message.depositor;
|
|
717
|
+
if (message.amount) {
|
|
718
|
+
obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined);
|
|
719
|
+
} else {
|
|
720
|
+
obj.amount = message.amount;
|
|
721
|
+
}
|
|
722
|
+
return obj;
|
|
723
|
+
},
|
|
724
|
+
fromAminoMsg(object: DepositAminoMsg): Deposit {
|
|
725
|
+
return Deposit.fromAmino(object.value);
|
|
726
|
+
},
|
|
727
|
+
toAminoMsg(message: Deposit): DepositAminoMsg {
|
|
728
|
+
return {
|
|
729
|
+
type: "cosmos-sdk/Deposit",
|
|
730
|
+
value: Deposit.toAmino(message)
|
|
731
|
+
};
|
|
732
|
+
},
|
|
733
|
+
fromProtoMsg(message: DepositProtoMsg): Deposit {
|
|
734
|
+
return Deposit.decode(message.value);
|
|
735
|
+
},
|
|
736
|
+
toProto(message: Deposit): Uint8Array {
|
|
737
|
+
return Deposit.encode(message).finish();
|
|
738
|
+
},
|
|
739
|
+
toProtoMsg(message: Deposit): DepositProtoMsg {
|
|
740
|
+
return {
|
|
741
|
+
typeUrl: "/cosmos.gov.v1beta1.Deposit",
|
|
742
|
+
value: Deposit.encode(message).finish()
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit);
|
|
747
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl);
|
|
748
|
+
function createBaseProposal(): Proposal {
|
|
749
|
+
return {
|
|
750
|
+
proposalId: BigInt(0),
|
|
751
|
+
content: undefined,
|
|
752
|
+
status: 0,
|
|
753
|
+
finalTallyResult: TallyResult.fromPartial({}),
|
|
754
|
+
submitTime: new Date(),
|
|
755
|
+
depositEndTime: new Date(),
|
|
756
|
+
totalDeposit: [],
|
|
757
|
+
votingStartTime: new Date(),
|
|
758
|
+
votingEndTime: new Date()
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
export const Proposal = {
|
|
762
|
+
typeUrl: "/cosmos.gov.v1beta1.Proposal",
|
|
763
|
+
aminoType: "cosmos-sdk/Proposal",
|
|
764
|
+
is(o: any): o is Proposal {
|
|
765
|
+
return o && (o.$typeUrl === Proposal.typeUrl || typeof o.proposalId === "bigint" && isSet(o.status) && TallyResult.is(o.finalTallyResult) && Timestamp.is(o.submitTime) && Timestamp.is(o.depositEndTime) && Array.isArray(o.totalDeposit) && (!o.totalDeposit.length || Coin.is(o.totalDeposit[0])) && Timestamp.is(o.votingStartTime) && Timestamp.is(o.votingEndTime));
|
|
766
|
+
},
|
|
767
|
+
isAmino(o: any): o is ProposalAmino {
|
|
768
|
+
return o && (o.$typeUrl === Proposal.typeUrl || typeof o.proposal_id === "bigint" && isSet(o.status) && TallyResult.isAmino(o.final_tally_result) && Timestamp.isAmino(o.submit_time) && Timestamp.isAmino(o.deposit_end_time) && Array.isArray(o.total_deposit) && (!o.total_deposit.length || Coin.isAmino(o.total_deposit[0])) && Timestamp.isAmino(o.voting_start_time) && Timestamp.isAmino(o.voting_end_time));
|
|
769
|
+
},
|
|
770
|
+
encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
771
|
+
if (message.proposalId !== BigInt(0)) {
|
|
772
|
+
writer.uint32(8).uint64(message.proposalId);
|
|
773
|
+
}
|
|
774
|
+
if (message.content !== undefined) {
|
|
775
|
+
Any.encode(GlobalDecoderRegistry.wrapAny(message.content), writer.uint32(18).fork()).ldelim();
|
|
776
|
+
}
|
|
777
|
+
if (message.status !== 0) {
|
|
778
|
+
writer.uint32(24).int32(message.status);
|
|
779
|
+
}
|
|
780
|
+
if (message.finalTallyResult !== undefined) {
|
|
781
|
+
TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim();
|
|
782
|
+
}
|
|
783
|
+
if (message.submitTime !== undefined) {
|
|
784
|
+
Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim();
|
|
785
|
+
}
|
|
786
|
+
if (message.depositEndTime !== undefined) {
|
|
787
|
+
Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim();
|
|
788
|
+
}
|
|
789
|
+
for (const v of message.totalDeposit) {
|
|
790
|
+
Coin.encode(v!, writer.uint32(58).fork()).ldelim();
|
|
791
|
+
}
|
|
792
|
+
if (message.votingStartTime !== undefined) {
|
|
793
|
+
Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim();
|
|
794
|
+
}
|
|
795
|
+
if (message.votingEndTime !== undefined) {
|
|
796
|
+
Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim();
|
|
797
|
+
}
|
|
798
|
+
return writer;
|
|
799
|
+
},
|
|
800
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Proposal {
|
|
801
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
802
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
803
|
+
const message = createBaseProposal();
|
|
804
|
+
while (reader.pos < end) {
|
|
805
|
+
const tag = reader.uint32();
|
|
806
|
+
switch (tag >>> 3) {
|
|
807
|
+
case 1:
|
|
808
|
+
message.proposalId = reader.uint64();
|
|
809
|
+
break;
|
|
810
|
+
case 2:
|
|
811
|
+
message.content = GlobalDecoderRegistry.unwrapAny(reader);
|
|
812
|
+
break;
|
|
813
|
+
case 3:
|
|
814
|
+
message.status = reader.int32() as any;
|
|
815
|
+
break;
|
|
816
|
+
case 4:
|
|
817
|
+
message.finalTallyResult = TallyResult.decode(reader, reader.uint32());
|
|
818
|
+
break;
|
|
819
|
+
case 5:
|
|
820
|
+
message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
821
|
+
break;
|
|
822
|
+
case 6:
|
|
823
|
+
message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
824
|
+
break;
|
|
825
|
+
case 7:
|
|
826
|
+
message.totalDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
827
|
+
break;
|
|
828
|
+
case 8:
|
|
829
|
+
message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
830
|
+
break;
|
|
831
|
+
case 9:
|
|
832
|
+
message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
833
|
+
break;
|
|
834
|
+
default:
|
|
835
|
+
reader.skipType(tag & 7);
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
return message;
|
|
840
|
+
},
|
|
841
|
+
fromPartial(object: DeepPartial<Proposal>): Proposal {
|
|
842
|
+
const message = createBaseProposal();
|
|
843
|
+
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
844
|
+
message.content = object.content !== undefined && object.content !== null ? GlobalDecoderRegistry.fromPartial(object.content) : undefined;
|
|
845
|
+
message.status = object.status ?? 0;
|
|
846
|
+
message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? TallyResult.fromPartial(object.finalTallyResult) : undefined;
|
|
847
|
+
message.submitTime = object.submitTime ?? undefined;
|
|
848
|
+
message.depositEndTime = object.depositEndTime ?? undefined;
|
|
849
|
+
message.totalDeposit = object.totalDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
850
|
+
message.votingStartTime = object.votingStartTime ?? undefined;
|
|
851
|
+
message.votingEndTime = object.votingEndTime ?? undefined;
|
|
852
|
+
return message;
|
|
853
|
+
},
|
|
854
|
+
fromAmino(object: ProposalAmino): Proposal {
|
|
855
|
+
const message = createBaseProposal();
|
|
856
|
+
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
857
|
+
message.proposalId = BigInt(object.proposal_id);
|
|
858
|
+
}
|
|
859
|
+
if (object.content !== undefined && object.content !== null) {
|
|
860
|
+
message.content = GlobalDecoderRegistry.fromAminoMsg(object.content);
|
|
861
|
+
}
|
|
862
|
+
if (object.status !== undefined && object.status !== null) {
|
|
863
|
+
message.status = object.status;
|
|
864
|
+
}
|
|
865
|
+
if (object.final_tally_result !== undefined && object.final_tally_result !== null) {
|
|
866
|
+
message.finalTallyResult = TallyResult.fromAmino(object.final_tally_result);
|
|
867
|
+
}
|
|
868
|
+
if (object.submit_time !== undefined && object.submit_time !== null) {
|
|
869
|
+
message.submitTime = fromTimestamp(Timestamp.fromAmino(object.submit_time));
|
|
870
|
+
}
|
|
871
|
+
if (object.deposit_end_time !== undefined && object.deposit_end_time !== null) {
|
|
872
|
+
message.depositEndTime = fromTimestamp(Timestamp.fromAmino(object.deposit_end_time));
|
|
873
|
+
}
|
|
874
|
+
message.totalDeposit = object.total_deposit?.map(e => Coin.fromAmino(e)) || [];
|
|
875
|
+
if (object.voting_start_time !== undefined && object.voting_start_time !== null) {
|
|
876
|
+
message.votingStartTime = fromTimestamp(Timestamp.fromAmino(object.voting_start_time));
|
|
877
|
+
}
|
|
878
|
+
if (object.voting_end_time !== undefined && object.voting_end_time !== null) {
|
|
879
|
+
message.votingEndTime = fromTimestamp(Timestamp.fromAmino(object.voting_end_time));
|
|
880
|
+
}
|
|
881
|
+
return message;
|
|
882
|
+
},
|
|
883
|
+
toAmino(message: Proposal): ProposalAmino {
|
|
884
|
+
const obj: any = {};
|
|
885
|
+
obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
|
|
886
|
+
obj.content = message.content ? GlobalDecoderRegistry.toAminoMsg(message.content) : undefined;
|
|
887
|
+
obj.status = message.status === 0 ? undefined : message.status;
|
|
888
|
+
obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult) : TallyResult.toAmino(TallyResult.fromPartial({}));
|
|
889
|
+
obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : new Date();
|
|
890
|
+
obj.deposit_end_time = message.depositEndTime ? Timestamp.toAmino(toTimestamp(message.depositEndTime)) : new Date();
|
|
891
|
+
if (message.totalDeposit) {
|
|
892
|
+
obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
893
|
+
} else {
|
|
894
|
+
obj.total_deposit = message.totalDeposit;
|
|
895
|
+
}
|
|
896
|
+
obj.voting_start_time = message.votingStartTime ? Timestamp.toAmino(toTimestamp(message.votingStartTime)) : new Date();
|
|
897
|
+
obj.voting_end_time = message.votingEndTime ? Timestamp.toAmino(toTimestamp(message.votingEndTime)) : new Date();
|
|
898
|
+
return obj;
|
|
899
|
+
},
|
|
900
|
+
fromAminoMsg(object: ProposalAminoMsg): Proposal {
|
|
901
|
+
return Proposal.fromAmino(object.value);
|
|
902
|
+
},
|
|
903
|
+
toAminoMsg(message: Proposal): ProposalAminoMsg {
|
|
904
|
+
return {
|
|
905
|
+
type: "cosmos-sdk/Proposal",
|
|
906
|
+
value: Proposal.toAmino(message)
|
|
907
|
+
};
|
|
908
|
+
},
|
|
909
|
+
fromProtoMsg(message: ProposalProtoMsg): Proposal {
|
|
910
|
+
return Proposal.decode(message.value);
|
|
911
|
+
},
|
|
912
|
+
toProto(message: Proposal): Uint8Array {
|
|
913
|
+
return Proposal.encode(message).finish();
|
|
914
|
+
},
|
|
915
|
+
toProtoMsg(message: Proposal): ProposalProtoMsg {
|
|
916
|
+
return {
|
|
917
|
+
typeUrl: "/cosmos.gov.v1beta1.Proposal",
|
|
918
|
+
value: Proposal.encode(message).finish()
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
};
|
|
922
|
+
GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal);
|
|
923
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl);
|
|
924
|
+
function createBaseTallyResult(): TallyResult {
|
|
925
|
+
return {
|
|
926
|
+
yes: "",
|
|
927
|
+
abstain: "",
|
|
928
|
+
no: "",
|
|
929
|
+
noWithVeto: ""
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
export const TallyResult = {
|
|
933
|
+
typeUrl: "/cosmos.gov.v1beta1.TallyResult",
|
|
934
|
+
aminoType: "cosmos-sdk/TallyResult",
|
|
935
|
+
is(o: any): o is TallyResult {
|
|
936
|
+
return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes === "string" && typeof o.abstain === "string" && typeof o.no === "string" && typeof o.noWithVeto === "string");
|
|
937
|
+
},
|
|
938
|
+
isAmino(o: any): o is TallyResultAmino {
|
|
939
|
+
return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes === "string" && typeof o.abstain === "string" && typeof o.no === "string" && typeof o.no_with_veto === "string");
|
|
940
|
+
},
|
|
941
|
+
encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
942
|
+
if (message.yes !== "") {
|
|
943
|
+
writer.uint32(10).string(message.yes);
|
|
944
|
+
}
|
|
945
|
+
if (message.abstain !== "") {
|
|
946
|
+
writer.uint32(18).string(message.abstain);
|
|
947
|
+
}
|
|
948
|
+
if (message.no !== "") {
|
|
949
|
+
writer.uint32(26).string(message.no);
|
|
950
|
+
}
|
|
951
|
+
if (message.noWithVeto !== "") {
|
|
952
|
+
writer.uint32(34).string(message.noWithVeto);
|
|
953
|
+
}
|
|
954
|
+
return writer;
|
|
955
|
+
},
|
|
956
|
+
decode(input: BinaryReader | Uint8Array, length?: number): TallyResult {
|
|
957
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
958
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
959
|
+
const message = createBaseTallyResult();
|
|
960
|
+
while (reader.pos < end) {
|
|
961
|
+
const tag = reader.uint32();
|
|
962
|
+
switch (tag >>> 3) {
|
|
963
|
+
case 1:
|
|
964
|
+
message.yes = reader.string();
|
|
965
|
+
break;
|
|
966
|
+
case 2:
|
|
967
|
+
message.abstain = reader.string();
|
|
968
|
+
break;
|
|
969
|
+
case 3:
|
|
970
|
+
message.no = reader.string();
|
|
971
|
+
break;
|
|
972
|
+
case 4:
|
|
973
|
+
message.noWithVeto = reader.string();
|
|
974
|
+
break;
|
|
975
|
+
default:
|
|
976
|
+
reader.skipType(tag & 7);
|
|
977
|
+
break;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
return message;
|
|
981
|
+
},
|
|
982
|
+
fromPartial(object: DeepPartial<TallyResult>): TallyResult {
|
|
983
|
+
const message = createBaseTallyResult();
|
|
984
|
+
message.yes = object.yes ?? "";
|
|
985
|
+
message.abstain = object.abstain ?? "";
|
|
986
|
+
message.no = object.no ?? "";
|
|
987
|
+
message.noWithVeto = object.noWithVeto ?? "";
|
|
988
|
+
return message;
|
|
989
|
+
},
|
|
990
|
+
fromAmino(object: TallyResultAmino): TallyResult {
|
|
991
|
+
const message = createBaseTallyResult();
|
|
992
|
+
if (object.yes !== undefined && object.yes !== null) {
|
|
993
|
+
message.yes = object.yes;
|
|
994
|
+
}
|
|
995
|
+
if (object.abstain !== undefined && object.abstain !== null) {
|
|
996
|
+
message.abstain = object.abstain;
|
|
997
|
+
}
|
|
998
|
+
if (object.no !== undefined && object.no !== null) {
|
|
999
|
+
message.no = object.no;
|
|
1000
|
+
}
|
|
1001
|
+
if (object.no_with_veto !== undefined && object.no_with_veto !== null) {
|
|
1002
|
+
message.noWithVeto = object.no_with_veto;
|
|
1003
|
+
}
|
|
1004
|
+
return message;
|
|
1005
|
+
},
|
|
1006
|
+
toAmino(message: TallyResult): TallyResultAmino {
|
|
1007
|
+
const obj: any = {};
|
|
1008
|
+
obj.yes = message.yes === "" ? undefined : message.yes;
|
|
1009
|
+
obj.abstain = message.abstain === "" ? undefined : message.abstain;
|
|
1010
|
+
obj.no = message.no === "" ? undefined : message.no;
|
|
1011
|
+
obj.no_with_veto = message.noWithVeto === "" ? undefined : message.noWithVeto;
|
|
1012
|
+
return obj;
|
|
1013
|
+
},
|
|
1014
|
+
fromAminoMsg(object: TallyResultAminoMsg): TallyResult {
|
|
1015
|
+
return TallyResult.fromAmino(object.value);
|
|
1016
|
+
},
|
|
1017
|
+
toAminoMsg(message: TallyResult): TallyResultAminoMsg {
|
|
1018
|
+
return {
|
|
1019
|
+
type: "cosmos-sdk/TallyResult",
|
|
1020
|
+
value: TallyResult.toAmino(message)
|
|
1021
|
+
};
|
|
1022
|
+
},
|
|
1023
|
+
fromProtoMsg(message: TallyResultProtoMsg): TallyResult {
|
|
1024
|
+
return TallyResult.decode(message.value);
|
|
1025
|
+
},
|
|
1026
|
+
toProto(message: TallyResult): Uint8Array {
|
|
1027
|
+
return TallyResult.encode(message).finish();
|
|
1028
|
+
},
|
|
1029
|
+
toProtoMsg(message: TallyResult): TallyResultProtoMsg {
|
|
1030
|
+
return {
|
|
1031
|
+
typeUrl: "/cosmos.gov.v1beta1.TallyResult",
|
|
1032
|
+
value: TallyResult.encode(message).finish()
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult);
|
|
1037
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl);
|
|
1038
|
+
function createBaseVote(): Vote {
|
|
1039
|
+
return {
|
|
1040
|
+
proposalId: BigInt(0),
|
|
1041
|
+
voter: "",
|
|
1042
|
+
option: 0,
|
|
1043
|
+
options: []
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
export const Vote = {
|
|
1047
|
+
typeUrl: "/cosmos.gov.v1beta1.Vote",
|
|
1048
|
+
aminoType: "cosmos-sdk/Vote",
|
|
1049
|
+
is(o: any): o is Vote {
|
|
1050
|
+
return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && isSet(o.option) && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0])));
|
|
1051
|
+
},
|
|
1052
|
+
isAmino(o: any): o is VoteAmino {
|
|
1053
|
+
return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && isSet(o.option) && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0])));
|
|
1054
|
+
},
|
|
1055
|
+
encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1056
|
+
if (message.proposalId !== BigInt(0)) {
|
|
1057
|
+
writer.uint32(8).uint64(message.proposalId);
|
|
1058
|
+
}
|
|
1059
|
+
if (message.voter !== "") {
|
|
1060
|
+
writer.uint32(18).string(message.voter);
|
|
1061
|
+
}
|
|
1062
|
+
if (message.option !== 0) {
|
|
1063
|
+
writer.uint32(24).int32(message.option);
|
|
1064
|
+
}
|
|
1065
|
+
for (const v of message.options) {
|
|
1066
|
+
WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
1067
|
+
}
|
|
1068
|
+
return writer;
|
|
1069
|
+
},
|
|
1070
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Vote {
|
|
1071
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1072
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1073
|
+
const message = createBaseVote();
|
|
1074
|
+
while (reader.pos < end) {
|
|
1075
|
+
const tag = reader.uint32();
|
|
1076
|
+
switch (tag >>> 3) {
|
|
1077
|
+
case 1:
|
|
1078
|
+
message.proposalId = reader.uint64();
|
|
1079
|
+
break;
|
|
1080
|
+
case 2:
|
|
1081
|
+
message.voter = reader.string();
|
|
1082
|
+
break;
|
|
1083
|
+
case 3:
|
|
1084
|
+
message.option = reader.int32() as any;
|
|
1085
|
+
break;
|
|
1086
|
+
case 4:
|
|
1087
|
+
message.options.push(WeightedVoteOption.decode(reader, reader.uint32()));
|
|
1088
|
+
break;
|
|
1089
|
+
default:
|
|
1090
|
+
reader.skipType(tag & 7);
|
|
1091
|
+
break;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
return message;
|
|
1095
|
+
},
|
|
1096
|
+
fromPartial(object: DeepPartial<Vote>): Vote {
|
|
1097
|
+
const message = createBaseVote();
|
|
1098
|
+
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
1099
|
+
message.voter = object.voter ?? "";
|
|
1100
|
+
message.option = object.option ?? 0;
|
|
1101
|
+
message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || [];
|
|
1102
|
+
return message;
|
|
1103
|
+
},
|
|
1104
|
+
fromAmino(object: VoteAmino): Vote {
|
|
1105
|
+
const message = createBaseVote();
|
|
1106
|
+
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
1107
|
+
message.proposalId = BigInt(object.proposal_id);
|
|
1108
|
+
}
|
|
1109
|
+
if (object.voter !== undefined && object.voter !== null) {
|
|
1110
|
+
message.voter = object.voter;
|
|
1111
|
+
}
|
|
1112
|
+
if (object.option !== undefined && object.option !== null) {
|
|
1113
|
+
message.option = object.option;
|
|
1114
|
+
}
|
|
1115
|
+
message.options = object.options?.map(e => WeightedVoteOption.fromAmino(e)) || [];
|
|
1116
|
+
return message;
|
|
1117
|
+
},
|
|
1118
|
+
toAmino(message: Vote): VoteAmino {
|
|
1119
|
+
const obj: any = {};
|
|
1120
|
+
obj.proposal_id = message.proposalId ? message.proposalId?.toString() : "0";
|
|
1121
|
+
obj.voter = message.voter === "" ? undefined : message.voter;
|
|
1122
|
+
obj.option = message.option === 0 ? undefined : message.option;
|
|
1123
|
+
if (message.options) {
|
|
1124
|
+
obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined);
|
|
1125
|
+
} else {
|
|
1126
|
+
obj.options = message.options;
|
|
1127
|
+
}
|
|
1128
|
+
return obj;
|
|
1129
|
+
},
|
|
1130
|
+
fromAminoMsg(object: VoteAminoMsg): Vote {
|
|
1131
|
+
return Vote.fromAmino(object.value);
|
|
1132
|
+
},
|
|
1133
|
+
toAminoMsg(message: Vote): VoteAminoMsg {
|
|
1134
|
+
return {
|
|
1135
|
+
type: "cosmos-sdk/Vote",
|
|
1136
|
+
value: Vote.toAmino(message)
|
|
1137
|
+
};
|
|
1138
|
+
},
|
|
1139
|
+
fromProtoMsg(message: VoteProtoMsg): Vote {
|
|
1140
|
+
return Vote.decode(message.value);
|
|
1141
|
+
},
|
|
1142
|
+
toProto(message: Vote): Uint8Array {
|
|
1143
|
+
return Vote.encode(message).finish();
|
|
1144
|
+
},
|
|
1145
|
+
toProtoMsg(message: Vote): VoteProtoMsg {
|
|
1146
|
+
return {
|
|
1147
|
+
typeUrl: "/cosmos.gov.v1beta1.Vote",
|
|
1148
|
+
value: Vote.encode(message).finish()
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
1152
|
+
GlobalDecoderRegistry.register(Vote.typeUrl, Vote);
|
|
1153
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl);
|
|
1154
|
+
function createBaseDepositParams(): DepositParams {
|
|
1155
|
+
return {
|
|
1156
|
+
minDeposit: [],
|
|
1157
|
+
maxDepositPeriod: Duration.fromPartial({})
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
export const DepositParams = {
|
|
1161
|
+
typeUrl: "/cosmos.gov.v1beta1.DepositParams",
|
|
1162
|
+
aminoType: "cosmos-sdk/DepositParams",
|
|
1163
|
+
is(o: any): o is DepositParams {
|
|
1164
|
+
return o && (o.$typeUrl === DepositParams.typeUrl || Array.isArray(o.minDeposit) && (!o.minDeposit.length || Coin.is(o.minDeposit[0])) && Duration.is(o.maxDepositPeriod));
|
|
1165
|
+
},
|
|
1166
|
+
isAmino(o: any): o is DepositParamsAmino {
|
|
1167
|
+
return o && (o.$typeUrl === DepositParams.typeUrl || Array.isArray(o.min_deposit) && (!o.min_deposit.length || Coin.isAmino(o.min_deposit[0])) && Duration.isAmino(o.max_deposit_period));
|
|
1168
|
+
},
|
|
1169
|
+
encode(message: DepositParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1170
|
+
for (const v of message.minDeposit) {
|
|
1171
|
+
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1172
|
+
}
|
|
1173
|
+
if (message.maxDepositPeriod !== undefined) {
|
|
1174
|
+
Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim();
|
|
1175
|
+
}
|
|
1176
|
+
return writer;
|
|
1177
|
+
},
|
|
1178
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DepositParams {
|
|
1179
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1180
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1181
|
+
const message = createBaseDepositParams();
|
|
1182
|
+
while (reader.pos < end) {
|
|
1183
|
+
const tag = reader.uint32();
|
|
1184
|
+
switch (tag >>> 3) {
|
|
1185
|
+
case 1:
|
|
1186
|
+
message.minDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
1187
|
+
break;
|
|
1188
|
+
case 2:
|
|
1189
|
+
message.maxDepositPeriod = Duration.decode(reader, reader.uint32());
|
|
1190
|
+
break;
|
|
1191
|
+
default:
|
|
1192
|
+
reader.skipType(tag & 7);
|
|
1193
|
+
break;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
return message;
|
|
1197
|
+
},
|
|
1198
|
+
fromPartial(object: DeepPartial<DepositParams>): DepositParams {
|
|
1199
|
+
const message = createBaseDepositParams();
|
|
1200
|
+
message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
1201
|
+
message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? Duration.fromPartial(object.maxDepositPeriod) : undefined;
|
|
1202
|
+
return message;
|
|
1203
|
+
},
|
|
1204
|
+
fromAmino(object: DepositParamsAmino): DepositParams {
|
|
1205
|
+
const message = createBaseDepositParams();
|
|
1206
|
+
message.minDeposit = object.min_deposit?.map(e => Coin.fromAmino(e)) || [];
|
|
1207
|
+
if (object.max_deposit_period !== undefined && object.max_deposit_period !== null) {
|
|
1208
|
+
message.maxDepositPeriod = Duration.fromAmino(object.max_deposit_period);
|
|
1209
|
+
}
|
|
1210
|
+
return message;
|
|
1211
|
+
},
|
|
1212
|
+
toAmino(message: DepositParams): DepositParamsAmino {
|
|
1213
|
+
const obj: any = {};
|
|
1214
|
+
if (message.minDeposit) {
|
|
1215
|
+
obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
1216
|
+
} else {
|
|
1217
|
+
obj.min_deposit = message.minDeposit;
|
|
1218
|
+
}
|
|
1219
|
+
obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod) : undefined;
|
|
1220
|
+
return obj;
|
|
1221
|
+
},
|
|
1222
|
+
fromAminoMsg(object: DepositParamsAminoMsg): DepositParams {
|
|
1223
|
+
return DepositParams.fromAmino(object.value);
|
|
1224
|
+
},
|
|
1225
|
+
toAminoMsg(message: DepositParams): DepositParamsAminoMsg {
|
|
1226
|
+
return {
|
|
1227
|
+
type: "cosmos-sdk/DepositParams",
|
|
1228
|
+
value: DepositParams.toAmino(message)
|
|
1229
|
+
};
|
|
1230
|
+
},
|
|
1231
|
+
fromProtoMsg(message: DepositParamsProtoMsg): DepositParams {
|
|
1232
|
+
return DepositParams.decode(message.value);
|
|
1233
|
+
},
|
|
1234
|
+
toProto(message: DepositParams): Uint8Array {
|
|
1235
|
+
return DepositParams.encode(message).finish();
|
|
1236
|
+
},
|
|
1237
|
+
toProtoMsg(message: DepositParams): DepositParamsProtoMsg {
|
|
1238
|
+
return {
|
|
1239
|
+
typeUrl: "/cosmos.gov.v1beta1.DepositParams",
|
|
1240
|
+
value: DepositParams.encode(message).finish()
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
};
|
|
1244
|
+
GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams);
|
|
1245
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl);
|
|
1246
|
+
function createBaseVotingParams(): VotingParams {
|
|
1247
|
+
return {
|
|
1248
|
+
votingPeriod: Duration.fromPartial({})
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
export const VotingParams = {
|
|
1252
|
+
typeUrl: "/cosmos.gov.v1beta1.VotingParams",
|
|
1253
|
+
aminoType: "cosmos-sdk/VotingParams",
|
|
1254
|
+
is(o: any): o is VotingParams {
|
|
1255
|
+
return o && (o.$typeUrl === VotingParams.typeUrl || Duration.is(o.votingPeriod));
|
|
1256
|
+
},
|
|
1257
|
+
isAmino(o: any): o is VotingParamsAmino {
|
|
1258
|
+
return o && (o.$typeUrl === VotingParams.typeUrl || Duration.isAmino(o.voting_period));
|
|
1259
|
+
},
|
|
1260
|
+
encode(message: VotingParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1261
|
+
if (message.votingPeriod !== undefined) {
|
|
1262
|
+
Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim();
|
|
1263
|
+
}
|
|
1264
|
+
return writer;
|
|
1265
|
+
},
|
|
1266
|
+
decode(input: BinaryReader | Uint8Array, length?: number): VotingParams {
|
|
1267
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1268
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1269
|
+
const message = createBaseVotingParams();
|
|
1270
|
+
while (reader.pos < end) {
|
|
1271
|
+
const tag = reader.uint32();
|
|
1272
|
+
switch (tag >>> 3) {
|
|
1273
|
+
case 1:
|
|
1274
|
+
message.votingPeriod = Duration.decode(reader, reader.uint32());
|
|
1275
|
+
break;
|
|
1276
|
+
default:
|
|
1277
|
+
reader.skipType(tag & 7);
|
|
1278
|
+
break;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
return message;
|
|
1282
|
+
},
|
|
1283
|
+
fromPartial(object: DeepPartial<VotingParams>): VotingParams {
|
|
1284
|
+
const message = createBaseVotingParams();
|
|
1285
|
+
message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined;
|
|
1286
|
+
return message;
|
|
1287
|
+
},
|
|
1288
|
+
fromAmino(object: VotingParamsAmino): VotingParams {
|
|
1289
|
+
const message = createBaseVotingParams();
|
|
1290
|
+
if (object.voting_period !== undefined && object.voting_period !== null) {
|
|
1291
|
+
message.votingPeriod = Duration.fromAmino(object.voting_period);
|
|
1292
|
+
}
|
|
1293
|
+
return message;
|
|
1294
|
+
},
|
|
1295
|
+
toAmino(message: VotingParams): VotingParamsAmino {
|
|
1296
|
+
const obj: any = {};
|
|
1297
|
+
obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined;
|
|
1298
|
+
return obj;
|
|
1299
|
+
},
|
|
1300
|
+
fromAminoMsg(object: VotingParamsAminoMsg): VotingParams {
|
|
1301
|
+
return VotingParams.fromAmino(object.value);
|
|
1302
|
+
},
|
|
1303
|
+
toAminoMsg(message: VotingParams): VotingParamsAminoMsg {
|
|
1304
|
+
return {
|
|
1305
|
+
type: "cosmos-sdk/VotingParams",
|
|
1306
|
+
value: VotingParams.toAmino(message)
|
|
1307
|
+
};
|
|
1308
|
+
},
|
|
1309
|
+
fromProtoMsg(message: VotingParamsProtoMsg): VotingParams {
|
|
1310
|
+
return VotingParams.decode(message.value);
|
|
1311
|
+
},
|
|
1312
|
+
toProto(message: VotingParams): Uint8Array {
|
|
1313
|
+
return VotingParams.encode(message).finish();
|
|
1314
|
+
},
|
|
1315
|
+
toProtoMsg(message: VotingParams): VotingParamsProtoMsg {
|
|
1316
|
+
return {
|
|
1317
|
+
typeUrl: "/cosmos.gov.v1beta1.VotingParams",
|
|
1318
|
+
value: VotingParams.encode(message).finish()
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
};
|
|
1322
|
+
GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams);
|
|
1323
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl);
|
|
1324
|
+
function createBaseTallyParams(): TallyParams {
|
|
1325
|
+
return {
|
|
1326
|
+
quorum: new Uint8Array(),
|
|
1327
|
+
threshold: new Uint8Array(),
|
|
1328
|
+
vetoThreshold: new Uint8Array()
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
export const TallyParams = {
|
|
1332
|
+
typeUrl: "/cosmos.gov.v1beta1.TallyParams",
|
|
1333
|
+
aminoType: "cosmos-sdk/TallyParams",
|
|
1334
|
+
is(o: any): o is TallyParams {
|
|
1335
|
+
return o && (o.$typeUrl === TallyParams.typeUrl || (o.quorum instanceof Uint8Array || typeof o.quorum === "string") && (o.threshold instanceof Uint8Array || typeof o.threshold === "string") && (o.vetoThreshold instanceof Uint8Array || typeof o.vetoThreshold === "string"));
|
|
1336
|
+
},
|
|
1337
|
+
isAmino(o: any): o is TallyParamsAmino {
|
|
1338
|
+
return o && (o.$typeUrl === TallyParams.typeUrl || (o.quorum instanceof Uint8Array || typeof o.quorum === "string") && (o.threshold instanceof Uint8Array || typeof o.threshold === "string") && (o.veto_threshold instanceof Uint8Array || typeof o.veto_threshold === "string"));
|
|
1339
|
+
},
|
|
1340
|
+
encode(message: TallyParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1341
|
+
if (message.quorum.length !== 0) {
|
|
1342
|
+
writer.uint32(10).bytes(message.quorum);
|
|
1343
|
+
}
|
|
1344
|
+
if (message.threshold.length !== 0) {
|
|
1345
|
+
writer.uint32(18).bytes(message.threshold);
|
|
1346
|
+
}
|
|
1347
|
+
if (message.vetoThreshold.length !== 0) {
|
|
1348
|
+
writer.uint32(26).bytes(message.vetoThreshold);
|
|
1349
|
+
}
|
|
1350
|
+
return writer;
|
|
1351
|
+
},
|
|
1352
|
+
decode(input: BinaryReader | Uint8Array, length?: number): TallyParams {
|
|
1353
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1354
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1355
|
+
const message = createBaseTallyParams();
|
|
1356
|
+
while (reader.pos < end) {
|
|
1357
|
+
const tag = reader.uint32();
|
|
1358
|
+
switch (tag >>> 3) {
|
|
1359
|
+
case 1:
|
|
1360
|
+
message.quorum = reader.bytes();
|
|
1361
|
+
break;
|
|
1362
|
+
case 2:
|
|
1363
|
+
message.threshold = reader.bytes();
|
|
1364
|
+
break;
|
|
1365
|
+
case 3:
|
|
1366
|
+
message.vetoThreshold = reader.bytes();
|
|
1367
|
+
break;
|
|
1368
|
+
default:
|
|
1369
|
+
reader.skipType(tag & 7);
|
|
1370
|
+
break;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
return message;
|
|
1374
|
+
},
|
|
1375
|
+
fromPartial(object: DeepPartial<TallyParams>): TallyParams {
|
|
1376
|
+
const message = createBaseTallyParams();
|
|
1377
|
+
message.quorum = object.quorum ?? new Uint8Array();
|
|
1378
|
+
message.threshold = object.threshold ?? new Uint8Array();
|
|
1379
|
+
message.vetoThreshold = object.vetoThreshold ?? new Uint8Array();
|
|
1380
|
+
return message;
|
|
1381
|
+
},
|
|
1382
|
+
fromAmino(object: TallyParamsAmino): TallyParams {
|
|
1383
|
+
const message = createBaseTallyParams();
|
|
1384
|
+
if (object.quorum !== undefined && object.quorum !== null) {
|
|
1385
|
+
message.quorum = bytesFromBase64(object.quorum);
|
|
1386
|
+
}
|
|
1387
|
+
if (object.threshold !== undefined && object.threshold !== null) {
|
|
1388
|
+
message.threshold = bytesFromBase64(object.threshold);
|
|
1389
|
+
}
|
|
1390
|
+
if (object.veto_threshold !== undefined && object.veto_threshold !== null) {
|
|
1391
|
+
message.vetoThreshold = bytesFromBase64(object.veto_threshold);
|
|
1392
|
+
}
|
|
1393
|
+
return message;
|
|
1394
|
+
},
|
|
1395
|
+
toAmino(message: TallyParams): TallyParamsAmino {
|
|
1396
|
+
const obj: any = {};
|
|
1397
|
+
obj.quorum = message.quorum ? base64FromBytes(message.quorum) : undefined;
|
|
1398
|
+
obj.threshold = message.threshold ? base64FromBytes(message.threshold) : undefined;
|
|
1399
|
+
obj.veto_threshold = message.vetoThreshold ? base64FromBytes(message.vetoThreshold) : undefined;
|
|
1400
|
+
return obj;
|
|
1401
|
+
},
|
|
1402
|
+
fromAminoMsg(object: TallyParamsAminoMsg): TallyParams {
|
|
1403
|
+
return TallyParams.fromAmino(object.value);
|
|
1404
|
+
},
|
|
1405
|
+
toAminoMsg(message: TallyParams): TallyParamsAminoMsg {
|
|
1406
|
+
return {
|
|
1407
|
+
type: "cosmos-sdk/TallyParams",
|
|
1408
|
+
value: TallyParams.toAmino(message)
|
|
1409
|
+
};
|
|
1410
|
+
},
|
|
1411
|
+
fromProtoMsg(message: TallyParamsProtoMsg): TallyParams {
|
|
1412
|
+
return TallyParams.decode(message.value);
|
|
1413
|
+
},
|
|
1414
|
+
toProto(message: TallyParams): Uint8Array {
|
|
1415
|
+
return TallyParams.encode(message).finish();
|
|
1416
|
+
},
|
|
1417
|
+
toProtoMsg(message: TallyParams): TallyParamsProtoMsg {
|
|
1418
|
+
return {
|
|
1419
|
+
typeUrl: "/cosmos.gov.v1beta1.TallyParams",
|
|
1420
|
+
value: TallyParams.encode(message).finish()
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
};
|
|
1424
|
+
GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams);
|
|
1425
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl);
|