decentralcardgame-cardchain-client-ts 0.0.15 → 0.0.17
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
package/cosmos.gov.v1/module.js
CHANGED
|
@@ -3,11 +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 {
|
|
7
|
-
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
6
|
+
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
8
7
|
import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
|
|
8
|
+
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
9
9
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
|
|
10
|
-
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
11
10
|
import { WeightedVoteOption as typeWeightedVoteOption } from "./types";
|
|
12
11
|
import { Deposit as typeDeposit } from "./types";
|
|
13
12
|
import { Proposal as typeProposal } from "./types";
|
|
@@ -16,8 +15,7 @@ import { Vote as typeVote } from "./types";
|
|
|
16
15
|
import { DepositParams as typeDepositParams } from "./types";
|
|
17
16
|
import { VotingParams as typeVotingParams } from "./types";
|
|
18
17
|
import { TallyParams as typeTallyParams } from "./types";
|
|
19
|
-
|
|
20
|
-
export { MsgUpdateParams, MsgDeposit, MsgVoteWeighted, MsgSubmitProposal, MsgVote };
|
|
18
|
+
export { MsgVote, MsgVoteWeighted, MsgDeposit, MsgSubmitProposal };
|
|
21
19
|
export const registry = new Registry(msgTypes);
|
|
22
20
|
function getStructure(template) {
|
|
23
21
|
const structure = { fields: [] };
|
|
@@ -33,46 +31,46 @@ const defaultFee = {
|
|
|
33
31
|
};
|
|
34
32
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
35
33
|
return {
|
|
36
|
-
async
|
|
34
|
+
async sendMsgVote({ value, fee, memo }) {
|
|
37
35
|
if (!signer) {
|
|
38
|
-
throw new Error('TxClient:
|
|
36
|
+
throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.');
|
|
39
37
|
}
|
|
40
38
|
try {
|
|
41
39
|
const { address } = (await signer.getAccounts())[0];
|
|
42
40
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
43
|
-
let msg = this.
|
|
41
|
+
let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
|
|
44
42
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
45
43
|
}
|
|
46
44
|
catch (e) {
|
|
47
|
-
throw new Error('TxClient:
|
|
45
|
+
throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: ' + e.message);
|
|
48
46
|
}
|
|
49
47
|
},
|
|
50
|
-
async
|
|
48
|
+
async sendMsgVoteWeighted({ value, fee, memo }) {
|
|
51
49
|
if (!signer) {
|
|
52
|
-
throw new Error('TxClient:
|
|
50
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.');
|
|
53
51
|
}
|
|
54
52
|
try {
|
|
55
53
|
const { address } = (await signer.getAccounts())[0];
|
|
56
54
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
57
|
-
let msg = this.
|
|
55
|
+
let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) });
|
|
58
56
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
59
57
|
}
|
|
60
58
|
catch (e) {
|
|
61
|
-
throw new Error('TxClient:
|
|
59
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: ' + e.message);
|
|
62
60
|
}
|
|
63
61
|
},
|
|
64
|
-
async
|
|
62
|
+
async sendMsgDeposit({ value, fee, memo }) {
|
|
65
63
|
if (!signer) {
|
|
66
|
-
throw new Error('TxClient:
|
|
64
|
+
throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.');
|
|
67
65
|
}
|
|
68
66
|
try {
|
|
69
67
|
const { address } = (await signer.getAccounts())[0];
|
|
70
68
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
71
|
-
let msg = this.
|
|
69
|
+
let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) });
|
|
72
70
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
73
71
|
}
|
|
74
72
|
catch (e) {
|
|
75
|
-
throw new Error('TxClient:
|
|
73
|
+
throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: ' + e.message);
|
|
76
74
|
}
|
|
77
75
|
},
|
|
78
76
|
async sendMsgSubmitProposal({ value, fee, memo }) {
|
|
@@ -89,26 +87,20 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
89
87
|
throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: ' + e.message);
|
|
90
88
|
}
|
|
91
89
|
},
|
|
92
|
-
|
|
93
|
-
if (!signer) {
|
|
94
|
-
throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.');
|
|
95
|
-
}
|
|
90
|
+
msgVote({ value }) {
|
|
96
91
|
try {
|
|
97
|
-
|
|
98
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
99
|
-
let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
|
|
100
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
92
|
+
return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial(value) };
|
|
101
93
|
}
|
|
102
94
|
catch (e) {
|
|
103
|
-
throw new Error('TxClient:
|
|
95
|
+
throw new Error('TxClient:MsgVote: Could not create message: ' + e.message);
|
|
104
96
|
}
|
|
105
97
|
},
|
|
106
|
-
|
|
98
|
+
msgVoteWeighted({ value }) {
|
|
107
99
|
try {
|
|
108
|
-
return { typeUrl: "/cosmos.gov.v1.
|
|
100
|
+
return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial(value) };
|
|
109
101
|
}
|
|
110
102
|
catch (e) {
|
|
111
|
-
throw new Error('TxClient:
|
|
103
|
+
throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message);
|
|
112
104
|
}
|
|
113
105
|
},
|
|
114
106
|
msgDeposit({ value }) {
|
|
@@ -119,14 +111,6 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
119
111
|
throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message);
|
|
120
112
|
}
|
|
121
113
|
},
|
|
122
|
-
msgVoteWeighted({ value }) {
|
|
123
|
-
try {
|
|
124
|
-
return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial(value) };
|
|
125
|
-
}
|
|
126
|
-
catch (e) {
|
|
127
|
-
throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message);
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
114
|
msgSubmitProposal({ value }) {
|
|
131
115
|
try {
|
|
132
116
|
return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial(value) };
|
|
@@ -135,14 +119,6 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
135
119
|
throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message);
|
|
136
120
|
}
|
|
137
121
|
},
|
|
138
|
-
msgVote({ value }) {
|
|
139
|
-
try {
|
|
140
|
-
return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial(value) };
|
|
141
|
-
}
|
|
142
|
-
catch (e) {
|
|
143
|
-
throw new Error('TxClient:MsgVote: Could not create message: ' + e.message);
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
122
|
};
|
|
147
123
|
};
|
|
148
124
|
export const queryClient = ({ addr: addr } = { addr: "http://localhost:1317" }) => {
|
|
@@ -162,7 +138,6 @@ class SDKModule {
|
|
|
162
138
|
DepositParams: getStructure(typeDepositParams.fromPartial({})),
|
|
163
139
|
VotingParams: getStructure(typeVotingParams.fromPartial({})),
|
|
164
140
|
TallyParams: getStructure(typeTallyParams.fromPartial({})),
|
|
165
|
-
Params: getStructure(typeParams.fromPartial({})),
|
|
166
141
|
};
|
|
167
142
|
client.on('signer-changed', (signer) => {
|
|
168
143
|
this.updateTX(client);
|
package/cosmos.gov.v1/module.ts
CHANGED
|
@@ -7,11 +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 {
|
|
11
|
-
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
10
|
+
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
12
11
|
import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
|
|
12
|
+
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
13
13
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
|
|
14
|
-
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
15
14
|
|
|
16
15
|
import { WeightedVoteOption as typeWeightedVoteOption} from "./types"
|
|
17
16
|
import { Deposit as typeDeposit} from "./types"
|
|
@@ -21,24 +20,23 @@ import { Vote as typeVote} from "./types"
|
|
|
21
20
|
import { DepositParams as typeDepositParams} from "./types"
|
|
22
21
|
import { VotingParams as typeVotingParams} from "./types"
|
|
23
22
|
import { TallyParams as typeTallyParams} from "./types"
|
|
24
|
-
import { Params as typeParams} from "./types"
|
|
25
23
|
|
|
26
|
-
export {
|
|
24
|
+
export { MsgVote, MsgVoteWeighted, MsgDeposit, MsgSubmitProposal };
|
|
27
25
|
|
|
28
|
-
type
|
|
29
|
-
value:
|
|
26
|
+
type sendMsgVoteParams = {
|
|
27
|
+
value: MsgVote,
|
|
30
28
|
fee?: StdFee,
|
|
31
29
|
memo?: string
|
|
32
30
|
};
|
|
33
31
|
|
|
34
|
-
type
|
|
35
|
-
value:
|
|
32
|
+
type sendMsgVoteWeightedParams = {
|
|
33
|
+
value: MsgVoteWeighted,
|
|
36
34
|
fee?: StdFee,
|
|
37
35
|
memo?: string
|
|
38
36
|
};
|
|
39
37
|
|
|
40
|
-
type
|
|
41
|
-
value:
|
|
38
|
+
type sendMsgDepositParams = {
|
|
39
|
+
value: MsgDeposit,
|
|
42
40
|
fee?: StdFee,
|
|
43
41
|
memo?: string
|
|
44
42
|
};
|
|
@@ -49,33 +47,23 @@ type sendMsgSubmitProposalParams = {
|
|
|
49
47
|
memo?: string
|
|
50
48
|
};
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
|
|
51
|
+
type msgVoteParams = {
|
|
53
52
|
value: MsgVote,
|
|
54
|
-
fee?: StdFee,
|
|
55
|
-
memo?: string
|
|
56
53
|
};
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
value: MsgUpdateParams,
|
|
55
|
+
type msgVoteWeightedParams = {
|
|
56
|
+
value: MsgVoteWeighted,
|
|
61
57
|
};
|
|
62
58
|
|
|
63
59
|
type msgDepositParams = {
|
|
64
60
|
value: MsgDeposit,
|
|
65
61
|
};
|
|
66
62
|
|
|
67
|
-
type msgVoteWeightedParams = {
|
|
68
|
-
value: MsgVoteWeighted,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
63
|
type msgSubmitProposalParams = {
|
|
72
64
|
value: MsgSubmitProposal,
|
|
73
65
|
};
|
|
74
66
|
|
|
75
|
-
type msgVoteParams = {
|
|
76
|
-
value: MsgVote,
|
|
77
|
-
};
|
|
78
|
-
|
|
79
67
|
|
|
80
68
|
export const registry = new Registry(msgTypes);
|
|
81
69
|
|
|
@@ -106,45 +94,45 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
106
94
|
|
|
107
95
|
return {
|
|
108
96
|
|
|
109
|
-
async
|
|
97
|
+
async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
|
|
110
98
|
if (!signer) {
|
|
111
|
-
throw new Error('TxClient:
|
|
99
|
+
throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
|
|
112
100
|
}
|
|
113
101
|
try {
|
|
114
102
|
const { address } = (await signer.getAccounts())[0];
|
|
115
103
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
116
|
-
let msg = this.
|
|
104
|
+
let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
|
|
117
105
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
118
106
|
} catch (e: any) {
|
|
119
|
-
throw new Error('TxClient:
|
|
107
|
+
throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
|
|
120
108
|
}
|
|
121
109
|
},
|
|
122
110
|
|
|
123
|
-
async
|
|
111
|
+
async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
|
|
124
112
|
if (!signer) {
|
|
125
|
-
throw new Error('TxClient:
|
|
113
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
|
|
126
114
|
}
|
|
127
115
|
try {
|
|
128
116
|
const { address } = (await signer.getAccounts())[0];
|
|
129
117
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
130
|
-
let msg = this.
|
|
118
|
+
let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
|
|
131
119
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
132
120
|
} catch (e: any) {
|
|
133
|
-
throw new Error('TxClient:
|
|
121
|
+
throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
|
|
134
122
|
}
|
|
135
123
|
},
|
|
136
124
|
|
|
137
|
-
async
|
|
125
|
+
async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise<DeliverTxResponse> {
|
|
138
126
|
if (!signer) {
|
|
139
|
-
throw new Error('TxClient:
|
|
127
|
+
throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.')
|
|
140
128
|
}
|
|
141
129
|
try {
|
|
142
130
|
const { address } = (await signer.getAccounts())[0];
|
|
143
131
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
144
|
-
let msg = this.
|
|
132
|
+
let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) })
|
|
145
133
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
146
134
|
} catch (e: any) {
|
|
147
|
-
throw new Error('TxClient:
|
|
135
|
+
throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message)
|
|
148
136
|
}
|
|
149
137
|
},
|
|
150
138
|
|
|
@@ -162,26 +150,20 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
162
150
|
}
|
|
163
151
|
},
|
|
164
152
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
try {
|
|
170
|
-
const { address } = (await signer.getAccounts())[0];
|
|
171
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
172
|
-
let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
|
|
173
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
153
|
+
|
|
154
|
+
msgVote({ value }: msgVoteParams): EncodeObject {
|
|
155
|
+
try {
|
|
156
|
+
return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial( value ) }
|
|
174
157
|
} catch (e: any) {
|
|
175
|
-
throw new Error('TxClient:
|
|
158
|
+
throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
|
|
176
159
|
}
|
|
177
160
|
},
|
|
178
161
|
|
|
179
|
-
|
|
180
|
-
msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject {
|
|
162
|
+
msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
|
|
181
163
|
try {
|
|
182
|
-
return { typeUrl: "/cosmos.gov.v1.
|
|
164
|
+
return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
|
|
183
165
|
} catch (e: any) {
|
|
184
|
-
throw new Error('TxClient:
|
|
166
|
+
throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
|
|
185
167
|
}
|
|
186
168
|
},
|
|
187
169
|
|
|
@@ -193,14 +175,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
193
175
|
}
|
|
194
176
|
},
|
|
195
177
|
|
|
196
|
-
msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
|
|
197
|
-
try {
|
|
198
|
-
return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
|
|
199
|
-
} catch (e: any) {
|
|
200
|
-
throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
|
|
204
178
|
msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
|
|
205
179
|
try {
|
|
206
180
|
return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
|
|
@@ -209,14 +183,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
209
183
|
}
|
|
210
184
|
},
|
|
211
185
|
|
|
212
|
-
msgVote({ value }: msgVoteParams): EncodeObject {
|
|
213
|
-
try {
|
|
214
|
-
return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial( value ) }
|
|
215
|
-
} catch (e: any) {
|
|
216
|
-
throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
|
|
220
186
|
}
|
|
221
187
|
};
|
|
222
188
|
|
|
@@ -247,7 +213,6 @@ class SDKModule {
|
|
|
247
213
|
DepositParams: getStructure(typeDepositParams.fromPartial({})),
|
|
248
214
|
VotingParams: getStructure(typeVotingParams.fromPartial({})),
|
|
249
215
|
TallyParams: getStructure(typeTallyParams.fromPartial({})),
|
|
250
|
-
Params: getStructure(typeParams.fromPartial({})),
|
|
251
216
|
|
|
252
217
|
};
|
|
253
218
|
client.on('signer-changed',(signer) => {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
1
|
+
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
3
2
|
import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
|
|
3
|
+
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
4
4
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
|
|
5
|
-
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
6
5
|
const msgTypes = [
|
|
7
|
-
["/cosmos.gov.v1.
|
|
8
|
-
["/cosmos.gov.v1.MsgDeposit", MsgDeposit],
|
|
6
|
+
["/cosmos.gov.v1.MsgVote", MsgVote],
|
|
9
7
|
["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
|
|
8
|
+
["/cosmos.gov.v1.MsgDeposit", MsgDeposit],
|
|
10
9
|
["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal],
|
|
11
|
-
["/cosmos.gov.v1.MsgVote", MsgVote],
|
|
12
10
|
];
|
|
13
11
|
export { msgTypes };
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
-
import {
|
|
3
|
-
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
2
|
+
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
4
3
|
import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
|
|
4
|
+
import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
|
|
5
5
|
import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
|
|
6
|
-
import { MsgVote } from "./types/cosmos/gov/v1/tx";
|
|
7
6
|
|
|
8
7
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
9
|
-
["/cosmos.gov.v1.
|
|
10
|
-
["/cosmos.gov.v1.MsgDeposit", MsgDeposit],
|
|
8
|
+
["/cosmos.gov.v1.MsgVote", MsgVote],
|
|
11
9
|
["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
|
|
10
|
+
["/cosmos.gov.v1.MsgDeposit", MsgDeposit],
|
|
12
11
|
["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal],
|
|
13
|
-
["/cosmos.gov.v1.MsgVote", MsgVote],
|
|
14
12
|
|
|
15
13
|
];
|
|
16
14
|
|