@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,1843 @@
|
|
|
1
|
+
import { Coin, CoinAmino } from "../../base/v1beta1/coin";
|
|
2
|
+
import { Any, AnyAmino } from "../../../google/protobuf/any";
|
|
3
|
+
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
4
|
+
import { Duration, DurationAmino } from "../../../google/protobuf/duration";
|
|
5
|
+
import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers";
|
|
6
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
7
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
8
|
+
/** VoteOption enumerates the valid vote options for a given governance proposal. */
|
|
9
|
+
export enum VoteOption {
|
|
10
|
+
/** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
|
|
11
|
+
VOTE_OPTION_UNSPECIFIED = 0,
|
|
12
|
+
/** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
|
|
13
|
+
VOTE_OPTION_YES = 1,
|
|
14
|
+
/** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
|
|
15
|
+
VOTE_OPTION_ABSTAIN = 2,
|
|
16
|
+
/** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
|
|
17
|
+
VOTE_OPTION_NO = 3,
|
|
18
|
+
/** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
|
|
19
|
+
VOTE_OPTION_NO_WITH_VETO = 4,
|
|
20
|
+
UNRECOGNIZED = -1,
|
|
21
|
+
}
|
|
22
|
+
export const VoteOptionAmino = VoteOption;
|
|
23
|
+
export function voteOptionFromJSON(object: any): VoteOption {
|
|
24
|
+
switch (object) {
|
|
25
|
+
case 0:
|
|
26
|
+
case "VOTE_OPTION_UNSPECIFIED":
|
|
27
|
+
return VoteOption.VOTE_OPTION_UNSPECIFIED;
|
|
28
|
+
case 1:
|
|
29
|
+
case "VOTE_OPTION_YES":
|
|
30
|
+
return VoteOption.VOTE_OPTION_YES;
|
|
31
|
+
case 2:
|
|
32
|
+
case "VOTE_OPTION_ABSTAIN":
|
|
33
|
+
return VoteOption.VOTE_OPTION_ABSTAIN;
|
|
34
|
+
case 3:
|
|
35
|
+
case "VOTE_OPTION_NO":
|
|
36
|
+
return VoteOption.VOTE_OPTION_NO;
|
|
37
|
+
case 4:
|
|
38
|
+
case "VOTE_OPTION_NO_WITH_VETO":
|
|
39
|
+
return VoteOption.VOTE_OPTION_NO_WITH_VETO;
|
|
40
|
+
case -1:
|
|
41
|
+
case "UNRECOGNIZED":
|
|
42
|
+
default:
|
|
43
|
+
return VoteOption.UNRECOGNIZED;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export function voteOptionToJSON(object: VoteOption): string {
|
|
47
|
+
switch (object) {
|
|
48
|
+
case VoteOption.VOTE_OPTION_UNSPECIFIED:
|
|
49
|
+
return "VOTE_OPTION_UNSPECIFIED";
|
|
50
|
+
case VoteOption.VOTE_OPTION_YES:
|
|
51
|
+
return "VOTE_OPTION_YES";
|
|
52
|
+
case VoteOption.VOTE_OPTION_ABSTAIN:
|
|
53
|
+
return "VOTE_OPTION_ABSTAIN";
|
|
54
|
+
case VoteOption.VOTE_OPTION_NO:
|
|
55
|
+
return "VOTE_OPTION_NO";
|
|
56
|
+
case VoteOption.VOTE_OPTION_NO_WITH_VETO:
|
|
57
|
+
return "VOTE_OPTION_NO_WITH_VETO";
|
|
58
|
+
case VoteOption.UNRECOGNIZED:
|
|
59
|
+
default:
|
|
60
|
+
return "UNRECOGNIZED";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** ProposalStatus enumerates the valid statuses of a proposal. */
|
|
64
|
+
export enum ProposalStatus {
|
|
65
|
+
/** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
|
|
66
|
+
PROPOSAL_STATUS_UNSPECIFIED = 0,
|
|
67
|
+
/**
|
|
68
|
+
* PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
|
69
|
+
* period.
|
|
70
|
+
*/
|
|
71
|
+
PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,
|
|
72
|
+
/**
|
|
73
|
+
* PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
|
74
|
+
* period.
|
|
75
|
+
*/
|
|
76
|
+
PROPOSAL_STATUS_VOTING_PERIOD = 2,
|
|
77
|
+
/**
|
|
78
|
+
* PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
|
79
|
+
* passed.
|
|
80
|
+
*/
|
|
81
|
+
PROPOSAL_STATUS_PASSED = 3,
|
|
82
|
+
/**
|
|
83
|
+
* PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
|
84
|
+
* been rejected.
|
|
85
|
+
*/
|
|
86
|
+
PROPOSAL_STATUS_REJECTED = 4,
|
|
87
|
+
/**
|
|
88
|
+
* PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
|
89
|
+
* failed.
|
|
90
|
+
*/
|
|
91
|
+
PROPOSAL_STATUS_FAILED = 5,
|
|
92
|
+
UNRECOGNIZED = -1,
|
|
93
|
+
}
|
|
94
|
+
export const ProposalStatusAmino = ProposalStatus;
|
|
95
|
+
export function proposalStatusFromJSON(object: any): ProposalStatus {
|
|
96
|
+
switch (object) {
|
|
97
|
+
case 0:
|
|
98
|
+
case "PROPOSAL_STATUS_UNSPECIFIED":
|
|
99
|
+
return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
|
|
100
|
+
case 1:
|
|
101
|
+
case "PROPOSAL_STATUS_DEPOSIT_PERIOD":
|
|
102
|
+
return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;
|
|
103
|
+
case 2:
|
|
104
|
+
case "PROPOSAL_STATUS_VOTING_PERIOD":
|
|
105
|
+
return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;
|
|
106
|
+
case 3:
|
|
107
|
+
case "PROPOSAL_STATUS_PASSED":
|
|
108
|
+
return ProposalStatus.PROPOSAL_STATUS_PASSED;
|
|
109
|
+
case 4:
|
|
110
|
+
case "PROPOSAL_STATUS_REJECTED":
|
|
111
|
+
return ProposalStatus.PROPOSAL_STATUS_REJECTED;
|
|
112
|
+
case 5:
|
|
113
|
+
case "PROPOSAL_STATUS_FAILED":
|
|
114
|
+
return ProposalStatus.PROPOSAL_STATUS_FAILED;
|
|
115
|
+
case -1:
|
|
116
|
+
case "UNRECOGNIZED":
|
|
117
|
+
default:
|
|
118
|
+
return ProposalStatus.UNRECOGNIZED;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export function proposalStatusToJSON(object: ProposalStatus): string {
|
|
122
|
+
switch (object) {
|
|
123
|
+
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
|
124
|
+
return "PROPOSAL_STATUS_UNSPECIFIED";
|
|
125
|
+
case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:
|
|
126
|
+
return "PROPOSAL_STATUS_DEPOSIT_PERIOD";
|
|
127
|
+
case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:
|
|
128
|
+
return "PROPOSAL_STATUS_VOTING_PERIOD";
|
|
129
|
+
case ProposalStatus.PROPOSAL_STATUS_PASSED:
|
|
130
|
+
return "PROPOSAL_STATUS_PASSED";
|
|
131
|
+
case ProposalStatus.PROPOSAL_STATUS_REJECTED:
|
|
132
|
+
return "PROPOSAL_STATUS_REJECTED";
|
|
133
|
+
case ProposalStatus.PROPOSAL_STATUS_FAILED:
|
|
134
|
+
return "PROPOSAL_STATUS_FAILED";
|
|
135
|
+
case ProposalStatus.UNRECOGNIZED:
|
|
136
|
+
default:
|
|
137
|
+
return "UNRECOGNIZED";
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/** WeightedVoteOption defines a unit of vote for vote split. */
|
|
141
|
+
export interface WeightedVoteOption {
|
|
142
|
+
/** option defines the valid vote options, it must not contain duplicate vote options. */
|
|
143
|
+
option: VoteOption;
|
|
144
|
+
/** weight is the vote weight associated with the vote option. */
|
|
145
|
+
weight: string;
|
|
146
|
+
}
|
|
147
|
+
export interface WeightedVoteOptionProtoMsg {
|
|
148
|
+
typeUrl: "/cosmos.gov.v1.WeightedVoteOption";
|
|
149
|
+
value: Uint8Array;
|
|
150
|
+
}
|
|
151
|
+
/** WeightedVoteOption defines a unit of vote for vote split. */
|
|
152
|
+
export interface WeightedVoteOptionAmino {
|
|
153
|
+
/** option defines the valid vote options, it must not contain duplicate vote options. */
|
|
154
|
+
option: VoteOption;
|
|
155
|
+
/** weight is the vote weight associated with the vote option. */
|
|
156
|
+
weight: string;
|
|
157
|
+
}
|
|
158
|
+
export interface WeightedVoteOptionAminoMsg {
|
|
159
|
+
type: "cosmos-sdk/v1/WeightedVoteOption";
|
|
160
|
+
value: WeightedVoteOptionAmino;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Deposit defines an amount deposited by an account address to an active
|
|
164
|
+
* proposal.
|
|
165
|
+
*/
|
|
166
|
+
export interface Deposit {
|
|
167
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
168
|
+
proposalId: bigint;
|
|
169
|
+
/** depositor defines the deposit addresses from the proposals. */
|
|
170
|
+
depositor: string;
|
|
171
|
+
/** amount to be deposited by depositor. */
|
|
172
|
+
amount: Coin[];
|
|
173
|
+
}
|
|
174
|
+
export interface DepositProtoMsg {
|
|
175
|
+
typeUrl: "/cosmos.gov.v1.Deposit";
|
|
176
|
+
value: Uint8Array;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Deposit defines an amount deposited by an account address to an active
|
|
180
|
+
* proposal.
|
|
181
|
+
*/
|
|
182
|
+
export interface DepositAmino {
|
|
183
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
184
|
+
proposal_id: string;
|
|
185
|
+
/** depositor defines the deposit addresses from the proposals. */
|
|
186
|
+
depositor: string;
|
|
187
|
+
/** amount to be deposited by depositor. */
|
|
188
|
+
amount: CoinAmino[];
|
|
189
|
+
}
|
|
190
|
+
export interface DepositAminoMsg {
|
|
191
|
+
type: "cosmos-sdk/v1/Deposit";
|
|
192
|
+
value: DepositAmino;
|
|
193
|
+
}
|
|
194
|
+
/** Proposal defines the core field members of a governance proposal. */
|
|
195
|
+
export interface Proposal {
|
|
196
|
+
/** id defines the unique id of the proposal. */
|
|
197
|
+
id: bigint;
|
|
198
|
+
/** messages are the arbitrary messages to be executed if the proposal passes. */
|
|
199
|
+
messages: Any[];
|
|
200
|
+
/** status defines the proposal status. */
|
|
201
|
+
status: ProposalStatus;
|
|
202
|
+
/**
|
|
203
|
+
* final_tally_result is the final tally result of the proposal. When
|
|
204
|
+
* querying a proposal via gRPC, this field is not populated until the
|
|
205
|
+
* proposal's voting period has ended.
|
|
206
|
+
*/
|
|
207
|
+
finalTallyResult?: TallyResult;
|
|
208
|
+
/** submit_time is the time of proposal submission. */
|
|
209
|
+
submitTime?: Date;
|
|
210
|
+
/** deposit_end_time is the end time for deposition. */
|
|
211
|
+
depositEndTime?: Date;
|
|
212
|
+
/** total_deposit is the total deposit on the proposal. */
|
|
213
|
+
totalDeposit: Coin[];
|
|
214
|
+
/** voting_start_time is the starting time to vote on a proposal. */
|
|
215
|
+
votingStartTime?: Date;
|
|
216
|
+
/** voting_end_time is the end time of voting on a proposal. */
|
|
217
|
+
votingEndTime?: Date;
|
|
218
|
+
/**
|
|
219
|
+
* metadata is any arbitrary metadata attached to the proposal.
|
|
220
|
+
* the recommended format of the metadata is to be found here:
|
|
221
|
+
* https://docs.cosmos.network/v0.47/modules/gov#proposal-3
|
|
222
|
+
*/
|
|
223
|
+
metadata: string;
|
|
224
|
+
/**
|
|
225
|
+
* title is the title of the proposal
|
|
226
|
+
*
|
|
227
|
+
* Since: cosmos-sdk 0.47
|
|
228
|
+
*/
|
|
229
|
+
title: string;
|
|
230
|
+
/**
|
|
231
|
+
* summary is a short summary of the proposal
|
|
232
|
+
*
|
|
233
|
+
* Since: cosmos-sdk 0.47
|
|
234
|
+
*/
|
|
235
|
+
summary: string;
|
|
236
|
+
/**
|
|
237
|
+
* proposer is the address of the proposal sumbitter
|
|
238
|
+
*
|
|
239
|
+
* Since: cosmos-sdk 0.47
|
|
240
|
+
*/
|
|
241
|
+
proposer: string;
|
|
242
|
+
/**
|
|
243
|
+
* expedited defines if the proposal is expedited
|
|
244
|
+
*
|
|
245
|
+
* Since: cosmos-sdk 0.50
|
|
246
|
+
*/
|
|
247
|
+
expedited: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* failed_reason defines the reason why the proposal failed
|
|
250
|
+
*
|
|
251
|
+
* Since: cosmos-sdk 0.50
|
|
252
|
+
*/
|
|
253
|
+
failedReason: string;
|
|
254
|
+
}
|
|
255
|
+
export interface ProposalProtoMsg {
|
|
256
|
+
typeUrl: "/cosmos.gov.v1.Proposal";
|
|
257
|
+
value: Uint8Array;
|
|
258
|
+
}
|
|
259
|
+
/** Proposal defines the core field members of a governance proposal. */
|
|
260
|
+
export interface ProposalAmino {
|
|
261
|
+
/** id defines the unique id of the proposal. */
|
|
262
|
+
id: string;
|
|
263
|
+
/** messages are the arbitrary messages to be executed if the proposal passes. */
|
|
264
|
+
messages: AnyAmino[];
|
|
265
|
+
/** status defines the proposal status. */
|
|
266
|
+
status: ProposalStatus;
|
|
267
|
+
/**
|
|
268
|
+
* final_tally_result is the final tally result of the proposal. When
|
|
269
|
+
* querying a proposal via gRPC, this field is not populated until the
|
|
270
|
+
* proposal's voting period has ended.
|
|
271
|
+
*/
|
|
272
|
+
final_tally_result?: TallyResultAmino;
|
|
273
|
+
/** submit_time is the time of proposal submission. */
|
|
274
|
+
submit_time?: string;
|
|
275
|
+
/** deposit_end_time is the end time for deposition. */
|
|
276
|
+
deposit_end_time?: string;
|
|
277
|
+
/** total_deposit is the total deposit on the proposal. */
|
|
278
|
+
total_deposit: CoinAmino[];
|
|
279
|
+
/** voting_start_time is the starting time to vote on a proposal. */
|
|
280
|
+
voting_start_time?: string;
|
|
281
|
+
/** voting_end_time is the end time of voting on a proposal. */
|
|
282
|
+
voting_end_time?: string;
|
|
283
|
+
/**
|
|
284
|
+
* metadata is any arbitrary metadata attached to the proposal.
|
|
285
|
+
* the recommended format of the metadata is to be found here:
|
|
286
|
+
* https://docs.cosmos.network/v0.47/modules/gov#proposal-3
|
|
287
|
+
*/
|
|
288
|
+
metadata: string;
|
|
289
|
+
/**
|
|
290
|
+
* title is the title of the proposal
|
|
291
|
+
*
|
|
292
|
+
* Since: cosmos-sdk 0.47
|
|
293
|
+
*/
|
|
294
|
+
title: string;
|
|
295
|
+
/**
|
|
296
|
+
* summary is a short summary of the proposal
|
|
297
|
+
*
|
|
298
|
+
* Since: cosmos-sdk 0.47
|
|
299
|
+
*/
|
|
300
|
+
summary: string;
|
|
301
|
+
/**
|
|
302
|
+
* proposer is the address of the proposal sumbitter
|
|
303
|
+
*
|
|
304
|
+
* Since: cosmos-sdk 0.47
|
|
305
|
+
*/
|
|
306
|
+
proposer: string;
|
|
307
|
+
/**
|
|
308
|
+
* expedited defines if the proposal is expedited
|
|
309
|
+
*
|
|
310
|
+
* Since: cosmos-sdk 0.50
|
|
311
|
+
*/
|
|
312
|
+
expedited: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* failed_reason defines the reason why the proposal failed
|
|
315
|
+
*
|
|
316
|
+
* Since: cosmos-sdk 0.50
|
|
317
|
+
*/
|
|
318
|
+
failed_reason: string;
|
|
319
|
+
}
|
|
320
|
+
export interface ProposalAminoMsg {
|
|
321
|
+
type: "cosmos-sdk/v1/Proposal";
|
|
322
|
+
value: ProposalAmino;
|
|
323
|
+
}
|
|
324
|
+
/** TallyResult defines a standard tally for a governance proposal. */
|
|
325
|
+
export interface TallyResult {
|
|
326
|
+
/** yes_count is the number of yes votes on a proposal. */
|
|
327
|
+
yesCount: string;
|
|
328
|
+
/** abstain_count is the number of abstain votes on a proposal. */
|
|
329
|
+
abstainCount: string;
|
|
330
|
+
/** no_count is the number of no votes on a proposal. */
|
|
331
|
+
noCount: string;
|
|
332
|
+
/** no_with_veto_count is the number of no with veto votes on a proposal. */
|
|
333
|
+
noWithVetoCount: string;
|
|
334
|
+
}
|
|
335
|
+
export interface TallyResultProtoMsg {
|
|
336
|
+
typeUrl: "/cosmos.gov.v1.TallyResult";
|
|
337
|
+
value: Uint8Array;
|
|
338
|
+
}
|
|
339
|
+
/** TallyResult defines a standard tally for a governance proposal. */
|
|
340
|
+
export interface TallyResultAmino {
|
|
341
|
+
/** yes_count is the number of yes votes on a proposal. */
|
|
342
|
+
yes_count: string;
|
|
343
|
+
/** abstain_count is the number of abstain votes on a proposal. */
|
|
344
|
+
abstain_count: string;
|
|
345
|
+
/** no_count is the number of no votes on a proposal. */
|
|
346
|
+
no_count: string;
|
|
347
|
+
/** no_with_veto_count is the number of no with veto votes on a proposal. */
|
|
348
|
+
no_with_veto_count: string;
|
|
349
|
+
}
|
|
350
|
+
export interface TallyResultAminoMsg {
|
|
351
|
+
type: "cosmos-sdk/v1/TallyResult";
|
|
352
|
+
value: TallyResultAmino;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Vote defines a vote on a governance proposal.
|
|
356
|
+
* A Vote consists of a proposal ID, the voter, and the vote option.
|
|
357
|
+
*/
|
|
358
|
+
export interface Vote {
|
|
359
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
360
|
+
proposalId: bigint;
|
|
361
|
+
/** voter is the voter address of the proposal. */
|
|
362
|
+
voter: string;
|
|
363
|
+
/** options is the weighted vote options. */
|
|
364
|
+
options: WeightedVoteOption[];
|
|
365
|
+
/**
|
|
366
|
+
* metadata is any arbitrary metadata attached to the vote.
|
|
367
|
+
* the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5
|
|
368
|
+
*/
|
|
369
|
+
metadata: string;
|
|
370
|
+
}
|
|
371
|
+
export interface VoteProtoMsg {
|
|
372
|
+
typeUrl: "/cosmos.gov.v1.Vote";
|
|
373
|
+
value: Uint8Array;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Vote defines a vote on a governance proposal.
|
|
377
|
+
* A Vote consists of a proposal ID, the voter, and the vote option.
|
|
378
|
+
*/
|
|
379
|
+
export interface VoteAmino {
|
|
380
|
+
/** proposal_id defines the unique id of the proposal. */
|
|
381
|
+
proposal_id: string;
|
|
382
|
+
/** voter is the voter address of the proposal. */
|
|
383
|
+
voter: string;
|
|
384
|
+
/** options is the weighted vote options. */
|
|
385
|
+
options: WeightedVoteOptionAmino[];
|
|
386
|
+
/**
|
|
387
|
+
* metadata is any arbitrary metadata attached to the vote.
|
|
388
|
+
* the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5
|
|
389
|
+
*/
|
|
390
|
+
metadata: string;
|
|
391
|
+
}
|
|
392
|
+
export interface VoteAminoMsg {
|
|
393
|
+
type: "cosmos-sdk/v1/Vote";
|
|
394
|
+
value: VoteAmino;
|
|
395
|
+
}
|
|
396
|
+
/** DepositParams defines the params for deposits on governance proposals. */
|
|
397
|
+
/** @deprecated */
|
|
398
|
+
export interface DepositParams {
|
|
399
|
+
/** Minimum deposit for a proposal to enter voting period. */
|
|
400
|
+
minDeposit: Coin[];
|
|
401
|
+
/**
|
|
402
|
+
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
403
|
+
* months.
|
|
404
|
+
*/
|
|
405
|
+
maxDepositPeriod?: Duration;
|
|
406
|
+
}
|
|
407
|
+
export interface DepositParamsProtoMsg {
|
|
408
|
+
typeUrl: "/cosmos.gov.v1.DepositParams";
|
|
409
|
+
value: Uint8Array;
|
|
410
|
+
}
|
|
411
|
+
/** DepositParams defines the params for deposits on governance proposals. */
|
|
412
|
+
/** @deprecated */
|
|
413
|
+
export interface DepositParamsAmino {
|
|
414
|
+
/** Minimum deposit for a proposal to enter voting period. */
|
|
415
|
+
min_deposit: CoinAmino[];
|
|
416
|
+
/**
|
|
417
|
+
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
418
|
+
* months.
|
|
419
|
+
*/
|
|
420
|
+
max_deposit_period?: DurationAmino;
|
|
421
|
+
}
|
|
422
|
+
export interface DepositParamsAminoMsg {
|
|
423
|
+
type: "cosmos-sdk/v1/DepositParams";
|
|
424
|
+
value: DepositParamsAmino;
|
|
425
|
+
}
|
|
426
|
+
/** VotingParams defines the params for voting on governance proposals. */
|
|
427
|
+
/** @deprecated */
|
|
428
|
+
export interface VotingParams {
|
|
429
|
+
/** Duration of the voting period. */
|
|
430
|
+
votingPeriod?: Duration;
|
|
431
|
+
}
|
|
432
|
+
export interface VotingParamsProtoMsg {
|
|
433
|
+
typeUrl: "/cosmos.gov.v1.VotingParams";
|
|
434
|
+
value: Uint8Array;
|
|
435
|
+
}
|
|
436
|
+
/** VotingParams defines the params for voting on governance proposals. */
|
|
437
|
+
/** @deprecated */
|
|
438
|
+
export interface VotingParamsAmino {
|
|
439
|
+
/** Duration of the voting period. */
|
|
440
|
+
voting_period?: DurationAmino;
|
|
441
|
+
}
|
|
442
|
+
export interface VotingParamsAminoMsg {
|
|
443
|
+
type: "cosmos-sdk/v1/VotingParams";
|
|
444
|
+
value: VotingParamsAmino;
|
|
445
|
+
}
|
|
446
|
+
/** TallyParams defines the params for tallying votes on governance proposals. */
|
|
447
|
+
/** @deprecated */
|
|
448
|
+
export interface TallyParams {
|
|
449
|
+
/**
|
|
450
|
+
* Minimum percentage of total stake needed to vote for a result to be
|
|
451
|
+
* considered valid.
|
|
452
|
+
*/
|
|
453
|
+
quorum: string;
|
|
454
|
+
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
455
|
+
threshold: string;
|
|
456
|
+
/**
|
|
457
|
+
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
458
|
+
* vetoed. Default value: 1/3.
|
|
459
|
+
*/
|
|
460
|
+
vetoThreshold: string;
|
|
461
|
+
}
|
|
462
|
+
export interface TallyParamsProtoMsg {
|
|
463
|
+
typeUrl: "/cosmos.gov.v1.TallyParams";
|
|
464
|
+
value: Uint8Array;
|
|
465
|
+
}
|
|
466
|
+
/** TallyParams defines the params for tallying votes on governance proposals. */
|
|
467
|
+
/** @deprecated */
|
|
468
|
+
export interface TallyParamsAmino {
|
|
469
|
+
/**
|
|
470
|
+
* Minimum percentage of total stake needed to vote for a result to be
|
|
471
|
+
* considered valid.
|
|
472
|
+
*/
|
|
473
|
+
quorum: string;
|
|
474
|
+
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
475
|
+
threshold: string;
|
|
476
|
+
/**
|
|
477
|
+
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
478
|
+
* vetoed. Default value: 1/3.
|
|
479
|
+
*/
|
|
480
|
+
veto_threshold: string;
|
|
481
|
+
}
|
|
482
|
+
export interface TallyParamsAminoMsg {
|
|
483
|
+
type: "cosmos-sdk/v1/TallyParams";
|
|
484
|
+
value: TallyParamsAmino;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Params defines the parameters for the x/gov module.
|
|
488
|
+
*
|
|
489
|
+
* Since: cosmos-sdk 0.47
|
|
490
|
+
*/
|
|
491
|
+
export interface Params {
|
|
492
|
+
/** Minimum deposit for a proposal to enter voting period. */
|
|
493
|
+
minDeposit: Coin[];
|
|
494
|
+
/**
|
|
495
|
+
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
496
|
+
* months.
|
|
497
|
+
*/
|
|
498
|
+
maxDepositPeriod?: Duration;
|
|
499
|
+
/** Duration of the voting period. */
|
|
500
|
+
votingPeriod?: Duration;
|
|
501
|
+
/**
|
|
502
|
+
* Minimum percentage of total stake needed to vote for a result to be
|
|
503
|
+
* considered valid.
|
|
504
|
+
*/
|
|
505
|
+
quorum: string;
|
|
506
|
+
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
507
|
+
threshold: string;
|
|
508
|
+
/**
|
|
509
|
+
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
510
|
+
* vetoed. Default value: 1/3.
|
|
511
|
+
*/
|
|
512
|
+
vetoThreshold: string;
|
|
513
|
+
/** The ratio representing the proportion of the deposit value that must be paid at proposal submission. */
|
|
514
|
+
minInitialDepositRatio: string;
|
|
515
|
+
/**
|
|
516
|
+
* The cancel ratio which will not be returned back to the depositors when a proposal is cancelled.
|
|
517
|
+
*
|
|
518
|
+
* Since: cosmos-sdk 0.50
|
|
519
|
+
*/
|
|
520
|
+
proposalCancelRatio: string;
|
|
521
|
+
/**
|
|
522
|
+
* The address which will receive (proposal_cancel_ratio * deposit) proposal deposits.
|
|
523
|
+
* If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned.
|
|
524
|
+
*
|
|
525
|
+
* Since: cosmos-sdk 0.50
|
|
526
|
+
*/
|
|
527
|
+
proposalCancelDest: string;
|
|
528
|
+
/**
|
|
529
|
+
* Duration of the voting period of an expedited proposal.
|
|
530
|
+
*
|
|
531
|
+
* Since: cosmos-sdk 0.50
|
|
532
|
+
*/
|
|
533
|
+
expeditedVotingPeriod?: Duration;
|
|
534
|
+
/**
|
|
535
|
+
* Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.
|
|
536
|
+
*
|
|
537
|
+
* Since: cosmos-sdk 0.50
|
|
538
|
+
*/
|
|
539
|
+
expeditedThreshold: string;
|
|
540
|
+
/** Minimum expedited deposit for a proposal to enter voting period. */
|
|
541
|
+
expeditedMinDeposit: Coin[];
|
|
542
|
+
/** burn deposits if a proposal does not meet quorum */
|
|
543
|
+
burnVoteQuorum: boolean;
|
|
544
|
+
/** burn deposits if the proposal does not enter voting period */
|
|
545
|
+
burnProposalDepositPrevote: boolean;
|
|
546
|
+
/** burn deposits if quorum with vote type no_veto is met */
|
|
547
|
+
burnVoteVeto: boolean;
|
|
548
|
+
/**
|
|
549
|
+
* The ratio representing the proportion of the deposit value minimum that must be met when making a deposit.
|
|
550
|
+
* Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be
|
|
551
|
+
* required.
|
|
552
|
+
*
|
|
553
|
+
* Since: cosmos-sdk 0.50
|
|
554
|
+
*/
|
|
555
|
+
minDepositRatio: string;
|
|
556
|
+
}
|
|
557
|
+
export interface ParamsProtoMsg {
|
|
558
|
+
typeUrl: "/cosmos.gov.v1.Params";
|
|
559
|
+
value: Uint8Array;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Params defines the parameters for the x/gov module.
|
|
563
|
+
*
|
|
564
|
+
* Since: cosmos-sdk 0.47
|
|
565
|
+
*/
|
|
566
|
+
export interface ParamsAmino {
|
|
567
|
+
/** Minimum deposit for a proposal to enter voting period. */
|
|
568
|
+
min_deposit: CoinAmino[];
|
|
569
|
+
/**
|
|
570
|
+
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
571
|
+
* months.
|
|
572
|
+
*/
|
|
573
|
+
max_deposit_period?: DurationAmino;
|
|
574
|
+
/** Duration of the voting period. */
|
|
575
|
+
voting_period?: DurationAmino;
|
|
576
|
+
/**
|
|
577
|
+
* Minimum percentage of total stake needed to vote for a result to be
|
|
578
|
+
* considered valid.
|
|
579
|
+
*/
|
|
580
|
+
quorum: string;
|
|
581
|
+
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
582
|
+
threshold: string;
|
|
583
|
+
/**
|
|
584
|
+
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
585
|
+
* vetoed. Default value: 1/3.
|
|
586
|
+
*/
|
|
587
|
+
veto_threshold: string;
|
|
588
|
+
/** The ratio representing the proportion of the deposit value that must be paid at proposal submission. */
|
|
589
|
+
min_initial_deposit_ratio: string;
|
|
590
|
+
/**
|
|
591
|
+
* The cancel ratio which will not be returned back to the depositors when a proposal is cancelled.
|
|
592
|
+
*
|
|
593
|
+
* Since: cosmos-sdk 0.50
|
|
594
|
+
*/
|
|
595
|
+
proposal_cancel_ratio: string;
|
|
596
|
+
/**
|
|
597
|
+
* The address which will receive (proposal_cancel_ratio * deposit) proposal deposits.
|
|
598
|
+
* If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned.
|
|
599
|
+
*
|
|
600
|
+
* Since: cosmos-sdk 0.50
|
|
601
|
+
*/
|
|
602
|
+
proposal_cancel_dest: string;
|
|
603
|
+
/**
|
|
604
|
+
* Duration of the voting period of an expedited proposal.
|
|
605
|
+
*
|
|
606
|
+
* Since: cosmos-sdk 0.50
|
|
607
|
+
*/
|
|
608
|
+
expedited_voting_period?: DurationAmino;
|
|
609
|
+
/**
|
|
610
|
+
* Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.
|
|
611
|
+
*
|
|
612
|
+
* Since: cosmos-sdk 0.50
|
|
613
|
+
*/
|
|
614
|
+
expedited_threshold: string;
|
|
615
|
+
/** Minimum expedited deposit for a proposal to enter voting period. */
|
|
616
|
+
expedited_min_deposit: CoinAmino[];
|
|
617
|
+
/** burn deposits if a proposal does not meet quorum */
|
|
618
|
+
burn_vote_quorum: boolean;
|
|
619
|
+
/** burn deposits if the proposal does not enter voting period */
|
|
620
|
+
burn_proposal_deposit_prevote: boolean;
|
|
621
|
+
/** burn deposits if quorum with vote type no_veto is met */
|
|
622
|
+
burn_vote_veto: boolean;
|
|
623
|
+
/**
|
|
624
|
+
* The ratio representing the proportion of the deposit value minimum that must be met when making a deposit.
|
|
625
|
+
* Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be
|
|
626
|
+
* required.
|
|
627
|
+
*
|
|
628
|
+
* Since: cosmos-sdk 0.50
|
|
629
|
+
*/
|
|
630
|
+
min_deposit_ratio: string;
|
|
631
|
+
}
|
|
632
|
+
export interface ParamsAminoMsg {
|
|
633
|
+
type: "cosmos-sdk/v1/Params";
|
|
634
|
+
value: ParamsAmino;
|
|
635
|
+
}
|
|
636
|
+
function createBaseWeightedVoteOption(): WeightedVoteOption {
|
|
637
|
+
return {
|
|
638
|
+
option: 0,
|
|
639
|
+
weight: ""
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
export const WeightedVoteOption = {
|
|
643
|
+
typeUrl: "/cosmos.gov.v1.WeightedVoteOption",
|
|
644
|
+
aminoType: "cosmos-sdk/v1/WeightedVoteOption",
|
|
645
|
+
is(o: any): o is WeightedVoteOption {
|
|
646
|
+
return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string");
|
|
647
|
+
},
|
|
648
|
+
isAmino(o: any): o is WeightedVoteOptionAmino {
|
|
649
|
+
return o && (o.$typeUrl === WeightedVoteOption.typeUrl || isSet(o.option) && typeof o.weight === "string");
|
|
650
|
+
},
|
|
651
|
+
encode(message: WeightedVoteOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
652
|
+
if (message.option !== 0) {
|
|
653
|
+
writer.uint32(8).int32(message.option);
|
|
654
|
+
}
|
|
655
|
+
if (message.weight !== "") {
|
|
656
|
+
writer.uint32(18).string(message.weight);
|
|
657
|
+
}
|
|
658
|
+
return writer;
|
|
659
|
+
},
|
|
660
|
+
decode(input: BinaryReader | Uint8Array, length?: number): WeightedVoteOption {
|
|
661
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
662
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
663
|
+
const message = createBaseWeightedVoteOption();
|
|
664
|
+
while (reader.pos < end) {
|
|
665
|
+
const tag = reader.uint32();
|
|
666
|
+
switch (tag >>> 3) {
|
|
667
|
+
case 1:
|
|
668
|
+
message.option = reader.int32() as any;
|
|
669
|
+
break;
|
|
670
|
+
case 2:
|
|
671
|
+
message.weight = reader.string();
|
|
672
|
+
break;
|
|
673
|
+
default:
|
|
674
|
+
reader.skipType(tag & 7);
|
|
675
|
+
break;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
return message;
|
|
679
|
+
},
|
|
680
|
+
fromPartial(object: DeepPartial<WeightedVoteOption>): WeightedVoteOption {
|
|
681
|
+
const message = createBaseWeightedVoteOption();
|
|
682
|
+
message.option = object.option ?? 0;
|
|
683
|
+
message.weight = object.weight ?? "";
|
|
684
|
+
return message;
|
|
685
|
+
},
|
|
686
|
+
fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption {
|
|
687
|
+
const message = createBaseWeightedVoteOption();
|
|
688
|
+
if (object.option !== undefined && object.option !== null) {
|
|
689
|
+
message.option = object.option;
|
|
690
|
+
}
|
|
691
|
+
if (object.weight !== undefined && object.weight !== null) {
|
|
692
|
+
message.weight = object.weight;
|
|
693
|
+
}
|
|
694
|
+
return message;
|
|
695
|
+
},
|
|
696
|
+
toAmino(message: WeightedVoteOption): WeightedVoteOptionAmino {
|
|
697
|
+
const obj: any = {};
|
|
698
|
+
obj.option = message.option === 0 ? undefined : message.option;
|
|
699
|
+
obj.weight = message.weight === "" ? undefined : message.weight;
|
|
700
|
+
return obj;
|
|
701
|
+
},
|
|
702
|
+
fromAminoMsg(object: WeightedVoteOptionAminoMsg): WeightedVoteOption {
|
|
703
|
+
return WeightedVoteOption.fromAmino(object.value);
|
|
704
|
+
},
|
|
705
|
+
toAminoMsg(message: WeightedVoteOption): WeightedVoteOptionAminoMsg {
|
|
706
|
+
return {
|
|
707
|
+
type: "cosmos-sdk/v1/WeightedVoteOption",
|
|
708
|
+
value: WeightedVoteOption.toAmino(message)
|
|
709
|
+
};
|
|
710
|
+
},
|
|
711
|
+
fromProtoMsg(message: WeightedVoteOptionProtoMsg): WeightedVoteOption {
|
|
712
|
+
return WeightedVoteOption.decode(message.value);
|
|
713
|
+
},
|
|
714
|
+
toProto(message: WeightedVoteOption): Uint8Array {
|
|
715
|
+
return WeightedVoteOption.encode(message).finish();
|
|
716
|
+
},
|
|
717
|
+
toProtoMsg(message: WeightedVoteOption): WeightedVoteOptionProtoMsg {
|
|
718
|
+
return {
|
|
719
|
+
typeUrl: "/cosmos.gov.v1.WeightedVoteOption",
|
|
720
|
+
value: WeightedVoteOption.encode(message).finish()
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
GlobalDecoderRegistry.register(WeightedVoteOption.typeUrl, WeightedVoteOption);
|
|
725
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(WeightedVoteOption.aminoType, WeightedVoteOption.typeUrl);
|
|
726
|
+
function createBaseDeposit(): Deposit {
|
|
727
|
+
return {
|
|
728
|
+
proposalId: BigInt(0),
|
|
729
|
+
depositor: "",
|
|
730
|
+
amount: []
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
export const Deposit = {
|
|
734
|
+
typeUrl: "/cosmos.gov.v1.Deposit",
|
|
735
|
+
aminoType: "cosmos-sdk/v1/Deposit",
|
|
736
|
+
is(o: any): o is Deposit {
|
|
737
|
+
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])));
|
|
738
|
+
},
|
|
739
|
+
isAmino(o: any): o is DepositAmino {
|
|
740
|
+
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])));
|
|
741
|
+
},
|
|
742
|
+
encode(message: Deposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
743
|
+
if (message.proposalId !== BigInt(0)) {
|
|
744
|
+
writer.uint32(8).uint64(message.proposalId);
|
|
745
|
+
}
|
|
746
|
+
if (message.depositor !== "") {
|
|
747
|
+
writer.uint32(18).string(message.depositor);
|
|
748
|
+
}
|
|
749
|
+
for (const v of message.amount) {
|
|
750
|
+
Coin.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
751
|
+
}
|
|
752
|
+
return writer;
|
|
753
|
+
},
|
|
754
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Deposit {
|
|
755
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
756
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
757
|
+
const message = createBaseDeposit();
|
|
758
|
+
while (reader.pos < end) {
|
|
759
|
+
const tag = reader.uint32();
|
|
760
|
+
switch (tag >>> 3) {
|
|
761
|
+
case 1:
|
|
762
|
+
message.proposalId = reader.uint64();
|
|
763
|
+
break;
|
|
764
|
+
case 2:
|
|
765
|
+
message.depositor = reader.string();
|
|
766
|
+
break;
|
|
767
|
+
case 3:
|
|
768
|
+
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
769
|
+
break;
|
|
770
|
+
default:
|
|
771
|
+
reader.skipType(tag & 7);
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
return message;
|
|
776
|
+
},
|
|
777
|
+
fromPartial(object: DeepPartial<Deposit>): Deposit {
|
|
778
|
+
const message = createBaseDeposit();
|
|
779
|
+
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
780
|
+
message.depositor = object.depositor ?? "";
|
|
781
|
+
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
|
|
782
|
+
return message;
|
|
783
|
+
},
|
|
784
|
+
fromAmino(object: DepositAmino): Deposit {
|
|
785
|
+
const message = createBaseDeposit();
|
|
786
|
+
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
787
|
+
message.proposalId = BigInt(object.proposal_id);
|
|
788
|
+
}
|
|
789
|
+
if (object.depositor !== undefined && object.depositor !== null) {
|
|
790
|
+
message.depositor = object.depositor;
|
|
791
|
+
}
|
|
792
|
+
message.amount = object.amount?.map(e => Coin.fromAmino(e)) || [];
|
|
793
|
+
return message;
|
|
794
|
+
},
|
|
795
|
+
toAmino(message: Deposit): DepositAmino {
|
|
796
|
+
const obj: any = {};
|
|
797
|
+
obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
|
|
798
|
+
obj.depositor = message.depositor === "" ? undefined : message.depositor;
|
|
799
|
+
if (message.amount) {
|
|
800
|
+
obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined);
|
|
801
|
+
} else {
|
|
802
|
+
obj.amount = message.amount;
|
|
803
|
+
}
|
|
804
|
+
return obj;
|
|
805
|
+
},
|
|
806
|
+
fromAminoMsg(object: DepositAminoMsg): Deposit {
|
|
807
|
+
return Deposit.fromAmino(object.value);
|
|
808
|
+
},
|
|
809
|
+
toAminoMsg(message: Deposit): DepositAminoMsg {
|
|
810
|
+
return {
|
|
811
|
+
type: "cosmos-sdk/v1/Deposit",
|
|
812
|
+
value: Deposit.toAmino(message)
|
|
813
|
+
};
|
|
814
|
+
},
|
|
815
|
+
fromProtoMsg(message: DepositProtoMsg): Deposit {
|
|
816
|
+
return Deposit.decode(message.value);
|
|
817
|
+
},
|
|
818
|
+
toProto(message: Deposit): Uint8Array {
|
|
819
|
+
return Deposit.encode(message).finish();
|
|
820
|
+
},
|
|
821
|
+
toProtoMsg(message: Deposit): DepositProtoMsg {
|
|
822
|
+
return {
|
|
823
|
+
typeUrl: "/cosmos.gov.v1.Deposit",
|
|
824
|
+
value: Deposit.encode(message).finish()
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
GlobalDecoderRegistry.register(Deposit.typeUrl, Deposit);
|
|
829
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Deposit.aminoType, Deposit.typeUrl);
|
|
830
|
+
function createBaseProposal(): Proposal {
|
|
831
|
+
return {
|
|
832
|
+
id: BigInt(0),
|
|
833
|
+
messages: [],
|
|
834
|
+
status: 0,
|
|
835
|
+
finalTallyResult: undefined,
|
|
836
|
+
submitTime: undefined,
|
|
837
|
+
depositEndTime: undefined,
|
|
838
|
+
totalDeposit: [],
|
|
839
|
+
votingStartTime: undefined,
|
|
840
|
+
votingEndTime: undefined,
|
|
841
|
+
metadata: "",
|
|
842
|
+
title: "",
|
|
843
|
+
summary: "",
|
|
844
|
+
proposer: "",
|
|
845
|
+
expedited: false,
|
|
846
|
+
failedReason: ""
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
export const Proposal = {
|
|
850
|
+
typeUrl: "/cosmos.gov.v1.Proposal",
|
|
851
|
+
aminoType: "cosmos-sdk/v1/Proposal",
|
|
852
|
+
is(o: any): o is Proposal {
|
|
853
|
+
return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === "bigint" && Array.isArray(o.messages) && (!o.messages.length || Any.is(o.messages[0])) && isSet(o.status) && Array.isArray(o.totalDeposit) && (!o.totalDeposit.length || Coin.is(o.totalDeposit[0])) && typeof o.metadata === "string" && typeof o.title === "string" && typeof o.summary === "string" && typeof o.proposer === "string" && typeof o.expedited === "boolean" && typeof o.failedReason === "string");
|
|
854
|
+
},
|
|
855
|
+
isAmino(o: any): o is ProposalAmino {
|
|
856
|
+
return o && (o.$typeUrl === Proposal.typeUrl || typeof o.id === "bigint" && Array.isArray(o.messages) && (!o.messages.length || Any.isAmino(o.messages[0])) && isSet(o.status) && Array.isArray(o.total_deposit) && (!o.total_deposit.length || Coin.isAmino(o.total_deposit[0])) && typeof o.metadata === "string" && typeof o.title === "string" && typeof o.summary === "string" && typeof o.proposer === "string" && typeof o.expedited === "boolean" && typeof o.failed_reason === "string");
|
|
857
|
+
},
|
|
858
|
+
encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
859
|
+
if (message.id !== BigInt(0)) {
|
|
860
|
+
writer.uint32(8).uint64(message.id);
|
|
861
|
+
}
|
|
862
|
+
for (const v of message.messages) {
|
|
863
|
+
Any.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
864
|
+
}
|
|
865
|
+
if (message.status !== 0) {
|
|
866
|
+
writer.uint32(24).int32(message.status);
|
|
867
|
+
}
|
|
868
|
+
if (message.finalTallyResult !== undefined) {
|
|
869
|
+
TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim();
|
|
870
|
+
}
|
|
871
|
+
if (message.submitTime !== undefined) {
|
|
872
|
+
Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim();
|
|
873
|
+
}
|
|
874
|
+
if (message.depositEndTime !== undefined) {
|
|
875
|
+
Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim();
|
|
876
|
+
}
|
|
877
|
+
for (const v of message.totalDeposit) {
|
|
878
|
+
Coin.encode(v!, writer.uint32(58).fork()).ldelim();
|
|
879
|
+
}
|
|
880
|
+
if (message.votingStartTime !== undefined) {
|
|
881
|
+
Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim();
|
|
882
|
+
}
|
|
883
|
+
if (message.votingEndTime !== undefined) {
|
|
884
|
+
Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim();
|
|
885
|
+
}
|
|
886
|
+
if (message.metadata !== "") {
|
|
887
|
+
writer.uint32(82).string(message.metadata);
|
|
888
|
+
}
|
|
889
|
+
if (message.title !== "") {
|
|
890
|
+
writer.uint32(90).string(message.title);
|
|
891
|
+
}
|
|
892
|
+
if (message.summary !== "") {
|
|
893
|
+
writer.uint32(98).string(message.summary);
|
|
894
|
+
}
|
|
895
|
+
if (message.proposer !== "") {
|
|
896
|
+
writer.uint32(106).string(message.proposer);
|
|
897
|
+
}
|
|
898
|
+
if (message.expedited === true) {
|
|
899
|
+
writer.uint32(112).bool(message.expedited);
|
|
900
|
+
}
|
|
901
|
+
if (message.failedReason !== "") {
|
|
902
|
+
writer.uint32(122).string(message.failedReason);
|
|
903
|
+
}
|
|
904
|
+
return writer;
|
|
905
|
+
},
|
|
906
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Proposal {
|
|
907
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
908
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
909
|
+
const message = createBaseProposal();
|
|
910
|
+
while (reader.pos < end) {
|
|
911
|
+
const tag = reader.uint32();
|
|
912
|
+
switch (tag >>> 3) {
|
|
913
|
+
case 1:
|
|
914
|
+
message.id = reader.uint64();
|
|
915
|
+
break;
|
|
916
|
+
case 2:
|
|
917
|
+
message.messages.push(Any.decode(reader, reader.uint32()));
|
|
918
|
+
break;
|
|
919
|
+
case 3:
|
|
920
|
+
message.status = reader.int32() as any;
|
|
921
|
+
break;
|
|
922
|
+
case 4:
|
|
923
|
+
message.finalTallyResult = TallyResult.decode(reader, reader.uint32());
|
|
924
|
+
break;
|
|
925
|
+
case 5:
|
|
926
|
+
message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
927
|
+
break;
|
|
928
|
+
case 6:
|
|
929
|
+
message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
930
|
+
break;
|
|
931
|
+
case 7:
|
|
932
|
+
message.totalDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
933
|
+
break;
|
|
934
|
+
case 8:
|
|
935
|
+
message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
936
|
+
break;
|
|
937
|
+
case 9:
|
|
938
|
+
message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
939
|
+
break;
|
|
940
|
+
case 10:
|
|
941
|
+
message.metadata = reader.string();
|
|
942
|
+
break;
|
|
943
|
+
case 11:
|
|
944
|
+
message.title = reader.string();
|
|
945
|
+
break;
|
|
946
|
+
case 12:
|
|
947
|
+
message.summary = reader.string();
|
|
948
|
+
break;
|
|
949
|
+
case 13:
|
|
950
|
+
message.proposer = reader.string();
|
|
951
|
+
break;
|
|
952
|
+
case 14:
|
|
953
|
+
message.expedited = reader.bool();
|
|
954
|
+
break;
|
|
955
|
+
case 15:
|
|
956
|
+
message.failedReason = reader.string();
|
|
957
|
+
break;
|
|
958
|
+
default:
|
|
959
|
+
reader.skipType(tag & 7);
|
|
960
|
+
break;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
return message;
|
|
964
|
+
},
|
|
965
|
+
fromPartial(object: DeepPartial<Proposal>): Proposal {
|
|
966
|
+
const message = createBaseProposal();
|
|
967
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
968
|
+
message.messages = object.messages?.map(e => Any.fromPartial(e)) || [];
|
|
969
|
+
message.status = object.status ?? 0;
|
|
970
|
+
message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? TallyResult.fromPartial(object.finalTallyResult) : undefined;
|
|
971
|
+
message.submitTime = object.submitTime ?? undefined;
|
|
972
|
+
message.depositEndTime = object.depositEndTime ?? undefined;
|
|
973
|
+
message.totalDeposit = object.totalDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
974
|
+
message.votingStartTime = object.votingStartTime ?? undefined;
|
|
975
|
+
message.votingEndTime = object.votingEndTime ?? undefined;
|
|
976
|
+
message.metadata = object.metadata ?? "";
|
|
977
|
+
message.title = object.title ?? "";
|
|
978
|
+
message.summary = object.summary ?? "";
|
|
979
|
+
message.proposer = object.proposer ?? "";
|
|
980
|
+
message.expedited = object.expedited ?? false;
|
|
981
|
+
message.failedReason = object.failedReason ?? "";
|
|
982
|
+
return message;
|
|
983
|
+
},
|
|
984
|
+
fromAmino(object: ProposalAmino): Proposal {
|
|
985
|
+
const message = createBaseProposal();
|
|
986
|
+
if (object.id !== undefined && object.id !== null) {
|
|
987
|
+
message.id = BigInt(object.id);
|
|
988
|
+
}
|
|
989
|
+
message.messages = object.messages?.map(e => Any.fromAmino(e)) || [];
|
|
990
|
+
if (object.status !== undefined && object.status !== null) {
|
|
991
|
+
message.status = object.status;
|
|
992
|
+
}
|
|
993
|
+
if (object.final_tally_result !== undefined && object.final_tally_result !== null) {
|
|
994
|
+
message.finalTallyResult = TallyResult.fromAmino(object.final_tally_result);
|
|
995
|
+
}
|
|
996
|
+
if (object.submit_time !== undefined && object.submit_time !== null) {
|
|
997
|
+
message.submitTime = fromTimestamp(Timestamp.fromAmino(object.submit_time));
|
|
998
|
+
}
|
|
999
|
+
if (object.deposit_end_time !== undefined && object.deposit_end_time !== null) {
|
|
1000
|
+
message.depositEndTime = fromTimestamp(Timestamp.fromAmino(object.deposit_end_time));
|
|
1001
|
+
}
|
|
1002
|
+
message.totalDeposit = object.total_deposit?.map(e => Coin.fromAmino(e)) || [];
|
|
1003
|
+
if (object.voting_start_time !== undefined && object.voting_start_time !== null) {
|
|
1004
|
+
message.votingStartTime = fromTimestamp(Timestamp.fromAmino(object.voting_start_time));
|
|
1005
|
+
}
|
|
1006
|
+
if (object.voting_end_time !== undefined && object.voting_end_time !== null) {
|
|
1007
|
+
message.votingEndTime = fromTimestamp(Timestamp.fromAmino(object.voting_end_time));
|
|
1008
|
+
}
|
|
1009
|
+
if (object.metadata !== undefined && object.metadata !== null) {
|
|
1010
|
+
message.metadata = object.metadata;
|
|
1011
|
+
}
|
|
1012
|
+
if (object.title !== undefined && object.title !== null) {
|
|
1013
|
+
message.title = object.title;
|
|
1014
|
+
}
|
|
1015
|
+
if (object.summary !== undefined && object.summary !== null) {
|
|
1016
|
+
message.summary = object.summary;
|
|
1017
|
+
}
|
|
1018
|
+
if (object.proposer !== undefined && object.proposer !== null) {
|
|
1019
|
+
message.proposer = object.proposer;
|
|
1020
|
+
}
|
|
1021
|
+
if (object.expedited !== undefined && object.expedited !== null) {
|
|
1022
|
+
message.expedited = object.expedited;
|
|
1023
|
+
}
|
|
1024
|
+
if (object.failed_reason !== undefined && object.failed_reason !== null) {
|
|
1025
|
+
message.failedReason = object.failed_reason;
|
|
1026
|
+
}
|
|
1027
|
+
return message;
|
|
1028
|
+
},
|
|
1029
|
+
toAmino(message: Proposal): ProposalAmino {
|
|
1030
|
+
const obj: any = {};
|
|
1031
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
1032
|
+
if (message.messages) {
|
|
1033
|
+
obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined);
|
|
1034
|
+
} else {
|
|
1035
|
+
obj.messages = message.messages;
|
|
1036
|
+
}
|
|
1037
|
+
obj.status = message.status === 0 ? undefined : message.status;
|
|
1038
|
+
obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult) : undefined;
|
|
1039
|
+
obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : undefined;
|
|
1040
|
+
obj.deposit_end_time = message.depositEndTime ? Timestamp.toAmino(toTimestamp(message.depositEndTime)) : undefined;
|
|
1041
|
+
if (message.totalDeposit) {
|
|
1042
|
+
obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
1043
|
+
} else {
|
|
1044
|
+
obj.total_deposit = message.totalDeposit;
|
|
1045
|
+
}
|
|
1046
|
+
obj.voting_start_time = message.votingStartTime ? Timestamp.toAmino(toTimestamp(message.votingStartTime)) : undefined;
|
|
1047
|
+
obj.voting_end_time = message.votingEndTime ? Timestamp.toAmino(toTimestamp(message.votingEndTime)) : undefined;
|
|
1048
|
+
obj.metadata = message.metadata === "" ? undefined : message.metadata;
|
|
1049
|
+
obj.title = message.title === "" ? undefined : message.title;
|
|
1050
|
+
obj.summary = message.summary === "" ? undefined : message.summary;
|
|
1051
|
+
obj.proposer = message.proposer === "" ? undefined : message.proposer;
|
|
1052
|
+
obj.expedited = message.expedited === false ? undefined : message.expedited;
|
|
1053
|
+
obj.failed_reason = message.failedReason === "" ? undefined : message.failedReason;
|
|
1054
|
+
return obj;
|
|
1055
|
+
},
|
|
1056
|
+
fromAminoMsg(object: ProposalAminoMsg): Proposal {
|
|
1057
|
+
return Proposal.fromAmino(object.value);
|
|
1058
|
+
},
|
|
1059
|
+
toAminoMsg(message: Proposal): ProposalAminoMsg {
|
|
1060
|
+
return {
|
|
1061
|
+
type: "cosmos-sdk/v1/Proposal",
|
|
1062
|
+
value: Proposal.toAmino(message)
|
|
1063
|
+
};
|
|
1064
|
+
},
|
|
1065
|
+
fromProtoMsg(message: ProposalProtoMsg): Proposal {
|
|
1066
|
+
return Proposal.decode(message.value);
|
|
1067
|
+
},
|
|
1068
|
+
toProto(message: Proposal): Uint8Array {
|
|
1069
|
+
return Proposal.encode(message).finish();
|
|
1070
|
+
},
|
|
1071
|
+
toProtoMsg(message: Proposal): ProposalProtoMsg {
|
|
1072
|
+
return {
|
|
1073
|
+
typeUrl: "/cosmos.gov.v1.Proposal",
|
|
1074
|
+
value: Proposal.encode(message).finish()
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
GlobalDecoderRegistry.register(Proposal.typeUrl, Proposal);
|
|
1079
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Proposal.aminoType, Proposal.typeUrl);
|
|
1080
|
+
function createBaseTallyResult(): TallyResult {
|
|
1081
|
+
return {
|
|
1082
|
+
yesCount: "",
|
|
1083
|
+
abstainCount: "",
|
|
1084
|
+
noCount: "",
|
|
1085
|
+
noWithVetoCount: ""
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
export const TallyResult = {
|
|
1089
|
+
typeUrl: "/cosmos.gov.v1.TallyResult",
|
|
1090
|
+
aminoType: "cosmos-sdk/v1/TallyResult",
|
|
1091
|
+
is(o: any): o is TallyResult {
|
|
1092
|
+
return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yesCount === "string" && typeof o.abstainCount === "string" && typeof o.noCount === "string" && typeof o.noWithVetoCount === "string");
|
|
1093
|
+
},
|
|
1094
|
+
isAmino(o: any): o is TallyResultAmino {
|
|
1095
|
+
return o && (o.$typeUrl === TallyResult.typeUrl || typeof o.yes_count === "string" && typeof o.abstain_count === "string" && typeof o.no_count === "string" && typeof o.no_with_veto_count === "string");
|
|
1096
|
+
},
|
|
1097
|
+
encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1098
|
+
if (message.yesCount !== "") {
|
|
1099
|
+
writer.uint32(10).string(message.yesCount);
|
|
1100
|
+
}
|
|
1101
|
+
if (message.abstainCount !== "") {
|
|
1102
|
+
writer.uint32(18).string(message.abstainCount);
|
|
1103
|
+
}
|
|
1104
|
+
if (message.noCount !== "") {
|
|
1105
|
+
writer.uint32(26).string(message.noCount);
|
|
1106
|
+
}
|
|
1107
|
+
if (message.noWithVetoCount !== "") {
|
|
1108
|
+
writer.uint32(34).string(message.noWithVetoCount);
|
|
1109
|
+
}
|
|
1110
|
+
return writer;
|
|
1111
|
+
},
|
|
1112
|
+
decode(input: BinaryReader | Uint8Array, length?: number): TallyResult {
|
|
1113
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1114
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1115
|
+
const message = createBaseTallyResult();
|
|
1116
|
+
while (reader.pos < end) {
|
|
1117
|
+
const tag = reader.uint32();
|
|
1118
|
+
switch (tag >>> 3) {
|
|
1119
|
+
case 1:
|
|
1120
|
+
message.yesCount = reader.string();
|
|
1121
|
+
break;
|
|
1122
|
+
case 2:
|
|
1123
|
+
message.abstainCount = reader.string();
|
|
1124
|
+
break;
|
|
1125
|
+
case 3:
|
|
1126
|
+
message.noCount = reader.string();
|
|
1127
|
+
break;
|
|
1128
|
+
case 4:
|
|
1129
|
+
message.noWithVetoCount = reader.string();
|
|
1130
|
+
break;
|
|
1131
|
+
default:
|
|
1132
|
+
reader.skipType(tag & 7);
|
|
1133
|
+
break;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
return message;
|
|
1137
|
+
},
|
|
1138
|
+
fromPartial(object: DeepPartial<TallyResult>): TallyResult {
|
|
1139
|
+
const message = createBaseTallyResult();
|
|
1140
|
+
message.yesCount = object.yesCount ?? "";
|
|
1141
|
+
message.abstainCount = object.abstainCount ?? "";
|
|
1142
|
+
message.noCount = object.noCount ?? "";
|
|
1143
|
+
message.noWithVetoCount = object.noWithVetoCount ?? "";
|
|
1144
|
+
return message;
|
|
1145
|
+
},
|
|
1146
|
+
fromAmino(object: TallyResultAmino): TallyResult {
|
|
1147
|
+
const message = createBaseTallyResult();
|
|
1148
|
+
if (object.yes_count !== undefined && object.yes_count !== null) {
|
|
1149
|
+
message.yesCount = object.yes_count;
|
|
1150
|
+
}
|
|
1151
|
+
if (object.abstain_count !== undefined && object.abstain_count !== null) {
|
|
1152
|
+
message.abstainCount = object.abstain_count;
|
|
1153
|
+
}
|
|
1154
|
+
if (object.no_count !== undefined && object.no_count !== null) {
|
|
1155
|
+
message.noCount = object.no_count;
|
|
1156
|
+
}
|
|
1157
|
+
if (object.no_with_veto_count !== undefined && object.no_with_veto_count !== null) {
|
|
1158
|
+
message.noWithVetoCount = object.no_with_veto_count;
|
|
1159
|
+
}
|
|
1160
|
+
return message;
|
|
1161
|
+
},
|
|
1162
|
+
toAmino(message: TallyResult): TallyResultAmino {
|
|
1163
|
+
const obj: any = {};
|
|
1164
|
+
obj.yes_count = message.yesCount === "" ? undefined : message.yesCount;
|
|
1165
|
+
obj.abstain_count = message.abstainCount === "" ? undefined : message.abstainCount;
|
|
1166
|
+
obj.no_count = message.noCount === "" ? undefined : message.noCount;
|
|
1167
|
+
obj.no_with_veto_count = message.noWithVetoCount === "" ? undefined : message.noWithVetoCount;
|
|
1168
|
+
return obj;
|
|
1169
|
+
},
|
|
1170
|
+
fromAminoMsg(object: TallyResultAminoMsg): TallyResult {
|
|
1171
|
+
return TallyResult.fromAmino(object.value);
|
|
1172
|
+
},
|
|
1173
|
+
toAminoMsg(message: TallyResult): TallyResultAminoMsg {
|
|
1174
|
+
return {
|
|
1175
|
+
type: "cosmos-sdk/v1/TallyResult",
|
|
1176
|
+
value: TallyResult.toAmino(message)
|
|
1177
|
+
};
|
|
1178
|
+
},
|
|
1179
|
+
fromProtoMsg(message: TallyResultProtoMsg): TallyResult {
|
|
1180
|
+
return TallyResult.decode(message.value);
|
|
1181
|
+
},
|
|
1182
|
+
toProto(message: TallyResult): Uint8Array {
|
|
1183
|
+
return TallyResult.encode(message).finish();
|
|
1184
|
+
},
|
|
1185
|
+
toProtoMsg(message: TallyResult): TallyResultProtoMsg {
|
|
1186
|
+
return {
|
|
1187
|
+
typeUrl: "/cosmos.gov.v1.TallyResult",
|
|
1188
|
+
value: TallyResult.encode(message).finish()
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
GlobalDecoderRegistry.register(TallyResult.typeUrl, TallyResult);
|
|
1193
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(TallyResult.aminoType, TallyResult.typeUrl);
|
|
1194
|
+
function createBaseVote(): Vote {
|
|
1195
|
+
return {
|
|
1196
|
+
proposalId: BigInt(0),
|
|
1197
|
+
voter: "",
|
|
1198
|
+
options: [],
|
|
1199
|
+
metadata: ""
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
export const Vote = {
|
|
1203
|
+
typeUrl: "/cosmos.gov.v1.Vote",
|
|
1204
|
+
aminoType: "cosmos-sdk/v1/Vote",
|
|
1205
|
+
is(o: any): o is Vote {
|
|
1206
|
+
return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.is(o.options[0])) && typeof o.metadata === "string");
|
|
1207
|
+
},
|
|
1208
|
+
isAmino(o: any): o is VoteAmino {
|
|
1209
|
+
return o && (o.$typeUrl === Vote.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && Array.isArray(o.options) && (!o.options.length || WeightedVoteOption.isAmino(o.options[0])) && typeof o.metadata === "string");
|
|
1210
|
+
},
|
|
1211
|
+
encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1212
|
+
if (message.proposalId !== BigInt(0)) {
|
|
1213
|
+
writer.uint32(8).uint64(message.proposalId);
|
|
1214
|
+
}
|
|
1215
|
+
if (message.voter !== "") {
|
|
1216
|
+
writer.uint32(18).string(message.voter);
|
|
1217
|
+
}
|
|
1218
|
+
for (const v of message.options) {
|
|
1219
|
+
WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
1220
|
+
}
|
|
1221
|
+
if (message.metadata !== "") {
|
|
1222
|
+
writer.uint32(42).string(message.metadata);
|
|
1223
|
+
}
|
|
1224
|
+
return writer;
|
|
1225
|
+
},
|
|
1226
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Vote {
|
|
1227
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1228
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1229
|
+
const message = createBaseVote();
|
|
1230
|
+
while (reader.pos < end) {
|
|
1231
|
+
const tag = reader.uint32();
|
|
1232
|
+
switch (tag >>> 3) {
|
|
1233
|
+
case 1:
|
|
1234
|
+
message.proposalId = reader.uint64();
|
|
1235
|
+
break;
|
|
1236
|
+
case 2:
|
|
1237
|
+
message.voter = reader.string();
|
|
1238
|
+
break;
|
|
1239
|
+
case 4:
|
|
1240
|
+
message.options.push(WeightedVoteOption.decode(reader, reader.uint32()));
|
|
1241
|
+
break;
|
|
1242
|
+
case 5:
|
|
1243
|
+
message.metadata = reader.string();
|
|
1244
|
+
break;
|
|
1245
|
+
default:
|
|
1246
|
+
reader.skipType(tag & 7);
|
|
1247
|
+
break;
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
return message;
|
|
1251
|
+
},
|
|
1252
|
+
fromPartial(object: DeepPartial<Vote>): Vote {
|
|
1253
|
+
const message = createBaseVote();
|
|
1254
|
+
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
1255
|
+
message.voter = object.voter ?? "";
|
|
1256
|
+
message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || [];
|
|
1257
|
+
message.metadata = object.metadata ?? "";
|
|
1258
|
+
return message;
|
|
1259
|
+
},
|
|
1260
|
+
fromAmino(object: VoteAmino): Vote {
|
|
1261
|
+
const message = createBaseVote();
|
|
1262
|
+
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
1263
|
+
message.proposalId = BigInt(object.proposal_id);
|
|
1264
|
+
}
|
|
1265
|
+
if (object.voter !== undefined && object.voter !== null) {
|
|
1266
|
+
message.voter = object.voter;
|
|
1267
|
+
}
|
|
1268
|
+
message.options = object.options?.map(e => WeightedVoteOption.fromAmino(e)) || [];
|
|
1269
|
+
if (object.metadata !== undefined && object.metadata !== null) {
|
|
1270
|
+
message.metadata = object.metadata;
|
|
1271
|
+
}
|
|
1272
|
+
return message;
|
|
1273
|
+
},
|
|
1274
|
+
toAmino(message: Vote): VoteAmino {
|
|
1275
|
+
const obj: any = {};
|
|
1276
|
+
obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
|
|
1277
|
+
obj.voter = message.voter === "" ? undefined : message.voter;
|
|
1278
|
+
if (message.options) {
|
|
1279
|
+
obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined);
|
|
1280
|
+
} else {
|
|
1281
|
+
obj.options = message.options;
|
|
1282
|
+
}
|
|
1283
|
+
obj.metadata = message.metadata === "" ? undefined : message.metadata;
|
|
1284
|
+
return obj;
|
|
1285
|
+
},
|
|
1286
|
+
fromAminoMsg(object: VoteAminoMsg): Vote {
|
|
1287
|
+
return Vote.fromAmino(object.value);
|
|
1288
|
+
},
|
|
1289
|
+
toAminoMsg(message: Vote): VoteAminoMsg {
|
|
1290
|
+
return {
|
|
1291
|
+
type: "cosmos-sdk/v1/Vote",
|
|
1292
|
+
value: Vote.toAmino(message)
|
|
1293
|
+
};
|
|
1294
|
+
},
|
|
1295
|
+
fromProtoMsg(message: VoteProtoMsg): Vote {
|
|
1296
|
+
return Vote.decode(message.value);
|
|
1297
|
+
},
|
|
1298
|
+
toProto(message: Vote): Uint8Array {
|
|
1299
|
+
return Vote.encode(message).finish();
|
|
1300
|
+
},
|
|
1301
|
+
toProtoMsg(message: Vote): VoteProtoMsg {
|
|
1302
|
+
return {
|
|
1303
|
+
typeUrl: "/cosmos.gov.v1.Vote",
|
|
1304
|
+
value: Vote.encode(message).finish()
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
GlobalDecoderRegistry.register(Vote.typeUrl, Vote);
|
|
1309
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Vote.aminoType, Vote.typeUrl);
|
|
1310
|
+
function createBaseDepositParams(): DepositParams {
|
|
1311
|
+
return {
|
|
1312
|
+
minDeposit: [],
|
|
1313
|
+
maxDepositPeriod: undefined
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
export const DepositParams = {
|
|
1317
|
+
typeUrl: "/cosmos.gov.v1.DepositParams",
|
|
1318
|
+
aminoType: "cosmos-sdk/v1/DepositParams",
|
|
1319
|
+
is(o: any): o is DepositParams {
|
|
1320
|
+
return o && (o.$typeUrl === DepositParams.typeUrl || Array.isArray(o.minDeposit) && (!o.minDeposit.length || Coin.is(o.minDeposit[0])));
|
|
1321
|
+
},
|
|
1322
|
+
isAmino(o: any): o is DepositParamsAmino {
|
|
1323
|
+
return o && (o.$typeUrl === DepositParams.typeUrl || Array.isArray(o.min_deposit) && (!o.min_deposit.length || Coin.isAmino(o.min_deposit[0])));
|
|
1324
|
+
},
|
|
1325
|
+
encode(message: DepositParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1326
|
+
for (const v of message.minDeposit) {
|
|
1327
|
+
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1328
|
+
}
|
|
1329
|
+
if (message.maxDepositPeriod !== undefined) {
|
|
1330
|
+
Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim();
|
|
1331
|
+
}
|
|
1332
|
+
return writer;
|
|
1333
|
+
},
|
|
1334
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DepositParams {
|
|
1335
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1336
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1337
|
+
const message = createBaseDepositParams();
|
|
1338
|
+
while (reader.pos < end) {
|
|
1339
|
+
const tag = reader.uint32();
|
|
1340
|
+
switch (tag >>> 3) {
|
|
1341
|
+
case 1:
|
|
1342
|
+
message.minDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
1343
|
+
break;
|
|
1344
|
+
case 2:
|
|
1345
|
+
message.maxDepositPeriod = Duration.decode(reader, reader.uint32());
|
|
1346
|
+
break;
|
|
1347
|
+
default:
|
|
1348
|
+
reader.skipType(tag & 7);
|
|
1349
|
+
break;
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
return message;
|
|
1353
|
+
},
|
|
1354
|
+
fromPartial(object: DeepPartial<DepositParams>): DepositParams {
|
|
1355
|
+
const message = createBaseDepositParams();
|
|
1356
|
+
message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
1357
|
+
message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? Duration.fromPartial(object.maxDepositPeriod) : undefined;
|
|
1358
|
+
return message;
|
|
1359
|
+
},
|
|
1360
|
+
fromAmino(object: DepositParamsAmino): DepositParams {
|
|
1361
|
+
const message = createBaseDepositParams();
|
|
1362
|
+
message.minDeposit = object.min_deposit?.map(e => Coin.fromAmino(e)) || [];
|
|
1363
|
+
if (object.max_deposit_period !== undefined && object.max_deposit_period !== null) {
|
|
1364
|
+
message.maxDepositPeriod = Duration.fromAmino(object.max_deposit_period);
|
|
1365
|
+
}
|
|
1366
|
+
return message;
|
|
1367
|
+
},
|
|
1368
|
+
toAmino(message: DepositParams): DepositParamsAmino {
|
|
1369
|
+
const obj: any = {};
|
|
1370
|
+
if (message.minDeposit) {
|
|
1371
|
+
obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
1372
|
+
} else {
|
|
1373
|
+
obj.min_deposit = message.minDeposit;
|
|
1374
|
+
}
|
|
1375
|
+
obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod) : undefined;
|
|
1376
|
+
return obj;
|
|
1377
|
+
},
|
|
1378
|
+
fromAminoMsg(object: DepositParamsAminoMsg): DepositParams {
|
|
1379
|
+
return DepositParams.fromAmino(object.value);
|
|
1380
|
+
},
|
|
1381
|
+
toAminoMsg(message: DepositParams): DepositParamsAminoMsg {
|
|
1382
|
+
return {
|
|
1383
|
+
type: "cosmos-sdk/v1/DepositParams",
|
|
1384
|
+
value: DepositParams.toAmino(message)
|
|
1385
|
+
};
|
|
1386
|
+
},
|
|
1387
|
+
fromProtoMsg(message: DepositParamsProtoMsg): DepositParams {
|
|
1388
|
+
return DepositParams.decode(message.value);
|
|
1389
|
+
},
|
|
1390
|
+
toProto(message: DepositParams): Uint8Array {
|
|
1391
|
+
return DepositParams.encode(message).finish();
|
|
1392
|
+
},
|
|
1393
|
+
toProtoMsg(message: DepositParams): DepositParamsProtoMsg {
|
|
1394
|
+
return {
|
|
1395
|
+
typeUrl: "/cosmos.gov.v1.DepositParams",
|
|
1396
|
+
value: DepositParams.encode(message).finish()
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1399
|
+
};
|
|
1400
|
+
GlobalDecoderRegistry.register(DepositParams.typeUrl, DepositParams);
|
|
1401
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(DepositParams.aminoType, DepositParams.typeUrl);
|
|
1402
|
+
function createBaseVotingParams(): VotingParams {
|
|
1403
|
+
return {
|
|
1404
|
+
votingPeriod: undefined
|
|
1405
|
+
};
|
|
1406
|
+
}
|
|
1407
|
+
export const VotingParams = {
|
|
1408
|
+
typeUrl: "/cosmos.gov.v1.VotingParams",
|
|
1409
|
+
aminoType: "cosmos-sdk/v1/VotingParams",
|
|
1410
|
+
is(o: any): o is VotingParams {
|
|
1411
|
+
return o && o.$typeUrl === VotingParams.typeUrl;
|
|
1412
|
+
},
|
|
1413
|
+
isAmino(o: any): o is VotingParamsAmino {
|
|
1414
|
+
return o && o.$typeUrl === VotingParams.typeUrl;
|
|
1415
|
+
},
|
|
1416
|
+
encode(message: VotingParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1417
|
+
if (message.votingPeriod !== undefined) {
|
|
1418
|
+
Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim();
|
|
1419
|
+
}
|
|
1420
|
+
return writer;
|
|
1421
|
+
},
|
|
1422
|
+
decode(input: BinaryReader | Uint8Array, length?: number): VotingParams {
|
|
1423
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1424
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1425
|
+
const message = createBaseVotingParams();
|
|
1426
|
+
while (reader.pos < end) {
|
|
1427
|
+
const tag = reader.uint32();
|
|
1428
|
+
switch (tag >>> 3) {
|
|
1429
|
+
case 1:
|
|
1430
|
+
message.votingPeriod = Duration.decode(reader, reader.uint32());
|
|
1431
|
+
break;
|
|
1432
|
+
default:
|
|
1433
|
+
reader.skipType(tag & 7);
|
|
1434
|
+
break;
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
return message;
|
|
1438
|
+
},
|
|
1439
|
+
fromPartial(object: DeepPartial<VotingParams>): VotingParams {
|
|
1440
|
+
const message = createBaseVotingParams();
|
|
1441
|
+
message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined;
|
|
1442
|
+
return message;
|
|
1443
|
+
},
|
|
1444
|
+
fromAmino(object: VotingParamsAmino): VotingParams {
|
|
1445
|
+
const message = createBaseVotingParams();
|
|
1446
|
+
if (object.voting_period !== undefined && object.voting_period !== null) {
|
|
1447
|
+
message.votingPeriod = Duration.fromAmino(object.voting_period);
|
|
1448
|
+
}
|
|
1449
|
+
return message;
|
|
1450
|
+
},
|
|
1451
|
+
toAmino(message: VotingParams): VotingParamsAmino {
|
|
1452
|
+
const obj: any = {};
|
|
1453
|
+
obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined;
|
|
1454
|
+
return obj;
|
|
1455
|
+
},
|
|
1456
|
+
fromAminoMsg(object: VotingParamsAminoMsg): VotingParams {
|
|
1457
|
+
return VotingParams.fromAmino(object.value);
|
|
1458
|
+
},
|
|
1459
|
+
toAminoMsg(message: VotingParams): VotingParamsAminoMsg {
|
|
1460
|
+
return {
|
|
1461
|
+
type: "cosmos-sdk/v1/VotingParams",
|
|
1462
|
+
value: VotingParams.toAmino(message)
|
|
1463
|
+
};
|
|
1464
|
+
},
|
|
1465
|
+
fromProtoMsg(message: VotingParamsProtoMsg): VotingParams {
|
|
1466
|
+
return VotingParams.decode(message.value);
|
|
1467
|
+
},
|
|
1468
|
+
toProto(message: VotingParams): Uint8Array {
|
|
1469
|
+
return VotingParams.encode(message).finish();
|
|
1470
|
+
},
|
|
1471
|
+
toProtoMsg(message: VotingParams): VotingParamsProtoMsg {
|
|
1472
|
+
return {
|
|
1473
|
+
typeUrl: "/cosmos.gov.v1.VotingParams",
|
|
1474
|
+
value: VotingParams.encode(message).finish()
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
GlobalDecoderRegistry.register(VotingParams.typeUrl, VotingParams);
|
|
1479
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(VotingParams.aminoType, VotingParams.typeUrl);
|
|
1480
|
+
function createBaseTallyParams(): TallyParams {
|
|
1481
|
+
return {
|
|
1482
|
+
quorum: "",
|
|
1483
|
+
threshold: "",
|
|
1484
|
+
vetoThreshold: ""
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
export const TallyParams = {
|
|
1488
|
+
typeUrl: "/cosmos.gov.v1.TallyParams",
|
|
1489
|
+
aminoType: "cosmos-sdk/v1/TallyParams",
|
|
1490
|
+
is(o: any): o is TallyParams {
|
|
1491
|
+
return o && (o.$typeUrl === TallyParams.typeUrl || typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.vetoThreshold === "string");
|
|
1492
|
+
},
|
|
1493
|
+
isAmino(o: any): o is TallyParamsAmino {
|
|
1494
|
+
return o && (o.$typeUrl === TallyParams.typeUrl || typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.veto_threshold === "string");
|
|
1495
|
+
},
|
|
1496
|
+
encode(message: TallyParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1497
|
+
if (message.quorum !== "") {
|
|
1498
|
+
writer.uint32(10).string(message.quorum);
|
|
1499
|
+
}
|
|
1500
|
+
if (message.threshold !== "") {
|
|
1501
|
+
writer.uint32(18).string(message.threshold);
|
|
1502
|
+
}
|
|
1503
|
+
if (message.vetoThreshold !== "") {
|
|
1504
|
+
writer.uint32(26).string(message.vetoThreshold);
|
|
1505
|
+
}
|
|
1506
|
+
return writer;
|
|
1507
|
+
},
|
|
1508
|
+
decode(input: BinaryReader | Uint8Array, length?: number): TallyParams {
|
|
1509
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1510
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1511
|
+
const message = createBaseTallyParams();
|
|
1512
|
+
while (reader.pos < end) {
|
|
1513
|
+
const tag = reader.uint32();
|
|
1514
|
+
switch (tag >>> 3) {
|
|
1515
|
+
case 1:
|
|
1516
|
+
message.quorum = reader.string();
|
|
1517
|
+
break;
|
|
1518
|
+
case 2:
|
|
1519
|
+
message.threshold = reader.string();
|
|
1520
|
+
break;
|
|
1521
|
+
case 3:
|
|
1522
|
+
message.vetoThreshold = reader.string();
|
|
1523
|
+
break;
|
|
1524
|
+
default:
|
|
1525
|
+
reader.skipType(tag & 7);
|
|
1526
|
+
break;
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
return message;
|
|
1530
|
+
},
|
|
1531
|
+
fromPartial(object: DeepPartial<TallyParams>): TallyParams {
|
|
1532
|
+
const message = createBaseTallyParams();
|
|
1533
|
+
message.quorum = object.quorum ?? "";
|
|
1534
|
+
message.threshold = object.threshold ?? "";
|
|
1535
|
+
message.vetoThreshold = object.vetoThreshold ?? "";
|
|
1536
|
+
return message;
|
|
1537
|
+
},
|
|
1538
|
+
fromAmino(object: TallyParamsAmino): TallyParams {
|
|
1539
|
+
const message = createBaseTallyParams();
|
|
1540
|
+
if (object.quorum !== undefined && object.quorum !== null) {
|
|
1541
|
+
message.quorum = object.quorum;
|
|
1542
|
+
}
|
|
1543
|
+
if (object.threshold !== undefined && object.threshold !== null) {
|
|
1544
|
+
message.threshold = object.threshold;
|
|
1545
|
+
}
|
|
1546
|
+
if (object.veto_threshold !== undefined && object.veto_threshold !== null) {
|
|
1547
|
+
message.vetoThreshold = object.veto_threshold;
|
|
1548
|
+
}
|
|
1549
|
+
return message;
|
|
1550
|
+
},
|
|
1551
|
+
toAmino(message: TallyParams): TallyParamsAmino {
|
|
1552
|
+
const obj: any = {};
|
|
1553
|
+
obj.quorum = message.quorum === "" ? undefined : message.quorum;
|
|
1554
|
+
obj.threshold = message.threshold === "" ? undefined : message.threshold;
|
|
1555
|
+
obj.veto_threshold = message.vetoThreshold === "" ? undefined : message.vetoThreshold;
|
|
1556
|
+
return obj;
|
|
1557
|
+
},
|
|
1558
|
+
fromAminoMsg(object: TallyParamsAminoMsg): TallyParams {
|
|
1559
|
+
return TallyParams.fromAmino(object.value);
|
|
1560
|
+
},
|
|
1561
|
+
toAminoMsg(message: TallyParams): TallyParamsAminoMsg {
|
|
1562
|
+
return {
|
|
1563
|
+
type: "cosmos-sdk/v1/TallyParams",
|
|
1564
|
+
value: TallyParams.toAmino(message)
|
|
1565
|
+
};
|
|
1566
|
+
},
|
|
1567
|
+
fromProtoMsg(message: TallyParamsProtoMsg): TallyParams {
|
|
1568
|
+
return TallyParams.decode(message.value);
|
|
1569
|
+
},
|
|
1570
|
+
toProto(message: TallyParams): Uint8Array {
|
|
1571
|
+
return TallyParams.encode(message).finish();
|
|
1572
|
+
},
|
|
1573
|
+
toProtoMsg(message: TallyParams): TallyParamsProtoMsg {
|
|
1574
|
+
return {
|
|
1575
|
+
typeUrl: "/cosmos.gov.v1.TallyParams",
|
|
1576
|
+
value: TallyParams.encode(message).finish()
|
|
1577
|
+
};
|
|
1578
|
+
}
|
|
1579
|
+
};
|
|
1580
|
+
GlobalDecoderRegistry.register(TallyParams.typeUrl, TallyParams);
|
|
1581
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(TallyParams.aminoType, TallyParams.typeUrl);
|
|
1582
|
+
function createBaseParams(): Params {
|
|
1583
|
+
return {
|
|
1584
|
+
minDeposit: [],
|
|
1585
|
+
maxDepositPeriod: undefined,
|
|
1586
|
+
votingPeriod: undefined,
|
|
1587
|
+
quorum: "",
|
|
1588
|
+
threshold: "",
|
|
1589
|
+
vetoThreshold: "",
|
|
1590
|
+
minInitialDepositRatio: "",
|
|
1591
|
+
proposalCancelRatio: "",
|
|
1592
|
+
proposalCancelDest: "",
|
|
1593
|
+
expeditedVotingPeriod: undefined,
|
|
1594
|
+
expeditedThreshold: "",
|
|
1595
|
+
expeditedMinDeposit: [],
|
|
1596
|
+
burnVoteQuorum: false,
|
|
1597
|
+
burnProposalDepositPrevote: false,
|
|
1598
|
+
burnVoteVeto: false,
|
|
1599
|
+
minDepositRatio: ""
|
|
1600
|
+
};
|
|
1601
|
+
}
|
|
1602
|
+
export const Params = {
|
|
1603
|
+
typeUrl: "/cosmos.gov.v1.Params",
|
|
1604
|
+
aminoType: "cosmos-sdk/v1/Params",
|
|
1605
|
+
is(o: any): o is Params {
|
|
1606
|
+
return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.minDeposit) && (!o.minDeposit.length || Coin.is(o.minDeposit[0])) && typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.vetoThreshold === "string" && typeof o.minInitialDepositRatio === "string" && typeof o.proposalCancelRatio === "string" && typeof o.proposalCancelDest === "string" && typeof o.expeditedThreshold === "string" && Array.isArray(o.expeditedMinDeposit) && (!o.expeditedMinDeposit.length || Coin.is(o.expeditedMinDeposit[0])) && typeof o.burnVoteQuorum === "boolean" && typeof o.burnProposalDepositPrevote === "boolean" && typeof o.burnVoteVeto === "boolean" && typeof o.minDepositRatio === "string");
|
|
1607
|
+
},
|
|
1608
|
+
isAmino(o: any): o is ParamsAmino {
|
|
1609
|
+
return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.min_deposit) && (!o.min_deposit.length || Coin.isAmino(o.min_deposit[0])) && typeof o.quorum === "string" && typeof o.threshold === "string" && typeof o.veto_threshold === "string" && typeof o.min_initial_deposit_ratio === "string" && typeof o.proposal_cancel_ratio === "string" && typeof o.proposal_cancel_dest === "string" && typeof o.expedited_threshold === "string" && Array.isArray(o.expedited_min_deposit) && (!o.expedited_min_deposit.length || Coin.isAmino(o.expedited_min_deposit[0])) && typeof o.burn_vote_quorum === "boolean" && typeof o.burn_proposal_deposit_prevote === "boolean" && typeof o.burn_vote_veto === "boolean" && typeof o.min_deposit_ratio === "string");
|
|
1610
|
+
},
|
|
1611
|
+
encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
1612
|
+
for (const v of message.minDeposit) {
|
|
1613
|
+
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1614
|
+
}
|
|
1615
|
+
if (message.maxDepositPeriod !== undefined) {
|
|
1616
|
+
Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim();
|
|
1617
|
+
}
|
|
1618
|
+
if (message.votingPeriod !== undefined) {
|
|
1619
|
+
Duration.encode(message.votingPeriod, writer.uint32(26).fork()).ldelim();
|
|
1620
|
+
}
|
|
1621
|
+
if (message.quorum !== "") {
|
|
1622
|
+
writer.uint32(34).string(message.quorum);
|
|
1623
|
+
}
|
|
1624
|
+
if (message.threshold !== "") {
|
|
1625
|
+
writer.uint32(42).string(message.threshold);
|
|
1626
|
+
}
|
|
1627
|
+
if (message.vetoThreshold !== "") {
|
|
1628
|
+
writer.uint32(50).string(message.vetoThreshold);
|
|
1629
|
+
}
|
|
1630
|
+
if (message.minInitialDepositRatio !== "") {
|
|
1631
|
+
writer.uint32(58).string(message.minInitialDepositRatio);
|
|
1632
|
+
}
|
|
1633
|
+
if (message.proposalCancelRatio !== "") {
|
|
1634
|
+
writer.uint32(66).string(message.proposalCancelRatio);
|
|
1635
|
+
}
|
|
1636
|
+
if (message.proposalCancelDest !== "") {
|
|
1637
|
+
writer.uint32(74).string(message.proposalCancelDest);
|
|
1638
|
+
}
|
|
1639
|
+
if (message.expeditedVotingPeriod !== undefined) {
|
|
1640
|
+
Duration.encode(message.expeditedVotingPeriod, writer.uint32(82).fork()).ldelim();
|
|
1641
|
+
}
|
|
1642
|
+
if (message.expeditedThreshold !== "") {
|
|
1643
|
+
writer.uint32(90).string(message.expeditedThreshold);
|
|
1644
|
+
}
|
|
1645
|
+
for (const v of message.expeditedMinDeposit) {
|
|
1646
|
+
Coin.encode(v!, writer.uint32(98).fork()).ldelim();
|
|
1647
|
+
}
|
|
1648
|
+
if (message.burnVoteQuorum === true) {
|
|
1649
|
+
writer.uint32(104).bool(message.burnVoteQuorum);
|
|
1650
|
+
}
|
|
1651
|
+
if (message.burnProposalDepositPrevote === true) {
|
|
1652
|
+
writer.uint32(112).bool(message.burnProposalDepositPrevote);
|
|
1653
|
+
}
|
|
1654
|
+
if (message.burnVoteVeto === true) {
|
|
1655
|
+
writer.uint32(120).bool(message.burnVoteVeto);
|
|
1656
|
+
}
|
|
1657
|
+
if (message.minDepositRatio !== "") {
|
|
1658
|
+
writer.uint32(130).string(message.minDepositRatio);
|
|
1659
|
+
}
|
|
1660
|
+
return writer;
|
|
1661
|
+
},
|
|
1662
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Params {
|
|
1663
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1664
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1665
|
+
const message = createBaseParams();
|
|
1666
|
+
while (reader.pos < end) {
|
|
1667
|
+
const tag = reader.uint32();
|
|
1668
|
+
switch (tag >>> 3) {
|
|
1669
|
+
case 1:
|
|
1670
|
+
message.minDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
1671
|
+
break;
|
|
1672
|
+
case 2:
|
|
1673
|
+
message.maxDepositPeriod = Duration.decode(reader, reader.uint32());
|
|
1674
|
+
break;
|
|
1675
|
+
case 3:
|
|
1676
|
+
message.votingPeriod = Duration.decode(reader, reader.uint32());
|
|
1677
|
+
break;
|
|
1678
|
+
case 4:
|
|
1679
|
+
message.quorum = reader.string();
|
|
1680
|
+
break;
|
|
1681
|
+
case 5:
|
|
1682
|
+
message.threshold = reader.string();
|
|
1683
|
+
break;
|
|
1684
|
+
case 6:
|
|
1685
|
+
message.vetoThreshold = reader.string();
|
|
1686
|
+
break;
|
|
1687
|
+
case 7:
|
|
1688
|
+
message.minInitialDepositRatio = reader.string();
|
|
1689
|
+
break;
|
|
1690
|
+
case 8:
|
|
1691
|
+
message.proposalCancelRatio = reader.string();
|
|
1692
|
+
break;
|
|
1693
|
+
case 9:
|
|
1694
|
+
message.proposalCancelDest = reader.string();
|
|
1695
|
+
break;
|
|
1696
|
+
case 10:
|
|
1697
|
+
message.expeditedVotingPeriod = Duration.decode(reader, reader.uint32());
|
|
1698
|
+
break;
|
|
1699
|
+
case 11:
|
|
1700
|
+
message.expeditedThreshold = reader.string();
|
|
1701
|
+
break;
|
|
1702
|
+
case 12:
|
|
1703
|
+
message.expeditedMinDeposit.push(Coin.decode(reader, reader.uint32()));
|
|
1704
|
+
break;
|
|
1705
|
+
case 13:
|
|
1706
|
+
message.burnVoteQuorum = reader.bool();
|
|
1707
|
+
break;
|
|
1708
|
+
case 14:
|
|
1709
|
+
message.burnProposalDepositPrevote = reader.bool();
|
|
1710
|
+
break;
|
|
1711
|
+
case 15:
|
|
1712
|
+
message.burnVoteVeto = reader.bool();
|
|
1713
|
+
break;
|
|
1714
|
+
case 16:
|
|
1715
|
+
message.minDepositRatio = reader.string();
|
|
1716
|
+
break;
|
|
1717
|
+
default:
|
|
1718
|
+
reader.skipType(tag & 7);
|
|
1719
|
+
break;
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
return message;
|
|
1723
|
+
},
|
|
1724
|
+
fromPartial(object: DeepPartial<Params>): Params {
|
|
1725
|
+
const message = createBaseParams();
|
|
1726
|
+
message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
1727
|
+
message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? Duration.fromPartial(object.maxDepositPeriod) : undefined;
|
|
1728
|
+
message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined;
|
|
1729
|
+
message.quorum = object.quorum ?? "";
|
|
1730
|
+
message.threshold = object.threshold ?? "";
|
|
1731
|
+
message.vetoThreshold = object.vetoThreshold ?? "";
|
|
1732
|
+
message.minInitialDepositRatio = object.minInitialDepositRatio ?? "";
|
|
1733
|
+
message.proposalCancelRatio = object.proposalCancelRatio ?? "";
|
|
1734
|
+
message.proposalCancelDest = object.proposalCancelDest ?? "";
|
|
1735
|
+
message.expeditedVotingPeriod = object.expeditedVotingPeriod !== undefined && object.expeditedVotingPeriod !== null ? Duration.fromPartial(object.expeditedVotingPeriod) : undefined;
|
|
1736
|
+
message.expeditedThreshold = object.expeditedThreshold ?? "";
|
|
1737
|
+
message.expeditedMinDeposit = object.expeditedMinDeposit?.map(e => Coin.fromPartial(e)) || [];
|
|
1738
|
+
message.burnVoteQuorum = object.burnVoteQuorum ?? false;
|
|
1739
|
+
message.burnProposalDepositPrevote = object.burnProposalDepositPrevote ?? false;
|
|
1740
|
+
message.burnVoteVeto = object.burnVoteVeto ?? false;
|
|
1741
|
+
message.minDepositRatio = object.minDepositRatio ?? "";
|
|
1742
|
+
return message;
|
|
1743
|
+
},
|
|
1744
|
+
fromAmino(object: ParamsAmino): Params {
|
|
1745
|
+
const message = createBaseParams();
|
|
1746
|
+
message.minDeposit = object.min_deposit?.map(e => Coin.fromAmino(e)) || [];
|
|
1747
|
+
if (object.max_deposit_period !== undefined && object.max_deposit_period !== null) {
|
|
1748
|
+
message.maxDepositPeriod = Duration.fromAmino(object.max_deposit_period);
|
|
1749
|
+
}
|
|
1750
|
+
if (object.voting_period !== undefined && object.voting_period !== null) {
|
|
1751
|
+
message.votingPeriod = Duration.fromAmino(object.voting_period);
|
|
1752
|
+
}
|
|
1753
|
+
if (object.quorum !== undefined && object.quorum !== null) {
|
|
1754
|
+
message.quorum = object.quorum;
|
|
1755
|
+
}
|
|
1756
|
+
if (object.threshold !== undefined && object.threshold !== null) {
|
|
1757
|
+
message.threshold = object.threshold;
|
|
1758
|
+
}
|
|
1759
|
+
if (object.veto_threshold !== undefined && object.veto_threshold !== null) {
|
|
1760
|
+
message.vetoThreshold = object.veto_threshold;
|
|
1761
|
+
}
|
|
1762
|
+
if (object.min_initial_deposit_ratio !== undefined && object.min_initial_deposit_ratio !== null) {
|
|
1763
|
+
message.minInitialDepositRatio = object.min_initial_deposit_ratio;
|
|
1764
|
+
}
|
|
1765
|
+
if (object.proposal_cancel_ratio !== undefined && object.proposal_cancel_ratio !== null) {
|
|
1766
|
+
message.proposalCancelRatio = object.proposal_cancel_ratio;
|
|
1767
|
+
}
|
|
1768
|
+
if (object.proposal_cancel_dest !== undefined && object.proposal_cancel_dest !== null) {
|
|
1769
|
+
message.proposalCancelDest = object.proposal_cancel_dest;
|
|
1770
|
+
}
|
|
1771
|
+
if (object.expedited_voting_period !== undefined && object.expedited_voting_period !== null) {
|
|
1772
|
+
message.expeditedVotingPeriod = Duration.fromAmino(object.expedited_voting_period);
|
|
1773
|
+
}
|
|
1774
|
+
if (object.expedited_threshold !== undefined && object.expedited_threshold !== null) {
|
|
1775
|
+
message.expeditedThreshold = object.expedited_threshold;
|
|
1776
|
+
}
|
|
1777
|
+
message.expeditedMinDeposit = object.expedited_min_deposit?.map(e => Coin.fromAmino(e)) || [];
|
|
1778
|
+
if (object.burn_vote_quorum !== undefined && object.burn_vote_quorum !== null) {
|
|
1779
|
+
message.burnVoteQuorum = object.burn_vote_quorum;
|
|
1780
|
+
}
|
|
1781
|
+
if (object.burn_proposal_deposit_prevote !== undefined && object.burn_proposal_deposit_prevote !== null) {
|
|
1782
|
+
message.burnProposalDepositPrevote = object.burn_proposal_deposit_prevote;
|
|
1783
|
+
}
|
|
1784
|
+
if (object.burn_vote_veto !== undefined && object.burn_vote_veto !== null) {
|
|
1785
|
+
message.burnVoteVeto = object.burn_vote_veto;
|
|
1786
|
+
}
|
|
1787
|
+
if (object.min_deposit_ratio !== undefined && object.min_deposit_ratio !== null) {
|
|
1788
|
+
message.minDepositRatio = object.min_deposit_ratio;
|
|
1789
|
+
}
|
|
1790
|
+
return message;
|
|
1791
|
+
},
|
|
1792
|
+
toAmino(message: Params): ParamsAmino {
|
|
1793
|
+
const obj: any = {};
|
|
1794
|
+
if (message.minDeposit) {
|
|
1795
|
+
obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
1796
|
+
} else {
|
|
1797
|
+
obj.min_deposit = message.minDeposit;
|
|
1798
|
+
}
|
|
1799
|
+
obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod) : undefined;
|
|
1800
|
+
obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined;
|
|
1801
|
+
obj.quorum = message.quorum === "" ? undefined : message.quorum;
|
|
1802
|
+
obj.threshold = message.threshold === "" ? undefined : message.threshold;
|
|
1803
|
+
obj.veto_threshold = message.vetoThreshold === "" ? undefined : message.vetoThreshold;
|
|
1804
|
+
obj.min_initial_deposit_ratio = message.minInitialDepositRatio === "" ? undefined : message.minInitialDepositRatio;
|
|
1805
|
+
obj.proposal_cancel_ratio = message.proposalCancelRatio === "" ? undefined : message.proposalCancelRatio;
|
|
1806
|
+
obj.proposal_cancel_dest = message.proposalCancelDest === "" ? undefined : message.proposalCancelDest;
|
|
1807
|
+
obj.expedited_voting_period = message.expeditedVotingPeriod ? Duration.toAmino(message.expeditedVotingPeriod) : undefined;
|
|
1808
|
+
obj.expedited_threshold = message.expeditedThreshold === "" ? undefined : message.expeditedThreshold;
|
|
1809
|
+
if (message.expeditedMinDeposit) {
|
|
1810
|
+
obj.expedited_min_deposit = message.expeditedMinDeposit.map(e => e ? Coin.toAmino(e) : undefined);
|
|
1811
|
+
} else {
|
|
1812
|
+
obj.expedited_min_deposit = message.expeditedMinDeposit;
|
|
1813
|
+
}
|
|
1814
|
+
obj.burn_vote_quorum = message.burnVoteQuorum === false ? undefined : message.burnVoteQuorum;
|
|
1815
|
+
obj.burn_proposal_deposit_prevote = message.burnProposalDepositPrevote === false ? undefined : message.burnProposalDepositPrevote;
|
|
1816
|
+
obj.burn_vote_veto = message.burnVoteVeto === false ? undefined : message.burnVoteVeto;
|
|
1817
|
+
obj.min_deposit_ratio = message.minDepositRatio === "" ? undefined : message.minDepositRatio;
|
|
1818
|
+
return obj;
|
|
1819
|
+
},
|
|
1820
|
+
fromAminoMsg(object: ParamsAminoMsg): Params {
|
|
1821
|
+
return Params.fromAmino(object.value);
|
|
1822
|
+
},
|
|
1823
|
+
toAminoMsg(message: Params): ParamsAminoMsg {
|
|
1824
|
+
return {
|
|
1825
|
+
type: "cosmos-sdk/v1/Params",
|
|
1826
|
+
value: Params.toAmino(message)
|
|
1827
|
+
};
|
|
1828
|
+
},
|
|
1829
|
+
fromProtoMsg(message: ParamsProtoMsg): Params {
|
|
1830
|
+
return Params.decode(message.value);
|
|
1831
|
+
},
|
|
1832
|
+
toProto(message: Params): Uint8Array {
|
|
1833
|
+
return Params.encode(message).finish();
|
|
1834
|
+
},
|
|
1835
|
+
toProtoMsg(message: Params): ParamsProtoMsg {
|
|
1836
|
+
return {
|
|
1837
|
+
typeUrl: "/cosmos.gov.v1.Params",
|
|
1838
|
+
value: Params.encode(message).finish()
|
|
1839
|
+
};
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
GlobalDecoderRegistry.register(Params.typeUrl, Params);
|
|
1843
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl);
|