juno-network 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +0 -2
- package/main/codegen/JunoSwap.client.js +44 -42
- package/module/codegen/JunoSwap.client.js +180 -0
- package/module/codegen/JunoSwap.types.js +1 -0
- package/module/codegen/confio/proofs.js +1152 -0
- package/module/codegen/contracts.js +18 -0
- package/module/codegen/cosmos/app/v1alpha1/config.js +148 -0
- package/module/codegen/cosmos/app/v1alpha1/module.js +227 -0
- package/module/codegen/cosmos/app/v1alpha1/query.js +104 -0
- package/module/codegen/cosmos/app/v1alpha1/query.rpc.query.js +20 -0
- package/module/codegen/cosmos/auth/v1beta1/auth.js +297 -0
- package/module/codegen/cosmos/auth/v1beta1/genesis.js +82 -0
- package/module/codegen/cosmos/auth/v1beta1/query.js +806 -0
- package/module/codegen/cosmos/auth/v1beta1/query.lcd.js +73 -0
- package/module/codegen/cosmos/auth/v1beta1/query.rpc.query.js +62 -0
- package/module/codegen/cosmos/authz/v1beta1/authz.js +236 -0
- package/module/codegen/cosmos/authz/v1beta1/event.js +135 -0
- package/module/codegen/cosmos/authz/v1beta1/genesis.js +49 -0
- package/module/codegen/cosmos/authz/v1beta1/query.js +365 -0
- package/module/codegen/cosmos/authz/v1beta1/query.lcd.js +76 -0
- package/module/codegen/cosmos/authz/v1beta1/query.rpc.query.js +53 -0
- package/module/codegen/cosmos/authz/v1beta1/tx.amino.js +91 -0
- package/module/codegen/cosmos/authz/v1beta1/tx.js +309 -0
- package/module/codegen/cosmos/authz/v1beta1/tx.registry.js +124 -0
- package/module/codegen/cosmos/authz/v1beta1/tx.rpc.msg.js +34 -0
- package/module/codegen/cosmos/bank/v1beta1/authz.js +49 -0
- package/module/codegen/cosmos/bank/v1beta1/bank.js +461 -0
- package/module/codegen/cosmos/bank/v1beta1/genesis.js +137 -0
- package/module/codegen/cosmos/bank/v1beta1/query.js +972 -0
- package/module/codegen/cosmos/bank/v1beta1/query.lcd.js +147 -0
- package/module/codegen/cosmos/bank/v1beta1/query.rpc.query.js +123 -0
- package/module/codegen/cosmos/bank/v1beta1/tx.amino.js +78 -0
- package/module/codegen/cosmos/bank/v1beta1/tx.js +195 -0
- package/module/codegen/cosmos/bank/v1beta1/tx.registry.js +57 -0
- package/module/codegen/cosmos/bank/v1beta1/tx.rpc.msg.js +27 -0
- package/module/codegen/cosmos/base/abci/v1beta1/abci.js +754 -0
- package/module/codegen/cosmos/base/kv/v1beta1/kv.js +139 -0
- package/module/codegen/cosmos/base/query/v1beta1/pagination.js +155 -0
- package/module/codegen/cosmos/base/reflection/v1beta1/reflection.js +235 -0
- package/module/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1281 -0
- package/module/codegen/cosmos/base/snapshots/v1beta1/snapshot.js +712 -0
- package/module/codegen/cosmos/base/store/v1beta1/commit_info.js +225 -0
- package/module/codegen/cosmos/base/store/v1beta1/listening.js +104 -0
- package/module/codegen/cosmos/base/tendermint/v1beta1/query.js +1091 -0
- package/module/codegen/cosmos/base/tendermint/v1beta1/query.lcd.js +72 -0
- package/module/codegen/cosmos/base/tendermint/v1beta1/query.rpc.svc.js +55 -0
- package/module/codegen/cosmos/base/v1beta1/coin.js +209 -0
- package/module/codegen/cosmos/bundle.js +190 -0
- package/module/codegen/cosmos/capability/v1beta1/capability.js +199 -0
- package/module/codegen/cosmos/capability/v1beta1/genesis.js +150 -0
- package/module/codegen/cosmos/client.js +44 -0
- package/module/codegen/cosmos/crisis/v1beta1/genesis.js +61 -0
- package/module/codegen/cosmos/crisis/v1beta1/tx.amino.js +27 -0
- package/module/codegen/cosmos/crisis/v1beta1/tx.js +129 -0
- package/module/codegen/cosmos/crisis/v1beta1/tx.registry.js +54 -0
- package/module/codegen/cosmos/crisis/v1beta1/tx.rpc.msg.js +20 -0
- package/module/codegen/cosmos/crypto/ed25519/keys.js +95 -0
- package/module/codegen/cosmos/crypto/hd/v1/hd.js +88 -0
- package/module/codegen/cosmos/crypto/keyring/v1/record.js +270 -0
- package/module/codegen/cosmos/crypto/multisig/keys.js +59 -0
- package/module/codegen/cosmos/crypto/multisig/v1beta1/multisig.js +105 -0
- package/module/codegen/cosmos/crypto/secp256k1/keys.js +95 -0
- package/module/codegen/cosmos/crypto/secp256r1/keys.js +95 -0
- package/module/codegen/cosmos/distribution/v1beta1/distribution.js +728 -0
- package/module/codegen/cosmos/distribution/v1beta1/genesis.js +585 -0
- package/module/codegen/cosmos/distribution/v1beta1/query.js +880 -0
- package/module/codegen/cosmos/distribution/v1beta1/query.lcd.js +101 -0
- package/module/codegen/cosmos/distribution/v1beta1/query.rpc.query.js +119 -0
- package/module/codegen/cosmos/distribution/v1beta1/tx.amino.js +88 -0
- package/module/codegen/cosmos/distribution/v1beta1/tx.js +382 -0
- package/module/codegen/cosmos/distribution/v1beta1/tx.registry.js +99 -0
- package/module/codegen/cosmos/distribution/v1beta1/tx.rpc.msg.js +41 -0
- package/module/codegen/cosmos/evidence/v1beta1/evidence.js +102 -0
- package/module/codegen/cosmos/evidence/v1beta1/genesis.js +67 -0
- package/module/codegen/cosmos/evidence/v1beta1/query.js +255 -0
- package/module/codegen/cosmos/evidence/v1beta1/query.lcd.js +36 -0
- package/module/codegen/cosmos/evidence/v1beta1/query.rpc.query.js +27 -0
- package/module/codegen/cosmos/evidence/v1beta1/tx.amino.js +29 -0
- package/module/codegen/cosmos/evidence/v1beta1/tx.js +137 -0
- package/module/codegen/cosmos/evidence/v1beta1/tx.registry.js +54 -0
- package/module/codegen/cosmos/evidence/v1beta1/tx.rpc.msg.js +20 -0
- package/module/codegen/cosmos/feegrant/v1beta1/feegrant.js +365 -0
- package/module/codegen/cosmos/feegrant/v1beta1/genesis.js +67 -0
- package/module/codegen/cosmos/feegrant/v1beta1/query.js +429 -0
- package/module/codegen/cosmos/feegrant/v1beta1/query.lcd.js +50 -0
- package/module/codegen/cosmos/feegrant/v1beta1/query.rpc.query.js +34 -0
- package/module/codegen/cosmos/feegrant/v1beta1/tx.amino.js +54 -0
- package/module/codegen/cosmos/feegrant/v1beta1/tx.js +247 -0
- package/module/codegen/cosmos/feegrant/v1beta1/tx.registry.js +89 -0
- package/module/codegen/cosmos/feegrant/v1beta1/tx.rpc.msg.js +27 -0
- package/module/codegen/cosmos/genutil/v1beta1/genesis.js +68 -0
- package/module/codegen/cosmos/gov/v1/genesis.js +111 -0
- package/module/codegen/cosmos/gov/v1/gov.js +750 -0
- package/module/codegen/cosmos/gov/v1/query.js +859 -0
- package/module/codegen/cosmos/gov/v1/query.lcd.js +112 -0
- package/module/codegen/cosmos/gov/v1/query.rpc.query.js +108 -0
- package/module/codegen/cosmos/gov/v1/tx.amino.js +167 -0
- package/module/codegen/cosmos/gov/v1/tx.js +545 -0
- package/module/codegen/cosmos/gov/v1/tx.registry.js +120 -0
- package/module/codegen/cosmos/gov/v1/tx.rpc.msg.js +48 -0
- package/module/codegen/cosmos/gov/v1beta1/genesis.js +111 -0
- package/module/codegen/cosmos/gov/v1beta1/gov.js +801 -0
- package/module/codegen/cosmos/gov/v1beta1/query.js +859 -0
- package/module/codegen/cosmos/gov/v1beta1/query.lcd.js +112 -0
- package/module/codegen/cosmos/gov/v1beta1/query.rpc.query.js +108 -0
- package/module/codegen/cosmos/gov/v1beta1/tx.amino.js +128 -0
- package/module/codegen/cosmos/gov/v1beta1/tx.js +424 -0
- package/module/codegen/cosmos/gov/v1beta1/tx.registry.js +99 -0
- package/module/codegen/cosmos/gov/v1beta1/tx.rpc.msg.js +41 -0
- package/module/codegen/cosmos/group/v1/events.js +549 -0
- package/module/codegen/cosmos/group/v1/genesis.js +175 -0
- package/module/codegen/cosmos/group/v1/query.js +1769 -0
- package/module/codegen/cosmos/group/v1/query.lcd.js +167 -0
- package/module/codegen/cosmos/group/v1/query.rpc.query.js +104 -0
- package/module/codegen/cosmos/group/v1/tx.amino.js +429 -0
- package/module/codegen/cosmos/group/v1/tx.js +1969 -0
- package/module/codegen/cosmos/group/v1/tx.registry.js +509 -0
- package/module/codegen/cosmos/group/v1/tx.rpc.msg.js +111 -0
- package/module/codegen/cosmos/group/v1/types.js +1350 -0
- package/module/codegen/cosmos/lcd.js +50 -0
- package/module/codegen/cosmos/mint/v1beta1/genesis.js +73 -0
- package/module/codegen/cosmos/mint/v1beta1/mint.js +193 -0
- package/module/codegen/cosmos/mint/v1beta1/query.js +308 -0
- package/module/codegen/cosmos/mint/v1beta1/query.lcd.js +32 -0
- package/module/codegen/cosmos/mint/v1beta1/query.rpc.query.js +34 -0
- package/module/codegen/cosmos/msg/v1/msg.js +1 -0
- package/module/codegen/cosmos/nft/v1beta1/event.js +264 -0
- package/module/codegen/cosmos/nft/v1beta1/genesis.js +163 -0
- package/module/codegen/cosmos/nft/v1beta1/nft.js +242 -0
- package/module/codegen/cosmos/nft/v1beta1/query.js +917 -0
- package/module/codegen/cosmos/nft/v1beta1/query.lcd.js +88 -0
- package/module/codegen/cosmos/nft/v1beta1/query.rpc.query.js +62 -0
- package/module/codegen/cosmos/nft/v1beta1/tx.amino.js +31 -0
- package/module/codegen/cosmos/nft/v1beta1/tx.js +141 -0
- package/module/codegen/cosmos/nft/v1beta1/tx.registry.js +54 -0
- package/module/codegen/cosmos/nft/v1beta1/tx.rpc.msg.js +20 -0
- package/module/codegen/cosmos/orm/v1/orm.js +305 -0
- package/module/codegen/cosmos/orm/v1alpha1/schema.js +225 -0
- package/module/codegen/cosmos/params/v1beta1/params.js +175 -0
- package/module/codegen/cosmos/params/v1beta1/query.js +317 -0
- package/module/codegen/cosmos/params/v1beta1/query.lcd.js +38 -0
- package/module/codegen/cosmos/params/v1beta1/query.rpc.query.js +27 -0
- package/module/codegen/cosmos/rpc.query.js +34 -0
- package/module/codegen/cosmos/rpc.tx.js +25 -0
- package/module/codegen/cosmos/slashing/v1beta1/genesis.js +317 -0
- package/module/codegen/cosmos/slashing/v1beta1/query.js +355 -0
- package/module/codegen/cosmos/slashing/v1beta1/query.lcd.js +43 -0
- package/module/codegen/cosmos/slashing/v1beta1/query.rpc.query.js +34 -0
- package/module/codegen/cosmos/slashing/v1beta1/slashing.js +234 -0
- package/module/codegen/cosmos/slashing/v1beta1/tx.amino.js +19 -0
- package/module/codegen/cosmos/slashing/v1beta1/tx.js +105 -0
- package/module/codegen/cosmos/slashing/v1beta1/tx.registry.js +54 -0
- package/module/codegen/cosmos/slashing/v1beta1/tx.rpc.msg.js +20 -0
- package/module/codegen/cosmos/staking/v1beta1/authz.js +204 -0
- package/module/codegen/cosmos/staking/v1beta1/genesis.js +178 -0
- package/module/codegen/cosmos/staking/v1beta1/query.js +1469 -0
- package/module/codegen/cosmos/staking/v1beta1/query.lcd.js +196 -0
- package/module/codegen/cosmos/staking/v1beta1/query.rpc.query.js +174 -0
- package/module/codegen/cosmos/staking/v1beta1/staking.js +1446 -0
- package/module/codegen/cosmos/staking/v1beta1/tx.amino.js +216 -0
- package/module/codegen/cosmos/staking/v1beta1/tx.js +598 -0
- package/module/codegen/cosmos/staking/v1beta1/tx.registry.js +120 -0
- package/module/codegen/cosmos/staking/v1beta1/tx.rpc.msg.js +48 -0
- package/module/codegen/cosmos/tx/signing/v1beta1/signing.js +378 -0
- package/module/codegen/cosmos/tx/v1beta1/service.js +714 -0
- package/module/codegen/cosmos/tx/v1beta1/service.lcd.js +62 -0
- package/module/codegen/cosmos/tx/v1beta1/service.rpc.svc.js +75 -0
- package/module/codegen/cosmos/tx/v1beta1/tx.js +903 -0
- package/module/codegen/cosmos/upgrade/v1beta1/query.js +445 -0
- package/module/codegen/cosmos/upgrade/v1beta1/query.lcd.js +66 -0
- package/module/codegen/cosmos/upgrade/v1beta1/query.rpc.query.js +75 -0
- package/module/codegen/cosmos/upgrade/v1beta1/tx.amino.js +59 -0
- package/module/codegen/cosmos/upgrade/v1beta1/tx.js +174 -0
- package/module/codegen/cosmos/upgrade/v1beta1/tx.registry.js +57 -0
- package/module/codegen/cosmos/upgrade/v1beta1/tx.rpc.msg.js +27 -0
- package/module/codegen/cosmos/upgrade/v1beta1/upgrade.js +273 -0
- package/module/codegen/cosmos/vesting/v1beta1/tx.amino.js +114 -0
- package/module/codegen/cosmos/vesting/v1beta1/tx.js +440 -0
- package/module/codegen/cosmos/vesting/v1beta1/tx.registry.js +124 -0
- package/module/codegen/cosmos/vesting/v1beta1/tx.rpc.msg.js +34 -0
- package/module/codegen/cosmos/vesting/v1beta1/vesting.js +480 -0
- package/module/codegen/cosmos_proto/bundle.js +8 -0
- package/module/codegen/cosmos_proto/cosmos.js +194 -0
- package/module/codegen/cosmwasm/bundle.js +31 -0
- package/module/codegen/cosmwasm/client.js +39 -0
- package/module/codegen/cosmwasm/lcd.js +57 -0
- package/module/codegen/cosmwasm/rpc.query.js +39 -0
- package/module/codegen/cosmwasm/rpc.tx.js +30 -0
- package/module/codegen/cosmwasm/wasm/v1/genesis.js +358 -0
- package/module/codegen/cosmwasm/wasm/v1/ibc.js +127 -0
- package/module/codegen/cosmwasm/wasm/v1/proposal.js +772 -0
- package/module/codegen/cosmwasm/wasm/v1/query.js +1046 -0
- package/module/codegen/cosmwasm/wasm/v1/query.lcd.js +128 -0
- package/module/codegen/cosmwasm/wasm/v1/query.rpc.query.js +123 -0
- package/module/codegen/cosmwasm/wasm/v1/tx.amino.js +189 -0
- package/module/codegen/cosmwasm/wasm/v1/tx.js +711 -0
- package/module/codegen/cosmwasm/wasm/v1/tx.registry.js +141 -0
- package/module/codegen/cosmwasm/wasm/v1/tx.rpc.msg.js +55 -0
- package/module/codegen/cosmwasm/wasm/v1/types.js +668 -0
- package/module/codegen/gogoproto/bundle.js +8 -0
- package/module/codegen/gogoproto/gogo.js +1 -0
- package/module/codegen/google/api/annotations.js +1 -0
- package/module/codegen/google/api/http.js +328 -0
- package/module/codegen/google/bundle.js +19 -0
- package/module/codegen/google/protobuf/any.js +58 -0
- package/module/codegen/google/protobuf/descriptor.js +2775 -0
- package/module/codegen/google/protobuf/duration.js +119 -0
- package/module/codegen/google/protobuf/empty.js +35 -0
- package/module/codegen/google/protobuf/field_mask.js +48 -0
- package/module/codegen/google/protobuf/struct.js +310 -0
- package/module/codegen/google/protobuf/timestamp.js +143 -0
- package/module/codegen/google/protobuf/wrappers.js +426 -0
- package/module/codegen/ibc/applications/transfer/v1/genesis.js +69 -0
- package/module/codegen/ibc/applications/transfer/v1/query.js +276 -0
- package/module/codegen/ibc/applications/transfer/v1/query.lcd.js +46 -0
- package/module/codegen/ibc/applications/transfer/v1/query.rpc.query.js +55 -0
- package/module/codegen/ibc/applications/transfer/v1/transfer.js +115 -0
- package/module/codegen/ibc/applications/transfer/v1/tx.amino.js +58 -0
- package/module/codegen/ibc/applications/transfer/v1/tx.js +150 -0
- package/module/codegen/ibc/applications/transfer/v1/tx.registry.js +36 -0
- package/module/codegen/ibc/applications/transfer/v1/tx.rpc.msg.js +20 -0
- package/module/codegen/ibc/applications/transfer/v2/packet.js +78 -0
- package/module/codegen/ibc/bundle.js +120 -0
- package/module/codegen/ibc/client.js +45 -0
- package/module/codegen/ibc/core/channel/v1/channel.js +646 -0
- package/module/codegen/ibc/core/channel/v1/genesis.js +188 -0
- package/module/codegen/ibc/core/channel/v1/query.js +1759 -0
- package/module/codegen/ibc/core/channel/v1/query.lcd.js +162 -0
- package/module/codegen/ibc/core/channel/v1/query.rpc.query.js +165 -0
- package/module/codegen/ibc/core/channel/v1/tx.amino.js +530 -0
- package/module/codegen/ibc/core/channel/v1/tx.js +1218 -0
- package/module/codegen/ibc/core/channel/v1/tx.registry.js +225 -0
- package/module/codegen/ibc/core/channel/v1/tx.rpc.msg.js +83 -0
- package/module/codegen/ibc/core/client/v1/client.js +433 -0
- package/module/codegen/ibc/core/client/v1/genesis.js +215 -0
- package/module/codegen/ibc/core/client/v1/query.js +814 -0
- package/module/codegen/ibc/core/client/v1/query.lcd.js +104 -0
- package/module/codegen/ibc/core/client/v1/query.rpc.query.js +110 -0
- package/module/codegen/ibc/core/client/v1/tx.amino.js +150 -0
- package/module/codegen/ibc/core/client/v1/tx.js +436 -0
- package/module/codegen/ibc/core/client/v1/tx.registry.js +99 -0
- package/module/codegen/ibc/core/client/v1/tx.rpc.msg.js +41 -0
- package/module/codegen/ibc/core/commitment/v1/commitment.js +190 -0
- package/module/codegen/ibc/core/connection/v1/connection.js +537 -0
- package/module/codegen/ibc/core/connection/v1/genesis.js +81 -0
- package/module/codegen/ibc/core/connection/v1/query.js +608 -0
- package/module/codegen/ibc/core/connection/v1/query.lcd.js +65 -0
- package/module/codegen/ibc/core/connection/v1/query.rpc.query.js +77 -0
- package/module/codegen/ibc/core/connection/v1/tx.amino.js +269 -0
- package/module/codegen/ibc/core/connection/v1/tx.js +603 -0
- package/module/codegen/ibc/core/connection/v1/tx.registry.js +99 -0
- package/module/codegen/ibc/core/connection/v1/tx.rpc.msg.js +41 -0
- package/module/codegen/ibc/core/port/v1/query.js +182 -0
- package/module/codegen/ibc/core/port/v1/query.rpc.query.js +20 -0
- package/module/codegen/ibc/core/types/v1/genesis.js +87 -0
- package/module/codegen/ibc/lcd.js +76 -0
- package/module/codegen/ibc/lightclients/localhost/v1/localhost.js +59 -0
- package/module/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1166 -0
- package/module/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1166 -0
- package/module/codegen/ibc/lightclients/tendermint/v1/tendermint.js +424 -0
- package/module/codegen/ibc/rpc.query.js +52 -0
- package/module/codegen/ibc/rpc.tx.js +43 -0
- package/module/codegen/ics23/bundle.js +8 -0
- package/module/codegen/index.js +18 -0
- package/module/codegen/juno/bundle.js +20 -0
- package/module/codegen/juno/lcd.js +55 -0
- package/module/codegen/juno/mint/genesis.js +57 -0
- package/module/codegen/juno/mint/mint.js +137 -0
- package/module/codegen/juno/mint/query.js +243 -0
- package/module/codegen/juno/mint/query.lcd.js +35 -0
- package/module/codegen/juno/mint/query.rpc.query.js +53 -0
- package/module/codegen/juno/rpc.query.js +37 -0
- package/module/codegen/tendermint/abci/types.js +3341 -0
- package/module/codegen/tendermint/bundle.js +36 -0
- package/module/codegen/tendermint/crypto/keys.js +58 -0
- package/module/codegen/tendermint/crypto/proof.js +317 -0
- package/module/codegen/tendermint/libs/bits/types.js +71 -0
- package/module/codegen/tendermint/p2p/types.js +386 -0
- package/module/codegen/tendermint/types/block.js +78 -0
- package/module/codegen/tendermint/types/evidence.js +281 -0
- package/module/codegen/tendermint/types/params.js +361 -0
- package/module/codegen/tendermint/types/types.js +1172 -0
- package/module/codegen/tendermint/types/validator.js +202 -0
- package/module/codegen/tendermint/version/types.js +119 -0
- package/module/index.js +1 -0
- package/package.json +8 -3
- package/src/codegen/JunoSwap.client.ts +299 -0
- package/src/codegen/JunoSwap.types.ts +143 -0
- package/src/codegen/confio/proofs.ts +1521 -0
- package/src/codegen/contracts.ts +13 -0
- package/src/codegen/cosmos/app/v1alpha1/config.ts +172 -0
- package/src/codegen/cosmos/app/v1alpha1/module.ts +308 -0
- package/src/codegen/cosmos/app/v1alpha1/query.rpc.query.ts +26 -0
- package/src/codegen/cosmos/app/v1alpha1/query.ts +112 -0
- package/src/codegen/cosmos/auth/v1beta1/auth.ts +316 -0
- package/src/codegen/cosmos/auth/v1beta1/genesis.ts +88 -0
- package/src/codegen/cosmos/auth/v1beta1/query.lcd.ts +72 -0
- package/src/codegen/cosmos/auth/v1beta1/query.rpc.query.ts +90 -0
- package/src/codegen/cosmos/auth/v1beta1/query.ts +865 -0
- package/src/codegen/cosmos/authz/v1beta1/authz.ts +306 -0
- package/src/codegen/cosmos/authz/v1beta1/event.ts +180 -0
- package/src/codegen/cosmos/authz/v1beta1/genesis.ts +58 -0
- package/src/codegen/cosmos/authz/v1beta1/query.lcd.ts +79 -0
- package/src/codegen/cosmos/authz/v1beta1/query.rpc.query.ts +68 -0
- package/src/codegen/cosmos/authz/v1beta1/query.ts +464 -0
- package/src/codegen/cosmos/authz/v1beta1/tx.amino.ts +131 -0
- package/src/codegen/cosmos/authz/v1beta1/tx.registry.ts +127 -0
- package/src/codegen/cosmos/authz/v1beta1/tx.rpc.msg.ts +51 -0
- package/src/codegen/cosmos/authz/v1beta1/tx.ts +396 -0
- package/src/codegen/cosmos/bank/v1beta1/authz.ts +68 -0
- package/src/codegen/cosmos/bank/v1beta1/bank.ts +666 -0
- package/src/codegen/cosmos/bank/v1beta1/genesis.ts +194 -0
- package/src/codegen/cosmos/bank/v1beta1/query.lcd.ts +150 -0
- package/src/codegen/cosmos/bank/v1beta1/query.rpc.query.ts +155 -0
- package/src/codegen/cosmos/bank/v1beta1/query.ts +1301 -0
- package/src/codegen/cosmos/bank/v1beta1/tx.amino.ts +110 -0
- package/src/codegen/cosmos/bank/v1beta1/tx.registry.ts +58 -0
- package/src/codegen/cosmos/bank/v1beta1/tx.rpc.msg.ts +35 -0
- package/src/codegen/cosmos/bank/v1beta1/tx.ts +230 -0
- package/src/codegen/cosmos/base/abci/v1beta1/abci.ts +1106 -0
- package/src/codegen/cosmos/base/kv/v1beta1/kv.ts +145 -0
- package/src/codegen/cosmos/base/query/v1beta1/pagination.ts +282 -0
- package/src/codegen/cosmos/base/reflection/v1beta1/reflection.ts +254 -0
- package/src/codegen/cosmos/base/reflection/v2alpha1/reflection.ts +1708 -0
- package/src/codegen/cosmos/base/snapshots/v1beta1/snapshot.ts +759 -0
- package/src/codegen/cosmos/base/store/v1beta1/commit_info.ts +242 -0
- package/src/codegen/cosmos/base/store/v1beta1/listening.ts +112 -0
- package/src/codegen/cosmos/base/tendermint/v1beta1/query.lcd.ts +74 -0
- package/src/codegen/cosmos/base/tendermint/v1beta1/query.rpc.svc.ts +80 -0
- package/src/codegen/cosmos/base/tendermint/v1beta1/query.ts +1181 -0
- package/src/codegen/cosmos/base/v1beta1/coin.ts +266 -0
- package/src/codegen/cosmos/bundle.ts +214 -0
- package/src/codegen/cosmos/capability/v1beta1/capability.ts +216 -0
- package/src/codegen/cosmos/capability/v1beta1/genesis.ts +168 -0
- package/src/codegen/cosmos/client.ts +51 -0
- package/src/codegen/cosmos/crisis/v1beta1/genesis.ts +69 -0
- package/src/codegen/cosmos/crisis/v1beta1/tx.amino.ts +37 -0
- package/src/codegen/cosmos/crisis/v1beta1/tx.registry.ts +55 -0
- package/src/codegen/cosmos/crisis/v1beta1/tx.rpc.msg.ts +25 -0
- package/src/codegen/cosmos/crisis/v1beta1/tx.ts +136 -0
- package/src/codegen/cosmos/crypto/ed25519/keys.ts +130 -0
- package/src/codegen/cosmos/crypto/hd/v1/hd.ts +129 -0
- package/src/codegen/cosmos/crypto/keyring/v1/record.ts +349 -0
- package/src/codegen/cosmos/crypto/multisig/keys.ts +78 -0
- package/src/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts +142 -0
- package/src/codegen/cosmos/crypto/secp256k1/keys.ts +124 -0
- package/src/codegen/cosmos/crypto/secp256r1/keys.ts +122 -0
- package/src/codegen/cosmos/distribution/v1beta1/distribution.ts +945 -0
- package/src/codegen/cosmos/distribution/v1beta1/genesis.ts +800 -0
- package/src/codegen/cosmos/distribution/v1beta1/query.lcd.ts +104 -0
- package/src/codegen/cosmos/distribution/v1beta1/query.rpc.query.ts +149 -0
- package/src/codegen/cosmos/distribution/v1beta1/query.ts +1187 -0
- package/src/codegen/cosmos/distribution/v1beta1/tx.amino.ts +120 -0
- package/src/codegen/cosmos/distribution/v1beta1/tx.registry.ts +100 -0
- package/src/codegen/cosmos/distribution/v1beta1/tx.rpc.msg.ts +59 -0
- package/src/codegen/cosmos/distribution/v1beta1/tx.ts +473 -0
- package/src/codegen/cosmos/evidence/v1beta1/evidence.ts +107 -0
- package/src/codegen/cosmos/evidence/v1beta1/genesis.ts +72 -0
- package/src/codegen/cosmos/evidence/v1beta1/query.lcd.ts +39 -0
- package/src/codegen/cosmos/evidence/v1beta1/query.rpc.query.ts +37 -0
- package/src/codegen/cosmos/evidence/v1beta1/query.ts +283 -0
- package/src/codegen/cosmos/evidence/v1beta1/tx.amino.ts +42 -0
- package/src/codegen/cosmos/evidence/v1beta1/tx.registry.ts +56 -0
- package/src/codegen/cosmos/evidence/v1beta1/tx.rpc.msg.ts +27 -0
- package/src/codegen/cosmos/evidence/v1beta1/tx.ts +144 -0
- package/src/codegen/cosmos/feegrant/v1beta1/feegrant.ts +421 -0
- package/src/codegen/cosmos/feegrant/v1beta1/genesis.ts +71 -0
- package/src/codegen/cosmos/feegrant/v1beta1/query.lcd.ts +52 -0
- package/src/codegen/cosmos/feegrant/v1beta1/query.rpc.query.ts +48 -0
- package/src/codegen/cosmos/feegrant/v1beta1/query.ts +467 -0
- package/src/codegen/cosmos/feegrant/v1beta1/tx.amino.ts +75 -0
- package/src/codegen/cosmos/feegrant/v1beta1/tx.registry.ts +91 -0
- package/src/codegen/cosmos/feegrant/v1beta1/tx.rpc.msg.ts +38 -0
- package/src/codegen/cosmos/feegrant/v1beta1/tx.ts +269 -0
- package/src/codegen/cosmos/genutil/v1beta1/genesis.ts +71 -0
- package/src/codegen/cosmos/gov/v1/genesis.ts +156 -0
- package/src/codegen/cosmos/gov/v1/gov.ts +983 -0
- package/src/codegen/cosmos/gov/v1/query.lcd.ts +115 -0
- package/src/codegen/cosmos/gov/v1/query.rpc.query.ts +134 -0
- package/src/codegen/cosmos/gov/v1/query.ts +1114 -0
- package/src/codegen/cosmos/gov/v1/tx.amino.ts +226 -0
- package/src/codegen/cosmos/gov/v1/tx.registry.ts +121 -0
- package/src/codegen/cosmos/gov/v1/tx.rpc.msg.ts +66 -0
- package/src/codegen/cosmos/gov/v1/tx.ts +661 -0
- package/src/codegen/cosmos/gov/v1beta1/genesis.ts +156 -0
- package/src/codegen/cosmos/gov/v1beta1/gov.ts +1064 -0
- package/src/codegen/cosmos/gov/v1beta1/query.lcd.ts +115 -0
- package/src/codegen/cosmos/gov/v1beta1/query.rpc.query.ts +134 -0
- package/src/codegen/cosmos/gov/v1beta1/query.ts +1114 -0
- package/src/codegen/cosmos/gov/v1beta1/tx.amino.ts +174 -0
- package/src/codegen/cosmos/gov/v1beta1/tx.registry.ts +100 -0
- package/src/codegen/cosmos/gov/v1beta1/tx.rpc.msg.ts +57 -0
- package/src/codegen/cosmos/gov/v1beta1/tx.ts +518 -0
- package/src/codegen/cosmos/group/v1/events.ts +600 -0
- package/src/codegen/cosmos/group/v1/genesis.ts +208 -0
- package/src/codegen/cosmos/group/v1/query.lcd.ts +159 -0
- package/src/codegen/cosmos/group/v1/query.rpc.query.ts +147 -0
- package/src/codegen/cosmos/group/v1/query.ts +1945 -0
- package/src/codegen/cosmos/group/v1/tx.amino.ts +585 -0
- package/src/codegen/cosmos/group/v1/tx.registry.ts +512 -0
- package/src/codegen/cosmos/group/v1/tx.rpc.msg.ts +157 -0
- package/src/codegen/cosmos/group/v1/tx.ts +2197 -0
- package/src/codegen/cosmos/group/v1/types.ts +1577 -0
- package/src/codegen/cosmos/lcd.ts +52 -0
- package/src/codegen/cosmos/mint/v1beta1/genesis.ts +81 -0
- package/src/codegen/cosmos/mint/v1beta1/mint.ts +218 -0
- package/src/codegen/cosmos/mint/v1beta1/query.lcd.ts +33 -0
- package/src/codegen/cosmos/mint/v1beta1/query.rpc.query.ts +46 -0
- package/src/codegen/cosmos/mint/v1beta1/query.ts +339 -0
- package/src/codegen/cosmos/msg/v1/msg.ts +1 -0
- package/src/codegen/cosmos/nft/v1beta1/event.ts +279 -0
- package/src/codegen/cosmos/nft/v1beta1/genesis.ts +174 -0
- package/src/codegen/cosmos/nft/v1beta1/nft.ts +279 -0
- package/src/codegen/cosmos/nft/v1beta1/query.lcd.ts +86 -0
- package/src/codegen/cosmos/nft/v1beta1/query.rpc.query.ts +88 -0
- package/src/codegen/cosmos/nft/v1beta1/query.ts +976 -0
- package/src/codegen/cosmos/nft/v1beta1/tx.amino.ts +42 -0
- package/src/codegen/cosmos/nft/v1beta1/tx.registry.ts +55 -0
- package/src/codegen/cosmos/nft/v1beta1/tx.rpc.msg.ts +25 -0
- package/src/codegen/cosmos/nft/v1beta1/tx.ts +156 -0
- package/src/codegen/cosmos/orm/v1/orm.ts +392 -0
- package/src/codegen/cosmos/orm/v1alpha1/schema.ts +289 -0
- package/src/codegen/cosmos/params/v1beta1/params.ts +187 -0
- package/src/codegen/cosmos/params/v1beta1/query.lcd.ts +40 -0
- package/src/codegen/cosmos/params/v1beta1/query.rpc.query.ts +37 -0
- package/src/codegen/cosmos/params/v1beta1/query.ts +348 -0
- package/src/codegen/cosmos/rpc.query.ts +36 -0
- package/src/codegen/cosmos/rpc.tx.ts +28 -0
- package/src/codegen/cosmos/slashing/v1beta1/genesis.ts +356 -0
- package/src/codegen/cosmos/slashing/v1beta1/query.lcd.ts +45 -0
- package/src/codegen/cosmos/slashing/v1beta1/query.rpc.query.ts +47 -0
- package/src/codegen/cosmos/slashing/v1beta1/query.ts +394 -0
- package/src/codegen/cosmos/slashing/v1beta1/slashing.ts +268 -0
- package/src/codegen/cosmos/slashing/v1beta1/tx.amino.ts +27 -0
- package/src/codegen/cosmos/slashing/v1beta1/tx.registry.ts +55 -0
- package/src/codegen/cosmos/slashing/v1beta1/tx.rpc.msg.ts +27 -0
- package/src/codegen/cosmos/slashing/v1beta1/tx.ts +110 -0
- package/src/codegen/cosmos/staking/v1beta1/authz.ts +265 -0
- package/src/codegen/cosmos/staking/v1beta1/genesis.ts +253 -0
- package/src/codegen/cosmos/staking/v1beta1/query.lcd.ts +199 -0
- package/src/codegen/cosmos/staking/v1beta1/query.rpc.query.ts +222 -0
- package/src/codegen/cosmos/staking/v1beta1/query.ts +1970 -0
- package/src/codegen/cosmos/staking/v1beta1/staking.ts +1957 -0
- package/src/codegen/cosmos/staking/v1beta1/tx.amino.ts +294 -0
- package/src/codegen/cosmos/staking/v1beta1/tx.registry.ts +121 -0
- package/src/codegen/cosmos/staking/v1beta1/tx.rpc.msg.ts +68 -0
- package/src/codegen/cosmos/staking/v1beta1/tx.ts +735 -0
- package/src/codegen/cosmos/tx/signing/v1beta1/signing.ts +528 -0
- package/src/codegen/cosmos/tx/v1beta1/service.lcd.ts +65 -0
- package/src/codegen/cosmos/tx/v1beta1/service.rpc.svc.ts +94 -0
- package/src/codegen/cosmos/tx/v1beta1/service.ts +984 -0
- package/src/codegen/cosmos/tx/v1beta1/tx.ts +1497 -0
- package/src/codegen/cosmos/upgrade/v1beta1/query.lcd.ts +69 -0
- package/src/codegen/cosmos/upgrade/v1beta1/query.rpc.query.ts +99 -0
- package/src/codegen/cosmos/upgrade/v1beta1/query.ts +631 -0
- package/src/codegen/cosmos/upgrade/v1beta1/tx.amino.ts +86 -0
- package/src/codegen/cosmos/upgrade/v1beta1/tx.registry.ts +58 -0
- package/src/codegen/cosmos/upgrade/v1beta1/tx.rpc.msg.ts +40 -0
- package/src/codegen/cosmos/upgrade/v1beta1/tx.ts +245 -0
- package/src/codegen/cosmos/upgrade/v1beta1/upgrade.ts +432 -0
- package/src/codegen/cosmos/vesting/v1beta1/tx.amino.ts +157 -0
- package/src/codegen/cosmos/vesting/v1beta1/tx.registry.ts +127 -0
- package/src/codegen/cosmos/vesting/v1beta1/tx.rpc.msg.ts +50 -0
- package/src/codegen/cosmos/vesting/v1beta1/tx.ts +475 -0
- package/src/codegen/cosmos/vesting/v1beta1/vesting.ts +527 -0
- package/src/codegen/cosmos_proto/bundle.ts +3 -0
- package/src/codegen/cosmos_proto/cosmos.ts +289 -0
- package/src/codegen/cosmwasm/bundle.ts +34 -0
- package/src/codegen/cosmwasm/client.ts +44 -0
- package/src/codegen/cosmwasm/lcd.ts +59 -0
- package/src/codegen/cosmwasm/rpc.query.ts +41 -0
- package/src/codegen/cosmwasm/rpc.tx.ts +33 -0
- package/src/codegen/cosmwasm/wasm/v1/genesis.ts +433 -0
- package/src/codegen/cosmwasm/wasm/v1/ibc.ts +180 -0
- package/src/codegen/cosmwasm/wasm/v1/proposal.ts +1083 -0
- package/src/codegen/cosmwasm/wasm/v1/query.lcd.ts +131 -0
- package/src/codegen/cosmwasm/wasm/v1/query.rpc.query.ts +152 -0
- package/src/codegen/cosmwasm/wasm/v1/query.ts +1378 -0
- package/src/codegen/cosmwasm/wasm/v1/tx.amino.ts +252 -0
- package/src/codegen/cosmwasm/wasm/v1/tx.registry.ts +142 -0
- package/src/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts +75 -0
- package/src/codegen/cosmwasm/wasm/v1/tx.ts +944 -0
- package/src/codegen/cosmwasm/wasm/v1/types.ts +861 -0
- package/src/codegen/gogoproto/bundle.ts +3 -0
- package/src/codegen/gogoproto/gogo.ts +1 -0
- package/src/codegen/google/api/annotations.ts +1 -0
- package/src/codegen/google/api/http.ts +683 -0
- package/src/codegen/google/bundle.ts +19 -0
- package/src/codegen/google/protobuf/any.ts +291 -0
- package/src/codegen/google/protobuf/descriptor.ts +4317 -0
- package/src/codegen/google/protobuf/duration.ts +215 -0
- package/src/codegen/google/protobuf/empty.ts +62 -0
- package/src/codegen/google/protobuf/field_mask.ts +459 -0
- package/src/codegen/google/protobuf/struct.ts +420 -0
- package/src/codegen/google/protobuf/timestamp.ts +259 -0
- package/src/codegen/google/protobuf/wrappers.ts +587 -0
- package/src/codegen/ibc/applications/transfer/v1/genesis.ts +82 -0
- package/src/codegen/ibc/applications/transfer/v1/query.lcd.ts +49 -0
- package/src/codegen/ibc/applications/transfer/v1/query.rpc.query.ts +66 -0
- package/src/codegen/ibc/applications/transfer/v1/query.ts +369 -0
- package/src/codegen/ibc/applications/transfer/v1/transfer.ts +182 -0
- package/src/codegen/ibc/applications/transfer/v1/tx.amino.ts +73 -0
- package/src/codegen/ibc/applications/transfer/v1/tx.registry.ts +37 -0
- package/src/codegen/ibc/applications/transfer/v1/tx.rpc.msg.ts +25 -0
- package/src/codegen/ibc/applications/transfer/v1/tx.ts +217 -0
- package/src/codegen/ibc/applications/transfer/v2/packet.ts +115 -0
- package/src/codegen/ibc/bundle.ts +125 -0
- package/src/codegen/ibc/client.ts +53 -0
- package/src/codegen/ibc/core/channel/v1/channel.ts +923 -0
- package/src/codegen/ibc/core/channel/v1/genesis.ts +231 -0
- package/src/codegen/ibc/core/channel/v1/query.lcd.ts +165 -0
- package/src/codegen/ibc/core/channel/v1/query.rpc.query.ts +214 -0
- package/src/codegen/ibc/core/channel/v1/query.ts +2444 -0
- package/src/codegen/ibc/core/channel/v1/tx.amino.ts +670 -0
- package/src/codegen/ibc/core/channel/v1/tx.registry.ts +226 -0
- package/src/codegen/ibc/core/channel/v1/tx.rpc.msg.ts +116 -0
- package/src/codegen/ibc/core/channel/v1/tx.ts +1492 -0
- package/src/codegen/ibc/core/client/v1/client.ts +629 -0
- package/src/codegen/ibc/core/client/v1/genesis.ts +288 -0
- package/src/codegen/ibc/core/client/v1/query.lcd.ts +107 -0
- package/src/codegen/ibc/core/client/v1/query.rpc.query.ts +138 -0
- package/src/codegen/ibc/core/client/v1/query.ts +1130 -0
- package/src/codegen/ibc/core/client/v1/tx.amino.ts +205 -0
- package/src/codegen/ibc/core/client/v1/tx.registry.ts +100 -0
- package/src/codegen/ibc/core/client/v1/tx.rpc.msg.ts +55 -0
- package/src/codegen/ibc/core/client/v1/tx.ts +603 -0
- package/src/codegen/ibc/core/commitment/v1/commitment.ts +257 -0
- package/src/codegen/ibc/core/connection/v1/connection.ts +758 -0
- package/src/codegen/ibc/core/connection/v1/genesis.ts +98 -0
- package/src/codegen/ibc/core/connection/v1/query.lcd.ts +68 -0
- package/src/codegen/ibc/core/connection/v1/query.rpc.query.ts +97 -0
- package/src/codegen/ibc/core/connection/v1/query.ts +836 -0
- package/src/codegen/ibc/core/connection/v1/tx.amino.ts +343 -0
- package/src/codegen/ibc/core/connection/v1/tx.registry.ts +100 -0
- package/src/codegen/ibc/core/connection/v1/tx.rpc.msg.ts +56 -0
- package/src/codegen/ibc/core/connection/v1/tx.ts +795 -0
- package/src/codegen/ibc/core/port/v1/query.rpc.query.ts +26 -0
- package/src/codegen/ibc/core/port/v1/query.ts +204 -0
- package/src/codegen/ibc/core/types/v1/genesis.ts +98 -0
- package/src/codegen/ibc/lcd.ts +78 -0
- package/src/codegen/ibc/lightclients/localhost/v1/localhost.ts +82 -0
- package/src/codegen/ibc/lightclients/solomachine/v1/solomachine.ts +1499 -0
- package/src/codegen/ibc/lightclients/solomachine/v2/solomachine.ts +1499 -0
- package/src/codegen/ibc/lightclients/tendermint/v1/tendermint.ts +626 -0
- package/src/codegen/ibc/rpc.query.ts +54 -0
- package/src/codegen/ibc/rpc.tx.ts +46 -0
- package/src/codegen/ics23/bundle.ts +3 -0
- package/src/codegen/index.ts +19 -0
- package/src/codegen/juno/bundle.ts +18 -0
- package/src/codegen/juno/lcd.ts +57 -0
- package/src/codegen/juno/mint/genesis.ts +76 -0
- package/src/codegen/juno/mint/mint.ts +172 -0
- package/src/codegen/juno/mint/query.lcd.ts +38 -0
- package/src/codegen/juno/mint/query.rpc.query.ts +64 -0
- package/src/codegen/juno/mint/query.ts +312 -0
- package/src/codegen/juno/rpc.query.ts +39 -0
- package/src/codegen/tendermint/abci/types.ts +3943 -0
- package/src/codegen/tendermint/bundle.ts +32 -0
- package/src/codegen/tendermint/crypto/keys.ts +69 -0
- package/src/codegen/tendermint/crypto/proof.ts +375 -0
- package/src/codegen/tendermint/libs/bits/types.ts +77 -0
- package/src/codegen/tendermint/p2p/types.ts +438 -0
- package/src/codegen/tendermint/types/block.ts +91 -0
- package/src/codegen/tendermint/types/evidence.ts +325 -0
- package/src/codegen/tendermint/types/params.ts +521 -0
- package/src/codegen/tendermint/types/types.ts +1399 -0
- package/src/codegen/tendermint/types/validator.ts +228 -0
- package/src/codegen/tendermint/version/types.ts +152 -0
- package/src/index.ts +1 -0
- package/types/codegen/JunoSwap.client.d.ts +29 -27
- package/types/codegen/JunoSwap.types.d.ts +43 -25
@@ -0,0 +1,1577 @@
|
|
1
|
+
import { Timestamp } from "../../../google/protobuf/timestamp";
|
2
|
+
import { Duration } from "../../../google/protobuf/duration";
|
3
|
+
import { Any } from "../../../google/protobuf/any";
|
4
|
+
import * as _m0 from "protobufjs/minimal";
|
5
|
+
import { toTimestamp, fromTimestamp, isSet, fromJsonTimestamp, DeepPartial, Long } from "@osmonauts/helpers";
|
6
|
+
|
7
|
+
/** VoteOption enumerates the valid vote options for a given proposal. */
|
8
|
+
export enum VoteOption {
|
9
|
+
/** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
|
10
|
+
VOTE_OPTION_UNSPECIFIED = 0,
|
11
|
+
|
12
|
+
/** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
|
13
|
+
VOTE_OPTION_YES = 1,
|
14
|
+
|
15
|
+
/** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
|
16
|
+
VOTE_OPTION_ABSTAIN = 2,
|
17
|
+
|
18
|
+
/** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
|
19
|
+
VOTE_OPTION_NO = 3,
|
20
|
+
|
21
|
+
/** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
|
22
|
+
VOTE_OPTION_NO_WITH_VETO = 4,
|
23
|
+
UNRECOGNIZED = -1,
|
24
|
+
}
|
25
|
+
export function voteOptionFromJSON(object: any): VoteOption {
|
26
|
+
switch (object) {
|
27
|
+
case 0:
|
28
|
+
case "VOTE_OPTION_UNSPECIFIED":
|
29
|
+
return VoteOption.VOTE_OPTION_UNSPECIFIED;
|
30
|
+
|
31
|
+
case 1:
|
32
|
+
case "VOTE_OPTION_YES":
|
33
|
+
return VoteOption.VOTE_OPTION_YES;
|
34
|
+
|
35
|
+
case 2:
|
36
|
+
case "VOTE_OPTION_ABSTAIN":
|
37
|
+
return VoteOption.VOTE_OPTION_ABSTAIN;
|
38
|
+
|
39
|
+
case 3:
|
40
|
+
case "VOTE_OPTION_NO":
|
41
|
+
return VoteOption.VOTE_OPTION_NO;
|
42
|
+
|
43
|
+
case 4:
|
44
|
+
case "VOTE_OPTION_NO_WITH_VETO":
|
45
|
+
return VoteOption.VOTE_OPTION_NO_WITH_VETO;
|
46
|
+
|
47
|
+
case -1:
|
48
|
+
case "UNRECOGNIZED":
|
49
|
+
default:
|
50
|
+
return VoteOption.UNRECOGNIZED;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
export function voteOptionToJSON(object: VoteOption): string {
|
54
|
+
switch (object) {
|
55
|
+
case VoteOption.VOTE_OPTION_UNSPECIFIED:
|
56
|
+
return "VOTE_OPTION_UNSPECIFIED";
|
57
|
+
|
58
|
+
case VoteOption.VOTE_OPTION_YES:
|
59
|
+
return "VOTE_OPTION_YES";
|
60
|
+
|
61
|
+
case VoteOption.VOTE_OPTION_ABSTAIN:
|
62
|
+
return "VOTE_OPTION_ABSTAIN";
|
63
|
+
|
64
|
+
case VoteOption.VOTE_OPTION_NO:
|
65
|
+
return "VOTE_OPTION_NO";
|
66
|
+
|
67
|
+
case VoteOption.VOTE_OPTION_NO_WITH_VETO:
|
68
|
+
return "VOTE_OPTION_NO_WITH_VETO";
|
69
|
+
|
70
|
+
default:
|
71
|
+
return "UNKNOWN";
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
/** ProposalStatus defines proposal statuses. */
|
76
|
+
export enum ProposalStatus {
|
77
|
+
/** PROPOSAL_STATUS_UNSPECIFIED - An empty value is invalid and not allowed. */
|
78
|
+
PROPOSAL_STATUS_UNSPECIFIED = 0,
|
79
|
+
|
80
|
+
/** PROPOSAL_STATUS_SUBMITTED - Initial status of a proposal when persisted. */
|
81
|
+
PROPOSAL_STATUS_SUBMITTED = 1,
|
82
|
+
|
83
|
+
/** PROPOSAL_STATUS_CLOSED - Final status of a proposal when the final tally was executed. */
|
84
|
+
PROPOSAL_STATUS_CLOSED = 2,
|
85
|
+
|
86
|
+
/** PROPOSAL_STATUS_ABORTED - Final status of a proposal when the group was modified before the final tally. */
|
87
|
+
PROPOSAL_STATUS_ABORTED = 3,
|
88
|
+
|
89
|
+
/**
|
90
|
+
* PROPOSAL_STATUS_WITHDRAWN - A proposal can be deleted before the voting start time by the owner. When this happens the final status
|
91
|
+
* is Withdrawn.
|
92
|
+
*/
|
93
|
+
PROPOSAL_STATUS_WITHDRAWN = 4,
|
94
|
+
UNRECOGNIZED = -1,
|
95
|
+
}
|
96
|
+
export function proposalStatusFromJSON(object: any): ProposalStatus {
|
97
|
+
switch (object) {
|
98
|
+
case 0:
|
99
|
+
case "PROPOSAL_STATUS_UNSPECIFIED":
|
100
|
+
return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
|
101
|
+
|
102
|
+
case 1:
|
103
|
+
case "PROPOSAL_STATUS_SUBMITTED":
|
104
|
+
return ProposalStatus.PROPOSAL_STATUS_SUBMITTED;
|
105
|
+
|
106
|
+
case 2:
|
107
|
+
case "PROPOSAL_STATUS_CLOSED":
|
108
|
+
return ProposalStatus.PROPOSAL_STATUS_CLOSED;
|
109
|
+
|
110
|
+
case 3:
|
111
|
+
case "PROPOSAL_STATUS_ABORTED":
|
112
|
+
return ProposalStatus.PROPOSAL_STATUS_ABORTED;
|
113
|
+
|
114
|
+
case 4:
|
115
|
+
case "PROPOSAL_STATUS_WITHDRAWN":
|
116
|
+
return ProposalStatus.PROPOSAL_STATUS_WITHDRAWN;
|
117
|
+
|
118
|
+
case -1:
|
119
|
+
case "UNRECOGNIZED":
|
120
|
+
default:
|
121
|
+
return ProposalStatus.UNRECOGNIZED;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
export function proposalStatusToJSON(object: ProposalStatus): string {
|
125
|
+
switch (object) {
|
126
|
+
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
127
|
+
return "PROPOSAL_STATUS_UNSPECIFIED";
|
128
|
+
|
129
|
+
case ProposalStatus.PROPOSAL_STATUS_SUBMITTED:
|
130
|
+
return "PROPOSAL_STATUS_SUBMITTED";
|
131
|
+
|
132
|
+
case ProposalStatus.PROPOSAL_STATUS_CLOSED:
|
133
|
+
return "PROPOSAL_STATUS_CLOSED";
|
134
|
+
|
135
|
+
case ProposalStatus.PROPOSAL_STATUS_ABORTED:
|
136
|
+
return "PROPOSAL_STATUS_ABORTED";
|
137
|
+
|
138
|
+
case ProposalStatus.PROPOSAL_STATUS_WITHDRAWN:
|
139
|
+
return "PROPOSAL_STATUS_WITHDRAWN";
|
140
|
+
|
141
|
+
default:
|
142
|
+
return "UNKNOWN";
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
/** ProposalResult defines types of proposal results. */
|
147
|
+
export enum ProposalResult {
|
148
|
+
/** PROPOSAL_RESULT_UNSPECIFIED - An empty value is invalid and not allowed */
|
149
|
+
PROPOSAL_RESULT_UNSPECIFIED = 0,
|
150
|
+
|
151
|
+
/** PROPOSAL_RESULT_UNFINALIZED - Until a final tally has happened the status is unfinalized */
|
152
|
+
PROPOSAL_RESULT_UNFINALIZED = 1,
|
153
|
+
|
154
|
+
/** PROPOSAL_RESULT_ACCEPTED - Final result of the tally */
|
155
|
+
PROPOSAL_RESULT_ACCEPTED = 2,
|
156
|
+
|
157
|
+
/** PROPOSAL_RESULT_REJECTED - Final result of the tally */
|
158
|
+
PROPOSAL_RESULT_REJECTED = 3,
|
159
|
+
UNRECOGNIZED = -1,
|
160
|
+
}
|
161
|
+
export function proposalResultFromJSON(object: any): ProposalResult {
|
162
|
+
switch (object) {
|
163
|
+
case 0:
|
164
|
+
case "PROPOSAL_RESULT_UNSPECIFIED":
|
165
|
+
return ProposalResult.PROPOSAL_RESULT_UNSPECIFIED;
|
166
|
+
|
167
|
+
case 1:
|
168
|
+
case "PROPOSAL_RESULT_UNFINALIZED":
|
169
|
+
return ProposalResult.PROPOSAL_RESULT_UNFINALIZED;
|
170
|
+
|
171
|
+
case 2:
|
172
|
+
case "PROPOSAL_RESULT_ACCEPTED":
|
173
|
+
return ProposalResult.PROPOSAL_RESULT_ACCEPTED;
|
174
|
+
|
175
|
+
case 3:
|
176
|
+
case "PROPOSAL_RESULT_REJECTED":
|
177
|
+
return ProposalResult.PROPOSAL_RESULT_REJECTED;
|
178
|
+
|
179
|
+
case -1:
|
180
|
+
case "UNRECOGNIZED":
|
181
|
+
default:
|
182
|
+
return ProposalResult.UNRECOGNIZED;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
export function proposalResultToJSON(object: ProposalResult): string {
|
186
|
+
switch (object) {
|
187
|
+
case ProposalResult.PROPOSAL_RESULT_UNSPECIFIED:
|
188
|
+
return "PROPOSAL_RESULT_UNSPECIFIED";
|
189
|
+
|
190
|
+
case ProposalResult.PROPOSAL_RESULT_UNFINALIZED:
|
191
|
+
return "PROPOSAL_RESULT_UNFINALIZED";
|
192
|
+
|
193
|
+
case ProposalResult.PROPOSAL_RESULT_ACCEPTED:
|
194
|
+
return "PROPOSAL_RESULT_ACCEPTED";
|
195
|
+
|
196
|
+
case ProposalResult.PROPOSAL_RESULT_REJECTED:
|
197
|
+
return "PROPOSAL_RESULT_REJECTED";
|
198
|
+
|
199
|
+
default:
|
200
|
+
return "UNKNOWN";
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
/** ProposalExecutorResult defines types of proposal executor results. */
|
205
|
+
export enum ProposalExecutorResult {
|
206
|
+
/** PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - An empty value is not allowed. */
|
207
|
+
PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0,
|
208
|
+
|
209
|
+
/** PROPOSAL_EXECUTOR_RESULT_NOT_RUN - We have not yet run the executor. */
|
210
|
+
PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1,
|
211
|
+
|
212
|
+
/** PROPOSAL_EXECUTOR_RESULT_SUCCESS - The executor was successful and proposed action updated state. */
|
213
|
+
PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2,
|
214
|
+
|
215
|
+
/** PROPOSAL_EXECUTOR_RESULT_FAILURE - The executor returned an error and proposed action didn't update state. */
|
216
|
+
PROPOSAL_EXECUTOR_RESULT_FAILURE = 3,
|
217
|
+
UNRECOGNIZED = -1,
|
218
|
+
}
|
219
|
+
export function proposalExecutorResultFromJSON(object: any): ProposalExecutorResult {
|
220
|
+
switch (object) {
|
221
|
+
case 0:
|
222
|
+
case "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED":
|
223
|
+
return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED;
|
224
|
+
|
225
|
+
case 1:
|
226
|
+
case "PROPOSAL_EXECUTOR_RESULT_NOT_RUN":
|
227
|
+
return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN;
|
228
|
+
|
229
|
+
case 2:
|
230
|
+
case "PROPOSAL_EXECUTOR_RESULT_SUCCESS":
|
231
|
+
return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS;
|
232
|
+
|
233
|
+
case 3:
|
234
|
+
case "PROPOSAL_EXECUTOR_RESULT_FAILURE":
|
235
|
+
return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE;
|
236
|
+
|
237
|
+
case -1:
|
238
|
+
case "UNRECOGNIZED":
|
239
|
+
default:
|
240
|
+
return ProposalExecutorResult.UNRECOGNIZED;
|
241
|
+
}
|
242
|
+
}
|
243
|
+
export function proposalExecutorResultToJSON(object: ProposalExecutorResult): string {
|
244
|
+
switch (object) {
|
245
|
+
case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED:
|
246
|
+
return "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED";
|
247
|
+
|
248
|
+
case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN:
|
249
|
+
return "PROPOSAL_EXECUTOR_RESULT_NOT_RUN";
|
250
|
+
|
251
|
+
case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS:
|
252
|
+
return "PROPOSAL_EXECUTOR_RESULT_SUCCESS";
|
253
|
+
|
254
|
+
case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE:
|
255
|
+
return "PROPOSAL_EXECUTOR_RESULT_FAILURE";
|
256
|
+
|
257
|
+
default:
|
258
|
+
return "UNKNOWN";
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
/**
|
263
|
+
* Member represents a group member with an account address,
|
264
|
+
* non-zero weight and metadata.
|
265
|
+
*/
|
266
|
+
export interface Member {
|
267
|
+
/** address is the member's account address. */
|
268
|
+
address: string;
|
269
|
+
|
270
|
+
/** weight is the member's voting weight that should be greater than 0. */
|
271
|
+
weight: string;
|
272
|
+
|
273
|
+
/** metadata is any arbitrary metadata to attached to the member. */
|
274
|
+
metadata: string;
|
275
|
+
|
276
|
+
/** added_at is a timestamp specifying when a member was added. */
|
277
|
+
added_at: Date;
|
278
|
+
}
|
279
|
+
|
280
|
+
/** Members defines a repeated slice of Member objects. */
|
281
|
+
export interface Members {
|
282
|
+
/** members is the list of members. */
|
283
|
+
members: Member[];
|
284
|
+
}
|
285
|
+
|
286
|
+
/** ThresholdDecisionPolicy implements the DecisionPolicy interface */
|
287
|
+
export interface ThresholdDecisionPolicy {
|
288
|
+
/** threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. */
|
289
|
+
threshold: string;
|
290
|
+
|
291
|
+
/** windows defines the different windows for voting and execution. */
|
292
|
+
windows: DecisionPolicyWindows;
|
293
|
+
}
|
294
|
+
|
295
|
+
/** PercentageDecisionPolicy implements the DecisionPolicy interface */
|
296
|
+
export interface PercentageDecisionPolicy {
|
297
|
+
/** percentage is the minimum percentage the weighted sum of yes votes must meet for a proposal to succeed. */
|
298
|
+
percentage: string;
|
299
|
+
|
300
|
+
/** windows defines the different windows for voting and execution. */
|
301
|
+
windows: DecisionPolicyWindows;
|
302
|
+
}
|
303
|
+
|
304
|
+
/** DecisionPolicyWindows defines the different windows for voting and execution. */
|
305
|
+
export interface DecisionPolicyWindows {
|
306
|
+
/**
|
307
|
+
* voting_period is the duration from submission of a proposal to the end of voting period
|
308
|
+
* Within this times votes can be submitted with MsgVote.
|
309
|
+
*/
|
310
|
+
voting_period: Duration;
|
311
|
+
|
312
|
+
/**
|
313
|
+
* min_execution_period is the minimum duration after the proposal submission
|
314
|
+
* where members can start sending MsgExec. This means that the window for
|
315
|
+
* sending a MsgExec transaction is:
|
316
|
+
* `[ submission + min_execution_period ; submission + voting_period + max_execution_period]`
|
317
|
+
* where max_execution_period is a app-specific config, defined in the keeper.
|
318
|
+
* If not set, min_execution_period will default to 0.
|
319
|
+
*
|
320
|
+
* Please make sure to set a `min_execution_period` that is smaller than
|
321
|
+
* `voting_period + max_execution_period`, or else the above execution window
|
322
|
+
* is empty, meaning that all proposals created with this decision policy
|
323
|
+
* won't be able to be executed.
|
324
|
+
*/
|
325
|
+
min_execution_period: Duration;
|
326
|
+
}
|
327
|
+
|
328
|
+
/** GroupInfo represents the high-level on-chain information for a group. */
|
329
|
+
export interface GroupInfo {
|
330
|
+
/** id is the unique ID of the group. */
|
331
|
+
id: Long;
|
332
|
+
|
333
|
+
/** admin is the account address of the group's admin. */
|
334
|
+
admin: string;
|
335
|
+
|
336
|
+
/** metadata is any arbitrary metadata to attached to the group. */
|
337
|
+
metadata: string;
|
338
|
+
|
339
|
+
/**
|
340
|
+
* version is used to track changes to a group's membership structure that
|
341
|
+
* would break existing proposals. Whenever any members weight is changed,
|
342
|
+
* or any member is added or removed this version is incremented and will
|
343
|
+
* cause proposals based on older versions of this group to fail
|
344
|
+
*/
|
345
|
+
version: Long;
|
346
|
+
|
347
|
+
/** total_weight is the sum of the group members' weights. */
|
348
|
+
total_weight: string;
|
349
|
+
|
350
|
+
/** created_at is a timestamp specifying when a group was created. */
|
351
|
+
created_at: Date;
|
352
|
+
}
|
353
|
+
|
354
|
+
/** GroupMember represents the relationship between a group and a member. */
|
355
|
+
export interface GroupMember {
|
356
|
+
/** group_id is the unique ID of the group. */
|
357
|
+
group_id: Long;
|
358
|
+
|
359
|
+
/** member is the member data. */
|
360
|
+
member: Member;
|
361
|
+
}
|
362
|
+
|
363
|
+
/** GroupPolicyInfo represents the high-level on-chain information for a group policy. */
|
364
|
+
export interface GroupPolicyInfo {
|
365
|
+
/** address is the account address of group policy. */
|
366
|
+
address: string;
|
367
|
+
|
368
|
+
/** group_id is the unique ID of the group. */
|
369
|
+
group_id: Long;
|
370
|
+
|
371
|
+
/** admin is the account address of the group admin. */
|
372
|
+
admin: string;
|
373
|
+
|
374
|
+
/** metadata is any arbitrary metadata to attached to the group policy. */
|
375
|
+
metadata: string;
|
376
|
+
|
377
|
+
/**
|
378
|
+
* version is used to track changes to a group's GroupPolicyInfo structure that
|
379
|
+
* would create a different result on a running proposal.
|
380
|
+
*/
|
381
|
+
version: Long;
|
382
|
+
|
383
|
+
/** decision_policy specifies the group policy's decision policy. */
|
384
|
+
decision_policy: Any;
|
385
|
+
|
386
|
+
/** created_at is a timestamp specifying when a group policy was created. */
|
387
|
+
created_at: Date;
|
388
|
+
}
|
389
|
+
|
390
|
+
/**
|
391
|
+
* Proposal defines a group proposal. Any member of a group can submit a proposal
|
392
|
+
* for a group policy to decide upon.
|
393
|
+
* A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
|
394
|
+
* passes as well as some optional metadata associated with the proposal.
|
395
|
+
*/
|
396
|
+
export interface Proposal {
|
397
|
+
/** id is the unique id of the proposal. */
|
398
|
+
id: Long;
|
399
|
+
|
400
|
+
/** address is the account address of group policy. */
|
401
|
+
address: string;
|
402
|
+
|
403
|
+
/** metadata is any arbitrary metadata to attached to the proposal. */
|
404
|
+
metadata: string;
|
405
|
+
|
406
|
+
/** proposers are the account addresses of the proposers. */
|
407
|
+
proposers: string[];
|
408
|
+
|
409
|
+
/** submit_time is a timestamp specifying when a proposal was submitted. */
|
410
|
+
submit_time: Date;
|
411
|
+
|
412
|
+
/**
|
413
|
+
* group_version tracks the version of the group that this proposal corresponds to.
|
414
|
+
* When group membership is changed, existing proposals from previous group versions will become invalid.
|
415
|
+
*/
|
416
|
+
group_version: Long;
|
417
|
+
|
418
|
+
/**
|
419
|
+
* group_policy_version tracks the version of the group policy that this proposal corresponds to.
|
420
|
+
* When a decision policy is changed, existing proposals from previous policy versions will become invalid.
|
421
|
+
*/
|
422
|
+
group_policy_version: Long;
|
423
|
+
|
424
|
+
/** status represents the high level position in the life cycle of the proposal. Initial value is Submitted. */
|
425
|
+
status: ProposalStatus;
|
426
|
+
|
427
|
+
/**
|
428
|
+
* result is the final result based on the votes and election rule. Initial value is unfinalized.
|
429
|
+
* The result is persisted so that clients can always rely on this state and not have to replicate the logic.
|
430
|
+
*/
|
431
|
+
result: ProposalResult;
|
432
|
+
|
433
|
+
/**
|
434
|
+
* final_tally_result contains the sums of all weighted votes for this
|
435
|
+
* proposal for each vote option, after tallying. When querying a proposal
|
436
|
+
* via gRPC, this field is not populated until the proposal's voting period
|
437
|
+
* has ended.
|
438
|
+
*/
|
439
|
+
final_tally_result: TallyResult;
|
440
|
+
|
441
|
+
/**
|
442
|
+
* voting_period_end is the timestamp before which voting must be done.
|
443
|
+
* Unless a successfull MsgExec is called before (to execute a proposal whose
|
444
|
+
* tally is successful before the voting period ends), tallying will be done
|
445
|
+
* at this point, and the `final_tally_result`, as well
|
446
|
+
* as `status` and `result` fields will be accordingly updated.
|
447
|
+
*/
|
448
|
+
voting_period_end: Date;
|
449
|
+
|
450
|
+
/** executor_result is the final result based on the votes and election rule. Initial value is NotRun. */
|
451
|
+
executor_result: ProposalExecutorResult;
|
452
|
+
|
453
|
+
/** messages is a list of Msgs that will be executed if the proposal passes. */
|
454
|
+
messages: Any[];
|
455
|
+
}
|
456
|
+
|
457
|
+
/** TallyResult represents the sum of weighted votes for each vote option. */
|
458
|
+
export interface TallyResult {
|
459
|
+
/** yes_count is the weighted sum of yes votes. */
|
460
|
+
yes_count: string;
|
461
|
+
|
462
|
+
/** abstain_count is the weighted sum of abstainers. */
|
463
|
+
abstain_count: string;
|
464
|
+
|
465
|
+
/** no is the weighted sum of no votes. */
|
466
|
+
no_count: string;
|
467
|
+
|
468
|
+
/** no_with_veto_count is the weighted sum of veto. */
|
469
|
+
no_with_veto_count: string;
|
470
|
+
}
|
471
|
+
|
472
|
+
/** Vote represents a vote for a proposal. */
|
473
|
+
export interface Vote {
|
474
|
+
/** proposal is the unique ID of the proposal. */
|
475
|
+
proposal_id: Long;
|
476
|
+
|
477
|
+
/** voter is the account address of the voter. */
|
478
|
+
voter: string;
|
479
|
+
|
480
|
+
/** option is the voter's choice on the proposal. */
|
481
|
+
option: VoteOption;
|
482
|
+
|
483
|
+
/** metadata is any arbitrary metadata to attached to the vote. */
|
484
|
+
metadata: string;
|
485
|
+
|
486
|
+
/** submit_time is the timestamp when the vote was submitted. */
|
487
|
+
submit_time: Date;
|
488
|
+
}
|
489
|
+
|
490
|
+
function createBaseMember(): Member {
|
491
|
+
return {
|
492
|
+
address: "",
|
493
|
+
weight: "",
|
494
|
+
metadata: "",
|
495
|
+
added_at: undefined
|
496
|
+
};
|
497
|
+
}
|
498
|
+
|
499
|
+
export const Member = {
|
500
|
+
encode(message: Member, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
501
|
+
if (message.address !== "") {
|
502
|
+
writer.uint32(10).string(message.address);
|
503
|
+
}
|
504
|
+
|
505
|
+
if (message.weight !== "") {
|
506
|
+
writer.uint32(18).string(message.weight);
|
507
|
+
}
|
508
|
+
|
509
|
+
if (message.metadata !== "") {
|
510
|
+
writer.uint32(26).string(message.metadata);
|
511
|
+
}
|
512
|
+
|
513
|
+
if (message.added_at !== undefined) {
|
514
|
+
Timestamp.encode(toTimestamp(message.added_at), writer.uint32(34).fork()).ldelim();
|
515
|
+
}
|
516
|
+
|
517
|
+
return writer;
|
518
|
+
},
|
519
|
+
|
520
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Member {
|
521
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
522
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
523
|
+
const message = createBaseMember();
|
524
|
+
|
525
|
+
while (reader.pos < end) {
|
526
|
+
const tag = reader.uint32();
|
527
|
+
|
528
|
+
switch (tag >>> 3) {
|
529
|
+
case 1:
|
530
|
+
message.address = reader.string();
|
531
|
+
break;
|
532
|
+
|
533
|
+
case 2:
|
534
|
+
message.weight = reader.string();
|
535
|
+
break;
|
536
|
+
|
537
|
+
case 3:
|
538
|
+
message.metadata = reader.string();
|
539
|
+
break;
|
540
|
+
|
541
|
+
case 4:
|
542
|
+
message.added_at = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
543
|
+
break;
|
544
|
+
|
545
|
+
default:
|
546
|
+
reader.skipType(tag & 7);
|
547
|
+
break;
|
548
|
+
}
|
549
|
+
}
|
550
|
+
|
551
|
+
return message;
|
552
|
+
},
|
553
|
+
|
554
|
+
fromJSON(object: any): Member {
|
555
|
+
return {
|
556
|
+
address: isSet(object.address) ? String(object.address) : "",
|
557
|
+
weight: isSet(object.weight) ? String(object.weight) : "",
|
558
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
559
|
+
added_at: isSet(object.added_at) ? fromJsonTimestamp(object.added_at) : undefined
|
560
|
+
};
|
561
|
+
},
|
562
|
+
|
563
|
+
toJSON(message: Member): unknown {
|
564
|
+
const obj: any = {};
|
565
|
+
message.address !== undefined && (obj.address = message.address);
|
566
|
+
message.weight !== undefined && (obj.weight = message.weight);
|
567
|
+
message.metadata !== undefined && (obj.metadata = message.metadata);
|
568
|
+
message.added_at !== undefined && (obj.added_at = message.added_at.toISOString());
|
569
|
+
return obj;
|
570
|
+
},
|
571
|
+
|
572
|
+
fromPartial(object: DeepPartial<Member>): Member {
|
573
|
+
const message = createBaseMember();
|
574
|
+
message.address = object.address ?? "";
|
575
|
+
message.weight = object.weight ?? "";
|
576
|
+
message.metadata = object.metadata ?? "";
|
577
|
+
message.added_at = object.added_at ?? undefined;
|
578
|
+
return message;
|
579
|
+
}
|
580
|
+
|
581
|
+
};
|
582
|
+
|
583
|
+
function createBaseMembers(): Members {
|
584
|
+
return {
|
585
|
+
members: []
|
586
|
+
};
|
587
|
+
}
|
588
|
+
|
589
|
+
export const Members = {
|
590
|
+
encode(message: Members, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
591
|
+
for (const v of message.members) {
|
592
|
+
Member.encode(v!, writer.uint32(10).fork()).ldelim();
|
593
|
+
}
|
594
|
+
|
595
|
+
return writer;
|
596
|
+
},
|
597
|
+
|
598
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Members {
|
599
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
600
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
601
|
+
const message = createBaseMembers();
|
602
|
+
|
603
|
+
while (reader.pos < end) {
|
604
|
+
const tag = reader.uint32();
|
605
|
+
|
606
|
+
switch (tag >>> 3) {
|
607
|
+
case 1:
|
608
|
+
message.members.push(Member.decode(reader, reader.uint32()));
|
609
|
+
break;
|
610
|
+
|
611
|
+
default:
|
612
|
+
reader.skipType(tag & 7);
|
613
|
+
break;
|
614
|
+
}
|
615
|
+
}
|
616
|
+
|
617
|
+
return message;
|
618
|
+
},
|
619
|
+
|
620
|
+
fromJSON(object: any): Members {
|
621
|
+
return {
|
622
|
+
members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromJSON(e)) : []
|
623
|
+
};
|
624
|
+
},
|
625
|
+
|
626
|
+
toJSON(message: Members): unknown {
|
627
|
+
const obj: any = {};
|
628
|
+
|
629
|
+
if (message.members) {
|
630
|
+
obj.members = message.members.map(e => e ? Member.toJSON(e) : undefined);
|
631
|
+
} else {
|
632
|
+
obj.members = [];
|
633
|
+
}
|
634
|
+
|
635
|
+
return obj;
|
636
|
+
},
|
637
|
+
|
638
|
+
fromPartial(object: DeepPartial<Members>): Members {
|
639
|
+
const message = createBaseMembers();
|
640
|
+
message.members = object.members?.map(e => Member.fromPartial(e)) || [];
|
641
|
+
return message;
|
642
|
+
}
|
643
|
+
|
644
|
+
};
|
645
|
+
|
646
|
+
function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy {
|
647
|
+
return {
|
648
|
+
threshold: "",
|
649
|
+
windows: undefined
|
650
|
+
};
|
651
|
+
}
|
652
|
+
|
653
|
+
export const ThresholdDecisionPolicy = {
|
654
|
+
encode(message: ThresholdDecisionPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
655
|
+
if (message.threshold !== "") {
|
656
|
+
writer.uint32(10).string(message.threshold);
|
657
|
+
}
|
658
|
+
|
659
|
+
if (message.windows !== undefined) {
|
660
|
+
DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim();
|
661
|
+
}
|
662
|
+
|
663
|
+
return writer;
|
664
|
+
},
|
665
|
+
|
666
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ThresholdDecisionPolicy {
|
667
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
668
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
669
|
+
const message = createBaseThresholdDecisionPolicy();
|
670
|
+
|
671
|
+
while (reader.pos < end) {
|
672
|
+
const tag = reader.uint32();
|
673
|
+
|
674
|
+
switch (tag >>> 3) {
|
675
|
+
case 1:
|
676
|
+
message.threshold = reader.string();
|
677
|
+
break;
|
678
|
+
|
679
|
+
case 2:
|
680
|
+
message.windows = DecisionPolicyWindows.decode(reader, reader.uint32());
|
681
|
+
break;
|
682
|
+
|
683
|
+
default:
|
684
|
+
reader.skipType(tag & 7);
|
685
|
+
break;
|
686
|
+
}
|
687
|
+
}
|
688
|
+
|
689
|
+
return message;
|
690
|
+
},
|
691
|
+
|
692
|
+
fromJSON(object: any): ThresholdDecisionPolicy {
|
693
|
+
return {
|
694
|
+
threshold: isSet(object.threshold) ? String(object.threshold) : "",
|
695
|
+
windows: isSet(object.windows) ? DecisionPolicyWindows.fromJSON(object.windows) : undefined
|
696
|
+
};
|
697
|
+
},
|
698
|
+
|
699
|
+
toJSON(message: ThresholdDecisionPolicy): unknown {
|
700
|
+
const obj: any = {};
|
701
|
+
message.threshold !== undefined && (obj.threshold = message.threshold);
|
702
|
+
message.windows !== undefined && (obj.windows = message.windows ? DecisionPolicyWindows.toJSON(message.windows) : undefined);
|
703
|
+
return obj;
|
704
|
+
},
|
705
|
+
|
706
|
+
fromPartial(object: DeepPartial<ThresholdDecisionPolicy>): ThresholdDecisionPolicy {
|
707
|
+
const message = createBaseThresholdDecisionPolicy();
|
708
|
+
message.threshold = object.threshold ?? "";
|
709
|
+
message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined;
|
710
|
+
return message;
|
711
|
+
}
|
712
|
+
|
713
|
+
};
|
714
|
+
|
715
|
+
function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy {
|
716
|
+
return {
|
717
|
+
percentage: "",
|
718
|
+
windows: undefined
|
719
|
+
};
|
720
|
+
}
|
721
|
+
|
722
|
+
export const PercentageDecisionPolicy = {
|
723
|
+
encode(message: PercentageDecisionPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
724
|
+
if (message.percentage !== "") {
|
725
|
+
writer.uint32(10).string(message.percentage);
|
726
|
+
}
|
727
|
+
|
728
|
+
if (message.windows !== undefined) {
|
729
|
+
DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim();
|
730
|
+
}
|
731
|
+
|
732
|
+
return writer;
|
733
|
+
},
|
734
|
+
|
735
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): PercentageDecisionPolicy {
|
736
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
737
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
738
|
+
const message = createBasePercentageDecisionPolicy();
|
739
|
+
|
740
|
+
while (reader.pos < end) {
|
741
|
+
const tag = reader.uint32();
|
742
|
+
|
743
|
+
switch (tag >>> 3) {
|
744
|
+
case 1:
|
745
|
+
message.percentage = reader.string();
|
746
|
+
break;
|
747
|
+
|
748
|
+
case 2:
|
749
|
+
message.windows = DecisionPolicyWindows.decode(reader, reader.uint32());
|
750
|
+
break;
|
751
|
+
|
752
|
+
default:
|
753
|
+
reader.skipType(tag & 7);
|
754
|
+
break;
|
755
|
+
}
|
756
|
+
}
|
757
|
+
|
758
|
+
return message;
|
759
|
+
},
|
760
|
+
|
761
|
+
fromJSON(object: any): PercentageDecisionPolicy {
|
762
|
+
return {
|
763
|
+
percentage: isSet(object.percentage) ? String(object.percentage) : "",
|
764
|
+
windows: isSet(object.windows) ? DecisionPolicyWindows.fromJSON(object.windows) : undefined
|
765
|
+
};
|
766
|
+
},
|
767
|
+
|
768
|
+
toJSON(message: PercentageDecisionPolicy): unknown {
|
769
|
+
const obj: any = {};
|
770
|
+
message.percentage !== undefined && (obj.percentage = message.percentage);
|
771
|
+
message.windows !== undefined && (obj.windows = message.windows ? DecisionPolicyWindows.toJSON(message.windows) : undefined);
|
772
|
+
return obj;
|
773
|
+
},
|
774
|
+
|
775
|
+
fromPartial(object: DeepPartial<PercentageDecisionPolicy>): PercentageDecisionPolicy {
|
776
|
+
const message = createBasePercentageDecisionPolicy();
|
777
|
+
message.percentage = object.percentage ?? "";
|
778
|
+
message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined;
|
779
|
+
return message;
|
780
|
+
}
|
781
|
+
|
782
|
+
};
|
783
|
+
|
784
|
+
function createBaseDecisionPolicyWindows(): DecisionPolicyWindows {
|
785
|
+
return {
|
786
|
+
voting_period: undefined,
|
787
|
+
min_execution_period: undefined
|
788
|
+
};
|
789
|
+
}
|
790
|
+
|
791
|
+
export const DecisionPolicyWindows = {
|
792
|
+
encode(message: DecisionPolicyWindows, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
793
|
+
if (message.voting_period !== undefined) {
|
794
|
+
Duration.encode(message.voting_period, writer.uint32(10).fork()).ldelim();
|
795
|
+
}
|
796
|
+
|
797
|
+
if (message.min_execution_period !== undefined) {
|
798
|
+
Duration.encode(message.min_execution_period, writer.uint32(18).fork()).ldelim();
|
799
|
+
}
|
800
|
+
|
801
|
+
return writer;
|
802
|
+
},
|
803
|
+
|
804
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DecisionPolicyWindows {
|
805
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
806
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
807
|
+
const message = createBaseDecisionPolicyWindows();
|
808
|
+
|
809
|
+
while (reader.pos < end) {
|
810
|
+
const tag = reader.uint32();
|
811
|
+
|
812
|
+
switch (tag >>> 3) {
|
813
|
+
case 1:
|
814
|
+
message.voting_period = Duration.decode(reader, reader.uint32());
|
815
|
+
break;
|
816
|
+
|
817
|
+
case 2:
|
818
|
+
message.min_execution_period = Duration.decode(reader, reader.uint32());
|
819
|
+
break;
|
820
|
+
|
821
|
+
default:
|
822
|
+
reader.skipType(tag & 7);
|
823
|
+
break;
|
824
|
+
}
|
825
|
+
}
|
826
|
+
|
827
|
+
return message;
|
828
|
+
},
|
829
|
+
|
830
|
+
fromJSON(object: any): DecisionPolicyWindows {
|
831
|
+
return {
|
832
|
+
voting_period: isSet(object.voting_period) ? Duration.fromJSON(object.voting_period) : undefined,
|
833
|
+
min_execution_period: isSet(object.min_execution_period) ? Duration.fromJSON(object.min_execution_period) : undefined
|
834
|
+
};
|
835
|
+
},
|
836
|
+
|
837
|
+
toJSON(message: DecisionPolicyWindows): unknown {
|
838
|
+
const obj: any = {};
|
839
|
+
message.voting_period !== undefined && (obj.voting_period = message.voting_period);
|
840
|
+
message.min_execution_period !== undefined && (obj.min_execution_period = message.min_execution_period);
|
841
|
+
return obj;
|
842
|
+
},
|
843
|
+
|
844
|
+
fromPartial(object: DeepPartial<DecisionPolicyWindows>): DecisionPolicyWindows {
|
845
|
+
const message = createBaseDecisionPolicyWindows();
|
846
|
+
message.voting_period = object.voting_period ?? undefined;
|
847
|
+
message.min_execution_period = object.min_execution_period ?? undefined;
|
848
|
+
return message;
|
849
|
+
}
|
850
|
+
|
851
|
+
};
|
852
|
+
|
853
|
+
function createBaseGroupInfo(): GroupInfo {
|
854
|
+
return {
|
855
|
+
id: Long.UZERO,
|
856
|
+
admin: "",
|
857
|
+
metadata: "",
|
858
|
+
version: Long.UZERO,
|
859
|
+
total_weight: "",
|
860
|
+
created_at: undefined
|
861
|
+
};
|
862
|
+
}
|
863
|
+
|
864
|
+
export const GroupInfo = {
|
865
|
+
encode(message: GroupInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
866
|
+
if (!message.id.isZero()) {
|
867
|
+
writer.uint32(8).uint64(message.id);
|
868
|
+
}
|
869
|
+
|
870
|
+
if (message.admin !== "") {
|
871
|
+
writer.uint32(18).string(message.admin);
|
872
|
+
}
|
873
|
+
|
874
|
+
if (message.metadata !== "") {
|
875
|
+
writer.uint32(26).string(message.metadata);
|
876
|
+
}
|
877
|
+
|
878
|
+
if (!message.version.isZero()) {
|
879
|
+
writer.uint32(32).uint64(message.version);
|
880
|
+
}
|
881
|
+
|
882
|
+
if (message.total_weight !== "") {
|
883
|
+
writer.uint32(42).string(message.total_weight);
|
884
|
+
}
|
885
|
+
|
886
|
+
if (message.created_at !== undefined) {
|
887
|
+
Timestamp.encode(toTimestamp(message.created_at), writer.uint32(50).fork()).ldelim();
|
888
|
+
}
|
889
|
+
|
890
|
+
return writer;
|
891
|
+
},
|
892
|
+
|
893
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GroupInfo {
|
894
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
895
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
896
|
+
const message = createBaseGroupInfo();
|
897
|
+
|
898
|
+
while (reader.pos < end) {
|
899
|
+
const tag = reader.uint32();
|
900
|
+
|
901
|
+
switch (tag >>> 3) {
|
902
|
+
case 1:
|
903
|
+
message.id = (reader.uint64() as Long);
|
904
|
+
break;
|
905
|
+
|
906
|
+
case 2:
|
907
|
+
message.admin = reader.string();
|
908
|
+
break;
|
909
|
+
|
910
|
+
case 3:
|
911
|
+
message.metadata = reader.string();
|
912
|
+
break;
|
913
|
+
|
914
|
+
case 4:
|
915
|
+
message.version = (reader.uint64() as Long);
|
916
|
+
break;
|
917
|
+
|
918
|
+
case 5:
|
919
|
+
message.total_weight = reader.string();
|
920
|
+
break;
|
921
|
+
|
922
|
+
case 6:
|
923
|
+
message.created_at = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
924
|
+
break;
|
925
|
+
|
926
|
+
default:
|
927
|
+
reader.skipType(tag & 7);
|
928
|
+
break;
|
929
|
+
}
|
930
|
+
}
|
931
|
+
|
932
|
+
return message;
|
933
|
+
},
|
934
|
+
|
935
|
+
fromJSON(object: any): GroupInfo {
|
936
|
+
return {
|
937
|
+
id: isSet(object.id) ? Long.fromString(object.id) : Long.UZERO,
|
938
|
+
admin: isSet(object.admin) ? String(object.admin) : "",
|
939
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
940
|
+
version: isSet(object.version) ? Long.fromString(object.version) : Long.UZERO,
|
941
|
+
total_weight: isSet(object.total_weight) ? String(object.total_weight) : "",
|
942
|
+
created_at: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined
|
943
|
+
};
|
944
|
+
},
|
945
|
+
|
946
|
+
toJSON(message: GroupInfo): unknown {
|
947
|
+
const obj: any = {};
|
948
|
+
message.id !== undefined && (obj.id = (message.id || Long.UZERO).toString());
|
949
|
+
message.admin !== undefined && (obj.admin = message.admin);
|
950
|
+
message.metadata !== undefined && (obj.metadata = message.metadata);
|
951
|
+
message.version !== undefined && (obj.version = (message.version || Long.UZERO).toString());
|
952
|
+
message.total_weight !== undefined && (obj.total_weight = message.total_weight);
|
953
|
+
message.created_at !== undefined && (obj.created_at = message.created_at.toISOString());
|
954
|
+
return obj;
|
955
|
+
},
|
956
|
+
|
957
|
+
fromPartial(object: DeepPartial<GroupInfo>): GroupInfo {
|
958
|
+
const message = createBaseGroupInfo();
|
959
|
+
message.id = object.id !== undefined && object.id !== null ? Long.fromValue(object.id) : Long.UZERO;
|
960
|
+
message.admin = object.admin ?? "";
|
961
|
+
message.metadata = object.metadata ?? "";
|
962
|
+
message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.UZERO;
|
963
|
+
message.total_weight = object.total_weight ?? "";
|
964
|
+
message.created_at = object.created_at ?? undefined;
|
965
|
+
return message;
|
966
|
+
}
|
967
|
+
|
968
|
+
};
|
969
|
+
|
970
|
+
function createBaseGroupMember(): GroupMember {
|
971
|
+
return {
|
972
|
+
group_id: Long.UZERO,
|
973
|
+
member: undefined
|
974
|
+
};
|
975
|
+
}
|
976
|
+
|
977
|
+
export const GroupMember = {
|
978
|
+
encode(message: GroupMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
979
|
+
if (!message.group_id.isZero()) {
|
980
|
+
writer.uint32(8).uint64(message.group_id);
|
981
|
+
}
|
982
|
+
|
983
|
+
if (message.member !== undefined) {
|
984
|
+
Member.encode(message.member, writer.uint32(18).fork()).ldelim();
|
985
|
+
}
|
986
|
+
|
987
|
+
return writer;
|
988
|
+
},
|
989
|
+
|
990
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GroupMember {
|
991
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
992
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
993
|
+
const message = createBaseGroupMember();
|
994
|
+
|
995
|
+
while (reader.pos < end) {
|
996
|
+
const tag = reader.uint32();
|
997
|
+
|
998
|
+
switch (tag >>> 3) {
|
999
|
+
case 1:
|
1000
|
+
message.group_id = (reader.uint64() as Long);
|
1001
|
+
break;
|
1002
|
+
|
1003
|
+
case 2:
|
1004
|
+
message.member = Member.decode(reader, reader.uint32());
|
1005
|
+
break;
|
1006
|
+
|
1007
|
+
default:
|
1008
|
+
reader.skipType(tag & 7);
|
1009
|
+
break;
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
return message;
|
1014
|
+
},
|
1015
|
+
|
1016
|
+
fromJSON(object: any): GroupMember {
|
1017
|
+
return {
|
1018
|
+
group_id: isSet(object.group_id) ? Long.fromString(object.group_id) : Long.UZERO,
|
1019
|
+
member: isSet(object.member) ? Member.fromJSON(object.member) : undefined
|
1020
|
+
};
|
1021
|
+
},
|
1022
|
+
|
1023
|
+
toJSON(message: GroupMember): unknown {
|
1024
|
+
const obj: any = {};
|
1025
|
+
message.group_id !== undefined && (obj.group_id = (message.group_id || Long.UZERO).toString());
|
1026
|
+
message.member !== undefined && (obj.member = message.member ? Member.toJSON(message.member) : undefined);
|
1027
|
+
return obj;
|
1028
|
+
},
|
1029
|
+
|
1030
|
+
fromPartial(object: DeepPartial<GroupMember>): GroupMember {
|
1031
|
+
const message = createBaseGroupMember();
|
1032
|
+
message.group_id = object.group_id !== undefined && object.group_id !== null ? Long.fromValue(object.group_id) : Long.UZERO;
|
1033
|
+
message.member = object.member !== undefined && object.member !== null ? Member.fromPartial(object.member) : undefined;
|
1034
|
+
return message;
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
};
|
1038
|
+
|
1039
|
+
function createBaseGroupPolicyInfo(): GroupPolicyInfo {
|
1040
|
+
return {
|
1041
|
+
address: "",
|
1042
|
+
group_id: Long.UZERO,
|
1043
|
+
admin: "",
|
1044
|
+
metadata: "",
|
1045
|
+
version: Long.UZERO,
|
1046
|
+
decision_policy: undefined,
|
1047
|
+
created_at: undefined
|
1048
|
+
};
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
export const GroupPolicyInfo = {
|
1052
|
+
encode(message: GroupPolicyInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1053
|
+
if (message.address !== "") {
|
1054
|
+
writer.uint32(10).string(message.address);
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
if (!message.group_id.isZero()) {
|
1058
|
+
writer.uint32(16).uint64(message.group_id);
|
1059
|
+
}
|
1060
|
+
|
1061
|
+
if (message.admin !== "") {
|
1062
|
+
writer.uint32(26).string(message.admin);
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
if (message.metadata !== "") {
|
1066
|
+
writer.uint32(34).string(message.metadata);
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
if (!message.version.isZero()) {
|
1070
|
+
writer.uint32(40).uint64(message.version);
|
1071
|
+
}
|
1072
|
+
|
1073
|
+
if (message.decision_policy !== undefined) {
|
1074
|
+
Any.encode(message.decision_policy, writer.uint32(50).fork()).ldelim();
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
if (message.created_at !== undefined) {
|
1078
|
+
Timestamp.encode(toTimestamp(message.created_at), writer.uint32(58).fork()).ldelim();
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
return writer;
|
1082
|
+
},
|
1083
|
+
|
1084
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GroupPolicyInfo {
|
1085
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1086
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1087
|
+
const message = createBaseGroupPolicyInfo();
|
1088
|
+
|
1089
|
+
while (reader.pos < end) {
|
1090
|
+
const tag = reader.uint32();
|
1091
|
+
|
1092
|
+
switch (tag >>> 3) {
|
1093
|
+
case 1:
|
1094
|
+
message.address = reader.string();
|
1095
|
+
break;
|
1096
|
+
|
1097
|
+
case 2:
|
1098
|
+
message.group_id = (reader.uint64() as Long);
|
1099
|
+
break;
|
1100
|
+
|
1101
|
+
case 3:
|
1102
|
+
message.admin = reader.string();
|
1103
|
+
break;
|
1104
|
+
|
1105
|
+
case 4:
|
1106
|
+
message.metadata = reader.string();
|
1107
|
+
break;
|
1108
|
+
|
1109
|
+
case 5:
|
1110
|
+
message.version = (reader.uint64() as Long);
|
1111
|
+
break;
|
1112
|
+
|
1113
|
+
case 6:
|
1114
|
+
message.decision_policy = Any.decode(reader, reader.uint32());
|
1115
|
+
break;
|
1116
|
+
|
1117
|
+
case 7:
|
1118
|
+
message.created_at = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
1119
|
+
break;
|
1120
|
+
|
1121
|
+
default:
|
1122
|
+
reader.skipType(tag & 7);
|
1123
|
+
break;
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
|
1127
|
+
return message;
|
1128
|
+
},
|
1129
|
+
|
1130
|
+
fromJSON(object: any): GroupPolicyInfo {
|
1131
|
+
return {
|
1132
|
+
address: isSet(object.address) ? String(object.address) : "",
|
1133
|
+
group_id: isSet(object.group_id) ? Long.fromString(object.group_id) : Long.UZERO,
|
1134
|
+
admin: isSet(object.admin) ? String(object.admin) : "",
|
1135
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
1136
|
+
version: isSet(object.version) ? Long.fromString(object.version) : Long.UZERO,
|
1137
|
+
decision_policy: isSet(object.decision_policy) ? Any.fromJSON(object.decision_policy) : undefined,
|
1138
|
+
created_at: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined
|
1139
|
+
};
|
1140
|
+
},
|
1141
|
+
|
1142
|
+
toJSON(message: GroupPolicyInfo): unknown {
|
1143
|
+
const obj: any = {};
|
1144
|
+
message.address !== undefined && (obj.address = message.address);
|
1145
|
+
message.group_id !== undefined && (obj.group_id = (message.group_id || Long.UZERO).toString());
|
1146
|
+
message.admin !== undefined && (obj.admin = message.admin);
|
1147
|
+
message.metadata !== undefined && (obj.metadata = message.metadata);
|
1148
|
+
message.version !== undefined && (obj.version = (message.version || Long.UZERO).toString());
|
1149
|
+
message.decision_policy !== undefined && (obj.decision_policy = message.decision_policy ? Any.toJSON(message.decision_policy) : undefined);
|
1150
|
+
message.created_at !== undefined && (obj.created_at = message.created_at.toISOString());
|
1151
|
+
return obj;
|
1152
|
+
},
|
1153
|
+
|
1154
|
+
fromPartial(object: DeepPartial<GroupPolicyInfo>): GroupPolicyInfo {
|
1155
|
+
const message = createBaseGroupPolicyInfo();
|
1156
|
+
message.address = object.address ?? "";
|
1157
|
+
message.group_id = object.group_id !== undefined && object.group_id !== null ? Long.fromValue(object.group_id) : Long.UZERO;
|
1158
|
+
message.admin = object.admin ?? "";
|
1159
|
+
message.metadata = object.metadata ?? "";
|
1160
|
+
message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.UZERO;
|
1161
|
+
message.decision_policy = object.decision_policy !== undefined && object.decision_policy !== null ? Any.fromPartial(object.decision_policy) : undefined;
|
1162
|
+
message.created_at = object.created_at ?? undefined;
|
1163
|
+
return message;
|
1164
|
+
}
|
1165
|
+
|
1166
|
+
};
|
1167
|
+
|
1168
|
+
function createBaseProposal(): Proposal {
|
1169
|
+
return {
|
1170
|
+
id: Long.UZERO,
|
1171
|
+
address: "",
|
1172
|
+
metadata: "",
|
1173
|
+
proposers: [],
|
1174
|
+
submit_time: undefined,
|
1175
|
+
group_version: Long.UZERO,
|
1176
|
+
group_policy_version: Long.UZERO,
|
1177
|
+
status: 0,
|
1178
|
+
result: 0,
|
1179
|
+
final_tally_result: undefined,
|
1180
|
+
voting_period_end: undefined,
|
1181
|
+
executor_result: 0,
|
1182
|
+
messages: []
|
1183
|
+
};
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
export const Proposal = {
|
1187
|
+
encode(message: Proposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1188
|
+
if (!message.id.isZero()) {
|
1189
|
+
writer.uint32(8).uint64(message.id);
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
if (message.address !== "") {
|
1193
|
+
writer.uint32(18).string(message.address);
|
1194
|
+
}
|
1195
|
+
|
1196
|
+
if (message.metadata !== "") {
|
1197
|
+
writer.uint32(26).string(message.metadata);
|
1198
|
+
}
|
1199
|
+
|
1200
|
+
for (const v of message.proposers) {
|
1201
|
+
writer.uint32(34).string(v!);
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
if (message.submit_time !== undefined) {
|
1205
|
+
Timestamp.encode(toTimestamp(message.submit_time), writer.uint32(42).fork()).ldelim();
|
1206
|
+
}
|
1207
|
+
|
1208
|
+
if (!message.group_version.isZero()) {
|
1209
|
+
writer.uint32(48).uint64(message.group_version);
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
if (!message.group_policy_version.isZero()) {
|
1213
|
+
writer.uint32(56).uint64(message.group_policy_version);
|
1214
|
+
}
|
1215
|
+
|
1216
|
+
if (message.status !== 0) {
|
1217
|
+
writer.uint32(64).int32(message.status);
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
if (message.result !== 0) {
|
1221
|
+
writer.uint32(72).int32(message.result);
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
if (message.final_tally_result !== undefined) {
|
1225
|
+
TallyResult.encode(message.final_tally_result, writer.uint32(82).fork()).ldelim();
|
1226
|
+
}
|
1227
|
+
|
1228
|
+
if (message.voting_period_end !== undefined) {
|
1229
|
+
Timestamp.encode(toTimestamp(message.voting_period_end), writer.uint32(90).fork()).ldelim();
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
if (message.executor_result !== 0) {
|
1233
|
+
writer.uint32(96).int32(message.executor_result);
|
1234
|
+
}
|
1235
|
+
|
1236
|
+
for (const v of message.messages) {
|
1237
|
+
Any.encode(v!, writer.uint32(106).fork()).ldelim();
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
return writer;
|
1241
|
+
},
|
1242
|
+
|
1243
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Proposal {
|
1244
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1245
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1246
|
+
const message = createBaseProposal();
|
1247
|
+
|
1248
|
+
while (reader.pos < end) {
|
1249
|
+
const tag = reader.uint32();
|
1250
|
+
|
1251
|
+
switch (tag >>> 3) {
|
1252
|
+
case 1:
|
1253
|
+
message.id = (reader.uint64() as Long);
|
1254
|
+
break;
|
1255
|
+
|
1256
|
+
case 2:
|
1257
|
+
message.address = reader.string();
|
1258
|
+
break;
|
1259
|
+
|
1260
|
+
case 3:
|
1261
|
+
message.metadata = reader.string();
|
1262
|
+
break;
|
1263
|
+
|
1264
|
+
case 4:
|
1265
|
+
message.proposers.push(reader.string());
|
1266
|
+
break;
|
1267
|
+
|
1268
|
+
case 5:
|
1269
|
+
message.submit_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
1270
|
+
break;
|
1271
|
+
|
1272
|
+
case 6:
|
1273
|
+
message.group_version = (reader.uint64() as Long);
|
1274
|
+
break;
|
1275
|
+
|
1276
|
+
case 7:
|
1277
|
+
message.group_policy_version = (reader.uint64() as Long);
|
1278
|
+
break;
|
1279
|
+
|
1280
|
+
case 8:
|
1281
|
+
message.status = (reader.int32() as any);
|
1282
|
+
break;
|
1283
|
+
|
1284
|
+
case 9:
|
1285
|
+
message.result = (reader.int32() as any);
|
1286
|
+
break;
|
1287
|
+
|
1288
|
+
case 10:
|
1289
|
+
message.final_tally_result = TallyResult.decode(reader, reader.uint32());
|
1290
|
+
break;
|
1291
|
+
|
1292
|
+
case 11:
|
1293
|
+
message.voting_period_end = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
1294
|
+
break;
|
1295
|
+
|
1296
|
+
case 12:
|
1297
|
+
message.executor_result = (reader.int32() as any);
|
1298
|
+
break;
|
1299
|
+
|
1300
|
+
case 13:
|
1301
|
+
message.messages.push(Any.decode(reader, reader.uint32()));
|
1302
|
+
break;
|
1303
|
+
|
1304
|
+
default:
|
1305
|
+
reader.skipType(tag & 7);
|
1306
|
+
break;
|
1307
|
+
}
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
return message;
|
1311
|
+
},
|
1312
|
+
|
1313
|
+
fromJSON(object: any): Proposal {
|
1314
|
+
return {
|
1315
|
+
id: isSet(object.id) ? Long.fromString(object.id) : Long.UZERO,
|
1316
|
+
address: isSet(object.address) ? String(object.address) : "",
|
1317
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
1318
|
+
proposers: Array.isArray(object?.proposers) ? object.proposers.map((e: any) => String(e)) : [],
|
1319
|
+
submit_time: isSet(object.submit_time) ? fromJsonTimestamp(object.submit_time) : undefined,
|
1320
|
+
group_version: isSet(object.group_version) ? Long.fromString(object.group_version) : Long.UZERO,
|
1321
|
+
group_policy_version: isSet(object.group_policy_version) ? Long.fromString(object.group_policy_version) : Long.UZERO,
|
1322
|
+
status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0,
|
1323
|
+
result: isSet(object.result) ? proposalResultFromJSON(object.result) : 0,
|
1324
|
+
final_tally_result: isSet(object.final_tally_result) ? TallyResult.fromJSON(object.final_tally_result) : undefined,
|
1325
|
+
voting_period_end: isSet(object.voting_period_end) ? fromJsonTimestamp(object.voting_period_end) : undefined,
|
1326
|
+
executor_result: isSet(object.executor_result) ? proposalExecutorResultFromJSON(object.executor_result) : 0,
|
1327
|
+
messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : []
|
1328
|
+
};
|
1329
|
+
},
|
1330
|
+
|
1331
|
+
toJSON(message: Proposal): unknown {
|
1332
|
+
const obj: any = {};
|
1333
|
+
message.id !== undefined && (obj.id = (message.id || Long.UZERO).toString());
|
1334
|
+
message.address !== undefined && (obj.address = message.address);
|
1335
|
+
message.metadata !== undefined && (obj.metadata = message.metadata);
|
1336
|
+
|
1337
|
+
if (message.proposers) {
|
1338
|
+
obj.proposers = message.proposers.map(e => e);
|
1339
|
+
} else {
|
1340
|
+
obj.proposers = [];
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
message.submit_time !== undefined && (obj.submit_time = message.submit_time.toISOString());
|
1344
|
+
message.group_version !== undefined && (obj.group_version = (message.group_version || Long.UZERO).toString());
|
1345
|
+
message.group_policy_version !== undefined && (obj.group_policy_version = (message.group_policy_version || Long.UZERO).toString());
|
1346
|
+
message.status !== undefined && (obj.status = proposalStatusToJSON(message.status));
|
1347
|
+
message.result !== undefined && (obj.result = proposalResultToJSON(message.result));
|
1348
|
+
message.final_tally_result !== undefined && (obj.final_tally_result = message.final_tally_result ? TallyResult.toJSON(message.final_tally_result) : undefined);
|
1349
|
+
message.voting_period_end !== undefined && (obj.voting_period_end = message.voting_period_end.toISOString());
|
1350
|
+
message.executor_result !== undefined && (obj.executor_result = proposalExecutorResultToJSON(message.executor_result));
|
1351
|
+
|
1352
|
+
if (message.messages) {
|
1353
|
+
obj.messages = message.messages.map(e => e ? Any.toJSON(e) : undefined);
|
1354
|
+
} else {
|
1355
|
+
obj.messages = [];
|
1356
|
+
}
|
1357
|
+
|
1358
|
+
return obj;
|
1359
|
+
},
|
1360
|
+
|
1361
|
+
fromPartial(object: DeepPartial<Proposal>): Proposal {
|
1362
|
+
const message = createBaseProposal();
|
1363
|
+
message.id = object.id !== undefined && object.id !== null ? Long.fromValue(object.id) : Long.UZERO;
|
1364
|
+
message.address = object.address ?? "";
|
1365
|
+
message.metadata = object.metadata ?? "";
|
1366
|
+
message.proposers = object.proposers?.map(e => e) || [];
|
1367
|
+
message.submit_time = object.submit_time ?? undefined;
|
1368
|
+
message.group_version = object.group_version !== undefined && object.group_version !== null ? Long.fromValue(object.group_version) : Long.UZERO;
|
1369
|
+
message.group_policy_version = object.group_policy_version !== undefined && object.group_policy_version !== null ? Long.fromValue(object.group_policy_version) : Long.UZERO;
|
1370
|
+
message.status = object.status ?? 0;
|
1371
|
+
message.result = object.result ?? 0;
|
1372
|
+
message.final_tally_result = object.final_tally_result !== undefined && object.final_tally_result !== null ? TallyResult.fromPartial(object.final_tally_result) : undefined;
|
1373
|
+
message.voting_period_end = object.voting_period_end ?? undefined;
|
1374
|
+
message.executor_result = object.executor_result ?? 0;
|
1375
|
+
message.messages = object.messages?.map(e => Any.fromPartial(e)) || [];
|
1376
|
+
return message;
|
1377
|
+
}
|
1378
|
+
|
1379
|
+
};
|
1380
|
+
|
1381
|
+
function createBaseTallyResult(): TallyResult {
|
1382
|
+
return {
|
1383
|
+
yes_count: "",
|
1384
|
+
abstain_count: "",
|
1385
|
+
no_count: "",
|
1386
|
+
no_with_veto_count: ""
|
1387
|
+
};
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
export const TallyResult = {
|
1391
|
+
encode(message: TallyResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1392
|
+
if (message.yes_count !== "") {
|
1393
|
+
writer.uint32(10).string(message.yes_count);
|
1394
|
+
}
|
1395
|
+
|
1396
|
+
if (message.abstain_count !== "") {
|
1397
|
+
writer.uint32(18).string(message.abstain_count);
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
if (message.no_count !== "") {
|
1401
|
+
writer.uint32(26).string(message.no_count);
|
1402
|
+
}
|
1403
|
+
|
1404
|
+
if (message.no_with_veto_count !== "") {
|
1405
|
+
writer.uint32(34).string(message.no_with_veto_count);
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
return writer;
|
1409
|
+
},
|
1410
|
+
|
1411
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): TallyResult {
|
1412
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1413
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1414
|
+
const message = createBaseTallyResult();
|
1415
|
+
|
1416
|
+
while (reader.pos < end) {
|
1417
|
+
const tag = reader.uint32();
|
1418
|
+
|
1419
|
+
switch (tag >>> 3) {
|
1420
|
+
case 1:
|
1421
|
+
message.yes_count = reader.string();
|
1422
|
+
break;
|
1423
|
+
|
1424
|
+
case 2:
|
1425
|
+
message.abstain_count = reader.string();
|
1426
|
+
break;
|
1427
|
+
|
1428
|
+
case 3:
|
1429
|
+
message.no_count = reader.string();
|
1430
|
+
break;
|
1431
|
+
|
1432
|
+
case 4:
|
1433
|
+
message.no_with_veto_count = reader.string();
|
1434
|
+
break;
|
1435
|
+
|
1436
|
+
default:
|
1437
|
+
reader.skipType(tag & 7);
|
1438
|
+
break;
|
1439
|
+
}
|
1440
|
+
}
|
1441
|
+
|
1442
|
+
return message;
|
1443
|
+
},
|
1444
|
+
|
1445
|
+
fromJSON(object: any): TallyResult {
|
1446
|
+
return {
|
1447
|
+
yes_count: isSet(object.yes_count) ? String(object.yes_count) : "",
|
1448
|
+
abstain_count: isSet(object.abstain_count) ? String(object.abstain_count) : "",
|
1449
|
+
no_count: isSet(object.no_count) ? String(object.no_count) : "",
|
1450
|
+
no_with_veto_count: isSet(object.no_with_veto_count) ? String(object.no_with_veto_count) : ""
|
1451
|
+
};
|
1452
|
+
},
|
1453
|
+
|
1454
|
+
toJSON(message: TallyResult): unknown {
|
1455
|
+
const obj: any = {};
|
1456
|
+
message.yes_count !== undefined && (obj.yes_count = message.yes_count);
|
1457
|
+
message.abstain_count !== undefined && (obj.abstain_count = message.abstain_count);
|
1458
|
+
message.no_count !== undefined && (obj.no_count = message.no_count);
|
1459
|
+
message.no_with_veto_count !== undefined && (obj.no_with_veto_count = message.no_with_veto_count);
|
1460
|
+
return obj;
|
1461
|
+
},
|
1462
|
+
|
1463
|
+
fromPartial(object: DeepPartial<TallyResult>): TallyResult {
|
1464
|
+
const message = createBaseTallyResult();
|
1465
|
+
message.yes_count = object.yes_count ?? "";
|
1466
|
+
message.abstain_count = object.abstain_count ?? "";
|
1467
|
+
message.no_count = object.no_count ?? "";
|
1468
|
+
message.no_with_veto_count = object.no_with_veto_count ?? "";
|
1469
|
+
return message;
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
};
|
1473
|
+
|
1474
|
+
function createBaseVote(): Vote {
|
1475
|
+
return {
|
1476
|
+
proposal_id: Long.UZERO,
|
1477
|
+
voter: "",
|
1478
|
+
option: 0,
|
1479
|
+
metadata: "",
|
1480
|
+
submit_time: undefined
|
1481
|
+
};
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
export const Vote = {
|
1485
|
+
encode(message: Vote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1486
|
+
if (!message.proposal_id.isZero()) {
|
1487
|
+
writer.uint32(8).uint64(message.proposal_id);
|
1488
|
+
}
|
1489
|
+
|
1490
|
+
if (message.voter !== "") {
|
1491
|
+
writer.uint32(18).string(message.voter);
|
1492
|
+
}
|
1493
|
+
|
1494
|
+
if (message.option !== 0) {
|
1495
|
+
writer.uint32(24).int32(message.option);
|
1496
|
+
}
|
1497
|
+
|
1498
|
+
if (message.metadata !== "") {
|
1499
|
+
writer.uint32(34).string(message.metadata);
|
1500
|
+
}
|
1501
|
+
|
1502
|
+
if (message.submit_time !== undefined) {
|
1503
|
+
Timestamp.encode(toTimestamp(message.submit_time), writer.uint32(42).fork()).ldelim();
|
1504
|
+
}
|
1505
|
+
|
1506
|
+
return writer;
|
1507
|
+
},
|
1508
|
+
|
1509
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Vote {
|
1510
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1511
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1512
|
+
const message = createBaseVote();
|
1513
|
+
|
1514
|
+
while (reader.pos < end) {
|
1515
|
+
const tag = reader.uint32();
|
1516
|
+
|
1517
|
+
switch (tag >>> 3) {
|
1518
|
+
case 1:
|
1519
|
+
message.proposal_id = (reader.uint64() as Long);
|
1520
|
+
break;
|
1521
|
+
|
1522
|
+
case 2:
|
1523
|
+
message.voter = reader.string();
|
1524
|
+
break;
|
1525
|
+
|
1526
|
+
case 3:
|
1527
|
+
message.option = (reader.int32() as any);
|
1528
|
+
break;
|
1529
|
+
|
1530
|
+
case 4:
|
1531
|
+
message.metadata = reader.string();
|
1532
|
+
break;
|
1533
|
+
|
1534
|
+
case 5:
|
1535
|
+
message.submit_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
1536
|
+
break;
|
1537
|
+
|
1538
|
+
default:
|
1539
|
+
reader.skipType(tag & 7);
|
1540
|
+
break;
|
1541
|
+
}
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
return message;
|
1545
|
+
},
|
1546
|
+
|
1547
|
+
fromJSON(object: any): Vote {
|
1548
|
+
return {
|
1549
|
+
proposal_id: isSet(object.proposal_id) ? Long.fromString(object.proposal_id) : Long.UZERO,
|
1550
|
+
voter: isSet(object.voter) ? String(object.voter) : "",
|
1551
|
+
option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0,
|
1552
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
1553
|
+
submit_time: isSet(object.submit_time) ? fromJsonTimestamp(object.submit_time) : undefined
|
1554
|
+
};
|
1555
|
+
},
|
1556
|
+
|
1557
|
+
toJSON(message: Vote): unknown {
|
1558
|
+
const obj: any = {};
|
1559
|
+
message.proposal_id !== undefined && (obj.proposal_id = (message.proposal_id || Long.UZERO).toString());
|
1560
|
+
message.voter !== undefined && (obj.voter = message.voter);
|
1561
|
+
message.option !== undefined && (obj.option = voteOptionToJSON(message.option));
|
1562
|
+
message.metadata !== undefined && (obj.metadata = message.metadata);
|
1563
|
+
message.submit_time !== undefined && (obj.submit_time = message.submit_time.toISOString());
|
1564
|
+
return obj;
|
1565
|
+
},
|
1566
|
+
|
1567
|
+
fromPartial(object: DeepPartial<Vote>): Vote {
|
1568
|
+
const message = createBaseVote();
|
1569
|
+
message.proposal_id = object.proposal_id !== undefined && object.proposal_id !== null ? Long.fromValue(object.proposal_id) : Long.UZERO;
|
1570
|
+
message.voter = object.voter ?? "";
|
1571
|
+
message.option = object.option ?? 0;
|
1572
|
+
message.metadata = object.metadata ?? "";
|
1573
|
+
message.submit_time = object.submit_time ?? undefined;
|
1574
|
+
return message;
|
1575
|
+
}
|
1576
|
+
|
1577
|
+
};
|