decentralcardgame-cardchain-client-ts 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DecentralCardGame.cardchain.cardchain/module.js +318 -383
- package/DecentralCardGame.cardchain.cardchain/module.ts +463 -558
- package/DecentralCardGame.cardchain.cardchain/registry.js +72 -78
- package/DecentralCardGame.cardchain.cardchain/registry.ts +72 -78
- package/DecentralCardGame.cardchain.cardchain/rest.js +77 -60
- package/DecentralCardGame.cardchain.cardchain/rest.ts +123 -76
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +657 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +741 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/copyright_proposal.js +102 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/copyright_proposal.ts +134 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +356 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.ts +415 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.js +254 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.ts +281 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/image.js +88 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/image.ts +115 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match.js +308 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match.ts +355 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match_reporter_proposal.js +67 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match_reporter_proposal.ts +92 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/num.js +73 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/num.ts +102 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.js +325 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.ts +380 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +2200 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +2633 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/running_average.js +85 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/running_average.ts +111 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/sell_offer.js +148 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/sell_offer.ts +183 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/server.js +93 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/server.ts +124 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.js +365 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.ts +416 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set_proposal.js +93 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set_proposal.ts +124 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +4185 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +5139 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +580 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +652 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.js +346 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.ts +417 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +25 -23
- package/DecentralCardGame.cardchain.cardchain/types.ts +26 -22
- package/DecentralCardGame.cardchain.featureflag/index.js +5 -0
- package/DecentralCardGame.cardchain.featureflag/index.ts +6 -0
- package/DecentralCardGame.cardchain.featureflag/module.js +62 -0
- package/DecentralCardGame.cardchain.featureflag/module.ts +102 -0
- package/DecentralCardGame.cardchain.featureflag/registry.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/registry.ts +7 -0
- package/DecentralCardGame.cardchain.featureflag/rest.js +128 -0
- package/DecentralCardGame.cardchain.featureflag/rest.ts +222 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/flag.js +67 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/flag.ts +92 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/genesis.js +135 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/genesis.ts +172 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/params.js +36 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/params.ts +58 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/proposal.js +76 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/proposal.ts +102 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/query.js +279 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/query.ts +371 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/tx.js +7 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/tx.ts +17 -0
- package/DecentralCardGame.cardchain.featureflag/types/cosmos/base/query/v1beta1/pagination.js +190 -0
- package/DecentralCardGame.cardchain.featureflag/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/DecentralCardGame.cardchain.featureflag/types/gogoproto/gogo.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/gogoproto/gogo.ts +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/annotations.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/annotations.ts +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/http.js +260 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/http.ts +589 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/protobuf/descriptor.js +2830 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/protobuf/descriptor.ts +3753 -0
- package/DecentralCardGame.cardchain.featureflag/types.js +4 -0
- package/DecentralCardGame.cardchain.featureflag/types.ts +11 -0
- package/client.js +7 -7
- package/client.ts +9 -10
- package/cosmos.auth.v1beta1/module.js +0 -2
- package/cosmos.auth.v1beta1/module.ts +0 -2
- package/cosmos.auth.v1beta1/rest.js +3 -18
- package/cosmos.auth.v1beta1/rest.ts +3 -113
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.js +0 -84
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +0 -104
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +1 -1
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.js +3 -104
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +4 -157
- package/cosmos.auth.v1beta1/types.js +1 -2
- package/cosmos.auth.v1beta1/types.ts +0 -2
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/module.ts +29 -29
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.authz.v1beta1/registry.ts +2 -2
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +1 -1
- package/cosmos.bank.v1beta1/module.js +16 -16
- package/cosmos.bank.v1beta1/module.ts +24 -24
- package/cosmos.bank.v1beta1/registry.js +2 -2
- package/cosmos.bank.v1beta1/registry.ts +2 -2
- package/cosmos.bank.v1beta1/rest.js +6 -37
- package/cosmos.bank.v1beta1/rest.ts +6 -99
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.js +2 -18
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +2 -24
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +0 -9
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.js +2 -18
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +4 -25
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.js +1 -230
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +5 -356
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.js +1 -206
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +1 -305
- package/cosmos.base.tendermint.v1beta1/rest.js +3 -3
- package/cosmos.base.tendermint.v1beta1/rest.ts +27 -18
- package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +46 -16
- package/cosmos.crisis.v1beta1/module.js +1 -24
- package/cosmos.crisis.v1beta1/module.ts +1 -34
- package/cosmos.crisis.v1beta1/registry.js +0 -2
- package/cosmos.crisis.v1beta1/registry.ts +0 -2
- package/cosmos.crisis.v1beta1/rest.ts +0 -19
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.js +0 -95
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +1 -140
- package/cosmos.distribution.v1beta1/module.js +21 -67
- package/cosmos.distribution.v1beta1/module.ts +34 -100
- package/cosmos.distribution.v1beta1/registry.js +4 -8
- package/cosmos.distribution.v1beta1/registry.ts +4 -8
- package/cosmos.distribution.v1beta1/rest.js +0 -14
- package/cosmos.distribution.v1beta1/rest.ts +7 -66
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +0 -19
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +4 -4
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.js +0 -120
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +1 -158
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.js +0 -199
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +3 -300
- package/cosmos.evidence.v1beta1/rest.js +3 -4
- package/cosmos.evidence.v1beta1/rest.ts +3 -4
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +1 -7
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.js +2 -13
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +3 -25
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +0 -2
- package/cosmos.gov.v1/module.js +21 -46
- package/cosmos.gov.v1/module.ts +33 -68
- package/cosmos.gov.v1/registry.js +4 -6
- package/cosmos.gov.v1/registry.ts +4 -6
- package/cosmos.gov.v1/rest.ts +41 -155
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.js +1 -13
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +5 -40
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.js +0 -179
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +6 -277
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.js +2 -13
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +7 -45
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.js +2 -113
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +3 -186
- package/cosmos.gov.v1/types.js +1 -2
- package/cosmos.gov.v1/types.ts +0 -2
- package/cosmos.gov.v1beta1/module.js +24 -24
- package/cosmos.gov.v1beta1/module.ts +36 -36
- package/cosmos.gov.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1beta1/registry.ts +4 -4
- package/cosmos.gov.v1beta1/rest.ts +96 -65
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +3 -3
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +10 -45
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +2 -4
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +1 -16
- package/cosmos.group.v1/module.js +92 -92
- package/cosmos.group.v1/module.ts +138 -138
- package/cosmos.group.v1/registry.js +16 -16
- package/cosmos.group.v1/registry.ts +16 -16
- package/cosmos.group.v1/rest.js +3 -3
- package/cosmos.group.v1/rest.ts +9 -29
- package/cosmos.group.v1/types/cosmos/group/v1/query.ts +5 -5
- package/cosmos.group.v1/types/cosmos/group/v1/tx.js +34 -52
- package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +49 -79
- package/cosmos.group.v1/types/cosmos/group/v1/types.js +0 -20
- package/cosmos.group.v1/types/cosmos/group/v1/types.ts +6 -46
- package/cosmos.mint.v1beta1/rest.ts +1 -9
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +1 -1
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +1 -1
- package/cosmos.nft.v1beta1/rest.ts +22 -18
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +0 -10
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +0 -1
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +0 -20
- package/cosmos.slashing.v1beta1/rest.ts +0 -8
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +1 -1
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.js +0 -94
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +0 -139
- package/cosmos.staking.v1beta1/module.js +39 -41
- package/cosmos.staking.v1beta1/module.ts +59 -61
- package/cosmos.staking.v1beta1/registry.js +6 -6
- package/cosmos.staking.v1beta1/registry.ts +6 -6
- package/cosmos.staking.v1beta1/rest.js +7 -7
- package/cosmos.staking.v1beta1/rest.ts +8 -49
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +1 -1
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +5 -36
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.js +2 -180
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +3 -206
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.js +1 -94
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +1 -138
- package/cosmos.staking.v1beta1/types.js +1 -2
- package/cosmos.staking.v1beta1/types.ts +0 -2
- package/cosmos.tx.v1beta1/rest.js +2 -66
- package/cosmos.tx.v1beta1/rest.ts +16 -177
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.js +2 -360
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +2 -524
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.js +266 -592
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +332 -703
- package/cosmos.tx.v1beta1/types/tendermint/types/params.js +17 -8
- package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +25 -9
- package/cosmos.upgrade.v1beta1/rest.ts +1 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +3 -3
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.js +0 -84
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +0 -104
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +0 -1
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +2 -13
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +4 -16
- package/ibc.applications.transfer.v1/module.js +27 -5
- package/ibc.applications.transfer.v1/module.ts +34 -5
- package/ibc.applications.transfer.v1/registry.js +4 -1
- package/ibc.applications.transfer.v1/registry.ts +2 -0
- package/ibc.applications.transfer.v1/rest.js +1 -15
- package/ibc.applications.transfer.v1/rest.ts +1 -30
- package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.js +1 -16
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +2 -23
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.js +0 -91
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +0 -120
- package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.applications.transfer.v1/types.js +1 -3
- package/ibc.applications.transfer.v1/types.ts +0 -4
- package/ibc.core.channel.v1/rest.ts +0 -1
- package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.js +2 -13
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +2 -14
- package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.client.v1/rest.ts +1 -5
- package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.js +8 -9
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +14 -28
- package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.js +1 -1
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +1 -1
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.js +0 -26
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +0 -34
- package/ibc.core.connection.v1/types/proofs.js +1126 -0
- package/ibc.core.connection.v1/types/proofs.ts +1408 -0
- package/index.js +3 -3
- package/index.ts +3 -3
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@ import { SigningStargateClient } from "@cosmjs/stargate";
|
|
|
3
3
|
import { Registry } from "@cosmjs/proto-signing";
|
|
4
4
|
import { msgTypes } from './registry';
|
|
5
5
|
import { Api } from "./rest";
|
|
6
|
-
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
7
6
|
import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx";
|
|
8
|
-
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
9
7
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
|
|
8
|
+
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
9
|
+
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
10
10
|
import { WeightedVoteOption as typeWeightedVoteOption } from "./types";
|
|
11
11
|
import { TextProposal as typeTextProposal } from "./types";
|
|
12
12
|
import { Deposit as typeDeposit } from "./types";
|
|
@@ -16,7 +16,7 @@ import { Vote as typeVote } from "./types";
|
|
|
16
16
|
import { DepositParams as typeDepositParams } from "./types";
|
|
17
17
|
import { VotingParams as typeVotingParams } from "./types";
|
|
18
18
|
import { TallyParams as typeTallyParams } from "./types";
|
|
19
|
-
export {
|
|
19
|
+
export { MsgDeposit, MsgSubmitProposal, MsgVote, MsgVoteWeighted };
|
|
20
20
|
export const registry = new Registry(msgTypes);
|
|
21
21
|
function getStructure(template) {
|
|
22
22
|
const structure = { fields: [] };
|
|
@@ -32,32 +32,32 @@ const defaultFee = {
|
|
|
32
32
|
};
|
|
33
33
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
34
34
|
return {
|
|
35
|
-
async
|
|
35
|
+
async sendMsgDeposit({ value, fee, memo }) {
|
|
36
36
|
if (!signer) {
|
|
37
|
-
throw new Error('TxClient:
|
|
37
|
+
throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.');
|
|
38
38
|
}
|
|
39
39
|
try {
|
|
40
40
|
const { address } = (await signer.getAccounts())[0];
|
|
41
41
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
42
|
-
let msg = this.
|
|
42
|
+
let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) });
|
|
43
43
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
44
44
|
}
|
|
45
45
|
catch (e) {
|
|
46
|
-
throw new Error('TxClient:
|
|
46
|
+
throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: ' + e.message);
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
async
|
|
49
|
+
async sendMsgSubmitProposal({ value, fee, memo }) {
|
|
50
50
|
if (!signer) {
|
|
51
|
-
throw new Error('TxClient:
|
|
51
|
+
throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.');
|
|
52
52
|
}
|
|
53
53
|
try {
|
|
54
54
|
const { address } = (await signer.getAccounts())[0];
|
|
55
55
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
56
|
-
let msg = this.
|
|
56
|
+
let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) });
|
|
57
57
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
58
58
|
}
|
|
59
59
|
catch (e) {
|
|
60
|
-
throw new Error('TxClient:
|
|
60
|
+
throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: ' + e.message);
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
async sendMsgVote({ value, fee, memo }) {
|
|
@@ -74,34 +74,34 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
74
74
|
throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: ' + e.message);
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
-
async
|
|
77
|
+
async sendMsgVoteWeighted({ value, fee, memo }) {
|
|
78
78
|
if (!signer) {
|
|
79
|
-
throw new Error('TxClient:
|
|
79
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.');
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
82
82
|
const { address } = (await signer.getAccounts())[0];
|
|
83
83
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
84
|
-
let msg = this.
|
|
84
|
+
let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) });
|
|
85
85
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
86
86
|
}
|
|
87
87
|
catch (e) {
|
|
88
|
-
throw new Error('TxClient:
|
|
88
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: ' + e.message);
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
-
|
|
91
|
+
msgDeposit({ value }) {
|
|
92
92
|
try {
|
|
93
|
-
return { typeUrl: "/cosmos.gov.v1beta1.
|
|
93
|
+
return { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial(value) };
|
|
94
94
|
}
|
|
95
95
|
catch (e) {
|
|
96
|
-
throw new Error('TxClient:
|
|
96
|
+
throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message);
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
|
|
99
|
+
msgSubmitProposal({ value }) {
|
|
100
100
|
try {
|
|
101
|
-
return { typeUrl: "/cosmos.gov.v1beta1.
|
|
101
|
+
return { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial(value) };
|
|
102
102
|
}
|
|
103
103
|
catch (e) {
|
|
104
|
-
throw new Error('TxClient:
|
|
104
|
+
throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message);
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
msgVote({ value }) {
|
|
@@ -112,12 +112,12 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
112
112
|
throw new Error('TxClient:MsgVote: Could not create message: ' + e.message);
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
-
|
|
115
|
+
msgVoteWeighted({ value }) {
|
|
116
116
|
try {
|
|
117
|
-
return { typeUrl: "/cosmos.gov.v1beta1.
|
|
117
|
+
return { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial(value) };
|
|
118
118
|
}
|
|
119
119
|
catch (e) {
|
|
120
|
-
throw new Error('TxClient:
|
|
120
|
+
throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message);
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
};
|
|
@@ -7,10 +7,10 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
-
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
11
10
|
import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx";
|
|
12
|
-
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
13
11
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
|
|
12
|
+
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
13
|
+
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
14
14
|
|
|
15
15
|
import { WeightedVoteOption as typeWeightedVoteOption} from "./types"
|
|
16
16
|
import { TextProposal as typeTextProposal} from "./types"
|
|
@@ -22,16 +22,16 @@ import { DepositParams as typeDepositParams} from "./types"
|
|
|
22
22
|
import { VotingParams as typeVotingParams} from "./types"
|
|
23
23
|
import { TallyParams as typeTallyParams} from "./types"
|
|
24
24
|
|
|
25
|
-
export {
|
|
25
|
+
export { MsgDeposit, MsgSubmitProposal, MsgVote, MsgVoteWeighted };
|
|
26
26
|
|
|
27
|
-
type
|
|
28
|
-
value:
|
|
27
|
+
type sendMsgDepositParams = {
|
|
28
|
+
value: MsgDeposit,
|
|
29
29
|
fee?: StdFee,
|
|
30
30
|
memo?: string
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
type
|
|
34
|
-
value:
|
|
33
|
+
type sendMsgSubmitProposalParams = {
|
|
34
|
+
value: MsgSubmitProposal,
|
|
35
35
|
fee?: StdFee,
|
|
36
36
|
memo?: string
|
|
37
37
|
};
|
|
@@ -42,27 +42,27 @@ type sendMsgVoteParams = {
|
|
|
42
42
|
memo?: string
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
type
|
|
46
|
-
value:
|
|
45
|
+
type sendMsgVoteWeightedParams = {
|
|
46
|
+
value: MsgVoteWeighted,
|
|
47
47
|
fee?: StdFee,
|
|
48
48
|
memo?: string
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
type msgVoteWeightedParams = {
|
|
53
|
-
value: MsgVoteWeighted,
|
|
54
|
-
};
|
|
55
|
-
|
|
56
52
|
type msgDepositParams = {
|
|
57
53
|
value: MsgDeposit,
|
|
58
54
|
};
|
|
59
55
|
|
|
56
|
+
type msgSubmitProposalParams = {
|
|
57
|
+
value: MsgSubmitProposal,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
60
|
type msgVoteParams = {
|
|
61
61
|
value: MsgVote,
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
type
|
|
65
|
-
value:
|
|
64
|
+
type msgVoteWeightedParams = {
|
|
65
|
+
value: MsgVoteWeighted,
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
|
|
@@ -95,31 +95,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
95
95
|
|
|
96
96
|
return {
|
|
97
97
|
|
|
98
|
-
async
|
|
98
|
+
async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise<DeliverTxResponse> {
|
|
99
99
|
if (!signer) {
|
|
100
|
-
throw new Error('TxClient:
|
|
100
|
+
throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.')
|
|
101
101
|
}
|
|
102
102
|
try {
|
|
103
103
|
const { address } = (await signer.getAccounts())[0];
|
|
104
104
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
105
|
-
let msg = this.
|
|
105
|
+
let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) })
|
|
106
106
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
107
107
|
} catch (e: any) {
|
|
108
|
-
throw new Error('TxClient:
|
|
108
|
+
throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message)
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
|
|
112
|
-
async
|
|
112
|
+
async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
|
|
113
113
|
if (!signer) {
|
|
114
|
-
throw new Error('TxClient:
|
|
114
|
+
throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
|
|
115
115
|
}
|
|
116
116
|
try {
|
|
117
117
|
const { address } = (await signer.getAccounts())[0];
|
|
118
118
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
119
|
-
let msg = this.
|
|
119
|
+
let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
|
|
120
120
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
121
121
|
} catch (e: any) {
|
|
122
|
-
throw new Error('TxClient:
|
|
122
|
+
throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
|
|
@@ -137,34 +137,34 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
|
|
140
|
-
async
|
|
140
|
+
async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
|
|
141
141
|
if (!signer) {
|
|
142
|
-
throw new Error('TxClient:
|
|
142
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
|
|
143
143
|
}
|
|
144
144
|
try {
|
|
145
145
|
const { address } = (await signer.getAccounts())[0];
|
|
146
146
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
147
|
-
let msg = this.
|
|
147
|
+
let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
|
|
148
148
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
149
149
|
} catch (e: any) {
|
|
150
|
-
throw new Error('TxClient:
|
|
150
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
msgDeposit({ value }: msgDepositParams): EncodeObject {
|
|
156
156
|
try {
|
|
157
|
-
return { typeUrl: "/cosmos.gov.v1beta1.
|
|
157
|
+
return { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial( value ) }
|
|
158
158
|
} catch (e: any) {
|
|
159
|
-
throw new Error('TxClient:
|
|
159
|
+
throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message)
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
|
|
164
164
|
try {
|
|
165
|
-
return { typeUrl: "/cosmos.gov.v1beta1.
|
|
165
|
+
return { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
|
|
166
166
|
} catch (e: any) {
|
|
167
|
-
throw new Error('TxClient:
|
|
167
|
+
throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
|
|
168
168
|
}
|
|
169
169
|
},
|
|
170
170
|
|
|
@@ -176,11 +176,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
|
|
180
180
|
try {
|
|
181
|
-
return { typeUrl: "/cosmos.gov.v1beta1.
|
|
181
|
+
return { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
|
|
182
182
|
} catch (e: any) {
|
|
183
|
-
throw new Error('TxClient:
|
|
183
|
+
throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
2
1
|
import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx";
|
|
3
|
-
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
4
2
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
|
|
3
|
+
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
4
|
+
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
5
5
|
const msgTypes = [
|
|
6
|
-
["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted],
|
|
7
6
|
["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit],
|
|
8
|
-
["/cosmos.gov.v1beta1.MsgVote", MsgVote],
|
|
9
7
|
["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal],
|
|
8
|
+
["/cosmos.gov.v1beta1.MsgVote", MsgVote],
|
|
9
|
+
["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted],
|
|
10
10
|
];
|
|
11
11
|
export { msgTypes };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
-
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
3
2
|
import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx";
|
|
4
|
-
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
5
3
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
|
|
4
|
+
import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
|
|
5
|
+
import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
|
|
6
6
|
|
|
7
7
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
8
|
-
["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted],
|
|
9
8
|
["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit],
|
|
10
|
-
["/cosmos.gov.v1beta1.MsgVote", MsgVote],
|
|
11
9
|
["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal],
|
|
10
|
+
["/cosmos.gov.v1beta1.MsgVote", MsgVote],
|
|
11
|
+
["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted],
|
|
12
12
|
|
|
13
13
|
];
|
|
14
14
|
|
|
@@ -146,16 +146,9 @@ export interface V1Beta1Coin {
|
|
|
146
146
|
proposal.
|
|
147
147
|
*/
|
|
148
148
|
export interface V1Beta1Deposit {
|
|
149
|
-
/**
|
|
150
|
-
* proposal_id defines the unique id of the proposal.
|
|
151
|
-
* @format uint64
|
|
152
|
-
*/
|
|
149
|
+
/** @format uint64 */
|
|
153
150
|
proposal_id?: string;
|
|
154
|
-
|
|
155
|
-
/** depositor defines the deposit addresses from the proposals. */
|
|
156
151
|
depositor?: string;
|
|
157
|
-
|
|
158
|
-
/** amount to be deposited by depositor. */
|
|
159
152
|
amount?: V1Beta1Coin[];
|
|
160
153
|
}
|
|
161
154
|
|
|
@@ -168,7 +161,7 @@ export interface V1Beta1DepositParams {
|
|
|
168
161
|
|
|
169
162
|
/**
|
|
170
163
|
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
171
|
-
*
|
|
164
|
+
* months.
|
|
172
165
|
*/
|
|
173
166
|
max_deposit_period?: string;
|
|
174
167
|
}
|
|
@@ -182,10 +175,7 @@ export type V1Beta1MsgDepositResponse = object;
|
|
|
182
175
|
* MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
|
183
176
|
*/
|
|
184
177
|
export interface V1Beta1MsgSubmitProposalResponse {
|
|
185
|
-
/**
|
|
186
|
-
* proposal_id defines the unique id of the proposal.
|
|
187
|
-
* @format uint64
|
|
188
|
-
*/
|
|
178
|
+
/** @format uint64 */
|
|
189
179
|
proposal_id?: string;
|
|
190
180
|
}
|
|
191
181
|
|
|
@@ -277,16 +267,83 @@ export interface V1Beta1PageResponse {
|
|
|
277
267
|
* Proposal defines the core field members of a governance proposal.
|
|
278
268
|
*/
|
|
279
269
|
export interface V1Beta1Proposal {
|
|
280
|
-
/**
|
|
281
|
-
* proposal_id defines the unique id of the proposal.
|
|
282
|
-
* @format uint64
|
|
283
|
-
*/
|
|
270
|
+
/** @format uint64 */
|
|
284
271
|
proposal_id?: string;
|
|
285
272
|
|
|
286
|
-
/**
|
|
273
|
+
/**
|
|
274
|
+
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
275
|
+
* URL that describes the type of the serialized message.
|
|
276
|
+
*
|
|
277
|
+
* Protobuf library provides support to pack/unpack Any values in the form
|
|
278
|
+
* of utility functions or additional generated methods of the Any type.
|
|
279
|
+
* Example 1: Pack and unpack a message in C++.
|
|
280
|
+
* Foo foo = ...;
|
|
281
|
+
* Any any;
|
|
282
|
+
* any.PackFrom(foo);
|
|
283
|
+
* ...
|
|
284
|
+
* if (any.UnpackTo(&foo)) {
|
|
285
|
+
* ...
|
|
286
|
+
* }
|
|
287
|
+
* Example 2: Pack and unpack a message in Java.
|
|
288
|
+
* Any any = Any.pack(foo);
|
|
289
|
+
* if (any.is(Foo.class)) {
|
|
290
|
+
* foo = any.unpack(Foo.class);
|
|
291
|
+
* Example 3: Pack and unpack a message in Python.
|
|
292
|
+
* foo = Foo(...)
|
|
293
|
+
* any = Any()
|
|
294
|
+
* any.Pack(foo)
|
|
295
|
+
* if any.Is(Foo.DESCRIPTOR):
|
|
296
|
+
* any.Unpack(foo)
|
|
297
|
+
* Example 4: Pack and unpack a message in Go
|
|
298
|
+
* foo := &pb.Foo{...}
|
|
299
|
+
* any, err := anypb.New(foo)
|
|
300
|
+
* if err != nil {
|
|
301
|
+
* ...
|
|
302
|
+
* }
|
|
303
|
+
* ...
|
|
304
|
+
* foo := &pb.Foo{}
|
|
305
|
+
* if err := any.UnmarshalTo(foo); err != nil {
|
|
306
|
+
* The pack methods provided by protobuf library will by default use
|
|
307
|
+
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
308
|
+
* methods only use the fully qualified type name after the last '/'
|
|
309
|
+
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
310
|
+
* name "y.z".
|
|
311
|
+
* JSON
|
|
312
|
+
* ====
|
|
313
|
+
* The JSON representation of an `Any` value uses the regular
|
|
314
|
+
* representation of the deserialized, embedded message, with an
|
|
315
|
+
* additional field `@type` which contains the type URL. Example:
|
|
316
|
+
* package google.profile;
|
|
317
|
+
* message Person {
|
|
318
|
+
* string first_name = 1;
|
|
319
|
+
* string last_name = 2;
|
|
320
|
+
* {
|
|
321
|
+
* "@type": "type.googleapis.com/google.profile.Person",
|
|
322
|
+
* "firstName": <string>,
|
|
323
|
+
* "lastName": <string>
|
|
324
|
+
* If the embedded message type is well-known and has a custom JSON
|
|
325
|
+
* representation, that representation will be embedded adding a field
|
|
326
|
+
* `value` which holds the custom JSON in addition to the `@type`
|
|
327
|
+
* field. Example (for message [google.protobuf.Duration][]):
|
|
328
|
+
* "@type": "type.googleapis.com/google.protobuf.Duration",
|
|
329
|
+
* "value": "1.212s"
|
|
330
|
+
*/
|
|
287
331
|
content?: ProtobufAny;
|
|
288
332
|
|
|
289
|
-
/**
|
|
333
|
+
/**
|
|
334
|
+
* ProposalStatus enumerates the valid statuses of a proposal.
|
|
335
|
+
*
|
|
336
|
+
* - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.
|
|
337
|
+
* - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
|
338
|
+
* period.
|
|
339
|
+
* - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
|
340
|
+
* - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
|
341
|
+
* passed.
|
|
342
|
+
* - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
|
343
|
+
* been rejected.
|
|
344
|
+
* - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
|
345
|
+
* failed.
|
|
346
|
+
*/
|
|
290
347
|
status?: V1Beta1ProposalStatus;
|
|
291
348
|
|
|
292
349
|
/**
|
|
@@ -296,31 +353,17 @@ export interface V1Beta1Proposal {
|
|
|
296
353
|
*/
|
|
297
354
|
final_tally_result?: V1Beta1TallyResult;
|
|
298
355
|
|
|
299
|
-
/**
|
|
300
|
-
* submit_time is the time of proposal submission.
|
|
301
|
-
* @format date-time
|
|
302
|
-
*/
|
|
356
|
+
/** @format date-time */
|
|
303
357
|
submit_time?: string;
|
|
304
358
|
|
|
305
|
-
/**
|
|
306
|
-
* deposit_end_time is the end time for deposition.
|
|
307
|
-
* @format date-time
|
|
308
|
-
*/
|
|
359
|
+
/** @format date-time */
|
|
309
360
|
deposit_end_time?: string;
|
|
310
|
-
|
|
311
|
-
/** total_deposit is the total deposit on the proposal. */
|
|
312
361
|
total_deposit?: V1Beta1Coin[];
|
|
313
362
|
|
|
314
|
-
/**
|
|
315
|
-
* voting_start_time is the starting time to vote on a proposal.
|
|
316
|
-
* @format date-time
|
|
317
|
-
*/
|
|
363
|
+
/** @format date-time */
|
|
318
364
|
voting_start_time?: string;
|
|
319
365
|
|
|
320
|
-
/**
|
|
321
|
-
* voting_end_time is the end time of voting on a proposal.
|
|
322
|
-
* @format date-time
|
|
323
|
-
*/
|
|
366
|
+
/** @format date-time */
|
|
324
367
|
voting_end_time?: string;
|
|
325
368
|
}
|
|
326
369
|
|
|
@@ -360,7 +403,6 @@ export interface V1Beta1QueryDepositResponse {
|
|
|
360
403
|
* QueryDepositsResponse is the response type for the Query/Deposits RPC method.
|
|
361
404
|
*/
|
|
362
405
|
export interface V1Beta1QueryDepositsResponse {
|
|
363
|
-
/** deposits defines the requested deposits. */
|
|
364
406
|
deposits?: V1Beta1Deposit[];
|
|
365
407
|
|
|
366
408
|
/** pagination defines the pagination in the response. */
|
|
@@ -394,7 +436,6 @@ export interface V1Beta1QueryProposalResponse {
|
|
|
394
436
|
method.
|
|
395
437
|
*/
|
|
396
438
|
export interface V1Beta1QueryProposalsResponse {
|
|
397
|
-
/** proposals defines all the requested governance proposals. */
|
|
398
439
|
proposals?: V1Beta1Proposal[];
|
|
399
440
|
|
|
400
441
|
/** pagination defines the pagination in the response. */
|
|
@@ -413,7 +454,7 @@ export interface V1Beta1QueryTallyResultResponse {
|
|
|
413
454
|
* QueryVoteResponse is the response type for the Query/Vote RPC method.
|
|
414
455
|
*/
|
|
415
456
|
export interface V1Beta1QueryVoteResponse {
|
|
416
|
-
/** vote
|
|
457
|
+
/** vote defined the queried vote. */
|
|
417
458
|
vote?: V1Beta1Vote;
|
|
418
459
|
}
|
|
419
460
|
|
|
@@ -421,7 +462,7 @@ export interface V1Beta1QueryVoteResponse {
|
|
|
421
462
|
* QueryVotesResponse is the response type for the Query/Votes RPC method.
|
|
422
463
|
*/
|
|
423
464
|
export interface V1Beta1QueryVotesResponse {
|
|
424
|
-
/** votes
|
|
465
|
+
/** votes defined the queried votes. */
|
|
425
466
|
votes?: V1Beta1Vote[];
|
|
426
467
|
|
|
427
468
|
/** pagination defines the pagination in the response. */
|
|
@@ -434,7 +475,7 @@ export interface V1Beta1QueryVotesResponse {
|
|
|
434
475
|
export interface V1Beta1TallyParams {
|
|
435
476
|
/**
|
|
436
477
|
* Minimum percentage of total stake needed to vote for a result to be
|
|
437
|
-
*
|
|
478
|
+
* considered valid.
|
|
438
479
|
* @format byte
|
|
439
480
|
*/
|
|
440
481
|
quorum?: string;
|
|
@@ -447,7 +488,7 @@ export interface V1Beta1TallyParams {
|
|
|
447
488
|
|
|
448
489
|
/**
|
|
449
490
|
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
450
|
-
*
|
|
491
|
+
* vetoed. Default value: 1/3.
|
|
451
492
|
* @format byte
|
|
452
493
|
*/
|
|
453
494
|
veto_threshold?: string;
|
|
@@ -457,16 +498,9 @@ export interface V1Beta1TallyParams {
|
|
|
457
498
|
* TallyResult defines a standard tally for a governance proposal.
|
|
458
499
|
*/
|
|
459
500
|
export interface V1Beta1TallyResult {
|
|
460
|
-
/** yes is the number of yes votes on a proposal. */
|
|
461
501
|
yes?: string;
|
|
462
|
-
|
|
463
|
-
/** abstain is the number of abstain votes on a proposal. */
|
|
464
502
|
abstain?: string;
|
|
465
|
-
|
|
466
|
-
/** no is the number of no votes on a proposal. */
|
|
467
503
|
no?: string;
|
|
468
|
-
|
|
469
|
-
/** no_with_veto is the number of no with veto votes on a proposal. */
|
|
470
504
|
no_with_veto?: string;
|
|
471
505
|
}
|
|
472
506
|
|
|
@@ -475,13 +509,8 @@ export interface V1Beta1TallyResult {
|
|
|
475
509
|
A Vote consists of a proposal ID, the voter, and the vote option.
|
|
476
510
|
*/
|
|
477
511
|
export interface V1Beta1Vote {
|
|
478
|
-
/**
|
|
479
|
-
* proposal_id defines the unique id of the proposal.
|
|
480
|
-
* @format uint64
|
|
481
|
-
*/
|
|
512
|
+
/** @format uint64 */
|
|
482
513
|
proposal_id?: string;
|
|
483
|
-
|
|
484
|
-
/** voter is the voter address of the proposal. */
|
|
485
514
|
voter?: string;
|
|
486
515
|
|
|
487
516
|
/**
|
|
@@ -491,11 +520,7 @@ export interface V1Beta1Vote {
|
|
|
491
520
|
*/
|
|
492
521
|
option?: V1Beta1VoteOption;
|
|
493
522
|
|
|
494
|
-
/**
|
|
495
|
-
* options is the weighted vote options.
|
|
496
|
-
*
|
|
497
|
-
* Since: cosmos-sdk 0.43
|
|
498
|
-
*/
|
|
523
|
+
/** Since: cosmos-sdk 0.43 */
|
|
499
524
|
options?: V1Beta1WeightedVoteOption[];
|
|
500
525
|
}
|
|
501
526
|
|
|
@@ -520,7 +545,7 @@ export enum V1Beta1VoteOption {
|
|
|
520
545
|
* VotingParams defines the params for voting on governance proposals.
|
|
521
546
|
*/
|
|
522
547
|
export interface V1Beta1VotingParams {
|
|
523
|
-
/**
|
|
548
|
+
/** Length of the voting period. */
|
|
524
549
|
voting_period?: string;
|
|
525
550
|
}
|
|
526
551
|
|
|
@@ -530,10 +555,16 @@ export interface V1Beta1VotingParams {
|
|
|
530
555
|
Since: cosmos-sdk 0.43
|
|
531
556
|
*/
|
|
532
557
|
export interface V1Beta1WeightedVoteOption {
|
|
533
|
-
/**
|
|
558
|
+
/**
|
|
559
|
+
* VoteOption enumerates the valid vote options for a given governance proposal.
|
|
560
|
+
*
|
|
561
|
+
* - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option.
|
|
562
|
+
* - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option.
|
|
563
|
+
* - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option.
|
|
564
|
+
* - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option.
|
|
565
|
+
* - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
|
|
566
|
+
*/
|
|
534
567
|
option?: V1Beta1VoteOption;
|
|
535
|
-
|
|
536
|
-
/** weight is the vote weight associated with the vote option. */
|
|
537
568
|
weight?: string;
|
|
538
569
|
}
|
|
539
570
|
|
|
@@ -15,15 +15,15 @@ export interface GenesisState {
|
|
|
15
15
|
votes: Vote[];
|
|
16
16
|
/** proposals defines all the proposals present at genesis. */
|
|
17
17
|
proposals: Proposal[];
|
|
18
|
-
/** params defines all the
|
|
18
|
+
/** params defines all the paramaters of related to deposit. */
|
|
19
19
|
depositParams:
|
|
20
20
|
| DepositParams
|
|
21
21
|
| undefined;
|
|
22
|
-
/** params defines all the
|
|
22
|
+
/** params defines all the paramaters of related to voting. */
|
|
23
23
|
votingParams:
|
|
24
24
|
| VotingParams
|
|
25
25
|
| undefined;
|
|
26
|
-
/** params defines all the
|
|
26
|
+
/** params defines all the paramaters of related to tally. */
|
|
27
27
|
tallyParams: TallyParams | undefined;
|
|
28
28
|
}
|
|
29
29
|
|